@bigbinary/neeto-editor 1.19.0 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -31,7 +31,7 @@ return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();functio
|
|
|
31
31
|
|
|
32
32
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
33
|
*/
|
|
34
|
-
return function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),p=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,h,w,_,x,E,k,M,D,C,S=this._hash.words,A=d.words,N=p.words,O=a.words,T=l.words,I=c.words,L=u.words;for(x=o=S[0],E=s=S[1],k=h=S[2],M=w=S[3],D=_=S[4],n=0;n<80;n+=1)C=o+e[t+O[n]]|0,C+=n<16?f(s,h,w)+A[0]:n<32?m(s,h,w)+A[1]:n<48?g(s,h,w)+A[2]:n<64?b(s,h,w)+A[3]:y(s,h,w)+A[4],C=(C=v(C|=0,I[n]))+_|0,o=_,_=w,w=v(h,10),h=s,s=C,C=x+e[t+T[n]]|0,C+=n<16?y(E,k,M)+N[0]:n<32?b(E,k,M)+N[1]:n<48?g(E,k,M)+N[2]:n<64?m(E,k,M)+N[3]:f(E,k,M)+N[4],C=(C=v(C|=0,L[n]))+D|0,x=D,D=M,M=v(k,10),k=E,E=C;C=S[1]+h+M|0,S[1]=S[2]+w+D|0,S[2]=S[3]+_+x|0,S[3]=S[4]+o+E|0,S[4]=S[0]+s+k|0,S[0]=C},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function f(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function b(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function v(e,t){return e<<t|e>>>32-t}n.RIPEMD160=o._createHelper(h),n.HmacRIPEMD160=o._createHmacHelper(h)}(),e.RIPEMD160}(Nm())),mg(),gg||(gg=1,bg.exports=function(e){return function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.SHA1,a=o.HMAC,l=o.PBKDF2=r.extend({cfg:r.extend({keySize:128/32,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=a.create(n.hasher,e),o=i.create(),s=i.create([1]),l=o.words,c=s.words,u=n.keySize,d=n.iterations;l.length<u;){var p=r.update(t).finalize(s);r.reset();for(var h=p.words,f=h.length,m=p,g=1;g<d;g++){m=r.finalize(m),r.reset();for(var b=m.words,y=0;y<f;y++)h[y]^=b[y]}o.concat(p),c[0]++}return o.sigBytes=4*u,o}});t.PBKDF2=function(e,t,n){return l.create(n).compute(e,t)}}(),e.PBKDF2}(Nm(),Jm(),mg())),wg(),Eg(),Dg(),Ag(),Tg(),Fg(),zg||(zg=1,jg.exports=function(e){return e.mode.ECB=((t=e.lib.BlockCipherMode.extend()).Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t),e.mode.ECB;var t}(Nm(),Eg())),Rg||(Rg=1,Bg.exports=function(e){return e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,o=n+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923}(Nm(),Eg())),Pg||(Pg=1,Ug.exports=function(e){return e.pad.Iso10126={pad:function(t,n){var r=4*n,i=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126}(Nm(),Eg())),Hg||(Hg=1,$g.exports=function(e){return e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971}(Nm(),Eg())),Vg||(Vg=1,Wg.exports=function(e){return e.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding}(Nm(),Eg())),qg||(qg=1,Kg.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(Nm(),Eg())),Gg||(Gg=1,Yg.exports=function(e){return function(t){var n=e,r=n.lib.CipherParams,i=n.enc.Hex;n.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return r.create({ciphertext:t})}}}(),e.format.Hex}(Nm(),Eg())),Qg||(Qg=1,Jg.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],l=[],c=[],u=[],d=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var f=r^r<<1^r<<2^r<<3^r<<4;f=f>>>8^255&f^99,i[n]=f,o[f]=n;var m=e[n],g=e[m],b=e[g],y=257*e[f]^16843008*f;s[n]=y<<24|y>>>8,a[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*b^65537*g^257*m^16843008*n,u[f]=y<<24|y>>>8,d[f]=y<<16|y>>>16,p[f]=y<<8|y>>>24,h[f]=y,n?(n=m^e[e[e[b^m]]],r^=e[e[r]]):n=r=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=f[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],l=0;l<r;l++){if(s=r-l,l%4)var c=o[s];else c=o[s-4];a[l]=l<4||s<=4?c:u[i[c>>>24]]^d[i[c>>>16&255]]^p[i[c>>>8&255]]^h[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,d,p,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],d=e[t+2]^n[2],p=e[t+3]^n[3],h=4,f=1;f<l;f++){var m=r[c>>>24]^i[u>>>16&255]^o[d>>>8&255]^s[255&p]^n[h++],g=r[u>>>24]^i[d>>>16&255]^o[p>>>8&255]^s[255&c]^n[h++],b=r[d>>>24]^i[p>>>16&255]^o[c>>>8&255]^s[255&u]^n[h++],y=r[p>>>24]^i[c>>>16&255]^o[u>>>8&255]^s[255&d]^n[h++];c=m,u=g,d=b,p=y}m=(a[c>>>24]<<24|a[u>>>16&255]<<16|a[d>>>8&255]<<8|a[255&p])^n[h++],g=(a[u>>>24]<<24|a[d>>>16&255]<<16|a[p>>>8&255]<<8|a[255&c])^n[h++],b=(a[d>>>24]<<24|a[p>>>16&255]<<16|a[c>>>8&255]<<8|a[255&u])^n[h++],y=(a[p>>>24]<<24|a[c>>>16&255]<<16|a[u>>>8&255]<<8|a[255&d])^n[h++],e[t]=m,e[t+1]=g,e[t+2]=b,e[t+3]=y},keySize:256/32});t.AES=n._createHelper(m)}(),e.AES}(Nm(),Hm(),Gm(),wg(),Eg())),eb(),tb||(tb=1,nb.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=r.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var s=i%n,a=t[s>>>2]>>>24-s%4*8&255;o=(o+r[i]+a)%256;var l=r[i];r[i]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:256/32,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}t.RC4=n._createHelper(i);var s=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});t.RC4Drop=n._createHelper(s)}(),e.RC4}(Nm(),Hm(),Gm(),wg(),Eg())),rb||(rb=1,ib.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=[],o=[],s=[],a=r.Rabbit=n.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=c>>>16|4294901760&u,p=u<<16|65535&c;for(i[0]^=c,i[1]^=d,i[2]^=u,i[3]^=p,i[4]^=c,i[5]^=d,i[6]^=u,i[7]^=p,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:128/32,ivSize:64/32});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,a=r>>>16,l=((i*i>>>17)+i*a>>>15)+a*a,c=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=n._createHelper(a)}(),e.Rabbit}(Nm(),Hm(),Gm(),wg(),Eg())),ob||(ob=1,sb.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=[],o=[],s=[],a=r.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=c>>>16|4294901760&u,p=u<<16|65535&c;for(r[0]^=c,r[1]^=d,r[2]^=u,r[3]^=p,r[4]^=c,r[5]^=d,r[6]^=u,r[7]^=p,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:128/32,ivSize:64/32});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,a=r>>>16,l=((i*i>>>17)+i*a>>>15)+a*a,c=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=n._createHelper(a)}(),e.RabbitLegacy}(Nm(),Hm(),Gm(),wg(),Eg())));const lb=async e=>{const t=await(e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{const n=ab.lib.WordArray.create(e.target.result);t(ab.MD5(n))},r.onerror=()=>n(new Error("Corrupted file")),r.readAsArrayBuffer(e)})))(e);return t.toString(ab.enc.Base64)};class cb{constructor(e){let{url:t,file:n,progress:r=f}=e;_m(this,"create",(async()=>{const e=await this.generateUrl(),{url:t,headers:n}=e.directUpload;return await this.uploadToCloud(t,n),e})),_m(this,"generateUrl",(async()=>{const e={blob:{filename:this.file.name,byteSize:this.file.size,contentType:this.file.type,checksum:await lb(this.file)}};return xm(this.url,e)})),_m(this,"abort",(()=>this.abortController.abort())),_m(this,"uploadToCloud",((e,t)=>{const n={headers:t,onUploadProgress:this.progress,signal:this.abortController.signal};return Em(e,this.file,n)})),this.url=t,this.file=n,this.progress=r,this.abortController=new AbortController}}class ub extends xs.exports.BasePlugin{constructor(e,t){super(e,t),_m(this,"upload",(e=>{if(b(e))return Promise.resolve();const t=e.map((e=>this.uploadFile(this.uppy.getFile(e))));return Promise.all(t)})),_m(this,"uploadFile",(async e=>{this.uppy.on("file-removed",(n=>{n.id===e.id&&(t.abort(),b(this.uppy.getFiles())&&this.uppy.emit("complete"))})),this.uppy.on("upload-cancel",(n=>{n===e.id&&t.abort()})),this.uppy.on("cancel-all",(()=>t.abort()));const t=new cb({file:e.data,url:this.opts.directUploadUrl,progress:t=>{t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total,progress:Math.round(t.loaded/t.total*100)})}});try{const n=await t.create();return this.uppy.setFileState(e.id,{response:{status:"success"}}),this.uppy.emit("upload-success",e,n),e}catch(t){if(!this.uppy.getFile(e.id))return null;throw this.uppy.setFileState(e.id,{response:{status:"error"}}),this.uppy.emit("upload-error",e,t),t}})),this.type="uploader",this.id=t.id||"ActiveStorageUpload",this.title=t.title||"Active Storage Upload"}install(){this.uppy.addUploader(this.upload)}uninstall(){this.uppy.removeUploader(this.upload)}}const db=e=>{let{endpoint:t,uppyConfig:n,onSuccess:i=(e=>{})}=e;const[o,s]=r(!1),a=e=>{const{maxFileSize:t}=n.restrictions;return!(e.size>t)||(v.error(`File size is too large. Max size is ${ym(n.restrictions.maxFileSize)}.`),!1)},l=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=dm(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof pm)))throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof t.current}`);return um((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}((()=>new oc({...n,onBeforeFileAdded:a}).use(ub,{directUploadUrl:t,...gm}).on("upload",(()=>s(!0))).on("upload-success",((e,t)=>{let{blobUrl:n}=t;return null==i?void 0:i(n)})).on("cancel-all",(()=>s(!1))).on("complete",(()=>{l.reset(),s(!1)}))));return{uppy:l,isUploading:o}};var pb={exports:{}};!function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function n(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof yi&&yi.global===yi?yi:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,s){var a=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):r(l.href)?n(e,t,s):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,s){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,s),o);else if(r(e))n(e,o,s);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){i(a)}))}}:function(e,t,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,r);var a="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,p=d.createObjectURL(e);i?i.location=p:location.href=p,i=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a}()}(pb);var hb=pb.exports;const fb={autoProceed:!1,allowMultipleUploads:!1,restrictions:{maxFileSize:100*1024*1024}},mb="Download",gb="Rename",bb="Delete";function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yb.apply(this,arguments)}var vb={grad:.9,turn:360,rad:360/(2*Math.PI)},wb=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},_b=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},xb=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Eb=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},kb=function(e){return{r:xb(e.r,0,255),g:xb(e.g,0,255),b:xb(e.b,0,255),a:xb(e.a)}},Mb=function(e){return{r:_b(e.r),g:_b(e.g),b:_b(e.b),a:_b(e.a,3)}},Db=/^#([0-9a-f]{3,8})$/i,Cb=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Sb=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:o?s/o*100:0,v:o/255*100,a:i}},Ab=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,a,s,s,l,r][c],g:255*[l,r,r,a,s,s][c],b:255*[s,s,l,r,r,a][c],a:i}},Nb=function(e){return{h:Eb(e.h),s:xb(e.s,0,100),l:xb(e.l,0,100),a:xb(e.a)}},Ob=function(e){return{h:_b(e.h),s:_b(e.s),l:_b(e.l),a:_b(e.a,3)}},Tb=function(e){return Ab((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Ib=function(e){return{h:(t=Sb(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},Lb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,zb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rb={string:[[function(e){var t=Db.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?_b(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?_b(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=zb.exec(e)||jb.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:kb({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Lb.exec(e)||Fb.exec(e);if(!t)return null;var n,r,i=Nb({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(vb[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Tb(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=void 0===i?1:i;return wb(t)&&wb(n)&&wb(r)?kb({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,o=void 0===i?1:i;if(!wb(t)||!wb(n)||!wb(r))return null;var s=Nb({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return Tb(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=void 0===i?1:i;if(!wb(t)||!wb(n)||!wb(r))return null;var s=function(e){return{h:Eb(e.h),s:xb(e.s,0,100),v:xb(e.v,0,100),a:xb(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Ab(s)},"hsv"]]},Bb=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Pb=function(e,t){var n=Ib(e);return{h:n.h,s:xb(n.s+100*t,0,100),l:n.l,a:n.a}},Ub=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hb=function(e,t){var n=Ib(e);return{h:n.h,s:n.s,l:xb(n.l+100*t,0,100),a:n.a}},$b=function(){function e(e){this.parsed=function(e){return"string"==typeof e?Bb(e.trim(),Rb.string):"object"==typeof e&&null!==e?Bb(e,Rb.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return _b(Ub(this.rgba),2)},e.prototype.isDark=function(){return Ub(this.rgba)<.5},e.prototype.isLight=function(){return Ub(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Mb(this.rgba)).r,n=e.g,r=e.b,o=(i=e.a)<1?Cb(_b(255*i)):"","#"+Cb(t)+Cb(n)+Cb(r)+o;var e,t,n,r,i,o},e.prototype.toRgb=function(){return Mb(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Mb(this.rgba)).r,n=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+r+", "+i+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,i},e.prototype.toHsl=function(){return Ob(Ib(this.rgba))},e.prototype.toHslString=function(){return t=(e=Ob(Ib(this.rgba))).h,n=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+i+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,i},e.prototype.toHsv=function(){return e=Sb(this.rgba),{h:_b(e.h),s:_b(e.s),v:_b(e.v),a:_b(e.a,3)};var e},e.prototype.invert=function(){return Vb({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Vb(Pb(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Vb(Pb(this.rgba,-e))},e.prototype.grayscale=function(){return Vb(Pb(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Vb(Hb(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Vb(Hb(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Vb({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):_b(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ib(this.rgba);return"number"==typeof e?Vb({h:e,s:t.s,l:t.l,a:t.a}):_b(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Vb(e).toHex()},e}(),Vb=function(e){return e instanceof $b?e:new $b(e)},Wb=[];var qb=1/0,Kb="[object Symbol]",Gb="object"==typeof yi&&yi&&yi.Object===Object&&yi,Yb="object"==typeof self&&self&&self.Object===Object&&self,Qb=Gb||Yb||Function("return this")(),Jb=Object.prototype,Zb=0,Xb=Jb.toString,ey=Qb.Symbol,ty=ey?ey.prototype:void 0,ny=ty?ty.toString:void 0;function ry(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Xb.call(e)==Kb}(e))return ny?ny.call(e):"";var t=e+"";return"0"==t&&1/e==-qb?"-0":t}var iy=function(e){var t,n=++Zb;return(null==(t=e)?"":ry(t))+n},oy={"3d":n.createElement("path",{d:"M18 14.625V3.375L9 0 0 3.375v11.25L9 18l9-3.375zM9 2.136l5.918 2.22-5.98 2.242-5.919-2.22L9 2.137zM2 13.239V5.065l6.438 2.414v8.174L2 13.24zM9.438 15.7L16 13.239V5.018l-6.563 2.46V15.7z",transform:"translate(15 10)",fillRule:"evenodd"}),acrobat:n.createElement("path",{d:"M10.15 1.095C9.938.33 9.42-.051 8.984.005c-.528.068-1.09.382-1.314.876-.63 1.416.685 5.582.887 6.279-1.28 3.863-5.66 11.5-7.806 12.017-.045-.505.225-1.965 3.055-3.785.146-.157.315-.348.393-.472-2.392 1.168-5.492 3.044-3.628 4.448.102.079.259.146.439.213 1.426.528 3.425-1.201 5.435-5.121 2.213-.73 3.999-1.28 6.526-1.662 2.762 1.875 4.616 2.257 5.874 1.774.348-.135.898-.573 1.055-1.145-1.022 1.258-3.414.382-5.323-.82 1.763-.191 3.582-.303 4.369-.056 1 .314.965.808.954.876.079-.27.191-.708-.022-1.056-.842-1.37-4.706-.573-6.11-.427-2.212-1.336-3.74-3.717-4.358-5.436.573-2.212 1.19-3.818.742-5.413zm-.954 4.638C8.826 4.42 8.309 1.5 9.14.556c1.628.932.618 3.144.056 5.177zm3.044 6.514c-2.134.393-3.583.944-5.66 1.764.617-1.202 1.785-4.268 2.346-6.29.787 1.573 1.741 3.111 3.314 4.526z",transform:"translate(14 9)",fillRule:"evenodd"}),audio:n.createElement("path",{d:"M.25 4.75v4.5h3L7 13V1L3.25 4.75h-3zM10.375 7A3.375 3.375 0 0 0 8.5 3.977v6.037A3.355 3.355 0 0 0 10.375 7zM8.5.421v1.545A5.254 5.254 0 0 1 12.25 7a5.254 5.254 0 0 1-3.75 5.032v1.545A6.747 6.747 0 0 0 13.75 7 6.747 6.747 0 0 0 8.5.421z",transform:"translate(17 12)",fillRule:"evenodd"}),binary:n.createElement("path",{d:"M2.338 6.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504C1.274.928.538 2 .538 3.608c0 1.56.576 2.504 1.8 2.504zM1.61 3.408c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zM2.418 5.2c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568zm7.03.8l.088-.944H8.36V.896L7.272.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zm5.199 0l.088-.944h-1.176V.896L12.47.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zM4.25 14l.088-.944H3.162v-4.16l-1.088.088v.592L.89 9.688l.024.824h1.16v2.544H.754V14zm5.198 0l.088-.944H8.36v-4.16l-1.088.088v.592l-1.184.112.024.824h1.16v2.544h-1.32V14zm3.287.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504-1.192 0-1.928 1.072-1.928 2.68 0 1.56.576 2.504 1.8 2.504zm-.728-2.704c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zm.808 1.792c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568z",transform:"translate(16 11)",fillRule:"evenodd"}),code:n.createElement("path",{d:"M4.078 13.67c-1.875-.527-2.812-1.738-2.812-3.634V9.49C1.266 8.437.844 7.911 0 7.911V6.138c.844 0 1.266-.529 1.266-1.586v-.64c.015-.938.257-1.696.726-2.274C2.466 1.06 3.162.64 4.078.38l.492 1.375c-.656.25-.997.95-1.023 2.102v.695c0 1.167-.482 1.99-1.445 2.469.963.479 1.445 1.304 1.445 2.476v.688c.026 1.15.367 1.851 1.023 2.101l-.492 1.383zm7.844 0c1.875-.527 2.812-1.738 2.812-3.634V9.49c0-1.052.422-1.578 1.266-1.578V6.138c-.844 0-1.266-.529-1.266-1.586v-.64c-.015-.938-.257-1.696-.726-2.274-.474-.578-1.17-.998-2.086-1.258l-.492 1.375c.656.25.997.95 1.023 2.102v.695c0 1.167.482 1.99 1.445 2.469-.963.479-1.445 1.304-1.445 2.476v.688c-.026 1.15-.367 1.851-1.023 2.101l.492 1.383z",transform:"translate(16 13)",fillRule:"evenodd"}),code2:n.createElement("path",{d:"M7.4 10.6L2.8 6l4.6-4.6L6 0 0 6l6 6 1.4-1.4zm5.2 0L17.2 6l-4.6-4.6L14 0l6 6-6 6-1.4-1.4z",transform:"translate(14 14)",fillRule:"evenodd"}),compressed:n.createElement("path",{d:"M.25 0A.25.25 0 0 0 0 .25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 1.75V.25A.25.25 0 0 0 1.75 0H.25zM1 17a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1H1zm0 4v3h2v-3H1zM2 2.25A.25.25 0 0 1 2.25 2h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 3.75v-1.5zM.25 4a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 5.75v-1.5A.25.25 0 0 0 1.75 4H.25zM2 6.25A.25.25 0 0 1 2.25 6h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 7.75v-1.5zM.25 8a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 9.75v-1.5A.25.25 0 0 0 1.75 8H.25zM2 10.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5zM.25 12a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1.5a.25.25 0 0 0-.25-.25H.25zM2 14.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5z",transform:"translate(15 1)",fillRule:"evenodd"}),document:n.createElement("path",{d:"M12 4H0v2h12V4zM0 10h18V8H0v2zM0 0v2h18V0H0z",transform:"translate(15 15)",fillRule:"evenodd"}),drive:n.createElement("path",{d:"M2.199.289A.5.5 0 0 1 2.652 0h8.696a.5.5 0 0 1 .453.289l1.867 4a.5.5 0 0 1-.453.711H.785a.5.5 0 0 1-.453-.711l1.867-4zM13 6H1a.752.752 0 0 0-.75.75v4.5c0 .412.338.75.75.75h12c.412 0 .75-.338.75-.75v-4.5A.752.752 0 0 0 13 6zm-9.75 4.5c-.825 0-1.5-.675-1.5-1.5s.675-1.5 1.5-1.5 1.5.675 1.5 1.5-.675 1.5-1.5 1.5z",transform:"translate(17 13)",fillRule:"evenodd"}),font:n.createElement("path",{d:"M3.722 8.702l-.686 1.89c-.053.14-.094.28-.123.421-.03.135-.044.252-.044.352 0 .304.097.527.29.668.2.14.501.21.905.21h.414V13H.083v-.756h.343c.176 0 .325-.018.448-.053a.81.81 0 0 0 .334-.22c.1-.105.193-.249.281-.43.094-.182.197-.416.308-.704L5.787.15h1.406l4.07 11.136c.07.187.14.343.21.466.077.123.165.222.264.298.1.07.214.12.343.15.129.03.281.044.457.044h.237V13H7.826v-.756h.413c.72 0 1.081-.287 1.081-.862 0-.1-.014-.202-.044-.307a3.274 3.274 0 0 0-.105-.36l-.72-2.013H3.72zM7.009 4.65c-.188-.533-.36-1.031-.519-1.494a15.92 15.92 0 0 1-.378-1.354 7.12 7.12 0 0 1-.15.633 16.95 16.95 0 0 1-.395 1.283c-.082.229-.175.484-.28.765L4.063 7.796h4.061L7.009 4.65zm8.411 5.74c0 .562.117.984.351 1.265.24.275.61.413 1.108.413.363 0 .691-.059.984-.176.3-.117.551-.284.756-.5.211-.218.372-.481.483-.792.112-.31.168-.656.168-1.037V8.104l-1.152.053c-.51.023-.937.088-1.283.193-.34.1-.615.243-.826.43a1.546 1.546 0 0 0-.457.678c-.088.27-.132.58-.132.931zm2.18-6.32c-.346 0-.627.05-.844.15a1.182 1.182 0 0 0-.501.404 1.594 1.594 0 0 0-.237.624c-.041.24-.062.5-.062.782-.498 0-.879-.085-1.143-.255-.257-.17-.386-.463-.386-.879 0-.31.085-.574.255-.79.17-.218.401-.393.694-.528.299-.14.644-.243 1.037-.308a7.76 7.76 0 0 1 1.257-.097c.55 0 1.031.056 1.441.167.41.106.753.282 1.029.528.275.246.48.568.615.967.14.392.21.876.21 1.45v4.667c0 .252.021.46.062.624a.928.928 0 0 0 .194.395c.088.1.202.17.343.211.146.041.319.062.518.062h.053V13H19.7l-.281-1.547h-.15c-.187.252-.369.483-.544.694-.176.211-.37.393-.58.545-.211.152-.452.27-.721.352a3.053 3.053 0 0 1-.958.131c-.399 0-.77-.058-1.116-.175a2.369 2.369 0 0 1-.888-.519 2.516 2.516 0 0 1-.58-.896c-.14-.364-.211-.791-.211-1.284 0-.955.34-1.664 1.02-2.127.68-.462 1.707-.714 3.084-.755l1.495-.053V6.285a6.93 6.93 0 0 0-.053-.888 1.778 1.778 0 0 0-.229-.703 1.14 1.14 0 0 0-.51-.457c-.216-.111-.51-.167-.878-.167z",transform:"translate(13 12)",fillRule:"evenodd"}),image:n.createElement("path",{d:"M13 0L9.25 5l2.85 3.8-1.6 1.2C8.81 7.75 6 4 6 4l-6 8h22L13 0z",transform:"translate(13 14)",fillRule:"evenodd"}),presentation:n.createElement("path",{d:"M2 4H0v10c0 1.1.9 2 2 2h14v-2H2V4zm16-4H6C4.9 0 4 .9 4 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 10H6V2h12v8z",transform:"matrix(-1 0 0 1 34 12)",fillRule:"evenodd"}),settings:n.createElement("path",{d:"M13.572 8.735c.03-.24.053-.48.053-.735s-.023-.495-.053-.735l1.583-1.237a.378.378 0 0 0 .09-.48l-1.5-2.595a.377.377 0 0 0-.457-.165l-1.868.75a5.48 5.48 0 0 0-1.268-.735L9.868.815A.366.366 0 0 0 9.5.5h-3a.366.366 0 0 0-.367.315l-.285 1.988a5.762 5.762 0 0 0-1.268.735l-1.868-.75a.366.366 0 0 0-.457.165l-1.5 2.595a.37.37 0 0 0 .09.48l1.583 1.237c-.03.24-.053.488-.053.735 0 .248.022.495.053.735L.845 9.973a.378.378 0 0 0-.09.48l1.5 2.595c.09.165.292.225.458.165l1.867-.75c.39.3.81.547 1.268.735l.285 1.987c.022.18.18.315.367.315h3a.366.366 0 0 0 .367-.315l.285-1.988a5.762 5.762 0 0 0 1.268-.734l1.867.75c.173.067.368 0 .458-.165l1.5-2.595a.378.378 0 0 0-.09-.48l-1.582-1.238zM8 10.625A2.628 2.628 0 0 1 5.375 8 2.628 2.628 0 0 1 8 5.375 2.628 2.628 0 0 1 10.625 8 2.628 2.628 0 0 1 8 10.625z",transform:"translate(16 11)",fillRule:"evenodd"}),spreadsheet:n.createElement("path",{d:"M0 8h6V5H0v3zm0 5h6v-3H0v3zM0 3h6V0H0v3zm8 5h12V5H8v3zm0 5h12v-3H8v3zM8 0v3h12V0H8z",transform:"translate(14 14)",fillRule:"evenodd"}),vector:n.createElement("path",{d:"M14.5 2V1a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v1H3.937a2 2 0 1 0 0 1h3.936A9 9 0 0 0 3 11v1h2v-1a7.003 7.003 0 0 1 4.594-6.576A1 1 0 0 0 10.5 5h3a1 1 0 0 0 .906-.576A7.003 7.003 0 0 1 19 11v1h2v-1a9 9 0 0 0-4.873-8h3.936a2 2 0 1 0 0-1H14.5zm-1-1h-3v3h3V1zM2 1.5a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm19 1a1 1 0 1 0 2 0 1 1 0 0 0-2 0z",transform:"translate(12 14)",fillRule:"evenodd"}),video:n.createElement("path",{d:"M10.75 3.875V1.25A.752.752 0 0 0 10 .5H1a.752.752 0 0 0-.75.75v7.5c0 .412.338.75.75.75h9c.412 0 .75-.338.75-.75V6.125l3 3V.875l-3 3z",transform:"translate(17 14)"})};!function(e){e.forEach((function(e){Wb.indexOf(e)<0&&(e($b,Rb),Wb.push(e))}))}([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var i,s,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!o.length)for(var d in n)o[d]=new e(n[d]).toRgb();for(var p in n){var h=(i=l,s=o[p],Math.pow(i.r-s.r,2)+Math.pow(i.g-s.g,2)+Math.pow(i.b-s.b,2));h<c&&(c=h,u=p)}return u}},t.string.push([function(t){var r=t.toLowerCase(),i="transparent"===r?"#0000":n[r];return i?new e(i).toRgb():null},"name"])}]);var sy={color:jh.exports.string,extension:jh.exports.string,fold:jh.exports.bool,foldColor:jh.exports.string,glyphColor:jh.exports.string,gradientColor:jh.exports.string,gradientOpacity:jh.exports.number,labelColor:jh.exports.string,labelTextColor:jh.exports.string,labelUppercase:jh.exports.bool,radius:jh.exports.number,type:jh.exports.oneOf(["3d","acrobat","audio","binary","code","code2","compressed","document","drive","font","image","presentation","settings","spreadsheet","vector","video"])},ay=40,ly=48,cy={WIDTH:ay,HEIGHT:ly,X_OFFSET:0},uy=12,dy=14,py=function(e){var t=e.color,r=void 0===t?"whitesmoke":t,i=e.extension,o=e.fold,s=void 0===o||o,a=e.foldColor,l=e.glyphColor,c=e.gradientColor,u=void 0===c?"white":c,d=e.gradientOpacity,p=void 0===d?.25:d,h=e.labelColor,f=e.labelTextColor,m=void 0===f?"white":f,g=e.labelUppercase,b=void 0!==g&&g,y=e.radius,v=void 0===y?4:y,w=e.type,_=iy();return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 "+ay+" "+ly,width:"100%",style:{maxWidth:"100%"}},n.createElement("defs",null,n.createElement("clipPath",{id:"pageRadius"+_},n.createElement("rect",{x:cy.X_OFFSET,y:"0",rx:v,ry:v,width:cy.WIDTH,height:cy.HEIGHT})),n.createElement("clipPath",{id:"foldCrop"},n.createElement("rect",{width:cy.WIDTH,height:uy,transform:"rotate(-45 0 "+uy+")"})),n.createElement("linearGradient",{x1:"100%",y1:"0%",y2:"100%",id:"pageGradient"+_},n.createElement("stop",{stopColor:u,stopOpacity:p,offset:"0%"}),n.createElement("stop",{stopColor:u,stopOpacity:"0",offset:"66.67%"}))),n.createElement("g",{id:"file",clipPath:"url(#pageRadius"+_+")"},s?n.createElement(n.Fragment,null,n.createElement("path",{d:"M"+cy.X_OFFSET+" 0 h "+(cy.WIDTH-uy)+" L "+(cy.WIDTH+cy.X_OFFSET)+" "+uy+" v "+(cy.HEIGHT-uy)+" H "+cy.X_OFFSET+" Z",fill:r}),n.createElement("path",{d:"M"+cy.X_OFFSET+" 0 h "+(cy.WIDTH-uy)+" L "+(cy.WIDTH+cy.X_OFFSET)+" "+uy+" v "+(cy.HEIGHT-uy)+" H "+cy.X_OFFSET+" Z",fill:"url(#pageGradient"+_+")"})):n.createElement(n.Fragment,null,n.createElement("rect",{x:cy.X_OFFSET,y:"0",width:cy.WIDTH,height:cy.HEIGHT,fill:r}),n.createElement("rect",{x:cy.X_OFFSET,y:"0",width:cy.WIDTH,height:cy.HEIGHT,fill:"url(#pageGradient"+_+")"}))),s&&n.createElement("g",{transform:"translate(28 "+uy+") rotate(-90)"},n.createElement("rect",{width:cy.WIDTH,height:cy.HEIGHT,fill:a||Vb(r).darken(.1).toHex(),rx:v,ry:v,clipPath:"url(#foldCrop)"})),i&&n.createElement(n.Fragment,null,n.createElement("g",{id:"label"},n.createElement("rect",{fill:h||Vb(r).darken(.3).toHex(),x:cy.X_OFFSET,y:cy.HEIGHT-dy,width:cy.WIDTH,height:dy,clipPath:"url(#pageRadius"+_+")"})),n.createElement("g",{id:"labelText",transform:"translate("+cy.X_OFFSET+" 34)"},n.createElement("text",{x:cy.WIDTH/2,y:"10",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"9",fill:m,textAnchor:"middle",style:{fontWeight:"bold",textAlign:"center",pointerEvents:"none",textTransform:b?"uppercase":"none",userSelect:"none"}},i))),w&&n.createElement("g",{transform:"translate(-4 "+(i?0:6)+")",fill:l||Vb(r).darken(.15).toHex()},oy[w]))};py.propTypes=sy;var hy={"3dm":{labelColor:"#8D1A11",type:"3d"},"3ds":{labelColor:"#5FB9AD",type:"3d"},"3g2":{type:"video"},"3gp":{type:"video"},"7zip":{type:"compressed"},aac:{type:"audio"},aep:{type:"video"},ai:{color:"#423325",gradientOpacity:0,labelColor:"#423325",labelTextColor:"#FF7F18",labelUppercase:!0,foldColor:"#FF7F18",radius:2},aif:{type:"audio"},aiff:{type:"audio"},asf:{type:"video"},asp:{type:"code"},aspx:{type:"code"},avi:{type:"video"},bin:{type:"binary"},bmp:{type:"image"},c:{type:"code"},cpp:{type:"code"},cs:{type:"code"},css:{type:"code"},csv:{type:"spreadsheet"},cue:{type:"document"},dll:{type:"settings"},dmg:{type:"drive"},doc:{color:"#2C5898",foldColor:"#254A80",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#2C5898",labelUppercase:!0,type:"document"},docx:{color:"#2C5898",foldColor:"#254A80",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#2C5898",labelUppercase:!0,type:"document"},dwg:{type:"vector"},dxf:{type:"vector"},eot:{type:"font"},eps:{type:"vector"},exe:{type:"settings"},flac:{type:"audio"},flv:{type:"video"},fnt:{type:"font"},fodp:{type:"presentation"},fods:{type:"spreadsheet"},fodt:{type:"document"},fon:{type:"font"},gif:{type:"image"},gz:{type:"compressed"},htm:{type:"code"},html:{type:"code"},indd:{color:"#4B2B36",gradientOpacity:0,labelColor:"#4B2B36",labelTextColor:"#FF408C",labelUppercase:!0,foldColor:"#FF408C",radius:2},ini:{type:"settings"},java:{type:"code"},jpeg:{type:"image"},jpg:{type:"image"},js:{labelColor:"#F7DF1E",type:"code"},json:{type:"code"},jsx:{labelColor:"#00D8FF",type:"code"},m4a:{type:"audio"},m4v:{type:"video"},max:{labelColor:"#5FB9AD",type:"3d"},md:{type:"document"},mid:{type:"audio"},mkv:{type:"video"},mov:{type:"video"},mp3:{type:"audio"},mp4:{type:"video"},mpeg:{type:"video"},mpg:{type:"video"},obj:{type:"3d"},odp:{type:"presentation"},ods:{type:"spreadsheet"},odt:{type:"document"},ogg:{type:"audio"},ogv:{type:"video"},otf:{type:"font"},pdf:{labelColor:"#D93831",type:"acrobat"},php:{labelColor:"#8892BE",type:"code"},pkg:{type:"3d"},plist:{type:"settings"},png:{type:"image"},ppt:{color:"#D14423",foldColor:"#AB381D",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#D14423",labelUppercase:!0,type:"presentation"},pptx:{color:"#D14423",foldColor:"#AB381D",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#D14423",labelUppercase:!0,type:"presentation"},pr:{type:"video"},ps:{type:"vector"},psd:{color:"#34364E",gradientOpacity:0,labelColor:"#34364E",labelTextColor:"#31C5F0",labelUppercase:!0,foldColor:"#31C5F0",radius:2},py:{labelColor:"#FFDE57",type:"code"},rar:{type:"compressed"},rb:{labelColor:"#BB271A",type:"code"},rm:{type:"video"},rtf:{type:"document"},scss:{labelColor:"#C16A98",type:"code"},sitx:{type:"compressed"},svg:{type:"vector"},swf:{type:"video"},sys:{type:"settings"},tar:{type:"compressed"},tex:{type:"document"},tif:{type:"image"},tiff:{type:"image"},ts:{labelColor:"#3478C7",type:"code"},ttf:{type:"font"},txt:{type:"document"},wav:{type:"audio"},webm:{type:"video"},wmv:{type:"video"},woff:{type:"font"},wpd:{type:"document"},wps:{type:"document"},xlr:{type:"spreadsheet"},xls:{color:"#1A754C",foldColor:"#16613F",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#1A754C",labelUppercase:!0,type:"spreadsheet"},xlsx:{color:"#1A754C",foldColor:"#16613F",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#1A754C",labelUppercase:!0,type:"spreadsheet"},yml:{type:"code"},zip:{type:"compressed"},zipx:{type:"compressed"}};const fy=e=>{let{fileName:t}=e;const r=t.match(/([^.]+)$/)[1];return n.createElement("div",{className:"ne-attachments__attachment-file-icon"},n.createElement(py,yb({extension:r,labelColor:"#4558f9"},hy[r])))},{Menu:my,MenuItem:gy}=k,by=e=>{let{attachment:t,endpoint:i,onChange:o,attachments:s,disabled:a}=e;const[l,c]=r(!1),[u,d]=r(!1),[p,h]=r(!1),[f,m]=r(""),g=async()=>{h(!0);try{const{signedId:e}=t;await Mm(i,e),o(s.filter((t=>t.signedId!==e)))}catch(e){v.error(e)}},y={[mb]:()=>{hb(t.url,t.fileName)},[gb]:async()=>{try{const{signedId:e}=t,n={blob:{filename:f}},{blob:{filename:r}}=await km(i,e,n);o(s.map((t=>t.signedId===e?pe("filename",r,t):t)))}catch(e){v.error(e)}finally{c(!1),m("")}},[bb]:g};return n.createElement(n.Fragment,null,n.createElement("div",{className:"ne-attachments__attachment"},l?n.createElement(n.Fragment,null,n.createElement(w,{content:f,position:"top"},n.createElement(_,{autoFocus:!0,error:b(f)?"Filename cannot be empty":"",size:"small",value:f,onChange:e=>m(e.target.value),onKeyDown:e=>(e=>{let{event:t,key:n}=e;const r=y[n];"Enter"===t.key&&r&&!b(f)&&(t.preventDefault(),r()),"Escape"===t.key&&(c(!1),m(""))})({event:e,key:gb})})),n.createElement(x,{icon:F,size:"small",style:"text",onClick:()=>c(!1)})):n.createElement(n.Fragment,null,n.createElement(fy,{fileName:t.filename}),n.createElement(w,{content:t.filename,position:"top"},n.createElement(E,{style:"body2"},t.filename)),n.createElement(w,{content:"You are not permitted to update or delete attachments",disabled:!a,position:"top"},n.createElement("span",null,n.createElement(k,{buttonSize:"small",buttonStyle:"text",disabled:a,icon:z},n.createElement(my,null,Object.entries(y).map((e=>{let[r,i]=e;return n.createElement(gy.Button,{key:r,onClick:()=>(e=>{let{key:n,handler:r}=e;n===gb?(c(!0),m(t.filename)):n===bb?(m(t.filename),d(!0)):r()})({key:r,handler:i})},r)})))))))),n.createElement(M,{isOpen:u,isSubmitting:p,message:`Are you sure you want to remove ${f}?`,title:"Remove Attachment?",onClose:()=>d(!1),onSubmit:g}))},yy=e=>{let{attachment:t,uppy:r,removeUploadingFile:i}=e;const o=`${t.progress}%`;return n.createElement("div",{className:"ne-attachments__attachment"},n.createElement("div",{className:"ne-attachments__attachment__progress-icon"},n.createElement(py,null)),n.createElement("div",{className:"ne-attachments__attachment__progress"},n.createElement(E,{style:"body2"},t.filename),n.createElement(E,{style:"body2"},o)),n.createElement(x,{icon:F,size:"small",style:"text",onClick:()=>{r.removeFile(t.id),i(t.id)}}))},vy=(e,t)=>{var a;let{endpoint:l=Yn,attachments:c=[],className:u="",onChange:d=(e=>{}),isIndependent:p=!0,disabled:h=!1,dragDropRef:f=null,config:m={}}=e;const[g,w]=r([]),_=i(null),{uppy:E,isUploading:k}=db({endpoint:l,uppyConfig:(M=m,he(fb,{restrictions:M}))});var M;const D=()=>{(e=>{let{uppy:t,config:n,previousAttachmentsCount:r}=e;const{maxNumberOfFiles:i}=n;if(i&&t.getFiles().length+r>i)return v.warning(`You can only attach ${i} files`),t.reset(),!1;return!0})({uppy:E,config:m,previousAttachmentsCount:c.length})&&C()},C=()=>{const e=E.getFiles().map((e=>({id:e.id,filename:e.name,signedId:"awaiting",url:"",progress:0})));b(e)?E.reset():(w((t=>[...t,...e])),_.current.value=null,S())},S=async()=>{try{const e=await E.upload();if(y(e))return;const t=e.successful.map((e=>({filename:e.name,signedId:e.response.signedId,url:e.response.blobUrl})));w([]),d([...c,...t])}catch(e){v.error(e)}finally{E.reset()}},A=(e,t)=>{w((n=>n.map((n=>({...n,progress:n.filename!==e.name?n.progress:t.progress})))))},N=e=>{w((t=>t.filter((t=>t.id!==e))))},O=()=>_.current.click();return o(t,(()=>({handleUploadAttachments:O})),[]),s((()=>(E.on("upload-progress",A),null!=f&&f.current&&E.use(vs,{target:f.current,onDrop:D}),()=>{const e=E.getPlugin("DropTarget");e&&E.removePlugin(e),E.off("upload-progress",A)})),[c]),n.createElement("div",{className:_s("ne-attachments",{[u]:u})},n.createElement("div",{className:"ne-attachments__items"},c.map((e=>n.createElement(by,{attachment:e,attachments:c,disabled:h,endpoint:l,key:e.signedId,onChange:d}))),g.map((e=>n.createElement(yy,{attachment:e,key:e.id,removeUploadingFile:N,uppy:E})))),n.createElement("div",null,p&&n.createElement(x,{disabled:k,label:"Add attachments",loading:k,size:"medium",style:"link",onClick:O}),n.createElement("input",{accept:null===(a=m.allowedFileTypes)||void 0===a?void 0:a.join(","),multiple:1!==m.maxNumberOfFiles,ref:_,type:"file",onChange:e=>{const t=(e=>{let{previousAttachmentsCount:t,config:n,files:r}=e;const{maxNumberOfFiles:i}=n;if(i){const e=i-t;if(e<=0)return v.warning(`You can only attach ${i} files`),[];const n=Array.from(r).slice(0,e);return n.length<r.length&&v.warning(`You can only attach ${i} files`),n}return Array.from(r)})({previousAttachmentsCount:c.length,config:m,files:e.target.files});t.forEach((e=>{E.addFile({name:e.name,type:e.type,data:e})})),C()},onClick:e=>{b(c)||1!==m.maxNumberOfFiles||(e.preventDefault(),v.warning("Only one attachment is allowed"))}})))};var wy=n.forwardRef(vy);const _y="undefined"!=typeof navigator?navigator:null,xy="undefined"!=typeof document?document:null,Ey=_y&&_y.userAgent||"",ky=/Edge\/(\d+)/.exec(Ey),My=/MSIE \d/.exec(Ey),Dy=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ey),Cy=!!(My||Dy||ky),Sy=My?document.documentMode:Dy?+Dy[1]:ky?+ky[1]:0,Ay=!Cy&&/gecko\/(\d+)/i.test(Ey);Ay&&(/Firefox\/(\d+)/.exec(Ey)||[0,0])[1];const Ny=!Cy&&/Chrome\/(\d+)/.exec(Ey),Oy=!!Ny,Ty=Ny?+Ny[1]:0,Iy=!Cy&&!!_y&&/Apple Computer/.test(_y.vendor),Ly=Iy&&(/Mobile\/\w+/.test(Ey)||!!_y&&_y.maxTouchPoints>2),Fy=Ly||!!_y&&/Mac/.test(_y.platform),zy=/Android \d/.test(Ey),jy=!!xy&&"webkitFontSmoothing"in xy.documentElement.style,Ry=jy?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,By=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Py=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let Uy=null;const Hy=function(e,t,n){let r=Uy||(Uy=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},$y=function(e,t,n,r){return n&&(Wy(e,t,n,r,-1)||Wy(e,t,n,r,1))},Vy=/^(img|br|input|textarea|hr)$/i;function Wy(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:qy(e))){let n=e.parentNode;if(!n||1!=n.nodeType||Ky(e)||Vy.test(e.nodeName)||"false"==e.contentEditable)return!1;t=By(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?qy(e):0}}}function qy(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ky(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Gy=function(e){let t=e.isCollapsed;return t&&Oy&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function Yy(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Qy(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Jy(e,t){return"number"==typeof e?e:e[t]}function Zy(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Xy(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;s=Py(s)){if(1!=s.nodeType)continue;let e=s,n=e==o.body,a=n?Qy(o):Zy(e),l=0,c=0;if(t.top<a.top+Jy(r,"top")?c=-(a.top-t.top+Jy(i,"top")):t.bottom>a.bottom-Jy(r,"bottom")&&(c=t.bottom-a.bottom+Jy(i,"bottom")),t.left<a.left+Jy(r,"left")?l=-(a.left-t.left+Jy(i,"left")):t.right>a.right-Jy(r,"right")&&(l=t.right-a.right+Jy(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}if(n)break}}function ev(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Py(r));return t}function tv(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let nv=null;function rv(e,t){let n,r,i=2e8,o=0,s=t.top,a=t.top;for(let l=e.firstChild,c=0;l;l=l.nextSibling,c++){let e;if(1==l.nodeType)e=l.getClientRects();else{if(3!=l.nodeType)continue;e=Hy(l).getClientRects()}for(let u=0;u<e.length;u++){let d=e[u];if(d.top<=s&&d.bottom>=a){s=Math.max(d.bottom,s),a=Math.min(d.top,a);let e=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(e<i){n=l,i=e,r=e&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==l.nodeType&&e&&(o=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let n=av(r,1);if(n.top!=n.bottom&&iv(t,n))return{node:e,offset:i+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:e,offset:o}:rv(n,r)}function iv(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function ov(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=e.childNodes[o];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(iv(t,i))return ov(n,t,i)}}if((o=(o+1)%r)==i)break}return e}function sv(e,t){let n,r=e.dom.ownerDocument,i=0;if(r.caretPositionFromPoint)try{let e=r.caretPositionFromPoint(t.left,t.top);e&&({offsetNode:n,offset:i}=e)}catch(e){}if(!n&&r.caretRangeFromPoint){let e=r.caretRangeFromPoint(t.left,t.top);e&&({startContainer:n,startOffset:i}=e)}let o,s=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!s||!e.dom.contains(1!=s.nodeType?s.parentNode:s)){let n=e.dom.getBoundingClientRect();if(!iv(t,n))return null;if(s=ov(e.dom,t,n),!s)return null}if(Iy)for(let e=s;n&&e;e=Py(e))e.draggable&&(n=void 0);if(s=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(s,t),n){if(Ay&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let e,r=n.childNodes[i];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&i++}n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(o=function(e,t,n,r){let i=-1;for(let n=t;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)i=t.posBefore;else{if(!(e.right<r.left||e.bottom<r.top))break;i=t.posAfter}}n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,1)}(e,n,i,t))}null==o&&(o=function(e,t,n){let{node:r,offset:i}=rv(t,n),o=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:o,inside:a?a.posAtStart-a.border:-1}}function av(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const lv=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function cv(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=jy||Ay;if(3==r.nodeType){if(!s||!lv.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,uv(av(Hy(r,e,t),1),o<0)}{let e=av(Hy(r,i,i),n);if(Ay&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=av(Hy(r,i-1,i-1),-1);if(t.top==e.top){let n=av(Hy(r,i,i+1),-1);if(n.top!=e.top)return uv(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==qy(r))){let e=r.childNodes[i-1];if(1==e.nodeType)return dv(e.getBoundingClientRect(),!1)}if(null==o&&i<qy(r)){let e=r.childNodes[i];if(1==e.nodeType)return dv(e.getBoundingClientRect(),!0)}return dv(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==qy(r))){let e=r.childNodes[i-1],t=3==e.nodeType?Hy(e,qy(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return uv(av(t,1),!1)}if(null==o&&i<qy(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?Hy(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return uv(av(t,-1),!0)}return uv(av(3==r.nodeType?Hy(r):r,-n),n>=0)}function uv(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function dv(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function pv(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const hv=/[\u0590-\u08ac]/;let fv=null,mv=null,gv=!1;function bv(e,t,n){return fv==t&&mv==n?gv:(fv=t,mv=n,gv="up"==n||"down"==n?function(e,t,n){let r=t.selection,i="up"==n?r.$from:r.$to;return pv(e,t,(()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=cv(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=Hy(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=e.domSelection();return hv.test(r.parent.textContent)&&a.modify?pv(e,t,(()=>{let t=a.getRangeAt(0),i=a.focusNode,o=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");let l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||i==a.focusNode&&o==a.focusOffset;return a.removeAllRanges(),a.addRange(t),null!=s&&(a.caretBidiLevel=s),l})):"left"==n||"backward"==n?o:s}(e,t,n))}const yv=0,vv=1,wv=2,_v=3;class xv{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=yv,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>By(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n,r=0,i=0;for(let t=0;r<this.children.length;r++){let n=this.children[r],o=t+n.size;if(o>e||n instanceof Av){i=e-t;break}t=o}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof Ev&&n.side>=0;r--);if(t<=0){let e,n=!0;for(;e=r?this.children[r-1]:null,e&&e.dom.parentNode!=this.contentDOM;r--,n=!1);return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?By(e.dom)+1:0}}{let e,n=!0;for(;e=r<this.children.length?this.children[r]:null,e&&e.dom.parentNode!=this.contentDOM;r++,n=!1);return e&&n&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?By(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,s=0;;s++){let n=this.children[s],a=o+n.size;if(-1==r&&e<=a){let i=o+n.border;if(e>=i&&t<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=By(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(a>t||s==this.children.length-1)){t=a;for(let e=s+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=By(n.dom);break}t+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=a}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),o=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(i>a&&o<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((Ay||Iy)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(s=a={node:t.parentNode,offset:By(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(Ay&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&Iy)&&$y(s.node,s.offset,l.anchorNode,l.anchorOffset)&&$y(a.node,a.offset,l.focusNode,l.focusOffset))return;let u=!1;if((l.extend||e==t)&&!c){l.collapse(s.node,s.offset);try{if(e!=t)try{l.extend(a.node,a.offset)}catch(e){}u=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!u){if(e>t){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let r=n+i.border,s=o-i.border;if(e>=r&&t<=s)return this.dirty=e==n||t==o?wv:vv,void(e!=r||t!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-r,t-r):i.dirty=_v);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?_v:wv}n=o}this.dirty=wv}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?wv:vv;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Ev extends xv{constructor(e,t,n,r){let i,o=t.type.toDOM;if("function"==typeof o&&(o=o(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r))),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==yv&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class kv extends xv{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class Mv extends xv{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let i=r.nodeViews[t.type.name],o=i&&i(t,r,n);return o&&o.dom||(o=Ct.renderSpec(document,t.type.spec.toDOM(t,n))),new Mv(e,t,o.dom,o.contentDOM||o.dom)}parseRule(){return this.dirty&_v||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return this.dirty!=_v&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=yv){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=yv}}slice(e,t,n){let r=Mv.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;t<o&&(i=Hv(i,t,o,n)),e>0&&(i=Hv(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=r;return r.children=i,r}}class Dv extends xv{constructor(e,t,n,r,i,o,s,a,l){super(e,[],i,o),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s,o&&this.updateChildren(a,l)}static create(e,t,n,r,i,o){let s,a=i.nodeViews[t.type.name],l=a&&a(t,i,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:o),n,r),c=l&&l.dom,u=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:u}=Ct.renderSpec(document,t.type.spec.toDOM(t)));u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=jv(c,n,t),l?s=new Nv(e,t,n,r,c,u||null,d,l,i,o+1):t.isText?new Sv(e,t,n,r,c,d,i):new Dv(e,t,n,r,c,u||null,d,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>ke.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return this.dirty==yv&&e.eq(this.node)&&Rv(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,a=new Pv(this,o&&o.node,e);!function(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,i,t.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<i.length&&i[s].to==o){let e,t=i[s++];for(;s<i.length&&i[s].to==o;)(e||(e=[t])).push(i[s++]);if(e){e.sort(Uv);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<e.childCount))break;d=c,u=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=o&&a.splice(e--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let p=o+u.nodeSize;if(u.isText){let e=p;s<i.length&&i[s].from<e&&(e=i[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=u.cut(e-o),u=u.cut(0,e-o),p=e,d=-1)}let h=u.isInline&&!u.isLeaf?a.filter((e=>!e.inline)):a.slice();r(u,h,t.forChild(o,u),d),o=p}}(this.node,this.innerDeco,((t,i,o)=>{t.spec.marks?a.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!o&&a.syncToMarks(i==this.node.childCount?Se.none:this.node.child(i).marks,n,e),a.placeWidget(t,e,r)}),((t,o,l,c)=>{let u;a.syncToMarks(t.marks,n,e),a.findNodeMatch(t,o,l,c)||s&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(t,o,l,u,e)||a.updateNextNode(t,o,l,e,c)||a.addNode(t,o,l,e,r),r+=t.nodeSize})),a.syncToMarks([],n,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==wv)&&(o&&this.protectLocalComposition(e,o),Ov(this.contentDOM,this.children,e),Ly&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof Mn)||n<t||r>t+this.node.content.size)return null;let i=e.domSelection(),o=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=qy(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let e=o.nodeValue,i=function(e,t,n,r){for(let i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<e.childCount;){let t=e.child(i++);if(o+=t.nodeSize,!t.isText)break;l+=t.text}if(o>=n){let e=a<r?l.lastIndexOf(t,r-a-1):-1;if(e>=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return i<0?null:{node:o,pos:i,text:e}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new kv(this,i,t,r);e.input.compositionNodes.push(o),this.children=Hv(this.children,n,n+r.length,e,o)}update(e,t,n,r){return!(this.dirty==_v||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=yv}updateOuterDeco(e){if(Rv(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Fv(this.dom,this.nodeDOM,Lv(this.outerDeco,this.node,t),Lv(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Cv(e,t,n,r,i){return jv(r,t,e),new Dv(void 0,e,t,n,r,r,r,i,0)}class Sv extends Dv{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(this.dirty==_v||this.dirty!=yv&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),this.dirty==yv&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=yv,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new Sv(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=_v)}get domAtom(){return!1}}class Av extends xv{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==yv&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Nv extends Dv{constructor(e,t,n,r,i,o,s,a,l,c){super(e,t,n,r,i,o,s,l,c),this.spec=a}update(e,t,n,r){if(this.dirty==_v)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Ov(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=Bv(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Mv){let t=r?r.previousSibling:e.lastChild;Ov(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=Bv(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const Tv=function(e){e&&(this.nodeName=e)};Tv.prototype=Object.create(null);const Iv=[new Tv];function Lv(e,t,n){if(0==e.length)return Iv;let r=n?Iv[0]:new Tv,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new Tv(s.nodeName));for(let e in s){let o=s[e];null!=o&&(n&&1==i.length&&i.push(r=new Tv(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+o:"style"==e?r.style=(r.style?r.style+";":"")+o:"nodeName"!=e&&(r[e]=o))}}}return i}function Fv(e,t,n,r){if(n==Iv&&r==Iv)return t;let i=t;for(let t=0;t<r.length;t++){let o=r[t],s=n[t];if(t){let t;s&&s.nodeName==o.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==o.nodeName||(t=document.createElement(o.nodeName),t.pmIsDeco=!0,t.appendChild(i),s=Iv[0]),i=t}zv(i,s||Iv[0],o)}return i}function zv(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==i.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)-1==r.indexOf(i[t])&&e.classList.add(i[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function jv(e,t,n){return Fv(e,e,Iv,Lv(t,n,1!=e.nodeType))}function Rv(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Bv(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Pv{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,i=e.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof Mv)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,i=this.stack.length>>1,o=Math.min(i,e.length);for(;r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=yv,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++)if(this.top.children[t].matchesMark(e[i])){r=t;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=Mv.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(e,t,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,t,n,r,i){let o=this.top.children[r];return o.dirty==_v&&o.dom==o.contentDOM&&(o.dirty=wv),!!o.update(e,t,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,i){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof Dv){let a=this.preMatch.matched.get(s);if(null!=a&&a!=i)return!1;let l=s.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=_v&&Rv(t,s.outerDeco)))&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(e,t,n,r,i){this.top.children.splice(this.index++,0,Dv.create(this.top,e,t,n,r,i)),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new Ev(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Mv;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Sv)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Iy||Oy)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new Av(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}function Uv(e,t){return e.type.side-t.type.side}function Hv(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function $v(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(Gy(n)){for(a=c;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&Cn.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,i=t==qy(e);r||i;){if(e==n)return!0;let t=By(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==qy(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new Cn(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}if(!l){l=Zv(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!o?1:-1)}return l}function Vv(e){return e.editable?e.hasFocus():ew(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Wv(e,t=!1){let n=e.state.selection;if(Qv(e,n),Vv(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Oy){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&$y(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,By(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&Cy&&Sy<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,i,{anchor:o,head:s}=n;!qv||n instanceof Mn||(n.$from.parent.inlineContent||(r=Kv(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Kv(e,n.to))),e.docView.setSelection(o,s,e.root,t),qv&&(r&&Yv(r),i&&Yv(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Vv(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const qv=Iy||Oy&&Ty<63;function Kv(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Iy&&i&&"false"==i.contentEditable)return Gv(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return Gv(i);if(o)return Gv(o)}}function Gv(e){return e.contentEditable="true",Iy&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Yv(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Qv(e,t){if(t instanceof Cn){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Jv(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Jv(e)}function Jv(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Zv(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||Mn.between(t,n,r)}function Xv(e){return!(e.editable&&!e.hasFocus())&&ew(e)}function ew(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function tw(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&_n.findFrom(o,t)}function nw(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function rw(e,t,n){let r=e.state.selection;if(!(r instanceof Mn)){if(r instanceof Cn&&r.node.isInline)return nw(e,new Mn(t>0?r.$to:r.$from));{let n=tw(e.state,t);return!!n&&nw(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=tw(e.state,t);return!!(n&&n instanceof Cn)&&nw(e,n)}if(!(Fy&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Cn.isSelectable(o)?nw(e,new Cn(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):!!jy&&nw(e,new Mn(e.state.doc.resolve(t<0?s:s+o.nodeSize))))}}function iw(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ow(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function sw(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(Ay&&1==n.nodeType&&r<iw(n)&&ow(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(ow(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(lw(n))break;{let t=n.previousSibling;for(;t&&ow(t);)i=n.parentNode,o=By(t),t=t.previousSibling;if(t)n=t,r=iw(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?cw(e,t,n,r):i&&cw(e,t,i,o)}function aw(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=iw(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!ow(n.childNodes[r]))break;i=n,o=++r}else{if(lw(n))break;{let t=n.nextSibling;for(;t&&ow(t);)i=t.parentNode,o=By(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=iw(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}i&&cw(e,t,i,o)}function lw(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function cw(e,t,n,r){if(Gy(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:i}=e;setTimeout((()=>{e.state==i&&Wv(e)}),50)}function uw(e,t,n){let r=e.state.selection;if(r instanceof Mn&&!r.empty||n.indexOf("s")>-1)return!1;if(Fy&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=tw(e.state,t);if(n&&n instanceof Cn)return nw(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,s=r instanceof An?_n.near(n,t):_n.findFrom(n,t);return!!s&&nw(e,s)}return!1}function dw(e,t){if(!(e.state.selection instanceof Mn))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function pw(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function hw(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Fy&&72==n&&"c"==r?dw(e,-1)||sw(e):46==n||Fy&&68==n&&"c"==r?dw(e,1)||aw(e):13==n||27==n||(37==n||Fy&&66==n&&"c"==r?rw(e,-1,r)||sw(e):39==n||Fy&&70==n&&"c"==r?rw(e,1,r)||aw(e):38==n||Fy&&80==n&&"c"==r?uw(e,-1,r)||sw(e):40==n||Fy&&78==n&&"c"==r?function(e){if(!Iy||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;pw(e,n,"true"),setTimeout((()=>pw(e,n,"false")),20)}return!1}(e)||uw(e,1,r)||aw(e):r==(Fy?"m":"c")&&(66==n||73==n||89==n||90==n))}function fw(e,t){e.someProp("transformCopied",(e=>{t=e(t)}));let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Ct.fromSchema(e.state.schema),a=kw(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=xw[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:l,text:p}}function mw(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(e=>{t=e(t,a||r)})),a)return t?new Ne(ke.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Ne.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,i,r)));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,s=Ct.fromSchema(r);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),o=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=kw().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);(n=i&&xw[i[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),jy&&function(e){let t=e.querySelectorAll(Oy?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let e=+u[3];e>0&&o.firstChild;e--)o=o.firstChild;if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||ft.fromSchema(e.state.schema);s=t.parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||gw.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:i,openStart:o,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=ke.from(t.create(n[e+1],i)),o++,s++}return new Ne(i,o,s)}(_w(s,+u[1],+u[2]),u[4]);else if(s=Ne.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),o=[];if(e.forEach((e=>{if(!o)return;let t,n=i.findWrapping(e.type);if(!n)return o=null;if(t=o.length&&r.length&&yw(n,r,e,o[o.length-1],0))o[o.length-1]=t;else{o.length&&(o[o.length-1]=vw(o[o.length-1],r.length));let t=bw(e,n);o.push(t),i=i.matchType(t.type),r=n}})),o)return ke.from(o)}return e}(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=_w(s,e,t)}return e.someProp("transformPasted",(e=>{s=e(s)})),s}const gw=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function bw(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,ke.from(e));return e}function yw(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=yw(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(ke.from(bw(n,e,i+1))))}}function vw(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,vw(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(ke.empty,!0);return e.copy(n.append(r))}function ww(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return i<r-1&&(a=ww(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ke.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function _w(e,t,n){return t<e.openStart&&(e=new Ne(ww(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Ne(ww(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const xw={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Ew=null;function kw(){return Ew||(Ew=document.implementation.createHTMLDocument("title"))}const Mw={},Dw={},Cw={touchstart:!0,touchmove:!0};class Sw{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Aw(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Nw(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>Ow(e,t))}))}function Ow(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Tw(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Iw(e){return{left:e.clientX,top:e.clientY}}function Lw(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,(t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function Fw(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function zw(e,t,n,r,i){return Lw(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(i?function(e,t){if(-1==t)return!1;let n,r,i=e.state.selection;i instanceof Cn&&(n=i.node);let o=e.state.doc.resolve(t);for(let e=o.depth+1;e>0;e--){let t=e>o.depth?o.nodeAfter:o.node(e);if(Cn.isSelectable(t)){r=n&&i.$from.depth>0&&e>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(e);break}}return null!=r&&(Fw(e,Cn.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Cn.isSelectable(r))&&(Fw(e,new Cn(n),"pointer"),!0)}(e,n))}function jw(e,t,n,r){return Lw(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function Rw(e,t,n,r){return Lw(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Fw(e,Mn.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),o=i.before(t);if(n.inlineContent)Fw(e,Mn.create(r,o+1,o+1+n.content.size),"pointer");else{if(!Cn.isSelectable(n))continue;Fw(e,Cn.create(r,o),"pointer")}return!0}}(e,n,r)}function Bw(e){return qw(e)}Dw.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Hw(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!zy||!Oy||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Ly||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||hw(e,n)?n.preventDefault():Aw(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,Yy(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},Dw.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},Dw.keypress=(e,t)=>{let n=t;if(Hw(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Fy&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof Mn&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const Pw=Fy?"metaKey":"ctrlKey";Mw.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Bw(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Pw]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(Iw(n));s&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Uw(e,s,n,!!r)):("doubleClick"==o?jw:Rw)(e,s.pos,s.inside,n)?n.preventDefault():Aw(e,"pointer"))};class Uw{constructor(e,t,n,r){let i,o;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[Pw],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof Cn&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Ay||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Aw(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Wv(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Iw(e))),this.updateAllowDefault(e),this.allowDefault||!t?Aw(this.view,"pointer"):zw(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Iy&&this.mightDrag&&!this.mightDrag.node.isAtom||Oy&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Fw(this.view,_n.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Aw(this.view,"pointer")}move(e){this.updateAllowDefault(e),Aw(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function Hw(e,t){return!!e.composing||!!(Iy&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Mw.touchstart=e=>{e.input.lastTouch=Date.now(),Bw(e),Aw(e,"pointer")},Mw.touchmove=e=>{e.input.lastTouch=Date.now(),Aw(e,"pointer")},Mw.contextmenu=e=>Bw(e);const $w=zy?5e3:-1;function Vw(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>qw(e)),t))}function Ww(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function qw(e,t=!1){if(!(zy&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ww(e),t||e.docView&&e.docView.dirty){let t=$v(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}Dw.compositionstart=Dw.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),qw(e,!0),e.markCursor=null;else if(qw(e),Ay&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}Vw(e,$w)},Dw.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Vw(e,20))};const Kw=Cy&&Sy<15||Ly&&Ry<604;function Gw(e,t,n,r){let i=mw(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,i||Ne.empty))))return!0;if(!i)return!1;let o=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=o?e.state.tr.replaceSelectionWith(o,e.input.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Mw.copy=Dw.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=Kw?null:n.clipboardData,s=r.content(),{dom:a,text:l}=fw(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Dw.paste=(e,t)=>{let n=t;if(e.composing&&!zy)return;let r=Kw?null:n.clipboardData;r&&Gw(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Gw(e,r.value,null,t):Gw(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class Yw{constructor(e,t){this.slice=e,this.move=t}}const Qw=Fy?"altKey":"ctrlKey";Mw.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(Iw(n));if(o&&o.pos>=i.from&&o.pos<=(i instanceof Cn?i.to-1:i.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Cn.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(Cn.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=fw(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Kw?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Kw||n.dataTransfer.setData("text/plain",l),e.dragging=new Yw(s,!n[Qw])},Mw.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},Dw.dragover=Dw.dragenter=(e,t)=>t.preventDefault(),Dw.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(Iw(n));if(!i)return;let o=e.state.doc.resolve(i.pos),s=r&&r.slice;s?e.someProp("transformPasted",(e=>{s=e(s)})):s=mw(e,n.dataTransfer.getData(Kw?"Text":"text/plain"),Kw?null:n.dataTransfer.getData("text/html"),!1,o);let a=!(!r||n[Qw]);if(e.someProp("handleDrop",(t=>t(e,n,s||Ne.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?on(e.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&Cn.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Cn(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,i)=>t=i)),c.setSelection(Zv(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},Mw.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&Wv(e)}),20))},Mw.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Mw.beforeinput=(e,t)=>{if(Oy&&zy&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,Yy(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in Dw)Mw[e]=Dw[e];function Jw(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Zw{constructor(e,t){this.toDOM=e,this.spec=t||r_,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new t_(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Zw&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Jw(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Xw{constructor(e,t){this.attrs=e,this.spec=t||r_}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new t_(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Xw&&Jw(this.attrs,e.attrs)&&Jw(this.spec,e.spec)}static is(e){return e.type instanceof Xw}destroy(){}}class e_{constructor(e,t){this.attrs=e,this.spec=t||r_}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new t_(i.pos-n,o.pos-n,this)}valid(e,t){let n,{index:r,offset:i}=e.content.findIndex(t.from);return i==t.from&&!(n=e.child(r)).isText&&i+n.nodeSize==t.to}eq(e){return this==e||e instanceof e_&&Jw(this.attrs,e.attrs)&&Jw(this.spec,e.spec)}destroy(){}}class t_{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new t_(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new t_(e,e,new Zw(t,n))}static inline(e,t,n,r){return new t_(e,t,new Xw(n,r))}static node(e,t,n,r){return new t_(e,t,new e_(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Xw}}const n_=[],r_={};class i_{constructor(e,t){this.local=e.length?e:n_,this.children=t.length?t:n_}static create(e,t){return t.length?u_(t,e,0,r_):o_}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==o_||0==e.maps.length?this:this.mapInner(e,t,0,0,n||r_)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let a=e.slice();for(let e=0,t=o;e<n.maps.length;e++){let r=0;n.maps[e].forEach(((e,n,o,s)=>{let l=s-o-(n-e);for(let s=0;s<a.length;s+=3){let c=a[s+1];if(c<0||e>c+t-r)continue;let u=a[s]+t-r;n>=u?a[s+1]=e<=u?-2:-1:o>=i&&l&&(a[s]+=l,a[s+1]+=l)}r+=l})),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=n.map(e[t]+o),u=c-i;if(u<0||u>=r.content.size){l=!0;continue}let d=n.map(e[t+1]+o,-1)-i,{index:p,offset:h}=r.content.findIndex(u),f=r.maybeChild(p);if(f&&h==u&&h+f.nodeSize==d){let r=a[t+2].mapInner(n,f,c+1,e[t]+o+1,s);r!=o_?(a[t]=u,a[t+1]=d,a[t+2]=r):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=function(e,t,n,r,i,o,s){function a(e,t){for(let o=0;o<e.local.length;o++){let a=e.local[o].map(r,i,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[o].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+o+1);return n}(a,e,t,n,i,o,s),c=u_(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new i_(t.sort(d_),a)}(this.children,o||[],e,t,n,r,i):o?new i_(o.sort(d_),n_):o_}add(e,t){return t.length?this==o_?i_.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach(((e,o)=>{let s,a=o+n;if(s=l_(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,s,a+1):r.splice(i,0,o,o+e.nodeSize,u_(s,e,a+1,r_)),i+=3}}));let o=a_(i?c_(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new i_(o.length?this.local.concat(o).sort(d_):this.local,r||this.children)}remove(e){return 0==e.length||this==o_?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>o&&t.to<s&&(e[n]=null,(i||(i=[])).push(t));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=o_?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<e.length;i++)if(n=e[i])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new i_(r,n):o_}forChild(e,t){if(this==o_)return this;if(t.isLeaf)return i_.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,o=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof Xw){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new i_(r.sort(d_),n_);return n?new s_([e,n]):e}return n||o_}eq(e){if(this==e)return!0;if(!(e instanceof i_)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return p_(this.localsInner(e))}localsInner(e){if(this==o_)return n_;if(e.inlineContent||!this.local.some(Xw.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Xw||t.push(this.local[e]);return t}}i_.empty=new i_([],[]),i_.removeOverlap=p_;const o_=i_.empty;class s_{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,r_)));return s_.from(n)}forChild(e,t){if(t.isLeaf)return i_.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=o_&&(i instanceof s_?n=n.concat(i.members):n.push(i))}return s_.from(n)}eq(e){if(!(e instanceof s_)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?p_(n?t:t.sort(d_)):n_}static from(e){switch(e.length){case 0:return o_;case 1:return e[0];default:return new s_(e)}}}function a_(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new t_(i.from+t,i.to+t,i.type))}return n}function l_(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t,o=0;o<e.length;o++)(t=e[o])&&t.from>n&&t.to<r&&((i||(i=[])).push(t),e[o]=null);return i}function c_(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function u_(e,t,n,r){let i=[],o=!1;t.forEach(((t,s)=>{let a=l_(e,t,s+n);if(a){o=!0;let e=u_(a,t,n+s+1,r);e!=o_&&i.push(s,s+t.nodeSize,e)}}));let s=a_(o?c_(e):e,-n).sort(d_);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||i.length?new i_(s,i):o_}function d_(e,t){return e.from-t.from||e.to-t.to}function p_(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),h_(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),h_(t,i+1,o.copy(r.to,o.to)))}}return t}function h_(e,t,n){for(;t<e.length&&d_(n,e[t])>0;)t++;e.splice(t,0,n)}function f_(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=o_&&t.push(r)})),e.cursorWrapper&&t.push(i_.create(e.state.doc,[e.cursorWrapper.deco])),s_.from(t)}const m_={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},g_=Cy&&Sy<=11;class b_{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class y_{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new b_,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);Cy&&Sy<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),g_&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,m_)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Xv(this.view)){if(this.suppressingSelectionUpdates)return Wv(this.view);if(Cy&&Sy<=11&&!this.view.state.selection.empty){let e=this.view.domSelection();if(e.focusNode&&$y(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelection())}ignoreSelectionChange(e){if(0==e.rangeCount)return!0;let t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelection(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Xv(e)&&!this.ignoreSelectionChange(n),i=-1,o=-1,s=!1,a=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],a);n&&(i=i<0?n.from:Math.min(n.from,i),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(s=!0))}if(Ay&&a.length>1){let e=a.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let l=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&e.input.lastTouch<Date.now()-300&&Gy(n)&&(l=$v(e))&&l.eq(_n.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Wv(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,o),function(e){if(v_.has(e))return;if(v_.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)){if(e.requiresGeckoHackNode=Ay,w_)return;console["warn"]("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),w_=!0}}(e)),this.handleDOMChange(i,o,s,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Wv(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(Cy&&Sy<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:o}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(e.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==e.target?By(r)+1:0,s=n.localPosFromDOM(e.target,o,-1),a=i&&i.parentNode==e.target?By(i):e.target.childNodes.length;return{from:s,to:n.localPosFromDOM(e.target,a,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let v_=new WeakMap,w_=!1;function __(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Iy&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||Iy&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function x_(e,t,n,r,i){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=$v(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let a,l,c=e.state.selection,u=function(e,t,n){let r,{node:i,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),c=e.domSelection(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],Gy(c)||r.push({node:c.focusNode,offset:c.focusOffset})),Oy&&8===e.input.lastKeyCode)for(let e=s;e>o;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){s=e;break}if(!n||n.size)break}let d=e.state.doc,p=e.someProp("domParser")||ft.fromSchema(e.state.schema),h=d.resolve(a),f=null,m=p.parse(i,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:__,context:h});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),f={anchor:e+a,head:t+a}}return{doc:m,sel:f,from:a,to:l}}(e,t,n),d=e.state.doc,p=d.slice(u.from,u.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(a=e.state.selection.to,l="end"):(a=e.state.selection.from,l="start"),e.input.lastKeyCode=null;let h=function(e,t,n,r,i){let o=e.findDiffStart(t,n);if(null==o)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==i){r-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&e.size<t.size){o-=r<=o&&r>=s?o-r:0,a=o+(a-s),s=o}else if(a<o){o-=r<=o&&r>=a?o-r:0,s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}(p.content,u.doc.content,u.from,a,l);if((Ly&&e.input.lastIOSEnter>Date.now()-225||zy)&&i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",(t=>t(e,Yy(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!h){if(!(r&&c instanceof Mn&&!c.empty&&c.$head.sameParent(c.$anchor))||e.composing||u.sel&&u.sel.anchor!=u.sel.head){if(u.sel){let t=E_(e,e.state.doc,u.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}h={start:c.from,endA:c.to,endB:c.to}}if(Oy&&e.cursorWrapper&&u.sel&&u.sel.anchor==e.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let e=h.endB-h.start;u.sel={anchor:u.sel.anchor+e,head:u.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof Mn&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Cy&&Sy<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&" "==u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)&&(h.start--,h.endA--,h.endB--);let f,m=u.doc.resolveNoCache(h.start-u.from),g=u.doc.resolveNoCache(h.endB-u.from),b=d.resolve(h.start),y=m.sameParent(g)&&m.parent.inlineContent&&b.end()>=h.endA;if((Ly&&e.input.lastIOSEnter>Date.now()-225&&(!y||i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!y&&m.pos<u.doc.content.size&&(f=_n.findFrom(u.doc.resolve(m.pos+1),1,!0))&&f.head==g.pos)&&e.someProp("handleKeyDown",(t=>t(e,Yy(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>h.start&&function(e,t,n,r,i){if(!r.parent.isTextblock||n-t<=i.pos-r.pos||k_(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(k_(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||k_(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(d,h.start,h.endA,m,g)&&e.someProp("handleKeyDown",(t=>t(e,Yy(8,"Backspace")))))return void(zy&&Oy&&e.domObserver.suppressSelectionUpdates());Oy&&zy&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),zy&&!y&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,g=u.doc.resolveNoCache(h.endB-u.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,Yy(13,"Enter"))}))}),20));let v,w,_,x=h.start,E=h.endA;if(y)if(m.pos==g.pos)Cy&&Sy<=11&&0==m.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Wv(e)),20)),v=e.state.tr.delete(x,E),w=d.resolve(h.start).marksAcross(d.resolve(h.endA));else if(h.endA==h.endB&&(_=function(e,t){let n,r,i,o=e.firstChild.marks,s=t.firstChild.marks,a=o,l=s;for(let e=0;e<s.length;e++)a=s[e].removeFromSet(a);for(let e=0;e<o.length;e++)l=o[e].removeFromSet(l);if(1==a.length&&0==l.length)r=a[0],n="add",i=e=>e.mark(r.addToSet(e.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",i=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let e=0;e<t.childCount;e++)c.push(i(t.child(e)));if(ke.from(c).eq(e))return{mark:r,type:n}}(m.parent.content.cut(m.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,h.endA-b.start()))))v=e.state.tr,"add"==_.type?v.addMark(x,E,_.mark):v.removeMark(x,E,_.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let t=m.parent.textBetween(m.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,x,E,t))))return;v=e.state.tr.insertText(t,x,E)}if(v||(v=e.state.tr.replace(x,E,u.doc.slice(h.start-u.from,h.endB-u.from))),u.sel){let t=E_(e,v.doc,u.sel);t&&!(Oy&&zy&&e.composing&&t.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==x||t.head==v.mapping.map(E)-1)||Cy&&t.empty&&t.head==x)&&v.setSelection(t)}w&&v.ensureMarks(w),e.dispatch(v.scrollIntoView())}function E_(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Zv(e,t.resolve(n.anchor),t.resolve(n.head))}function k_(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}class M_{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Sw,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(N_),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=S_(this),C_(this),this.nodeViews=A_(this),this.docView=Cv(this.state.doc,D_(this),f_(this),this.dom,this),this.domObserver=new y_(this,((e,t,n,r)=>x_(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in Mw){let n=Mw[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!Tw(e,t)||Ow(e,t)||!e.editable&&t.type in Dw||n(e,t)},Cw[t]?{passive:!0}:void 0)}Iy&&e.dom.addEventListener("input",(()=>null)),Nw(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Nw(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(N_),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(Ww(this),i=!0),this.state=e;let o=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(o||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=A_(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(o||t.handleDOMEvents!=this._props.handleDOMEvents)&&Nw(this),this.editable=S_(this),C_(this);let s=f_(this),a=D_(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,a,s);!c&&e.selection.eq(n.selection)||(i=!0);let u="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(o,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:ev(e.dom)}}(this);if(i){this.domObserver.stop();let t=c&&(Cy||Oy)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(c){let n=Oy?this.trackWrites=this.domSelection().focusNode:null;!r&&this.docView.update(e.doc,a,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Cv(e.doc,a,s,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return $y(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Wv(this,t):(Qv(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():u&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;tv(n,0==r?0:r-t)}(u)}scrollToSelection(){let e=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof Cn){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&Xy(this,t.getBoundingClientRect(),e)}else Xy(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let i=this.directPlugins[r].props[e];if(null!=i&&(n=t?t(i):i))return n}let i=this.state.plugins;if(i)for(let r=0;r<i.length;r++){let o=i[r].props[e];if(null!=o&&(n=t?t(o):o))return n}}hasFocus(){if(Cy){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(nv)return e.focus(nv);let t=ev(e);e.focus(null==nv?{get preventScroll(){return nv={preventScroll:!0},!0}}:void 0),nv||(nv=!1,tv(t,0))}(this.dom),Wv(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return sv(this,e)}coordsAtPos(e,t=1){return cv(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return bv(this,t||this.state,e)}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],f_(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){Ow(e,t)||!Mw[t.type]||!e.editable&&t.type in Dw||Mw[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelection(){return this.root.getSelection()}}function D_(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),[t_.node(0,e.state.doc.content.size,t)]}function C_(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:t_.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function S_(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function A_(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function N_(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var O_={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},T_={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},I_="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent);"undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent);for(var L_="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),F_="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),z_=L_||I_&&+I_[1]<57,j_=0;j_<10;j_++)O_[48+j_]=O_[96+j_]=String(j_);for(j_=1;j_<=24;j_++)O_[j_+111]="F"+j_;for(j_=65;j_<=90;j_++)O_[j_]=String.fromCharCode(j_+32),T_[j_]=String.fromCharCode(j_);for(var R_ in O_)T_.hasOwnProperty(R_)||(T_[R_]=O_[R_]);const B_="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function P_(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);B_?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function U_(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function H_(e){let t=function(e){let t=Object.create(null);for(let n in e)t[P_(n)]=e[n];return t}(e);return function(e,n){let r,i=function(e){var t=!(z_&&(e.ctrlKey||e.altKey||e.metaKey)||F_&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?T_:O_)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),o=1==i.length&&" "!=i,s=t[U_(i,n,!o)];if(s&&s(e.state,e.dispatch,e))return!0;if(o&&(n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(r=O_[n.keyCode])&&r!=i){let i=t[U_(r,n,!0)];if(i&&i(e.state,e.dispatch,e))return!0}else if(o&&n.shiftKey){let r=t[U_(i,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}function $_(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function V_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function W_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function q_(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function K_(e,t,n){let r,i,o=t.nodeBefore,s=t.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!i.isTextblock&&!rn(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let i=t.pos+s.nodeSize,a=ke.empty;for(let e=r.length-1;e>=0;e--)a=ke.from(r[e].create(null,a));a=ke.from(o.copy(a));let l=e.tr.step(new Qt(t.pos-1,i,t.pos,i,new Ne(a,1,0),r.length,!0)),c=i+2*r.length;rn(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=_n.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Xt(c);if(null!=u&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&$_(s,"start",!0)&&$_(o,"end")){let r=o,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=ke.empty;for(let e=i.length-1;e>=0;e--)r=ke.from(i[e].copy(r));n(e.tr.step(new Qt(t.pos-i.length,t.pos+s.nodeSize,t.pos+l,t.pos+s.nodeSize-l,new Ne(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function G_(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(Mn.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const Y_=G_(-1),Q_=G_(1);function J_(e,t=null){return function(n,r){let{from:i,to:o}=n.selection,s=!1;return n.doc.nodesBetween(i,o,((r,i)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{let t=n.doc.resolve(i),r=t.index();s=t.parent.canReplaceWith(r,r+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,o,e,t).scrollIntoView()),!0)}}function Z_(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;let e=n.doc.resolve(s.start-2);l=new qe(e,e,s.depth),s.endIndex<s.parent.childCount&&(s=new qe(i,n.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let c=en(l,e,t,s);return!!c&&(r&&r(function(e,t,n,r,i){let o=ke.empty;for(let e=n.length-1;e>=0;e--)o=ke.from(n[e].type.create(n[e].attrs,o));e.step(new Qt(t.start-(r?2:0),t.end,t.start,t.end,new Ne(o,0,0),n.length,!0));let s=0;for(let e=0;e<n.length;e++)n[e].type==i&&(s=e+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&nn(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(n).nodeSize;return e}(n.tr,s,c,a,e).scrollIntoView()),!0)}}function X_(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,(t=>t.childCount>0&&t.firstChild.type==e));return!!o&&(!n||(r.node(o.depth-1).type==e?function(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new Qt(o-1,s,o,s,new Ne(ke.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new qe(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=Xt(r);if(null==a)return!1;i.lift(r,a);let l=i.mapping.map(o,-1)-1;rn(i.doc,l)&&i.join(l);return t(i.scrollIntoView()),!0}(t,n,e,o):function(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,o=n.startIndex;t>o;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?ke.empty:ke.from(i))))return!1;let d=o.pos,p=d+s.nodeSize;return r.step(new Qt(d-(a?1:0),p+(l?1:0),d+1,p-1,new Ne((a?ke.empty:ke.from(i.copy(ke.empty))).append(l?ke.empty:ke.from(i.copy(ke.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}(t,n,o)))}}function ex(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class tx{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(o);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],a=!!e,l=e||i.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(l,t),i=n(...e)(r);return s.push(i),c}]))),run:()=>(a||!t||l.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(l),s.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=!1,i=e||n.tr,o=this.buildProps(i,r),s=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...o,dispatch:void 0})])));return{...s,chain:()=>this.createChain(i,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r;i.storedMarks&&e.setStoredMarks(i.storedMarks);const s={tr:e,editor:r,view:o,state:ex({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map((([e,t])=>[e,(...e)=>t(...e)(s)])))}};return s}}function nx(e,t,n){if(void 0===e.config[t]&&e.parent)return nx(e.parent,t,n);if("function"==typeof e.config[t]){return e.config[t].bind({...n,parent:e.parent?nx(e.parent,t,n):null})}return e.config[t]}function rx(e){return{baseExtensions:e.filter((e=>"extension"===e.type)),nodeExtensions:e.filter((e=>"node"===e.type)),markExtensions:e.filter((e=>"mark"===e.type))}}function ix(e){const t=[],{nodeExtensions:n,markExtensions:r}=rx(e),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((e=>{const n=nx(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});if(!n)return;n().forEach((e=>{e.types.forEach((n=>{Object.entries(e.attributes).forEach((([e,r])=>{t.push({type:n,name:e,attribute:{...o,...r}})}))}))}))})),i.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=nx(e,"addAttributes",n);if(!r)return;const i=r();Object.entries(i).forEach((([n,r])=>{const i={...o,...r};(null==r?void 0:r.isRequired)&&void 0===(null==r?void 0:r.default)&&delete i.default,t.push({type:e.name,name:n,attribute:i})}))})),t}function ox(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function sx(...e){return e.filter((e=>!!e)).reduce(((e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>{n[e]?n[e]="class"===e?[n[e],t].join(" "):"style"===e?[n[e],t].join("; "):t:n[e]=t})),n}),{})}function ax(e,t){return t.filter((e=>e.attribute.rendered)).map((t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]})).reduce(((e,t)=>sx(e,t)),{})}function lx(e){return"function"==typeof e}function cx(e,t=void 0,...n){return lx(e)?t?e.bind(t)(...n):e(...n):e}function ux(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const i=t.reduce(((e,t)=>{const r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!=typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null==r?e:{...e,[t.name]:r}}),{});return{...r,...i}}}}function dx(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>("attrs"!==e||!function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t)))}function px(e,t){return t.nodes[e]||t.marks[e]||null}function hx(e,t){return Array.isArray(t)?t.some((t=>("string"==typeof t?t:t.name)===e.name)):t}function fx(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class mx{constructor(e){this.find=e.find,this.handler=e.handler}}function gx(e){var t;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((e=>e.type.spec.code))))return!1;let u=!1;const d=((e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,((e,t,i,o)=>{var s,a;const l=(null===(a=(s=e.type.spec).toText)||void 0===a?void 0:a.call(s,{node:e,pos:t,parent:i,index:o}))||e.textContent||"%leaf%";n+=l.slice(0,Math.max(0,r-t))})),n})(c)+o;return s.forEach((e=>{if(u)return;const t=((e,t)=>{if(fx(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r})(d,e.find);if(!t)return;const s=l.state.tr,c=ex({state:l.state,transaction:s}),p={from:r-(t[0].length-o.length),to:i},{commands:h,chain:f,can:m}=new tx({editor:n,state:c});null!==e.handler({state:c,range:p,match:t,commands:h,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:i,text:o}),l.dispatch(s),u=!0)})),u}function bx(e){const{editor:t,rules:n}=e,r=new $n({state:{init:()=>null,apply(e,t){const n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(e,i,o,s)=>gx({editor:t,from:i,to:o,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:i}=e.state.selection;i&&gx({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(e,i){if("Enter"!==i.key)return!1;const{$cursor:o}=e.state.selection;return!!o&&gx({editor:t,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}class yx{constructor(e){this.find=e.find,this.handler=e.handler}}function vx(e){const{editor:t,state:n,from:r,to:i,rule:o}=e,{commands:s,chain:a,can:l}=new tx({editor:t,state:n}),c=[];n.doc.nodesBetween(r,i,((e,t)=>{if(!e.isTextblock||e.type.spec.code)return;const u=Math.max(r,t),d=Math.min(i,t+e.content.size),p=((e,t)=>{if(fx(t))return[...e.matchAll(t)];const n=t(e);return n?n.map((t=>{const n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(u-t,d-t,void 0,""),o.find);p.forEach((e=>{if(void 0===e.index)return;const t=u+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},d=o.handler({state:n,range:i,match:e,commands:s,chain:a,can:l});c.push(d)}))}));return c.every((e=>null!==e))}function wx(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1;const s=n.map((e=>new $n({view(e){const t=t=>{var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:e=>(o=r===e.dom.parentElement,!1),paste:(e,t)=>{var n;const r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return i=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,s)=>{const a=n[0],l="paste"===a.getMeta("uiEvent")&&!i,c="drop"===a.getMeta("uiEvent")&&!o;if(!l&&!c)return;const u=r.doc.content.findDiffStart(s.doc.content),d=r.doc.content.findDiffEnd(s.doc.content);if("number"!=typeof u||!d||u===d.b)return;const p=s.tr,h=ex({state:s,transaction:p});return vx({editor:t,state:h,from:Math.max(u-1,0),to:d.b-1,rule:e})&&p.steps.length?p:void 0}})));return s}class _x{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=_x.resolve(e),this.schema=function(e){var t;const n=ix(e),{nodeExtensions:r,markExtensions:i}=rx(e),o=null===(t=r.find((e=>nx(e,"topNode"))))||void 0===t?void 0:t.name,s=Object.fromEntries(r.map((t=>{const r=n.filter((e=>e.type===t.name)),i={name:t.name,options:t.options,storage:t.storage},o=e.reduce(((e,n)=>{const r=nx(n,"extendNodeSchema",i);return{...e,...r?r(t):{}}}),{}),s=dx({...o,content:cx(nx(t,"content",i)),marks:cx(nx(t,"marks",i)),group:cx(nx(t,"group",i)),inline:cx(nx(t,"inline",i)),atom:cx(nx(t,"atom",i)),selectable:cx(nx(t,"selectable",i)),draggable:cx(nx(t,"draggable",i)),code:cx(nx(t,"code",i)),defining:cx(nx(t,"defining",i)),isolating:cx(nx(t,"isolating",i)),attrs:Object.fromEntries(r.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),a=cx(nx(t,"parseHTML",i));a&&(s.parseDOM=a.map((e=>ux(e,r))));const l=nx(t,"renderHTML",i);l&&(s.toDOM=e=>l({node:e,HTMLAttributes:ax(e,r)}));const c=nx(t,"renderText",i);return c&&(s.toText=c),[t.name,s]}))),a=Object.fromEntries(i.map((t=>{const r=n.filter((e=>e.type===t.name)),i={name:t.name,options:t.options,storage:t.storage},o=e.reduce(((e,n)=>{const r=nx(n,"extendMarkSchema",i);return{...e,...r?r(t):{}}}),{}),s=dx({...o,inclusive:cx(nx(t,"inclusive",i)),excludes:cx(nx(t,"excludes",i)),group:cx(nx(t,"group",i)),spanning:cx(nx(t,"spanning",i)),code:cx(nx(t,"code",i)),attrs:Object.fromEntries(r.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),a=cx(nx(t,"parseHTML",i));a&&(s.parseDOM=a.map((e=>ux(e,r))));const l=nx(t,"renderHTML",i);return l&&(s.toDOM=e=>l({mark:e,HTMLAttributes:ax(e,r)})),[t.name,s]})));return new pt({topNode:o,nodes:s,marks:a})}(this.extensions),this.extensions.forEach((e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:px(e.name,this.schema)};if("mark"===e.type){(null===(t=cx(nx(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name)}const r=nx(e,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const i=nx(e,"onCreate",n);i&&this.editor.on("create",i);const o=nx(e,"onUpdate",n);o&&this.editor.on("update",o);const s=nx(e,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=nx(e,"onTransaction",n);a&&this.editor.on("transaction",a);const l=nx(e,"onFocus",n);l&&this.editor.on("focus",l);const c=nx(e,"onBlur",n);c&&this.editor.on("blur",c);const u=nx(e,"onDestroy",n);u&&this.editor.on("destroy",u)}))}static resolve(e){const t=_x.sort(_x.flatten(e)),n=function(e){const t=e.filter(((t,n)=>e.indexOf(t)!==n));return[...new Set(t)]}(t.map((e=>e.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((e=>`'${e}'`)).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map((e=>{const t=nx(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return t?[e,...this.flatten(t())]:e})).flat(10)}static sort(e){const t=100;return e.sort(((e,n)=>{const r=nx(e,"priority")||t,i=nx(n,"priority")||t;return r>i?-1:r<i?1:0}))}get commands(){return this.extensions.reduce(((e,t)=>{const n=nx(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:px(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this,t=_x.sort([...this.extensions].reverse()),n=[],r=[],i=t.map((t=>{const i={name:t.name,options:t.options,storage:t.storage,editor:e,type:px(t.name,this.schema)},o=[],s=nx(t,"addKeyboardShortcuts",i);let a={};if("mark"===t.type&&t.config.exitable&&(a.ArrowRight=()=>fE.handleExit({editor:e,mark:t})),s){const t=Object.fromEntries(Object.entries(s()).map((([t,n])=>[t,()=>n({editor:e})])));a={...a,...t}}const l=new $n({props:{handleKeyDown:H_(a)}});o.push(l);const c=nx(t,"addInputRules",i);hx(t,e.options.enableInputRules)&&c&&n.push(...c());const u=nx(t,"addPasteRules",i);hx(t,e.options.enablePasteRules)&&u&&r.push(...u());const d=nx(t,"addProseMirrorPlugins",i);if(d){const e=d();o.push(...e)}return o})).flat();return[bx({editor:e,rules:n}),...wx({editor:e,rules:r}),...i]}get attributes(){return ix(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=rx(this.extensions);return Object.fromEntries(t.filter((e=>!!nx(e,"addNodeView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:ox(t.name,this.schema)},i=nx(t,"addNodeView",r);if(!i)return[];return[t.name,(r,o,s,a)=>{const l=ax(r,n);return i()({editor:e,node:r,getPos:s,decorations:a,HTMLAttributes:l,extension:t})}]})))}}function xx(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function Ex(e,t){const n={...e};return xx(e)&&xx(t)&&Object.keys(t).forEach((r=>{xx(t[r])?r in e?n[r]=Ex(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})})),n}class kx{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=cx(nx(this,"addOptions",{name:this.name}))),this.storage=cx(nx(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new kx(e)}configure(e={}){const t=this.extend();return t.options=Ex(this.options,e),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new kx(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=cx(nx(t,"addOptions",{name:t.name})),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}}function Mx(e,t,n){const{from:r,to:i}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return e.nodesBetween(r,i,((e,n,c,u)=>{var d;const p=null==s?void 0:s[e.type.name];p?(e.isBlock&&!l&&(a+=o,l=!0),c&&(a+=p({node:e,pos:n,parent:c,index:u,range:t}))):e.isText?(a+=null===(d=null==e?void 0:e.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,i-n),l=!1):e.isBlock&&!l&&(a+=o,l=!0)})),a}function Dx(e){return Object.fromEntries(Object.entries(e.nodes).filter((([,e])=>e.spec.toText)).map((([e,t])=>[e,t.spec.toText])))}const Cx=kx.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new $n({key:new qn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map((e=>e.$from.pos))),a=Math.max(...o.map((e=>e.$to.pos)));return Mx(r,{from:s,to:a},{textSerializers:Dx(n)})}}})]}});function Sx(e,t,n={strict:!0}){const r=Object.keys(t);return!r.length||r.every((r=>n.strict?t[r]===e[r]:fx(t[r])?t[r].test(e[r]):t[r]===e[r]))}function Ax(e,t,n={}){return e.find((e=>e.type===t&&Sx(e.attrs,n)))}function Nx(e,t,n={}){return!!Ax(e,t,n)}function Ox(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=Ax([...r.node.marks],t,n);if(!i)return;let o=r.index,s=e.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(Ax([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,s-=e.parent.child(o).nodeSize;for(;a<e.parent.childCount&&Nx([...e.parent.child(a).marks],t,n);)l+=e.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function Tx(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function Ix(e){return e instanceof Mn}function Lx(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Fx(e,t=null){if(!t)return null;const n=_n.atStart(e),r=_n.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;const i=n.from,o=r.to;return"all"===t?Mn.create(e,Lx(0,i,o),Lx(e.content.size,i,o)):Mn.create(e,Lx(t,i,o),Lx(t,i,o))}function zx(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function jx(e){const t=`<body>${e}</body>`;return(new window.DOMParser).parseFromString(t,"text/html").body}function Rx(e,t,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof e&&null!==e)try{return Array.isArray(e)?ke.fromArray(e.map((e=>t.nodeFromJSON(e)))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),Rx("",t,n)}if("string"==typeof e){const r=ft.fromSchema(t);return n.slice?r.parseSlice(jx(e),n.parseOptions).content:r.parse(jx(e),n.parseOptions)}return Rx("",t,n)}function Bx(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function Px(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,s=t?ox(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);a.push({node:e,from:n,to:o})}));const l=i-r,c=a.filter((e=>!s||s.name===e.node.type.name)).filter((e=>Sx(e.node.attrs,n,{strict:!1})));if(o)return!!c.length;return c.reduce(((e,t)=>e+t.to-t.from),0)>=l}function Ux(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Hx(e,t){const n="string"==typeof t?[t]:t;return Object.keys(e).reduce(((t,r)=>(n.includes(r)||(t[r]=e[r]),t)),{})}function $x(e,t,n={}){return Rx(e,t,{slice:!1,parseOptions:n})}function Vx(e,t){const n=[];return e.descendants(((e,r)=>{t(e)&&n.push({node:e,pos:r})})),n}function Wx(e){return t=>function(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}function qx(e,t){const n=Tx(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,(e=>{s.push(...e.marks)}));const a=s.find((e=>e.type.name===n.name));return a?{...a.attrs}:{}}function Kx(e,t){const n=Ux("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){const n=ox(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,(e=>{o.push(e)}));const s=o.reverse().find((e=>e.type.name===n.name));return s?{...s.attrs}:{}}(e,t):"mark"===n?qx(e,t):{}}function Gx(e){const t=function(e,t=JSON.stringify){const n={};return e.filter((e=>{const r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter(((e,n)=>{const r=t.filter(((e,t)=>t!==n));return!r.some((t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}))}function Yx(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const i=Ox(n.resolve(e-1),t.type);i&&r.push({mark:t,...i})})):n.nodesBetween(e,t,((e,t)=>{r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}function Qx(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?Tx(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>!o||o.name===e.type.name)).find((e=>Sx(e.attrs,n,{strict:!1})));let s=0;const a=[];if(i.forEach((({$from:t,$to:n})=>{const r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);s+=o-n,a.push(...e.marks.map((e=>({mark:e,from:n,to:o}))))}))})),0===s)return!1;const l=a.filter((e=>!o||o.name===e.mark.type.name)).filter((e=>Sx(e.mark.attrs,n,{strict:!1}))).reduce(((e,t)=>e+t.to-t.from),0),c=a.filter((e=>!o||e.mark.type!==o&&e.mark.type.excludes(o))).reduce(((e,t)=>e+t.to-t.from),0);return(l>0?l+c:l)>=s}function Jx(e,t){const{nodeExtensions:n}=rx(t),r=n.find((t=>t.name===e));if(!r)return!1;const i=cx(nx(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof i&&i.split(" ").includes("list")}function Zx(e,t,n){const r=0,i=e.state.doc.content.size,o=Lx(t,r,i),s=Lx(n,r,i),a=e.coordsAtPos(o),l=e.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),p=Math.max(a.right,l.right),h={top:c,bottom:u,left:d,right:p,width:p-d,height:u-c,x:d,y:c};return{...h,toJSON:()=>h}}function Xx(e,t,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=e.find((e=>e.type===t&&e.name===n));return!!r&&r.attribute.keepOnSplit})))}function eE(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter((e=>null==t?void 0:t.includes(e.type.name)));e.tr.ensureMarks(r)}}const tE=(e,t)=>{const n=Wx((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const i=e.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!rn(e.doc,n.pos)||(e.join(n.pos),!0)},nE=(e,t)=>{const n=Wx((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const i=e.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!rn(e.doc,r)||(e.join(r),!0)};var rE=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame((()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return!n||(i.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:i}=t,o=r.resolve(i.map(n)),s=r.resolve(i.map(n+e.nodeSize)),a=o.blockRange(s);if(!a)return;const l=Xt(a);if(e.type.isTextblock){const{defaultType:e}=o.parent.contentMatchAt(o.index());t.setNodeMarkup(a.start,e)}(l||0===l)&&t.lift(a,l)}))})),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof An||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=q_(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(n,o.createAndFill());s.setSelection(Mn.create(s.doc,n+1)),t(s.scrollIntoView())}return!0})(e,t),deleteNode:e=>({tr:t,state:n,dispatch:r})=>{const i=ox(e,n.schema),o=t.selection.$anchor;for(let e=o.depth;e>0;e-=1){if(o.node(e).type===i){if(r){const n=o.before(e),r=o.after(e);t.delete(n,r).scrollIntoView()}return!0}}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},deleteSelection:()=>({state:e,dispatch:t})=>((e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0))(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=q_(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,s.createAndFill());i.setSelection(_n.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0})(e,t),extendMarkRange:(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=Tx(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:u}=a;if(i){const e=Ox(l,o,t);if(e&&e.from<=c&&e.to>=u){const t=Mn.create(s,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{const n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{zx()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===e||!1===e)return!0;if(o&&null===e&&!Ix(n.state.selection))return s(),!0;const a=Fx(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},forEach:(e,t)=>n=>e.every(((e,r)=>t(e,{...n,index:r}))),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{if(i){n={parseOptions:{},updateSelection:!0,...n};const i=Rx(t,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===i.toString())return!0;let{from:s,to:a}="number"==typeof e?{from:e,to:e}:e,l=!0,c=!0;if((i.toString().startsWith("<")?i:[i]).forEach((e=>{e.check(),l=!!l&&(e.isText&&0===e.marks.length),c=!!c&&e.isBlock})),s===a&&c){const{parent:e}=r.doc.resolve(s);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(s-=1,a+=1)}l?r.insertText(t,s,a):r.replaceWith(s,a,i),n.updateSelection&&function(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof Yt||i instanceof Qt))return;const o=e.mapping.maps[r];let s=0;o.forEach(((e,t,n,r)=>{0===s&&(s=r)})),e.setSelection(_n.near(e.doc.resolve(s),n))}(r,r.steps.length-1,-1)}return!0},joinBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let i=V_(r);if(!i){let n=r.blockRange(),i=n&&Xt(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&K_(e,i,t))return!0;if(0==r.parent.content.size&&($_(o,"end")||Cn.isSelectable(o))){let n=sn(e.doc,r.before(),r.after(),Ne.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection($_(o,"end")?_n.findFrom(r.doc.resolve(r.mapping.map(i.pos,-1)),-1):Cn.create(r.doc,i.pos-o.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1||(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),0))})(e,t),joinForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let i=W_(r);if(!i)return!1;let o=i.nodeAfter;if(K_(e,i,t))return!0;if(0==r.parent.content.size&&($_(o,"start")||Cn.isSelectable(o))){let n=sn(e.doc,r.before(),r.after(),Ne.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection($_(o,"start")?_n.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):Cn.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1||(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),0))})(e,t),keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:i})=>{const o=function(e){const t=e.split(/-(?!$)/);let n,r,i,o,s=t[t.length-1];"Space"===s&&(s=" ");for(let e=0;e<t.length-1;e+=1){const s=t[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);zx()||Bx()?o=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),o&&(s=`Meta-${s}`),i&&(s=`Shift-${s}`),s}(e).split(/-(?!$)/),s=o.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction((()=>{n.someProp("handleKeyDown",(e=>e(n,a)))}));return null==l||l.steps.forEach((e=>{const t=e.map(r.mapping);t&&i&&r.maybeStep(t)})),!0},lift:(e,t={})=>({state:n,dispatch:r})=>!!Px(n,ox(e,n.schema),t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&Xt(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:e,dispatch:t})=>((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(nn(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Xt(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)})(e,t),liftListItem:e=>({state:t,dispatch:n})=>X_(ox(e,t.schema))(t,n),newlineInCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))})(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Ux("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(o=ox(e,r.schema)),"mark"===a&&(s=Tx(e,r.schema)),i&&n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,Hx(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((i=>{s===i.type&&n.addMark(r,r+e.nodeSize,s.create(Hx(i.attrs,t)))}))}))})),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),selectNodeBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=V_(r)}let s=o&&o.nodeBefore;return!(!s||!Cn.isSelectable(s)||(t&&t(e.tr.setSelection(Cn.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),0))})(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=W_(r)}let s=o&&o.nodeAfter;return!(!s||!Cn.isSelectable(s)||(t&&t(e.tr.setSelection(Cn.create(e.doc,o.pos)).scrollIntoView()),0))})(e,t),selectParentNode:()=>({state:e,dispatch:t})=>((e,t)=>{let n,{$from:r,to:i}=e.selection,o=r.sharedDepth(i);return 0!=o&&(n=r.before(o),t&&t(e.tr.setSelection(Cn.create(e.doc,n))),!0)})(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>Q_(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>Y_(e,t),setContent:(e,t=!1,n={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=$x(e,i.schema,n);return o&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=Tx(e,r.schema);if(i)if(s){const e=qx(r,l);n.addStoredMark(l.create({...e,...t}))}else a.forEach((e=>{const i=e.$from.pos,o=e.$to.pos;r.doc.nodesBetween(i,o,((e,r)=>{const s=Math.max(r,i),a=Math.min(r+e.nodeSize,o);e.marks.find((e=>e.type===l))?e.marks.forEach((e=>{l===e.type&&n.addMark(s,a,l.create({...e.attrs,...t}))})):n.addMark(s,a,l.create(t))}))}));return function(e,t,n){var r;const{selection:i}=t;let o=null;if(Ix(i)&&(o=i.$cursor),o){const t=null!==(r=e.storedMarks)&&void 0!==r?r:o.marks();return!!n.isInSet(t)||!t.some((e=>e.type.excludes(n)))}const{ranges:s}=i;return s.some((({$from:t,$to:r})=>{let i=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,((e,t,r)=>{if(i)return!1;if(e.isInline){const t=!r||r.type.allowsMarkType(n),o=!!n.isInSet(e.marks)||!e.marks.some((e=>e.type.excludes(n)));i=t&&o}return!i})),i}))}(r,n,l)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=ox(e,n.schema);return o.isTextblock?i().command((({commands:e})=>!!J_(o,t)(n)||e.clearNodes())).command((({state:e})=>J_(o,t)(e,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,r=Lx(e,0,n.content.size),i=Cn.create(n,r);t.setSelection(i)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:r,to:i}="number"==typeof e?{from:e,to:e}:e,o=Mn.atStart(n).from,s=Mn.atEnd(n).to,a=Lx(r,o,s),l=Lx(i,o,s),c=Mn.create(n,a,l);t.setSelection(c)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{const r=ox(e,t.schema);return(i=r,function(e,t){let{$from:n,$to:r}=e.selection,o=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==i));if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=i)return!1;if(t){let n=l.lastChild&&l.lastChild.type==a.type,r=ke.from(n?i.create():null),s=new Ne(ke.from(i.create(null,ke.from(a.type.create(null,r)))),n?3:1,0),c=o.start,u=o.end;t(e.tr.step(new Qt(c-(n?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0})(t,n);var i},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,c=Xx(i.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof Cn&&o.node.isBlock)return!(!a.parentOffset||!nn(s,a.pos))&&(r&&(e&&eE(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const r=l.parentOffset===l.parent.content.size;o instanceof Mn&&t.deleteSelection();const s=0===a.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(a.node(-1).contentMatchAt(a.indexAfter(-1)));let u=r&&s?[{type:s,attrs:c}]:void 0,d=nn(t.doc,t.mapping.map(a.pos),1,u);if(u||d||!nn(t.doc,t.mapping.map(a.pos),1,s?[{type:s}]:void 0)||(d=!0,u=s?[{type:s,attrs:c}]:void 0),d&&(t.split(t.mapping.map(a.pos),1,u),s&&!r&&!a.parentOffset&&a.parent.type!==s)){const e=t.mapping.map(a.before()),n=t.doc.resolve(e);a.node(-1).canReplaceWith(n.index(),n.index()+1,s)&&t.setNodeMarkup(t.mapping.map(a.before()),s)}e&&eE(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},splitListItem:e=>({tr:t,state:n,dispatch:r,editor:i})=>{var o;const s=ox(e,n.schema),{$from:a,$to:l}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=i.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let e=ke.empty;const n=a.index(-1)?1:a.index(-2)?2:3;for(let t=a.depth-n;t>=a.depth-3;t-=1)e=ke.from(a.node(t).copy(e));const r=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,i=Xx(d,a.node().type.name,a.node().attrs),l=(null===(o=s.contentMatch.defaultType)||void 0===o?void 0:o.createAndFill(i))||void 0;e=e.append(ke.from(s.createAndFill(null,l)||void 0));const c=a.before(a.depth-(n-1));t.replace(c,a.after(-r),new Ne(e,4-n,0));let u=-1;t.doc.nodesBetween(c,t.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)})),u>-1&&t.setSelection(Mn.near(t.doc.resolve(u))),t.scrollIntoView()}return!0}const p=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=Xx(d,u.type.name,u.attrs),f=Xx(d,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const m=p?[{type:s,attrs:h},{type:p,attrs:f}]:[{type:s,attrs:h}];return!!nn(t.doc,a.pos,2)&&(r&&t.split(a.pos,2,m).scrollIntoView(),!0)},toggleList:(e,t)=>({editor:n,tr:r,state:i,dispatch:o,chain:s,commands:a,can:l})=>{const{extensions:c}=n.extensionManager,u=ox(e,i.schema),d=ox(t,i.schema),{selection:p}=i,{$from:h,$to:f}=p,m=h.blockRange(f);if(!m)return!1;const g=Wx((e=>Jx(e.type.name,c)))(p);if(m.depth>=1&&g&&m.depth-g.depth<=1){if(g.node.type===u)return a.liftListItem(d);if(Jx(g.node.type.name,c)&&u.validContent(g.node.content)&&o)return s().command((()=>(r.setNodeMarkup(g.pos,u),!0))).command((()=>tE(r,u))).command((()=>nE(r,u))).run()}return s().command((()=>!!l().wrapInList(u)||a.clearNodes())).wrapInList(u).command((()=>tE(r,u))).command((()=>nE(r,u))).run()},toggleMark:(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=Tx(e,r.schema);return Qx(r,s,t)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,t)},toggleNode:(e,t,n={})=>({state:r,commands:i})=>{const o=ox(e,r.schema),s=ox(t,r.schema);return Px(r,o,n)?i.setNode(s):i.setNode(o,n)},toggleWrap:(e,t={})=>({state:n,commands:r})=>{const i=ox(e,n.schema);return Px(n,i,t)?r.lift(i):r.wrapIn(i,t)},undoInputRule:()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){const t=e.tr,n=o.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(o.text){const n=t.doc.resolve(o.from).marks();t.replaceWith(o.from,o.to,e.schema.text(o.text,n))}else t.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=Tx(e,r.schema),{$from:c,empty:u,ranges:d}=a;if(!i)return!0;if(u&&s){let{from:e,to:t}=a;const r=null===(o=c.marks().find((e=>e.type===l)))||void 0===o?void 0:o.attrs,i=Ox(c,l,r);i&&(e=i.from,t=i.to),n.removeMark(e,t,l)}else d.forEach((e=>{n.removeMark(e.$from.pos,e.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Ux("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(o=ox(e,r.schema)),"mark"===a&&(s=Tx(e,r.schema)),i&&n.selection.ranges.forEach((e=>{const i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,((e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),s&&e.marks.length&&e.marks.forEach((o=>{if(s===o.type){const l=Math.max(r,i),c=Math.min(r+e.nodeSize,a);n.addMark(l,c,s.create({...o.attrs,...t}))}}))}))})),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&en(s,e,t);return!!a&&(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0)}}(ox(e,n.schema),t)(n,r),wrapInList:(e,t={})=>({state:n,dispatch:r})=>Z_(ox(e,n.schema),t)(n,r)});const iE=kx.create({name:"commands",addCommands:()=>({...rE})}),oE=kx.create({name:"editable",addProseMirrorPlugins(){return[new $n({key:new qn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),sE=kx.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new $n({key:new qn("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),aE=kx.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:r}=t,{empty:i,$anchor:o}=n,{pos:s,parent:a}=o,l=_n.atStart(r).from===s;return!(!(i&&l&&a.type.isTextblock)||a.textContent.length)&&e.clearNodes()})),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()])),t=()=>this.editor.commands.first((({commands:e})=>[()=>e.deleteSelection(),()=>e.joinForward(),()=>e.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return zx()||Bx()?i:r},addProseMirrorPlugins(){return[new $n({key:new qn("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some((e=>e.docChanged))&&!t.doc.eq(n.doc)))return;const{empty:r,from:i,to:o}=t.selection,s=_n.atStart(t.doc).from,a=_n.atEnd(t.doc).to,l=i===s&&o===a,c=0===n.doc.textBetween(0,n.doc.content.size," "," ").length;if(r||!l||!c)return;const u=n.tr,d=ex({state:n,transaction:u}),{commands:p}=new tx({editor:this.editor,state:d});return p.clearNodes(),u.steps.length?u:void 0}})]}}),lE=kx.create({name:"tabindex",addProseMirrorPlugins(){return[new $n({key:new qn("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var cE=Object.freeze({__proto__:null,ClipboardTextSerializer:Cx,Commands:iE,Editable:oE,FocusEvents:sE,Keymap:aE,Tabindex:lE});const uE=`.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}`;function dE(e){return new mx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=cx(e.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Yx(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>c)).length)return null;u<n.to&&o.delete(u,n.to),c>n.from&&o.delete(n.from+r,c),l=n.from+r+s.length,o.addMark(n.from+r,l,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function pE(e){return new mx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=cx(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function hE(e){return new mx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=cx(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),s=o.doc.resolve(n.from).blockRange(),a=s&&en(s,e.type,i);if(!a)return null;o.wrap(s,a);const l=o.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&rn(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&o.join(n.from-1)}})}class fE{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=cx(nx(this,"addOptions",{name:this.name}))),this.storage=cx(nx(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new fE(e)}configure(e={}){const t=this.extend();return t.options=Ex(this.options,e),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new fE(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=cx(nx(t,"addOptions",{name:t.name})),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const i=r.marks(),o=!!i.find((e=>(null==e?void 0:e.type.name)===t.name));if(!o)return!1;const s=i.find((e=>(null==e?void 0:e.type.name)===t.name));return s&&n.removeStoredMark(s),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}class mE{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=cx(nx(this,"addOptions",{name:this.name}))),this.storage=cx(nx(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new mE(e)}configure(e={}){const t=this.extend();return t.options=Ex(this.options,e),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new mE(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=cx(nx(t,"addOptions",{name:t.name})),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}}function gE(e){return new yx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=cx(e.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Yx(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>c)).length)return null;u<n.to&&o.delete(u,n.to),c>n.from&&o.delete(n.from+r,c),l=n.from+r+s.length,o.addMark(n.from+r,l,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}var bE="top",yE="bottom",vE="right",wE="left",_E="auto",xE=[bE,yE,vE,wE],EE="start",kE="end",ME="clippingParents",DE="viewport",CE="popper",SE="reference",AE=xE.reduce((function(e,t){return e.concat([t+"-"+EE,t+"-"+kE])}),[]),NE=[].concat(xE,[_E]).reduce((function(e,t){return e.concat([t,t+"-"+EE,t+"-"+kE])}),[]),OE=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function TE(e){return e?(e.nodeName||"").toLowerCase():null}function IE(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function LE(e){return e instanceof IE(e).Element||e instanceof Element}function FE(e){return e instanceof IE(e).HTMLElement||e instanceof HTMLElement}function zE(e){return"undefined"!=typeof ShadowRoot&&(e instanceof IE(e).ShadowRoot||e instanceof ShadowRoot)}var jE={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];FE(i)&&TE(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});FE(r)&&TE(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function RE(e){return e.split("-")[0]}var BE=Math.max,PE=Math.min,UE=Math.round;function HE(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function $E(){return!/^((?!chrome|android).)*safari/i.test(HE())}function VE(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&FE(e)&&(i=e.offsetWidth>0&&UE(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&UE(r.height)/e.offsetHeight||1);var s=(LE(e)?IE(e):window).visualViewport,a=!$E()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.offsetTop:0))/o,u=r.width/i,d=r.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function WE(e){var t=VE(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function qE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function KE(e){return IE(e).getComputedStyle(e)}function GE(e){return["table","td","th"].indexOf(TE(e))>=0}function YE(e){return((LE(e)?e.ownerDocument:e.document)||window.document).documentElement}function QE(e){return"html"===TE(e)?e:e.assignedSlot||e.parentNode||(zE(e)?e.host:null)||YE(e)}function JE(e){return FE(e)&&"fixed"!==KE(e).position?e.offsetParent:null}function ZE(e){for(var t=IE(e),n=JE(e);n&&GE(n)&&"static"===KE(n).position;)n=JE(n);return n&&("html"===TE(n)||"body"===TE(n)&&"static"===KE(n).position)?t:n||function(e){var t=/firefox/i.test(HE());if(/Trident/i.test(HE())&&FE(e)&&"fixed"===KE(e).position)return null;var n=QE(e);for(zE(n)&&(n=n.host);FE(n)&&["html","body"].indexOf(TE(n))<0;){var r=KE(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function XE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ek(e,t,n){return BE(e,PE(t,n))}function tk(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function nk(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var rk={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=RE(n.placement),l=XE(a),c=[wE,vE].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return tk("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:nk(e,xE))}(i.padding,n),d=WE(o),p="y"===l?bE:wE,h="y"===l?yE:vE,f=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],m=s[l]-n.rects.reference[l],g=ZE(o),b=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,v=u[p],w=b-d[c]-u[h],_=b/2-d[c]/2+y,x=ek(v,_,w),E=l;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&qE(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ik(e){return e.split("-")[1]}var ok={top:"auto",right:"auto",bottom:"auto",left:"auto"};function sk(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=s.x,h=void 0===p?0:p,f=s.y,m=void 0===f?0:f,g="function"==typeof u?u({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var b=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),v=wE,w=bE,_=window;if(c){var x=ZE(n),E="clientHeight",k="clientWidth";if(x===IE(n)&&"static"!==KE(x=YE(n)).position&&"absolute"===a&&(E="scrollHeight",k="scrollWidth"),i===bE||(i===wE||i===vE)&&o===kE)w=yE,m-=(d&&x===_&&_.visualViewport?_.visualViewport.height:x[E])-r.height,m*=l?1:-1;if(i===wE||(i===bE||i===yE)&&o===kE)v=vE,h-=(d&&x===_&&_.visualViewport?_.visualViewport.width:x[k])-r.width,h*=l?1:-1}var M,D=Object.assign({position:a},c&&ok),C=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:UE(t*r)/r||0,y:UE(n*r)/r||0}}({x:h,y:m}):{x:h,y:m};return h=C.x,m=C.y,l?Object.assign({},D,((M={})[w]=y?"0":"",M[v]=b?"0":"",M.transform=(_.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",M)):Object.assign({},D,((t={})[w]=y?m+"px":"",t[v]=b?h+"px":"",t.transform="",t))}var ak={passive:!0};var lk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=IE(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,ak)})),a&&l.addEventListener("resize",n.update,ak),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,ak)})),a&&l.removeEventListener("resize",n.update,ak)}},data:{}},ck={left:"right",right:"left",bottom:"top",top:"bottom"};function uk(e){return e.replace(/left|right|bottom|top/g,(function(e){return ck[e]}))}var dk={start:"end",end:"start"};function pk(e){return e.replace(/start|end/g,(function(e){return dk[e]}))}function hk(e){var t=IE(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function fk(e){return VE(YE(e)).left+hk(e).scrollLeft}function mk(e){var t=KE(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function gk(e){return["html","body","#document"].indexOf(TE(e))>=0?e.ownerDocument.body:FE(e)&&mk(e)?e:gk(QE(e))}function bk(e,t){var n;void 0===t&&(t=[]);var r=gk(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=IE(r),s=i?[o].concat(o.visualViewport||[],mk(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(bk(QE(s)))}function yk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vk(e,t,n){return t===DE?yk(function(e,t){var n=IE(e),r=YE(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=$E();(c||!c&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+fk(e),y:l}}(e,n)):LE(t)?function(e,t){var n=VE(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):yk(function(e){var t,n=YE(e),r=hk(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=BE(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=BE(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+fk(e),l=-r.scrollTop;return"rtl"===KE(i||n).direction&&(a+=BE(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(YE(e)))}function wk(e,t,n,r){var i="clippingParents"===t?function(e){var t=bk(QE(e)),n=["absolute","fixed"].indexOf(KE(e).position)>=0&&FE(e)?ZE(e):e;return LE(n)?t.filter((function(e){return LE(e)&&qE(e,n)&&"body"!==TE(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=vk(e,n,r);return t.top=BE(i.top,t.top),t.right=PE(i.right,t.right),t.bottom=PE(i.bottom,t.bottom),t.left=BE(i.left,t.left),t}),vk(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function _k(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?RE(i):null,s=i?ik(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case bE:t={x:a,y:n.y-r.height};break;case yE:t={x:a,y:n.y+n.height};break;case vE:t={x:n.x+n.width,y:l};break;case wE:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?XE(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case EE:t[c]=t[c]-(n[u]/2-r[u]/2);break;case kE:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function xk(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?ME:a,c=n.rootBoundary,u=void 0===c?DE:c,d=n.elementContext,p=void 0===d?CE:d,h=n.altBoundary,f=void 0!==h&&h,m=n.padding,g=void 0===m?0:m,b=tk("number"!=typeof g?g:nk(g,xE)),y=p===CE?SE:CE,v=e.rects.popper,w=e.elements[f?y:p],_=wk(LE(w)?w:w.contextElement||YE(e.elements.popper),l,u,s),x=VE(e.elements.reference),E=_k({reference:x,element:v,strategy:"absolute",placement:i}),k=yk(Object.assign({},v,E)),M=p===CE?k:x,D={top:_.top-M.top+b.top,bottom:M.bottom-_.bottom+b.bottom,left:_.left-M.left+b.left,right:M.right-_.right+b.right},C=e.modifiersData.offset;if(p===CE&&C){var S=C[i];Object.keys(D).forEach((function(e){var t=[vE,yE].indexOf(e)>=0?1:-1,n=[bE,yE].indexOf(e)>=0?"y":"x";D[e]+=S[n]*t}))}return D}function Ek(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?NE:l,u=ik(r),d=u?a?AE:AE.filter((function(e){return ik(e)===u})):xE,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var h=p.reduce((function(t,n){return t[n]=xk(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[RE(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}var kk={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,f=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,b=RE(g),y=l||(b===g||!f?[uk(g)]:function(e){if(RE(e)===_E)return[];var t=uk(e);return[pk(e),t,pk(t)]}(g)),v=[g].concat(y).reduce((function(e,n){return e.concat(RE(n)===_E?Ek(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,_=t.rects.popper,x=new Map,E=!0,k=v[0],M=0;M<v.length;M++){var D=v[M],C=RE(D),S=ik(D)===EE,A=[bE,yE].indexOf(C)>=0,N=A?"width":"height",O=xk(t,{placement:D,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),T=A?S?vE:wE:S?yE:bE;w[N]>_[N]&&(T=uk(T));var I=uk(T),L=[];if(o&&L.push(O[C]<=0),a&&L.push(O[T]<=0,O[I]<=0),L.every((function(e){return e}))){k=D,E=!1;break}x.set(D,L)}if(E)for(var F=function(e){var t=v.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},z=f?3:1;z>0;z--){if("break"===F(z))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Mk(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Dk(e){return[bE,vE,yE,wE].some((function(t){return e[t]>=0}))}var Ck={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=xk(t,{elementContext:"reference"}),a=xk(t,{altBoundary:!0}),l=Mk(s,r),c=Mk(a,i,o),u=Dk(l),d=Dk(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var Sk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,s=NE.reduce((function(e,n){return e[n]=function(e,t,n){var r=RE(e),i=[wE,bE].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[wE,vE].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}};var Ak={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=_k({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Nk={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,h=void 0===p||p,f=n.tetherOffset,m=void 0===f?0:f,g=xk(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=RE(t.placement),y=ik(t.placement),v=!y,w=XE(b),_="x"===w?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,k=t.rects.popper,M="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,D="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(x){if(o){var A,N="y"===w?bE:wE,O="y"===w?yE:vE,T="y"===w?"height":"width",I=x[w],L=I+g[N],F=I-g[O],z=h?-k[T]/2:0,j=y===EE?E[T]:k[T],R=y===EE?-k[T]:-E[T],B=t.elements.arrow,P=h&&B?WE(B):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=U[N],$=U[O],V=ek(0,E[T],P[T]),W=v?E[T]/2-z-V-H-D.mainAxis:j-V-H-D.mainAxis,q=v?-E[T]/2+z+V+$+D.mainAxis:R+V+$+D.mainAxis,K=t.elements.arrow&&ZE(t.elements.arrow),G=K?"y"===w?K.clientTop||0:K.clientLeft||0:0,Y=null!=(A=null==C?void 0:C[w])?A:0,Q=I+q-Y,J=ek(h?PE(L,I+W-Y-G):L,I,h?BE(F,Q):F);x[w]=J,S[w]=J-I}if(a){var Z,X="x"===w?bE:wE,ee="x"===w?yE:vE,te=x[_],ne="y"===_?"height":"width",re=te+g[X],ie=te-g[ee],oe=-1!==[bE,wE].indexOf(b),se=null!=(Z=null==C?void 0:C[_])?Z:0,ae=oe?re:te-E[ne]-k[ne]-se+D.altAxis,le=oe?te+E[ne]+k[ne]-se-D.altAxis:ie,ce=h&&oe?function(e,t,n){var r=ek(e,t,n);return r>n?n:r}(ae,te,le):ek(h?ae:re,te,h?le:ie);x[_]=ce,S[_]=ce-te}t.modifiersData[r]=S}},requiresIfExists:["offset"]};function Ok(e,t,n){void 0===n&&(n=!1);var r,i,o=FE(t),s=FE(t)&&function(e){var t=e.getBoundingClientRect(),n=UE(t.width)/e.offsetWidth||1,r=UE(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=YE(t),l=VE(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==TE(t)||mk(a))&&(c=(r=t)!==IE(r)&&FE(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:hk(r)),FE(t)?((u=VE(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=fk(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Tk(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var Ik={placement:"bottom",modifiers:[],strategy:"absolute"};function Lk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Fk(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?Ik:i;return function(e,t,n){void 0===n&&(n=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ik,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(n){var i="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:LE(e)?bk(e):e.contextElement?bk(e.contextElement):[],popper:bk(t)};var s=function(e){var t=Tk(e);return OE.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,a.options.modifiers)));return a.orderedModifiers=s.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:a,name:t,instance:u,options:r}),s=function(){};l.push(o||s)}})),u.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,n=e.popper;if(Lk(t,n)){a.rects={reference:Ok(t,ZE(n),"fixed"===a.options.strategy),popper:WE(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],o=i.fn,s=i.options,l=void 0===s?{}:s,d=i.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:u})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){d(),c=!0}};if(!Lk(e,t))return u;function d(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var zk=Fk({defaultModifiers:[lk,Ak,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:RE(t.placement),variation:ik(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,sk(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,sk(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},jE,Sk,kk,Nk,rk,Ck]}),jk='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',Rk="tippy-box",Bk="tippy-content",Pk="tippy-backdrop",Uk="tippy-arrow",Hk="tippy-svg-arrow",$k={passive:!0,capture:!0},Vk=function(){return document.body};function Wk(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function qk(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Kk(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Gk(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Yk(e){return[].concat(e)}function Qk(e,t){-1===e.indexOf(t)&&e.push(t)}function Jk(e){return[].slice.call(e)}function Zk(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Xk(){return document.createElement("div")}function eM(e){return["Element","Fragment"].some((function(t){return qk(e,t)}))}function tM(e){return eM(e)?[e]:function(e){return qk(e,"NodeList")}(e)?Jk(e):Array.isArray(e)?e:Jk(document.querySelectorAll(e))}function nM(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function rM(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function iM(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function oM(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var sM={isTouch:!1},aM=0;function lM(){sM.isTouch||(sM.isTouch=!0,window.performance&&document.addEventListener("mousemove",cM))}function cM(){var e=performance.now();e-aM<20&&(sM.isTouch=!1,document.removeEventListener("mousemove",cM)),aM=e}function uM(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var dM=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,pM=Object.assign({appendTo:Vk,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),hM=Object.keys(pM);function fM(e){var t=(e.plugins||[]).reduce((function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=pM[i])?r:o);return t}),{});return Object.assign({},e,t)}function mM(e,t){var n=Object.assign({},t,{content:Kk(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(fM(Object.assign({},pM,{plugins:t}))):hM).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},pM.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function gM(e,t){e["innerHTML"]=t}function bM(e){var t=Xk();return!0===e?t.className=Uk:(t.className=Hk,eM(e)?t.appendChild(e):gM(t,e)),t}function yM(e,t){eM(t.content)?(gM(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?gM(e,t.content):e.textContent=t.content)}function vM(e){var t=e.firstElementChild,n=Jk(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Bk)})),arrow:n.find((function(e){return e.classList.contains(Uk)||e.classList.contains(Hk)})),backdrop:n.find((function(e){return e.classList.contains(Pk)}))}}function wM(e){var t=Xk(),n=Xk();n.className=Rk,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Xk();function i(n,r){var i=vM(t),o=i.box,s=i.content,a=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||yM(s,e.props),r.arrow?a?n.arrow!==r.arrow&&(o.removeChild(a),o.appendChild(bM(r.arrow))):o.appendChild(bM(r.arrow)):a&&o.removeChild(a)}return r.className=Bk,r.setAttribute("data-state","hidden"),yM(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}wM.$$tippy=!0;var _M=1,xM=[],EM=[];function kM(e,t){var n,r,i,o,s,a,l,c,u=mM(e,Object.assign({},pM,fM(Zk(t)))),d=!1,p=!1,h=!1,f=!1,m=[],g=Gk(K,u.interactiveDebounce),b=_M++,y=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),v={id:b,reference:e,popper:Xk(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){if(v.state.isDestroyed)return;I("onBeforeUpdate",[v,t]),W();var n=v.props,r=mM(e,Object.assign({},n,Zk(t),{ignoreAttributes:!0}));v.props=r,V(),n.interactiveDebounce!==r.interactiveDebounce&&(z(),g=Gk(K,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Yk(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");F(),T(),x&&x(n,r);v.popperInstance&&(J(),X().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));I("onAfterUpdate",[v,t])},setContent:function(e){v.setProps({content:e})},show:function(){var e=v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,r=sM.isTouch&&!v.props.touch,i=Wk(v.props.duration,0,pM.duration);if(e||t||n||r)return;if(S().hasAttribute("disabled"))return;if(I("onShow",[v],!1),!1===v.props.onShow(v))return;v.state.isVisible=!0,C()&&(_.style.visibility="visible");T(),P(),v.state.isMounted||(_.style.transition="none");if(C()){var o=N(),s=o.box,l=o.content;nM([s,l],0)}a=function(){var e;if(v.state.isVisible&&!f){if(f=!0,_.offsetHeight,_.style.transition=v.props.moveTransition,C()&&v.props.animation){var t=N(),n=t.box,r=t.content;nM([n,r],i),rM([n,r],"visible")}L(),F(),Qk(EM,v),null==(e=v.popperInstance)||e.forceUpdate(),I("onMount",[v]),v.props.animation&&C()&&function(e,t){H(e,t)}(i,(function(){v.state.isShown=!0,I("onShown",[v])}))}},function(){var e,t=v.props.appendTo,n=S();e=v.props.interactive&&t===Vk||"parent"===t?n.parentNode:Kk(t,[n]);e.contains(_)||e.appendChild(_);v.state.isMounted=!0,J()}()},hide:function(){var e=!v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,r=Wk(v.props.duration,1,pM.duration);if(e||t||n)return;if(I("onHide",[v],!1),!1===v.props.onHide(v))return;v.state.isVisible=!1,v.state.isShown=!1,f=!1,d=!1,C()&&(_.style.visibility="hidden");if(z(),U(),T(!0),C()){var i=N(),o=i.box,s=i.content;v.props.animation&&(nM([o,s],r),rM([o,s],"hidden"))}L(),F(),v.props.animation?C()&&function(e,t){H(e,(function(){!v.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()}))}(r,v.unmount):v.unmount()},hideWithInteractivity:function(e){A().addEventListener("mousemove",g),Qk(xM,g),g(e)},enable:function(){v.state.isEnabled=!0},disable:function(){v.hide(),v.state.isEnabled=!1},unmount:function(){v.state.isVisible&&v.hide();if(!v.state.isMounted)return;Z(),X().forEach((function(e){e._tippy.unmount()})),_.parentNode&&_.parentNode.removeChild(_);EM=EM.filter((function(e){return e!==v})),v.state.isMounted=!1,I("onHidden",[v])},destroy:function(){if(v.state.isDestroyed)return;v.clearDelayTimeouts(),v.unmount(),W(),delete e._tippy,v.state.isDestroyed=!0,I("onDestroy",[v])}};if(!u.render)return v;var w=u.render(v),_=w.popper,x=w.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+v.id,v.popper=_,e._tippy=v,_._tippy=v;var E=y.map((function(e){return e.fn(v)})),k=e.hasAttribute("aria-expanded");return V(),F(),T(),I("onCreate",[v]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",(function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()})),_.addEventListener("mouseleave",(function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",g)})),v;function M(){var e=v.props.touch;return Array.isArray(e)?e:[e,0]}function D(){return"hold"===M()[0]}function C(){var e;return!(null==(e=v.props.render)||!e.$$tippy)}function S(){return l||e}function A(){var e,t,n=S().parentNode;return n?null!=(t=Yk(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function N(){return vM(_)}function O(e){return v.state.isMounted&&!v.state.isVisible||sM.isTouch||o&&"focus"===o.type?0:Wk(v.props.delay,e?0:1,pM.delay)}function T(e){void 0===e&&(e=!1),_.style.pointerEvents=v.props.interactive&&!e?"":"none",_.style.zIndex=""+v.props.zIndex}function I(e,t,n){var r;(void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=v.props)[e].apply(r,t)}function L(){var t=v.props.aria;if(t.content){var n="aria-"+t.content,r=_.id;Yk(v.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(v.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function F(){!k&&v.props.aria.expanded&&Yk(v.props.triggerTarget||e).forEach((function(e){v.props.interactive?e.setAttribute("aria-expanded",v.state.isVisible&&e===S()?"true":"false"):e.removeAttribute("aria-expanded")}))}function z(){A().removeEventListener("mousemove",g),xM=xM.filter((function(e){return e!==g}))}function j(t){if(!sM.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!v.props.interactive||!oM(_,n)){if(Yk(v.props.triggerTarget||e).some((function(e){return oM(e,n)}))){if(sM.isTouch)return;if(v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else I("onClickOutside",[v,t]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),p=!0,setTimeout((function(){p=!1})),v.state.isMounted||U())}}}function R(){h=!0}function B(){h=!1}function P(){var e=A();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,$k),e.addEventListener("touchstart",B,$k),e.addEventListener("touchmove",R,$k)}function U(){var e=A();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,$k),e.removeEventListener("touchstart",B,$k),e.removeEventListener("touchmove",R,$k)}function H(e,t){var n=N().box;function r(e){e.target===n&&(iM(n,"remove",r),t())}if(0===e)return t();iM(n,"remove",s),iM(n,"add",r),s=r}function $(t,n,r){void 0===r&&(r=!1),Yk(v.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function V(){var e;D()&&($("touchstart",q,{passive:!0}),$("touchend",G,{passive:!0})),(e=v.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,q),e){case"mouseenter":$("mouseleave",G);break;case"focus":$(dM?"focusout":"blur",Y);break;case"focusin":$("focusout",Y)}}))}function W(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),m=[]}function q(e){var t,n=!1;if(v.state.isEnabled&&!Q(e)&&!p){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,F(),!v.state.isVisible&&qk(e,"MouseEvent")&&xM.forEach((function(t){return t(e)})),"click"===e.type&&(v.props.trigger.indexOf("mouseenter")<0||d)&&!1!==v.props.hideOnClick&&v.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!r&&te(e)}}function K(e){var t=e.target,n=S().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var r=X().concat(_).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,s=i.placement.split("-")[0],a=i.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,u="right"===s?a.left.x:0,d="left"===s?a.right.x:0,p=t.top-r+l>o,h=r-t.bottom-c>o,f=t.left-n+u>o,m=n-t.right-d>o;return p||h||f||m}))})(r,e)&&(z(),te(e))}}function G(e){Q(e)||v.props.trigger.indexOf("click")>=0&&d||(v.props.interactive?v.hideWithInteractivity(e):te(e))}function Y(e){v.props.trigger.indexOf("focusin")<0&&e.target!==S()||v.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function Q(e){return!!sM.isTouch&&D()!==e.type.indexOf("touch")>=0}function J(){Z();var t=v.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,s=t.moveTransition,l=C()?vM(_).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||S()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(C()){var n=N().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},u];C()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),v.popperInstance=zk(c,_,Object.assign({},n,{placement:r,onFirstUpdate:a,modifiers:d}))}function Z(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function X(){return Jk(_.querySelectorAll("[data-tippy-root]"))}function ee(e){v.clearDelayTimeouts(),e&&I("onTrigger",[v,e]),P();var t=O(!0),r=M(),i=r[0],o=r[1];sM.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout((function(){v.show()}),t):v.show()}function te(e){if(v.clearDelayTimeouts(),I("onUntrigger",[v,e]),v.state.isVisible){if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=O(!1);t?r=setTimeout((function(){v.state.isVisible&&v.hide()}),t):i=requestAnimationFrame((function(){v.hide()}))}}else U()}}function MM(e,t){void 0===t&&(t={});var n=pM.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",lM,$k),window.addEventListener("blur",uM);var r=Object.assign({},t,{plugins:n}),i=tM(e).reduce((function(e,t){var n=t&&kM(t,r);return n&&e.push(n),e}),[]);return eM(e)?i[0]:i}MM.defaultProps=pM,MM.setDefaultProps=function(e){Object.keys(e).forEach((function(t){pM[t]=e[t]}))},MM.currentInput=sM,Object.assign({},jE,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),MM.setDefaultProps({render:wM});class DM{constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:e,state:t,from:n,to:r})=>{const{doc:i,selection:o}=t,{empty:s}=o,a=!i.textBetween(n,r).length&&Ix(t.selection),l=this.element.contains(document.activeElement);return!(!e.hasFocus()&&!l||s||a||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=n,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=MM(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(e=>{this.blurHandler({event:e})})))}update(e,t){var n,r,i;const{state:o,composing:s}=e,{doc:a,selection:l}=o,c=t&&t.doc.eq(a)&&t.selection.eq(l);if(s||c)return;this.createTooltip();const{ranges:u}=l,d=Math.min(...u.map((e=>e.$from.pos))),p=Math.max(...u.map((e=>e.$to.pos)));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:o,oldState:t,from:d,to:p}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(i=this.tippyOptions)||void 0===i?void 0:i.getReferenceClientRect)||(()=>{if(o.selection instanceof Cn){const t=e.nodeDOM(d);if(t)return t.getBoundingClientRect()}return Zx(e,d,p)})}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const CM=e=>new $n({key:"string"==typeof e.pluginKey?new qn(e.pluginKey):e.pluginKey,view:t=>new DM({view:t,...e})});kx.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[CM({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class SM{constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:e,state:t})=>{const{selection:n}=t,{$anchor:r,empty:i}=n,o=1===r.depth,s=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(e.hasFocus()&&i&&o&&s&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=n,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=MM(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(e=>{this.blurHandler({event:e})})))}update(e,t){var n,r,i;const{state:o}=e,{doc:s,selection:a}=o,{from:l,to:c}=a;if(t&&t.doc.eq(s)&&t.selection.eq(a))return;this.createTooltip();(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:o,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(i=this.tippyOptions)||void 0===i?void 0:i.getReferenceClientRect)||(()=>Zx(e,l,c))}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}kx.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[(e={pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow},new $n({key:"string"==typeof e.pluginKey?new qn(e.pluginKey):e.pluginKey,view:t=>new SM({view:t,...e})}))]:[];var e}});const AM=e=>{const[t,i]=r(null);return s((()=>{if(!t)return;if(e.editor.isDestroyed)return;const{pluginKey:n="bubbleMenu",editor:r,tippyOptions:i={},shouldShow:o=null}=e,s=CM({pluginKey:n,editor:r,element:t,tippyOptions:i,shouldShow:o});return r.registerPlugin(s),()=>r.unregisterPlugin(n)}),[e.editor,t]),n.createElement("div",{ref:i,className:e.className,style:{visibility:"hidden"}},e.children)};class NM extends class extends class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach((e=>e.apply(this,t))),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((e=>e!==t)):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(e,t){const n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;const r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}(uE,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e){this.setOptions({editable:e}),this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const n=lx(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((e=>!e.key.startsWith(t)))});this.view.updateState(n)}createExtensionManager(){const e=[...this.options.enableCoreExtensions?Object.values(cE):[],...this.options.extensions].filter((e=>["extension","node","mark"].includes(null==e?void 0:e.type)));this.extensionManager=new _x(e,this)}createCommandManager(){this.commandManager=new tx({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=$x(this.options.content,this.schema,this.options.parseOptions),t=Fx(e,this.options.autofocus);this.view=new M_(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Un.create({doc:e,selection:t||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews();this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((e=>{var t;return null===(t=this.capturedTransaction)||void 0===t?void 0:t.step(e)})):void(this.capturedTransaction=e);const t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),i=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Kx(this.state,e)}isActive(e,t){const n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return Px(e,null,n)||Qx(e,null,n);const r=Ux(t,e.schema);return"node"===r?Px(e,t,n):"mark"===r&&Qx(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function(e,t){const n=Ct.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return function(e,t){return Mx(e,{from:0,to:e.content.size},t)}(this.state.doc,{blockSeparator:t,textSerializers:{...n,...Dx(this.schema)}})}get isEmpty(){return function(e){var t;const n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}{constructor(){super(...arguments),this.contentComponent=null}}const OM=({renderers:e})=>n.createElement(n.Fragment,null,Array.from(e).map((([e,t])=>fe.createPortal(t.reactElement,t.element,e))));class TM extends n.Component{constructor(e){super(e),this.editorContentRef=n.createRef(),this.state={renderers:new Map}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:e}=this.props;if(e&&e.options.element){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews()}}componentWillUnmount(){const{editor:e}=this.props;if(!e)return;if(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild)return;const t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){const{editor:e,...t}=this.props;return n.createElement(n.Fragment,null,n.createElement("div",{ref:this.editorContentRef,...t}),n.createElement(OM,{renderers:this.state.renderers}))}}const IM=n.memo(TM),LM=a({onDragStart:void 0}),FM=()=>l(LM),zM=e=>{const t=e.as||"div",{nodeViewContentRef:r}=FM();return n.createElement(t,{...e,ref:r,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...e.style}})},jM=n.forwardRef(((e,t)=>{const{onDragStart:r}=FM(),i=e.as||"div";return n.createElement(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})}));class RM{constructor(e,{editor:t,props:n={},as:r="div",className:i=""}){this.ref=null,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.render()}render(){const e=this.component,t=this.props;(function(e){return!("function"!=typeof e||!e.prototype||!e.prototype.isReactComponent)}(e)||function(e){var t;return!("object"!=typeof e||"Symbol(react.forward_ref)"!==(null===(t=e.$$typeof)||void 0===t?void 0:t.toString()))}(e))&&(t.ref=e=>{this.ref=e}),this.reactElement=n.createElement(e,{...t}),queueMicrotask((()=>{me((()=>{var e;(null===(e=this.editor)||void 0===e?void 0:e.contentComponent)&&this.editor.contentComponent.setState({renderers:this.editor.contentComponent.state.renderers.set(this.id,this)})}))}))}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){queueMicrotask((()=>{me((()=>{var e;if(null===(e=this.editor)||void 0===e?void 0:e.contentComponent){const{renderers:e}=this.editor.contentComponent.state;e.delete(this.id),this.editor.contentComponent.setState({renderers:e})}}))}))}}class BM extends class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,i,o,s,a;const{view:l}=this.editor,c=e.target,u=3===c.nodeType?null===(t=c.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(c))||!u)return;let d=0,p=0;if(this.dom!==u){const t=this.dom.getBoundingClientRect(),n=u.getBoundingClientRect(),a=null!==(r=e.offsetX)&&void 0!==r?r:null===(i=e.nativeEvent)||void 0===i?void 0:i.offsetX,l=null!==(o=e.offsetY)&&void 0!==o?o:null===(s=e.nativeEvent)||void 0===s?void 0:s.offsetY;d=n.x-t.x+a,p=n.y-t.y+l}null===(a=e.dataTransfer)||void 0===a||a.setDragImage(this.dom,d,p);const h=Cn.create(l.state.doc,this.getPos()),f=l.state.tr.setSelection(h);l.dispatch(f)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const n=e.target;if(!(this.dom.contains(n)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(n))))return!1;const r="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!r)return!0;const{isEditable:i}=this.editor,{isDragging:o}=this,s=!!this.node.type.spec.draggable,a=Cn.isSelectable(this.node),l="copy"===e.type,c="paste"===e.type,u="cut"===e.type,d="mousedown"===e.type,p=e.type.startsWith("drag");if(!s&&a&&p&&e.preventDefault(),s&&p&&!o)return e.preventDefault(),!1;if(s&&i&&!o&&d){const e=n.closest("[data-drag-handle]");e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener("dragend",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(()=>{this.isDragging=!1}),{once:!0}))}return!(o||r||l||c||u||d&&a)}ignoreMutation(e){if(!this.dom||!this.contentDOM)return!0;if("function"==typeof this.options.ignoreMutation)return this.options.ignoreMutation({mutation:e});if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===e.type)return!1;if(this.dom.contains(e.target)&&"childList"===e.type&&zx()&&this.editor.isFocused){if([...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every((e=>e.isContentEditable)))return!1}return this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command((({tr:t})=>{const n=this.getPos();return t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0}))}deleteNode(){const e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}const t=e=>{const t=this.component,r=this.onDragStart.bind(this);return n.createElement(LM.Provider,{value:{onDragStart:r,nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&e.appendChild(this.contentDOMElement)}}},n.createElement(t,{...e}))};t.displayName="ReactNodeView",this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit");let r=this.node.isInline?"span":"div";this.options.as&&(r=this.options.as);const{className:i=""}=this.options;this.renderer=new RM(t,{editor:this.editor,props:e,as:r,className:`node-${this.node.type.name} ${i}`.trim()})}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null===(e=this.renderer.element.firstElementChild)||void 0===e?void 0:e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}update(e,t){const n=e=>{this.renderer.updateProps(e)};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){const r=this.node,i=this.decorations;return this.node=e,this.decorations=t,this.options.update({oldNode:r,oldDecorations:i,newNode:e,newDecorations:t,updateProps:()=>n({node:e,decorations:t})})}return e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,n({node:e,decorations:t})),!0}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy(),this.contentDOMElement=null}}function PM(e,t){return n=>n.editor.contentComponent?new BM(e,n,t):{}}const UM=(e={},t=[])=>{const[n,i]=r(null),o=function(){const[,e]=r(0);return()=>e((e=>e+1))}();return s((()=>{let t=!0;const n=new NM(e);return i(n),n.on("transaction",(()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t&&o()}))}))})),()=>{n.destroy(),t=!1}}),t),n},HM=e=>{let{error:t,children:r}=e;const i=!Xo(t),o=_s({"neeto-editor-error":i});return n.createElement(n.Fragment,null,n.createElement("div",{className:o},r),i&&n.createElement("p",{className:"neeto-ui-input__error"},(()=>{if(!t)return null;let e;return be(String,t)?e=t:be(Array,t)?e=t[0]:be(Object,t)&&(e=t.message),Xo(e)?null:e})()))},$M=e=>{let{editor:t,isActive:r,children:i}=e;return r&&t?n.createElement(n.Fragment,null,i,n.createElement("p",{className:"neeto-editor-character-count","data-cy":"neeto-editor-character-count"},t.storage.characterCount.characters()," characters")):i},VM=e=>!!e&&(WM(e)||KM(e)||qM(e)),WM=e=>{const t=e.match(Jn);return t&&`https://www.youtube.com/embed/${t[5]}`},qM=e=>{const t=e.match(Zn);return t&&`https://player.vimeo.com/video/${t[4]}?h=${t[5]}`},KM=e=>{const t=e.match(Xn);return t&&`https://www.loom.com/embed/${t[4]}?t=${t[5]||""}`},GM=e=>{let{isEmbedModalOpen:t,setIsEmbedModalOpen:o,editor:s}=e;const[a,l]=r(""),[c,u]=r(!1),d=i(null),p=()=>{const e=VM(a);e?(s.chain().focus().setExternalVideo({src:e}).run(),l(""),o(!1)):u(!0)},h=()=>{l(""),u(!1),o(!1)};return n.createElement(D,{initialFocusRef:d,isOpen:t,onClose:h},n.createElement(D.Header,null,n.createElement(E,{style:"h2"},"Embed Video")),n.createElement(D.Body,{className:"space-y-2 ne-embed-modal"},n.createElement(_,{error:c&&"Please enter a valid URL",label:"Video URL:",ref:d,size:"medium",type:"text",value:a,onChange:e=>{VM(e.target.value)?(u(!1),l(e.target.value)):(u(!0),l(e.target.value))},onKeyDown:e=>{"Enter"===e.key?p():"Escape"===e.key&&h()}})),n.createElement(D.Footer,{className:"space-x-2"},n.createElement(x,{disabled:c||b(a),label:"Embed",onClick:p})))},YM=kx.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){return t.textBetween(0,t.content.size,void 0," ").length}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter((e=>""!==e)).length}},addProseMirrorPlugins(){return[new $n({key:new qn("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n)return!0;if(r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r)return!1;if(!e.getMeta("paste"))return!1;const o=e.selection.$head.pos,s=o-(i-n),a=o;e.deleteRange(s,a);return!(this.storage.characters({node:e.doc})>n)}})]}}),QM=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,JM=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,ZM=fE.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[dE({find:QM,type:this.type})]},addPasteRules(){return[gE({find:JM,type:this.type})]}}),XM=mE.create({name:"doc",topNode:!0,content:"block+"}),eD=kx.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new $n({key:new qn("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,o=[];if(!n||!r)return i_.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(i>=t&&i<=t+e.nodeSize-1))return!1;s+=1}));let a=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(i>=t&&i<=t+e.nodeSize-1))return!1;a+=1;if("deepest"===this.options.mode&&s-a>0||"shallowest"===this.options.mode&&a>1)return"deepest"===this.options.mode;o.push(t_.node(t,t+e.nodeSize,{class:this.options.className}))})),i_.create(e,o)}}})]}}),tD=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,nD=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,rD=fE.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[dE({find:tD,type:this.type})]},addPasteRules(){return[gE({find:nD,type:this.type})]}});function iD(e){this.j={},this.jr=[],this.jd=null,this.t=e}iD.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=oD();var i=cD(this,e);return i?(Object.assign(r.j,i.j),r.jr.append(i.jr),r.jr=i.jd,r.t=n||i.t):r.t=n,this.j[e]=r,r}};var oD=function(){return new iD},sD=function(e){return new iD(e)},aD=function(e,t,n){e.j[t]||(e.j[t]=n)},lD=function(e,t,n){e.jr.push([t,n])},cD=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var i=e.jr[r][0],o=e.jr[r][1];if(i.test(t))return o}return e.jd},uD=function(e,t,n){for(var r=0;r<t.length;r++)aD(e,t[r],n)},dD=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],i=t[n][1];aD(e,r,i)}},pD=function(e,t,n,r){for(var i,o=0,s=t.length;o<s&&(i=e.j[t[o]]);)e=i,o++;if(o>=s)return[];for(;o<s-1;)i=r(),aD(e,t[o],i),e=i,o++;aD(e,t[s-1],n)},hD="DOMAIN",fD="LOCALHOST",mD="TLD",gD="NUM",bD="PROTOCOL",yD="MAILTO",vD="WS",wD="NL",_D="OPENBRACE",xD="OPENBRACKET",ED="OPENANGLEBRACKET",kD="OPENPAREN",MD="CLOSEBRACE",DD="CLOSEBRACKET",CD="CLOSEANGLEBRACKET",SD="CLOSEPAREN",AD="AMPERSAND",ND="APOSTROPHE",OD="ASTERISK",TD="AT",ID="BACKSLASH",LD="BACKTICK",FD="CARET",zD="COLON",jD="COMMA",RD="DOLLAR",BD="DOT",PD="EQUALS",UD="EXCLAMATION",HD="HYPHEN",$D="PERCENT",VD="PIPE",WD="PLUS",qD="POUND",KD="QUERY",GD="QUOTE",YD="SEMI",QD="SLASH",JD="TILDE",ZD="UNDERSCORE",XD="SYM",eC=Object.freeze({__proto__:null,DOMAIN:hD,LOCALHOST:fD,TLD:mD,NUM:gD,PROTOCOL:bD,MAILTO:yD,WS:vD,NL:wD,OPENBRACE:_D,OPENBRACKET:xD,OPENANGLEBRACKET:ED,OPENPAREN:kD,CLOSEBRACE:MD,CLOSEBRACKET:DD,CLOSEANGLEBRACKET:CD,CLOSEPAREN:SD,AMPERSAND:AD,APOSTROPHE:ND,ASTERISK:OD,AT:TD,BACKSLASH:ID,BACKTICK:LD,CARET:FD,COLON:zD,COMMA:jD,DOLLAR:RD,DOT:BD,EQUALS:PD,EXCLAMATION:UD,HYPHEN:HD,PERCENT:$D,PIPE:VD,PLUS:WD,POUND:qD,QUERY:KD,QUOTE:GD,SEMI:YD,SLASH:QD,TILDE:JD,UNDERSCORE:ZD,SYM:XD}),tC="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),nC=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,rC=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,iC=/\uFE0F/,oC=/\d/,sC=/\s/;function aC(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=oD(),n=sD(gD),r=sD(hD),i=oD(),o=sD(vD),s=[[oC,r],[nC,r],[rC,r],[iC,r]],a=function(){var e=sD(hD);return e.j={"-":i},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};dD(t,[["'",sD(ND)],["{",sD(_D)],["[",sD(xD)],["<",sD(ED)],["(",sD(kD)],["}",sD(MD)],["]",sD(DD)],[">",sD(CD)],[")",sD(SD)],["&",sD(AD)],["*",sD(OD)],["@",sD(TD)],["`",sD(LD)],["^",sD(FD)],[":",sD(zD)],[",",sD(jD)],["$",sD(RD)],[".",sD(BD)],["=",sD(PD)],["!",sD(UD)],["-",sD(HD)],["%",sD($D)],["|",sD(VD)],["+",sD(WD)],["#",sD(qD)],["?",sD(KD)],['"',sD(GD)],["/",sD(QD)],[";",sD(YD)],["~",sD(JD)],["_",sD(ZD)],["\\",sD(ID)]]),aD(t,"\n",sD(wD)),lD(t,sC,o),aD(o,"\n",oD()),lD(o,sC,o);for(var c=0;c<tC.length;c++)pD(t,tC[c],l(mD),a);var u=a(),d=a(),p=a(),h=a();pD(t,"file",u,a),pD(t,"ftp",d,a),pD(t,"http",p,a),pD(t,"mailto",h,a);var f=a(),m=sD(bD),g=sD(yD);aD(d,"s",f),aD(d,":",m),aD(p,"s",f),aD(p,":",m),aD(u,":",m),aD(f,":",m),aD(h,":",g);for(var b=a(),y=0;y<e.length;y++)pD(t,e[y],b,a);return aD(b,":",m),pD(t,"localhost",l(fD),a),lD(t,oC,n),lD(t,nC,r),lD(t,rC,r),lD(t,iC,r),lD(n,oC,n),lD(n,nC,r),lD(n,rC,r),lD(n,iC,r),aD(n,"-",i),aD(r,"-",i),aD(i,"-",i),lD(r,oC,r),lD(r,nC,r),lD(r,rC,r),lD(r,iC,r),lD(i,oC,r),lD(i,nC,r),lD(i,rC,r),lD(i,iC,r),t.jd=sD(XD),t}var lC={defaultProtocol:"http",events:null,format:cC,formatHref:cC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function cC(e){return e}function uC(){}function dC(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var i in n)r[i]=n[i];r.constructor=t,t.prototype=r}(uC,n,t),n}uC.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lC.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var pC=dC("email",{isLink:!0}),hC=dC("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),fC=dC("text"),mC=dC("nl"),gC=dC("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lC.defaultProtocol,t=this.tk,n=!1,r=!1,i=[],o=0;t[o].t===bD;)n=!0,i.push(t[o].v),o++;for(;t[o].t===QD;)r=!0,i.push(t[o].v),o++;for(;o<t.length;o++)i.push(t[o].v);return i=i.join(""),n||r||(i="".concat(e,"://").concat(i)),i},hasProtocol:function(){return this.tk[0].t===bD}}),bC=Object.freeze({__proto__:null,MultiToken:uC,Base:uC,createTokenClass:dC,MailtoEmail:pC,Email:hC,Text:fC,Nl:mC,Url:gC});function yC(){var e=oD(),t=oD(),n=oD(),r=oD(),i=oD(),o=oD(),s=oD(),a=sD(gC),l=oD(),c=sD(gC),u=sD(gC),d=oD(),p=oD(),h=oD(),f=oD(),m=oD(),g=sD(gC),b=sD(gC),y=sD(gC),v=sD(gC),w=oD(),_=oD(),x=oD(),E=oD(),k=oD(),M=oD(),D=sD(hC),C=oD(),S=sD(hC),A=sD(pC),N=oD(),O=oD(),T=oD(),I=oD(),L=sD(mC);aD(e,wD,L),aD(e,bD,t),aD(e,yD,n),aD(t,QD,r),aD(r,QD,i),aD(e,mD,o),aD(e,hD,o),aD(e,fD,a),aD(e,gD,o),aD(i,mD,u),aD(i,hD,u),aD(i,gD,u),aD(i,fD,u),aD(o,BD,s),aD(k,BD,M),aD(s,mD,a),aD(s,hD,o),aD(s,gD,o),aD(s,fD,o),aD(M,mD,D),aD(M,hD,k),aD(M,gD,k),aD(M,fD,k),aD(a,BD,s),aD(D,BD,M),aD(a,zD,l),aD(a,QD,u),aD(l,gD,c),aD(c,QD,u),aD(D,zD,C),aD(C,gD,S);var F=[AD,OD,TD,ID,LD,FD,RD,hD,PD,HD,fD,gD,$D,VD,WD,qD,bD,QD,XD,JD,mD,ZD],z=[ND,CD,MD,DD,SD,zD,jD,BD,UD,ED,_D,xD,kD,KD,GD,YD];aD(u,_D,p),aD(u,xD,h),aD(u,ED,f),aD(u,kD,m),aD(d,_D,p),aD(d,xD,h),aD(d,ED,f),aD(d,kD,m),aD(p,MD,u),aD(h,DD,u),aD(f,CD,u),aD(m,SD,u),aD(g,MD,u),aD(b,DD,u),aD(y,CD,u),aD(v,SD,u),aD(w,MD,u),aD(_,DD,u),aD(x,CD,u),aD(E,SD,u),uD(p,F,g),uD(h,F,b),uD(f,F,y),uD(m,F,v),uD(p,z,w),uD(h,z,_),uD(f,z,x),uD(m,z,E),uD(g,F,g),uD(b,F,b),uD(y,F,y),uD(v,F,v),uD(g,z,g),uD(b,z,b),uD(y,z,y),uD(v,z,v),uD(w,F,g),uD(_,F,b),uD(x,F,y),uD(E,F,v),uD(w,z,w),uD(_,z,_),uD(x,z,x),uD(E,z,E),uD(u,F,u),uD(d,F,u),uD(u,z,d),uD(d,z,d),aD(n,mD,A),aD(n,hD,A),aD(n,gD,A),aD(n,fD,A),uD(A,F,A),uD(A,z,N),uD(N,F,A),uD(N,z,N);var j=[AD,ND,OD,ID,LD,FD,MD,RD,hD,PD,HD,gD,_D,$D,VD,WD,qD,KD,QD,XD,JD,mD,ZD];return uD(o,j,O),aD(o,TD,T),uD(a,j,O),aD(a,TD,T),uD(s,j,O),uD(O,j,O),aD(O,TD,T),aD(O,BD,I),uD(I,j,O),aD(T,mD,k),aD(T,hD,k),aD(T,gD,k),aD(T,fD,D),e}function vC(e,t,n){var r=n[0].s,i=n[n.length-1].e;return new e(t.substr(r,i-r),n)}var wC="undefined"!=typeof console&&console&&console.warn||function(){},_C={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function xC(e){if(_C.initialized&&wC('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");_C.customProtocols.push(e)}function EC(e){return _C.initialized||function(){_C.scanner={start:aC(_C.customProtocols),tokens:eC},_C.parser={start:yC(),tokens:bC};for(var e={createTokenClass:dC},t=0;t<_C.pluginQueue.length;t++)_C.pluginQueue[t][1]({scanner:_C.scanner,parser:_C.parser,utils:e});_C.initialized=!0}(),function(e,t,n){for(var r=n.length,i=0,o=[],s=[];i<r;){for(var a=e,l=null,c=null,u=0,d=null,p=-1;i<r&&!(l=cD(a,n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||cD(a,n[i].t));)l=null,(a=c).accepts()?(p=0,d=a):p>=0&&p++,i++,u++;if(p<0)for(var h=i-u;h<i;h++)s.push(n[h]);else{s.length>0&&(o.push(vC(fC,t,s)),s=[]),i-=p,u-=p;var f=d.t,m=n.slice(i-u,i);o.push(vC(f,t,m))}}return s.length>0&&o.push(vC(fC,t,s)),o}(_C.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var i=e.charCodeAt(r),o=void 0,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,i=[],o=0,s=0;s<r;){for(var a=e,l=null,c=0,u=null,d=-1,p=-1;s<r&&(l=cD(a,n[s]));)(a=l).accepts()?(d=0,p=0,u=a):d>=0&&(d+=n[s].length,p++),c+=n[s].length,o+=n[s].length,s++;o-=d,s-=p,c-=d,i.push({t:u.t,v:t.substr(o-c,c),s:o-c,e:o})}return i}(_C.scanner.start,e))}function kC(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=EC(e),r=[],i=0;i<n.length;i++){var o=n[i];!o.isLink||t&&o.t!==t||r.push(o.toObject())}return r}function MC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=EC(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function DC(e){return new $n({key:new qn("autolink"),appendTransaction:(t,n,r)=>{const i=t.some((e=>e.docChanged))&&!n.doc.eq(r.doc),o=t.some((e=>e.getMeta("preventAutolink")));if(!i||o)return;const{tr:s}=r,a=function(e,t){const n=new vn(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),{mapping:l}=a,c=function(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,i)=>{const o=[];if(e.ranges.length)e.forEach(((e,t)=>{o.push({from:e,to:t})}));else{const{from:e,to:t}=n[i];if(void 0===e||void 0===t)return;o.push({from:e,to:t})}o.forEach((({from:e,to:n})=>{const o=t.slice(i).map(e,-1),s=t.slice(i).map(n),a=t.invert().map(o,-1),l=t.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),Gx(r)}(a);return c.forEach((({oldRange:t,newRange:i})=>{Yx(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const i=Yx(l.map(t.from),l.map(t.to),r.doc).filter((t=>t.mark.type===e.type));if(!i.length)return;const o=i[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=r.doc.textBetween(o.from,o.to,void 0," "),u=MC(a),d=MC(c);u&&!d&&s.removeMark(o.from,o.to,e.type)}));const o=function(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}(r.doc,i,(e=>e.isTextblock));let a,c;if(o.length>1?(a=o[0],c=r.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):o.length&&r.doc.textBetween(i.from,i.to," "," ").endsWith(" ")&&(a=o[0],c=r.doc.textBetween(a.pos,i.to,void 0," ")),a&&c){const t=c.split(" ").filter((e=>""!==e));if(t.length<=0)return!1;const n=t[t.length-1],r=a.pos+c.lastIndexOf(n);if(!n)return!1;kC(n).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:r+e.start+1,to:r+e.end+1}))).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}})),s.steps.length?s:void 0}})}const CC=fE.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(xC)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[gE({find:e=>kC(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(DC({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new $n({key:new qn("handleClickLink"),props:{handleClick:(e,n,r)=>{var i;const o=Kx(e.state,t.type.name);return!(!(null===(i=r.target)||void 0===i?void 0:i.closest("a"))||!o.href||(window.open(o.href,o.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new $n({key:new qn("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach((e=>{a+=e.textContent}));const l=kC(a).find((e=>e.isLink&&e.value===a));return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),SC=fE.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),AC=/^\s*>\s$/,NC=mE.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[hE({find:AC,type:this.type})]}}),OC=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,TC=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,IC=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,LC=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,FC=fE.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[dE({find:OC,type:this.type}),dE({find:IC,type:this.type})]},addPasteRules(){return[gE({find:TC,type:this.type}),gE({find:LC,type:this.type})]}}),zC=/^\s*([-+*])\s$/,jC=mE.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[hE({find:zC,type:this.type})]}}),RC=/^```([a-z]+)?[\s\n]$/,BC=/^~~~([a-z]+)?[\s\n]$/,PC=mE.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",sx(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&e.chain().command((({tr:e})=>(e.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type)return!1;if(!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();if(void 0===s)return!1;return!r.nodeAt(s)&&e.commands.exitCode()}}},addInputRules(){return[pE({find:RC,type:this.type,getAttributes:e=>({language:e[1]})}),pE({find:BC,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new $n({key:new qn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(Mn.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});function UC(e={}){return new $n({view:t=>new HC(t,e)})}class HC{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?t.bottom:t.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,r,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!i||i==document.body&&"static"==getComputedStyle(i).position)n=-pageXOffset,r=-pageYOffset;else{let e=i.getBoundingClientRect();n=e.left-i.scrollLeft,r=e.top-i.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-r+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=on(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const $C=kx.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[UC(this.options)]}});class VC extends _n{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return VC.valid(n)?new VC(n):_n.near(n)}content(){return Ne.empty}eq(e){return e instanceof VC&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new VC(e.resolve(t.pos))}getBookmark(){return new WC(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&VC.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(VC.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!Cn.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=o,r+=t;let s=e.doc.resolve(r);if(VC.valid(s))return s}return null}}}VC.prototype.visible=!1,VC.findFrom=VC.findGapCursorFrom,_n.jsonID("gapcursor",VC);class WC{constructor(e){this.pos=e}map(e){return new WC(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return VC.valid(t)?new VC(t):_n.near(t)}}const qC=H_({ArrowLeft:KC("horiz",-1),ArrowRight:KC("horiz",1),ArrowUp:KC("vert",-1),ArrowDown:KC("vert",1)});function KC(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let o=e.selection,s=t>0?o.$to:o.$from,a=o.empty;if(o instanceof Mn){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=VC.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new VC(l))),!0)}}function GC(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!VC.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&Cn.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new VC(r))),!0)}function YC(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof VC))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=ke.empty;for(let e=r.length-1;e>=0;e--)i=ke.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new Ne(i,0,0));return o.setSelection(Mn.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function QC(e){if(!(e.selection instanceof VC))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",i_.create(e.doc,[t_.widget(e.selection.head,t,{key:"gapcursor"})])}const JC=kx.create({name:"gapCursor",addProseMirrorPlugins:()=>[new $n({props:{decorations:QC,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&VC.valid(n)?new VC(n):null,handleClick:GC,handleKeyDown:qC,handleDOMEvents:{beforeinput:YC}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=cx(nx(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),ZC=mE.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",sx(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&o){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),XC=mE.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,sx(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>pE({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var eS=200,tS=function(){};tS.prototype.append=function(e){return e.length?(e=tS.from(e),!this.length&&e||e.length<eS&&this.leafAppend(e)||this.length<eS&&e.leafPrepend(this)||this.appendInner(e)):this},tS.prototype.prepend=function(e){return e.length?tS.from(e).append(this):this},tS.prototype.appendInner=function(e){return new rS(this,e)},tS.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?tS.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},tS.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},tS.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},tS.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},tS.from=function(e){return e instanceof tS?e:e&&e.length?new nS(e):tS.empty};var nS=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=eS)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=eS)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(tS);tS.empty=new nS([]);var rS=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;return!(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r))&&(!(n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;return!(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i))&&(!(n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(tS),iS=tS;const oS=500;class sS{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(i,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new aS(e.map));let t,i=e.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new aS(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(r)):e.selection,s=new sS(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(e,t,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new aS(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?i.pop():s=s.slice(0,s.length-1)),i.push(u),t&&(o++,t=void 0),r||(a=u)}let l=o-n.depth;return l>cS&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),o-=l),new sS(s.append(i),o)}remapping(e,t){let n=new Pt;return this.items.forEach(((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new sS(this.items.append(e.map((e=>new aS(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new aS(l,o,c))}else n.push(new aS(l))}),r);let l=[];for(let e=t;e<o;e++)l.push(new aS(i.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new sS(c,s);return u.emptyItemCount()>oS&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach(((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l,c=new aS(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new sS(iS.from(r.reverse()),i)}}sS.empty=new sS(iS.empty,0);class aS{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new aS(t.getMap().invert(),t,this.selection)}}}class lS{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const cS=20;function uS(e){let t=[];return e.forEach(((e,n,r,i)=>t.push(r,i))),t}function dS(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function pS(e,t,n,r){let i=mS(t),o=gS.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),c=new lS(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(gS,{redo:r,historyState:c}).scrollIntoView())}let hS=!1,fS=null;function mS(e){let t=e.plugins;if(fS!=t){hS=!1,fS=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){hS=!0;break}}return hS}const gS=new qn("history"),bS=new qn("closeHistory");function yS(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new $n({key:gS,state:{init:()=>new lS(sS.empty,sS.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let i,o=n.getMeta(gS);if(o)return o.historyState;n.getMeta(bS)&&(e=new lS(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(gS))return s.getMeta(gS).redo?new lS(e.done.addTransform(n,void 0,r,mS(t)),e.undone,uS(n.mapping.maps[n.steps.length-1]),e.prevTime):new lS(e.done,e.undone.addTransform(n,void 0,r,mS(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new lS(e.done.rebased(n,i),e.undone.rebased(n,i),dS(e.prevRanges,n.mapping),e.prevTime):new lS(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),dS(e.prevRanges,n.mapping),e.prevTime);{let i=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)})),n}(n,e.prevRanges)),o=s?dS(e.prevRanges,n.mapping):uS(n.mapping.maps[n.steps.length-1]);return new lS(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,mS(t)),sS.empty,o,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?vS:"historyRedo"==n?wS:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const vS=(e,t)=>{let n=gS.getState(e);return!(!n||0==n.done.eventCount)&&(t&&pS(n,e,t,!1),!0)},wS=(e,t)=>{let n=gS.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&pS(n,e,t,!0),!0)},_S=kx.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>vS(e,t),redo:()=>({state:e,dispatch:t})=>wS(e,t)}),addProseMirrorPlugins(){return[yS(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),xS=mE.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",sx(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e})=>e().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)e.setSelection(Mn.create(e.doc,t.pos));else{const i=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(e.insert(r,i),e.setSelection(Mn.create(e.doc,r)))}e.scrollIntoView()}return!0})).run()}},addInputRules(){return[(e={find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type},new mx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=cx(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;if(r[1]){let t=s+r[0].lastIndexOf(r[1]);t>a?t=a:a=t+r[1].length;const n=r[0][r[0].length-1];o.insertText(n,s+r[0].length-1),o.replaceWith(t,a,e.type.create(i))}else r[0]&&o.replaceWith(s,a,e.type.create(i))}}))];var e}}),ES=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,kS=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,MS=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,DS=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,CS=fE.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[dE({find:ES,type:this.type}),dE({find:MS,type:this.type})]},addPasteRules(){return[gE({find:kS,type:this.type}),gE({find:DS,type:this.type})]}}),SS=mE.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",sx(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),AS=/^(\d+)\.\s$/,NS=mE.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",sx(this.options.HTMLAttributes,n),0]:["ol",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[hE({find:AS,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})]}}),OS=mE.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),TS=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,IS=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,LS=fE.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[dE({find:TS,type:this.type})]},addPasteRules(){return[gE({find:IS,type:this.type})]}}),FS=mE.create({name:"text",group:"inline"}),zS=kx.create({name:"starterKit",addExtensions(){var e,t,n,r,i,o,s,a,l,c,u,d,p,h,f,m,g,b;const y=[];return!1!==this.options.blockquote&&y.push(NC.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&y.push(FC.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&y.push(jC.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&y.push(ZM.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&y.push(PC.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&y.push(XM.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&y.push($C.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&y.push(JC.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&y.push(ZC.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&y.push(XC.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&y.push(_S.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&y.push(xS.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&y.push(CS.configure(null===(p=this.options)||void 0===p?void 0:p.italic)),!1!==this.options.listItem&&y.push(SS.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&y.push(NS.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&y.push(OS.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&y.push(LS.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&y.push(FS.configure(null===(b=this.options)||void 0===b?void 0:b.text)),y}});var jS={exports:{}};function RS(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||RS(n)})),e}jS.exports=RS,jS.exports.default=RS;class BS{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function PS(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function US(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const HS="</span>",$S=e=>!!e.scope||e.sublanguage&&e.language;class VS{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=PS(e)}openNode(e){if(!$S(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){$S(e)&&(this.buffer+=HS)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const WS=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class qS{constructor(){this.rootNode=WS(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=WS({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{qS._collapse(e)})))}}class KS extends qS{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new VS(this,this.options).value()}finalize(){return!0}}function GS(e){return e?"string"==typeof e?e:e.source:null}function YS(e){return ZS("(?=",e,")")}function QS(e){return ZS("(?:",e,")*")}function JS(e){return ZS("(?:",e,")?")}function ZS(...e){const t=e.map((e=>GS(e))).join("");return t}function XS(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>GS(e))).join("|")+")";return n}function eA(e){return new RegExp(e.toString()+"|").exec("").length-1}const tA=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function nA(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=GS(e),i="";for(;r.length>0;){const e=tA.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}const rA="[a-zA-Z]\\w*",iA="[a-zA-Z_]\\w*",oA="\\b\\d+(\\.\\d+)?",sA="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",aA="\\b(0b[01]+)",lA={begin:"\\\\[\\s\\S]",relevance:0},cA={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[lA]},uA={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[lA]},dA=function(e,t,n={}){const r=US({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=XS("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ZS(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},pA=dA("//","$"),hA=dA("/\\*","\\*/"),fA=dA("#","$"),mA={scope:"number",begin:oA,relevance:0},gA={scope:"number",begin:sA,relevance:0},bA={scope:"number",begin:aA,relevance:0},yA={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[lA,{begin:/\[/,end:/\]/,relevance:0,contains:[lA]}]}]},vA={scope:"title",begin:rA,relevance:0},wA={scope:"title",begin:iA,relevance:0},_A={begin:"\\.\\s*"+iA,relevance:0};var xA=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:rA,UNDERSCORE_IDENT_RE:iA,NUMBER_RE:oA,C_NUMBER_RE:sA,BINARY_NUMBER_RE:aA,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ZS(t,/.*\b/,e.binary,/\b.*/)),US({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:lA,APOS_STRING_MODE:cA,QUOTE_STRING_MODE:uA,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:dA,C_LINE_COMMENT_MODE:pA,C_BLOCK_COMMENT_MODE:hA,HASH_COMMENT_MODE:fA,NUMBER_MODE:mA,C_NUMBER_MODE:gA,BINARY_NUMBER_MODE:bA,REGEXP_MODE:yA,TITLE_MODE:vA,UNDERSCORE_TITLE_MODE:wA,METHOD_GUARD:_A,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function EA(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function kA(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function MA(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=EA,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function DA(e,t){Array.isArray(e.illegal)&&(e.illegal=XS(...e.illegal))}function CA(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function SA(e,t){void 0===e.relevance&&(e.relevance=1)}const AA=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=ZS(n.beforeMatch,YS(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},NA=["of","and","for","in","not","or","if","then","parent","list","value"],OA="keyword";function TA(e,t,n=OA){const r=Object.create(null);return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,TA(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,IA(n[0],n[1])]}))}}function IA(e,t){return t?Number(t):function(e){return NA.includes(e.toLowerCase())}(e)?0:1}const LA={},FA=e=>{console.error(e)},zA=(e,...t)=>{console.log(`WARN: ${e}`,...t)},jA=(e,t)=>{LA[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),LA[`${e}/${t}`]=!0)},RA=new Error;function BA(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+r]=i[e],o[e+r]=!0,r+=eA(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function PA(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw FA("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),RA;if("object"!=typeof e.beginScope||null===e.beginScope)throw FA("beginScope must be object"),RA;BA(e,e.begin,{key:"beginScope"}),e.begin=nA(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw FA("skip, excludeEnd, returnEnd not compatible with endScope: {}"),RA;if("object"!=typeof e.endScope||null===e.endScope)throw FA("endScope must be object"),RA;BA(e,e.end,{key:"endScope"}),e.end=nA(e.end,{joinWith:""})}}(e)}function UA(e){function t(t,n){return new RegExp(GS(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=eA(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(nA(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=US(e.classNameAliases||{}),function n(i,o){const s=i;if(i.isCompiled)return s;[kA,CA,PA,AA].forEach((e=>e(i,o))),e.compilerExtensions.forEach((e=>e(i,o))),i.__beforeBegin=null,[MA,DA,SA].forEach((e=>e(i,o))),i.isCompiled=!0;let a=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),a=i.keywords.$pattern,delete i.keywords.$pattern),a=a||/\w+/,i.keywords&&(i.keywords=TA(i.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(i.begin||(i.begin=/\B|\b/),s.beginRe=t(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=t(s.end)),s.terminatorEnd=GS(s.end)||"",i.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(s.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return US(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(HA(e))return US(e,{starts:e.starts?US(e.starts):null});if(Object.isFrozen(e))return US(e);return e}("self"===e?i:e)}))),i.contains.forEach((function(e){n(e,s)})),i.starts&&n(i.starts,o),s.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function HA(e){return!!e&&(e.endsWithParent||HA(e.starts))}var $A="11.6.0";class VA extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const WA=PS,qA=US,KA=Symbol("nomatch"),GA=7;var YA=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:KS};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let r="",i="";"object"==typeof t?(r=e,n=t.ignoreIllegals,i=t.language):(jA("10.7.0","highlight(lang, code, ...args) has been deprecated."),jA("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t),void 0===n&&(n=!0);const o={code:r,language:i};y("before:highlight",o);const s=o.result?o.result:u(o.language,o.code,n);return s.code=o.code,y("after:highlight",s),s}function u(e,n,r,s){const l=Object.create(null);function c(){if(!k.keywords)return void D.addText(C);let e=0;k.keywordPatternRe.lastIndex=0;let t=k.keywordPatternRe.exec(C),n="";for(;t;){n+=C.substring(e,t.index);const i=_.case_insensitive?t[0].toLowerCase():t[0],o=(r=i,k.keywords[r]);if(o){const[e,r]=o;if(D.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=GA&&(S+=r),e.startsWith("_"))n+=t[0];else{const n=_.classNameAliases[e]||e;D.addKeyword(t[0],n)}}else n+=t[0];e=k.keywordPatternRe.lastIndex,t=k.keywordPatternRe.exec(C)}var r;n+=C.substring(e),D.addText(n)}function p(){null!=k.subLanguage?function(){if(""===C)return;let e=null;if("string"==typeof k.subLanguage){if(!t[k.subLanguage])return void D.addText(C);e=u(k.subLanguage,C,!0,M[k.subLanguage]),M[k.subLanguage]=e._top}else e=d(C,k.subLanguage.length?k.subLanguage:null);k.relevance>0&&(S+=e.relevance),D.addSublanguage(e._emitter,e.language)}():c(),C=""}function h(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=_.classNameAliases[e[n]]||e[n],i=t[n];r?D.addKeyword(i,r):(C=i,c(),C=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&D.openNode(_.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(D.addKeyword(C,_.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),C=""):e.beginScope._multi&&(h(e.beginScope,t),C="")),k=Object.create(e,{parent:{value:k}}),k}function g(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new BS(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===k.matcher.regexIndex?(C+=e[0],1):(O=!0,0)}function y(e){const t=e[0],r=n.substring(e.index),i=g(k,e,r);if(!i)return KA;const o=k;k.endScope&&k.endScope._wrap?(p(),D.addKeyword(t,k.endScope._wrap)):k.endScope&&k.endScope._multi?(p(),h(k.endScope,e)):o.skip?C+=t:(o.returnEnd||o.excludeEnd||(C+=t),p(),o.excludeEnd&&(C=t));do{k.scope&&D.closeNode(),k.skip||k.subLanguage||(S+=k.relevance),k=k.parent}while(k!==i.parent);return i.starts&&f(i.starts,e),o.returnEnd?0:t.length}let v={};function w(t,o){const s=o&&o[0];if(C+=t,null==s)return p(),0;if("begin"===v.type&&"end"===o.type&&v.index===o.index&&""===s){if(C+=n.slice(o.index,o.index+1),!i){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=v.rule,t}return 1}if(v=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new BS(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return b(t);return n.skip?C+=t:(n.excludeBegin&&(C+=t),p(),n.returnBegin||n.excludeBegin||(C=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(k.scope||"<unnamed>")+'"');throw e.mode=k,e}if("end"===o.type){const e=y(o);if(e!==KA)return e}if("illegal"===o.type&&""===s)return 1;if(N>1e5&&N>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return C+=s,s.length}const _=m(e);if(!_)throw FA(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const x=UA(_);let E="",k=s||x;const M={},D=new a.__emitter(a);!function(){const e=[];for(let t=k;t!==_;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>D.openNode(e)))}();let C="",S=0,A=0,N=0,O=!1;try{for(k.matcher.considerAll();;){N++,O?O=!1:k.matcher.considerAll(),k.matcher.lastIndex=A;const e=k.matcher.exec(n);if(!e)break;const t=w(n.substring(A,e.index),e);A=e.index+t}return w(n.substring(A)),D.closeAllNodes(),D.finalize(),E=D.toHTML(),{language:e,value:E,relevance:S,illegal:!1,_emitter:D,_top:k}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:WA(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:A,context:n.slice(A-100,A+100),mode:t.mode,resultSoFar:E},_emitter:D};if(i)return{language:e,value:WA(n),illegal:!1,relevance:0,errorRaised:t,_emitter:D,_top:k};throw t}}function d(e,n){n=n||a.languages||Object.keys(t);const r=function(e){const t={value:WA(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),i=n.filter(m).filter(b).map((t=>u(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(m(e.language).supersetOf===t.language)return 1;if(m(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=o,d=l;return d.secondBest=c,d}function p(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=a.languageDetectRe.exec(t);if(n){const t=m(n[1]);return t||(zA(o.replace("{}",n[1])),zA("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||m(e)))}(e);if(l(r))return;if(y("before:highlightElement",{el:e,language:r}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new VA("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,s=r?c(i,{language:r,ignoreIllegals:!0}):d(i);e.innerHTML=s.value,function(e,t,r){const i=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,r,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),y("after:highlightElement",{el:e,result:s,text:i})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(p)}function m(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=m(e);return t&&!t.disableAutodetect}function y(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&f()}),!1),Object.assign(e,{highlight:c,highlightAuto:d,highlightAll:f,highlightElement:p,highlightBlock:function(e){return jA("10.7.0","highlightBlock will be removed entirely in v12.0"),jA("10.7.0","Please use highlightElement now."),p(e)},configure:function(e){a=qA(a,e)},initHighlighting:()=>{f(),jA("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),jA("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(FA("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;FA(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&g(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:m,registerAliases:g,autoDetection:b,inherit:qA,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)}}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=$A,e.regex={concat:ZS,lookahead:YS,either:XS,optional:JS,anyNumberOfTimes:QS};for(const e in xA)"object"==typeof xA[e]&&jS.exports(xA[e]);return Object.assign(e,xA),e}({}),QA=YA;YA.HighlightJS=YA,YA.default=YA;var JA=QA;function ZA(e,t=[]){return e.map((e=>{const n=[...t,...e.properties?e.properties.className:[]];return e.children?ZA(e.children,n):{text:e.value,classes:n}})).flat()}function XA(e){return e.value||e.children||[]}function eN({doc:e,name:t,lowlight:n,defaultLanguage:r}){const i=[];return Vx(e,(e=>e.type.name===t)).forEach((e=>{let t=e.pos+1;const o=e.node.attrs.language||r,s=n.listLanguages();var a;ZA(o&&(s.includes(o)||(a=o,Boolean(JA.getLanguage(a))))?XA(n.highlight(o,e.node.textContent)):XA(n.highlightAuto(e.node.textContent))).forEach((e=>{const n=t+e.text.length;if(e.classes.length){const r=t_.inline(t,n,{class:e.classes.join(" ")});i.push(r)}t=n}))})),i_.create(e,i)}function tN({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every((e=>"function"==typeof t[e])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new $n({key:new qn("lowlight"),state:{init:(r,{doc:i})=>eN({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(r,i,o,s)=>{const a=o.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=Vx(o.doc,(t=>t.type.name===e)),u=Vx(s.doc,(t=>t.type.name===e));return r.docChanged&&([a,l].includes(e)||u.length!==c.length||r.steps.some((e=>void 0!==e.from&&void 0!==e.to&&c.some((t=>t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to)))))?eN({doc:r.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(r.mapping,r.doc)}},props:{decorations:e=>r.getState(e)}});return r}const nN=PC.extend({addOptions(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),lowlight:{},defaultLanguage:null}},addProseMirrorPlugins(){var e;return[...(null===(e=this.parent)||void 0===e?void 0:e.call(this))||[],tN({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),rN=()=>n.createElement(jM,{"data-cy":"neeto-editor-code-block"},n.createElement("pre",null,n.createElement(zM,{as:"code"})));var iN=nN.extend({addNodeView:()=>new PM(rN)}).configure({lowlight:Wo}),oN=kx.create({name:"paste-unformatted",addCommands:()=>({pasteUnformatted:()=>async e=>{let{editor:t}=e;const n=await navigator.clipboard.readText();t.commands.insertContent(n)}})}),sN=mE.create({name:"external-video",addOptions:()=>({inline:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},title:{default:null},frameborder:{default:"0"},allow:{default:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"},allowfullscreen:{default:"allowfullscreen"}}),parseHTML:()=>[{tag:"iframe[src]"}],renderHTML(e){let{HTMLAttributes:t}=e;return["iframe",sx(this.options.HTMLAttributes,{...t,class:"video-wrapper"})]},addCommands(){return{setExternalVideo:e=>t=>{let{commands:n}=t;return n.insertContent({type:this.name,attrs:e})}}},addPasteRules:()=>[new yx({find:er,handler:e=>{let{state:t,range:n,match:r}=e;t.tr.delete(n.from,n.to),t.tr.setSelection(Mn.create(t.doc,n.from+1));const i=VM(r[0]);if(i){const e=t.schema.nodes["external-video"].create({src:i});t.tr.insert(n.from,e)}}})]});const aN=new qn("suggestion");function lN({pluginKey:e=aN,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let p;const h=null==u?void 0:u(),f=new $n({key:e,view(){return{update:async(e,n)=>{var r,i,o,s,a,u,d;const f=null===(r=this.key)||void 0===r?void 0:r.getState(n),m=null===(i=this.key)||void 0===i?void 0:i.getState(e.state),g=f.active&&m.active&&f.range.from!==m.range.from,b=!f.active&&m.active,y=f.active&&!m.active,v=b||g,w=!b&&!y&&f.query!==m.query&&!g,_=y||g;if(!v&&!w&&!_)return;const x=_&&!v?f:m,E=e.dom.querySelector(`[data-decoration-id="${x.decorationId}"]`);p={editor:t,range:x.range,query:x.query,text:x.text,items:[],command:e=>{l({editor:t,range:x.range,props:e})},decorationNode:E,clientRect:E?()=>{var n;const{decorationId:r}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),i=e.dom.querySelector(`[data-decoration-id="${r}"]`);return(null==i?void 0:i.getBoundingClientRect())||null}:null},v&&(null===(o=null==h?void 0:h.onBeforeStart)||void 0===o||o.call(h,p)),w&&(null===(s=null==h?void 0:h.onBeforeUpdate)||void 0===s||s.call(h,p)),(w||v)&&(p.items=await c({editor:t,query:x.query})),_&&(null===(a=null==h?void 0:h.onExit)||void 0===a||a.call(h,p)),w&&(null===(u=null==h?void 0:h.onUpdate)||void 0===u||u.call(h,p)),v&&(null===(d=null==h?void 0:h.onStart)||void 0===d||d.call(h,p))},destroy:()=>{var e;p&&(null===(e=null==h?void 0:h.onExit)||void 0===e||e.call(h,p))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,s,a,l){const{isEditable:c}=t,{composing:u}=t.view,{selection:p}=e,{empty:h,from:f}=p,m={...s};if(m.composing=u,c&&(h||t.view.composing)){!(f<s.range.from||f>s.range.to)||u||s.composing||(m.active=!1);const e=function(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:s}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=r?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),d=(null===(t=s.nodeBefore)||void 0===t?void 0:t.isText)&&s.nodeBefore.text;if(!d)return null;const p=s.pos-d.length,h=Array.from(d.matchAll(u)).pop();if(!h||void 0===h.input||void 0===h.index)return null;const f=h.input.slice(Math.max(0,h.index-1),h.index),m=new RegExp(`^[${null==i?void 0:i.join("")}\0]?$`).test(f);if(null!==i&&!m)return null;const g=p+h.index;let b=g+h[0].length;return r&&l.test(d.slice(b-1,b+1))&&(h[0]+=" ",b+=1),g<s.pos&&b>=s.pos?{range:{from:g,to:b},query:h[0].slice(n.length),text:h[0]}:null}({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:p.$from}),a=`id_${Math.floor(4294967295*Math.random())}`;e&&d({editor:t,state:l,range:e.range})?(m.active=!0,m.decorationId=s.decorationId?s.decorationId:a,m.range=e.range,m.query=e.query,m.text=e.text):m.active=!1}else m.active=!1;return m.active||(m.decorationId=null,m.range={from:0,to:0},m.query=null,m.text=null),m}},props:{handleKeyDown(e,t){var n;const{active:r,range:i}=f.getState(e.state);return r&&(null===(n=null==h?void 0:h.onKeyDown)||void 0===n?void 0:n.call(h,{view:e,event:t,range:i}))||!1},decorations(e){const{active:t,range:n,decorationId:r}=f.getState(e);return t?i_.create(e.doc,[t_.inline(n.from,n.to,{nodeName:s,class:a,"data-decoration-id":r})]):null}}});return f}function cN(e){return e&&e.__esModule?e.default:e}function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dN,pN,hN,fN,mN,gN,bN={},yN=[],vN=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function wN(e,t){for(var n in t)e[n]=t[n];return e}function _N(e){var t=e.parentNode;t&&t.removeChild(e)}function xN(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?dN.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return EN(e,s,r,i,null)}function EN(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++hN:i};return null==i&&null!=pN.vnode&&pN.vnode(o),o}function kN(e){return e.children}function MN(e,t){this.props=e,this.context=t}function DN(e,t){if(null==t)return e.__?DN(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?DN(e):null}function CN(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return CN(e)}}function SN(e){(!e.__d&&(e.__d=!0)&&fN.push(e)&&!AN.__r++||gN!==pN.debounceRendering)&&((gN=pN.debounceRendering)||mN)(AN)}function AN(){for(var e;AN.__r=fN.length;)e=fN.sort((function(e,t){return e.__v.__b-t.__v.__b})),fN=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=wN({},i)).__v=i.__v+1,RN(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?DN(i):o,i.__h),BN(n,i),i.__e!=o&&CN(i)))}))}function NN(e,t,n,r,i,o,s,a,l,c){var u,d,p,h,f,m,g,b=r&&r.__k||yN,y=b.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?EN(null,h,null,null,h):Array.isArray(h)?EN(kN,{children:h},null,null,null):h.__b>0?EN(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=b[u])||p&&h.key==p.key&&h.type===p.type)b[u]=void 0;else for(d=0;d<y;d++){if((p=b[d])&&h.key==p.key&&h.type===p.type){b[d]=void 0;break}p=null}RN(e,h,p=p||bN,i,o,s,a,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=ON(h,l,e):l=IN(e,h,p,b,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=DN(p))}for(n.__e=m,u=y;u--;)null!=b[u]&&("function"==typeof n.type&&null!=b[u].__e&&b[u].__e==n.__d&&(n.__d=DN(r,u+1)),UN(b[u],b[u]));if(g)for(u=0;u<g.length;u++)PN(g[u],g[++u],g[++u])}function ON(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?ON(r,t,n):IN(n,r,r,i,r.__e,t));return t}function TN(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){TN(e,t)})):t.push(e)),t}function IN(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function LN(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||vN.test(t)?n:n+"px"}function FN(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||LN(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||LN(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?jN:zN,o):e.removeEventListener(t,o?jN:zN,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function zN(e){this.l[e.type+!1](pN.event?pN.event(e):e)}function jN(e){this.l[e.type+!0](pN.event?pN.event(e):e)}function RN(e,t,n,r,i,o,s,a,l){var c,u,d,p,h,f,m,g,b,y,v,w=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=pN.__b)&&c(t);try{e:if("function"==typeof w){if(g=t.props,b=(c=w.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in w&&w.prototype.render?t.__c=u=new w(g,y):(t.__c=u=new MN(g,y),u.constructor=w,u.render=HN),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=w.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=wN({},u.__s)),wN(u.__s,w.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,d)null==w.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==w.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,y)||t.__v===n.__v){u.props=g,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,y),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}u.context=y,u.props=g,u.state=u.__s,(c=pN.__r)&&c(t),u.__d=!1,u.__v=t,u.__P=e,c=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=wN(wN({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),v=null!=c&&c.type===kN&&null==c.key?c.props.children:c,NN(e,Array.isArray(v)?v:[v],t,n,r,i,o,s,a,l),u.base=t.__e,t.__h=null,u.__h.length&&s.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(null===h)d===p||a&&e.data===p||(e.data=p);else{if(o=o&&dN.call(e.childNodes),c=(d=n.props||bN).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||FN(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||FN(e,o,t[o],n[o],r)}(e,p,d,i,a),u)t.__k=[];else if(f=t.props.children,NN(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&DN(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&_N(o[f]);a||("value"in p&&void 0!==(f=p.value)&&(f!==d.value||f!==e.value||"progress"===h&&!f)&&FN(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&FN(e,"checked",f,d.checked,!1))}return e}(n.__e,t,n,r,i,o,s,l);(c=pN.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),pN.__e(e,t,n)}}function BN(e,t){pN.__c&&pN.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){pN.__e(e,t.__v)}}))}function PN(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){pN.__e(e,n)}}function UN(e,t,n){var r,i;if(pN.unmount&&pN.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||PN(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){pN.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&UN(r[i],t,"function"!=typeof e.type);n||null==e.__e||_N(e.__e),e.__e=e.__d=void 0}function HN(e,t,n){return this.constructor(e,n)}function $N(e,t,n){var r,i,o;pN.__&&pN.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],RN(t,e=(!r&&n||t).__k=xN(kN,null,[e]),i||bN,bN,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?dN.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),BN(o,e)}dN=yN.slice,pN={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(t){e=t}throw e}},hN=0,MN.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=wN({},this.state),"function"==typeof e&&(e=e(wN({},n),this.props)),e&&wN(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),SN(this))},MN.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),SN(this))},MN.prototype.render=kN,fN=[],mN="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,AN.__r=0;var VN=0;function WN(e,t,n,r,i){var o,s,a={};for(s in t)"ref"==s?o=t[s]:a[s]=t[s];var l={type:e,props:a,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--VN,__source:r,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===a[s]&&(a[s]=o[s]);return pN.vnode&&pN.vnode(l),l}var qN={set:function(e,t){try{window.localStorage[`emoji-mart.${e}`]=JSON.stringify(t)}catch(e){}},get:function(e){try{const t=window.localStorage[`emoji-mart.${e}`];if(t)return JSON.parse(t)}catch(e){}}};const KN=new Map,GN=[{v:14,emoji:"🫠"},{v:13.1,emoji:"😶🌫️"},{v:13,emoji:"🥸"},{v:12.1,emoji:"🧑🦰"},{v:12,emoji:"🥱"},{v:11,emoji:"🥰"},{v:5,emoji:"🤩"},{v:4,emoji:"👱♀️"},{v:3,emoji:"🤣"},{v:2,emoji:"👋🏻"},{v:1,emoji:"🙃"}];function YN(e){if(KN.has(e))return KN.get(e);const t=QN(e);return KN.set(e,t),t}const QN=(()=>{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d"))}catch{}if(!e)return()=>!1;const t=25,n=20,r=Math.floor(t/2);return e.font=r+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=2*n,e.canvas.height=t,r=>{e.clearRect(0,0,2*n,t),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,n,22);const i=e.getImageData(0,0,n,t).data,o=i.length;let s=0;for(;s<o&&!i[s+3];s+=4);if(s>=o)return!1;const a=n+s/4%n,l=Math.floor(s/4/n),c=e.getImageData(a,l,1,1).data;return i[s]===c[0]&&i[s+2]===c[2]&&!(e.measureText(r).width>=n)}})();var JN={latestVersion:function(){for(const{v:e,emoji:t}of GN)if(YN(t))return e},noCountryFlags:function(){return!YN("🇨🇦")}};const ZN=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let XN=null;var eO,tO={add:function(e){XN||(XN=qN.get("frequently")||{});const t=e.id||e;t&&(XN[t]||(XN[t]=0),XN[t]+=1,qN.set("last",t),qN.set("frequently",XN))},get:function({maxFrequentRows:e,perLine:t}){if(!e)return[];XN||(XN=qN.get("frequently"));let n=[];if(!XN){XN={};for(let e in ZN.slice(0,t)){const r=ZN[e];XN[r]=t-e,n.push(r)}return n}const r=e*t,i=qN.get("last");for(let e in XN)n.push(e);if(n.sort(((e,t)=>{const n=XN[t],r=XN[e];return n==r?e.localeCompare(t):n-r})),n.length>r){const e=n.slice(r);n=n.slice(0,r);for(let t of e)t!=i&&delete XN[t];i&&-1==n.indexOf(i)&&(delete XN[n[n.length-1]],n.splice(-1,1,i)),qN.set("frequently",XN)}return n}};eO=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var nO={autoFocus:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:14,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","cs","de","es","fa","fi","fr","it","ja","nl","pl","pt","ru","uk","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let rO=null,iO=null;const oO={};async function sO(e){if(oO[e])return oO[e];const t=await fetch(e),n=await t.json();return oO[e]=n,n}let aO=null,lO=null,cO=!1;function uO(e,{caller:t}={}){return aO||(aO=new Promise((e=>{lO=e}))),e?async function(e){cO=!0;let{emojiVersion:t,set:n,locale:r}=e;if(t||(t=nO.emojiVersion.value),n||(n=nO.set.value),r||(r=nO.locale.value),iO)iO.categories=iO.categories.filter((e=>!!!e.name));else{iO=("function"==typeof e.data?await e.data():e.data)||await sO(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${n}.json`),iO.emoticons={},iO.natives={},iO.categories.unshift({id:"frequent",emojis:[]});for(const e in iO.aliases){const t=iO.aliases[e],n=iO.emojis[t];n&&(n.aliases||(n.aliases=[]),n.aliases.push(e))}}if(rO=("function"==typeof e.i18n?await e.i18n():e.i18n)||("en"==r?cN(eO):await sO(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${r}.json`)),e.custom)for(let t in e.custom){t=parseInt(t);const n=e.custom[t],r=e.custom[t-1];if(n.emojis&&n.emojis.length){n.id||(n.id=`custom_${t+1}`),n.name||(n.name=rO.categories.custom),r&&!n.icon&&(n.target=r.target||r),iO.categories.push(n);for(const e of n.emojis)iO.emojis[e.id]=e}}e.categories&&(iO.categories=iO.categories.filter((t=>-1!=e.categories.indexOf(t.id))).sort(((t,n)=>e.categories.indexOf(t.id)-e.categories.indexOf(n.id))));let i=null,o=null;"native"==n&&(i=JN.latestVersion(),o=e.noCountryFlags||JN.noCountryFlags());let s=iO.categories.length,a=!1;for(;s--;){const t=iO.categories[s];if("frequent"==t.id){let{maxFrequentRows:n,perLine:r}=e;n||(n=nO.maxFrequentRows.value),r||(r=nO.perLine.value),t.emojis=tO.get({maxFrequentRows:n,perLine:r})}if(!t.emojis||!t.emojis.length){iO.categories.splice(s,1);continue}const{categoryIcons:n}=e;if(n){const e=n[t.id];e&&!t.icon&&(t.icon=e)}let r=t.emojis.length;for(;r--;){const e=t.emojis[r],n=e.id?e:iO.emojis[e],s=()=>{t.emojis.splice(r,1)};if(n)if(i&&n.version>i)s();else if(!o||"flags"!=t.id||mO.includes(n.id)){if(!n.search){if(a=!0,n.search=","+[[n.id,!1],[n.name,!0],[n.keywords,!1],[n.emoticons,!1]].map((([e,t])=>{if(e)return(Array.isArray(e)?e:[e]).map((e=>(t?e.split(/[-|_|\s]+/):[e]).map((e=>e.toLowerCase())))).flat()})).flat().filter((e=>e&&e.trim())).join(","),n.emoticons)for(const e of n.emoticons)iO.emoticons[e]||(iO.emoticons[e]=n.id);let e=0;for(const t of n.skins){if(!t)continue;e++;const{native:r}=t;r&&(iO.natives[r]=n.id,n.search+=`,${r}`);const i=1==e?"":`:skin-tone-${e}:`;t.shortcodes=`:${n.id}:${i}`}}}else s();else s()}}a&&fO.reset();lO()}(e):t&&!cO&&console.warn(`\`${t}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),aO}function dO(e,t,n){e||(e={});const r={};for(let i in t)r[i]=pO(i,e,t,n);return r}function pO(e,t,n,r){const i=n[e];let o=r&&r.getAttribute(e)||(null!=t[e]&&null!=t[e]?t[e]:null);return i?(null!=o&&i.value&&typeof i.value!=typeof o&&(o="boolean"==typeof i.value?"false"!=o:i.value.constructor(o)),i.transform&&o&&(o=i.transform(o)),(null==o||i.choices&&-1==i.choices.indexOf(o))&&(o=i.value),o):o}let hO=null;var fO={search:async function(e,{maxResults:t,caller:n}={}){if(!e||!e.trim().length)return null;t||(t=90),await uO(null,{caller:n||"SearchIndex.search"});const r=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter(((e,t,n)=>e.trim()&&n.indexOf(e)==t));if(!r.length)return;let i,o,s=hO||(hO=Object.values(iO.emojis));for(const e of r){if(!s.length)break;i=[],o={};for(const t of s){if(!t.search)continue;const n=t.search.indexOf(`,${e}`);-1!=n&&(i.push(t),o[t.id]||(o[t.id]=0),o[t.id]+=t.id==e?0:n+1)}s=i}return i.length<2||(i.sort(((e,t)=>{const n=o[e.id],r=o[t.id];return n==r?e.id.localeCompare(t.id):n-r})),i.length>t&&(i=i.slice(0,t))),i},get:function(e){return e.id?e:iO.emojis[e]||iO.emojis[iO.aliases[e]]||iO.emojis[iO.natives[e]]},reset:function(){hO=null},SHORTCODES_REGEX:/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/};const mO=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];var gO={categories:{activity:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:WN("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:WN("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:WN("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:WN("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),WN("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),WN("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:WN("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),WN("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:WN("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),WN("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),WN("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:WN("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},search:{loupe:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:WN("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:WN("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})}};function bO(e){let{id:t,skin:n,emoji:r}=e;if(e.shortcodes){const r=e.shortcodes.match(fO.SHORTCODES_REGEX);r&&(t=r[1],r[2]&&(n=r[2]))}if(r||(r=fO.get(t||e.native)),!r)return e.fallback;const i=r.skins[n-1]||r.skins[0],o=i.src||("native"==e.set||e.spritesheet?void 0:"function"==typeof e.getImageURL?e.getImageURL(e.set,i.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/64/${i.unified}.png`),s="function"==typeof e.getSpritesheetURL?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/sheets-256/64.png`;return WN("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:o?WN("img",{style:{height:e.size||"1em",width:"auto",display:"inline-block",position:"relative",top:".1em"},alt:i.native||i.shortcodes,src:o}):"native"==e.set?WN("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:i.native}):WN("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${s})`,backgroundSize:`${100*iO.sheet.cols}% ${100*iO.sheet.rows}%`,backgroundPosition:`${100/(iO.sheet.cols-1)*i.x}% ${100/(iO.sheet.rows-1)*i.y}%`}})})}const yO="undefined"!=typeof window?window.HTMLElement:Object;class vO extends yO{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let t in e)this.attributeChangedCallback(t,null,e[t])}attributeChangedCallback(e,t,n){if(!this.component)return;const r=pO(e,{[e]:n},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:r}):(this.component.props[e]=r,this.component.forceUpdate())}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let t=null;const n=e.parent||(t=e.ref&&e.ref.current);t&&(t.innerHTML=""),n&&n.appendChild(this)}}}class wO extends vO{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;const t=document.createElement("style");t.textContent=e,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(e,{styles:t}={}){super(e),this.setShadow(),this.injectStyles(t)}}var _O={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:nO.set,skin:nO.skin};class xO extends vO{async connectedCallback(){const e=dO(this.props,_O,this);e.element=this,e.ref=e=>{this.component=e},await uO(),$N(WN(bO,{...e}),this)}constructor(e){super(e)}}uN(xO,"Props",_O),"undefined"==typeof customElements||customElements.get("em-emoji")||customElements.define("em-emoji",xO);var EO,kO=[],MO=pN.__b,DO=pN.__r,CO=pN.diffed,SO=pN.__c,AO=pN.unmount;function NO(){var e;for(kO.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=kO.pop();)if(e.__P)try{e.__H.__h.forEach(TO),e.__H.__h.forEach(IO),e.__H.__h=[]}catch(t){e.__H.__h=[],pN.__e(t,e.__v)}}pN.__b=function(e){MO&&MO(e)},pN.__r=function(e){DO&&DO(e);var t=e.__c.__H;t&&(t.__h.forEach(TO),t.__h.forEach(IO),t.__h=[])},pN.diffed=function(e){CO&&CO(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==kO.push(t)&&EO===pN.requestAnimationFrame||((EO=pN.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),OO&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);OO&&(t=requestAnimationFrame(n))})(NO))},pN.__c=function(e,t){t.some((function(e){try{e.__h.forEach(TO),e.__h=e.__h.filter((function(e){return!e.__||IO(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],pN.__e(n,e.__v)}})),SO&&SO(e,t)},pN.unmount=function(e){AO&&AO(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{TO(e)}catch(e){t=e}})),t&&pN.__e(t,n.__v))};var OO="function"==typeof requestAnimationFrame;function TO(e){var t=e.__c;"function"==typeof t&&(e.__c=void 0,t())}function IO(e){e.__c=e.__()}function LO(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function FO(e){this.props=e}(FO.prototype=new MN).isPureReactComponent=!0,FO.prototype.shouldComponentUpdate=function(e,t){return LO(this.props,e)||LO(this.state,t)};var zO=pN.__b;pN.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),zO&&zO(e)};var jO=pN.__e;pN.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);jO(e,t,n)};var RO=pN.unmount;function BO(){this.__u=0,this.t=null,this.__b=null}function PO(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function UO(){this.u=null,this.o=null}pN.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),RO&&RO(e)},(BO.prototype=new MN).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=PO(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},BO.prototype.componentWillUnmount=function(){this.t=[]},BO.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&xN(kN,null,e.fallback);return i&&(i.__h=null),[xN(kN,null,t.__e?null:e.children),i]};var HO=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(UO.prototype=new MN).__e=function(e){var t=this,n=PO(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),HO(t,e,r)):i()};n?n(o):o()}},UO.prototype.render=function(e){this.u=null,this.o=new Map;var t=TN(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},UO.prototype.componentDidUpdate=UO.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){HO(e,n,t)}))};var $O="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,VO=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,WO="undefined"!=typeof document,qO=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};MN.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(MN.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var KO=pN.event;function GO(){}function YO(){return this.cancelBubble}function QO(){return this.defaultPrevented}pN.event=function(e){return KO&&(e=KO(e)),e.persist=GO,e.isPropagationStopped=YO,e.isDefaultPrevented=QO,e.nativeEvent=e};var JO={configurable:!0,get:function(){return this.class}},ZO=pN.vnode;pN.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];WO&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!qO(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():i&&VO.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=TN(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=TN(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(JO.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",JO))}e.$$typeof=$O,ZO&&ZO(e)};var XO=pN.__r;pN.__r=function(e){XO&&XO(e),e.__c};const eT={light:"outline",dark:"solid"};class tT extends FO{renderIcon(e){const{icon:t}=e;if(t){if(t.svg)return WN("span",{class:"flex",dangerouslySetInnerHTML:{__html:t.svg}});if(t.src)return WN("img",{src:t.src})}const n=gO.categories[e.id]||gO.categories.custom;return n["auto"==this.props.icons?eT[this.props.theme]:this.props.icons]||n}render(){let e=null;return WN("nav",{id:"nav",class:"padding","data-position":this.props.position,children:WN("div",{class:"flex relative",children:[this.categories.map(((t,n)=>{const r=t.name||rO.categories[t.id],i=!this.props.unfocused&&t.id==this.state.categoryId;return i&&(e=n),WN("button",{"aria-label":r,"aria-selected":i||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:e=>e.preventDefault(),onClick:()=>{this.props.onClick({category:t,i:n})},children:this.renderIcon(t)})})),WN("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:null==e?0:1,transform:`translateX(${100*e}%)`}})]})})}constructor(){super(),this.categories=iO.categories.filter((e=>!e.target)),this.state={categoryId:this.categories[0].id}}}class nT extends FO{shouldComponentUpdate(e){for(let t in e)if("children"!=t&&e[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const rT=10;class iT extends MN{getInitialState(e=this.props){return{skin:qN.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.observers=[],this.dir=rO.rtl?"rtl":"ltr",this.refs={menu:{current:null},navigation:{current:null},scroll:{current:null},search:{current:null},searchInput:{current:null},skinToneButton:{current:null},skinToneRadio:{current:null}},this.initGrid(),0==this.props.stickySearch&&"sticky"==this.props.searchPosition&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){this.nextState||(this.nextState={});for(const t in e)this.nextState[t]=e[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout((()=>{let e=!1;for(const t in this.nextState)this.props[t]=this.nextState[t],"custom"!==t&&"categories"!==t||(e=!0);delete this.nextState;const t=this.getInitialState();if(e)return this.reset(t);this.setState(t)}))}componentWillUnmount(){this.unregister()}async reset(e={}){await uO(this.props),this.initGrid(),this.unobserve(),this.setState(e,(()=>{this.observeCategories(),this.observeRows()}))}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){document.removeEventListener("click",this.handleClickOutside),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve(){for(const e of this.observers)e.disconnect()}initGrid(){const{categories:e}=iO;this.refs.categories=new Map;const t=iO.categories.map((e=>e.id)).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const n=(e,t)=>{const n=[];n.__categoryId=t.id,n.__index=e.length,this.grid.push(n);const r=this.grid.length-1,i=r%rT?{}:{current:null};return i.index=r,i.posinset=this.grid.setsize+1,e.push(i),n};for(let t of e){const e=[];let r=n(e,t);for(let i of t.emojis)r.length==this.props.perLine&&(r=n(e,t)),this.grid.setsize+=1,r.push(i);this.refs.categories.set(t.id,{root:{current:null},rows:e})}}initTheme(e){if("auto"!=e)return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addListener((()=>{"auto"==this.props.theme&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}))}return this.darkMedia.matches?"dark":"light"}getEmojiByPos([e,t]){const n=this.state.searchResults||this.grid,r=n[e]&&n[e][t];if(r)return fO.get(r)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const t=new Map,n=t=>{t!=e.state.categoryId&&e.setState({categoryId:t})},r={root:this.refs.scroll.current,threshold:[0,1]},i=new IntersectionObserver((e=>{for(const n of e){const e=n.target.dataset.id;t.set(e,n.intersectionRatio)}const r=[...t],i=r[r.length-1];if(1==i[1])return n(i[0]);for(const[e,t]of r)if(t){n(e);break}}),r);for(const{root:e}of this.refs.categories.values())i.observe(e.current);this.observers.push(i)}observeRows(){const e={...this.state.visibleRows},t=new IntersectionObserver((t=>{for(const n of t){const t=parseInt(n.target.dataset.index);n.isIntersecting?e[t]=!0:delete e[t]}this.setState({visibleRows:e})}),{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(rT+5)}px 0px ${this.props.emojiButtonSize*rT}px`});for(const{rows:e}of this.refs.categories.values())for(const n of e)n.current&&t.observe(n.current);this.observers.push(t)}preventDefault(e){e.preventDefault()}unfocusSearch(){const e=this.refs.searchInput.current;e&&e.blur()}navigate({e:e,input:t,left:n,right:r,up:i,down:o}){const s=this.state.searchResults||this.grid;if(!s.length)return;let[a,l]=this.state.pos;const c=(()=>{if(0==a&&0==l&&!e.repeat&&(n||i))return null;if(-1==a)return e.repeat||!r&&!o||t.selectionStart!=t.value.length?null:[0,0];if(n||r){let e=s[a];const t=n?-1:1;if(l+=t,!e[l]){if(a+=t,e=s[a],!e)return a=n?0:s.length-1,l=n?0:s[a].length-1,[a,l];l=n?e.length-1:0}return[a,l]}if(i||o){a+=i?-1:1;const e=s[a];return e?(e[l]||(l=e.length-1),[a,l]):(a=i?0:s.length-1,l=i?0:s[a].length-1,[a,l])}})();c?(e.preventDefault(),this.setState({pos:c,keyboard:!0},(()=>{this.scrollTo({row:c[0]})}))):this.state.pos[0]>-1&&this.setState({pos:[-1,-1]})}scrollTo({categoryId:e,row:t}){const n=this.state.searchResults||this.grid;if(!n.length)return;const r=this.refs.scroll.current,i=r.getBoundingClientRect();let o=0;if(t>=0&&(e=n[t].__categoryId),e){o=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(i.top-r.scrollTop)+1}if(t>=0)if(t){const e=o+n[t].__index*this.props.emojiButtonSize,s=e+this.props.emojiButtonSize+.88*this.props.emojiButtonSize;if(e<r.scrollTop)o=e;else{if(!(s>r.scrollTop+i.height))return;o=s-i.height}}else o=0;this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout((()=>{delete this.mouseIsIgnored}),100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({emoji:e,pos:t}){if(this.props.onEmojiSelect&&(!e&&t&&(e=this.getEmojiByPos(t)),e)){const t=function(e,{skinIndex:t}={}){const n=e.skins[t]||(t=0,e.skins[t]),r={id:e.id,name:e.name,native:n.native,unified:n.unified,keywords:e.keywords,shortcodes:n.shortcodes||e.shortcodes};return e.skins.length>1&&(r.skin=t+1),n.src&&(r.src=n.src),e.aliases&&e.aliases.length&&(r.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(r.emoticons=e.emoticons),r}(e,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&tO.add(t,this.props),this.props.onEmojiSelect(t)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),qN.set("skin",e)}renderNav(){return WN(tT,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const e=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return WN("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[WN("div",{class:"flex flex-middle flex-grow",children:[WN("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:WN(bO,{emoji:e,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||("top"==this.props.previewPosition?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),WN("div",{class:`margin-${this.dir[0]}`,children:WN("div",e?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[WN("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:e.name}),WN("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:e.skins[0].shortcodes})]}:t?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[WN("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:rO.search_no_results_1}),WN("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:rO.search_no_results_2})]}:{class:"color-c",style:{fontSize:21},children:rO.pick})})]}),!e&&"preview"==this.props.skinTonePosition&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:t,posinset:n,grid:r}){const i=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,s=(e.skins[o-1]||e.skins[0]).native,a=function(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,n)=>e==t[n]))}(this.state.pos,t),l=t.concat(e.id).join("");return WN(nT,{selected:a,skin:o,size:i,children:WN("button",{"aria-label":s,"aria-selected":a||void 0,"aria-posinset":n,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:"none"==this.props.previewPosition?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:()=>this.handleEmojiClick({emoji:e}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[WN("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(n-1)%this.props.emojiButtonColors.length]:void 0}}),WN(bO,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},l)}renderSearch(){const e="none"==this.props.previewPosition||"search"==this.props.skinTonePosition;return WN("div",{children:[WN("div",{class:"spacer"}),WN("div",{class:"flex flex-middle",children:[e&&"rtl"==this.dir&&this.renderSkinToneButton(),WN("div",{class:"search relative flex-grow",children:[WN("input",{type:"search",ref:this.refs.searchInput,placeholder:rO.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),WN("span",{class:"icon loupe flex",children:gO.search.loupe}),this.state.searchResults&&WN("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:gO.search.delete})]}),e&&"ltr"==this.dir&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?WN("div",{class:"category",ref:this.refs.search,children:[WN("div",{class:`sticky padding-small align-${this.dir[0]}`,children:rO.categories.search}),WN("div",{children:e.length?e.map(((t,n)=>WN("div",{class:"flex",children:t.map(((t,r)=>this.renderEmojiButton(t,{pos:[n,r],posinset:n*this.props.perLine+r+1,grid:e})))}))):WN("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&WN("a",{onClick:this.props.onAddCustomEmoji,children:rO.add_custom})})})]}):null}renderCategories(){const{categories:e}=iO,t=!!this.state.searchResults;return WN("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0},children:e.map((e=>{const{root:t,rows:n}=this.refs.categories.get(e.id);return WN("div",{"data-id":e.target?e.target.id:e.id,class:"category",ref:t,children:[WN("div",{class:`sticky padding-small align-${this.dir[0]}`,children:e.name||rO.categories[e.id]}),WN("div",{class:"relative",style:{height:n.length*this.props.emojiButtonSize},children:n.map(((t,n)=>{const r=t.index-t.index%rT,i=this.state.visibleRows[r],o="current"in t?t:void 0;if(!i&&!o)return null;const s=n*this.props.perLine,a=s+this.props.perLine,l=e.emojis.slice(s,a);return WN("div",{"data-index":t.index,ref:o,class:"flex row",style:{top:n*this.props.emojiButtonSize},children:i&&l.map(((e,n)=>{const r=fO.get(e);return this.renderEmojiButton(r,{pos:[t.index,n],posinset:t.posinset+n,grid:this.grid})}))},t.index)}))})]})}))})}renderSkinToneButton(){return"none"==this.props.skinTonePosition?null:WN("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:WN("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":rO.skins.choose,title:rO.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:WN("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const e=this.getEmojiByPos(this.state.pos);return WN("div",{"aria-live":"polite",class:"sr-only",children:e?e.name:""})}renderSkins(){const e=this.refs.skinToneButton.current.getBoundingClientRect(),t=this.base.getBoundingClientRect(),n={};return"ltr"==this.dir?n.right=t.right-e.right-3:n.left=e.left-t.left-3,"bottom"==this.props.previewPosition&&"preview"==this.props.skinTonePosition?n.bottom=t.bottom-e.top+6:(n.top=e.bottom-t.top+3,n.bottom="auto"),WN("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":rO.skins.choose,class:"menu hidden","data-position":n.top?"top":"bottom",style:n,children:[...Array(6).keys()].map((e=>{const t=e+1,n=this.state.skin==t;return WN("div",{children:[WN("input",{type:"radio",name:"skin-tone",value:t,"aria-label":rO.skins[t],ref:n?this.refs.skinToneRadio:null,defaultChecked:n,onChange:()=>this.handleSkinMouseOver(t),onKeyDown:e=>{"Enter"!=e.code&&"Space"!=e.code&&"Tab"!=e.code||(e.preventDefault(),this.handleSkinClick(t))}}),WN("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(t),onMouseEnter:()=>this.handleSkinMouseOver(t),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[WN("span",{class:`skin-tone skin-tone-${t}`}),WN("span",{class:"margin-small-lr",children:rO.skins[t]})]})]})}))})}render(){return WN("section",{id:"root",class:"flex flex-column",style:{width:this.props.perLine*this.props.emojiButtonSize+28},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:["top"==this.props.previewPosition&&this.renderPreview(),"top"==this.props.navPosition&&this.renderNav(),"sticky"==this.props.searchPosition&&WN("div",{class:"padding-lr",children:this.renderSearch()}),WN("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:WN("div",{style:{width:this.props.perLine*this.props.emojiButtonSize},children:["static"==this.props.searchPosition&&this.renderSearch(),this.renderSearchResults(),this.renderCategories(),WN("div",{class:"spacer"})]})}),"bottom"==this.props.navPosition&&this.renderNav(),"bottom"==this.props.previewPosition&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(e){super(),uN(this,"handleClickOutside",(e=>{const{element:t}=this.props;e.target!=t&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside())})),uN(this,"handleBaseClick",(e=>{this.state.showSkins&&(e.target.closest(".menu")||(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins()))})),uN(this,"handleBaseKeydown",(e=>{this.state.showSkins&&"Escape"==e.key&&(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins())})),uN(this,"handleSearchClick",(()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})})),uN(this,"handleSearchInput",(async()=>{const e=this.refs.searchInput.current;if(!e)return;const{value:t}=e,n=await fO.search(t),r=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!n)return this.setState({searchResults:n,pos:[-1,-1]},r);const i=e.selectionStart==e.value.length?[0,0]:[-1,-1],o=[];o.setsize=n.length;let s=null;for(let e of n)o.length&&s.length!=this.props.perLine||(s=[],s.__categoryId="search",s.__index=o.length,o.push(s)),s.push(e);this.ignoreMouse(),this.setState({searchResults:o,pos:i},r)})),uN(this,"handleSearchKeyDown",(e=>{const t=e.currentTarget;switch(e.stopImmediatePropagation(),e.key){case"ArrowLeft":this.navigate({e:e,input:t,left:!0});break;case"ArrowRight":this.navigate({e:e,input:t,right:!0});break;case"ArrowUp":this.navigate({e:e,input:t,up:!0});break;case"ArrowDown":this.navigate({e:e,input:t,down:!0});break;case"Enter":e.preventDefault(),this.handleEmojiClick({pos:this.state.pos});break;case"Escape":e.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch()}})),uN(this,"clearSearch",(()=>{const e=this.refs.searchInput.current;e&&(e.value="",e.focus(),this.handleSearchInput())})),uN(this,"handleCategoryClick",(({category:e,i:t})=>{this.scrollTo(0==t?{row:-1}:{categoryId:e.id})})),uN(this,"openSkins",(e=>{const{currentTarget:t}=e,n=t.getBoundingClientRect();this.setState({showSkins:n},(async()=>{await async function(e=1){for(let t in[...Array(e).keys()])await new Promise(requestAnimationFrame)}(2);const e=this.refs.menu.current;e&&(e.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))}))})),this.state={pos:[-1,-1],visibleRows:{0:!0},...this.getInitialState(e)}}}class oT extends wO{async connectedCallback(){const e=dO(this.props,nO,this);e.element=this,e.ref=e=>{this.component=e},await uO(e),$N(WN(iT,{...e}),this.shadowRoot)}disconnectedCallback(){this.component&&this.component.unregister()}constructor(e){super(e,{styles:cN(sT)})}}uN(oT,"Props",nO),"undefined"==typeof customElements||customElements.get("em-emoji-picker")||customElements.define("em-emoji-picker",oT);var sT={};sT=':host {\n display: flex;\n width: -webkit-min-content;\n width: -moz-min-content;\n width: min-content;\n height: 435px;\n min-height: 230px;\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n --border-radius: 10px;\n --category-icon-size: 18px;\n --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n --font-size: 15px;\n --shadow-color: 0deg 0% 0%;\n --shadow:\n 0.3px 0.5px 2.7px hsl(var(--shadow-color) / 0.14),\n 0.4px 0.8px 1px -3.2px hsl(var(--shadow-color) / 0.14),\n 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / 0.14);\n}\n\n[data-theme=light] {\n --em-rgb-color: var(--rgb-color, 34, 36, 39);\n --em-rgb-accent: var(--rgb-accent, 34, 102, 237);\n --em-rgb-background: var(--rgb-background, 255, 255, 255);\n --em-rgb-input: var(--rgb-input, 255, 255, 255);\n --em-color-border: var(--color-border, rgba(0, 0, 0, .05));\n --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));\n}\n\n[data-theme=dark] {\n --em-rgb-color: var(--rgb-color, 222, 222, 221);\n --em-rgb-accent: var(--rgb-accent, 58, 130, 247);\n --em-rgb-background: var(--rgb-background, 21, 22, 23);\n --em-rgb-input: var(--rgb-input, 0, 0, 0);\n --em-color-border: var(--color-border, rgba(255, 255, 255, .1));\n --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));\n}\n\n#root {\n --color-a: rgb(var(--em-rgb-color));\n --color-b: rgba(var(--em-rgb-color), .65);\n --color-c: rgba(var(--em-rgb-color), .45);\n --padding: 12px;\n --padding-small: calc(var(--padding) / 2);\n --sidebar-width: 16px;\n --duration: 225ms;\n --duration-fast: 125ms;\n --duration-instant: 50ms;\n --easing: cubic-bezier(.4, .0, .2, 1);\n position: relative;\n width: 100%;\n text-align: left;\n border-radius: var(--border-radius);\n background-color: rgb(var(--em-rgb-background));\n}\n\n@media (prefers-reduced-motion) {\n #root {\n --duration: 0;\n --duration-fast: 0;\n --duration-instant: 0;\n }\n}\n\n#root[data-menu] button {\n cursor: auto;\n}\n\n#root[data-menu] .menu button {\n cursor: pointer;\n}\n\n:host, #root, input, button {\n color: rgb(var(--em-rgb-color));\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n*, *:before, *:after {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n min-width: 0;\n}\n\n.relative {\n position: relative;\n}\n\n.flex {\n display: flex;\n}\n\n.flex-auto {\n flex: 0 0 auto;\n}\n\n.flex-center {\n justify-content: center;\n}\n\n.flex-column {\n flex-direction: column;\n}\n\n.flex-grow {\n flex: 1 1 auto;\n}\n\n.flex-middle {\n align-items: center;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.padding {\n padding: var(--padding);\n}\n\n.padding-t {\n padding-top: var(--padding);\n}\n\n.padding-lr {\n padding-left: var(--padding);\n padding-right: var(--padding);\n}\n\n.padding-r {\n padding-right: var(--padding);\n}\n\n.padding-small {\n padding: var(--padding-small);\n}\n\n.padding-small-b {\n padding-bottom: var(--padding-small);\n}\n\n.padding-small-lr {\n padding-left: var(--padding-small);\n padding-right: var(--padding-small);\n}\n\n.margin {\n margin: var(--padding);\n}\n\n.margin-r {\n margin-right: var(--padding);\n}\n\n.margin-l {\n margin-left: var(--padding);\n}\n\n.margin-small-l {\n margin-left: var(--padding-small);\n}\n\n.margin-small-lr {\n margin-left: var(--padding-small);\n margin-right: var(--padding-small);\n}\n\n.align-l {\n text-align: left;\n}\n\n.align-r {\n text-align: right;\n}\n\n.color-a {\n color: var(--color-a);\n}\n\n.color-b {\n color: var(--color-b);\n}\n\n.color-c {\n color: var(--color-c);\n}\n\n.ellipsis {\n white-space: nowrap;\n max-width: 100%;\n width: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.sr-only {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\na {\n cursor: pointer;\n color: rgb(var(--em-rgb-accent));\n}\n\na:hover {\n text-decoration: underline;\n}\n\n.spacer {\n height: 10px;\n}\n\n.scroll {\n overflow: auto;\n overflow-x: hidden;\n padding-right: 0;\n}\n\n.scroll::-webkit-scrollbar {\n width: var(--sidebar-width);\n height: var(--sidebar-width);\n}\n\n.scroll::-webkit-scrollbar-track {\n border: 0;\n}\n\n.scroll::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n}\n\n.scroll::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n.scroll::-webkit-scrollbar-thumb {\n min-height: 20%;\n min-height: 65px;\n border: 4px solid rgb(var(--em-rgb-background));\n border-radius: 8px;\n}\n\n.scroll::-webkit-scrollbar-thumb:hover {\n background-color: var(--em-color-border-over) !important;\n}\n\n.scroll:hover::-webkit-scrollbar-thumb {\n background-color: var(--em-color-border);\n}\n\n.sticky {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: -1px;\n font-weight: 500;\n background-color: rgba(var(--em-rgb-background), 0.9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n}\n\n.search {\n z-index: 2;\n position: relative;\n}\n\n.search input, .search button {\n font-size: calc(var(--font-size) - 1px);\n}\n\n.search input[type=search] {\n display: block;\n border: 0;\n outline: 0;\n width: 100%;\n padding: 10px 2em 10px 2.2em;\n border-radius: 10px;\n background-color: var(--em-color-border);\n transition-duration: var(--duration);\n transition-property: background-color, box-shadow;\n transition-timing-function: var(--easing);\n}\n\n.search input[type=search]::-moz-placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search]:-ms-input-placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search]::placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search], .search input[type=search]::-webkit-search-decoration, .search input[type=search]::-webkit-search-cancel-button, .search input[type=search]::-webkit-search-results-button, .search input[type=search]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n appearance: none;\n}\n\n.search input[type=search]:focus {\n background-color: rgb(var(--em-rgb-input));\n box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, 0.2);\n}\n\n.search .icon {\n z-index: 1;\n position: absolute;\n top: 50%;\n color: rgba(var(--em-rgb-color), 0.7);\n transform: translateY(-50%);\n}\n\n.search .loupe {\n left: 0.7em;\n pointer-events: none;\n}\n\n.search .delete {\n right: 0.7em;\n}\n\nsvg {\n fill: currentColor;\n width: 1em;\n height: 1em;\n}\n\nbutton {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: pointer;\n color: currentColor;\n border: 0;\n background-color: transparent;\n}\n\n#nav {\n z-index: 2;\n position: relative;\n padding-top: 12px;\n padding-bottom: 12px;\n padding-right: var(--sidebar-width);\n}\n\n#nav button {\n color: var(--color-b);\n transition: color var(--duration) var(--easing);\n}\n\n#nav button:hover {\n color: var(--color-a);\n}\n\n#nav svg, #nav img {\n width: var(--category-icon-size);\n height: var(--category-icon-size);\n}\n\n#nav .bar {\n position: absolute;\n bottom: -12px;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: rgb(var(--em-rgb-accent));\n border-radius: 3px 3px 0 0;\n transition: transform var(--duration) var(--easing);\n}\n\n#nav button[aria-selected] {\n color: rgb(var(--em-rgb-accent));\n}\n\n#preview {\n z-index: 2;\n position: relative;\n padding: calc(var(--padding) + 4px) var(--padding);\n padding-right: var(--sidebar-width);\n}\n\n#nav:before, #preview:before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n}\n\n#nav[data-position=top]:before, #preview[data-position=top]:before {\n top: 100%;\n background: linear-gradient(to bottom, var(--em-color-border), transparent);\n}\n\n#nav[data-position=bottom]:before, #preview[data-position=bottom]:before {\n bottom: 100%;\n background: linear-gradient(to top, var(--em-color-border), transparent);\n}\n\n.category button {\n position: relative;\n font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n}\n\n.category button > * {\n position: relative;\n}\n\n.category button .background {\n position: absolute;\n inset: 0;\n opacity: 0;\n background-color: var(--em-color-border);\n transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);\n}\n\n.category button:hover .background {\n transition-duration: var(--duration-instant);\n transition-delay: 0ms;\n}\n\n.category button[aria-selected] .background {\n opacity: 1;\n}\n\n.category button[data-keyboard] .background {\n transition: none;\n}\n\n.row {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.skin-tone-button {\n border-radius: 100%;\n border: 1px solid transparent;\n}\n\n.skin-tone-button:hover {\n border-color: var(--em-color-border);\n}\n\n.skin-tone-button:active .skin-tone {\n transform: scale(0.85) !important;\n}\n\n.skin-tone-button .skin-tone {\n transition: transform var(--duration) var(--easing);\n}\n\n.skin-tone-button[aria-selected] {\n border-left-width: 0;\n border-right-width: 0;\n border-top-color: rgba(0, 0, 0, 0.05);\n border-bottom-color: transparent;\n background-color: var(--em-color-border);\n}\n\n.skin-tone-button[aria-selected] .skin-tone {\n transform: scale(0.9);\n}\n\n.menu {\n z-index: 2;\n position: absolute;\n white-space: nowrap;\n padding: 4px;\n border: 1px solid var(--em-color-border);\n background-color: rgba(var(--em-rgb-background), 0.9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n border-radius: 10px;\n box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.05);\n transition-property: opacity, transform;\n transition-duration: var(--duration);\n transition-timing-function: var(--easing);\n}\n\n.menu.hidden {\n opacity: 0;\n}\n\n.menu[data-position=bottom] {\n transform-origin: bottom right;\n}\n\n.menu[data-position=bottom].hidden {\n transform: scale(0.9) rotate(-3deg) translateY(5%);\n}\n\n.menu[data-position=top] {\n transform-origin: top right;\n}\n\n.menu[data-position=top].hidden {\n transform: scale(0.9) rotate(3deg) translateY(-5%);\n}\n\n.menu input[type=radio] {\n position: absolute;\n overflow: hidden;\n clip: rect(0 0 0 0);\n width: 1px;\n height: 1px;\n padding: 0;\n margin: 0;\n border: 0;\n}\n\n.menu input[type=radio]:checked + .option {\n box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));\n}\n\n.option {\n width: 100%;\n padding: 4px 6px;\n border-radius: 6px;\n}\n\n.option:hover {\n color: #fff;\n background-color: rgb(var(--em-rgb-accent));\n}\n\n.skin-tone {\n position: relative;\n display: inline-block;\n width: 16px;\n height: 16px;\n border-radius: 100%;\n overflow: hidden;\n}\n\n.skin-tone:after {\n content: "";\n position: absolute;\n inset: 0;\n border-radius: 100%;\n border: 1px solid rgba(0, 0, 0, 0.8);\n mix-blend-mode: overlay;\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);\n}\n\n.skin-tone-1 {\n background-color: #ffc93a;\n}\n\n.skin-tone-2 {\n background-color: #ffdab7;\n}\n\n.skin-tone-3 {\n background-color: #e7b98f;\n}\n\n.skin-tone-4 {\n background-color: #c88c61;\n}\n\n.skin-tone-5 {\n background-color: #a46134;\n}\n\n.skin-tone-6 {\n background-color: #5d4437;\n}\n\n[data-emoji-set=twitter] .skin-tone:after {\n border-color: rgba(0, 0, 0, 0.5);\n box-shadow: none;\n}\n\n[data-emoji-set=twitter] .skin-tone-1 {\n background-color: #FADE72;\n}\n\n[data-emoji-set=twitter] .skin-tone-2 {\n background-color: #F3DFD0;\n}\n\n[data-emoji-set=twitter] .skin-tone-3 {\n background-color: #EED3A8;\n}\n\n[data-emoji-set=twitter] .skin-tone-4 {\n background-color: #CFAD8D;\n}\n\n[data-emoji-set=twitter] .skin-tone-5 {\n background-color: #A8805D;\n}\n\n[data-emoji-set=twitter] .skin-tone-6 {\n background-color: #765542;\n}\n\n[data-emoji-set=google] .skin-tone:after {\n box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.4);\n}\n\n[data-emoji-set=google] .skin-tone-1 {\n background-color: #F5C748;\n}\n\n[data-emoji-set=google] .skin-tone-2 {\n background-color: #F1D5AA;\n}\n\n[data-emoji-set=google] .skin-tone-3 {\n background-color: #D4B48D;\n}\n\n[data-emoji-set=google] .skin-tone-4 {\n background-color: #AA876B;\n}\n\n[data-emoji-set=google] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=google] .skin-tone-6 {\n background-color: #61493F;\n}\n\n[data-emoji-set=facebook] .skin-tone:after {\n border-color: rgba(0, 0, 0, 0.4);\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;\n}\n\n[data-emoji-set=facebook] .skin-tone-1 {\n background-color: #F5C748;\n}\n\n[data-emoji-set=facebook] .skin-tone-2 {\n background-color: #F1D5AA;\n}\n\n[data-emoji-set=facebook] .skin-tone-3 {\n background-color: #D4B48D;\n}\n\n[data-emoji-set=facebook] .skin-tone-4 {\n background-color: #AA876B;\n}\n\n[data-emoji-set=facebook] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=facebook] .skin-tone-6 {\n background-color: #61493F;\n}\n';const aT=()=>de.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");class lT extends n.Component{constructor(){super(...arguments),_m(this,"ref",n.createRef()),_m(this,"fetchEmojiData",(async()=>{try{const{data:e}=await aT();return e}catch{return{}}})),_m(this,"onKeyDown",(e=>{let{event:t}=e;return"Escape"===t.key&&(this.props.editor.chain().focus().deleteRange(this.props.range).run(),!0)})),_m(this,"handleSelect",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e).run(),this.props.setActive(!1)}))}componentDidMount(){new oT({...this.props,onEmojiSelect:this.handleSelect,style:{maxWidth:"100%"},theme:"light",native:!0,previewPosition:"none",showSkinTones:!1,data:this.fetchEmojiData,ref:this.ref})}render(){return n.createElement("div",{"data-cy":"neeto-editor-emoji-picker",ref:this.ref})}}lT.defaultProps={editor:{},range:{}},lT.propTypes={editor:jh.exports.object.isRequired,range:jh.exports.object};const cT=new qn("emoji-picker"),uT=mE.create({name:"emojiPicker",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({suggestion:{char:"::",startOfLine:!1,pluginKey:cT,items:()=>[],render:()=>{let e,t;return{onStart(n){e=new RM(lT,{props:n,editor:n.editor}),t=MM("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}}}),addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}});class dT extends n.Component{constructor(){super(...arguments),_m(this,"state",{isLoading:!1,selectedIndex:0,emojiSuggestions:[]}),_m(this,"fetchEmojiData",(async()=>{this.setState({isLoading:!0});try{const{data:e}=await aT();return this.setState({isLoading:!1}),e}catch{return this.setState({isLoading:!1}),{}}})),_m(this,"searchEmoji",(async()=>this.props.query?(await fO.search(this.props.query)).slice(0,5):[])),_m(this,"searchEmojiAndSetState",(async()=>{const e=await this.searchEmoji();this.setState({emojiSuggestions:e})})),_m(this,"setEditorState",(async()=>{const e=await this.searchEmoji();this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e[0]).run()})),_m(this,"onKeyDown",(e=>{let{event:t}=e;return!b(this.state.emojiSuggestions)&&("ArrowLeft"===t.key||"ArrowDown"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+n.length-1)%n.length}})),!0):"ArrowRight"===t.key||"ArrowUp"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+1)%n.length}})),!0):"Enter"===t.key?(this.selectItem(this.state.selectedIndex),!0):"Escape"===t.key&&(this.props.editor.chain().focus().insertContent(" ").run(),!0))})),_m(this,"selectItem",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(this.state.emojiSuggestions[e]).run()}))}componentDidMount(){uO({data:this.fetchEmojiData,theme:"light",previewPosition:"none"}),this.searchEmojiAndSetState()}componentDidUpdate(e){this.props.query!==e.query&&this.searchEmojiAndSetState()}render(){return b(this.state.emojiSuggestions)?null:n.createElement("div",{className:"neeto-editor-emoji-suggestion"},this.state.isLoading&&n.createElement(C,null),!this.state.isLoading&&(this.state.emojiSuggestions.length>0?this.state.emojiSuggestions.map(((e,t)=>n.createElement("div",{"data-cy":`neeto-editor-emoji-suggestion-${e.id}`,key:e.id,className:_s("neeto-editor-emoji-suggestion__item",{"neeto-editor-emoji-suggestion__item--selected":t===this.state.selectedIndex}),onClick:()=>this.selectItem(t)},e.skins[0].native))):n.createElement("p",null,"No results")))}}const pT=new qn("emoji-suggestion"),hT=mE.create({name:"emojiSuggestion",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({HTMLAttributes:{class:"neeto-editor-emoji"},renderEmoji(e){let{node:t}=e;return t.attrs.label},suggestion:{}}),addAttributes:()=>({label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-emoji]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",sx({"data-emoji":""},this.options.HTMLAttributes,n),this.options.renderEmoji({node:t})]},renderText(e){let{node:t}=e;return this.options.renderEmoji({node:t})},addCommands(){return{setEmoji:e=>t=>{var n;let{chain:r}=t;r().focus().insertContent([{type:this.name,attrs:{label:(null==e?void 0:e.native)||(null==e||null===(n=e.skins[0])||void 0===n?void 0:n.native)||""}},{type:"text",text:" "}]).run()}}},addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}}),fT={char:":",startOfLine:!1,pluginKey:pT,command:e=>{let{editor:t,range:n,props:r}=e;t.chain().focus().deleteRange(n).setEmoji(r).run()},items:()=>[],render:()=>{let e,t;return{onStart(n){37===n.editor.view.input.lastKeyCode&&(e=null,t=null)},onUpdate(n){var r;39!==n.editor.view.input.lastKeyCode&&37!==n.editor.view.input.lastKeyCode&&1===n.query.length&&(e=new RM(dT,{props:n,editor:n.editor}),t=MM("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"top-start",zIndex:99999})),e&&e.updateProps(n),!y(t)&&(null===(r=t[0])||void 0===r||r.setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(t){var n,r;return null===(n=e)||void 0===n||null===(r=n.ref)||void 0===r?void 0:r.onKeyDown(t)},onExit(){var n,r;!y(t)&&(null===(n=t[0])||void 0===n||n.destroy()),null===(r=e)||void 0===r||r.destroy(),e=null}}}};var mT,gT=hT.configure({suggestion:fT}),bT=void 0&&(void 0).__extends||(mT=function(e,t){return mT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},mT(e,t)},function(e,t){function n(){this.constructor=e}mT(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),yT=void 0&&(void 0).__assign||function(){return yT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},yT.apply(this,arguments)},vT={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},wT={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},_T={width:"20px",height:"20px",position:"absolute"},xT={top:yT(yT({},vT),{top:"-5px"}),right:yT(yT({},wT),{left:void 0,right:"-5px"}),bottom:yT(yT({},vT),{top:void 0,bottom:"-5px"}),left:yT(yT({},wT),{left:"-5px"}),topRight:yT(yT({},_T),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:yT(yT({},_T),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:yT(yT({},_T),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:yT(yT({},_T),{left:"-10px",top:"-10px",cursor:"nw-resize"})},ET=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return bT(n,e),n.prototype.render=function(){return t.createElement("div",{className:this.props.className||"",style:yT(yT({position:"absolute",userSelect:"none"},xT[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},n}(t.PureComponent),kT=void 0&&(void 0).__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),MT=void 0&&(void 0).__assign||function(){return MT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},MT.apply(this,arguments)},DT={width:"auto",height:"auto"},CT=function(e,t,n){return Math.max(Math.min(e,n),t)},ST=function(e,t){return Math.round(e/t)*t},AT=function(e,t){return new RegExp(e,"i").test(t)},NT=function(e){return Boolean(e.touches&&e.touches.length)},OT=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n}),0),i=Math.abs(t[r]-e);return 0===n||i<n?t[r]:e},TT=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},IT=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},LT=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],FT="__resizable_base__",zT=function(e){function n(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(FT):t.className+=FT,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return kT(n,e),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||DT},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return TT(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?TT(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?TT(t.height):n("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,i=this.props.boundsByDirection,o=this.state.direction,s=i&&AT("left",o),a=i&&AT("top",o);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,o=i.direction,s=i.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=s.width,p=s.height,h=c||0,f=u||0;return AT("right",o)&&(d=s.width+(e-s.x)*r/n,l&&(p=(d-f)/this.ratio+h)),AT("left",o)&&(d=s.width-(e-s.x)*r/n,l&&(p=(d-f)/this.ratio+h)),AT("bottom",o)&&(p=s.height+(t-s.y)*r/n,l&&(d=(p-h)*this.ratio+f)),AT("top",o)&&(p=s.height-(t-s.y)*r/n,l&&(d=(p-h)*this.ratio+f)),{newWidth:d,newHeight:p}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,o=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,a=i.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=s||0,h=a||0;if(o){var f=(u-p)*this.ratio+h,m=(d-p)*this.ratio+h,g=(l-h)/this.ratio+p,b=(c-h)/this.ratio+p,y=Math.max(l,f),v=Math.min(c,m),w=Math.max(u,g),_=Math.min(d,b);e=CT(e,y,v),t=CT(t,w,_)}else e=CT(e,l,c),t=CT(t,u,d);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top,s=r.right,a=r.bottom;this.resizableLeft=i,this.resizableRight=s,this.resizableTop=o,this.resizableBottom=a}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,i=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,i=e.nativeEvent.clientY):e.nativeEvent&&NT(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,i=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var o=this.window.getComputedStyle(this.resizable);if("auto"!==o.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=o.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:MT(MT({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&NT(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,i=n.maxHeight,o=n.minWidth,s=n.minHeight,a=NT(e)?e.touches[0].clientX:e.clientX,l=NT(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,p=c.width,h=c.height,f=this.getParentSize(),m=function(e,t,n,r,i,o,s){return r=IT(r,e.width,t,n),i=IT(i,e.height,t,n),o=IT(o,e.width,t,n),s=IT(s,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,r,i,o,s);r=m.maxWidth,i=m.maxHeight,o=m.minWidth,s=m.minHeight;var g=this.calculateNewSizeFromDirection(a,l),b=g.newHeight,y=g.newWidth,v=this.calculateNewMaxFromBoundary(r,i);this.props.snap&&this.props.snap.x&&(y=OT(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(b=OT(b,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,b,{width:v.maxWidth,height:v.maxHeight},{width:o,height:s});if(y=w.newWidth,b=w.newHeight,this.props.grid){var _=ST(y,this.props.grid[0]),x=ST(b,this.props.grid[1]),E=this.props.snapGap||0;y=0===E||Math.abs(_-y)<=E?_:y,b=0===E||Math.abs(x-b)<=E?x:b}var k={width:y-d.width,height:b-d.height};if(p&&"string"==typeof p)if(p.endsWith("%"))y=y/f.width*100+"%";else if(p.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))b=b/f.height*100+"%";else if(h.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}var M={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(b,"height")};"row"===this.flexDir?M.flexBasis=M.width:"column"===this.flexDir&&(M.flexBasis=M.height),me((function(){t.setState(M)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,k)}},n.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n&&this.resizable){var o={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:MT(MT({},this.state.backgroundStyle),{cursor:"auto"})})}},n.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},n.prototype.renderResizer=function(){var e=this,n=this.props,r=n.enable,i=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,a=n.handleWrapperClass,l=n.handleComponent;if(!r)return null;var c=Object.keys(r).map((function(n){return!1!==r[n]?t.createElement(ET,{key:n,direction:n,onResizeStart:e.onResizeStart,replaceStyles:i&&i[n],className:o&&o[n]},l&&l[n]?l[n]:null):null}));return t.createElement("div",{className:a,style:s},c)},n.prototype.render=function(){var e=this,n=Object.keys(this.props).reduce((function(t,n){return-1!==LT.indexOf(n)||(t[n]=e.props[n]),t}),{}),r=MT(MT(MT({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(r.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return t.createElement(i,MT({ref:this.ref,style:r,className:this.props.className},n),this.state.isResizing&&t.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(t.PureComponent);const jT=e=>{let{align:t,updateAttributes:r,deleteNode:i}=e;const o=[{Icon:O,alignPos:"left",optionName:"Align left"},{Icon:T,alignPos:"center",optionName:"Align Center"},{Icon:I,alignPos:"right",optionName:"Align right"},{Icon:L,optionName:"Delete"}];return n.createElement(k,{buttonProps:{className:"neeto-editor__image-menu-btn"},buttonSize:"small",buttonStyle:"secondary",className:"neeto-editor__image-menu",icon:j,position:"top"},o.map((e=>{let{Icon:o,optionName:s,alignPos:a}=e;return n.createElement(x,{icon:o,key:s,style:a===t?"secondary":"text",tooltipProps:{content:m(s),position:"top"},onClick:()=>(e=>e?r({align:e}):i())(a)})})))},RT=e=>{var t;let{node:r,editor:o,getPos:s,updateAttributes:a,deleteNode:l}=e;const c=i(null),{alt:u,src:d,figheight:p,figwidth:h,align:f}=r.attrs,{view:m}=o;let g=p,y=h;const v=c.current?null===(t=c.current.querySelector("figcaption>div"))||void 0===t?void 0:t.textContent:u;return n.createElement(jM,{className:`neeto-editor__image-wrapper neeto-editor__image--${f}`},n.createElement("figure",{ref:c},n.createElement(jT,{align:f,deleteNode:l,updateAttributes:a}),n.createElement(zT,{lockAspectRatio:!0,className:"neeto-editor__image",size:{height:g,width:y},onResizeStop:(e,t,n)=>{g=n.offsetHeight,y=n.offsetWidth,m.dispatch(m.state.tr.setNodeMarkup(s(),void 0,{...r.attrs,figheight:g,figwidth:y,height:g,width:y})),o.commands.focus()}},n.createElement("img",yb({},r.attrs,{alt:v,src:d}))),n.createElement(zM,{as:"figcaption",className:_s({"is-empty":b(v)})})))},BT=mE.create({name:"image",addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",draggable:!0,isolating:!0,addAttributes:()=>({src:{default:null,parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("src")}},alt:{default:"",parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("alt")}},figheight:{default:288,parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("figheight")}},figwidth:{default:"fit-content",parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("figwidth")}},align:{default:"left",parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("align")}}}),parseHTML:()=>[{tag:"figure",contentElement:"figcaption"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;const{align:r,src:i,figheight:o,figwidth:s}=t.attrs,a={class:"neeto-editor__image",style:`height:${o}px;width:${s}px;`};return["a",{href:i,target:"_blank",rel:"noopener noreferrer",class:`neeto-editor__image-wrapper neeto-editor__image--${r}`},["figure",this.options.HTMLAttributes,["div",a,["img",sx(n,{draggable:!1,contenteditable:!1})]],["figcaption",0]]]},addNodeView:()=>PM(RT),addCommands(){return{setFigure:e=>{let{caption:t,...n}=e;return e=>{let{chain:r}=e;return r().insertContent({type:this.name,attrs:n,content:t?[{type:"text",text:t}]:[]}).command((e=>{let{tr:t,commands:n}=e;const{doc:r,selection:i}=t,o=r.resolve(i.to).end();return n.setTextSelection(o)})).run()}}}}}),PT=async(e,t)=>{if(e.size<=hm){const n=new cb({file:e,url:t}),{blobUrl:r}=await n.create();return r}const n=hm/(1024*1024);return v.error(`Image size should be less than ${n} MB`),""};var UT=e=>{let{uploadEndpoint:t}=e;return BT.extend({addProseMirrorPlugins:()=>[new $n({props:{handleDOMEvents:{paste(e,n){var r,i;const{schema:o,selection:{$anchor:{pos:s}}}=e.state;if(!(null===(r=n.clipboardData)||void 0===r||null===(i=r.files)||void 0===i?void 0:i.length))return;const a=Array.from(n.clipboardData.files).filter((e=>/image/i.test(e.type)));b(a)||(n.preventDefault(),a.forEach((async n=>{const r=o.nodes.image.create({src:await PT(n,t)});if(r.attrs.src){const t=e.state.tr.insert(s,r);e.dispatch(t)}})))}}}})]})},HT=mE.create({name:"figcaption",selectable:!1,draggable:!1,parseHTML:()=>[{tag:"figcaption"}]});const $T=e=>{let{onSubmit:t,shortcuts:n}=e;return kx.create({name:"keyboard-shortcuts",addKeyboardShortcuts(){return{"Mod-Enter":()=>(null==t||t(this.editor.getHTML()),this.editor.commands.blur(),!0),...n}}})};var VT=e=>{let{onSubmit:t,shortcuts:n}=e;return $T({onSubmit:t,shortcuts:n})};const WT=new qn("mention"),qT=mE.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:WT,command:({editor:e,range:t,props:n})=>{var r,i;const o=e.view.state.selection.$to.nodeAfter;(null===(r=null==o?void 0:o.text)||void 0===r?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(i=window.getSelection())||void 0===i||i.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",sx({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:i,anchor:o}=r;return!!i&&(t.doc.nodesBetween(o-1,o,((t,r)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",r,r+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}}),KT=e=>{let{wrapperRef:t,index:n}=e;if(!t.current||n>=t.current.children.length)return;const r=8,i=t.current,o=i.children[n],s=o.clientHeight+r;let a=i.scrollTop;o.offsetTop+s>a+i.clientHeight?a=o.offsetTop-i.clientHeight+s:a>o.offsetTop&&(a=o.offsetTop-r),t.current.scrollTop=a};class GT extends n.Component{constructor(e){super(e),_m(this,"selectItem",(e=>{const{items:t,command:n}=this.props,r=t[e];r&&n({label:r.name,id:r.key})})),_m(this,"upHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+e.length-1)%e.length}}))})),_m(this,"downHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+1)%e.length}}))})),_m(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),_m(this,"onKeyDown",(e=>{let{event:t}=e;const n={ArrowUp:this.upHandler,ArrowDown:this.downHandler,Enter:this.enterHandler};return!!Object.prototype.hasOwnProperty.call(n,t.key)&&(n[t.key](),!0)})),this.state={selectedIndex:0},this.mentionRef=n.createRef()}componentDidUpdate(e){const{items:t}=this.props;t!==e.items&&this.setState({selectedIndex:0}),KT({wrapperRef:this.mentionRef,index:this.state.selectedIndex})}render(){const{selectedIndex:e}=this.state,{items:t}=this.props;return b(t)?n.createElement("div",{className:"neeto-editor-mentions__wrapper"},n.createElement("p",{className:"neeto-editor-mentions__item"},"No Results")):n.createElement("div",{className:"neeto-editor-mentions__wrapper","data-cy":"neeto-editor-mention-list",ref:this.mentionRef},t.map(((t,r)=>{let{key:i,name:o,imageUrl:s}=t;return n.createElement("button",{"data-cy":`neeto-editor-mention-list-${o}`,key:i,type:"button",className:_s("neeto-editor-mentions__item",{active:r===e}),onClick:()=>this.selectItem(r)},n.createElement(S,{user:{name:o,imageUrl:s}}),n.createElement("p",null,o))})))}}function YT(e){return Array.isArray?Array.isArray(e):"[object Array]"===iI(e)}const QT=1/0;function JT(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-QT?"-0":t}(e)}function ZT(e){return"string"==typeof e}function XT(e){return"number"==typeof e}function eI(e){return!0===e||!1===e||function(e){return tI(e)&&null!==e}(e)&&"[object Boolean]"==iI(e)}function tI(e){return"object"==typeof e}function nI(e){return null!=e}function rI(e){return!e.trim().length}function iI(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const oI="Extended search is not available",sI="Incorrect 'index' type",aI=Object.prototype.hasOwnProperty;class lI{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=cI(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function cI(e){let t=null,n=null,r=null,i=1,o=null;if(ZT(e)||YT(e))r=e,t=uI(e),n=dI(e);else{if(!aI.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const s=e.name;if(r=s,aI.call(e,"weight")&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(s));t=uI(s),n=dI(s),o=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:o}}function uI(e){return YT(e)?e:e.split(".")}function dI(e){return YT(e)?e.join("."):e}const pI={useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const i=(e,t,o)=>{if(nI(e))if(t[o]){const s=e[t[o]];if(!nI(s))return;if(o===t.length-1&&(ZT(s)||XT(s)||eI(s)))n.push(JT(s));else if(YT(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,o+1)}else t.length&&i(s,t,o+1)}else n.push(e)};return i(e,ZT(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var hI={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...pI};const fI=/[^ ]+/g;class mI{constructor({getFn:e=hI.getFn,fieldNormWeight:t=hI.fieldNormWeight}={}){this.norm=function(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(t){const i=t.match(fI).length;if(n.has(i))return n.get(i);const o=1/Math.pow(i,.5*e),s=parseFloat(Math.round(o*r)/r);return n.set(i,s),s},clear(){n.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,ZT(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();ZT(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!nI(e)||rI(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(nI(i))if(YT(i)){let e=[];const t=[{nestedArrIndex:-1,value:i}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(nI(r))if(ZT(r)&&!rI(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else YT(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(ZT(i)&&!rI(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function gI(e,t,{getFn:n=hI.getFn,fieldNormWeight:r=hI.fieldNormWeight}={}){const i=new mI({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(cI)),i.setSources(t),i.create(),i}function bI(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=hI.distance,ignoreLocation:o=hI.ignoreLocation}={}){const s=t/e.length;if(o)return s;const a=Math.abs(r-n);return i?s+a/i:a?1:s}const yI=32;function vI(e,t,n,{location:r=hI.location,distance:i=hI.distance,threshold:o=hI.threshold,findAllMatches:s=hI.findAllMatches,minMatchCharLength:a=hI.minMatchCharLength,includeMatches:l=hI.includeMatches,ignoreLocation:c=hI.ignoreLocation}={}){if(t.length>yI)throw new Error((e=>`Pattern length exceeds max of ${e}.`)(yI));const u=t.length,d=e.length,p=Math.max(0,Math.min(r,d));let h=o,f=p;const m=a>1||l,g=m?Array(d):[];let b;for(;(b=e.indexOf(t,f))>-1;){let e=bI(t,{currentLocation:b,expectedLocation:p,distance:i,ignoreLocation:c});if(h=Math.min(e,h),f=b+u,m){let e=0;for(;e<u;)g[b+e]=1,e+=1}}f=-1;let y=[],v=1,w=u+d;const _=1<<u-1;for(let r=0;r<u;r+=1){let o=0,a=w;for(;o<a;){bI(t,{errors:r,currentLocation:p+a,expectedLocation:p,distance:i,ignoreLocation:c})<=h?o=a:w=a,a=Math.floor((w-o)/2+o)}w=a;let l=Math.max(1,p-a+1),b=s?d:Math.min(p+a,d)+u,x=Array(b+2);x[b+1]=(1<<r)-1;for(let o=b;o>=l;o-=1){let s=o-1,a=n[e.charAt(s)];if(m&&(g[s]=+!!a),x[o]=(x[o+1]<<1|1)&a,r&&(x[o]|=(y[o+1]|y[o])<<1|1|y[o+1]),x[o]&_&&(v=bI(t,{errors:r,currentLocation:s,expectedLocation:p,distance:i,ignoreLocation:c}),v<=h)){if(h=v,f=s,f<=p)break;l=Math.max(1,2*p-f)}}if(bI(t,{errors:r+1,currentLocation:p,expectedLocation:p,distance:i,ignoreLocation:c})>h)break;y=x}const x={isMatch:f>=0,score:Math.max(.001,v)};if(m){const e=function(e=[],t=hI.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let s=e.length;o<s;o+=1){let s=e[o];s&&-1===r?r=o:s||-1===r||(i=o-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(g,a);e.length?l&&(x.indices=e):x.isMatch=!1}return x}function wI(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}class _I{constructor(e,{location:t=hI.location,threshold:n=hI.threshold,distance:r=hI.distance,includeMatches:i=hI.includeMatches,findAllMatches:o=hI.findAllMatches,minMatchCharLength:s=hI.minMatchCharLength,isCaseSensitive:a=hI.isCaseSensitive,ignoreLocation:l=hI.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const c=(e,t)=>{this.chunks.push({pattern:e,alphabet:wI(e),startIndex:t})},u=this.pattern.length;if(u>yI){let e=0;const t=u%yI,n=u-t;for(;e<n;)c(this.pattern.substr(e,yI),e),e+=yI;if(t){const e=u-yI;c(this.pattern.substr(e),e)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:n}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}const{location:r,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:a,ignoreLocation:l}=this.options;let c=[],u=0,d=!1;this.chunks.forEach((({pattern:t,alphabet:p,startIndex:h})=>{const{isMatch:f,score:m,indices:g}=vI(e,t,p,{location:r+h,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:a,includeMatches:n,ignoreLocation:l});f&&(d=!0),u+=m,f&&g&&(c=[...c,...g])}));let p={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(p.indices=c),p}}class xI{constructor(e){this.pattern=e}static isMultiMatch(e){return EI(e,this.multiRegex)}static isSingleMatch(e){return EI(e,this.singleRegex)}search(){}}function EI(e,t){const n=e.match(t);return n?n[1]:null}class kI extends xI{constructor(e,{location:t=hI.location,threshold:n=hI.threshold,distance:r=hI.distance,includeMatches:i=hI.includeMatches,findAllMatches:o=hI.findAllMatches,minMatchCharLength:s=hI.minMatchCharLength,isCaseSensitive:a=hI.isCaseSensitive,ignoreLocation:l=hI.ignoreLocation}={}){super(e),this._bitapSearch=new _I(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class MI extends xI{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const DI=[class extends xI{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},MI,class extends xI{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends xI{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends xI{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends xI{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends xI{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},kI],CI=DI.length,SI=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,AI="|";const NI=new Set([kI.type,MI.type]);class OI{constructor(e,{isCaseSensitive:t=hI.isCaseSensitive,includeMatches:n=hI.includeMatches,minMatchCharLength:r=hI.minMatchCharLength,ignoreLocation:i=hI.ignoreLocation,findAllMatches:o=hI.findAllMatches,location:s=hI.location,threshold:a=hI.threshold,distance:l=hI.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:i,location:s,threshold:a,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split(AI).map((e=>{let n=e.trim().split(SI).filter((e=>e&&!!e.trim())),r=[];for(let e=0,i=n.length;e<i;e+=1){const i=n[e];let o=!1,s=-1;for(;!o&&++s<CI;){const e=DI[s];let n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),o=!0)}if(!o)for(s=-1;++s<CI;){const e=DI[s];let n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let i=0,o=[],s=0;for(let r=0,a=t.length;r<a;r+=1){const a=t[r];o.length=0,i=0;for(let t=0,r=a.length;t<r;t+=1){const r=a[t],{isMatch:l,indices:c,score:u}=r.search(e);if(!l){s=0,i=0,o.length=0;break}if(i+=1,s+=u,n){const e=r.constructor.type;NI.has(e)?o=[...o,...c]:o.push(c)}}if(i){let e={isMatch:!0,score:s/i};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}}const TI=[];function II(e,t){for(let n=0,r=TI.length;n<r;n+=1){let r=TI[n];if(r.condition(e,t))return new r(e,t)}return new _I(e,t)}const LI="$and",FI="$or",zI="$path",jI="$val",RI=e=>!(!e[LI]&&!e[FI]),BI=e=>({[LI]:Object.keys(e).map((t=>({[t]:e[t]})))});function PI(e,t,{auto:n=!0}={}){const r=e=>{let i=Object.keys(e);const o=(e=>!!e[zI])(e);if(!o&&i.length>1&&!RI(e))return r(BI(e));if((e=>!YT(e)&&tI(e)&&!RI(e))(e)){const r=o?e[zI]:i[0],s=o?e[jI]:e[r];if(!ZT(s))throw new Error((e=>`Invalid value for key ${e}`)(r));const a={keyId:dI(r),pattern:s};return n&&(a.searcher=II(s,t)),a}let s={children:[],operator:i[0]};return i.forEach((t=>{const n=e[t];YT(n)&&n.forEach((e=>{s.children.push(r(e))}))})),s};return RI(e)||(e=BI(e)),r(e)}function UI(e,t){const n=e.matches;t.matches=[],nI(n)&&n.forEach((e=>{if(!nI(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function HI(e,t){t.score=e.score}class $I{constructor(e,t={},n){if(this.options={...hI,...t},this.options.useExtendedSearch&&!1)throw new Error(oI);this._keyStore=new lI(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof mI))throw new Error(sI);this._myIndex=t||gI(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){nI(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:o,ignoreFieldNorm:s}=this.options;let a=ZT(e)?ZT(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=hI.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:r,score:i})=>{const o=e?e.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(t?1:r))})),e.score=n}))}(a,{ignoreFieldNorm:s}),i&&a.sort(o),XT(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:n=hI.includeMatches,includeScore:r=hI.includeScore}={}){const i=[];return n&&i.push(UI),r&&i.push(HI),e.map((e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach((t=>{t(e,r)})),r}))}(a,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=II(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:e,i:n,n:i})=>{if(!nI(e))return;const{isMatch:o,score:s,indices:a}=t.searchIn(e);o&&r.push({item:e,idx:n,matches:[{score:s,value:e,norm:i,indices:a}]})})),r}_searchLogical(e){const t=PI(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:i}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return o&&o.length?[{idx:r,item:t,matches:o}]:[]}const i=[];for(let o=0,s=e.children.length;o<s;o+=1){const s=e.children[o],a=n(s,t,r);if(a.length)i.push(...a);else if(e.operator===LI)return[]}return i},r=this._myIndex.records,i={},o=[];return r.forEach((({$:e,i:r})=>{if(nI(e)){let s=n(t,e,r);s.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},o.push(i[r])),s.forEach((({matches:e})=>{i[r].matches.push(...e)})))}})),o}_searchObjectList(e){const t=II(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach((({$:e,i:r})=>{if(!nI(e))return;let o=[];n.forEach(((n,r)=>{o.push(...this._findMatches({key:n,value:e[r],searcher:t}))})),o.length&&i.push({idx:r,item:e,matches:o})})),i}_findMatches({key:e,value:t,searcher:n}){if(!nI(t))return[];let r=[];if(YT(t))t.forEach((({v:t,i:i,n:o})=>{if(!nI(t))return;const{isMatch:s,score:a,indices:l}=n.searchIn(t);s&&r.push({score:a,key:e,value:t,idx:i,norm:o,indices:l})}));else{const{v:i,n:o}=t,{isMatch:s,score:a,indices:l}=n.searchIn(i);s&&r.push({score:a,key:e,value:i,norm:o,indices:l})}return r}}$I.version="6.6.2",$I.createIndex=gI,$I.parseIndex=function(e,{getFn:t=hI.getFn,fieldNormWeight:n=hI.fieldNormWeight}={}){const{keys:r,records:i}=e,o=new mI({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o},$I.config=hI,$I.parseQuery=PI,function(...e){TI.push(...e)}(OI);const VI=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.sort(((e,t)=>e.name.localeCompare(t.name)))},WI={render:()=>{let e,t;return{onStart:n=>{e=new RM(GT,{props:n,editor:n.editor}),t=MM("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var r;return"Escape"===n.event.key?(t[0].hide(),!0):null===(r=e.ref)||void 0===r?void 0:r.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},qI=qT.extend({addCommands(){return{setMention:e=>{let{id:t,label:n}=e;return e=>{let{chain:r}=e;r().focus().insertContent([{type:this.name,attrs:{id:t,label:n}},{type:"text",text:" "}]).run()}}}}});var KI=e=>{let{suggestion:t={},...n}=e;return qI.configure({...n,suggestion:{...WI,...t}})};const GI=kx.create({name:"placeholder",addOptions:()=>({excludeNodeTypes:["variable","codeBlock"],emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!1}),addProseMirrorPlugins(){return[new $n({props:{decorations:e=>{let{doc:t,selection:n}=e;const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,o=[];return r?(t.descendants(((e,t)=>{const n=i>=t&&i<=t+e.nodeSize,r=!e.isLeaf&&!e.childCount,s=this.options.excludeNodeTypes.includes(e.type.name);if((n||!this.options.showOnlyCurrent)&&!s&&r){const n=[this.options.emptyNodeClass];this.editor.isEmpty&&n.push(this.options.emptyEditorClass);const r=t_.node(t,t+e.nodeSize,{class:n.join(" "),"data-placeholder":this.options.placeholder});o.push(r)}return this.options.includeChildren})),i_.create(t,o)):null}}})]}});var YI={exports:{}};
|
|
34
|
+
return function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),p=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,h,w,_,x,E,k,M,D,C,S=this._hash.words,A=d.words,N=p.words,O=a.words,T=l.words,I=c.words,L=u.words;for(x=o=S[0],E=s=S[1],k=h=S[2],M=w=S[3],D=_=S[4],n=0;n<80;n+=1)C=o+e[t+O[n]]|0,C+=n<16?f(s,h,w)+A[0]:n<32?m(s,h,w)+A[1]:n<48?g(s,h,w)+A[2]:n<64?b(s,h,w)+A[3]:y(s,h,w)+A[4],C=(C=v(C|=0,I[n]))+_|0,o=_,_=w,w=v(h,10),h=s,s=C,C=x+e[t+T[n]]|0,C+=n<16?y(E,k,M)+N[0]:n<32?b(E,k,M)+N[1]:n<48?g(E,k,M)+N[2]:n<64?m(E,k,M)+N[3]:f(E,k,M)+N[4],C=(C=v(C|=0,L[n]))+D|0,x=D,D=M,M=v(k,10),k=E,E=C;C=S[1]+h+M|0,S[1]=S[2]+w+D|0,S[2]=S[3]+_+x|0,S[3]=S[4]+o+E|0,S[4]=S[0]+s+k|0,S[0]=C},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function f(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function b(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function v(e,t){return e<<t|e>>>32-t}n.RIPEMD160=o._createHelper(h),n.HmacRIPEMD160=o._createHmacHelper(h)}(),e.RIPEMD160}(Nm())),mg(),gg||(gg=1,bg.exports=function(e){return function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,o=t.algo,s=o.SHA1,a=o.HMAC,l=o.PBKDF2=r.extend({cfg:r.extend({keySize:128/32,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=a.create(n.hasher,e),o=i.create(),s=i.create([1]),l=o.words,c=s.words,u=n.keySize,d=n.iterations;l.length<u;){var p=r.update(t).finalize(s);r.reset();for(var h=p.words,f=h.length,m=p,g=1;g<d;g++){m=r.finalize(m),r.reset();for(var b=m.words,y=0;y<f;y++)h[y]^=b[y]}o.concat(p),c[0]++}return o.sigBytes=4*u,o}});t.PBKDF2=function(e,t,n){return l.create(n).compute(e,t)}}(),e.PBKDF2}(Nm(),Jm(),mg())),wg(),Eg(),Dg(),Ag(),Tg(),Fg(),zg||(zg=1,jg.exports=function(e){return e.mode.ECB=((t=e.lib.BlockCipherMode.extend()).Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t),e.mode.ECB;var t}(Nm(),Eg())),Rg||(Rg=1,Bg.exports=function(e){return e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,o=n+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923}(Nm(),Eg())),Pg||(Pg=1,Ug.exports=function(e){return e.pad.Iso10126={pad:function(t,n){var r=4*n,i=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126}(Nm(),Eg())),Hg||(Hg=1,$g.exports=function(e){return e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971}(Nm(),Eg())),Vg||(Vg=1,Wg.exports=function(e){return e.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding}(Nm(),Eg())),qg||(qg=1,Kg.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(Nm(),Eg())),Gg||(Gg=1,Yg.exports=function(e){return function(t){var n=e,r=n.lib.CipherParams,i=n.enc.Hex;n.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return r.create({ciphertext:t})}}}(),e.format.Hex}(Nm(),Eg())),Qg||(Qg=1,Jg.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],s=[],a=[],l=[],c=[],u=[],d=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var f=r^r<<1^r<<2^r<<3^r<<4;f=f>>>8^255&f^99,i[n]=f,o[f]=n;var m=e[n],g=e[m],b=e[g],y=257*e[f]^16843008*f;s[n]=y<<24|y>>>8,a[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*b^65537*g^257*m^16843008*n,u[f]=y<<24|y>>>8,d[f]=y<<16|y>>>16,p[f]=y<<8|y>>>24,h[f]=y,n?(n=m^e[e[e[b^m]]],r^=e[e[r]]):n=r=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=f[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],l=0;l<r;l++){if(s=r-l,l%4)var c=o[s];else c=o[s-4];a[l]=l<4||s<=4?c:u[i[c>>>24]]^d[i[c>>>16&255]]^p[i[c>>>8&255]]^h[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,d,p,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],d=e[t+2]^n[2],p=e[t+3]^n[3],h=4,f=1;f<l;f++){var m=r[c>>>24]^i[u>>>16&255]^o[d>>>8&255]^s[255&p]^n[h++],g=r[u>>>24]^i[d>>>16&255]^o[p>>>8&255]^s[255&c]^n[h++],b=r[d>>>24]^i[p>>>16&255]^o[c>>>8&255]^s[255&u]^n[h++],y=r[p>>>24]^i[c>>>16&255]^o[u>>>8&255]^s[255&d]^n[h++];c=m,u=g,d=b,p=y}m=(a[c>>>24]<<24|a[u>>>16&255]<<16|a[d>>>8&255]<<8|a[255&p])^n[h++],g=(a[u>>>24]<<24|a[d>>>16&255]<<16|a[p>>>8&255]<<8|a[255&c])^n[h++],b=(a[d>>>24]<<24|a[p>>>16&255]<<16|a[c>>>8&255]<<8|a[255&u])^n[h++],y=(a[p>>>24]<<24|a[c>>>16&255]<<16|a[u>>>8&255]<<8|a[255&d])^n[h++],e[t]=m,e[t+1]=g,e[t+2]=b,e[t+3]=y},keySize:256/32});t.AES=n._createHelper(m)}(),e.AES}(Nm(),Hm(),Gm(),wg(),Eg())),eb(),tb||(tb=1,nb.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=r.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var s=i%n,a=t[s>>>2]>>>24-s%4*8&255;o=(o+r[i]+a)%256;var l=r[i];r[i]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:256/32,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}t.RC4=n._createHelper(i);var s=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});t.RC4Drop=n._createHelper(s)}(),e.RC4}(Nm(),Hm(),Gm(),wg(),Eg())),rb||(rb=1,ib.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=[],o=[],s=[],a=r.Rabbit=n.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=c>>>16|4294901760&u,p=u<<16|65535&c;for(i[0]^=c,i[1]^=d,i[2]^=u,i[3]^=p,i[4]^=c,i[5]^=d,i[6]^=u,i[7]^=p,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:128/32,ivSize:64/32});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,a=r>>>16,l=((i*i>>>17)+i*a>>>15)+a*a,c=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=n._createHelper(a)}(),e.Rabbit}(Nm(),Hm(),Gm(),wg(),Eg())),ob||(ob=1,sb.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,r=t.algo,i=[],o=[],s=[],a=r.RabbitLegacy=n.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=c>>>16|4294901760&u,p=u<<16|65535&c;for(r[0]^=c,r[1]^=d,r[2]^=u,r[3]^=p,r[4]^=c,r[5]^=d,r[6]^=u,r[7]^=p,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:128/32,ivSize:64/32});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,a=r>>>16,l=((i*i>>>17)+i*a>>>15)+a*a,c=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=n._createHelper(a)}(),e.RabbitLegacy}(Nm(),Hm(),Gm(),wg(),Eg())));const lb=async e=>{const t=await(e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{const n=ab.lib.WordArray.create(e.target.result);t(ab.MD5(n))},r.onerror=()=>n(new Error("Corrupted file")),r.readAsArrayBuffer(e)})))(e);return t.toString(ab.enc.Base64)};class cb{constructor(e){let{url:t,file:n,progress:r=f}=e;_m(this,"create",(async()=>{const e=await this.generateUrl(),{url:t,headers:n}=e.directUpload;return await this.uploadToCloud(t,n),e})),_m(this,"generateUrl",(async()=>{const e={blob:{filename:this.file.name,byteSize:this.file.size,contentType:this.file.type,checksum:await lb(this.file)}};return xm(this.url,e)})),_m(this,"abort",(()=>this.abortController.abort())),_m(this,"uploadToCloud",((e,t)=>{const n={headers:t,onUploadProgress:this.progress,signal:this.abortController.signal};return Em(e,this.file,n)})),this.url=t,this.file=n,this.progress=r,this.abortController=new AbortController}}class ub extends xs.exports.BasePlugin{constructor(e,t){super(e,t),_m(this,"upload",(e=>{if(b(e))return Promise.resolve();const t=e.map((e=>this.uploadFile(this.uppy.getFile(e))));return Promise.all(t)})),_m(this,"uploadFile",(async e=>{this.uppy.on("file-removed",(n=>{n.id===e.id&&(t.abort(),b(this.uppy.getFiles())&&this.uppy.emit("complete"))})),this.uppy.on("upload-cancel",(n=>{n===e.id&&t.abort()})),this.uppy.on("cancel-all",(()=>t.abort()));const t=new cb({file:e.data,url:this.opts.directUploadUrl,progress:t=>{t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total,progress:Math.round(t.loaded/t.total*100)})}});try{const n=await t.create();return this.uppy.setFileState(e.id,{response:{status:"success"}}),this.uppy.emit("upload-success",e,n),e}catch(t){if(!this.uppy.getFile(e.id))return null;throw this.uppy.setFileState(e.id,{response:{status:"error"}}),this.uppy.emit("upload-error",e,t),t}})),this.type="uploader",this.id=t.id||"ActiveStorageUpload",this.title=t.title||"Active Storage Upload"}install(){this.uppy.addUploader(this.upload)}uninstall(){this.uppy.removeUploader(this.upload)}}const db=e=>{let{endpoint:t,uppyConfig:n,onSuccess:i=(e=>{})}=e;const[o,s]=r(!1),a=e=>{const{maxFileSize:t}=n.restrictions;return!(e.size>t)||(v.error(`File size is too large. Max size is ${ym(n.restrictions.maxFileSize)}.`),!1)},l=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=dm(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof pm)))throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof t.current}`);return um((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}((()=>new oc({...n,onBeforeFileAdded:a}).use(ub,{directUploadUrl:t,...gm}).on("upload",(()=>s(!0))).on("upload-success",((e,t)=>{let{blobUrl:n}=t;return null==i?void 0:i(n)})).on("cancel-all",(()=>s(!1))).on("complete",(()=>{l.reset(),s(!1)}))));return{uppy:l,isUploading:o}};var pb={exports:{}};!function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function n(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof yi&&yi.global===yi?yi:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,s){var a=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):r(l.href)?n(e,t,s):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,s){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,s),o);else if(r(e))n(e,o,s);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){i(a)}))}}:function(e,t,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,r);var a="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,p=d.createObjectURL(e);i?i.location=p:location.href=p,i=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a}()}(pb);var hb=pb.exports;const fb={autoProceed:!1,allowMultipleUploads:!1,restrictions:{maxFileSize:100*1024*1024}},mb="Download",gb="Rename",bb="Delete";function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yb.apply(this,arguments)}var vb={grad:.9,turn:360,rad:360/(2*Math.PI)},wb=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},_b=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},xb=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Eb=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},kb=function(e){return{r:xb(e.r,0,255),g:xb(e.g,0,255),b:xb(e.b,0,255),a:xb(e.a)}},Mb=function(e){return{r:_b(e.r),g:_b(e.g),b:_b(e.b),a:_b(e.a,3)}},Db=/^#([0-9a-f]{3,8})$/i,Cb=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Sb=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:o?s/o*100:0,v:o/255*100,a:i}},Ab=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,a,s,s,l,r][c],g:255*[l,r,r,a,s,s][c],b:255*[s,s,l,r,r,a][c],a:i}},Nb=function(e){return{h:Eb(e.h),s:xb(e.s,0,100),l:xb(e.l,0,100),a:xb(e.a)}},Ob=function(e){return{h:_b(e.h),s:_b(e.s),l:_b(e.l),a:_b(e.a,3)}},Tb=function(e){return Ab((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Ib=function(e){return{h:(t=Sb(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},Lb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,zb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rb={string:[[function(e){var t=Db.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?_b(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?_b(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=zb.exec(e)||jb.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:kb({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Lb.exec(e)||Fb.exec(e);if(!t)return null;var n,r,i=Nb({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(vb[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Tb(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=void 0===i?1:i;return wb(t)&&wb(n)&&wb(r)?kb({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,o=void 0===i?1:i;if(!wb(t)||!wb(n)||!wb(r))return null;var s=Nb({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return Tb(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=void 0===i?1:i;if(!wb(t)||!wb(n)||!wb(r))return null;var s=function(e){return{h:Eb(e.h),s:xb(e.s,0,100),v:xb(e.v,0,100),a:xb(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Ab(s)},"hsv"]]},Bb=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},Pb=function(e,t){var n=Ib(e);return{h:n.h,s:xb(n.s+100*t,0,100),l:n.l,a:n.a}},Ub=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hb=function(e,t){var n=Ib(e);return{h:n.h,s:n.s,l:xb(n.l+100*t,0,100),a:n.a}},$b=function(){function e(e){this.parsed=function(e){return"string"==typeof e?Bb(e.trim(),Rb.string):"object"==typeof e&&null!==e?Bb(e,Rb.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return _b(Ub(this.rgba),2)},e.prototype.isDark=function(){return Ub(this.rgba)<.5},e.prototype.isLight=function(){return Ub(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Mb(this.rgba)).r,n=e.g,r=e.b,o=(i=e.a)<1?Cb(_b(255*i)):"","#"+Cb(t)+Cb(n)+Cb(r)+o;var e,t,n,r,i,o},e.prototype.toRgb=function(){return Mb(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Mb(this.rgba)).r,n=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+r+", "+i+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,i},e.prototype.toHsl=function(){return Ob(Ib(this.rgba))},e.prototype.toHslString=function(){return t=(e=Ob(Ib(this.rgba))).h,n=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+i+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,i},e.prototype.toHsv=function(){return e=Sb(this.rgba),{h:_b(e.h),s:_b(e.s),v:_b(e.v),a:_b(e.a,3)};var e},e.prototype.invert=function(){return Vb({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Vb(Pb(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Vb(Pb(this.rgba,-e))},e.prototype.grayscale=function(){return Vb(Pb(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Vb(Hb(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Vb(Hb(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Vb({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):_b(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Ib(this.rgba);return"number"==typeof e?Vb({h:e,s:t.s,l:t.l,a:t.a}):_b(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Vb(e).toHex()},e}(),Vb=function(e){return e instanceof $b?e:new $b(e)},Wb=[];var qb=1/0,Kb="[object Symbol]",Gb="object"==typeof yi&&yi&&yi.Object===Object&&yi,Yb="object"==typeof self&&self&&self.Object===Object&&self,Qb=Gb||Yb||Function("return this")(),Jb=Object.prototype,Zb=0,Xb=Jb.toString,ey=Qb.Symbol,ty=ey?ey.prototype:void 0,ny=ty?ty.toString:void 0;function ry(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Xb.call(e)==Kb}(e))return ny?ny.call(e):"";var t=e+"";return"0"==t&&1/e==-qb?"-0":t}var iy=function(e){var t,n=++Zb;return(null==(t=e)?"":ry(t))+n},oy={"3d":n.createElement("path",{d:"M18 14.625V3.375L9 0 0 3.375v11.25L9 18l9-3.375zM9 2.136l5.918 2.22-5.98 2.242-5.919-2.22L9 2.137zM2 13.239V5.065l6.438 2.414v8.174L2 13.24zM9.438 15.7L16 13.239V5.018l-6.563 2.46V15.7z",transform:"translate(15 10)",fillRule:"evenodd"}),acrobat:n.createElement("path",{d:"M10.15 1.095C9.938.33 9.42-.051 8.984.005c-.528.068-1.09.382-1.314.876-.63 1.416.685 5.582.887 6.279-1.28 3.863-5.66 11.5-7.806 12.017-.045-.505.225-1.965 3.055-3.785.146-.157.315-.348.393-.472-2.392 1.168-5.492 3.044-3.628 4.448.102.079.259.146.439.213 1.426.528 3.425-1.201 5.435-5.121 2.213-.73 3.999-1.28 6.526-1.662 2.762 1.875 4.616 2.257 5.874 1.774.348-.135.898-.573 1.055-1.145-1.022 1.258-3.414.382-5.323-.82 1.763-.191 3.582-.303 4.369-.056 1 .314.965.808.954.876.079-.27.191-.708-.022-1.056-.842-1.37-4.706-.573-6.11-.427-2.212-1.336-3.74-3.717-4.358-5.436.573-2.212 1.19-3.818.742-5.413zm-.954 4.638C8.826 4.42 8.309 1.5 9.14.556c1.628.932.618 3.144.056 5.177zm3.044 6.514c-2.134.393-3.583.944-5.66 1.764.617-1.202 1.785-4.268 2.346-6.29.787 1.573 1.741 3.111 3.314 4.526z",transform:"translate(14 9)",fillRule:"evenodd"}),audio:n.createElement("path",{d:"M.25 4.75v4.5h3L7 13V1L3.25 4.75h-3zM10.375 7A3.375 3.375 0 0 0 8.5 3.977v6.037A3.355 3.355 0 0 0 10.375 7zM8.5.421v1.545A5.254 5.254 0 0 1 12.25 7a5.254 5.254 0 0 1-3.75 5.032v1.545A6.747 6.747 0 0 0 13.75 7 6.747 6.747 0 0 0 8.5.421z",transform:"translate(17 12)",fillRule:"evenodd"}),binary:n.createElement("path",{d:"M2.338 6.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504C1.274.928.538 2 .538 3.608c0 1.56.576 2.504 1.8 2.504zM1.61 3.408c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zM2.418 5.2c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568zm7.03.8l.088-.944H8.36V.896L7.272.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zm5.199 0l.088-.944h-1.176V.896L12.47.984v.592l-1.184.112.024.824h1.16v2.544h-1.32V6zM4.25 14l.088-.944H3.162v-4.16l-1.088.088v.592L.89 9.688l.024.824h1.16v2.544H.754V14zm5.198 0l.088-.944H8.36v-4.16l-1.088.088v.592l-1.184.112.024.824h1.16v2.544h-1.32V14zm3.287.112c1.192 0 1.928-1.072 1.928-2.68 0-1.56-.576-2.504-1.8-2.504-1.192 0-1.928 1.072-1.928 2.68 0 1.56.576 2.504 1.8 2.504zm-.728-2.704c0-1.008.24-1.568.776-1.568.376 0 .616.336.728.888l-1.504.776v-.096zm.808 1.792c-.368 0-.608-.32-.72-.856l1.496-.768v.056c0 1.008-.24 1.568-.776 1.568z",transform:"translate(16 11)",fillRule:"evenodd"}),code:n.createElement("path",{d:"M4.078 13.67c-1.875-.527-2.812-1.738-2.812-3.634V9.49C1.266 8.437.844 7.911 0 7.911V6.138c.844 0 1.266-.529 1.266-1.586v-.64c.015-.938.257-1.696.726-2.274C2.466 1.06 3.162.64 4.078.38l.492 1.375c-.656.25-.997.95-1.023 2.102v.695c0 1.167-.482 1.99-1.445 2.469.963.479 1.445 1.304 1.445 2.476v.688c.026 1.15.367 1.851 1.023 2.101l-.492 1.383zm7.844 0c1.875-.527 2.812-1.738 2.812-3.634V9.49c0-1.052.422-1.578 1.266-1.578V6.138c-.844 0-1.266-.529-1.266-1.586v-.64c-.015-.938-.257-1.696-.726-2.274-.474-.578-1.17-.998-2.086-1.258l-.492 1.375c.656.25.997.95 1.023 2.102v.695c0 1.167.482 1.99 1.445 2.469-.963.479-1.445 1.304-1.445 2.476v.688c-.026 1.15-.367 1.851-1.023 2.101l.492 1.383z",transform:"translate(16 13)",fillRule:"evenodd"}),code2:n.createElement("path",{d:"M7.4 10.6L2.8 6l4.6-4.6L6 0 0 6l6 6 1.4-1.4zm5.2 0L17.2 6l-4.6-4.6L14 0l6 6-6 6-1.4-1.4z",transform:"translate(14 14)",fillRule:"evenodd"}),compressed:n.createElement("path",{d:"M.25 0A.25.25 0 0 0 0 .25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 1.75V.25A.25.25 0 0 0 1.75 0H.25zM1 17a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1H1zm0 4v3h2v-3H1zM2 2.25A.25.25 0 0 1 2.25 2h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 3.75v-1.5zM.25 4a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 5.75v-1.5A.25.25 0 0 0 1.75 4H.25zM2 6.25A.25.25 0 0 1 2.25 6h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 7.75v-1.5zM.25 8a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5A.25.25 0 0 0 2 9.75v-1.5A.25.25 0 0 0 1.75 8H.25zM2 10.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5zM.25 12a.25.25 0 0 0-.25.25v1.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25v-1.5a.25.25 0 0 0-.25-.25H.25zM2 14.25a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v1.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5z",transform:"translate(15 1)",fillRule:"evenodd"}),document:n.createElement("path",{d:"M12 4H0v2h12V4zM0 10h18V8H0v2zM0 0v2h18V0H0z",transform:"translate(15 15)",fillRule:"evenodd"}),drive:n.createElement("path",{d:"M2.199.289A.5.5 0 0 1 2.652 0h8.696a.5.5 0 0 1 .453.289l1.867 4a.5.5 0 0 1-.453.711H.785a.5.5 0 0 1-.453-.711l1.867-4zM13 6H1a.752.752 0 0 0-.75.75v4.5c0 .412.338.75.75.75h12c.412 0 .75-.338.75-.75v-4.5A.752.752 0 0 0 13 6zm-9.75 4.5c-.825 0-1.5-.675-1.5-1.5s.675-1.5 1.5-1.5 1.5.675 1.5 1.5-.675 1.5-1.5 1.5z",transform:"translate(17 13)",fillRule:"evenodd"}),font:n.createElement("path",{d:"M3.722 8.702l-.686 1.89c-.053.14-.094.28-.123.421-.03.135-.044.252-.044.352 0 .304.097.527.29.668.2.14.501.21.905.21h.414V13H.083v-.756h.343c.176 0 .325-.018.448-.053a.81.81 0 0 0 .334-.22c.1-.105.193-.249.281-.43.094-.182.197-.416.308-.704L5.787.15h1.406l4.07 11.136c.07.187.14.343.21.466.077.123.165.222.264.298.1.07.214.12.343.15.129.03.281.044.457.044h.237V13H7.826v-.756h.413c.72 0 1.081-.287 1.081-.862 0-.1-.014-.202-.044-.307a3.274 3.274 0 0 0-.105-.36l-.72-2.013H3.72zM7.009 4.65c-.188-.533-.36-1.031-.519-1.494a15.92 15.92 0 0 1-.378-1.354 7.12 7.12 0 0 1-.15.633 16.95 16.95 0 0 1-.395 1.283c-.082.229-.175.484-.28.765L4.063 7.796h4.061L7.009 4.65zm8.411 5.74c0 .562.117.984.351 1.265.24.275.61.413 1.108.413.363 0 .691-.059.984-.176.3-.117.551-.284.756-.5.211-.218.372-.481.483-.792.112-.31.168-.656.168-1.037V8.104l-1.152.053c-.51.023-.937.088-1.283.193-.34.1-.615.243-.826.43a1.546 1.546 0 0 0-.457.678c-.088.27-.132.58-.132.931zm2.18-6.32c-.346 0-.627.05-.844.15a1.182 1.182 0 0 0-.501.404 1.594 1.594 0 0 0-.237.624c-.041.24-.062.5-.062.782-.498 0-.879-.085-1.143-.255-.257-.17-.386-.463-.386-.879 0-.31.085-.574.255-.79.17-.218.401-.393.694-.528.299-.14.644-.243 1.037-.308a7.76 7.76 0 0 1 1.257-.097c.55 0 1.031.056 1.441.167.41.106.753.282 1.029.528.275.246.48.568.615.967.14.392.21.876.21 1.45v4.667c0 .252.021.46.062.624a.928.928 0 0 0 .194.395c.088.1.202.17.343.211.146.041.319.062.518.062h.053V13H19.7l-.281-1.547h-.15c-.187.252-.369.483-.544.694-.176.211-.37.393-.58.545-.211.152-.452.27-.721.352a3.053 3.053 0 0 1-.958.131c-.399 0-.77-.058-1.116-.175a2.369 2.369 0 0 1-.888-.519 2.516 2.516 0 0 1-.58-.896c-.14-.364-.211-.791-.211-1.284 0-.955.34-1.664 1.02-2.127.68-.462 1.707-.714 3.084-.755l1.495-.053V6.285a6.93 6.93 0 0 0-.053-.888 1.778 1.778 0 0 0-.229-.703 1.14 1.14 0 0 0-.51-.457c-.216-.111-.51-.167-.878-.167z",transform:"translate(13 12)",fillRule:"evenodd"}),image:n.createElement("path",{d:"M13 0L9.25 5l2.85 3.8-1.6 1.2C8.81 7.75 6 4 6 4l-6 8h22L13 0z",transform:"translate(13 14)",fillRule:"evenodd"}),presentation:n.createElement("path",{d:"M2 4H0v10c0 1.1.9 2 2 2h14v-2H2V4zm16-4H6C4.9 0 4 .9 4 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm0 10H6V2h12v8z",transform:"matrix(-1 0 0 1 34 12)",fillRule:"evenodd"}),settings:n.createElement("path",{d:"M13.572 8.735c.03-.24.053-.48.053-.735s-.023-.495-.053-.735l1.583-1.237a.378.378 0 0 0 .09-.48l-1.5-2.595a.377.377 0 0 0-.457-.165l-1.868.75a5.48 5.48 0 0 0-1.268-.735L9.868.815A.366.366 0 0 0 9.5.5h-3a.366.366 0 0 0-.367.315l-.285 1.988a5.762 5.762 0 0 0-1.268.735l-1.868-.75a.366.366 0 0 0-.457.165l-1.5 2.595a.37.37 0 0 0 .09.48l1.583 1.237c-.03.24-.053.488-.053.735 0 .248.022.495.053.735L.845 9.973a.378.378 0 0 0-.09.48l1.5 2.595c.09.165.292.225.458.165l1.867-.75c.39.3.81.547 1.268.735l.285 1.987c.022.18.18.315.367.315h3a.366.366 0 0 0 .367-.315l.285-1.988a5.762 5.762 0 0 0 1.268-.734l1.867.75c.173.067.368 0 .458-.165l1.5-2.595a.378.378 0 0 0-.09-.48l-1.582-1.238zM8 10.625A2.628 2.628 0 0 1 5.375 8 2.628 2.628 0 0 1 8 5.375 2.628 2.628 0 0 1 10.625 8 2.628 2.628 0 0 1 8 10.625z",transform:"translate(16 11)",fillRule:"evenodd"}),spreadsheet:n.createElement("path",{d:"M0 8h6V5H0v3zm0 5h6v-3H0v3zM0 3h6V0H0v3zm8 5h12V5H8v3zm0 5h12v-3H8v3zM8 0v3h12V0H8z",transform:"translate(14 14)",fillRule:"evenodd"}),vector:n.createElement("path",{d:"M14.5 2V1a1 1 0 0 0-1-1h-3a1 1 0 0 0-1 1v1H3.937a2 2 0 1 0 0 1h3.936A9 9 0 0 0 3 11v1h2v-1a7.003 7.003 0 0 1 4.594-6.576A1 1 0 0 0 10.5 5h3a1 1 0 0 0 .906-.576A7.003 7.003 0 0 1 19 11v1h2v-1a9 9 0 0 0-4.873-8h3.936a2 2 0 1 0 0-1H14.5zm-1-1h-3v3h3V1zM2 1.5a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm19 1a1 1 0 1 0 2 0 1 1 0 0 0-2 0z",transform:"translate(12 14)",fillRule:"evenodd"}),video:n.createElement("path",{d:"M10.75 3.875V1.25A.752.752 0 0 0 10 .5H1a.752.752 0 0 0-.75.75v7.5c0 .412.338.75.75.75h9c.412 0 .75-.338.75-.75V6.125l3 3V.875l-3 3z",transform:"translate(17 14)"})};!function(e){e.forEach((function(e){Wb.indexOf(e)<0&&(e($b,Rb),Wb.push(e))}))}([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var i,s,a=r[this.toHex()];if(a)return a;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!o.length)for(var d in n)o[d]=new e(n[d]).toRgb();for(var p in n){var h=(i=l,s=o[p],Math.pow(i.r-s.r,2)+Math.pow(i.g-s.g,2)+Math.pow(i.b-s.b,2));h<c&&(c=h,u=p)}return u}},t.string.push([function(t){var r=t.toLowerCase(),i="transparent"===r?"#0000":n[r];return i?new e(i).toRgb():null},"name"])}]);var sy={color:jh.exports.string,extension:jh.exports.string,fold:jh.exports.bool,foldColor:jh.exports.string,glyphColor:jh.exports.string,gradientColor:jh.exports.string,gradientOpacity:jh.exports.number,labelColor:jh.exports.string,labelTextColor:jh.exports.string,labelUppercase:jh.exports.bool,radius:jh.exports.number,type:jh.exports.oneOf(["3d","acrobat","audio","binary","code","code2","compressed","document","drive","font","image","presentation","settings","spreadsheet","vector","video"])},ay=40,ly=48,cy={WIDTH:ay,HEIGHT:ly,X_OFFSET:0},uy=12,dy=14,py=function(e){var t=e.color,r=void 0===t?"whitesmoke":t,i=e.extension,o=e.fold,s=void 0===o||o,a=e.foldColor,l=e.glyphColor,c=e.gradientColor,u=void 0===c?"white":c,d=e.gradientOpacity,p=void 0===d?.25:d,h=e.labelColor,f=e.labelTextColor,m=void 0===f?"white":f,g=e.labelUppercase,b=void 0!==g&&g,y=e.radius,v=void 0===y?4:y,w=e.type,_=iy();return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 "+ay+" "+ly,width:"100%",style:{maxWidth:"100%"}},n.createElement("defs",null,n.createElement("clipPath",{id:"pageRadius"+_},n.createElement("rect",{x:cy.X_OFFSET,y:"0",rx:v,ry:v,width:cy.WIDTH,height:cy.HEIGHT})),n.createElement("clipPath",{id:"foldCrop"},n.createElement("rect",{width:cy.WIDTH,height:uy,transform:"rotate(-45 0 "+uy+")"})),n.createElement("linearGradient",{x1:"100%",y1:"0%",y2:"100%",id:"pageGradient"+_},n.createElement("stop",{stopColor:u,stopOpacity:p,offset:"0%"}),n.createElement("stop",{stopColor:u,stopOpacity:"0",offset:"66.67%"}))),n.createElement("g",{id:"file",clipPath:"url(#pageRadius"+_+")"},s?n.createElement(n.Fragment,null,n.createElement("path",{d:"M"+cy.X_OFFSET+" 0 h "+(cy.WIDTH-uy)+" L "+(cy.WIDTH+cy.X_OFFSET)+" "+uy+" v "+(cy.HEIGHT-uy)+" H "+cy.X_OFFSET+" Z",fill:r}),n.createElement("path",{d:"M"+cy.X_OFFSET+" 0 h "+(cy.WIDTH-uy)+" L "+(cy.WIDTH+cy.X_OFFSET)+" "+uy+" v "+(cy.HEIGHT-uy)+" H "+cy.X_OFFSET+" Z",fill:"url(#pageGradient"+_+")"})):n.createElement(n.Fragment,null,n.createElement("rect",{x:cy.X_OFFSET,y:"0",width:cy.WIDTH,height:cy.HEIGHT,fill:r}),n.createElement("rect",{x:cy.X_OFFSET,y:"0",width:cy.WIDTH,height:cy.HEIGHT,fill:"url(#pageGradient"+_+")"}))),s&&n.createElement("g",{transform:"translate(28 "+uy+") rotate(-90)"},n.createElement("rect",{width:cy.WIDTH,height:cy.HEIGHT,fill:a||Vb(r).darken(.1).toHex(),rx:v,ry:v,clipPath:"url(#foldCrop)"})),i&&n.createElement(n.Fragment,null,n.createElement("g",{id:"label"},n.createElement("rect",{fill:h||Vb(r).darken(.3).toHex(),x:cy.X_OFFSET,y:cy.HEIGHT-dy,width:cy.WIDTH,height:dy,clipPath:"url(#pageRadius"+_+")"})),n.createElement("g",{id:"labelText",transform:"translate("+cy.X_OFFSET+" 34)"},n.createElement("text",{x:cy.WIDTH/2,y:"10",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"9",fill:m,textAnchor:"middle",style:{fontWeight:"bold",textAlign:"center",pointerEvents:"none",textTransform:b?"uppercase":"none",userSelect:"none"}},i))),w&&n.createElement("g",{transform:"translate(-4 "+(i?0:6)+")",fill:l||Vb(r).darken(.15).toHex()},oy[w]))};py.propTypes=sy;var hy={"3dm":{labelColor:"#8D1A11",type:"3d"},"3ds":{labelColor:"#5FB9AD",type:"3d"},"3g2":{type:"video"},"3gp":{type:"video"},"7zip":{type:"compressed"},aac:{type:"audio"},aep:{type:"video"},ai:{color:"#423325",gradientOpacity:0,labelColor:"#423325",labelTextColor:"#FF7F18",labelUppercase:!0,foldColor:"#FF7F18",radius:2},aif:{type:"audio"},aiff:{type:"audio"},asf:{type:"video"},asp:{type:"code"},aspx:{type:"code"},avi:{type:"video"},bin:{type:"binary"},bmp:{type:"image"},c:{type:"code"},cpp:{type:"code"},cs:{type:"code"},css:{type:"code"},csv:{type:"spreadsheet"},cue:{type:"document"},dll:{type:"settings"},dmg:{type:"drive"},doc:{color:"#2C5898",foldColor:"#254A80",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#2C5898",labelUppercase:!0,type:"document"},docx:{color:"#2C5898",foldColor:"#254A80",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#2C5898",labelUppercase:!0,type:"document"},dwg:{type:"vector"},dxf:{type:"vector"},eot:{type:"font"},eps:{type:"vector"},exe:{type:"settings"},flac:{type:"audio"},flv:{type:"video"},fnt:{type:"font"},fodp:{type:"presentation"},fods:{type:"spreadsheet"},fodt:{type:"document"},fon:{type:"font"},gif:{type:"image"},gz:{type:"compressed"},htm:{type:"code"},html:{type:"code"},indd:{color:"#4B2B36",gradientOpacity:0,labelColor:"#4B2B36",labelTextColor:"#FF408C",labelUppercase:!0,foldColor:"#FF408C",radius:2},ini:{type:"settings"},java:{type:"code"},jpeg:{type:"image"},jpg:{type:"image"},js:{labelColor:"#F7DF1E",type:"code"},json:{type:"code"},jsx:{labelColor:"#00D8FF",type:"code"},m4a:{type:"audio"},m4v:{type:"video"},max:{labelColor:"#5FB9AD",type:"3d"},md:{type:"document"},mid:{type:"audio"},mkv:{type:"video"},mov:{type:"video"},mp3:{type:"audio"},mp4:{type:"video"},mpeg:{type:"video"},mpg:{type:"video"},obj:{type:"3d"},odp:{type:"presentation"},ods:{type:"spreadsheet"},odt:{type:"document"},ogg:{type:"audio"},ogv:{type:"video"},otf:{type:"font"},pdf:{labelColor:"#D93831",type:"acrobat"},php:{labelColor:"#8892BE",type:"code"},pkg:{type:"3d"},plist:{type:"settings"},png:{type:"image"},ppt:{color:"#D14423",foldColor:"#AB381D",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#D14423",labelUppercase:!0,type:"presentation"},pptx:{color:"#D14423",foldColor:"#AB381D",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#D14423",labelUppercase:!0,type:"presentation"},pr:{type:"video"},ps:{type:"vector"},psd:{color:"#34364E",gradientOpacity:0,labelColor:"#34364E",labelTextColor:"#31C5F0",labelUppercase:!0,foldColor:"#31C5F0",radius:2},py:{labelColor:"#FFDE57",type:"code"},rar:{type:"compressed"},rb:{labelColor:"#BB271A",type:"code"},rm:{type:"video"},rtf:{type:"document"},scss:{labelColor:"#C16A98",type:"code"},sitx:{type:"compressed"},svg:{type:"vector"},swf:{type:"video"},sys:{type:"settings"},tar:{type:"compressed"},tex:{type:"document"},tif:{type:"image"},tiff:{type:"image"},ts:{labelColor:"#3478C7",type:"code"},ttf:{type:"font"},txt:{type:"document"},wav:{type:"audio"},webm:{type:"video"},wmv:{type:"video"},woff:{type:"font"},wpd:{type:"document"},wps:{type:"document"},xlr:{type:"spreadsheet"},xls:{color:"#1A754C",foldColor:"#16613F",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#1A754C",labelUppercase:!0,type:"spreadsheet"},xlsx:{color:"#1A754C",foldColor:"#16613F",glyphColor:"rgba(255,255,255,0.4)",labelColor:"#1A754C",labelUppercase:!0,type:"spreadsheet"},yml:{type:"code"},zip:{type:"compressed"},zipx:{type:"compressed"}};const fy=e=>{let{fileName:t}=e;const r=t.match(/([^.]+)$/)[1];return n.createElement("div",{className:"ne-attachments__attachment-file-icon"},n.createElement(py,yb({extension:r,labelColor:"#4558f9"},hy[r])))},{Menu:my,MenuItem:gy}=k,by=e=>{let{attachment:t,endpoint:i,onChange:o,attachments:s,disabled:a}=e;const[l,c]=r(!1),[u,d]=r(!1),[p,h]=r(!1),[f,m]=r(""),g=async()=>{h(!0);try{const{signedId:e}=t;await Mm(i,e),o(s.filter((t=>t.signedId!==e)))}catch(e){v.error(e)}},y={[mb]:()=>{hb(t.url,t.fileName)},[gb]:async()=>{try{const{signedId:e}=t,n={blob:{filename:f}},{blob:{filename:r}}=await km(i,e,n);o(s.map((t=>t.signedId===e?pe("filename",r,t):t)))}catch(e){v.error(e)}finally{c(!1),m("")}},[bb]:g};return n.createElement(n.Fragment,null,n.createElement("div",{className:"ne-attachments__attachment"},l?n.createElement(n.Fragment,null,n.createElement(w,{content:f,position:"top"},n.createElement(_,{autoFocus:!0,error:b(f)?"Filename cannot be empty":"",size:"small",value:f,onChange:e=>m(e.target.value),onKeyDown:e=>(e=>{let{event:t,key:n}=e;const r=y[n];"Enter"===t.key&&r&&!b(f)&&(t.preventDefault(),r()),"Escape"===t.key&&(c(!1),m(""))})({event:e,key:gb})})),n.createElement(x,{icon:F,size:"small",style:"text",onClick:()=>c(!1)})):n.createElement(n.Fragment,null,n.createElement(fy,{fileName:t.filename}),n.createElement(w,{content:t.filename,position:"top"},n.createElement(E,{style:"body2"},t.filename)),n.createElement(w,{content:"You are not permitted to update or delete attachments",disabled:!a,position:"top"},n.createElement("span",null,n.createElement(k,{buttonSize:"small",buttonStyle:"text",disabled:a,icon:z},n.createElement(my,null,Object.entries(y).map((e=>{let[r,i]=e;return n.createElement(gy.Button,{key:r,onClick:()=>(e=>{let{key:n,handler:r}=e;n===gb?(c(!0),m(t.filename)):n===bb?(m(t.filename),d(!0)):r()})({key:r,handler:i})},r)})))))))),n.createElement(M,{isOpen:u,isSubmitting:p,message:`Are you sure you want to remove ${f}?`,title:"Remove Attachment?",onClose:()=>d(!1),onSubmit:g}))},yy=e=>{let{attachment:t,uppy:r,removeUploadingFile:i}=e;const o=`${t.progress}%`;return n.createElement("div",{className:"ne-attachments__attachment"},n.createElement("div",{className:"ne-attachments__attachment__progress-icon"},n.createElement(py,null)),n.createElement("div",{className:"ne-attachments__attachment__progress"},n.createElement(E,{style:"body2"},t.filename),n.createElement(E,{style:"body2"},o)),n.createElement(x,{icon:F,size:"small",style:"text",onClick:()=>{r.removeFile(t.id),i(t.id)}}))},vy=(e,t)=>{var a;let{endpoint:l=Yn,attachments:c=[],className:u="",onChange:d=(e=>{}),isIndependent:p=!0,disabled:h=!1,dragDropRef:f=null,config:m={}}=e;const[g,w]=r([]),_=i(null),{uppy:E,isUploading:k}=db({endpoint:l,uppyConfig:(M=m,he(fb,{restrictions:M}))});var M;const D=()=>{(e=>{let{uppy:t,config:n,previousAttachmentsCount:r}=e;const{maxNumberOfFiles:i}=n;if(i&&t.getFiles().length+r>i)return v.warning(`You can only attach ${i} files`),t.reset(),!1;return!0})({uppy:E,config:m,previousAttachmentsCount:c.length})&&C()},C=()=>{const e=E.getFiles().map((e=>({id:e.id,filename:e.name,signedId:"awaiting",url:"",progress:0})));b(e)?E.reset():(w((t=>[...t,...e])),_.current.value=null,S())},S=async()=>{try{const e=await E.upload();if(y(e))return;const t=e.successful.map((e=>({filename:e.name,signedId:e.response.signedId,url:e.response.blobUrl})));w([]),d([...c,...t])}catch(e){v.error(e)}finally{E.reset()}},A=(e,t)=>{w((n=>n.map((n=>({...n,progress:n.filename!==e.name?n.progress:t.progress})))))},N=e=>{w((t=>t.filter((t=>t.id!==e))))},O=()=>_.current.click();return o(t,(()=>({handleUploadAttachments:O})),[]),s((()=>(E.on("upload-progress",A),null!=f&&f.current&&E.use(vs,{target:f.current,onDrop:D}),()=>{const e=E.getPlugin("DropTarget");e&&E.removePlugin(e),E.off("upload-progress",A)})),[c]),n.createElement("div",{className:_s("ne-attachments",{[u]:u})},n.createElement("div",{className:"ne-attachments__items"},c.map((e=>n.createElement(by,{attachment:e,attachments:c,disabled:h,endpoint:l,key:e.signedId,onChange:d}))),g.map((e=>n.createElement(yy,{attachment:e,key:e.id,removeUploadingFile:N,uppy:E})))),n.createElement("div",null,p&&n.createElement(x,{disabled:k,label:"Add attachments",loading:k,size:"medium",style:"link",onClick:O}),n.createElement("input",{accept:null===(a=m.allowedFileTypes)||void 0===a?void 0:a.join(","),multiple:1!==m.maxNumberOfFiles,ref:_,type:"file",onChange:e=>{const t=(e=>{let{previousAttachmentsCount:t,config:n,files:r}=e;const{maxNumberOfFiles:i}=n;if(i){const e=i-t;if(e<=0)return v.warning(`You can only attach ${i} files`),[];const n=Array.from(r).slice(0,e);return n.length<r.length&&v.warning(`You can only attach ${i} files`),n}return Array.from(r)})({previousAttachmentsCount:c.length,config:m,files:e.target.files});t.forEach((e=>{E.addFile({name:e.name,type:e.type,data:e})})),C()},onClick:e=>{b(c)||1!==m.maxNumberOfFiles||(e.preventDefault(),v.warning("Only one attachment is allowed"))}})))};var wy=n.forwardRef(vy);const _y="undefined"!=typeof navigator?navigator:null,xy="undefined"!=typeof document?document:null,Ey=_y&&_y.userAgent||"",ky=/Edge\/(\d+)/.exec(Ey),My=/MSIE \d/.exec(Ey),Dy=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ey),Cy=!!(My||Dy||ky),Sy=My?document.documentMode:Dy?+Dy[1]:ky?+ky[1]:0,Ay=!Cy&&/gecko\/(\d+)/i.test(Ey);Ay&&(/Firefox\/(\d+)/.exec(Ey)||[0,0])[1];const Ny=!Cy&&/Chrome\/(\d+)/.exec(Ey),Oy=!!Ny,Ty=Ny?+Ny[1]:0,Iy=!Cy&&!!_y&&/Apple Computer/.test(_y.vendor),Ly=Iy&&(/Mobile\/\w+/.test(Ey)||!!_y&&_y.maxTouchPoints>2),Fy=Ly||!!_y&&/Mac/.test(_y.platform),zy=/Android \d/.test(Ey),jy=!!xy&&"webkitFontSmoothing"in xy.documentElement.style,Ry=jy?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,By=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Py=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let Uy=null;const Hy=function(e,t,n){let r=Uy||(Uy=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},$y=function(e,t,n,r){return n&&(Wy(e,t,n,r,-1)||Wy(e,t,n,r,1))},Vy=/^(img|br|input|textarea|hr)$/i;function Wy(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:qy(e))){let n=e.parentNode;if(!n||1!=n.nodeType||Ky(e)||Vy.test(e.nodeName)||"false"==e.contentEditable)return!1;t=By(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?qy(e):0}}}function qy(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ky(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Gy=function(e){let t=e.isCollapsed;return t&&Oy&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function Yy(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Qy(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Jy(e,t){return"number"==typeof e?e:e[t]}function Zy(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Xy(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;s=Py(s)){if(1!=s.nodeType)continue;let e=s,n=e==o.body,a=n?Qy(o):Zy(e),l=0,c=0;if(t.top<a.top+Jy(r,"top")?c=-(a.top-t.top+Jy(i,"top")):t.bottom>a.bottom-Jy(r,"bottom")&&(c=t.bottom-a.bottom+Jy(i,"bottom")),t.left<a.left+Jy(r,"left")?l=-(a.left-t.left+Jy(i,"left")):t.right>a.right-Jy(r,"right")&&(l=t.right-a.right+Jy(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}if(n)break}}function ev(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Py(r));return t}function tv(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let nv=null;function rv(e,t){let n,r,i=2e8,o=0,s=t.top,a=t.top;for(let l=e.firstChild,c=0;l;l=l.nextSibling,c++){let e;if(1==l.nodeType)e=l.getClientRects();else{if(3!=l.nodeType)continue;e=Hy(l).getClientRects()}for(let u=0;u<e.length;u++){let d=e[u];if(d.top<=s&&d.bottom>=a){s=Math.max(d.bottom,s),a=Math.min(d.top,a);let e=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(e<i){n=l,i=e,r=e&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==l.nodeType&&e&&(o=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let n=av(r,1);if(n.top!=n.bottom&&iv(t,n))return{node:e,offset:i+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:e,offset:o}:rv(n,r)}function iv(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function ov(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=e.childNodes[o];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(iv(t,i))return ov(n,t,i)}}if((o=(o+1)%r)==i)break}return e}function sv(e,t){let n,r=e.dom.ownerDocument,i=0;if(r.caretPositionFromPoint)try{let e=r.caretPositionFromPoint(t.left,t.top);e&&({offsetNode:n,offset:i}=e)}catch(e){}if(!n&&r.caretRangeFromPoint){let e=r.caretRangeFromPoint(t.left,t.top);e&&({startContainer:n,startOffset:i}=e)}let o,s=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!s||!e.dom.contains(1!=s.nodeType?s.parentNode:s)){let n=e.dom.getBoundingClientRect();if(!iv(t,n))return null;if(s=ov(e.dom,t,n),!s)return null}if(Iy)for(let e=s;n&&e;e=Py(e))e.draggable&&(n=void 0);if(s=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(s,t),n){if(Ay&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let e,r=n.childNodes[i];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&i++}n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(o=function(e,t,n,r){let i=-1;for(let n=t;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)i=t.posBefore;else{if(!(e.right<r.left||e.bottom<r.top))break;i=t.posAfter}}n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,1)}(e,n,i,t))}null==o&&(o=function(e,t,n){let{node:r,offset:i}=rv(t,n),o=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}(e,s,t));let a=e.docView.nearestDesc(s,!0);return{pos:o,inside:a?a.posAtStart-a.border:-1}}function av(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const lv=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function cv(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=jy||Ay;if(3==r.nodeType){if(!s||!lv.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,uv(av(Hy(r,e,t),1),o<0)}{let e=av(Hy(r,i,i),n);if(Ay&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=av(Hy(r,i-1,i-1),-1);if(t.top==e.top){let n=av(Hy(r,i,i+1),-1);if(n.top!=e.top)return uv(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==qy(r))){let e=r.childNodes[i-1];if(1==e.nodeType)return dv(e.getBoundingClientRect(),!1)}if(null==o&&i<qy(r)){let e=r.childNodes[i];if(1==e.nodeType)return dv(e.getBoundingClientRect(),!0)}return dv(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==qy(r))){let e=r.childNodes[i-1],t=3==e.nodeType?Hy(e,qy(e)-(s?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return uv(av(t,1),!1)}if(null==o&&i<qy(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?Hy(e,0,s?0:1):1==e.nodeType?e:null:null;if(t)return uv(av(t,-1),!0)}return uv(av(3==r.nodeType?Hy(r):r,-n),n>=0)}function uv(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function dv(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function pv(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const hv=/[\u0590-\u08ac]/;let fv=null,mv=null,gv=!1;function bv(e,t,n){return fv==t&&mv==n?gv:(fv=t,mv=n,gv="up"==n||"down"==n?function(e,t,n){let r=t.selection,i="up"==n?r.$from:r.$to;return pv(e,t,(()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=cv(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=Hy(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=e.domSelection();return hv.test(r.parent.textContent)&&a.modify?pv(e,t,(()=>{let t=a.getRangeAt(0),i=a.focusNode,o=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");let l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||i==a.focusNode&&o==a.focusOffset;return a.removeAllRanges(),a.addRange(t),null!=s&&(a.caretBidiLevel=s),l})):"left"==n||"backward"==n?o:s}(e,t,n))}const yv=0,vv=1,wv=2,_v=3;class xv{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=yv,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>By(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n,r=0,i=0;for(let t=0;r<this.children.length;r++){let n=this.children[r],o=t+n.size;if(o>e||n instanceof Av){i=e-t;break}t=o}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof Ev&&n.side>=0;r--);if(t<=0){let e,n=!0;for(;e=r?this.children[r-1]:null,e&&e.dom.parentNode!=this.contentDOM;r--,n=!1);return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?By(e.dom)+1:0}}{let e,n=!0;for(;e=r<this.children.length?this.children[r]:null,e&&e.dom.parentNode!=this.contentDOM;r++,n=!1);return e&&n&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?By(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,s=0;;s++){let n=this.children[s],a=o+n.size;if(-1==r&&e<=a){let i=o+n.border;if(e>=i&&t<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=By(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(a>t||s==this.children.length-1)){t=a;for(let e=s+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=By(n.dom);break}t+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=a}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),o=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(i>a&&o<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=n.getSelection(),c=!1;if((Ay||Iy)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(s=a={node:t.parentNode,offset:By(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(Ay&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let e=l.focusNode.childNodes[l.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&Iy)&&$y(s.node,s.offset,l.anchorNode,l.anchorOffset)&&$y(a.node,a.offset,l.focusNode,l.focusOffset))return;let u=!1;if((l.extend||e==t)&&!c){l.collapse(s.node,s.offset);try{if(e!=t)try{l.extend(a.node,a.offset)}catch(e){}u=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!u){if(e>t){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let r=n+i.border,s=o-i.border;if(e>=r&&t<=s)return this.dirty=e==n||t==o?wv:vv,void(e!=r||t!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-r,t-r):i.dirty=_v);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?_v:wv}n=o}this.dirty=wv}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?wv:vv;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Ev extends xv{constructor(e,t,n,r){let i,o=t.type.toDOM;if("function"==typeof o&&(o=o(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r))),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==yv&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class kv extends xv{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class Mv extends xv{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let i=r.nodeViews[t.type.name],o=i&&i(t,r,n);return o&&o.dom||(o=Ct.renderSpec(document,t.type.spec.toDOM(t,n))),new Mv(e,t,o.dom,o.contentDOM||o.dom)}parseRule(){return this.dirty&_v||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return this.dirty!=_v&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=yv){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=yv}}slice(e,t,n){let r=Mv.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;t<o&&(i=Hv(i,t,o,n)),e>0&&(i=Hv(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=r;return r.children=i,r}}class Dv extends xv{constructor(e,t,n,r,i,o,s,a,l){super(e,[],i,o),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s,o&&this.updateChildren(a,l)}static create(e,t,n,r,i,o){let s,a=i.nodeViews[t.type.name],l=a&&a(t,i,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:o),n,r),c=l&&l.dom,u=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:u}=Ct.renderSpec(document,t.type.spec.toDOM(t)));u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=jv(c,n,t),l?s=new Nv(e,t,n,r,c,u||null,d,l,i,o+1):t.isText?new Sv(e,t,n,r,c,d,i):new Dv(e,t,n,r,c,u||null,d,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>ke.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return this.dirty==yv&&e.eq(this.node)&&Rv(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,a=new Pv(this,o&&o.node,e);!function(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,i,t.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<i.length&&i[s].to==o){let e,t=i[s++];for(;s<i.length&&i[s].to==o;)(e||(e=[t])).push(i[s++]);if(e){e.sort(Uv);for(let t=0;t<e.length;t++)n(e[t],c,!!l)}else n(t,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<e.childCount))break;d=c,u=e.child(c++)}for(let e=0;e<a.length;e++)a[e].to<=o&&a.splice(e--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let p=o+u.nodeSize;if(u.isText){let e=p;s<i.length&&i[s].from<e&&(e=i[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<p&&(l=u.cut(e-o),u=u.cut(0,e-o),p=e,d=-1)}let h=u.isInline&&!u.isLeaf?a.filter((e=>!e.inline)):a.slice();r(u,h,t.forChild(o,u),d),o=p}}(this.node,this.innerDeco,((t,i,o)=>{t.spec.marks?a.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!o&&a.syncToMarks(i==this.node.childCount?Se.none:this.node.child(i).marks,n,e),a.placeWidget(t,e,r)}),((t,o,l,c)=>{let u;a.syncToMarks(t.marks,n,e),a.findNodeMatch(t,o,l,c)||s&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(t,o,l,u,e)||a.updateNextNode(t,o,l,e,c)||a.addNode(t,o,l,e,r),r+=t.nodeSize})),a.syncToMarks([],n,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==wv)&&(o&&this.protectLocalComposition(e,o),Ov(this.contentDOM,this.children,e),Ly&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof Mn)||n<t||r>t+this.node.content.size)return null;let i=e.domSelection(),o=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=qy(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let e=o.nodeValue,i=function(e,t,n,r){for(let i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<e.childCount;){let t=e.child(i++);if(o+=t.nodeSize,!t.isText)break;l+=t.text}if(o>=n){let e=a<r?l.lastIndexOf(t,r-a-1):-1;if(e>=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return i<0?null:{node:o,pos:i,text:e}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new kv(this,i,t,r);e.input.compositionNodes.push(o),this.children=Hv(this.children,n,n+r.length,e,o)}update(e,t,n,r){return!(this.dirty==_v||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=yv}updateOuterDeco(e){if(Rv(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Fv(this.dom,this.nodeDOM,Lv(this.outerDeco,this.node,t),Lv(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Cv(e,t,n,r,i){return jv(r,t,e),new Dv(void 0,e,t,n,r,r,r,i,0)}class Sv extends Dv{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(this.dirty==_v||this.dirty!=yv&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),this.dirty==yv&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=yv,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new Sv(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=_v)}get domAtom(){return!1}}class Av extends xv{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==yv&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Nv extends Dv{constructor(e,t,n,r,i,o,s,a,l,c){super(e,t,n,r,i,o,s,l,c),this.spec=a}update(e,t,n,r){if(this.dirty==_v)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Ov(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=Bv(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Mv){let t=r?r.previousSibling:e.lastChild;Ov(s.contentDOM,s.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=Bv(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const Tv=function(e){e&&(this.nodeName=e)};Tv.prototype=Object.create(null);const Iv=[new Tv];function Lv(e,t,n){if(0==e.length)return Iv;let r=n?Iv[0]:new Tv,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new Tv(s.nodeName));for(let e in s){let o=s[e];null!=o&&(n&&1==i.length&&i.push(r=new Tv(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+o:"style"==e?r.style=(r.style?r.style+";":"")+o:"nodeName"!=e&&(r[e]=o))}}}return i}function Fv(e,t,n,r){if(n==Iv&&r==Iv)return t;let i=t;for(let t=0;t<r.length;t++){let o=r[t],s=n[t];if(t){let t;s&&s.nodeName==o.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==o.nodeName||(t=document.createElement(o.nodeName),t.pmIsDeco=!0,t.appendChild(i),s=Iv[0]),i=t}zv(i,s||Iv[0],o)}return i}function zv(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==i.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)-1==r.indexOf(i[t])&&e.classList.add(i[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function jv(e,t,n){return Fv(e,e,Iv,Lv(t,n,1!=e.nodeType))}function Rv(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Bv(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Pv{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,i=e.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof Mv)){a=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,i=this.stack.length>>1,o=Math.min(i,e.length);for(;r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=yv,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++)if(this.top.children[t].matchesMark(e[i])){r=t;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=Mv.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(e,t,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,t,n,r,i){let o=this.top.children[r];return o.dirty==_v&&o.dom==o.contentDOM&&(o.dirty=wv),!!o.update(e,t,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,i){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof Dv){let a=this.preMatch.matched.get(s);if(null!=a&&a!=i)return!1;let l=s.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=_v&&Rv(t,s.outerDeco)))&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(e,t,n,r,i){this.top.children.splice(this.index++,0,Dv.create(this.top,e,t,n,r,i)),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new Ev(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Mv;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Sv)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Iy||Oy)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new Av(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}function Uv(e,t){return e.type.side-t.type.side}function Hv(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function $v(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(Gy(n)){for(a=c;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&Cn.isSelectable(e)&&i.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,i=t==qy(e);r||i;){if(e==n)return!0;let t=By(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==qy(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new Cn(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}if(!l){l=Zv(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!o?1:-1)}return l}function Vv(e){return e.editable?e.hasFocus():ew(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Wv(e,t=!1){let n=e.state.selection;if(Qv(e,n),Vv(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Oy){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&$y(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,By(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&Cy&&Sy<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,i,{anchor:o,head:s}=n;!qv||n instanceof Mn||(n.$from.parent.inlineContent||(r=Kv(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Kv(e,n.to))),e.docView.setSelection(o,s,e.root,t),qv&&(r&&Yv(r),i&&Yv(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Vv(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const qv=Iy||Oy&&Ty<63;function Kv(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Iy&&i&&"false"==i.contentEditable)return Gv(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return Gv(i);if(o)return Gv(o)}}function Gv(e){return e.contentEditable="true",Iy&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Yv(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Qv(e,t){if(t instanceof Cn){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Jv(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Jv(e)}function Jv(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Zv(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||Mn.between(t,n,r)}function Xv(e){return!(e.editable&&!e.hasFocus())&&ew(e)}function ew(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function tw(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&_n.findFrom(o,t)}function nw(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function rw(e,t,n){let r=e.state.selection;if(!(r instanceof Mn)){if(r instanceof Cn&&r.node.isInline)return nw(e,new Mn(t>0?r.$to:r.$from));{let n=tw(e.state,t);return!!n&&nw(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=tw(e.state,t);return!!(n&&n instanceof Cn)&&nw(e,n)}if(!(Fy&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Cn.isSelectable(o)?nw(e,new Cn(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):!!jy&&nw(e,new Mn(e.state.doc.resolve(t<0?s:s+o.nodeSize))))}}function iw(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ow(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function sw(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(Ay&&1==n.nodeType&&r<iw(n)&&ow(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(ow(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(lw(n))break;{let t=n.previousSibling;for(;t&&ow(t);)i=n.parentNode,o=By(t),t=t.previousSibling;if(t)n=t,r=iw(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?cw(e,t,n,r):i&&cw(e,t,i,o)}function aw(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=iw(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!ow(n.childNodes[r]))break;i=n,o=++r}else{if(lw(n))break;{let t=n.nextSibling;for(;t&&ow(t);)i=t.parentNode,o=By(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=iw(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}i&&cw(e,t,i,o)}function lw(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function cw(e,t,n,r){if(Gy(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:i}=e;setTimeout((()=>{e.state==i&&Wv(e)}),50)}function uw(e,t,n){let r=e.state.selection;if(r instanceof Mn&&!r.empty||n.indexOf("s")>-1)return!1;if(Fy&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=tw(e.state,t);if(n&&n instanceof Cn)return nw(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,s=r instanceof An?_n.near(n,t):_n.findFrom(n,t);return!!s&&nw(e,s)}return!1}function dw(e,t){if(!(e.state.selection instanceof Mn))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function pw(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function hw(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Fy&&72==n&&"c"==r?dw(e,-1)||sw(e):46==n||Fy&&68==n&&"c"==r?dw(e,1)||aw(e):13==n||27==n||(37==n||Fy&&66==n&&"c"==r?rw(e,-1,r)||sw(e):39==n||Fy&&70==n&&"c"==r?rw(e,1,r)||aw(e):38==n||Fy&&80==n&&"c"==r?uw(e,-1,r)||sw(e):40==n||Fy&&78==n&&"c"==r?function(e){if(!Iy||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;pw(e,n,"true"),setTimeout((()=>pw(e,n,"false")),20)}return!1}(e)||uw(e,1,r)||aw(e):r==(Fy?"m":"c")&&(66==n||73==n||89==n||90==n))}function fw(e,t){e.someProp("transformCopied",(e=>{t=e(t)}));let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Ct.fromSchema(e.state.schema),a=kw(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=xw[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:l,text:p}}function mw(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(e=>{t=e(t,a||r)})),a)return t?new Ne(ke.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Ne.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,i,r)));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,s=Ct.fromSchema(r);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),o=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=kw().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);(n=i&&xw[i[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),jy&&function(e){let t=e.querySelectorAll(Oy?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let e=+u[3];e>0&&o.firstChild;e--)o=o.firstChild;if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||ft.fromSchema(e.state.schema);s=t.parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||gw.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:i,openStart:o,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;i=ke.from(t.create(n[e+1],i)),o++,s++}return new Ne(i,o,s)}(_w(s,+u[1],+u[2]),u[4]);else if(s=Ne.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,i=t.node(n).contentMatchAt(t.index(n)),o=[];if(e.forEach((e=>{if(!o)return;let t,n=i.findWrapping(e.type);if(!n)return o=null;if(t=o.length&&r.length&&yw(n,r,e,o[o.length-1],0))o[o.length-1]=t;else{o.length&&(o[o.length-1]=vw(o[o.length-1],r.length));let t=bw(e,n);o.push(t),i=i.matchType(t.type),r=n}})),o)return ke.from(o)}return e}(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=_w(s,e,t)}return e.someProp("transformPasted",(e=>{s=e(s)})),s}const gw=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function bw(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,ke.from(e));return e}function yw(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=yw(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(ke.from(bw(n,e,i+1))))}}function vw(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,vw(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(ke.empty,!0);return e.copy(n.append(r))}function ww(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return i<r-1&&(a=ww(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ke.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function _w(e,t,n){return t<e.openStart&&(e=new Ne(ww(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Ne(ww(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const xw={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Ew=null;function kw(){return Ew||(Ew=document.implementation.createHTMLDocument("title"))}const Mw={},Dw={},Cw={touchstart:!0,touchmove:!0};class Sw{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Aw(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Nw(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>Ow(e,t))}))}function Ow(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Tw(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Iw(e){return{left:e.clientX,top:e.clientY}}function Lw(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,(t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function Fw(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function zw(e,t,n,r,i){return Lw(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(i?function(e,t){if(-1==t)return!1;let n,r,i=e.state.selection;i instanceof Cn&&(n=i.node);let o=e.state.doc.resolve(t);for(let e=o.depth+1;e>0;e--){let t=e>o.depth?o.nodeAfter:o.node(e);if(Cn.isSelectable(t)){r=n&&i.$from.depth>0&&e>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(e);break}}return null!=r&&(Fw(e,Cn.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Cn.isSelectable(r))&&(Fw(e,new Cn(n),"pointer"),!0)}(e,n))}function jw(e,t,n,r){return Lw(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function Rw(e,t,n,r){return Lw(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Fw(e,Mn.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),o=i.before(t);if(n.inlineContent)Fw(e,Mn.create(r,o+1,o+1+n.content.size),"pointer");else{if(!Cn.isSelectable(n))continue;Fw(e,Cn.create(r,o),"pointer")}return!0}}(e,n,r)}function Bw(e){return qw(e)}Dw.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Hw(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!zy||!Oy||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Ly||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||hw(e,n)?n.preventDefault():Aw(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,Yy(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},Dw.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},Dw.keypress=(e,t)=>{let n=t;if(Hw(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Fy&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof Mn&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const Pw=Fy?"metaKey":"ctrlKey";Mw.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Bw(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Pw]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(Iw(n));s&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Uw(e,s,n,!!r)):("doubleClick"==o?jw:Rw)(e,s.pos,s.inside,n)?n.preventDefault():Aw(e,"pointer"))};class Uw{constructor(e,t,n,r){let i,o;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[Pw],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof Cn&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Ay||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Aw(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Wv(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Iw(e))),this.updateAllowDefault(e),this.allowDefault||!t?Aw(this.view,"pointer"):zw(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Iy&&this.mightDrag&&!this.mightDrag.node.isAtom||Oy&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Fw(this.view,_n.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Aw(this.view,"pointer")}move(e){this.updateAllowDefault(e),Aw(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function Hw(e,t){return!!e.composing||!!(Iy&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Mw.touchstart=e=>{e.input.lastTouch=Date.now(),Bw(e),Aw(e,"pointer")},Mw.touchmove=e=>{e.input.lastTouch=Date.now(),Aw(e,"pointer")},Mw.contextmenu=e=>Bw(e);const $w=zy?5e3:-1;function Vw(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>qw(e)),t))}function Ww(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function qw(e,t=!1){if(!(zy&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ww(e),t||e.docView&&e.docView.dirty){let t=$v(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}Dw.compositionstart=Dw.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),qw(e,!0),e.markCursor=null;else if(qw(e),Ay&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}Vw(e,$w)},Dw.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Vw(e,20))};const Kw=Cy&&Sy<15||Ly&&Ry<604;function Gw(e,t,n,r){let i=mw(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,i||Ne.empty))))return!0;if(!i)return!1;let o=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=o?e.state.tr.replaceSelectionWith(o,e.input.shiftKey):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Mw.copy=Dw.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=Kw?null:n.clipboardData,s=r.content(),{dom:a,text:l}=fw(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Dw.paste=(e,t)=>{let n=t;if(e.composing&&!zy)return;let r=Kw?null:n.clipboardData;r&&Gw(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Gw(e,r.value,null,t):Gw(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class Yw{constructor(e,t){this.slice=e,this.move=t}}const Qw=Fy?"altKey":"ctrlKey";Mw.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(Iw(n));if(o&&o.pos>=i.from&&o.pos<=(i instanceof Cn?i.to-1:i.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Cn.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(Cn.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=fw(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Kw?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Kw||n.dataTransfer.setData("text/plain",l),e.dragging=new Yw(s,!n[Qw])},Mw.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},Dw.dragover=Dw.dragenter=(e,t)=>t.preventDefault(),Dw.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(Iw(n));if(!i)return;let o=e.state.doc.resolve(i.pos),s=r&&r.slice;s?e.someProp("transformPasted",(e=>{s=e(s)})):s=mw(e,n.dataTransfer.getData(Kw?"Text":"text/plain"),Kw?null:n.dataTransfer.getData("text/html"),!1,o);let a=!(!r||n[Qw]);if(e.someProp("handleDrop",(t=>t(e,n,s||Ne.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?on(e.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&Cn.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Cn(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,i)=>t=i)),c.setSelection(Zv(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},Mw.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&Wv(e)}),20))},Mw.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Mw.beforeinput=(e,t)=>{if(Oy&&zy&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,Yy(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in Dw)Mw[e]=Dw[e];function Jw(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Zw{constructor(e,t){this.toDOM=e,this.spec=t||r_,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new t_(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Zw&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Jw(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Xw{constructor(e,t){this.attrs=e,this.spec=t||r_}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new t_(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Xw&&Jw(this.attrs,e.attrs)&&Jw(this.spec,e.spec)}static is(e){return e.type instanceof Xw}destroy(){}}class e_{constructor(e,t){this.attrs=e,this.spec=t||r_}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new t_(i.pos-n,o.pos-n,this)}valid(e,t){let n,{index:r,offset:i}=e.content.findIndex(t.from);return i==t.from&&!(n=e.child(r)).isText&&i+n.nodeSize==t.to}eq(e){return this==e||e instanceof e_&&Jw(this.attrs,e.attrs)&&Jw(this.spec,e.spec)}destroy(){}}class t_{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new t_(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new t_(e,e,new Zw(t,n))}static inline(e,t,n,r){return new t_(e,t,new Xw(n,r))}static node(e,t,n,r){return new t_(e,t,new e_(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Xw}}const n_=[],r_={};class i_{constructor(e,t){this.local=e.length?e:n_,this.children=t.length?t:n_}static create(e,t){return t.length?u_(t,e,0,r_):o_}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==o_||0==e.maps.length?this:this.mapInner(e,t,0,0,n||r_)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let a=e.slice();for(let e=0,t=o;e<n.maps.length;e++){let r=0;n.maps[e].forEach(((e,n,o,s)=>{let l=s-o-(n-e);for(let s=0;s<a.length;s+=3){let c=a[s+1];if(c<0||e>c+t-r)continue;let u=a[s]+t-r;n>=u?a[s+1]=e<=u?-2:-1:o>=i&&l&&(a[s]+=l,a[s+1]+=l)}r+=l})),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=n.map(e[t]+o),u=c-i;if(u<0||u>=r.content.size){l=!0;continue}let d=n.map(e[t+1]+o,-1)-i,{index:p,offset:h}=r.content.findIndex(u),f=r.maybeChild(p);if(f&&h==u&&h+f.nodeSize==d){let r=a[t+2].mapInner(n,f,c+1,e[t]+o+1,s);r!=o_?(a[t]=u,a[t+1]=d,a[t+2]=r):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=function(e,t,n,r,i,o,s){function a(e,t){for(let o=0;o<e.local.length;o++){let a=e.local[o].map(r,i,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[o].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+o+1);return n}(a,e,t,n,i,o,s),c=u_(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new i_(t.sort(d_),a)}(this.children,o||[],e,t,n,r,i):o?new i_(o.sort(d_),n_):o_}add(e,t){return t.length?this==o_?i_.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach(((e,o)=>{let s,a=o+n;if(s=l_(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,s,a+1):r.splice(i,0,o,o+e.nodeSize,u_(s,e,a+1,r_)),i+=3}}));let o=a_(i?c_(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new i_(o.length?this.local.concat(o).sort(d_):this.local,r||this.children)}remove(e){return 0==e.length||this==o_?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>o&&t.to<s&&(e[n]=null,(i||(i=[])).push(t));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=o_?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<e.length;i++)if(n=e[i])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new i_(r,n):o_}forChild(e,t){if(this==o_)return this;if(t.isLeaf)return i_.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,o=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof Xw){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new i_(r.sort(d_),n_);return n?new s_([e,n]):e}return n||o_}eq(e){if(this==e)return!0;if(!(e instanceof i_)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return p_(this.localsInner(e))}localsInner(e){if(this==o_)return n_;if(e.inlineContent||!this.local.some(Xw.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Xw||t.push(this.local[e]);return t}}i_.empty=new i_([],[]),i_.removeOverlap=p_;const o_=i_.empty;class s_{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,r_)));return s_.from(n)}forChild(e,t){if(t.isLeaf)return i_.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=o_&&(i instanceof s_?n=n.concat(i.members):n.push(i))}return s_.from(n)}eq(e){if(!(e instanceof s_)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?p_(n?t:t.sort(d_)):n_}static from(e){switch(e.length){case 0:return o_;case 1:return e[0];default:return new s_(e)}}}function a_(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new t_(i.from+t,i.to+t,i.type))}return n}function l_(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t,o=0;o<e.length;o++)(t=e[o])&&t.from>n&&t.to<r&&((i||(i=[])).push(t),e[o]=null);return i}function c_(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function u_(e,t,n,r){let i=[],o=!1;t.forEach(((t,s)=>{let a=l_(e,t,s+n);if(a){o=!0;let e=u_(a,t,n+s+1,r);e!=o_&&i.push(s,s+t.nodeSize,e)}}));let s=a_(o?c_(e):e,-n).sort(d_);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||i.length?new i_(s,i):o_}function d_(e,t){return e.from-t.from||e.to-t.to}function p_(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),h_(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),h_(t,i+1,o.copy(r.to,o.to)))}}return t}function h_(e,t,n){for(;t<e.length&&d_(n,e[t])>0;)t++;e.splice(t,0,n)}function f_(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=o_&&t.push(r)})),e.cursorWrapper&&t.push(i_.create(e.state.doc,[e.cursorWrapper.deco])),s_.from(t)}const m_={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},g_=Cy&&Sy<=11;class b_{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class y_{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new b_,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);Cy&&Sy<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),g_&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,m_)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Xv(this.view)){if(this.suppressingSelectionUpdates)return Wv(this.view);if(Cy&&Sy<=11&&!this.view.state.selection.empty){let e=this.view.domSelection();if(e.focusNode&&$y(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelection())}ignoreSelectionChange(e){if(0==e.rangeCount)return!0;let t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelection(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Xv(e)&&!this.ignoreSelectionChange(n),i=-1,o=-1,s=!1,a=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],a);n&&(i=i<0?n.from:Math.min(n.from,i),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(s=!0))}if(Ay&&a.length>1){let e=a.filter((e=>"BR"==e.nodeName));if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let l=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&e.input.lastTouch<Date.now()-300&&Gy(n)&&(l=$v(e))&&l.eq(_n.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Wv(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,o),function(e){if(v_.has(e))return;if(v_.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)){if(e.requiresGeckoHackNode=Ay,w_)return;console["warn"]("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),w_=!0}}(e)),this.handleDOMChange(i,o,s,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Wv(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++)t.push(e.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(Cy&&Sy<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:o}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(e.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==e.target?By(r)+1:0,s=n.localPosFromDOM(e.target,o,-1),a=i&&i.parentNode==e.target?By(i):e.target.childNodes.length;return{from:s,to:n.localPosFromDOM(e.target,a,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let v_=new WeakMap,w_=!1;function __(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Iy&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||Iy&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function x_(e,t,n,r,i){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=$v(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let a,l,c=e.state.selection,u=function(e,t,n){let r,{node:i,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),c=e.domSelection(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],Gy(c)||r.push({node:c.focusNode,offset:c.focusOffset})),Oy&&8===e.input.lastKeyCode)for(let e=s;e>o;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){s=e;break}if(!n||n.size)break}let d=e.state.doc,p=e.someProp("domParser")||ft.fromSchema(e.state.schema),h=d.resolve(a),f=null,m=p.parse(i,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=h.parent.type.whitespace||"full",findPositions:r,ruleFromNode:__,context:h});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),f={anchor:e+a,head:t+a}}return{doc:m,sel:f,from:a,to:l}}(e,t,n),d=e.state.doc,p=d.slice(u.from,u.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(a=e.state.selection.to,l="end"):(a=e.state.selection.from,l="start"),e.input.lastKeyCode=null;let h=function(e,t,n,r,i){let o=e.findDiffStart(t,n);if(null==o)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==i){r-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&e.size<t.size){o-=r<=o&&r>=s?o-r:0,a=o+(a-s),s=o}else if(a<o){o-=r<=o&&r>=a?o-r:0,s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}(p.content,u.doc.content,u.from,a,l);if((Ly&&e.input.lastIOSEnter>Date.now()-225||zy)&&i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",(t=>t(e,Yy(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!h){if(!(r&&c instanceof Mn&&!c.empty&&c.$head.sameParent(c.$anchor))||e.composing||u.sel&&u.sel.anchor!=u.sel.head){if(u.sel){let t=E_(e,e.state.doc,u.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}h={start:c.from,endA:c.to,endB:c.to}}if(Oy&&e.cursorWrapper&&u.sel&&u.sel.anchor==e.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let e=h.endB-h.start;u.sel={anchor:u.sel.anchor+e,head:u.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof Mn&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Cy&&Sy<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&" "==u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)&&(h.start--,h.endA--,h.endB--);let f,m=u.doc.resolveNoCache(h.start-u.from),g=u.doc.resolveNoCache(h.endB-u.from),b=d.resolve(h.start),y=m.sameParent(g)&&m.parent.inlineContent&&b.end()>=h.endA;if((Ly&&e.input.lastIOSEnter>Date.now()-225&&(!y||i.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!y&&m.pos<u.doc.content.size&&(f=_n.findFrom(u.doc.resolve(m.pos+1),1,!0))&&f.head==g.pos)&&e.someProp("handleKeyDown",(t=>t(e,Yy(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>h.start&&function(e,t,n,r,i){if(!r.parent.isTextblock||n-t<=i.pos-r.pos||k_(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(k_(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||k_(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(d,h.start,h.endA,m,g)&&e.someProp("handleKeyDown",(t=>t(e,Yy(8,"Backspace")))))return void(zy&&Oy&&e.domObserver.suppressSelectionUpdates());Oy&&zy&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),zy&&!y&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,g=u.doc.resolveNoCache(h.endB-u.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,Yy(13,"Enter"))}))}),20));let v,w,_,x=h.start,E=h.endA;if(y)if(m.pos==g.pos)Cy&&Sy<=11&&0==m.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Wv(e)),20)),v=e.state.tr.delete(x,E),w=d.resolve(h.start).marksAcross(d.resolve(h.endA));else if(h.endA==h.endB&&(_=function(e,t){let n,r,i,o=e.firstChild.marks,s=t.firstChild.marks,a=o,l=s;for(let e=0;e<s.length;e++)a=s[e].removeFromSet(a);for(let e=0;e<o.length;e++)l=o[e].removeFromSet(l);if(1==a.length&&0==l.length)r=a[0],n="add",i=e=>e.mark(r.addToSet(e.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",i=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let e=0;e<t.childCount;e++)c.push(i(t.child(e)));if(ke.from(c).eq(e))return{mark:r,type:n}}(m.parent.content.cut(m.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,h.endA-b.start()))))v=e.state.tr,"add"==_.type?v.addMark(x,E,_.mark):v.removeMark(x,E,_.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let t=m.parent.textBetween(m.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,x,E,t))))return;v=e.state.tr.insertText(t,x,E)}if(v||(v=e.state.tr.replace(x,E,u.doc.slice(h.start-u.from,h.endB-u.from))),u.sel){let t=E_(e,v.doc,u.sel);t&&!(Oy&&zy&&e.composing&&t.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==x||t.head==v.mapping.map(E)-1)||Cy&&t.empty&&t.head==x)&&v.setSelection(t)}w&&v.ensureMarks(w),e.dispatch(v.scrollIntoView())}function E_(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Zv(e,t.resolve(n.anchor),t.resolve(n.head))}function k_(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}class M_{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Sw,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(N_),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=S_(this),C_(this),this.nodeViews=A_(this),this.docView=Cv(this.state.doc,D_(this),f_(this),this.dom,this),this.domObserver=new y_(this,((e,t,n,r)=>x_(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in Mw){let n=Mw[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!Tw(e,t)||Ow(e,t)||!e.editable&&t.type in Dw||n(e,t)},Cw[t]?{passive:!0}:void 0)}Iy&&e.dom.addEventListener("input",(()=>null)),Nw(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Nw(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(N_),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(Ww(this),i=!0),this.state=e;let o=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(o||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=A_(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(o||t.handleDOMEvents!=this._props.handleDOMEvents)&&Nw(this),this.editable=S_(this),C_(this);let s=f_(this),a=D_(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,a,s);!c&&e.selection.eq(n.selection)||(i=!0);let u="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(o,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:ev(e.dom)}}(this);if(i){this.domObserver.stop();let t=c&&(Cy||Oy)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(c){let n=Oy?this.trackWrites=this.domSelection().focusNode:null;!r&&this.docView.update(e.doc,a,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Cv(e.doc,a,s,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return $y(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Wv(this,t):(Qv(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():u&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;tv(n,0==r?0:r-t)}(u)}scrollToSelection(){let e=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof Cn){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&Xy(this,t.getBoundingClientRect(),e)}else Xy(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let i=this.directPlugins[r].props[e];if(null!=i&&(n=t?t(i):i))return n}let i=this.state.plugins;if(i)for(let r=0;r<i.length;r++){let o=i[r].props[e];if(null!=o&&(n=t?t(o):o))return n}}hasFocus(){if(Cy){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(nv)return e.focus(nv);let t=ev(e);e.focus(null==nv?{get preventScroll(){return nv={preventScroll:!0},!0}}:void 0),nv||(nv=!1,tv(t,0))}(this.dom),Wv(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}posAtCoords(e){return sv(this,e)}coordsAtPos(e,t=1){return cv(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return bv(this,t||this.state,e)}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],f_(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){Ow(e,t)||!Mw[t.type]||!e.editable&&t.type in Dw||Mw[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelection(){return this.root.getSelection()}}function D_(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),[t_.node(0,e.state.doc.content.size,t)]}function C_(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:t_.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function S_(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function A_(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function N_(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var O_={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},T_={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},I_="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent);"undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent);for(var L_="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),F_="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),z_=L_||I_&&+I_[1]<57,j_=0;j_<10;j_++)O_[48+j_]=O_[96+j_]=String(j_);for(j_=1;j_<=24;j_++)O_[j_+111]="F"+j_;for(j_=65;j_<=90;j_++)O_[j_]=String.fromCharCode(j_+32),T_[j_]=String.fromCharCode(j_);for(var R_ in O_)T_.hasOwnProperty(R_)||(T_[R_]=O_[R_]);const B_="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function P_(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);B_?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function U_(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function H_(e){let t=function(e){let t=Object.create(null);for(let n in e)t[P_(n)]=e[n];return t}(e);return function(e,n){let r,i=function(e){var t=!(z_&&(e.ctrlKey||e.altKey||e.metaKey)||F_&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?T_:O_)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),o=1==i.length&&" "!=i,s=t[U_(i,n,!o)];if(s&&s(e.state,e.dispatch,e))return!0;if(o&&(n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(r=O_[n.keyCode])&&r!=i){let i=t[U_(r,n,!0)];if(i&&i(e.state,e.dispatch,e))return!0}else if(o&&n.shiftKey){let r=t[U_(i,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}function $_(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function V_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function W_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function q_(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function K_(e,t,n){let r,i,o=t.nodeBefore,s=t.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!i.isTextblock&&!rn(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let i=t.pos+s.nodeSize,a=ke.empty;for(let e=r.length-1;e>=0;e--)a=ke.from(r[e].create(null,a));a=ke.from(o.copy(a));let l=e.tr.step(new Qt(t.pos-1,i,t.pos,i,new Ne(a,1,0),r.length,!0)),c=i+2*r.length;rn(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=_n.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Xt(c);if(null!=u&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&$_(s,"start",!0)&&$_(o,"end")){let r=o,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=ke.empty;for(let e=i.length-1;e>=0;e--)r=ke.from(i[e].copy(r));n(e.tr.step(new Qt(t.pos-i.length,t.pos+s.nodeSize,t.pos+l,t.pos+s.nodeSize-l,new Ne(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function G_(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(Mn.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const Y_=G_(-1),Q_=G_(1);function J_(e,t=null){return function(n,r){let{from:i,to:o}=n.selection,s=!1;return n.doc.nodesBetween(i,o,((r,i)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{let t=n.doc.resolve(i),r=t.index();s=t.parent.canReplaceWith(r,r+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,o,e,t).scrollIntoView()),!0)}}function Z_(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;let e=n.doc.resolve(s.start-2);l=new qe(e,e,s.depth),s.endIndex<s.parent.childCount&&(s=new qe(i,n.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let c=en(l,e,t,s);return!!c&&(r&&r(function(e,t,n,r,i){let o=ke.empty;for(let e=n.length-1;e>=0;e--)o=ke.from(n[e].type.create(n[e].attrs,o));e.step(new Qt(t.start-(r?2:0),t.end,t.start,t.end,new Ne(o,0,0),n.length,!0));let s=0;for(let e=0;e<n.length;e++)n[e].type==i&&(s=e+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&nn(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(n).nodeSize;return e}(n.tr,s,c,a,e).scrollIntoView()),!0)}}function X_(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,(t=>t.childCount>0&&t.firstChild.type==e));return!!o&&(!n||(r.node(o.depth-1).type==e?function(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new Qt(o-1,s,o,s,new Ne(ke.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new qe(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=Xt(r);if(null==a)return!1;i.lift(r,a);let l=i.mapping.map(o,-1)-1;rn(i.doc,l)&&i.join(l);return t(i.scrollIntoView()),!0}(t,n,e,o):function(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,o=n.startIndex;t>o;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?ke.empty:ke.from(i))))return!1;let d=o.pos,p=d+s.nodeSize;return r.step(new Qt(d-(a?1:0),p+(l?1:0),d+1,p-1,new Ne((a?ke.empty:ke.from(i.copy(ke.empty))).append(l?ke.empty:ke.from(i.copy(ke.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}(t,n,o)))}}function ex(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class tx{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(o);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],a=!!e,l=e||i.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(l,t),i=n(...e)(r);return s.push(i),c}]))),run:()=>(a||!t||l.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(l),s.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=!1,i=e||n.tr,o=this.buildProps(i,r),s=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...o,dispatch:void 0})])));return{...s,chain:()=>this.createChain(i,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r;i.storedMarks&&e.setStoredMarks(i.storedMarks);const s={tr:e,editor:r,view:o,state:ex({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map((([e,t])=>[e,(...e)=>t(...e)(s)])))}};return s}}function nx(e,t,n){if(void 0===e.config[t]&&e.parent)return nx(e.parent,t,n);if("function"==typeof e.config[t]){return e.config[t].bind({...n,parent:e.parent?nx(e.parent,t,n):null})}return e.config[t]}function rx(e){return{baseExtensions:e.filter((e=>"extension"===e.type)),nodeExtensions:e.filter((e=>"node"===e.type)),markExtensions:e.filter((e=>"mark"===e.type))}}function ix(e){const t=[],{nodeExtensions:n,markExtensions:r}=rx(e),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((e=>{const n=nx(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});if(!n)return;n().forEach((e=>{e.types.forEach((n=>{Object.entries(e.attributes).forEach((([e,r])=>{t.push({type:n,name:e,attribute:{...o,...r}})}))}))}))})),i.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=nx(e,"addAttributes",n);if(!r)return;const i=r();Object.entries(i).forEach((([n,r])=>{const i={...o,...r};(null==r?void 0:r.isRequired)&&void 0===(null==r?void 0:r.default)&&delete i.default,t.push({type:e.name,name:n,attribute:i})}))})),t}function ox(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function sx(...e){return e.filter((e=>!!e)).reduce(((e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>{n[e]?n[e]="class"===e?[n[e],t].join(" "):"style"===e?[n[e],t].join("; "):t:n[e]=t})),n}),{})}function ax(e,t){return t.filter((e=>e.attribute.rendered)).map((t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]})).reduce(((e,t)=>sx(e,t)),{})}function lx(e){return"function"==typeof e}function cx(e,t=void 0,...n){return lx(e)?t?e.bind(t)(...n):e(...n):e}function ux(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const i=t.reduce(((e,t)=>{const r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!=typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null==r?e:{...e,[t.name]:r}}),{});return{...r,...i}}}}function dx(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>("attrs"!==e||!function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t)))}function px(e,t){return t.nodes[e]||t.marks[e]||null}function hx(e,t){return Array.isArray(t)?t.some((t=>("string"==typeof t?t:t.name)===e.name)):t}function fx(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class mx{constructor(e){this.find=e.find,this.handler=e.handler}}function gx(e){var t;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((e=>e.type.spec.code))))return!1;let u=!1;const d=((e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,((e,t,i,o)=>{var s,a;const l=(null===(a=(s=e.type.spec).toText)||void 0===a?void 0:a.call(s,{node:e,pos:t,parent:i,index:o}))||e.textContent||"%leaf%";n+=l.slice(0,Math.max(0,r-t))})),n})(c)+o;return s.forEach((e=>{if(u)return;const t=((e,t)=>{if(fx(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r})(d,e.find);if(!t)return;const s=l.state.tr,c=ex({state:l.state,transaction:s}),p={from:r-(t[0].length-o.length),to:i},{commands:h,chain:f,can:m}=new tx({editor:n,state:c});null!==e.handler({state:c,range:p,match:t,commands:h,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:i,text:o}),l.dispatch(s),u=!0)})),u}function bx(e){const{editor:t,rules:n}=e,r=new $n({state:{init:()=>null,apply(e,t){const n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(e,i,o,s)=>gx({editor:t,from:i,to:o,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:i}=e.state.selection;i&&gx({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(e,i){if("Enter"!==i.key)return!1;const{$cursor:o}=e.state.selection;return!!o&&gx({editor:t,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}class yx{constructor(e){this.find=e.find,this.handler=e.handler}}function vx(e){const{editor:t,state:n,from:r,to:i,rule:o}=e,{commands:s,chain:a,can:l}=new tx({editor:t,state:n}),c=[];n.doc.nodesBetween(r,i,((e,t)=>{if(!e.isTextblock||e.type.spec.code)return;const u=Math.max(r,t),d=Math.min(i,t+e.content.size),p=((e,t)=>{if(fx(t))return[...e.matchAll(t)];const n=t(e);return n?n.map((t=>{const n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(u-t,d-t,void 0,""),o.find);p.forEach((e=>{if(void 0===e.index)return;const t=u+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},d=o.handler({state:n,range:i,match:e,commands:s,chain:a,can:l});c.push(d)}))}));return c.every((e=>null!==e))}function wx(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1;const s=n.map((e=>new $n({view(e){const t=t=>{var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:e=>(o=r===e.dom.parentElement,!1),paste:(e,t)=>{var n;const r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return i=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,s)=>{const a=n[0],l="paste"===a.getMeta("uiEvent")&&!i,c="drop"===a.getMeta("uiEvent")&&!o;if(!l&&!c)return;const u=r.doc.content.findDiffStart(s.doc.content),d=r.doc.content.findDiffEnd(s.doc.content);if("number"!=typeof u||!d||u===d.b)return;const p=s.tr,h=ex({state:s,transaction:p});return vx({editor:t,state:h,from:Math.max(u-1,0),to:d.b-1,rule:e})&&p.steps.length?p:void 0}})));return s}class _x{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=_x.resolve(e),this.schema=function(e){var t;const n=ix(e),{nodeExtensions:r,markExtensions:i}=rx(e),o=null===(t=r.find((e=>nx(e,"topNode"))))||void 0===t?void 0:t.name,s=Object.fromEntries(r.map((t=>{const r=n.filter((e=>e.type===t.name)),i={name:t.name,options:t.options,storage:t.storage},o=e.reduce(((e,n)=>{const r=nx(n,"extendNodeSchema",i);return{...e,...r?r(t):{}}}),{}),s=dx({...o,content:cx(nx(t,"content",i)),marks:cx(nx(t,"marks",i)),group:cx(nx(t,"group",i)),inline:cx(nx(t,"inline",i)),atom:cx(nx(t,"atom",i)),selectable:cx(nx(t,"selectable",i)),draggable:cx(nx(t,"draggable",i)),code:cx(nx(t,"code",i)),defining:cx(nx(t,"defining",i)),isolating:cx(nx(t,"isolating",i)),attrs:Object.fromEntries(r.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),a=cx(nx(t,"parseHTML",i));a&&(s.parseDOM=a.map((e=>ux(e,r))));const l=nx(t,"renderHTML",i);l&&(s.toDOM=e=>l({node:e,HTMLAttributes:ax(e,r)}));const c=nx(t,"renderText",i);return c&&(s.toText=c),[t.name,s]}))),a=Object.fromEntries(i.map((t=>{const r=n.filter((e=>e.type===t.name)),i={name:t.name,options:t.options,storage:t.storage},o=e.reduce(((e,n)=>{const r=nx(n,"extendMarkSchema",i);return{...e,...r?r(t):{}}}),{}),s=dx({...o,inclusive:cx(nx(t,"inclusive",i)),excludes:cx(nx(t,"excludes",i)),group:cx(nx(t,"group",i)),spanning:cx(nx(t,"spanning",i)),code:cx(nx(t,"code",i)),attrs:Object.fromEntries(r.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),a=cx(nx(t,"parseHTML",i));a&&(s.parseDOM=a.map((e=>ux(e,r))));const l=nx(t,"renderHTML",i);return l&&(s.toDOM=e=>l({mark:e,HTMLAttributes:ax(e,r)})),[t.name,s]})));return new pt({topNode:o,nodes:s,marks:a})}(this.extensions),this.extensions.forEach((e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:px(e.name,this.schema)};if("mark"===e.type){(null===(t=cx(nx(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name)}const r=nx(e,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const i=nx(e,"onCreate",n);i&&this.editor.on("create",i);const o=nx(e,"onUpdate",n);o&&this.editor.on("update",o);const s=nx(e,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=nx(e,"onTransaction",n);a&&this.editor.on("transaction",a);const l=nx(e,"onFocus",n);l&&this.editor.on("focus",l);const c=nx(e,"onBlur",n);c&&this.editor.on("blur",c);const u=nx(e,"onDestroy",n);u&&this.editor.on("destroy",u)}))}static resolve(e){const t=_x.sort(_x.flatten(e)),n=function(e){const t=e.filter(((t,n)=>e.indexOf(t)!==n));return[...new Set(t)]}(t.map((e=>e.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((e=>`'${e}'`)).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map((e=>{const t=nx(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return t?[e,...this.flatten(t())]:e})).flat(10)}static sort(e){const t=100;return e.sort(((e,n)=>{const r=nx(e,"priority")||t,i=nx(n,"priority")||t;return r>i?-1:r<i?1:0}))}get commands(){return this.extensions.reduce(((e,t)=>{const n=nx(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:px(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this,t=_x.sort([...this.extensions].reverse()),n=[],r=[],i=t.map((t=>{const i={name:t.name,options:t.options,storage:t.storage,editor:e,type:px(t.name,this.schema)},o=[],s=nx(t,"addKeyboardShortcuts",i);let a={};if("mark"===t.type&&t.config.exitable&&(a.ArrowRight=()=>fE.handleExit({editor:e,mark:t})),s){const t=Object.fromEntries(Object.entries(s()).map((([t,n])=>[t,()=>n({editor:e})])));a={...a,...t}}const l=new $n({props:{handleKeyDown:H_(a)}});o.push(l);const c=nx(t,"addInputRules",i);hx(t,e.options.enableInputRules)&&c&&n.push(...c());const u=nx(t,"addPasteRules",i);hx(t,e.options.enablePasteRules)&&u&&r.push(...u());const d=nx(t,"addProseMirrorPlugins",i);if(d){const e=d();o.push(...e)}return o})).flat();return[bx({editor:e,rules:n}),...wx({editor:e,rules:r}),...i]}get attributes(){return ix(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=rx(this.extensions);return Object.fromEntries(t.filter((e=>!!nx(e,"addNodeView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:ox(t.name,this.schema)},i=nx(t,"addNodeView",r);if(!i)return[];return[t.name,(r,o,s,a)=>{const l=ax(r,n);return i()({editor:e,node:r,getPos:s,decorations:a,HTMLAttributes:l,extension:t})}]})))}}function xx(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function Ex(e,t){const n={...e};return xx(e)&&xx(t)&&Object.keys(t).forEach((r=>{xx(t[r])?r in e?n[r]=Ex(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})})),n}class kx{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=cx(nx(this,"addOptions",{name:this.name}))),this.storage=cx(nx(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new kx(e)}configure(e={}){const t=this.extend();return t.options=Ex(this.options,e),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new kx(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=cx(nx(t,"addOptions",{name:t.name})),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}}function Mx(e,t,n){const{from:r,to:i}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return e.nodesBetween(r,i,((e,n,c,u)=>{var d;const p=null==s?void 0:s[e.type.name];p?(e.isBlock&&!l&&(a+=o,l=!0),c&&(a+=p({node:e,pos:n,parent:c,index:u,range:t}))):e.isText?(a+=null===(d=null==e?void 0:e.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,i-n),l=!1):e.isBlock&&!l&&(a+=o,l=!0)})),a}function Dx(e){return Object.fromEntries(Object.entries(e.nodes).filter((([,e])=>e.spec.toText)).map((([e,t])=>[e,t.spec.toText])))}const Cx=kx.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new $n({key:new qn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map((e=>e.$from.pos))),a=Math.max(...o.map((e=>e.$to.pos)));return Mx(r,{from:s,to:a},{textSerializers:Dx(n)})}}})]}});function Sx(e,t,n={strict:!0}){const r=Object.keys(t);return!r.length||r.every((r=>n.strict?t[r]===e[r]:fx(t[r])?t[r].test(e[r]):t[r]===e[r]))}function Ax(e,t,n={}){return e.find((e=>e.type===t&&Sx(e.attrs,n)))}function Nx(e,t,n={}){return!!Ax(e,t,n)}function Ox(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=Ax([...r.node.marks],t,n);if(!i)return;let o=r.index,s=e.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(Ax([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,s-=e.parent.child(o).nodeSize;for(;a<e.parent.childCount&&Nx([...e.parent.child(a).marks],t,n);)l+=e.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function Tx(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function Ix(e){return e instanceof Mn}function Lx(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Fx(e,t=null){if(!t)return null;const n=_n.atStart(e),r=_n.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;const i=n.from,o=r.to;return"all"===t?Mn.create(e,Lx(0,i,o),Lx(e.content.size,i,o)):Mn.create(e,Lx(t,i,o),Lx(t,i,o))}function zx(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function jx(e){const t=`<body>${e}</body>`;return(new window.DOMParser).parseFromString(t,"text/html").body}function Rx(e,t,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof e&&null!==e)try{return Array.isArray(e)?ke.fromArray(e.map((e=>t.nodeFromJSON(e)))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),Rx("",t,n)}if("string"==typeof e){const r=ft.fromSchema(t);return n.slice?r.parseSlice(jx(e),n.parseOptions).content:r.parse(jx(e),n.parseOptions)}return Rx("",t,n)}function Bx(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function Px(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,s=t?ox(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);a.push({node:e,from:n,to:o})}));const l=i-r,c=a.filter((e=>!s||s.name===e.node.type.name)).filter((e=>Sx(e.node.attrs,n,{strict:!1})));if(o)return!!c.length;return c.reduce(((e,t)=>e+t.to-t.from),0)>=l}function Ux(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Hx(e,t){const n="string"==typeof t?[t]:t;return Object.keys(e).reduce(((t,r)=>(n.includes(r)||(t[r]=e[r]),t)),{})}function $x(e,t,n={}){return Rx(e,t,{slice:!1,parseOptions:n})}function Vx(e,t){const n=[];return e.descendants(((e,r)=>{t(e)&&n.push({node:e,pos:r})})),n}function Wx(e){return t=>function(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}function qx(e,t){const n=Tx(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,(e=>{s.push(...e.marks)}));const a=s.find((e=>e.type.name===n.name));return a?{...a.attrs}:{}}function Kx(e,t){const n=Ux("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){const n=ox(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,(e=>{o.push(e)}));const s=o.reverse().find((e=>e.type.name===n.name));return s?{...s.attrs}:{}}(e,t):"mark"===n?qx(e,t):{}}function Gx(e){const t=function(e,t=JSON.stringify){const n={};return e.filter((e=>{const r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter(((e,n)=>{const r=t.filter(((e,t)=>t!==n));return!r.some((t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}))}function Yx(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const i=Ox(n.resolve(e-1),t.type);i&&r.push({mark:t,...i})})):n.nodesBetween(e,t,((e,t)=>{r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}function Qx(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?Tx(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>!o||o.name===e.type.name)).find((e=>Sx(e.attrs,n,{strict:!1})));let s=0;const a=[];if(i.forEach((({$from:t,$to:n})=>{const r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);s+=o-n,a.push(...e.marks.map((e=>({mark:e,from:n,to:o}))))}))})),0===s)return!1;const l=a.filter((e=>!o||o.name===e.mark.type.name)).filter((e=>Sx(e.mark.attrs,n,{strict:!1}))).reduce(((e,t)=>e+t.to-t.from),0),c=a.filter((e=>!o||e.mark.type!==o&&e.mark.type.excludes(o))).reduce(((e,t)=>e+t.to-t.from),0);return(l>0?l+c:l)>=s}function Jx(e,t){const{nodeExtensions:n}=rx(t),r=n.find((t=>t.name===e));if(!r)return!1;const i=cx(nx(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof i&&i.split(" ").includes("list")}function Zx(e,t,n){const r=0,i=e.state.doc.content.size,o=Lx(t,r,i),s=Lx(n,r,i),a=e.coordsAtPos(o),l=e.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),p=Math.max(a.right,l.right),h={top:c,bottom:u,left:d,right:p,width:p-d,height:u-c,x:d,y:c};return{...h,toJSON:()=>h}}function Xx(e,t,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=e.find((e=>e.type===t&&e.name===n));return!!r&&r.attribute.keepOnSplit})))}function eE(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter((e=>null==t?void 0:t.includes(e.type.name)));e.tr.ensureMarks(r)}}const tE=(e,t)=>{const n=Wx((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const i=e.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!rn(e.doc,n.pos)||(e.join(n.pos),!0)},nE=(e,t)=>{const n=Wx((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const i=e.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!rn(e.doc,r)||(e.join(r),!0)};var rE=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame((()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return!n||(i.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:i}=t,o=r.resolve(i.map(n)),s=r.resolve(i.map(n+e.nodeSize)),a=o.blockRange(s);if(!a)return;const l=Xt(a);if(e.type.isTextblock){const{defaultType:e}=o.parent.contentMatchAt(o.index());t.setNodeMarkup(a.start,e)}(l||0===l)&&t.lift(a,l)}))})),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof An||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=q_(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(n,o.createAndFill());s.setSelection(Mn.create(s.doc,n+1)),t(s.scrollIntoView())}return!0})(e,t),deleteNode:e=>({tr:t,state:n,dispatch:r})=>{const i=ox(e,n.schema),o=t.selection.$anchor;for(let e=o.depth;e>0;e-=1){if(o.node(e).type===i){if(r){const n=o.before(e),r=o.after(e);t.delete(n,r).scrollIntoView()}return!0}}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},deleteSelection:()=>({state:e,dispatch:t})=>((e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0))(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=q_(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,s.createAndFill());i.setSelection(_n.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0})(e,t),extendMarkRange:(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=Tx(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:u}=a;if(i){const e=Ox(l,o,t);if(e&&e.from<=c&&e.to>=u){const t=Mn.create(s,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{const n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{zx()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===e||!1===e)return!0;if(o&&null===e&&!Ix(n.state.selection))return s(),!0;const a=Fx(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},forEach:(e,t)=>n=>e.every(((e,r)=>t(e,{...n,index:r}))),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{if(i){n={parseOptions:{},updateSelection:!0,...n};const i=Rx(t,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===i.toString())return!0;let{from:s,to:a}="number"==typeof e?{from:e,to:e}:e,l=!0,c=!0;if((i.toString().startsWith("<")?i:[i]).forEach((e=>{e.check(),l=!!l&&(e.isText&&0===e.marks.length),c=!!c&&e.isBlock})),s===a&&c){const{parent:e}=r.doc.resolve(s);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(s-=1,a+=1)}l?r.insertText(t,s,a):r.replaceWith(s,a,i),n.updateSelection&&function(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof Yt||i instanceof Qt))return;const o=e.mapping.maps[r];let s=0;o.forEach(((e,t,n,r)=>{0===s&&(s=r)})),e.setSelection(_n.near(e.doc.resolve(s),n))}(r,r.steps.length-1,-1)}return!0},joinBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let i=V_(r);if(!i){let n=r.blockRange(),i=n&&Xt(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&K_(e,i,t))return!0;if(0==r.parent.content.size&&($_(o,"end")||Cn.isSelectable(o))){let n=sn(e.doc,r.before(),r.after(),Ne.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection($_(o,"end")?_n.findFrom(r.doc.resolve(r.mapping.map(i.pos,-1)),-1):Cn.create(r.doc,i.pos-o.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1||(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),0))})(e,t),joinForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let i=W_(r);if(!i)return!1;let o=i.nodeAfter;if(K_(e,i,t))return!0;if(0==r.parent.content.size&&($_(o,"start")||Cn.isSelectable(o))){let n=sn(e.doc,r.before(),r.after(),Ne.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection($_(o,"start")?_n.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):Cn.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1||(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),0))})(e,t),keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:i})=>{const o=function(e){const t=e.split(/-(?!$)/);let n,r,i,o,s=t[t.length-1];"Space"===s&&(s=" ");for(let e=0;e<t.length-1;e+=1){const s=t[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);zx()||Bx()?o=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),o&&(s=`Meta-${s}`),i&&(s=`Shift-${s}`),s}(e).split(/-(?!$)/),s=o.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction((()=>{n.someProp("handleKeyDown",(e=>e(n,a)))}));return null==l||l.steps.forEach((e=>{const t=e.map(r.mapping);t&&i&&r.maybeStep(t)})),!0},lift:(e,t={})=>({state:n,dispatch:r})=>!!Px(n,ox(e,n.schema),t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&Xt(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:e,dispatch:t})=>((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(nn(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Xt(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)})(e,t),liftListItem:e=>({state:t,dispatch:n})=>X_(ox(e,t.schema))(t,n),newlineInCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))})(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Ux("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(o=ox(e,r.schema)),"mark"===a&&(s=Tx(e,r.schema)),i&&n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,Hx(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((i=>{s===i.type&&n.addMark(r,r+e.nodeSize,s.create(Hx(i.attrs,t)))}))}))})),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),selectNodeBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=V_(r)}let s=o&&o.nodeBefore;return!(!s||!Cn.isSelectable(s)||(t&&t(e.tr.setSelection(Cn.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),0))})(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=W_(r)}let s=o&&o.nodeAfter;return!(!s||!Cn.isSelectable(s)||(t&&t(e.tr.setSelection(Cn.create(e.doc,o.pos)).scrollIntoView()),0))})(e,t),selectParentNode:()=>({state:e,dispatch:t})=>((e,t)=>{let n,{$from:r,to:i}=e.selection,o=r.sharedDepth(i);return 0!=o&&(n=r.before(o),t&&t(e.tr.setSelection(Cn.create(e.doc,n))),!0)})(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>Q_(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>Y_(e,t),setContent:(e,t=!1,n={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=$x(e,i.schema,n);return o&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=Tx(e,r.schema);if(i)if(s){const e=qx(r,l);n.addStoredMark(l.create({...e,...t}))}else a.forEach((e=>{const i=e.$from.pos,o=e.$to.pos;r.doc.nodesBetween(i,o,((e,r)=>{const s=Math.max(r,i),a=Math.min(r+e.nodeSize,o);e.marks.find((e=>e.type===l))?e.marks.forEach((e=>{l===e.type&&n.addMark(s,a,l.create({...e.attrs,...t}))})):n.addMark(s,a,l.create(t))}))}));return function(e,t,n){var r;const{selection:i}=t;let o=null;if(Ix(i)&&(o=i.$cursor),o){const t=null!==(r=e.storedMarks)&&void 0!==r?r:o.marks();return!!n.isInSet(t)||!t.some((e=>e.type.excludes(n)))}const{ranges:s}=i;return s.some((({$from:t,$to:r})=>{let i=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,((e,t,r)=>{if(i)return!1;if(e.isInline){const t=!r||r.type.allowsMarkType(n),o=!!n.isInSet(e.marks)||!e.marks.some((e=>e.type.excludes(n)));i=t&&o}return!i})),i}))}(r,n,l)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=ox(e,n.schema);return o.isTextblock?i().command((({commands:e})=>!!J_(o,t)(n)||e.clearNodes())).command((({state:e})=>J_(o,t)(e,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,r=Lx(e,0,n.content.size),i=Cn.create(n,r);t.setSelection(i)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:r,to:i}="number"==typeof e?{from:e,to:e}:e,o=Mn.atStart(n).from,s=Mn.atEnd(n).to,a=Lx(r,o,s),l=Lx(i,o,s),c=Mn.create(n,a,l);t.setSelection(c)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{const r=ox(e,t.schema);return(i=r,function(e,t){let{$from:n,$to:r}=e.selection,o=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==i));if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=i)return!1;if(t){let n=l.lastChild&&l.lastChild.type==a.type,r=ke.from(n?i.create():null),s=new Ne(ke.from(i.create(null,ke.from(a.type.create(null,r)))),n?3:1,0),c=o.start,u=o.end;t(e.tr.step(new Qt(c-(n?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0})(t,n);var i},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,c=Xx(i.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof Cn&&o.node.isBlock)return!(!a.parentOffset||!nn(s,a.pos))&&(r&&(e&&eE(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const r=l.parentOffset===l.parent.content.size;o instanceof Mn&&t.deleteSelection();const s=0===a.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(a.node(-1).contentMatchAt(a.indexAfter(-1)));let u=r&&s?[{type:s,attrs:c}]:void 0,d=nn(t.doc,t.mapping.map(a.pos),1,u);if(u||d||!nn(t.doc,t.mapping.map(a.pos),1,s?[{type:s}]:void 0)||(d=!0,u=s?[{type:s,attrs:c}]:void 0),d&&(t.split(t.mapping.map(a.pos),1,u),s&&!r&&!a.parentOffset&&a.parent.type!==s)){const e=t.mapping.map(a.before()),n=t.doc.resolve(e);a.node(-1).canReplaceWith(n.index(),n.index()+1,s)&&t.setNodeMarkup(t.mapping.map(a.before()),s)}e&&eE(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},splitListItem:e=>({tr:t,state:n,dispatch:r,editor:i})=>{var o;const s=ox(e,n.schema),{$from:a,$to:l}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=i.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let e=ke.empty;const n=a.index(-1)?1:a.index(-2)?2:3;for(let t=a.depth-n;t>=a.depth-3;t-=1)e=ke.from(a.node(t).copy(e));const r=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,i=Xx(d,a.node().type.name,a.node().attrs),l=(null===(o=s.contentMatch.defaultType)||void 0===o?void 0:o.createAndFill(i))||void 0;e=e.append(ke.from(s.createAndFill(null,l)||void 0));const c=a.before(a.depth-(n-1));t.replace(c,a.after(-r),new Ne(e,4-n,0));let u=-1;t.doc.nodesBetween(c,t.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)})),u>-1&&t.setSelection(Mn.near(t.doc.resolve(u))),t.scrollIntoView()}return!0}const p=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=Xx(d,u.type.name,u.attrs),f=Xx(d,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const m=p?[{type:s,attrs:h},{type:p,attrs:f}]:[{type:s,attrs:h}];return!!nn(t.doc,a.pos,2)&&(r&&t.split(a.pos,2,m).scrollIntoView(),!0)},toggleList:(e,t)=>({editor:n,tr:r,state:i,dispatch:o,chain:s,commands:a,can:l})=>{const{extensions:c}=n.extensionManager,u=ox(e,i.schema),d=ox(t,i.schema),{selection:p}=i,{$from:h,$to:f}=p,m=h.blockRange(f);if(!m)return!1;const g=Wx((e=>Jx(e.type.name,c)))(p);if(m.depth>=1&&g&&m.depth-g.depth<=1){if(g.node.type===u)return a.liftListItem(d);if(Jx(g.node.type.name,c)&&u.validContent(g.node.content)&&o)return s().command((()=>(r.setNodeMarkup(g.pos,u),!0))).command((()=>tE(r,u))).command((()=>nE(r,u))).run()}return s().command((()=>!!l().wrapInList(u)||a.clearNodes())).wrapInList(u).command((()=>tE(r,u))).command((()=>nE(r,u))).run()},toggleMark:(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=Tx(e,r.schema);return Qx(r,s,t)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,t)},toggleNode:(e,t,n={})=>({state:r,commands:i})=>{const o=ox(e,r.schema),s=ox(t,r.schema);return Px(r,o,n)?i.setNode(s):i.setNode(o,n)},toggleWrap:(e,t={})=>({state:n,commands:r})=>{const i=ox(e,n.schema);return Px(n,i,t)?r.lift(i):r.wrapIn(i,t)},undoInputRule:()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){const t=e.tr,n=o.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(o.text){const n=t.doc.resolve(o.from).marks();t.replaceWith(o.from,o.to,e.schema.text(o.text,n))}else t.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=Tx(e,r.schema),{$from:c,empty:u,ranges:d}=a;if(!i)return!0;if(u&&s){let{from:e,to:t}=a;const r=null===(o=c.marks().find((e=>e.type===l)))||void 0===o?void 0:o.attrs,i=Ox(c,l,r);i&&(e=i.from,t=i.to),n.removeMark(e,t,l)}else d.forEach((e=>{n.removeMark(e.$from.pos,e.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Ux("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(o=ox(e,r.schema)),"mark"===a&&(s=Tx(e,r.schema)),i&&n.selection.ranges.forEach((e=>{const i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,((e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),s&&e.marks.length&&e.marks.forEach((o=>{if(s===o.type){const l=Math.max(r,i),c=Math.min(r+e.nodeSize,a);n.addMark(l,c,s.create({...o.attrs,...t}))}}))}))})),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&en(s,e,t);return!!a&&(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0)}}(ox(e,n.schema),t)(n,r),wrapInList:(e,t={})=>({state:n,dispatch:r})=>Z_(ox(e,n.schema),t)(n,r)});const iE=kx.create({name:"commands",addCommands:()=>({...rE})}),oE=kx.create({name:"editable",addProseMirrorPlugins(){return[new $n({key:new qn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),sE=kx.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new $n({key:new qn("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),aE=kx.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:r}=t,{empty:i,$anchor:o}=n,{pos:s,parent:a}=o,l=_n.atStart(r).from===s;return!(!(i&&l&&a.type.isTextblock)||a.textContent.length)&&e.clearNodes()})),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()])),t=()=>this.editor.commands.first((({commands:e})=>[()=>e.deleteSelection(),()=>e.joinForward(),()=>e.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return zx()||Bx()?i:r},addProseMirrorPlugins(){return[new $n({key:new qn("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some((e=>e.docChanged))&&!t.doc.eq(n.doc)))return;const{empty:r,from:i,to:o}=t.selection,s=_n.atStart(t.doc).from,a=_n.atEnd(t.doc).to,l=i===s&&o===a,c=0===n.doc.textBetween(0,n.doc.content.size," "," ").length;if(r||!l||!c)return;const u=n.tr,d=ex({state:n,transaction:u}),{commands:p}=new tx({editor:this.editor,state:d});return p.clearNodes(),u.steps.length?u:void 0}})]}}),lE=kx.create({name:"tabindex",addProseMirrorPlugins(){return[new $n({key:new qn("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var cE=Object.freeze({__proto__:null,ClipboardTextSerializer:Cx,Commands:iE,Editable:oE,FocusEvents:sE,Keymap:aE,Tabindex:lE});const uE=`.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}`;function dE(e){return new mx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=cx(e.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Yx(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>c)).length)return null;u<n.to&&o.delete(u,n.to),c>n.from&&o.delete(n.from+r,c),l=n.from+r+s.length,o.addMark(n.from+r,l,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function pE(e){return new mx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=cx(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function hE(e){return new mx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=cx(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),s=o.doc.resolve(n.from).blockRange(),a=s&&en(s,e.type,i);if(!a)return null;o.wrap(s,a);const l=o.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&rn(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&o.join(n.from-1)}})}class fE{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=cx(nx(this,"addOptions",{name:this.name}))),this.storage=cx(nx(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new fE(e)}configure(e={}){const t=this.extend();return t.options=Ex(this.options,e),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new fE(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=cx(nx(t,"addOptions",{name:t.name})),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const i=r.marks(),o=!!i.find((e=>(null==e?void 0:e.type.name)===t.name));if(!o)return!1;const s=i.find((e=>(null==e?void 0:e.type.name)===t.name));return s&&n.removeStoredMark(s),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}class mE{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=cx(nx(this,"addOptions",{name:this.name}))),this.storage=cx(nx(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new mE(e)}configure(e={}){const t=this.extend();return t.options=Ex(this.options,e),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new mE(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=cx(nx(t,"addOptions",{name:t.name})),t.storage=cx(nx(t,"addStorage",{name:t.name,options:t.options})),t}}function gE(e){return new yx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=cx(e.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Yx(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>c)).length)return null;u<n.to&&o.delete(u,n.to),c>n.from&&o.delete(n.from+r,c),l=n.from+r+s.length,o.addMark(n.from+r,l,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}var bE="top",yE="bottom",vE="right",wE="left",_E="auto",xE=[bE,yE,vE,wE],EE="start",kE="end",ME="clippingParents",DE="viewport",CE="popper",SE="reference",AE=xE.reduce((function(e,t){return e.concat([t+"-"+EE,t+"-"+kE])}),[]),NE=[].concat(xE,[_E]).reduce((function(e,t){return e.concat([t,t+"-"+EE,t+"-"+kE])}),[]),OE=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function TE(e){return e?(e.nodeName||"").toLowerCase():null}function IE(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function LE(e){return e instanceof IE(e).Element||e instanceof Element}function FE(e){return e instanceof IE(e).HTMLElement||e instanceof HTMLElement}function zE(e){return"undefined"!=typeof ShadowRoot&&(e instanceof IE(e).ShadowRoot||e instanceof ShadowRoot)}var jE={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];FE(i)&&TE(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});FE(r)&&TE(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function RE(e){return e.split("-")[0]}var BE=Math.max,PE=Math.min,UE=Math.round;function HE(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function $E(){return!/^((?!chrome|android).)*safari/i.test(HE())}function VE(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&FE(e)&&(i=e.offsetWidth>0&&UE(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&UE(r.height)/e.offsetHeight||1);var s=(LE(e)?IE(e):window).visualViewport,a=!$E()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.offsetTop:0))/o,u=r.width/i,d=r.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function WE(e){var t=VE(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function qE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function KE(e){return IE(e).getComputedStyle(e)}function GE(e){return["table","td","th"].indexOf(TE(e))>=0}function YE(e){return((LE(e)?e.ownerDocument:e.document)||window.document).documentElement}function QE(e){return"html"===TE(e)?e:e.assignedSlot||e.parentNode||(zE(e)?e.host:null)||YE(e)}function JE(e){return FE(e)&&"fixed"!==KE(e).position?e.offsetParent:null}function ZE(e){for(var t=IE(e),n=JE(e);n&&GE(n)&&"static"===KE(n).position;)n=JE(n);return n&&("html"===TE(n)||"body"===TE(n)&&"static"===KE(n).position)?t:n||function(e){var t=/firefox/i.test(HE());if(/Trident/i.test(HE())&&FE(e)&&"fixed"===KE(e).position)return null;var n=QE(e);for(zE(n)&&(n=n.host);FE(n)&&["html","body"].indexOf(TE(n))<0;){var r=KE(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function XE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ek(e,t,n){return BE(e,PE(t,n))}function tk(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function nk(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var rk={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=RE(n.placement),l=XE(a),c=[wE,vE].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return tk("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:nk(e,xE))}(i.padding,n),d=WE(o),p="y"===l?bE:wE,h="y"===l?yE:vE,f=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],m=s[l]-n.rects.reference[l],g=ZE(o),b=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,v=u[p],w=b-d[c]-u[h],_=b/2-d[c]/2+y,x=ek(v,_,w),E=l;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&qE(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ik(e){return e.split("-")[1]}var ok={top:"auto",right:"auto",bottom:"auto",left:"auto"};function sk(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=s.x,h=void 0===p?0:p,f=s.y,m=void 0===f?0:f,g="function"==typeof u?u({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var b=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),v=wE,w=bE,_=window;if(c){var x=ZE(n),E="clientHeight",k="clientWidth";if(x===IE(n)&&"static"!==KE(x=YE(n)).position&&"absolute"===a&&(E="scrollHeight",k="scrollWidth"),i===bE||(i===wE||i===vE)&&o===kE)w=yE,m-=(d&&x===_&&_.visualViewport?_.visualViewport.height:x[E])-r.height,m*=l?1:-1;if(i===wE||(i===bE||i===yE)&&o===kE)v=vE,h-=(d&&x===_&&_.visualViewport?_.visualViewport.width:x[k])-r.width,h*=l?1:-1}var M,D=Object.assign({position:a},c&&ok),C=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:UE(t*r)/r||0,y:UE(n*r)/r||0}}({x:h,y:m}):{x:h,y:m};return h=C.x,m=C.y,l?Object.assign({},D,((M={})[w]=y?"0":"",M[v]=b?"0":"",M.transform=(_.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",M)):Object.assign({},D,((t={})[w]=y?m+"px":"",t[v]=b?h+"px":"",t.transform="",t))}var ak={passive:!0};var lk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=IE(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,ak)})),a&&l.addEventListener("resize",n.update,ak),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,ak)})),a&&l.removeEventListener("resize",n.update,ak)}},data:{}},ck={left:"right",right:"left",bottom:"top",top:"bottom"};function uk(e){return e.replace(/left|right|bottom|top/g,(function(e){return ck[e]}))}var dk={start:"end",end:"start"};function pk(e){return e.replace(/start|end/g,(function(e){return dk[e]}))}function hk(e){var t=IE(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function fk(e){return VE(YE(e)).left+hk(e).scrollLeft}function mk(e){var t=KE(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function gk(e){return["html","body","#document"].indexOf(TE(e))>=0?e.ownerDocument.body:FE(e)&&mk(e)?e:gk(QE(e))}function bk(e,t){var n;void 0===t&&(t=[]);var r=gk(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=IE(r),s=i?[o].concat(o.visualViewport||[],mk(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(bk(QE(s)))}function yk(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vk(e,t,n){return t===DE?yk(function(e,t){var n=IE(e),r=YE(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=$E();(c||!c&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+fk(e),y:l}}(e,n)):LE(t)?function(e,t){var n=VE(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):yk(function(e){var t,n=YE(e),r=hk(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=BE(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=BE(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+fk(e),l=-r.scrollTop;return"rtl"===KE(i||n).direction&&(a+=BE(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(YE(e)))}function wk(e,t,n,r){var i="clippingParents"===t?function(e){var t=bk(QE(e)),n=["absolute","fixed"].indexOf(KE(e).position)>=0&&FE(e)?ZE(e):e;return LE(n)?t.filter((function(e){return LE(e)&&qE(e,n)&&"body"!==TE(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=vk(e,n,r);return t.top=BE(i.top,t.top),t.right=PE(i.right,t.right),t.bottom=PE(i.bottom,t.bottom),t.left=BE(i.left,t.left),t}),vk(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function _k(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?RE(i):null,s=i?ik(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case bE:t={x:a,y:n.y-r.height};break;case yE:t={x:a,y:n.y+n.height};break;case vE:t={x:n.x+n.width,y:l};break;case wE:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?XE(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case EE:t[c]=t[c]-(n[u]/2-r[u]/2);break;case kE:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function xk(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?ME:a,c=n.rootBoundary,u=void 0===c?DE:c,d=n.elementContext,p=void 0===d?CE:d,h=n.altBoundary,f=void 0!==h&&h,m=n.padding,g=void 0===m?0:m,b=tk("number"!=typeof g?g:nk(g,xE)),y=p===CE?SE:CE,v=e.rects.popper,w=e.elements[f?y:p],_=wk(LE(w)?w:w.contextElement||YE(e.elements.popper),l,u,s),x=VE(e.elements.reference),E=_k({reference:x,element:v,strategy:"absolute",placement:i}),k=yk(Object.assign({},v,E)),M=p===CE?k:x,D={top:_.top-M.top+b.top,bottom:M.bottom-_.bottom+b.bottom,left:_.left-M.left+b.left,right:M.right-_.right+b.right},C=e.modifiersData.offset;if(p===CE&&C){var S=C[i];Object.keys(D).forEach((function(e){var t=[vE,yE].indexOf(e)>=0?1:-1,n=[bE,yE].indexOf(e)>=0?"y":"x";D[e]+=S[n]*t}))}return D}function Ek(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?NE:l,u=ik(r),d=u?a?AE:AE.filter((function(e){return ik(e)===u})):xE,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var h=p.reduce((function(t,n){return t[n]=xk(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[RE(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}var kk={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,f=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,b=RE(g),y=l||(b===g||!f?[uk(g)]:function(e){if(RE(e)===_E)return[];var t=uk(e);return[pk(e),t,pk(t)]}(g)),v=[g].concat(y).reduce((function(e,n){return e.concat(RE(n)===_E?Ek(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,_=t.rects.popper,x=new Map,E=!0,k=v[0],M=0;M<v.length;M++){var D=v[M],C=RE(D),S=ik(D)===EE,A=[bE,yE].indexOf(C)>=0,N=A?"width":"height",O=xk(t,{placement:D,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),T=A?S?vE:wE:S?yE:bE;w[N]>_[N]&&(T=uk(T));var I=uk(T),L=[];if(o&&L.push(O[C]<=0),a&&L.push(O[T]<=0,O[I]<=0),L.every((function(e){return e}))){k=D,E=!1;break}x.set(D,L)}if(E)for(var F=function(e){var t=v.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},z=f?3:1;z>0;z--){if("break"===F(z))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Mk(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Dk(e){return[bE,vE,yE,wE].some((function(t){return e[t]>=0}))}var Ck={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=xk(t,{elementContext:"reference"}),a=xk(t,{altBoundary:!0}),l=Mk(s,r),c=Mk(a,i,o),u=Dk(l),d=Dk(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var Sk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,s=NE.reduce((function(e,n){return e[n]=function(e,t,n){var r=RE(e),i=[wE,bE].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[wE,vE].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}};var Ak={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=_k({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Nk={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,h=void 0===p||p,f=n.tetherOffset,m=void 0===f?0:f,g=xk(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=RE(t.placement),y=ik(t.placement),v=!y,w=XE(b),_="x"===w?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,k=t.rects.popper,M="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,D="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(x){if(o){var A,N="y"===w?bE:wE,O="y"===w?yE:vE,T="y"===w?"height":"width",I=x[w],L=I+g[N],F=I-g[O],z=h?-k[T]/2:0,j=y===EE?E[T]:k[T],R=y===EE?-k[T]:-E[T],B=t.elements.arrow,P=h&&B?WE(B):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=U[N],$=U[O],V=ek(0,E[T],P[T]),W=v?E[T]/2-z-V-H-D.mainAxis:j-V-H-D.mainAxis,q=v?-E[T]/2+z+V+$+D.mainAxis:R+V+$+D.mainAxis,K=t.elements.arrow&&ZE(t.elements.arrow),G=K?"y"===w?K.clientTop||0:K.clientLeft||0:0,Y=null!=(A=null==C?void 0:C[w])?A:0,Q=I+q-Y,J=ek(h?PE(L,I+W-Y-G):L,I,h?BE(F,Q):F);x[w]=J,S[w]=J-I}if(a){var Z,X="x"===w?bE:wE,ee="x"===w?yE:vE,te=x[_],ne="y"===_?"height":"width",re=te+g[X],ie=te-g[ee],oe=-1!==[bE,wE].indexOf(b),se=null!=(Z=null==C?void 0:C[_])?Z:0,ae=oe?re:te-E[ne]-k[ne]-se+D.altAxis,le=oe?te+E[ne]+k[ne]-se-D.altAxis:ie,ce=h&&oe?function(e,t,n){var r=ek(e,t,n);return r>n?n:r}(ae,te,le):ek(h?ae:re,te,h?le:ie);x[_]=ce,S[_]=ce-te}t.modifiersData[r]=S}},requiresIfExists:["offset"]};function Ok(e,t,n){void 0===n&&(n=!1);var r,i,o=FE(t),s=FE(t)&&function(e){var t=e.getBoundingClientRect(),n=UE(t.width)/e.offsetWidth||1,r=UE(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=YE(t),l=VE(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==TE(t)||mk(a))&&(c=(r=t)!==IE(r)&&FE(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:hk(r)),FE(t)?((u=VE(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=fk(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Tk(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var Ik={placement:"bottom",modifiers:[],strategy:"absolute"};function Lk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Fk(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?Ik:i;return function(e,t,n){void 0===n&&(n=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ik,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(n){var i="function"==typeof n?n(a.options):n;d(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:LE(e)?bk(e):e.contextElement?bk(e.contextElement):[],popper:bk(t)};var s=function(e){var t=Tk(e);return OE.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,a.options.modifiers)));return a.orderedModifiers=s.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:a,name:t,instance:u,options:r}),s=function(){};l.push(o||s)}})),u.update()},forceUpdate:function(){if(!c){var e=a.elements,t=e.reference,n=e.popper;if(Lk(t,n)){a.rects={reference:Ok(t,ZE(n),"fixed"===a.options.strategy),popper:WE(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],o=i.fn,s=i.options,l=void 0===s?{}:s,d=i.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:u})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){d(),c=!0}};if(!Lk(e,t))return u;function d(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var zk=Fk({defaultModifiers:[lk,Ak,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:RE(t.placement),variation:ik(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,sk(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,sk(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},jE,Sk,kk,Nk,rk,Ck]}),jk='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',Rk="tippy-box",Bk="tippy-content",Pk="tippy-backdrop",Uk="tippy-arrow",Hk="tippy-svg-arrow",$k={passive:!0,capture:!0},Vk=function(){return document.body};function Wk(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function qk(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Kk(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Gk(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Yk(e){return[].concat(e)}function Qk(e,t){-1===e.indexOf(t)&&e.push(t)}function Jk(e){return[].slice.call(e)}function Zk(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Xk(){return document.createElement("div")}function eM(e){return["Element","Fragment"].some((function(t){return qk(e,t)}))}function tM(e){return eM(e)?[e]:function(e){return qk(e,"NodeList")}(e)?Jk(e):Array.isArray(e)?e:Jk(document.querySelectorAll(e))}function nM(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function rM(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function iM(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function oM(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var sM={isTouch:!1},aM=0;function lM(){sM.isTouch||(sM.isTouch=!0,window.performance&&document.addEventListener("mousemove",cM))}function cM(){var e=performance.now();e-aM<20&&(sM.isTouch=!1,document.removeEventListener("mousemove",cM)),aM=e}function uM(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var dM=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,pM=Object.assign({appendTo:Vk,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),hM=Object.keys(pM);function fM(e){var t=(e.plugins||[]).reduce((function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=pM[i])?r:o);return t}),{});return Object.assign({},e,t)}function mM(e,t){var n=Object.assign({},t,{content:Kk(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(fM(Object.assign({},pM,{plugins:t}))):hM).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},pM.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function gM(e,t){e["innerHTML"]=t}function bM(e){var t=Xk();return!0===e?t.className=Uk:(t.className=Hk,eM(e)?t.appendChild(e):gM(t,e)),t}function yM(e,t){eM(t.content)?(gM(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?gM(e,t.content):e.textContent=t.content)}function vM(e){var t=e.firstElementChild,n=Jk(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Bk)})),arrow:n.find((function(e){return e.classList.contains(Uk)||e.classList.contains(Hk)})),backdrop:n.find((function(e){return e.classList.contains(Pk)}))}}function wM(e){var t=Xk(),n=Xk();n.className=Rk,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Xk();function i(n,r){var i=vM(t),o=i.box,s=i.content,a=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||yM(s,e.props),r.arrow?a?n.arrow!==r.arrow&&(o.removeChild(a),o.appendChild(bM(r.arrow))):o.appendChild(bM(r.arrow)):a&&o.removeChild(a)}return r.className=Bk,r.setAttribute("data-state","hidden"),yM(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}wM.$$tippy=!0;var _M=1,xM=[],EM=[];function kM(e,t){var n,r,i,o,s,a,l,c,u=mM(e,Object.assign({},pM,fM(Zk(t)))),d=!1,p=!1,h=!1,f=!1,m=[],g=Gk(K,u.interactiveDebounce),b=_M++,y=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),v={id:b,reference:e,popper:Xk(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){if(v.state.isDestroyed)return;I("onBeforeUpdate",[v,t]),W();var n=v.props,r=mM(e,Object.assign({},n,Zk(t),{ignoreAttributes:!0}));v.props=r,V(),n.interactiveDebounce!==r.interactiveDebounce&&(z(),g=Gk(K,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Yk(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");F(),T(),x&&x(n,r);v.popperInstance&&(J(),X().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));I("onAfterUpdate",[v,t])},setContent:function(e){v.setProps({content:e})},show:function(){var e=v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,r=sM.isTouch&&!v.props.touch,i=Wk(v.props.duration,0,pM.duration);if(e||t||n||r)return;if(S().hasAttribute("disabled"))return;if(I("onShow",[v],!1),!1===v.props.onShow(v))return;v.state.isVisible=!0,C()&&(_.style.visibility="visible");T(),P(),v.state.isMounted||(_.style.transition="none");if(C()){var o=N(),s=o.box,l=o.content;nM([s,l],0)}a=function(){var e;if(v.state.isVisible&&!f){if(f=!0,_.offsetHeight,_.style.transition=v.props.moveTransition,C()&&v.props.animation){var t=N(),n=t.box,r=t.content;nM([n,r],i),rM([n,r],"visible")}L(),F(),Qk(EM,v),null==(e=v.popperInstance)||e.forceUpdate(),I("onMount",[v]),v.props.animation&&C()&&function(e,t){H(e,t)}(i,(function(){v.state.isShown=!0,I("onShown",[v])}))}},function(){var e,t=v.props.appendTo,n=S();e=v.props.interactive&&t===Vk||"parent"===t?n.parentNode:Kk(t,[n]);e.contains(_)||e.appendChild(_);v.state.isMounted=!0,J()}()},hide:function(){var e=!v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,r=Wk(v.props.duration,1,pM.duration);if(e||t||n)return;if(I("onHide",[v],!1),!1===v.props.onHide(v))return;v.state.isVisible=!1,v.state.isShown=!1,f=!1,d=!1,C()&&(_.style.visibility="hidden");if(z(),U(),T(!0),C()){var i=N(),o=i.box,s=i.content;v.props.animation&&(nM([o,s],r),rM([o,s],"hidden"))}L(),F(),v.props.animation?C()&&function(e,t){H(e,(function(){!v.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()}))}(r,v.unmount):v.unmount()},hideWithInteractivity:function(e){A().addEventListener("mousemove",g),Qk(xM,g),g(e)},enable:function(){v.state.isEnabled=!0},disable:function(){v.hide(),v.state.isEnabled=!1},unmount:function(){v.state.isVisible&&v.hide();if(!v.state.isMounted)return;Z(),X().forEach((function(e){e._tippy.unmount()})),_.parentNode&&_.parentNode.removeChild(_);EM=EM.filter((function(e){return e!==v})),v.state.isMounted=!1,I("onHidden",[v])},destroy:function(){if(v.state.isDestroyed)return;v.clearDelayTimeouts(),v.unmount(),W(),delete e._tippy,v.state.isDestroyed=!0,I("onDestroy",[v])}};if(!u.render)return v;var w=u.render(v),_=w.popper,x=w.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+v.id,v.popper=_,e._tippy=v,_._tippy=v;var E=y.map((function(e){return e.fn(v)})),k=e.hasAttribute("aria-expanded");return V(),F(),T(),I("onCreate",[v]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",(function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()})),_.addEventListener("mouseleave",(function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",g)})),v;function M(){var e=v.props.touch;return Array.isArray(e)?e:[e,0]}function D(){return"hold"===M()[0]}function C(){var e;return!(null==(e=v.props.render)||!e.$$tippy)}function S(){return l||e}function A(){var e,t,n=S().parentNode;return n?null!=(t=Yk(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function N(){return vM(_)}function O(e){return v.state.isMounted&&!v.state.isVisible||sM.isTouch||o&&"focus"===o.type?0:Wk(v.props.delay,e?0:1,pM.delay)}function T(e){void 0===e&&(e=!1),_.style.pointerEvents=v.props.interactive&&!e?"":"none",_.style.zIndex=""+v.props.zIndex}function I(e,t,n){var r;(void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=v.props)[e].apply(r,t)}function L(){var t=v.props.aria;if(t.content){var n="aria-"+t.content,r=_.id;Yk(v.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(v.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function F(){!k&&v.props.aria.expanded&&Yk(v.props.triggerTarget||e).forEach((function(e){v.props.interactive?e.setAttribute("aria-expanded",v.state.isVisible&&e===S()?"true":"false"):e.removeAttribute("aria-expanded")}))}function z(){A().removeEventListener("mousemove",g),xM=xM.filter((function(e){return e!==g}))}function j(t){if(!sM.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!v.props.interactive||!oM(_,n)){if(Yk(v.props.triggerTarget||e).some((function(e){return oM(e,n)}))){if(sM.isTouch)return;if(v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else I("onClickOutside",[v,t]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),p=!0,setTimeout((function(){p=!1})),v.state.isMounted||U())}}}function R(){h=!0}function B(){h=!1}function P(){var e=A();e.addEventListener("mousedown",j,!0),e.addEventListener("touchend",j,$k),e.addEventListener("touchstart",B,$k),e.addEventListener("touchmove",R,$k)}function U(){var e=A();e.removeEventListener("mousedown",j,!0),e.removeEventListener("touchend",j,$k),e.removeEventListener("touchstart",B,$k),e.removeEventListener("touchmove",R,$k)}function H(e,t){var n=N().box;function r(e){e.target===n&&(iM(n,"remove",r),t())}if(0===e)return t();iM(n,"remove",s),iM(n,"add",r),s=r}function $(t,n,r){void 0===r&&(r=!1),Yk(v.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function V(){var e;D()&&($("touchstart",q,{passive:!0}),$("touchend",G,{passive:!0})),(e=v.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,q),e){case"mouseenter":$("mouseleave",G);break;case"focus":$(dM?"focusout":"blur",Y);break;case"focusin":$("focusout",Y)}}))}function W(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),m=[]}function q(e){var t,n=!1;if(v.state.isEnabled&&!Q(e)&&!p){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,F(),!v.state.isVisible&&qk(e,"MouseEvent")&&xM.forEach((function(t){return t(e)})),"click"===e.type&&(v.props.trigger.indexOf("mouseenter")<0||d)&&!1!==v.props.hideOnClick&&v.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!r&&te(e)}}function K(e){var t=e.target,n=S().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var r=X().concat(_).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,s=i.placement.split("-")[0],a=i.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,u="right"===s?a.left.x:0,d="left"===s?a.right.x:0,p=t.top-r+l>o,h=r-t.bottom-c>o,f=t.left-n+u>o,m=n-t.right-d>o;return p||h||f||m}))})(r,e)&&(z(),te(e))}}function G(e){Q(e)||v.props.trigger.indexOf("click")>=0&&d||(v.props.interactive?v.hideWithInteractivity(e):te(e))}function Y(e){v.props.trigger.indexOf("focusin")<0&&e.target!==S()||v.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function Q(e){return!!sM.isTouch&&D()!==e.type.indexOf("touch")>=0}function J(){Z();var t=v.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,s=t.moveTransition,l=C()?vM(_).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||S()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(C()){var n=N().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},u];C()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),v.popperInstance=zk(c,_,Object.assign({},n,{placement:r,onFirstUpdate:a,modifiers:d}))}function Z(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function X(){return Jk(_.querySelectorAll("[data-tippy-root]"))}function ee(e){v.clearDelayTimeouts(),e&&I("onTrigger",[v,e]),P();var t=O(!0),r=M(),i=r[0],o=r[1];sM.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout((function(){v.show()}),t):v.show()}function te(e){if(v.clearDelayTimeouts(),I("onUntrigger",[v,e]),v.state.isVisible){if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=O(!1);t?r=setTimeout((function(){v.state.isVisible&&v.hide()}),t):i=requestAnimationFrame((function(){v.hide()}))}}else U()}}function MM(e,t){void 0===t&&(t={});var n=pM.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",lM,$k),window.addEventListener("blur",uM);var r=Object.assign({},t,{plugins:n}),i=tM(e).reduce((function(e,t){var n=t&&kM(t,r);return n&&e.push(n),e}),[]);return eM(e)?i[0]:i}MM.defaultProps=pM,MM.setDefaultProps=function(e){Object.keys(e).forEach((function(t){pM[t]=e[t]}))},MM.currentInput=sM,Object.assign({},jE,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),MM.setDefaultProps({render:wM});class DM{constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:e,state:t,from:n,to:r})=>{const{doc:i,selection:o}=t,{empty:s}=o,a=!i.textBetween(n,r).length&&Ix(t.selection),l=this.element.contains(document.activeElement);return!(!e.hasFocus()&&!l||s||a||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=n,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=MM(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(e=>{this.blurHandler({event:e})})))}update(e,t){var n,r,i;const{state:o,composing:s}=e,{doc:a,selection:l}=o,c=t&&t.doc.eq(a)&&t.selection.eq(l);if(s||c)return;this.createTooltip();const{ranges:u}=l,d=Math.min(...u.map((e=>e.$from.pos))),p=Math.max(...u.map((e=>e.$to.pos)));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:o,oldState:t,from:d,to:p}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(i=this.tippyOptions)||void 0===i?void 0:i.getReferenceClientRect)||(()=>{if(o.selection instanceof Cn){const t=e.nodeDOM(d);if(t)return t.getBoundingClientRect()}return Zx(e,d,p)})}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const CM=e=>new $n({key:"string"==typeof e.pluginKey?new qn(e.pluginKey):e.pluginKey,view:t=>new DM({view:t,...e})});kx.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[CM({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class SM{constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:e,state:t})=>{const{selection:n}=t,{$anchor:r,empty:i}=n,o=1===r.depth,s=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(e.hasFocus()&&i&&o&&s&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=n,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=MM(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(e=>{this.blurHandler({event:e})})))}update(e,t){var n,r,i;const{state:o}=e,{doc:s,selection:a}=o,{from:l,to:c}=a;if(t&&t.doc.eq(s)&&t.selection.eq(a))return;this.createTooltip();(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:o,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(i=this.tippyOptions)||void 0===i?void 0:i.getReferenceClientRect)||(()=>Zx(e,l,c))}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}kx.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[(e={pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow},new $n({key:"string"==typeof e.pluginKey?new qn(e.pluginKey):e.pluginKey,view:t=>new SM({view:t,...e})}))]:[];var e}});const AM=e=>{const[t,i]=r(null);return s((()=>{if(!t)return;if(e.editor.isDestroyed)return;const{pluginKey:n="bubbleMenu",editor:r,tippyOptions:i={},shouldShow:o=null}=e,s=CM({pluginKey:n,editor:r,element:t,tippyOptions:i,shouldShow:o});return r.registerPlugin(s),()=>r.unregisterPlugin(n)}),[e.editor,t]),n.createElement("div",{ref:i,className:e.className,style:{visibility:"hidden"}},e.children)};class NM extends class extends class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach((e=>e.apply(this,t))),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((e=>e!==t)):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(e,t){const n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;const r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}(uE,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e){this.setOptions({editable:e}),this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const n=lx(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((e=>!e.key.startsWith(t)))});this.view.updateState(n)}createExtensionManager(){const e=[...this.options.enableCoreExtensions?Object.values(cE):[],...this.options.extensions].filter((e=>["extension","node","mark"].includes(null==e?void 0:e.type)));this.extensionManager=new _x(e,this)}createCommandManager(){this.commandManager=new tx({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=$x(this.options.content,this.schema,this.options.parseOptions),t=Fx(e,this.options.autofocus);this.view=new M_(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Un.create({doc:e,selection:t||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews();this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((e=>{var t;return null===(t=this.capturedTransaction)||void 0===t?void 0:t.step(e)})):void(this.capturedTransaction=e);const t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),i=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Kx(this.state,e)}isActive(e,t){const n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return Px(e,null,n)||Qx(e,null,n);const r=Ux(t,e.schema);return"node"===r?Px(e,t,n):"mark"===r&&Qx(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function(e,t){const n=Ct.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return function(e,t){return Mx(e,{from:0,to:e.content.size},t)}(this.state.doc,{blockSeparator:t,textSerializers:{...n,...Dx(this.schema)}})}get isEmpty(){return function(e){var t;const n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}{constructor(){super(...arguments),this.contentComponent=null}}const OM=({renderers:e})=>n.createElement(n.Fragment,null,Array.from(e).map((([e,t])=>fe.createPortal(t.reactElement,t.element,e))));class TM extends n.Component{constructor(e){super(e),this.editorContentRef=n.createRef(),this.state={renderers:new Map}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:e}=this.props;if(e&&e.options.element){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews()}}componentWillUnmount(){const{editor:e}=this.props;if(!e)return;if(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild)return;const t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){const{editor:e,...t}=this.props;return n.createElement(n.Fragment,null,n.createElement("div",{ref:this.editorContentRef,...t}),n.createElement(OM,{renderers:this.state.renderers}))}}const IM=n.memo(TM),LM=a({onDragStart:void 0}),FM=()=>l(LM),zM=e=>{const t=e.as||"div",{nodeViewContentRef:r}=FM();return n.createElement(t,{...e,ref:r,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...e.style}})},jM=n.forwardRef(((e,t)=>{const{onDragStart:r}=FM(),i=e.as||"div";return n.createElement(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})}));class RM{constructor(e,{editor:t,props:n={},as:r="div",className:i=""}){this.ref=null,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.render()}render(){const e=this.component,t=this.props;(function(e){return!("function"!=typeof e||!e.prototype||!e.prototype.isReactComponent)}(e)||function(e){var t;return!("object"!=typeof e||"Symbol(react.forward_ref)"!==(null===(t=e.$$typeof)||void 0===t?void 0:t.toString()))}(e))&&(t.ref=e=>{this.ref=e}),this.reactElement=n.createElement(e,{...t}),queueMicrotask((()=>{me((()=>{var e;(null===(e=this.editor)||void 0===e?void 0:e.contentComponent)&&this.editor.contentComponent.setState({renderers:this.editor.contentComponent.state.renderers.set(this.id,this)})}))}))}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){queueMicrotask((()=>{me((()=>{var e;if(null===(e=this.editor)||void 0===e?void 0:e.contentComponent){const{renderers:e}=this.editor.contentComponent.state;e.delete(this.id),this.editor.contentComponent.setState({renderers:e})}}))}))}}class BM extends class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,i,o,s,a;const{view:l}=this.editor,c=e.target,u=3===c.nodeType?null===(t=c.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(c))||!u)return;let d=0,p=0;if(this.dom!==u){const t=this.dom.getBoundingClientRect(),n=u.getBoundingClientRect(),a=null!==(r=e.offsetX)&&void 0!==r?r:null===(i=e.nativeEvent)||void 0===i?void 0:i.offsetX,l=null!==(o=e.offsetY)&&void 0!==o?o:null===(s=e.nativeEvent)||void 0===s?void 0:s.offsetY;d=n.x-t.x+a,p=n.y-t.y+l}null===(a=e.dataTransfer)||void 0===a||a.setDragImage(this.dom,d,p);const h=Cn.create(l.state.doc,this.getPos()),f=l.state.tr.setSelection(h);l.dispatch(f)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const n=e.target;if(!(this.dom.contains(n)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(n))))return!1;const r="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!r)return!0;const{isEditable:i}=this.editor,{isDragging:o}=this,s=!!this.node.type.spec.draggable,a=Cn.isSelectable(this.node),l="copy"===e.type,c="paste"===e.type,u="cut"===e.type,d="mousedown"===e.type,p=e.type.startsWith("drag");if(!s&&a&&p&&e.preventDefault(),s&&p&&!o)return e.preventDefault(),!1;if(s&&i&&!o&&d){const e=n.closest("[data-drag-handle]");e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener("dragend",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(()=>{this.isDragging=!1}),{once:!0}))}return!(o||r||l||c||u||d&&a)}ignoreMutation(e){if(!this.dom||!this.contentDOM)return!0;if("function"==typeof this.options.ignoreMutation)return this.options.ignoreMutation({mutation:e});if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===e.type)return!1;if(this.dom.contains(e.target)&&"childList"===e.type&&zx()&&this.editor.isFocused){if([...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every((e=>e.isContentEditable)))return!1}return this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command((({tr:t})=>{const n=this.getPos();return t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0}))}deleteNode(){const e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}const t=e=>{const t=this.component,r=this.onDragStart.bind(this);return n.createElement(LM.Provider,{value:{onDragStart:r,nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&e.appendChild(this.contentDOMElement)}}},n.createElement(t,{...e}))};t.displayName="ReactNodeView",this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit");let r=this.node.isInline?"span":"div";this.options.as&&(r=this.options.as);const{className:i=""}=this.options;this.renderer=new RM(t,{editor:this.editor,props:e,as:r,className:`node-${this.node.type.name} ${i}`.trim()})}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null===(e=this.renderer.element.firstElementChild)||void 0===e?void 0:e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}update(e,t){const n=e=>{this.renderer.updateProps(e)};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){const r=this.node,i=this.decorations;return this.node=e,this.decorations=t,this.options.update({oldNode:r,oldDecorations:i,newNode:e,newDecorations:t,updateProps:()=>n({node:e,decorations:t})})}return e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,n({node:e,decorations:t})),!0}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy(),this.contentDOMElement=null}}function PM(e,t){return n=>n.editor.contentComponent?new BM(e,n,t):{}}const UM=(e={},t=[])=>{const[n,i]=r(null),o=function(){const[,e]=r(0);return()=>e((e=>e+1))}();return s((()=>{let t=!0;const n=new NM(e);return i(n),n.on("transaction",(()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t&&o()}))}))})),()=>{n.destroy(),t=!1}}),t),n},HM=e=>{let{error:t,children:r}=e;const i=!Xo(t),o=_s({"neeto-editor-error":i});return n.createElement(n.Fragment,null,n.createElement("div",{className:o},r),i&&n.createElement("p",{className:"neeto-ui-input__error"},(()=>{if(!t)return null;let e;return be(String,t)?e=t:be(Array,t)?e=t[0]:be(Object,t)&&(e=t.message),Xo(e)?null:e})()))},$M=e=>{let{editor:t,isActive:r,children:i}=e;return r&&t?n.createElement(n.Fragment,null,i,n.createElement("p",{className:"neeto-editor-character-count","data-cy":"neeto-editor-character-count"},t.storage.characterCount.characters()," characters")):i},VM=e=>!!e&&(WM(e)||KM(e)||qM(e)),WM=e=>{const t=e.match(Jn);return t&&`https://www.youtube.com/embed/${t[5]}`},qM=e=>{const t=e.match(Zn);return t&&`https://player.vimeo.com/video/${t[4]}?h=${t[5]}`},KM=e=>{const t=e.match(Xn);return t&&`https://www.loom.com/embed/${t[4]}?t=${t[5]||""}`},GM=e=>{let{isEmbedModalOpen:t,setIsEmbedModalOpen:o,editor:s}=e;const[a,l]=r(""),[c,u]=r(!1),d=i(null),p=()=>{const e=VM(a);e?(s.chain().focus().setExternalVideo({src:e}).run(),l(""),o(!1)):u(!0)},h=()=>{l(""),u(!1),o(!1)};return n.createElement(D,{initialFocusRef:d,isOpen:t,onClose:h},n.createElement(D.Header,null,n.createElement(E,{style:"h2"},"Embed Video")),n.createElement(D.Body,{className:"space-y-2 ne-embed-modal"},n.createElement(_,{error:c&&"Please enter a valid URL",label:"Video URL:",ref:d,size:"medium",type:"text",value:a,onChange:e=>{VM(e.target.value)?(u(!1),l(e.target.value)):(u(!0),l(e.target.value))},onKeyDown:e=>{"Enter"===e.key?p():"Escape"===e.key&&h()}})),n.createElement(D.Footer,{className:"space-x-2"},n.createElement(x,{disabled:c||b(a),label:"Embed",onClick:p})))},YM=kx.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){return t.textBetween(0,t.content.size,void 0," ").length}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter((e=>""!==e)).length}},addProseMirrorPlugins(){return[new $n({key:new qn("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n)return!0;if(r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r)return!1;if(!e.getMeta("paste"))return!1;const o=e.selection.$head.pos,s=o-(i-n),a=o;e.deleteRange(s,a);return!(this.storage.characters({node:e.doc})>n)}})]}}),QM=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,JM=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,ZM=fE.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[dE({find:QM,type:this.type})]},addPasteRules(){return[gE({find:JM,type:this.type})]}}),XM=mE.create({name:"doc",topNode:!0,content:"block+"}),eD=kx.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new $n({key:new qn("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,o=[];if(!n||!r)return i_.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(i>=t&&i<=t+e.nodeSize-1))return!1;s+=1}));let a=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(i>=t&&i<=t+e.nodeSize-1))return!1;a+=1;if("deepest"===this.options.mode&&s-a>0||"shallowest"===this.options.mode&&a>1)return"deepest"===this.options.mode;o.push(t_.node(t,t+e.nodeSize,{class:this.options.className}))})),i_.create(e,o)}}})]}}),tD=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,nD=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,rD=fE.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[dE({find:tD,type:this.type})]},addPasteRules(){return[gE({find:nD,type:this.type})]}});function iD(e){this.j={},this.jr=[],this.jd=null,this.t=e}iD.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=oD();var i=cD(this,e);return i?(Object.assign(r.j,i.j),r.jr.append(i.jr),r.jr=i.jd,r.t=n||i.t):r.t=n,this.j[e]=r,r}};var oD=function(){return new iD},sD=function(e){return new iD(e)},aD=function(e,t,n){e.j[t]||(e.j[t]=n)},lD=function(e,t,n){e.jr.push([t,n])},cD=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var i=e.jr[r][0],o=e.jr[r][1];if(i.test(t))return o}return e.jd},uD=function(e,t,n){for(var r=0;r<t.length;r++)aD(e,t[r],n)},dD=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],i=t[n][1];aD(e,r,i)}},pD=function(e,t,n,r){for(var i,o=0,s=t.length;o<s&&(i=e.j[t[o]]);)e=i,o++;if(o>=s)return[];for(;o<s-1;)i=r(),aD(e,t[o],i),e=i,o++;aD(e,t[s-1],n)},hD="DOMAIN",fD="LOCALHOST",mD="TLD",gD="NUM",bD="PROTOCOL",yD="MAILTO",vD="WS",wD="NL",_D="OPENBRACE",xD="OPENBRACKET",ED="OPENANGLEBRACKET",kD="OPENPAREN",MD="CLOSEBRACE",DD="CLOSEBRACKET",CD="CLOSEANGLEBRACKET",SD="CLOSEPAREN",AD="AMPERSAND",ND="APOSTROPHE",OD="ASTERISK",TD="AT",ID="BACKSLASH",LD="BACKTICK",FD="CARET",zD="COLON",jD="COMMA",RD="DOLLAR",BD="DOT",PD="EQUALS",UD="EXCLAMATION",HD="HYPHEN",$D="PERCENT",VD="PIPE",WD="PLUS",qD="POUND",KD="QUERY",GD="QUOTE",YD="SEMI",QD="SLASH",JD="TILDE",ZD="UNDERSCORE",XD="SYM",eC=Object.freeze({__proto__:null,DOMAIN:hD,LOCALHOST:fD,TLD:mD,NUM:gD,PROTOCOL:bD,MAILTO:yD,WS:vD,NL:wD,OPENBRACE:_D,OPENBRACKET:xD,OPENANGLEBRACKET:ED,OPENPAREN:kD,CLOSEBRACE:MD,CLOSEBRACKET:DD,CLOSEANGLEBRACKET:CD,CLOSEPAREN:SD,AMPERSAND:AD,APOSTROPHE:ND,ASTERISK:OD,AT:TD,BACKSLASH:ID,BACKTICK:LD,CARET:FD,COLON:zD,COMMA:jD,DOLLAR:RD,DOT:BD,EQUALS:PD,EXCLAMATION:UD,HYPHEN:HD,PERCENT:$D,PIPE:VD,PLUS:WD,POUND:qD,QUERY:KD,QUOTE:GD,SEMI:YD,SLASH:QD,TILDE:JD,UNDERSCORE:ZD,SYM:XD}),tC="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),nC=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,rC=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,iC=/\uFE0F/,oC=/\d/,sC=/\s/;function aC(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=oD(),n=sD(gD),r=sD(hD),i=oD(),o=sD(vD),s=[[oC,r],[nC,r],[rC,r],[iC,r]],a=function(){var e=sD(hD);return e.j={"-":i},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};dD(t,[["'",sD(ND)],["{",sD(_D)],["[",sD(xD)],["<",sD(ED)],["(",sD(kD)],["}",sD(MD)],["]",sD(DD)],[">",sD(CD)],[")",sD(SD)],["&",sD(AD)],["*",sD(OD)],["@",sD(TD)],["`",sD(LD)],["^",sD(FD)],[":",sD(zD)],[",",sD(jD)],["$",sD(RD)],[".",sD(BD)],["=",sD(PD)],["!",sD(UD)],["-",sD(HD)],["%",sD($D)],["|",sD(VD)],["+",sD(WD)],["#",sD(qD)],["?",sD(KD)],['"',sD(GD)],["/",sD(QD)],[";",sD(YD)],["~",sD(JD)],["_",sD(ZD)],["\\",sD(ID)]]),aD(t,"\n",sD(wD)),lD(t,sC,o),aD(o,"\n",oD()),lD(o,sC,o);for(var c=0;c<tC.length;c++)pD(t,tC[c],l(mD),a);var u=a(),d=a(),p=a(),h=a();pD(t,"file",u,a),pD(t,"ftp",d,a),pD(t,"http",p,a),pD(t,"mailto",h,a);var f=a(),m=sD(bD),g=sD(yD);aD(d,"s",f),aD(d,":",m),aD(p,"s",f),aD(p,":",m),aD(u,":",m),aD(f,":",m),aD(h,":",g);for(var b=a(),y=0;y<e.length;y++)pD(t,e[y],b,a);return aD(b,":",m),pD(t,"localhost",l(fD),a),lD(t,oC,n),lD(t,nC,r),lD(t,rC,r),lD(t,iC,r),lD(n,oC,n),lD(n,nC,r),lD(n,rC,r),lD(n,iC,r),aD(n,"-",i),aD(r,"-",i),aD(i,"-",i),lD(r,oC,r),lD(r,nC,r),lD(r,rC,r),lD(r,iC,r),lD(i,oC,r),lD(i,nC,r),lD(i,rC,r),lD(i,iC,r),t.jd=sD(XD),t}var lC={defaultProtocol:"http",events:null,format:cC,formatHref:cC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function cC(e){return e}function uC(){}function dC(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var i in n)r[i]=n[i];r.constructor=t,t.prototype=r}(uC,n,t),n}uC.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lC.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var pC=dC("email",{isLink:!0}),hC=dC("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),fC=dC("text"),mC=dC("nl"),gC=dC("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lC.defaultProtocol,t=this.tk,n=!1,r=!1,i=[],o=0;t[o].t===bD;)n=!0,i.push(t[o].v),o++;for(;t[o].t===QD;)r=!0,i.push(t[o].v),o++;for(;o<t.length;o++)i.push(t[o].v);return i=i.join(""),n||r||(i="".concat(e,"://").concat(i)),i},hasProtocol:function(){return this.tk[0].t===bD}}),bC=Object.freeze({__proto__:null,MultiToken:uC,Base:uC,createTokenClass:dC,MailtoEmail:pC,Email:hC,Text:fC,Nl:mC,Url:gC});function yC(){var e=oD(),t=oD(),n=oD(),r=oD(),i=oD(),o=oD(),s=oD(),a=sD(gC),l=oD(),c=sD(gC),u=sD(gC),d=oD(),p=oD(),h=oD(),f=oD(),m=oD(),g=sD(gC),b=sD(gC),y=sD(gC),v=sD(gC),w=oD(),_=oD(),x=oD(),E=oD(),k=oD(),M=oD(),D=sD(hC),C=oD(),S=sD(hC),A=sD(pC),N=oD(),O=oD(),T=oD(),I=oD(),L=sD(mC);aD(e,wD,L),aD(e,bD,t),aD(e,yD,n),aD(t,QD,r),aD(r,QD,i),aD(e,mD,o),aD(e,hD,o),aD(e,fD,a),aD(e,gD,o),aD(i,mD,u),aD(i,hD,u),aD(i,gD,u),aD(i,fD,u),aD(o,BD,s),aD(k,BD,M),aD(s,mD,a),aD(s,hD,o),aD(s,gD,o),aD(s,fD,o),aD(M,mD,D),aD(M,hD,k),aD(M,gD,k),aD(M,fD,k),aD(a,BD,s),aD(D,BD,M),aD(a,zD,l),aD(a,QD,u),aD(l,gD,c),aD(c,QD,u),aD(D,zD,C),aD(C,gD,S);var F=[AD,OD,TD,ID,LD,FD,RD,hD,PD,HD,fD,gD,$D,VD,WD,qD,bD,QD,XD,JD,mD,ZD],z=[ND,CD,MD,DD,SD,zD,jD,BD,UD,ED,_D,xD,kD,KD,GD,YD];aD(u,_D,p),aD(u,xD,h),aD(u,ED,f),aD(u,kD,m),aD(d,_D,p),aD(d,xD,h),aD(d,ED,f),aD(d,kD,m),aD(p,MD,u),aD(h,DD,u),aD(f,CD,u),aD(m,SD,u),aD(g,MD,u),aD(b,DD,u),aD(y,CD,u),aD(v,SD,u),aD(w,MD,u),aD(_,DD,u),aD(x,CD,u),aD(E,SD,u),uD(p,F,g),uD(h,F,b),uD(f,F,y),uD(m,F,v),uD(p,z,w),uD(h,z,_),uD(f,z,x),uD(m,z,E),uD(g,F,g),uD(b,F,b),uD(y,F,y),uD(v,F,v),uD(g,z,g),uD(b,z,b),uD(y,z,y),uD(v,z,v),uD(w,F,g),uD(_,F,b),uD(x,F,y),uD(E,F,v),uD(w,z,w),uD(_,z,_),uD(x,z,x),uD(E,z,E),uD(u,F,u),uD(d,F,u),uD(u,z,d),uD(d,z,d),aD(n,mD,A),aD(n,hD,A),aD(n,gD,A),aD(n,fD,A),uD(A,F,A),uD(A,z,N),uD(N,F,A),uD(N,z,N);var j=[AD,ND,OD,ID,LD,FD,MD,RD,hD,PD,HD,gD,_D,$D,VD,WD,qD,KD,QD,XD,JD,mD,ZD];return uD(o,j,O),aD(o,TD,T),uD(a,j,O),aD(a,TD,T),uD(s,j,O),uD(O,j,O),aD(O,TD,T),aD(O,BD,I),uD(I,j,O),aD(T,mD,k),aD(T,hD,k),aD(T,gD,k),aD(T,fD,D),e}function vC(e,t,n){var r=n[0].s,i=n[n.length-1].e;return new e(t.substr(r,i-r),n)}var wC="undefined"!=typeof console&&console&&console.warn||function(){},_C={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function xC(e){if(_C.initialized&&wC('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");_C.customProtocols.push(e)}function EC(e){return _C.initialized||function(){_C.scanner={start:aC(_C.customProtocols),tokens:eC},_C.parser={start:yC(),tokens:bC};for(var e={createTokenClass:dC},t=0;t<_C.pluginQueue.length;t++)_C.pluginQueue[t][1]({scanner:_C.scanner,parser:_C.parser,utils:e});_C.initialized=!0}(),function(e,t,n){for(var r=n.length,i=0,o=[],s=[];i<r;){for(var a=e,l=null,c=null,u=0,d=null,p=-1;i<r&&!(l=cD(a,n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||cD(a,n[i].t));)l=null,(a=c).accepts()?(p=0,d=a):p>=0&&p++,i++,u++;if(p<0)for(var h=i-u;h<i;h++)s.push(n[h]);else{s.length>0&&(o.push(vC(fC,t,s)),s=[]),i-=p,u-=p;var f=d.t,m=n.slice(i-u,i);o.push(vC(f,t,m))}}return s.length>0&&o.push(vC(fC,t,s)),o}(_C.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var i=e.charCodeAt(r),o=void 0,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,i=[],o=0,s=0;s<r;){for(var a=e,l=null,c=0,u=null,d=-1,p=-1;s<r&&(l=cD(a,n[s]));)(a=l).accepts()?(d=0,p=0,u=a):d>=0&&(d+=n[s].length,p++),c+=n[s].length,o+=n[s].length,s++;o-=d,s-=p,c-=d,i.push({t:u.t,v:t.substr(o-c,c),s:o-c,e:o})}return i}(_C.scanner.start,e))}function kC(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=EC(e),r=[],i=0;i<n.length;i++){var o=n[i];!o.isLink||t&&o.t!==t||r.push(o.toObject())}return r}function MC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=EC(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function DC(e){return new $n({key:new qn("autolink"),appendTransaction:(t,n,r)=>{const i=t.some((e=>e.docChanged))&&!n.doc.eq(r.doc),o=t.some((e=>e.getMeta("preventAutolink")));if(!i||o)return;const{tr:s}=r,a=function(e,t){const n=new vn(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),{mapping:l}=a,c=function(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,i)=>{const o=[];if(e.ranges.length)e.forEach(((e,t)=>{o.push({from:e,to:t})}));else{const{from:e,to:t}=n[i];if(void 0===e||void 0===t)return;o.push({from:e,to:t})}o.forEach((({from:e,to:n})=>{const o=t.slice(i).map(e,-1),s=t.slice(i).map(n),a=t.invert().map(o,-1),l=t.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),Gx(r)}(a);return c.forEach((({oldRange:t,newRange:i})=>{Yx(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const i=Yx(l.map(t.from),l.map(t.to),r.doc).filter((t=>t.mark.type===e.type));if(!i.length)return;const o=i[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=r.doc.textBetween(o.from,o.to,void 0," "),u=MC(a),d=MC(c);u&&!d&&s.removeMark(o.from,o.to,e.type)}));const o=function(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}(r.doc,i,(e=>e.isTextblock));let a,c;if(o.length>1?(a=o[0],c=r.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):o.length&&r.doc.textBetween(i.from,i.to," "," ").endsWith(" ")&&(a=o[0],c=r.doc.textBetween(a.pos,i.to,void 0," ")),a&&c){const t=c.split(" ").filter((e=>""!==e));if(t.length<=0)return!1;const n=t[t.length-1],r=a.pos+c.lastIndexOf(n);if(!n)return!1;kC(n).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:r+e.start+1,to:r+e.end+1}))).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}})),s.steps.length?s:void 0}})}const CC=fE.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(xC)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[gE({find:e=>kC(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(DC({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new $n({key:new qn("handleClickLink"),props:{handleClick:(e,n,r)=>{var i;const o=Kx(e.state,t.type.name);return!(!(null===(i=r.target)||void 0===i?void 0:i.closest("a"))||!o.href||(window.open(o.href,o.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new $n({key:new qn("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:s}=o;if(s)return!1;let a="";r.content.forEach((e=>{a+=e.textContent}));const l=kC(a).find((e=>e.isLink&&e.value===a));return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),SC=fE.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),AC=/^\s*>\s$/,NC=mE.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[hE({find:AC,type:this.type})]}}),OC=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,TC=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,IC=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,LC=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,FC=fE.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[dE({find:OC,type:this.type}),dE({find:IC,type:this.type})]},addPasteRules(){return[gE({find:TC,type:this.type}),gE({find:LC,type:this.type})]}}),zC=/^\s*([-+*])\s$/,jC=mE.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){return[hE({find:zC,type:this.type})]}}),RC=/^```([a-z]+)?[\s\n]$/,BC=/^~~~([a-z]+)?[\s\n]$/,PC=mE.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",sx(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!o||!s)&&e.chain().command((({tr:e})=>(e.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type)return!1;if(!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();if(void 0===s)return!1;return!r.nodeAt(s)&&e.commands.exitCode()}}},addInputRules(){return[pE({find:RC,type:this.type,getAttributes:e=>({language:e[1]})}),pE({find:BC,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new $n({key:new qn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(Mn.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});function UC(e={}){return new $n({view:t=>new HC(t,e)})}class HC{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?t.bottom:t.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let n,r,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!i||i==document.body&&"static"==getComputedStyle(i).position)n=-pageXOffset,r=-pageYOffset;else{let e=i.getBoundingClientRect();n=e.left-i.scrollLeft,r=e.top-i.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-r+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=on(this.editorView.state.doc,e,this.editorView.dragging.slice),null==e))return this.setCursor(null);this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const $C=kx.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[UC(this.options)]}});class VC extends _n{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return VC.valid(n)?new VC(n):_n.near(n)}content(){return Ne.empty}eq(e){return e instanceof VC&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new VC(e.resolve(t.pos))}getBookmark(){return new WC(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&VC.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(VC.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!Cn.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue e}break}i=o,r+=t;let s=e.doc.resolve(r);if(VC.valid(s))return s}return null}}}VC.prototype.visible=!1,VC.findFrom=VC.findGapCursorFrom,_n.jsonID("gapcursor",VC);class WC{constructor(e){this.pos=e}map(e){return new WC(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return VC.valid(t)?new VC(t):_n.near(t)}}const qC=H_({ArrowLeft:KC("horiz",-1),ArrowRight:KC("horiz",1),ArrowUp:KC("vert",-1),ArrowDown:KC("vert",1)});function KC(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let o=e.selection,s=t>0?o.$to:o.$from,a=o.empty;if(o instanceof Mn){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=VC.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new VC(l))),!0)}}function GC(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!VC.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&Cn.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new VC(r))),!0)}function YC(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof VC))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=ke.empty;for(let e=r.length-1;e>=0;e--)i=ke.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new Ne(i,0,0));return o.setSelection(Mn.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function QC(e){if(!(e.selection instanceof VC))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",i_.create(e.doc,[t_.widget(e.selection.head,t,{key:"gapcursor"})])}const JC=kx.create({name:"gapCursor",addProseMirrorPlugins:()=>[new $n({props:{decorations:QC,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&VC.valid(n)?new VC(n):null,handleClick:GC,handleKeyDown:qC,handleDOMEvents:{beforeinput:YC}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=cx(nx(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),ZC=mE.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",sx(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&o){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),XC=mE.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,sx(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>pE({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var eS=200,tS=function(){};tS.prototype.append=function(e){return e.length?(e=tS.from(e),!this.length&&e||e.length<eS&&this.leafAppend(e)||this.length<eS&&e.leafPrepend(this)||this.appendInner(e)):this},tS.prototype.prepend=function(e){return e.length?tS.from(e).append(this):this},tS.prototype.appendInner=function(e){return new rS(this,e)},tS.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?tS.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},tS.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},tS.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},tS.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},tS.from=function(e){return e instanceof tS?e:e&&e.length?new nS(e):tS.empty};var nS=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=eS)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=eS)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(tS);tS.empty=new nS([]);var rS=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;return!(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r))&&(!(n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;return!(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i))&&(!(n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(tS),iS=tS;const oS=500;class sS{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(i,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new aS(e.map));let t,i=e.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new aS(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(r)):e.selection,s=new sS(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(e,t,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new aS(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?i.pop():s=s.slice(0,s.length-1)),i.push(u),t&&(o++,t=void 0),r||(a=u)}let l=o-n.depth;return l>cS&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),o-=l),new sS(s.append(i),o)}remapping(e,t){let n=new Pt;return this.items.forEach(((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new sS(this.items.append(e.map((e=>new aS(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new aS(l,o,c))}else n.push(new aS(l))}),r);let l=[];for(let e=t;e<o;e++)l.push(new aS(i.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new sS(c,s);return u.emptyItemCount()>oS&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach(((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l,c=new aS(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else o.map&&n--}),this.items.length,0),new sS(iS.from(r.reverse()),i)}}sS.empty=new sS(iS.empty,0);class aS{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new aS(t.getMap().invert(),t,this.selection)}}}class lS{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const cS=20;function uS(e){let t=[];return e.forEach(((e,n,r,i)=>t.push(r,i))),t}function dS(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function pS(e,t,n,r){let i=mS(t),o=gS.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),c=new lS(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(gS,{redo:r,historyState:c}).scrollIntoView())}let hS=!1,fS=null;function mS(e){let t=e.plugins;if(fS!=t){hS=!1,fS=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){hS=!0;break}}return hS}const gS=new qn("history"),bS=new qn("closeHistory");function yS(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new $n({key:gS,state:{init:()=>new lS(sS.empty,sS.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let i,o=n.getMeta(gS);if(o)return o.historyState;n.getMeta(bS)&&(e=new lS(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(gS))return s.getMeta(gS).redo?new lS(e.done.addTransform(n,void 0,r,mS(t)),e.undone,uS(n.mapping.maps[n.steps.length-1]),e.prevTime):new lS(e.done,e.undone.addTransform(n,void 0,r,mS(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new lS(e.done.rebased(n,i),e.undone.rebased(n,i),dS(e.prevRanges,n.mapping),e.prevTime):new lS(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),dS(e.prevRanges,n.mapping),e.prevTime);{let i=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)})),n}(n,e.prevRanges)),o=s?dS(e.prevRanges,n.mapping):uS(n.mapping.maps[n.steps.length-1]);return new lS(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,mS(t)),sS.empty,o,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?vS:"historyRedo"==n?wS:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const vS=(e,t)=>{let n=gS.getState(e);return!(!n||0==n.done.eventCount)&&(t&&pS(n,e,t,!1),!0)},wS=(e,t)=>{let n=gS.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&pS(n,e,t,!0),!0)},_S=kx.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>vS(e,t),redo:()=>({state:e,dispatch:t})=>wS(e,t)}),addProseMirrorPlugins(){return[yS(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),xS=mE.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",sx(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e})=>e().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)e.setSelection(Mn.create(e.doc,t.pos));else{const i=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(e.insert(r,i),e.setSelection(Mn.create(e.doc,r)))}e.scrollIntoView()}return!0})).run()}},addInputRules(){return[(e={find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type},new mx({find:e.find,handler:({state:t,range:n,match:r})=>{const i=cx(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;if(r[1]){let t=s+r[0].lastIndexOf(r[1]);t>a?t=a:a=t+r[1].length;const n=r[0][r[0].length-1];o.insertText(n,s+r[0].length-1),o.replaceWith(t,a,e.type.create(i))}else r[0]&&o.replaceWith(s,a,e.type.create(i))}}))];var e}}),ES=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,kS=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,MS=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,DS=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,CS=fE.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[dE({find:ES,type:this.type}),dE({find:MS,type:this.type})]},addPasteRules(){return[gE({find:kS,type:this.type}),gE({find:DS,type:this.type})]}}),SS=mE.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",sx(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),AS=/^(\d+)\.\s$/,NS=mE.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",sx(this.options.HTMLAttributes,n),0]:["ol",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){return[hE({find:AS,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})]}}),OS=mE.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),TS=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,IS=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,LS=fE.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",sx(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[dE({find:TS,type:this.type})]},addPasteRules(){return[gE({find:IS,type:this.type})]}}),FS=mE.create({name:"text",group:"inline"}),zS=kx.create({name:"starterKit",addExtensions(){var e,t,n,r,i,o,s,a,l,c,u,d,p,h,f,m,g,b;const y=[];return!1!==this.options.blockquote&&y.push(NC.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&y.push(FC.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&y.push(jC.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&y.push(ZM.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&y.push(PC.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&y.push(XM.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&y.push($C.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&y.push(JC.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&y.push(ZC.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&y.push(XC.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&y.push(_S.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&y.push(xS.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&y.push(CS.configure(null===(p=this.options)||void 0===p?void 0:p.italic)),!1!==this.options.listItem&&y.push(SS.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&y.push(NS.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&y.push(OS.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&y.push(LS.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&y.push(FS.configure(null===(b=this.options)||void 0===b?void 0:b.text)),y}});var jS={exports:{}};function RS(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||RS(n)})),e}jS.exports=RS,jS.exports.default=RS;class BS{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function PS(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function US(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const HS="</span>",$S=e=>!!e.scope||e.sublanguage&&e.language;class VS{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=PS(e)}openNode(e){if(!$S(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){$S(e)&&(this.buffer+=HS)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const WS=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class qS{constructor(){this.rootNode=WS(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=WS({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{qS._collapse(e)})))}}class KS extends qS{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new VS(this,this.options).value()}finalize(){return!0}}function GS(e){return e?"string"==typeof e?e:e.source:null}function YS(e){return ZS("(?=",e,")")}function QS(e){return ZS("(?:",e,")*")}function JS(e){return ZS("(?:",e,")?")}function ZS(...e){const t=e.map((e=>GS(e))).join("");return t}function XS(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),n="("+(t.capture?"":"?:")+e.map((e=>GS(e))).join("|")+")";return n}function eA(e){return new RegExp(e.toString()+"|").exec("").length-1}const tA=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function nA(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=GS(e),i="";for(;r.length>0;){const e=tA.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}const rA="[a-zA-Z]\\w*",iA="[a-zA-Z_]\\w*",oA="\\b\\d+(\\.\\d+)?",sA="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",aA="\\b(0b[01]+)",lA={begin:"\\\\[\\s\\S]",relevance:0},cA={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[lA]},uA={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[lA]},dA=function(e,t,n={}){const r=US({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=XS("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ZS(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},pA=dA("//","$"),hA=dA("/\\*","\\*/"),fA=dA("#","$"),mA={scope:"number",begin:oA,relevance:0},gA={scope:"number",begin:sA,relevance:0},bA={scope:"number",begin:aA,relevance:0},yA={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[lA,{begin:/\[/,end:/\]/,relevance:0,contains:[lA]}]}]},vA={scope:"title",begin:rA,relevance:0},wA={scope:"title",begin:iA,relevance:0},_A={begin:"\\.\\s*"+iA,relevance:0};var xA=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:rA,UNDERSCORE_IDENT_RE:iA,NUMBER_RE:oA,C_NUMBER_RE:sA,BINARY_NUMBER_RE:aA,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ZS(t,/.*\b/,e.binary,/\b.*/)),US({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:lA,APOS_STRING_MODE:cA,QUOTE_STRING_MODE:uA,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:dA,C_LINE_COMMENT_MODE:pA,C_BLOCK_COMMENT_MODE:hA,HASH_COMMENT_MODE:fA,NUMBER_MODE:mA,C_NUMBER_MODE:gA,BINARY_NUMBER_MODE:bA,REGEXP_MODE:yA,TITLE_MODE:vA,UNDERSCORE_TITLE_MODE:wA,METHOD_GUARD:_A,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function EA(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function kA(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function MA(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=EA,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function DA(e,t){Array.isArray(e.illegal)&&(e.illegal=XS(...e.illegal))}function CA(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function SA(e,t){void 0===e.relevance&&(e.relevance=1)}const AA=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=ZS(n.beforeMatch,YS(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},NA=["of","and","for","in","not","or","if","then","parent","list","value"],OA="keyword";function TA(e,t,n=OA){const r=Object.create(null);return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,TA(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,IA(n[0],n[1])]}))}}function IA(e,t){return t?Number(t):function(e){return NA.includes(e.toLowerCase())}(e)?0:1}const LA={},FA=e=>{console.error(e)},zA=(e,...t)=>{console.log(`WARN: ${e}`,...t)},jA=(e,t)=>{LA[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),LA[`${e}/${t}`]=!0)},RA=new Error;function BA(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+r]=i[e],o[e+r]=!0,r+=eA(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function PA(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw FA("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),RA;if("object"!=typeof e.beginScope||null===e.beginScope)throw FA("beginScope must be object"),RA;BA(e,e.begin,{key:"beginScope"}),e.begin=nA(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw FA("skip, excludeEnd, returnEnd not compatible with endScope: {}"),RA;if("object"!=typeof e.endScope||null===e.endScope)throw FA("endScope must be object"),RA;BA(e,e.end,{key:"endScope"}),e.end=nA(e.end,{joinWith:""})}}(e)}function UA(e){function t(t,n){return new RegExp(GS(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=eA(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(nA(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=US(e.classNameAliases||{}),function n(i,o){const s=i;if(i.isCompiled)return s;[kA,CA,PA,AA].forEach((e=>e(i,o))),e.compilerExtensions.forEach((e=>e(i,o))),i.__beforeBegin=null,[MA,DA,SA].forEach((e=>e(i,o))),i.isCompiled=!0;let a=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),a=i.keywords.$pattern,delete i.keywords.$pattern),a=a||/\w+/,i.keywords&&(i.keywords=TA(i.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(i.begin||(i.begin=/\B|\b/),s.beginRe=t(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=t(s.end)),s.terminatorEnd=GS(s.end)||"",i.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(s.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return US(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(HA(e))return US(e,{starts:e.starts?US(e.starts):null});if(Object.isFrozen(e))return US(e);return e}("self"===e?i:e)}))),i.contains.forEach((function(e){n(e,s)})),i.starts&&n(i.starts,o),s.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function HA(e){return!!e&&(e.endsWithParent||HA(e.starts))}var $A="11.6.0";class VA extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const WA=PS,qA=US,KA=Symbol("nomatch"),GA=7;var YA=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:KS};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let r="",i="";"object"==typeof t?(r=e,n=t.ignoreIllegals,i=t.language):(jA("10.7.0","highlight(lang, code, ...args) has been deprecated."),jA("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t),void 0===n&&(n=!0);const o={code:r,language:i};y("before:highlight",o);const s=o.result?o.result:u(o.language,o.code,n);return s.code=o.code,y("after:highlight",s),s}function u(e,n,r,s){const l=Object.create(null);function c(){if(!k.keywords)return void D.addText(C);let e=0;k.keywordPatternRe.lastIndex=0;let t=k.keywordPatternRe.exec(C),n="";for(;t;){n+=C.substring(e,t.index);const i=_.case_insensitive?t[0].toLowerCase():t[0],o=(r=i,k.keywords[r]);if(o){const[e,r]=o;if(D.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=GA&&(S+=r),e.startsWith("_"))n+=t[0];else{const n=_.classNameAliases[e]||e;D.addKeyword(t[0],n)}}else n+=t[0];e=k.keywordPatternRe.lastIndex,t=k.keywordPatternRe.exec(C)}var r;n+=C.substring(e),D.addText(n)}function p(){null!=k.subLanguage?function(){if(""===C)return;let e=null;if("string"==typeof k.subLanguage){if(!t[k.subLanguage])return void D.addText(C);e=u(k.subLanguage,C,!0,M[k.subLanguage]),M[k.subLanguage]=e._top}else e=d(C,k.subLanguage.length?k.subLanguage:null);k.relevance>0&&(S+=e.relevance),D.addSublanguage(e._emitter,e.language)}():c(),C=""}function h(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=_.classNameAliases[e[n]]||e[n],i=t[n];r?D.addKeyword(i,r):(C=i,c(),C=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&D.openNode(_.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(D.addKeyword(C,_.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),C=""):e.beginScope._multi&&(h(e.beginScope,t),C="")),k=Object.create(e,{parent:{value:k}}),k}function g(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new BS(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===k.matcher.regexIndex?(C+=e[0],1):(O=!0,0)}function y(e){const t=e[0],r=n.substring(e.index),i=g(k,e,r);if(!i)return KA;const o=k;k.endScope&&k.endScope._wrap?(p(),D.addKeyword(t,k.endScope._wrap)):k.endScope&&k.endScope._multi?(p(),h(k.endScope,e)):o.skip?C+=t:(o.returnEnd||o.excludeEnd||(C+=t),p(),o.excludeEnd&&(C=t));do{k.scope&&D.closeNode(),k.skip||k.subLanguage||(S+=k.relevance),k=k.parent}while(k!==i.parent);return i.starts&&f(i.starts,e),o.returnEnd?0:t.length}let v={};function w(t,o){const s=o&&o[0];if(C+=t,null==s)return p(),0;if("begin"===v.type&&"end"===o.type&&v.index===o.index&&""===s){if(C+=n.slice(o.index,o.index+1),!i){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=v.rule,t}return 1}if(v=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new BS(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return b(t);return n.skip?C+=t:(n.excludeBegin&&(C+=t),p(),n.returnBegin||n.excludeBegin||(C=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(k.scope||"<unnamed>")+'"');throw e.mode=k,e}if("end"===o.type){const e=y(o);if(e!==KA)return e}if("illegal"===o.type&&""===s)return 1;if(N>1e5&&N>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return C+=s,s.length}const _=m(e);if(!_)throw FA(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const x=UA(_);let E="",k=s||x;const M={},D=new a.__emitter(a);!function(){const e=[];for(let t=k;t!==_;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>D.openNode(e)))}();let C="",S=0,A=0,N=0,O=!1;try{for(k.matcher.considerAll();;){N++,O?O=!1:k.matcher.considerAll(),k.matcher.lastIndex=A;const e=k.matcher.exec(n);if(!e)break;const t=w(n.substring(A,e.index),e);A=e.index+t}return w(n.substring(A)),D.closeAllNodes(),D.finalize(),E=D.toHTML(),{language:e,value:E,relevance:S,illegal:!1,_emitter:D,_top:k}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:WA(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:A,context:n.slice(A-100,A+100),mode:t.mode,resultSoFar:E},_emitter:D};if(i)return{language:e,value:WA(n),illegal:!1,relevance:0,errorRaised:t,_emitter:D,_top:k};throw t}}function d(e,n){n=n||a.languages||Object.keys(t);const r=function(e){const t={value:WA(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),i=n.filter(m).filter(b).map((t=>u(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(m(e.language).supersetOf===t.language)return 1;if(m(t.language).supersetOf===e.language)return-1}return 0})),[l,c]=o,d=l;return d.secondBest=c,d}function p(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=a.languageDetectRe.exec(t);if(n){const t=m(n[1]);return t||(zA(o.replace("{}",n[1])),zA("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||m(e)))}(e);if(l(r))return;if(y("before:highlightElement",{el:e,language:r}),e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new VA("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,s=r?c(i,{language:r,ignoreIllegals:!0}):d(i);e.innerHTML=s.value,function(e,t,r){const i=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,r,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),y("after:highlightElement",{el:e,result:s,text:i})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(p)}function m(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=m(e);return t&&!t.disableAutodetect}function y(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&f()}),!1),Object.assign(e,{highlight:c,highlightAuto:d,highlightAll:f,highlightElement:p,highlightBlock:function(e){return jA("10.7.0","highlightBlock will be removed entirely in v12.0"),jA("10.7.0","Please use highlightElement now."),p(e)},configure:function(e){a=qA(a,e)},initHighlighting:()=>{f(),jA("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),jA("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(FA("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;FA(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&g(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:m,registerAliases:g,autoDetection:b,inherit:qA,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)}}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=$A,e.regex={concat:ZS,lookahead:YS,either:XS,optional:JS,anyNumberOfTimes:QS};for(const e in xA)"object"==typeof xA[e]&&jS.exports(xA[e]);return Object.assign(e,xA),e}({}),QA=YA;YA.HighlightJS=YA,YA.default=YA;var JA=QA;function ZA(e,t=[]){return e.map((e=>{const n=[...t,...e.properties?e.properties.className:[]];return e.children?ZA(e.children,n):{text:e.value,classes:n}})).flat()}function XA(e){return e.value||e.children||[]}function eN({doc:e,name:t,lowlight:n,defaultLanguage:r}){const i=[];return Vx(e,(e=>e.type.name===t)).forEach((e=>{let t=e.pos+1;const o=e.node.attrs.language||r,s=n.listLanguages();var a;ZA(o&&(s.includes(o)||(a=o,Boolean(JA.getLanguage(a))))?XA(n.highlight(o,e.node.textContent)):XA(n.highlightAuto(e.node.textContent))).forEach((e=>{const n=t+e.text.length;if(e.classes.length){const r=t_.inline(t,n,{class:e.classes.join(" ")});i.push(r)}t=n}))})),i_.create(e,i)}function tN({name:e,lowlight:t,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every((e=>"function"==typeof t[e])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new $n({key:new qn("lowlight"),state:{init:(r,{doc:i})=>eN({doc:i,name:e,lowlight:t,defaultLanguage:n}),apply:(r,i,o,s)=>{const a=o.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=Vx(o.doc,(t=>t.type.name===e)),u=Vx(s.doc,(t=>t.type.name===e));return r.docChanged&&([a,l].includes(e)||u.length!==c.length||r.steps.some((e=>void 0!==e.from&&void 0!==e.to&&c.some((t=>t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to)))))?eN({doc:r.doc,name:e,lowlight:t,defaultLanguage:n}):i.map(r.mapping,r.doc)}},props:{decorations:e=>r.getState(e)}});return r}const nN=PC.extend({addOptions(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),lowlight:{},defaultLanguage:null}},addProseMirrorPlugins(){var e;return[...(null===(e=this.parent)||void 0===e?void 0:e.call(this))||[],tN({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),rN=()=>n.createElement(jM,{"data-cy":"neeto-editor-code-block"},n.createElement("pre",null,n.createElement(zM,{as:"code"})));var iN=nN.extend({addNodeView:()=>new PM(rN)}).configure({lowlight:Wo}),oN=kx.create({name:"paste-unformatted",addCommands:()=>({pasteUnformatted:()=>async e=>{let{editor:t}=e;const n=await navigator.clipboard.readText();t.commands.insertContent(n)}})}),sN=mE.create({name:"external-video",addOptions:()=>({inline:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},title:{default:null},frameborder:{default:"0"},allow:{default:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"},allowfullscreen:{default:"allowfullscreen"}}),parseHTML:()=>[{tag:"iframe[src]"}],renderHTML(e){let{HTMLAttributes:t}=e;return["iframe",sx(this.options.HTMLAttributes,{...t,class:"video-wrapper"})]},addCommands(){return{setExternalVideo:e=>t=>{let{commands:n}=t;return n.insertContent({type:this.name,attrs:e})}}},addPasteRules:()=>[new yx({find:er,handler:e=>{let{state:t,range:n,match:r}=e;t.tr.delete(n.from,n.to),t.tr.setSelection(Mn.create(t.doc,n.from+1));const i=VM(r[0]);if(i){const e=t.schema.nodes["external-video"].create({src:i});t.tr.insert(n.from,e)}}})]});const aN=new qn("suggestion");function lN({pluginKey:e=aN,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:d=(()=>!0)}){let p;const h=null==u?void 0:u(),f=new $n({key:e,view(){return{update:async(e,n)=>{var r,i,o,s,a,u,d;const f=null===(r=this.key)||void 0===r?void 0:r.getState(n),m=null===(i=this.key)||void 0===i?void 0:i.getState(e.state),g=f.active&&m.active&&f.range.from!==m.range.from,b=!f.active&&m.active,y=f.active&&!m.active,v=b||g,w=!b&&!y&&f.query!==m.query&&!g,_=y||g;if(!v&&!w&&!_)return;const x=_&&!v?f:m,E=e.dom.querySelector(`[data-decoration-id="${x.decorationId}"]`);p={editor:t,range:x.range,query:x.query,text:x.text,items:[],command:e=>{l({editor:t,range:x.range,props:e})},decorationNode:E,clientRect:E?()=>{var n;const{decorationId:r}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),i=e.dom.querySelector(`[data-decoration-id="${r}"]`);return(null==i?void 0:i.getBoundingClientRect())||null}:null},v&&(null===(o=null==h?void 0:h.onBeforeStart)||void 0===o||o.call(h,p)),w&&(null===(s=null==h?void 0:h.onBeforeUpdate)||void 0===s||s.call(h,p)),(w||v)&&(p.items=await c({editor:t,query:x.query})),_&&(null===(a=null==h?void 0:h.onExit)||void 0===a||a.call(h,p)),w&&(null===(u=null==h?void 0:h.onUpdate)||void 0===u||u.call(h,p)),v&&(null===(d=null==h?void 0:h.onStart)||void 0===d||d.call(h,p))},destroy:()=>{var e;p&&(null===(e=null==h?void 0:h.onExit)||void 0===e||e.call(h,p))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,s,a,l){const{isEditable:c}=t,{composing:u}=t.view,{selection:p}=e,{empty:h,from:f}=p,m={...s};if(m.composing=u,c&&(h||t.view.composing)){!(f<s.range.from||f>s.range.to)||u||s.composing||(m.active=!1);const e=function(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:s}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=r?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),d=(null===(t=s.nodeBefore)||void 0===t?void 0:t.isText)&&s.nodeBefore.text;if(!d)return null;const p=s.pos-d.length,h=Array.from(d.matchAll(u)).pop();if(!h||void 0===h.input||void 0===h.index)return null;const f=h.input.slice(Math.max(0,h.index-1),h.index),m=new RegExp(`^[${null==i?void 0:i.join("")}\0]?$`).test(f);if(null!==i&&!m)return null;const g=p+h.index;let b=g+h[0].length;return r&&l.test(d.slice(b-1,b+1))&&(h[0]+=" ",b+=1),g<s.pos&&b>=s.pos?{range:{from:g,to:b},query:h[0].slice(n.length),text:h[0]}:null}({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:p.$from}),a=`id_${Math.floor(4294967295*Math.random())}`;e&&d({editor:t,state:l,range:e.range})?(m.active=!0,m.decorationId=s.decorationId?s.decorationId:a,m.range=e.range,m.query=e.query,m.text=e.text):m.active=!1}else m.active=!1;return m.active||(m.decorationId=null,m.range={from:0,to:0},m.query=null,m.text=null),m}},props:{handleKeyDown(e,t){var n;const{active:r,range:i}=f.getState(e.state);return r&&(null===(n=null==h?void 0:h.onKeyDown)||void 0===n?void 0:n.call(h,{view:e,event:t,range:i}))||!1},decorations(e){const{active:t,range:n,decorationId:r}=f.getState(e);return t?i_.create(e.doc,[t_.inline(n.from,n.to,{nodeName:s,class:a,"data-decoration-id":r})]):null}}});return f}function cN(e){return e&&e.__esModule?e.default:e}function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dN,pN,hN,fN,mN,gN,bN={},yN=[],vN=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function wN(e,t){for(var n in t)e[n]=t[n];return e}function _N(e){var t=e.parentNode;t&&t.removeChild(e)}function xN(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?dN.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return EN(e,s,r,i,null)}function EN(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++hN:i};return null==i&&null!=pN.vnode&&pN.vnode(o),o}function kN(e){return e.children}function MN(e,t){this.props=e,this.context=t}function DN(e,t){if(null==t)return e.__?DN(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?DN(e):null}function CN(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return CN(e)}}function SN(e){(!e.__d&&(e.__d=!0)&&fN.push(e)&&!AN.__r++||gN!==pN.debounceRendering)&&((gN=pN.debounceRendering)||mN)(AN)}function AN(){for(var e;AN.__r=fN.length;)e=fN.sort((function(e,t){return e.__v.__b-t.__v.__b})),fN=[],e.some((function(e){var t,n,r,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=wN({},i)).__v=i.__v+1,RN(s,i,r,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?DN(i):o,i.__h),BN(n,i),i.__e!=o&&CN(i)))}))}function NN(e,t,n,r,i,o,s,a,l,c){var u,d,p,h,f,m,g,b=r&&r.__k||yN,y=b.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?EN(null,h,null,null,h):Array.isArray(h)?EN(kN,{children:h},null,null,null):h.__b>0?EN(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=b[u])||p&&h.key==p.key&&h.type===p.type)b[u]=void 0;else for(d=0;d<y;d++){if((p=b[d])&&h.key==p.key&&h.type===p.type){b[d]=void 0;break}p=null}RN(e,h,p=p||bN,i,o,s,a,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=ON(h,l,e):l=IN(e,h,p,b,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=DN(p))}for(n.__e=m,u=y;u--;)null!=b[u]&&("function"==typeof n.type&&null!=b[u].__e&&b[u].__e==n.__d&&(n.__d=DN(r,u+1)),UN(b[u],b[u]));if(g)for(u=0;u<g.length;u++)PN(g[u],g[++u],g[++u])}function ON(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?ON(r,t,n):IN(n,r,r,i,r.__e,t));return t}function TN(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){TN(e,t)})):t.push(e)),t}function IN(e,t,n,r,i,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return void 0!==s?s:i.nextSibling}function LN(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||vN.test(t)?n:n+"px"}function FN(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||LN(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||LN(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?jN:zN,o):e.removeEventListener(t,o?jN:zN,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function zN(e){this.l[e.type+!1](pN.event?pN.event(e):e)}function jN(e){this.l[e.type+!0](pN.event?pN.event(e):e)}function RN(e,t,n,r,i,o,s,a,l){var c,u,d,p,h,f,m,g,b,y,v,w=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(c=pN.__b)&&c(t);try{e:if("function"==typeof w){if(g=t.props,b=(c=w.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in w&&w.prototype.render?t.__c=u=new w(g,y):(t.__c=u=new MN(g,y),u.constructor=w,u.render=HN),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=w.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=wN({},u.__s)),wN(u.__s,w.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,d)null==w.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==w.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,y)||t.__v===n.__v){u.props=g,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&s.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,y),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}u.context=y,u.props=g,u.state=u.__s,(c=pN.__r)&&c(t),u.__d=!1,u.__v=t,u.__P=e,c=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=wN(wN({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),v=null!=c&&c.type===kN&&null==c.key?c.props.children:c,NN(e,Array.isArray(v)?v:[v],t,n,r,i,o,s,a,l),u.base=t.__e,t.__h=null,u.__h.length&&s.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(null===h)d===p||a&&e.data===p||(e.data=p);else{if(o=o&&dN.call(e.childNodes),c=(d=n.props||bN).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!a){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||FN(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||FN(e,o,t[o],n[o],r)}(e,p,d,i,a),u)t.__k=[];else if(f=t.props.children,NN(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&DN(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&_N(o[f]);a||("value"in p&&void 0!==(f=p.value)&&(f!==d.value||f!==e.value||"progress"===h&&!f)&&FN(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&FN(e,"checked",f,d.checked,!1))}return e}(n.__e,t,n,r,i,o,s,l);(c=pN.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),pN.__e(e,t,n)}}function BN(e,t){pN.__c&&pN.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){pN.__e(e,t.__v)}}))}function PN(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){pN.__e(e,n)}}function UN(e,t,n){var r,i;if(pN.unmount&&pN.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||PN(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){pN.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&UN(r[i],t,"function"!=typeof e.type);n||null==e.__e||_N(e.__e),e.__e=e.__d=void 0}function HN(e,t,n){return this.constructor(e,n)}function $N(e,t,n){var r,i,o;pN.__&&pN.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],RN(t,e=(!r&&n||t).__k=xN(kN,null,[e]),i||bN,bN,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?dN.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),BN(o,e)}dN=yN.slice,pN={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(t){e=t}throw e}},hN=0,MN.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=wN({},this.state),"function"==typeof e&&(e=e(wN({},n),this.props)),e&&wN(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),SN(this))},MN.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),SN(this))},MN.prototype.render=kN,fN=[],mN="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,AN.__r=0;var VN=0;function WN(e,t,n,r,i){var o,s,a={};for(s in t)"ref"==s?o=t[s]:a[s]=t[s];var l={type:e,props:a,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--VN,__source:r,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===a[s]&&(a[s]=o[s]);return pN.vnode&&pN.vnode(l),l}var qN={set:function(e,t){try{window.localStorage[`emoji-mart.${e}`]=JSON.stringify(t)}catch(e){}},get:function(e){try{const t=window.localStorage[`emoji-mart.${e}`];if(t)return JSON.parse(t)}catch(e){}}};const KN=new Map,GN=[{v:14,emoji:"🫠"},{v:13.1,emoji:"😶🌫️"},{v:13,emoji:"🥸"},{v:12.1,emoji:"🧑🦰"},{v:12,emoji:"🥱"},{v:11,emoji:"🥰"},{v:5,emoji:"🤩"},{v:4,emoji:"👱♀️"},{v:3,emoji:"🤣"},{v:2,emoji:"👋🏻"},{v:1,emoji:"🙃"}];function YN(e){if(KN.has(e))return KN.get(e);const t=QN(e);return KN.set(e,t),t}const QN=(()=>{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d"))}catch{}if(!e)return()=>!1;const t=25,n=20,r=Math.floor(t/2);return e.font=r+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=2*n,e.canvas.height=t,r=>{e.clearRect(0,0,2*n,t),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,n,22);const i=e.getImageData(0,0,n,t).data,o=i.length;let s=0;for(;s<o&&!i[s+3];s+=4);if(s>=o)return!1;const a=n+s/4%n,l=Math.floor(s/4/n),c=e.getImageData(a,l,1,1).data;return i[s]===c[0]&&i[s+2]===c[2]&&!(e.measureText(r).width>=n)}})();var JN={latestVersion:function(){for(const{v:e,emoji:t}of GN)if(YN(t))return e},noCountryFlags:function(){return!YN("🇨🇦")}};const ZN=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let XN=null;var eO,tO={add:function(e){XN||(XN=qN.get("frequently")||{});const t=e.id||e;t&&(XN[t]||(XN[t]=0),XN[t]+=1,qN.set("last",t),qN.set("frequently",XN))},get:function({maxFrequentRows:e,perLine:t}){if(!e)return[];XN||(XN=qN.get("frequently"));let n=[];if(!XN){XN={};for(let e in ZN.slice(0,t)){const r=ZN[e];XN[r]=t-e,n.push(r)}return n}const r=e*t,i=qN.get("last");for(let e in XN)n.push(e);if(n.sort(((e,t)=>{const n=XN[t],r=XN[e];return n==r?e.localeCompare(t):n-r})),n.length>r){const e=n.slice(r);n=n.slice(0,r);for(let t of e)t!=i&&delete XN[t];i&&-1==n.indexOf(i)&&(delete XN[n[n.length-1]],n.splice(-1,1,i)),qN.set("frequently",XN)}return n}};eO=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var nO={autoFocus:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:14,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","cs","de","es","fa","fi","fr","it","ja","nl","pl","pt","ru","uk","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let rO=null,iO=null;const oO={};async function sO(e){if(oO[e])return oO[e];const t=await fetch(e),n=await t.json();return oO[e]=n,n}let aO=null,lO=null,cO=!1;function uO(e,{caller:t}={}){return aO||(aO=new Promise((e=>{lO=e}))),e?async function(e){cO=!0;let{emojiVersion:t,set:n,locale:r}=e;if(t||(t=nO.emojiVersion.value),n||(n=nO.set.value),r||(r=nO.locale.value),iO)iO.categories=iO.categories.filter((e=>!!!e.name));else{iO=("function"==typeof e.data?await e.data():e.data)||await sO(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${n}.json`),iO.emoticons={},iO.natives={},iO.categories.unshift({id:"frequent",emojis:[]});for(const e in iO.aliases){const t=iO.aliases[e],n=iO.emojis[t];n&&(n.aliases||(n.aliases=[]),n.aliases.push(e))}}if(rO=("function"==typeof e.i18n?await e.i18n():e.i18n)||("en"==r?cN(eO):await sO(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${r}.json`)),e.custom)for(let t in e.custom){t=parseInt(t);const n=e.custom[t],r=e.custom[t-1];if(n.emojis&&n.emojis.length){n.id||(n.id=`custom_${t+1}`),n.name||(n.name=rO.categories.custom),r&&!n.icon&&(n.target=r.target||r),iO.categories.push(n);for(const e of n.emojis)iO.emojis[e.id]=e}}e.categories&&(iO.categories=iO.categories.filter((t=>-1!=e.categories.indexOf(t.id))).sort(((t,n)=>e.categories.indexOf(t.id)-e.categories.indexOf(n.id))));let i=null,o=null;"native"==n&&(i=JN.latestVersion(),o=e.noCountryFlags||JN.noCountryFlags());let s=iO.categories.length,a=!1;for(;s--;){const t=iO.categories[s];if("frequent"==t.id){let{maxFrequentRows:n,perLine:r}=e;n||(n=nO.maxFrequentRows.value),r||(r=nO.perLine.value),t.emojis=tO.get({maxFrequentRows:n,perLine:r})}if(!t.emojis||!t.emojis.length){iO.categories.splice(s,1);continue}const{categoryIcons:n}=e;if(n){const e=n[t.id];e&&!t.icon&&(t.icon=e)}let r=t.emojis.length;for(;r--;){const e=t.emojis[r],n=e.id?e:iO.emojis[e],s=()=>{t.emojis.splice(r,1)};if(n)if(i&&n.version>i)s();else if(!o||"flags"!=t.id||mO.includes(n.id)){if(!n.search){if(a=!0,n.search=","+[[n.id,!1],[n.name,!0],[n.keywords,!1],[n.emoticons,!1]].map((([e,t])=>{if(e)return(Array.isArray(e)?e:[e]).map((e=>(t?e.split(/[-|_|\s]+/):[e]).map((e=>e.toLowerCase())))).flat()})).flat().filter((e=>e&&e.trim())).join(","),n.emoticons)for(const e of n.emoticons)iO.emoticons[e]||(iO.emoticons[e]=n.id);let e=0;for(const t of n.skins){if(!t)continue;e++;const{native:r}=t;r&&(iO.natives[r]=n.id,n.search+=`,${r}`);const i=1==e?"":`:skin-tone-${e}:`;t.shortcodes=`:${n.id}:${i}`}}}else s();else s()}}a&&fO.reset();lO()}(e):t&&!cO&&console.warn(`\`${t}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),aO}function dO(e,t,n){e||(e={});const r={};for(let i in t)r[i]=pO(i,e,t,n);return r}function pO(e,t,n,r){const i=n[e];let o=r&&r.getAttribute(e)||(null!=t[e]&&null!=t[e]?t[e]:null);return i?(null!=o&&i.value&&typeof i.value!=typeof o&&(o="boolean"==typeof i.value?"false"!=o:i.value.constructor(o)),i.transform&&o&&(o=i.transform(o)),(null==o||i.choices&&-1==i.choices.indexOf(o))&&(o=i.value),o):o}let hO=null;var fO={search:async function(e,{maxResults:t,caller:n}={}){if(!e||!e.trim().length)return null;t||(t=90),await uO(null,{caller:n||"SearchIndex.search"});const r=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter(((e,t,n)=>e.trim()&&n.indexOf(e)==t));if(!r.length)return;let i,o,s=hO||(hO=Object.values(iO.emojis));for(const e of r){if(!s.length)break;i=[],o={};for(const t of s){if(!t.search)continue;const n=t.search.indexOf(`,${e}`);-1!=n&&(i.push(t),o[t.id]||(o[t.id]=0),o[t.id]+=t.id==e?0:n+1)}s=i}return i.length<2||(i.sort(((e,t)=>{const n=o[e.id],r=o[t.id];return n==r?e.id.localeCompare(t.id):n-r})),i.length>t&&(i=i.slice(0,t))),i},get:function(e){return e.id?e:iO.emojis[e]||iO.emojis[iO.aliases[e]]||iO.emojis[iO.natives[e]]},reset:function(){hO=null},SHORTCODES_REGEX:/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/};const mO=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];var gO={categories:{activity:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:WN("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:WN("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:WN("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:WN("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),WN("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),WN("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:WN("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),WN("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:WN("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),WN("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[WN("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),WN("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:WN("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:WN("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},search:{loupe:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:WN("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:WN("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:WN("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})}};function bO(e){let{id:t,skin:n,emoji:r}=e;if(e.shortcodes){const r=e.shortcodes.match(fO.SHORTCODES_REGEX);r&&(t=r[1],r[2]&&(n=r[2]))}if(r||(r=fO.get(t||e.native)),!r)return e.fallback;const i=r.skins[n-1]||r.skins[0],o=i.src||("native"==e.set||e.spritesheet?void 0:"function"==typeof e.getImageURL?e.getImageURL(e.set,i.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/64/${i.unified}.png`),s="function"==typeof e.getSpritesheetURL?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/sheets-256/64.png`;return WN("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:o?WN("img",{style:{height:e.size||"1em",width:"auto",display:"inline-block",position:"relative",top:".1em"},alt:i.native||i.shortcodes,src:o}):"native"==e.set?WN("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:i.native}):WN("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${s})`,backgroundSize:`${100*iO.sheet.cols}% ${100*iO.sheet.rows}%`,backgroundPosition:`${100/(iO.sheet.cols-1)*i.x}% ${100/(iO.sheet.rows-1)*i.y}%`}})})}const yO="undefined"!=typeof window?window.HTMLElement:Object;class vO extends yO{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let t in e)this.attributeChangedCallback(t,null,e[t])}attributeChangedCallback(e,t,n){if(!this.component)return;const r=pO(e,{[e]:n},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:r}):(this.component.props[e]=r,this.component.forceUpdate())}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let t=null;const n=e.parent||(t=e.ref&&e.ref.current);t&&(t.innerHTML=""),n&&n.appendChild(this)}}}class wO extends vO{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;const t=document.createElement("style");t.textContent=e,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(e,{styles:t}={}){super(e),this.setShadow(),this.injectStyles(t)}}var _O={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:nO.set,skin:nO.skin};class xO extends vO{async connectedCallback(){const e=dO(this.props,_O,this);e.element=this,e.ref=e=>{this.component=e},await uO(),$N(WN(bO,{...e}),this)}constructor(e){super(e)}}uN(xO,"Props",_O),"undefined"==typeof customElements||customElements.get("em-emoji")||customElements.define("em-emoji",xO);var EO,kO=[],MO=pN.__b,DO=pN.__r,CO=pN.diffed,SO=pN.__c,AO=pN.unmount;function NO(){var e;for(kO.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=kO.pop();)if(e.__P)try{e.__H.__h.forEach(TO),e.__H.__h.forEach(IO),e.__H.__h=[]}catch(t){e.__H.__h=[],pN.__e(t,e.__v)}}pN.__b=function(e){MO&&MO(e)},pN.__r=function(e){DO&&DO(e);var t=e.__c.__H;t&&(t.__h.forEach(TO),t.__h.forEach(IO),t.__h=[])},pN.diffed=function(e){CO&&CO(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==kO.push(t)&&EO===pN.requestAnimationFrame||((EO=pN.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),OO&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);OO&&(t=requestAnimationFrame(n))})(NO))},pN.__c=function(e,t){t.some((function(e){try{e.__h.forEach(TO),e.__h=e.__h.filter((function(e){return!e.__||IO(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],pN.__e(n,e.__v)}})),SO&&SO(e,t)},pN.unmount=function(e){AO&&AO(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{TO(e)}catch(e){t=e}})),t&&pN.__e(t,n.__v))};var OO="function"==typeof requestAnimationFrame;function TO(e){var t=e.__c;"function"==typeof t&&(e.__c=void 0,t())}function IO(e){e.__c=e.__()}function LO(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function FO(e){this.props=e}(FO.prototype=new MN).isPureReactComponent=!0,FO.prototype.shouldComponentUpdate=function(e,t){return LO(this.props,e)||LO(this.state,t)};var zO=pN.__b;pN.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),zO&&zO(e)};var jO=pN.__e;pN.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);jO(e,t,n)};var RO=pN.unmount;function BO(){this.__u=0,this.t=null,this.__b=null}function PO(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function UO(){this.u=null,this.o=null}pN.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),RO&&RO(e)},(BO.prototype=new MN).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=PO(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},BO.prototype.componentWillUnmount=function(){this.t=[]},BO.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&xN(kN,null,e.fallback);return i&&(i.__h=null),[xN(kN,null,t.__e?null:e.children),i]};var HO=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(UO.prototype=new MN).__e=function(e){var t=this,n=PO(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),HO(t,e,r)):i()};n?n(o):o()}},UO.prototype.render=function(e){this.u=null,this.o=new Map;var t=TN(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},UO.prototype.componentDidUpdate=UO.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){HO(e,n,t)}))};var $O="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,VO=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,WO="undefined"!=typeof document,qO=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};MN.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(MN.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var KO=pN.event;function GO(){}function YO(){return this.cancelBubble}function QO(){return this.defaultPrevented}pN.event=function(e){return KO&&(e=KO(e)),e.persist=GO,e.isPropagationStopped=YO,e.isDefaultPrevented=QO,e.nativeEvent=e};var JO={configurable:!0,get:function(){return this.class}},ZO=pN.vnode;pN.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];WO&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!qO(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():i&&VO.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=TN(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=TN(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(JO.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",JO))}e.$$typeof=$O,ZO&&ZO(e)};var XO=pN.__r;pN.__r=function(e){XO&&XO(e),e.__c};const eT={light:"outline",dark:"solid"};class tT extends FO{renderIcon(e){const{icon:t}=e;if(t){if(t.svg)return WN("span",{class:"flex",dangerouslySetInnerHTML:{__html:t.svg}});if(t.src)return WN("img",{src:t.src})}const n=gO.categories[e.id]||gO.categories.custom;return n["auto"==this.props.icons?eT[this.props.theme]:this.props.icons]||n}render(){let e=null;return WN("nav",{id:"nav",class:"padding","data-position":this.props.position,children:WN("div",{class:"flex relative",children:[this.categories.map(((t,n)=>{const r=t.name||rO.categories[t.id],i=!this.props.unfocused&&t.id==this.state.categoryId;return i&&(e=n),WN("button",{"aria-label":r,"aria-selected":i||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:e=>e.preventDefault(),onClick:()=>{this.props.onClick({category:t,i:n})},children:this.renderIcon(t)})})),WN("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:null==e?0:1,transform:`translateX(${100*e}%)`}})]})})}constructor(){super(),this.categories=iO.categories.filter((e=>!e.target)),this.state={categoryId:this.categories[0].id}}}class nT extends FO{shouldComponentUpdate(e){for(let t in e)if("children"!=t&&e[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const rT=10;class iT extends MN{getInitialState(e=this.props){return{skin:qN.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.observers=[],this.dir=rO.rtl?"rtl":"ltr",this.refs={menu:{current:null},navigation:{current:null},scroll:{current:null},search:{current:null},searchInput:{current:null},skinToneButton:{current:null},skinToneRadio:{current:null}},this.initGrid(),0==this.props.stickySearch&&"sticky"==this.props.searchPosition&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){this.nextState||(this.nextState={});for(const t in e)this.nextState[t]=e[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout((()=>{let e=!1;for(const t in this.nextState)this.props[t]=this.nextState[t],"custom"!==t&&"categories"!==t||(e=!0);delete this.nextState;const t=this.getInitialState();if(e)return this.reset(t);this.setState(t)}))}componentWillUnmount(){this.unregister()}async reset(e={}){await uO(this.props),this.initGrid(),this.unobserve(),this.setState(e,(()=>{this.observeCategories(),this.observeRows()}))}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){document.removeEventListener("click",this.handleClickOutside),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve(){for(const e of this.observers)e.disconnect()}initGrid(){const{categories:e}=iO;this.refs.categories=new Map;const t=iO.categories.map((e=>e.id)).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const n=(e,t)=>{const n=[];n.__categoryId=t.id,n.__index=e.length,this.grid.push(n);const r=this.grid.length-1,i=r%rT?{}:{current:null};return i.index=r,i.posinset=this.grid.setsize+1,e.push(i),n};for(let t of e){const e=[];let r=n(e,t);for(let i of t.emojis)r.length==this.props.perLine&&(r=n(e,t)),this.grid.setsize+=1,r.push(i);this.refs.categories.set(t.id,{root:{current:null},rows:e})}}initTheme(e){if("auto"!=e)return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addListener((()=>{"auto"==this.props.theme&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}))}return this.darkMedia.matches?"dark":"light"}getEmojiByPos([e,t]){const n=this.state.searchResults||this.grid,r=n[e]&&n[e][t];if(r)return fO.get(r)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const t=new Map,n=t=>{t!=e.state.categoryId&&e.setState({categoryId:t})},r={root:this.refs.scroll.current,threshold:[0,1]},i=new IntersectionObserver((e=>{for(const n of e){const e=n.target.dataset.id;t.set(e,n.intersectionRatio)}const r=[...t],i=r[r.length-1];if(1==i[1])return n(i[0]);for(const[e,t]of r)if(t){n(e);break}}),r);for(const{root:e}of this.refs.categories.values())i.observe(e.current);this.observers.push(i)}observeRows(){const e={...this.state.visibleRows},t=new IntersectionObserver((t=>{for(const n of t){const t=parseInt(n.target.dataset.index);n.isIntersecting?e[t]=!0:delete e[t]}this.setState({visibleRows:e})}),{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(rT+5)}px 0px ${this.props.emojiButtonSize*rT}px`});for(const{rows:e}of this.refs.categories.values())for(const n of e)n.current&&t.observe(n.current);this.observers.push(t)}preventDefault(e){e.preventDefault()}unfocusSearch(){const e=this.refs.searchInput.current;e&&e.blur()}navigate({e:e,input:t,left:n,right:r,up:i,down:o}){const s=this.state.searchResults||this.grid;if(!s.length)return;let[a,l]=this.state.pos;const c=(()=>{if(0==a&&0==l&&!e.repeat&&(n||i))return null;if(-1==a)return e.repeat||!r&&!o||t.selectionStart!=t.value.length?null:[0,0];if(n||r){let e=s[a];const t=n?-1:1;if(l+=t,!e[l]){if(a+=t,e=s[a],!e)return a=n?0:s.length-1,l=n?0:s[a].length-1,[a,l];l=n?e.length-1:0}return[a,l]}if(i||o){a+=i?-1:1;const e=s[a];return e?(e[l]||(l=e.length-1),[a,l]):(a=i?0:s.length-1,l=i?0:s[a].length-1,[a,l])}})();c?(e.preventDefault(),this.setState({pos:c,keyboard:!0},(()=>{this.scrollTo({row:c[0]})}))):this.state.pos[0]>-1&&this.setState({pos:[-1,-1]})}scrollTo({categoryId:e,row:t}){const n=this.state.searchResults||this.grid;if(!n.length)return;const r=this.refs.scroll.current,i=r.getBoundingClientRect();let o=0;if(t>=0&&(e=n[t].__categoryId),e){o=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(i.top-r.scrollTop)+1}if(t>=0)if(t){const e=o+n[t].__index*this.props.emojiButtonSize,s=e+this.props.emojiButtonSize+.88*this.props.emojiButtonSize;if(e<r.scrollTop)o=e;else{if(!(s>r.scrollTop+i.height))return;o=s-i.height}}else o=0;this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout((()=>{delete this.mouseIsIgnored}),100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({emoji:e,pos:t}){if(this.props.onEmojiSelect&&(!e&&t&&(e=this.getEmojiByPos(t)),e)){const t=function(e,{skinIndex:t}={}){const n=e.skins[t]||(t=0,e.skins[t]),r={id:e.id,name:e.name,native:n.native,unified:n.unified,keywords:e.keywords,shortcodes:n.shortcodes||e.shortcodes};return e.skins.length>1&&(r.skin=t+1),n.src&&(r.src=n.src),e.aliases&&e.aliases.length&&(r.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(r.emoticons=e.emoticons),r}(e,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&tO.add(t,this.props),this.props.onEmojiSelect(t)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),qN.set("skin",e)}renderNav(){return WN(tT,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const e=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return WN("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[WN("div",{class:"flex flex-middle flex-grow",children:[WN("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:WN(bO,{emoji:e,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||("top"==this.props.previewPosition?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),WN("div",{class:`margin-${this.dir[0]}`,children:WN("div",e?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[WN("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:e.name}),WN("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:e.skins[0].shortcodes})]}:t?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[WN("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:rO.search_no_results_1}),WN("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:rO.search_no_results_2})]}:{class:"color-c",style:{fontSize:21},children:rO.pick})})]}),!e&&"preview"==this.props.skinTonePosition&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:t,posinset:n,grid:r}){const i=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,s=(e.skins[o-1]||e.skins[0]).native,a=function(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,n)=>e==t[n]))}(this.state.pos,t),l=t.concat(e.id).join("");return WN(nT,{selected:a,skin:o,size:i,children:WN("button",{"aria-label":s,"aria-selected":a||void 0,"aria-posinset":n,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:"none"==this.props.previewPosition?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:()=>this.handleEmojiClick({emoji:e}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[WN("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(n-1)%this.props.emojiButtonColors.length]:void 0}}),WN(bO,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},l)}renderSearch(){const e="none"==this.props.previewPosition||"search"==this.props.skinTonePosition;return WN("div",{children:[WN("div",{class:"spacer"}),WN("div",{class:"flex flex-middle",children:[e&&"rtl"==this.dir&&this.renderSkinToneButton(),WN("div",{class:"search relative flex-grow",children:[WN("input",{type:"search",ref:this.refs.searchInput,placeholder:rO.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),WN("span",{class:"icon loupe flex",children:gO.search.loupe}),this.state.searchResults&&WN("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:gO.search.delete})]}),e&&"ltr"==this.dir&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?WN("div",{class:"category",ref:this.refs.search,children:[WN("div",{class:`sticky padding-small align-${this.dir[0]}`,children:rO.categories.search}),WN("div",{children:e.length?e.map(((t,n)=>WN("div",{class:"flex",children:t.map(((t,r)=>this.renderEmojiButton(t,{pos:[n,r],posinset:n*this.props.perLine+r+1,grid:e})))}))):WN("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&WN("a",{onClick:this.props.onAddCustomEmoji,children:rO.add_custom})})})]}):null}renderCategories(){const{categories:e}=iO,t=!!this.state.searchResults;return WN("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0},children:e.map((e=>{const{root:t,rows:n}=this.refs.categories.get(e.id);return WN("div",{"data-id":e.target?e.target.id:e.id,class:"category",ref:t,children:[WN("div",{class:`sticky padding-small align-${this.dir[0]}`,children:e.name||rO.categories[e.id]}),WN("div",{class:"relative",style:{height:n.length*this.props.emojiButtonSize},children:n.map(((t,n)=>{const r=t.index-t.index%rT,i=this.state.visibleRows[r],o="current"in t?t:void 0;if(!i&&!o)return null;const s=n*this.props.perLine,a=s+this.props.perLine,l=e.emojis.slice(s,a);return WN("div",{"data-index":t.index,ref:o,class:"flex row",style:{top:n*this.props.emojiButtonSize},children:i&&l.map(((e,n)=>{const r=fO.get(e);return this.renderEmojiButton(r,{pos:[t.index,n],posinset:t.posinset+n,grid:this.grid})}))},t.index)}))})]})}))})}renderSkinToneButton(){return"none"==this.props.skinTonePosition?null:WN("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:WN("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":rO.skins.choose,title:rO.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:WN("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const e=this.getEmojiByPos(this.state.pos);return WN("div",{"aria-live":"polite",class:"sr-only",children:e?e.name:""})}renderSkins(){const e=this.refs.skinToneButton.current.getBoundingClientRect(),t=this.base.getBoundingClientRect(),n={};return"ltr"==this.dir?n.right=t.right-e.right-3:n.left=e.left-t.left-3,"bottom"==this.props.previewPosition&&"preview"==this.props.skinTonePosition?n.bottom=t.bottom-e.top+6:(n.top=e.bottom-t.top+3,n.bottom="auto"),WN("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":rO.skins.choose,class:"menu hidden","data-position":n.top?"top":"bottom",style:n,children:[...Array(6).keys()].map((e=>{const t=e+1,n=this.state.skin==t;return WN("div",{children:[WN("input",{type:"radio",name:"skin-tone",value:t,"aria-label":rO.skins[t],ref:n?this.refs.skinToneRadio:null,defaultChecked:n,onChange:()=>this.handleSkinMouseOver(t),onKeyDown:e=>{"Enter"!=e.code&&"Space"!=e.code&&"Tab"!=e.code||(e.preventDefault(),this.handleSkinClick(t))}}),WN("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(t),onMouseEnter:()=>this.handleSkinMouseOver(t),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[WN("span",{class:`skin-tone skin-tone-${t}`}),WN("span",{class:"margin-small-lr",children:rO.skins[t]})]})]})}))})}render(){return WN("section",{id:"root",class:"flex flex-column",style:{width:this.props.perLine*this.props.emojiButtonSize+28},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:["top"==this.props.previewPosition&&this.renderPreview(),"top"==this.props.navPosition&&this.renderNav(),"sticky"==this.props.searchPosition&&WN("div",{class:"padding-lr",children:this.renderSearch()}),WN("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:WN("div",{style:{width:this.props.perLine*this.props.emojiButtonSize},children:["static"==this.props.searchPosition&&this.renderSearch(),this.renderSearchResults(),this.renderCategories(),WN("div",{class:"spacer"})]})}),"bottom"==this.props.navPosition&&this.renderNav(),"bottom"==this.props.previewPosition&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(e){super(),uN(this,"handleClickOutside",(e=>{const{element:t}=this.props;e.target!=t&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside())})),uN(this,"handleBaseClick",(e=>{this.state.showSkins&&(e.target.closest(".menu")||(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins()))})),uN(this,"handleBaseKeydown",(e=>{this.state.showSkins&&"Escape"==e.key&&(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins())})),uN(this,"handleSearchClick",(()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})})),uN(this,"handleSearchInput",(async()=>{const e=this.refs.searchInput.current;if(!e)return;const{value:t}=e,n=await fO.search(t),r=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!n)return this.setState({searchResults:n,pos:[-1,-1]},r);const i=e.selectionStart==e.value.length?[0,0]:[-1,-1],o=[];o.setsize=n.length;let s=null;for(let e of n)o.length&&s.length!=this.props.perLine||(s=[],s.__categoryId="search",s.__index=o.length,o.push(s)),s.push(e);this.ignoreMouse(),this.setState({searchResults:o,pos:i},r)})),uN(this,"handleSearchKeyDown",(e=>{const t=e.currentTarget;switch(e.stopImmediatePropagation(),e.key){case"ArrowLeft":this.navigate({e:e,input:t,left:!0});break;case"ArrowRight":this.navigate({e:e,input:t,right:!0});break;case"ArrowUp":this.navigate({e:e,input:t,up:!0});break;case"ArrowDown":this.navigate({e:e,input:t,down:!0});break;case"Enter":e.preventDefault(),this.handleEmojiClick({pos:this.state.pos});break;case"Escape":e.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch()}})),uN(this,"clearSearch",(()=>{const e=this.refs.searchInput.current;e&&(e.value="",e.focus(),this.handleSearchInput())})),uN(this,"handleCategoryClick",(({category:e,i:t})=>{this.scrollTo(0==t?{row:-1}:{categoryId:e.id})})),uN(this,"openSkins",(e=>{const{currentTarget:t}=e,n=t.getBoundingClientRect();this.setState({showSkins:n},(async()=>{await async function(e=1){for(let t in[...Array(e).keys()])await new Promise(requestAnimationFrame)}(2);const e=this.refs.menu.current;e&&(e.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))}))})),this.state={pos:[-1,-1],visibleRows:{0:!0},...this.getInitialState(e)}}}class oT extends wO{async connectedCallback(){const e=dO(this.props,nO,this);e.element=this,e.ref=e=>{this.component=e},await uO(e),$N(WN(iT,{...e}),this.shadowRoot)}disconnectedCallback(){this.component&&this.component.unregister()}constructor(e){super(e,{styles:cN(sT)})}}uN(oT,"Props",nO),"undefined"==typeof customElements||customElements.get("em-emoji-picker")||customElements.define("em-emoji-picker",oT);var sT={};sT=':host {\n display: flex;\n width: -webkit-min-content;\n width: -moz-min-content;\n width: min-content;\n height: 435px;\n min-height: 230px;\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n --border-radius: 10px;\n --category-icon-size: 18px;\n --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n --font-size: 15px;\n --shadow-color: 0deg 0% 0%;\n --shadow:\n 0.3px 0.5px 2.7px hsl(var(--shadow-color) / 0.14),\n 0.4px 0.8px 1px -3.2px hsl(var(--shadow-color) / 0.14),\n 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / 0.14);\n}\n\n[data-theme=light] {\n --em-rgb-color: var(--rgb-color, 34, 36, 39);\n --em-rgb-accent: var(--rgb-accent, 34, 102, 237);\n --em-rgb-background: var(--rgb-background, 255, 255, 255);\n --em-rgb-input: var(--rgb-input, 255, 255, 255);\n --em-color-border: var(--color-border, rgba(0, 0, 0, .05));\n --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));\n}\n\n[data-theme=dark] {\n --em-rgb-color: var(--rgb-color, 222, 222, 221);\n --em-rgb-accent: var(--rgb-accent, 58, 130, 247);\n --em-rgb-background: var(--rgb-background, 21, 22, 23);\n --em-rgb-input: var(--rgb-input, 0, 0, 0);\n --em-color-border: var(--color-border, rgba(255, 255, 255, .1));\n --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));\n}\n\n#root {\n --color-a: rgb(var(--em-rgb-color));\n --color-b: rgba(var(--em-rgb-color), .65);\n --color-c: rgba(var(--em-rgb-color), .45);\n --padding: 12px;\n --padding-small: calc(var(--padding) / 2);\n --sidebar-width: 16px;\n --duration: 225ms;\n --duration-fast: 125ms;\n --duration-instant: 50ms;\n --easing: cubic-bezier(.4, .0, .2, 1);\n position: relative;\n width: 100%;\n text-align: left;\n border-radius: var(--border-radius);\n background-color: rgb(var(--em-rgb-background));\n}\n\n@media (prefers-reduced-motion) {\n #root {\n --duration: 0;\n --duration-fast: 0;\n --duration-instant: 0;\n }\n}\n\n#root[data-menu] button {\n cursor: auto;\n}\n\n#root[data-menu] .menu button {\n cursor: pointer;\n}\n\n:host, #root, input, button {\n color: rgb(var(--em-rgb-color));\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n*, *:before, *:after {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n min-width: 0;\n}\n\n.relative {\n position: relative;\n}\n\n.flex {\n display: flex;\n}\n\n.flex-auto {\n flex: 0 0 auto;\n}\n\n.flex-center {\n justify-content: center;\n}\n\n.flex-column {\n flex-direction: column;\n}\n\n.flex-grow {\n flex: 1 1 auto;\n}\n\n.flex-middle {\n align-items: center;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.padding {\n padding: var(--padding);\n}\n\n.padding-t {\n padding-top: var(--padding);\n}\n\n.padding-lr {\n padding-left: var(--padding);\n padding-right: var(--padding);\n}\n\n.padding-r {\n padding-right: var(--padding);\n}\n\n.padding-small {\n padding: var(--padding-small);\n}\n\n.padding-small-b {\n padding-bottom: var(--padding-small);\n}\n\n.padding-small-lr {\n padding-left: var(--padding-small);\n padding-right: var(--padding-small);\n}\n\n.margin {\n margin: var(--padding);\n}\n\n.margin-r {\n margin-right: var(--padding);\n}\n\n.margin-l {\n margin-left: var(--padding);\n}\n\n.margin-small-l {\n margin-left: var(--padding-small);\n}\n\n.margin-small-lr {\n margin-left: var(--padding-small);\n margin-right: var(--padding-small);\n}\n\n.align-l {\n text-align: left;\n}\n\n.align-r {\n text-align: right;\n}\n\n.color-a {\n color: var(--color-a);\n}\n\n.color-b {\n color: var(--color-b);\n}\n\n.color-c {\n color: var(--color-c);\n}\n\n.ellipsis {\n white-space: nowrap;\n max-width: 100%;\n width: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.sr-only {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\na {\n cursor: pointer;\n color: rgb(var(--em-rgb-accent));\n}\n\na:hover {\n text-decoration: underline;\n}\n\n.spacer {\n height: 10px;\n}\n\n.scroll {\n overflow: auto;\n overflow-x: hidden;\n padding-right: 0;\n}\n\n.scroll::-webkit-scrollbar {\n width: var(--sidebar-width);\n height: var(--sidebar-width);\n}\n\n.scroll::-webkit-scrollbar-track {\n border: 0;\n}\n\n.scroll::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n}\n\n.scroll::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n\n.scroll::-webkit-scrollbar-thumb {\n min-height: 20%;\n min-height: 65px;\n border: 4px solid rgb(var(--em-rgb-background));\n border-radius: 8px;\n}\n\n.scroll::-webkit-scrollbar-thumb:hover {\n background-color: var(--em-color-border-over) !important;\n}\n\n.scroll:hover::-webkit-scrollbar-thumb {\n background-color: var(--em-color-border);\n}\n\n.sticky {\n position: -webkit-sticky;\n position: sticky;\n z-index: 1;\n top: -1px;\n font-weight: 500;\n background-color: rgba(var(--em-rgb-background), 0.9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n}\n\n.search {\n z-index: 2;\n position: relative;\n}\n\n.search input, .search button {\n font-size: calc(var(--font-size) - 1px);\n}\n\n.search input[type=search] {\n display: block;\n border: 0;\n outline: 0;\n width: 100%;\n padding: 10px 2em 10px 2.2em;\n border-radius: 10px;\n background-color: var(--em-color-border);\n transition-duration: var(--duration);\n transition-property: background-color, box-shadow;\n transition-timing-function: var(--easing);\n}\n\n.search input[type=search]::-moz-placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search]:-ms-input-placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search]::placeholder {\n color: inherit;\n opacity: 0.6;\n}\n\n.search input[type=search], .search input[type=search]::-webkit-search-decoration, .search input[type=search]::-webkit-search-cancel-button, .search input[type=search]::-webkit-search-results-button, .search input[type=search]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n appearance: none;\n}\n\n.search input[type=search]:focus {\n background-color: rgb(var(--em-rgb-input));\n box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, 0.2);\n}\n\n.search .icon {\n z-index: 1;\n position: absolute;\n top: 50%;\n color: rgba(var(--em-rgb-color), 0.7);\n transform: translateY(-50%);\n}\n\n.search .loupe {\n left: 0.7em;\n pointer-events: none;\n}\n\n.search .delete {\n right: 0.7em;\n}\n\nsvg {\n fill: currentColor;\n width: 1em;\n height: 1em;\n}\n\nbutton {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: pointer;\n color: currentColor;\n border: 0;\n background-color: transparent;\n}\n\n#nav {\n z-index: 2;\n position: relative;\n padding-top: 12px;\n padding-bottom: 12px;\n padding-right: var(--sidebar-width);\n}\n\n#nav button {\n color: var(--color-b);\n transition: color var(--duration) var(--easing);\n}\n\n#nav button:hover {\n color: var(--color-a);\n}\n\n#nav svg, #nav img {\n width: var(--category-icon-size);\n height: var(--category-icon-size);\n}\n\n#nav .bar {\n position: absolute;\n bottom: -12px;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: rgb(var(--em-rgb-accent));\n border-radius: 3px 3px 0 0;\n transition: transform var(--duration) var(--easing);\n}\n\n#nav button[aria-selected] {\n color: rgb(var(--em-rgb-accent));\n}\n\n#preview {\n z-index: 2;\n position: relative;\n padding: calc(var(--padding) + 4px) var(--padding);\n padding-right: var(--sidebar-width);\n}\n\n#nav:before, #preview:before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n}\n\n#nav[data-position=top]:before, #preview[data-position=top]:before {\n top: 100%;\n background: linear-gradient(to bottom, var(--em-color-border), transparent);\n}\n\n#nav[data-position=bottom]:before, #preview[data-position=bottom]:before {\n bottom: 100%;\n background: linear-gradient(to top, var(--em-color-border), transparent);\n}\n\n.category button {\n position: relative;\n font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n}\n\n.category button > * {\n position: relative;\n}\n\n.category button .background {\n position: absolute;\n inset: 0;\n opacity: 0;\n background-color: var(--em-color-border);\n transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);\n}\n\n.category button:hover .background {\n transition-duration: var(--duration-instant);\n transition-delay: 0ms;\n}\n\n.category button[aria-selected] .background {\n opacity: 1;\n}\n\n.category button[data-keyboard] .background {\n transition: none;\n}\n\n.row {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.skin-tone-button {\n border-radius: 100%;\n border: 1px solid transparent;\n}\n\n.skin-tone-button:hover {\n border-color: var(--em-color-border);\n}\n\n.skin-tone-button:active .skin-tone {\n transform: scale(0.85) !important;\n}\n\n.skin-tone-button .skin-tone {\n transition: transform var(--duration) var(--easing);\n}\n\n.skin-tone-button[aria-selected] {\n border-left-width: 0;\n border-right-width: 0;\n border-top-color: rgba(0, 0, 0, 0.05);\n border-bottom-color: transparent;\n background-color: var(--em-color-border);\n}\n\n.skin-tone-button[aria-selected] .skin-tone {\n transform: scale(0.9);\n}\n\n.menu {\n z-index: 2;\n position: absolute;\n white-space: nowrap;\n padding: 4px;\n border: 1px solid var(--em-color-border);\n background-color: rgba(var(--em-rgb-background), 0.9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n border-radius: 10px;\n box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.05);\n transition-property: opacity, transform;\n transition-duration: var(--duration);\n transition-timing-function: var(--easing);\n}\n\n.menu.hidden {\n opacity: 0;\n}\n\n.menu[data-position=bottom] {\n transform-origin: bottom right;\n}\n\n.menu[data-position=bottom].hidden {\n transform: scale(0.9) rotate(-3deg) translateY(5%);\n}\n\n.menu[data-position=top] {\n transform-origin: top right;\n}\n\n.menu[data-position=top].hidden {\n transform: scale(0.9) rotate(3deg) translateY(-5%);\n}\n\n.menu input[type=radio] {\n position: absolute;\n overflow: hidden;\n clip: rect(0 0 0 0);\n width: 1px;\n height: 1px;\n padding: 0;\n margin: 0;\n border: 0;\n}\n\n.menu input[type=radio]:checked + .option {\n box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));\n}\n\n.option {\n width: 100%;\n padding: 4px 6px;\n border-radius: 6px;\n}\n\n.option:hover {\n color: #fff;\n background-color: rgb(var(--em-rgb-accent));\n}\n\n.skin-tone {\n position: relative;\n display: inline-block;\n width: 16px;\n height: 16px;\n border-radius: 100%;\n overflow: hidden;\n}\n\n.skin-tone:after {\n content: "";\n position: absolute;\n inset: 0;\n border-radius: 100%;\n border: 1px solid rgba(0, 0, 0, 0.8);\n mix-blend-mode: overlay;\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;\n background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);\n}\n\n.skin-tone-1 {\n background-color: #ffc93a;\n}\n\n.skin-tone-2 {\n background-color: #ffdab7;\n}\n\n.skin-tone-3 {\n background-color: #e7b98f;\n}\n\n.skin-tone-4 {\n background-color: #c88c61;\n}\n\n.skin-tone-5 {\n background-color: #a46134;\n}\n\n.skin-tone-6 {\n background-color: #5d4437;\n}\n\n[data-emoji-set=twitter] .skin-tone:after {\n border-color: rgba(0, 0, 0, 0.5);\n box-shadow: none;\n}\n\n[data-emoji-set=twitter] .skin-tone-1 {\n background-color: #FADE72;\n}\n\n[data-emoji-set=twitter] .skin-tone-2 {\n background-color: #F3DFD0;\n}\n\n[data-emoji-set=twitter] .skin-tone-3 {\n background-color: #EED3A8;\n}\n\n[data-emoji-set=twitter] .skin-tone-4 {\n background-color: #CFAD8D;\n}\n\n[data-emoji-set=twitter] .skin-tone-5 {\n background-color: #A8805D;\n}\n\n[data-emoji-set=twitter] .skin-tone-6 {\n background-color: #765542;\n}\n\n[data-emoji-set=google] .skin-tone:after {\n box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.4);\n}\n\n[data-emoji-set=google] .skin-tone-1 {\n background-color: #F5C748;\n}\n\n[data-emoji-set=google] .skin-tone-2 {\n background-color: #F1D5AA;\n}\n\n[data-emoji-set=google] .skin-tone-3 {\n background-color: #D4B48D;\n}\n\n[data-emoji-set=google] .skin-tone-4 {\n background-color: #AA876B;\n}\n\n[data-emoji-set=google] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=google] .skin-tone-6 {\n background-color: #61493F;\n}\n\n[data-emoji-set=facebook] .skin-tone:after {\n border-color: rgba(0, 0, 0, 0.4);\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;\n}\n\n[data-emoji-set=facebook] .skin-tone-1 {\n background-color: #F5C748;\n}\n\n[data-emoji-set=facebook] .skin-tone-2 {\n background-color: #F1D5AA;\n}\n\n[data-emoji-set=facebook] .skin-tone-3 {\n background-color: #D4B48D;\n}\n\n[data-emoji-set=facebook] .skin-tone-4 {\n background-color: #AA876B;\n}\n\n[data-emoji-set=facebook] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set=facebook] .skin-tone-6 {\n background-color: #61493F;\n}\n';const aT=()=>de.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");class lT extends n.Component{constructor(){super(...arguments),_m(this,"ref",n.createRef()),_m(this,"fetchEmojiData",(async()=>{try{const{data:e}=await aT();return e}catch{return{}}})),_m(this,"onKeyDown",(e=>{let{event:t}=e;return"Escape"===t.key&&(this.props.editor.chain().focus().deleteRange(this.props.range).run(),!0)})),_m(this,"handleSelect",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e).run(),this.props.setActive(!1)}))}componentDidMount(){new oT({...this.props,onEmojiSelect:this.handleSelect,style:{maxWidth:"100%"},theme:"light",native:!0,previewPosition:"none",showSkinTones:!1,data:this.fetchEmojiData,ref:this.ref})}render(){return n.createElement("div",{"data-cy":"neeto-editor-emoji-picker",ref:this.ref})}}lT.defaultProps={editor:{},range:{}},lT.propTypes={editor:jh.exports.object.isRequired,range:jh.exports.object};const cT=new qn("emoji-picker"),uT=mE.create({name:"emojiPicker",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({suggestion:{char:"::",startOfLine:!1,pluginKey:cT,items:()=>[],render:()=>{let e,t;return{onStart(n){e=new RM(lT,{props:n,editor:n.editor}),t=MM("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t[0].destroy(),e.destroy()}}}}}),addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}}),dT=["+1","-1","heart","heart_eyes","tada","partying_face","joy","sob","white_frowning_face","rocket","eyes","raised_hands","open_mouth"],pT=(e,t)=>{const n=dT.concat(t.filter((e=>!dT.includes(e))));return e.sort(((e,t)=>{const r=n.indexOf(e.id),i=n.indexOf(t.id);return-1===r&&-1===i?0:-1===r?1:-1===i?-1:r-i})).slice(0,5)};class hT extends n.Component{constructor(){super(...arguments),_m(this,"state",{isLoading:!1,selectedIndex:0,emojiSuggestions:[],frequentlyUsedEmojis:{}}),_m(this,"fetchEmojiData",(async()=>{this.setState({isLoading:!0});try{const{data:e}=await aT();return this.setState({isLoading:!1}),e}catch{return this.setState({isLoading:!1}),{}}})),_m(this,"searchEmoji",(async()=>this.props.query?fO.search(this.props.query):[])),_m(this,"searchEmojiAndSetState",(async()=>{const e=await this.searchEmoji(),t=this.state.frequentlyUsedEmojis;this.setState({emojiSuggestions:pT(e,t)})})),_m(this,"setEditorState",(async()=>{const e=await this.searchEmoji();this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e[0]).run()})),_m(this,"onKeyDown",(e=>{let{event:t}=e;return!b(this.state.emojiSuggestions)&&("ArrowLeft"===t.key||"ArrowDown"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+n.length-1)%n.length}})),!0):"ArrowRight"===t.key||"ArrowUp"===t.key?(this.setState((e=>{let{selectedIndex:t,emojiSuggestions:n}=e;return{selectedIndex:(t+1)%n.length}})),!0):"Enter"===t.key?(this.selectItem(this.state.selectedIndex),!0):"Escape"===t.key&&(this.props.editor.chain().focus().insertContent(" ").run(),!0))})),_m(this,"selectItem",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(this.state.emojiSuggestions[e]).run()}))}componentDidMount(){this.setState({frequentlyUsedEmojis:Object.keys(JSON.parse(localStorage.getItem("emoji-mart.frequently")||"{}"))}),uO({data:this.fetchEmojiData,theme:"light",previewPosition:"none"}),this.searchEmojiAndSetState()}componentDidUpdate(e){this.props.query!==e.query&&this.searchEmojiAndSetState()}render(){return b(this.state.emojiSuggestions)?null:n.createElement("div",{className:"neeto-editor-emoji-suggestion"},this.state.isLoading&&n.createElement(C,null),!this.state.isLoading&&(this.state.emojiSuggestions.length>0?this.state.emojiSuggestions.map(((e,t)=>n.createElement("div",{"data-cy":`neeto-editor-emoji-suggestion-${e.id}`,key:e.id,className:_s("neeto-editor-emoji-suggestion__item",{"neeto-editor-emoji-suggestion__item--selected":t===this.state.selectedIndex}),onClick:()=>this.selectItem(t)},e.skins[0].native))):n.createElement("p",null,"No results")))}}const fT=new qn("emoji-suggestion"),mT=mE.create({name:"emojiSuggestion",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({HTMLAttributes:{class:"neeto-editor-emoji"},renderEmoji(e){let{node:t}=e;return t.attrs.label},suggestion:{}}),addAttributes:()=>({label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-emoji]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",sx({"data-emoji":""},this.options.HTMLAttributes,n),this.options.renderEmoji({node:t})]},renderText(e){let{node:t}=e;return this.options.renderEmoji({node:t})},addCommands(){return{setEmoji:e=>t=>{var n;let{chain:r}=t;r().focus().insertContent([{type:this.name,attrs:{label:(null==e?void 0:e.native)||(null==e||null===(n=e.skins[0])||void 0===n?void 0:n.native)||""}},{type:"text",text:" "}]).run()}}},addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}}),gT={char:":",startOfLine:!1,pluginKey:fT,command:e=>{let{editor:t,range:n,props:r}=e;t.chain().focus().deleteRange(n).setEmoji(r).run()},items:()=>[],render:()=>{let e,t;return{onStart(n){37===n.editor.view.input.lastKeyCode&&(e=null,t=null)},onUpdate(n){var r;39!==n.editor.view.input.lastKeyCode&&37!==n.editor.view.input.lastKeyCode&&1===n.query.length&&(e=new RM(hT,{props:n,editor:n.editor}),t=MM("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"top-start",zIndex:99999})),e&&e.updateProps(n),!y(t)&&(null===(r=t[0])||void 0===r||r.setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(t){var n,r;return null===(n=e)||void 0===n||null===(r=n.ref)||void 0===r?void 0:r.onKeyDown(t)},onExit(){var n,r;!y(t)&&(null===(n=t[0])||void 0===n||n.destroy()),null===(r=e)||void 0===r||r.destroy(),e=null}}}};var bT,yT=mT.configure({suggestion:gT}),vT=void 0&&(void 0).__extends||(bT=function(e,t){return bT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},bT(e,t)},function(e,t){function n(){this.constructor=e}bT(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),wT=void 0&&(void 0).__assign||function(){return wT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},wT.apply(this,arguments)},_T={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},xT={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ET={width:"20px",height:"20px",position:"absolute"},kT={top:wT(wT({},_T),{top:"-5px"}),right:wT(wT({},xT),{left:void 0,right:"-5px"}),bottom:wT(wT({},_T),{top:void 0,bottom:"-5px"}),left:wT(wT({},xT),{left:"-5px"}),topRight:wT(wT({},ET),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:wT(wT({},ET),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:wT(wT({},ET),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:wT(wT({},ET),{left:"-10px",top:"-10px",cursor:"nw-resize"})},MT=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return vT(n,e),n.prototype.render=function(){return t.createElement("div",{className:this.props.className||"",style:wT(wT({position:"absolute",userSelect:"none"},kT[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},n}(t.PureComponent),DT=void 0&&(void 0).__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CT=void 0&&(void 0).__assign||function(){return CT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},CT.apply(this,arguments)},ST={width:"auto",height:"auto"},AT=function(e,t,n){return Math.max(Math.min(e,n),t)},NT=function(e,t){return Math.round(e/t)*t},OT=function(e,t){return new RegExp(e,"i").test(t)},TT=function(e){return Boolean(e.touches&&e.touches.length)},IT=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n}),0),i=Math.abs(t[r]-e);return 0===n||i<n?t[r]:e},LT=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},FT=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},zT=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],jT="__resizable_base__",RT=function(e){function n(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(jT):t.className+=jT,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return DT(n,e),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ST},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return LT(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?LT(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?LT(t.height):n("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,i=this.props.boundsByDirection,o=this.state.direction,s=i&&OT("left",o),a=i&&OT("top",o);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,o=i.direction,s=i.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=s.width,p=s.height,h=c||0,f=u||0;return OT("right",o)&&(d=s.width+(e-s.x)*r/n,l&&(p=(d-f)/this.ratio+h)),OT("left",o)&&(d=s.width-(e-s.x)*r/n,l&&(p=(d-f)/this.ratio+h)),OT("bottom",o)&&(p=s.height+(t-s.y)*r/n,l&&(d=(p-h)*this.ratio+f)),OT("top",o)&&(p=s.height-(t-s.y)*r/n,l&&(d=(p-h)*this.ratio+f)),{newWidth:d,newHeight:p}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,o=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,a=i.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,p=s||0,h=a||0;if(o){var f=(u-p)*this.ratio+h,m=(d-p)*this.ratio+h,g=(l-h)/this.ratio+p,b=(c-h)/this.ratio+p,y=Math.max(l,f),v=Math.min(c,m),w=Math.max(u,g),_=Math.min(d,b);e=AT(e,y,v),t=AT(t,w,_)}else e=AT(e,l,c),t=AT(t,u,d);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top,s=r.right,a=r.bottom;this.resizableLeft=i,this.resizableRight=s,this.resizableTop=o,this.resizableBottom=a}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,i=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,i=e.nativeEvent.clientY):e.nativeEvent&&TT(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,i=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var o=this.window.getComputedStyle(this.resizable);if("auto"!==o.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=o.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:CT(CT({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&TT(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,i=n.maxHeight,o=n.minWidth,s=n.minHeight,a=TT(e)?e.touches[0].clientX:e.clientX,l=TT(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,p=c.width,h=c.height,f=this.getParentSize(),m=function(e,t,n,r,i,o,s){return r=FT(r,e.width,t,n),i=FT(i,e.height,t,n),o=FT(o,e.width,t,n),s=FT(s,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,r,i,o,s);r=m.maxWidth,i=m.maxHeight,o=m.minWidth,s=m.minHeight;var g=this.calculateNewSizeFromDirection(a,l),b=g.newHeight,y=g.newWidth,v=this.calculateNewMaxFromBoundary(r,i);this.props.snap&&this.props.snap.x&&(y=IT(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(b=IT(b,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,b,{width:v.maxWidth,height:v.maxHeight},{width:o,height:s});if(y=w.newWidth,b=w.newHeight,this.props.grid){var _=NT(y,this.props.grid[0]),x=NT(b,this.props.grid[1]),E=this.props.snapGap||0;y=0===E||Math.abs(_-y)<=E?_:y,b=0===E||Math.abs(x-b)<=E?x:b}var k={width:y-d.width,height:b-d.height};if(p&&"string"==typeof p)if(p.endsWith("%"))y=y/f.width*100+"%";else if(p.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))b=b/f.height*100+"%";else if(h.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}var M={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(b,"height")};"row"===this.flexDir?M.flexBasis=M.width:"column"===this.flexDir&&(M.flexBasis=M.height),me((function(){t.setState(M)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,k)}},n.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n&&this.resizable){var o={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:CT(CT({},this.state.backgroundStyle),{cursor:"auto"})})}},n.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},n.prototype.renderResizer=function(){var e=this,n=this.props,r=n.enable,i=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,a=n.handleWrapperClass,l=n.handleComponent;if(!r)return null;var c=Object.keys(r).map((function(n){return!1!==r[n]?t.createElement(MT,{key:n,direction:n,onResizeStart:e.onResizeStart,replaceStyles:i&&i[n],className:o&&o[n]},l&&l[n]?l[n]:null):null}));return t.createElement("div",{className:a,style:s},c)},n.prototype.render=function(){var e=this,n=Object.keys(this.props).reduce((function(t,n){return-1!==zT.indexOf(n)||(t[n]=e.props[n]),t}),{}),r=CT(CT(CT({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(r.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return t.createElement(i,CT({ref:this.ref,style:r,className:this.props.className},n),this.state.isResizing&&t.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(t.PureComponent);const BT=e=>{let{align:t,updateAttributes:r,deleteNode:i}=e;const o=[{Icon:O,alignPos:"left",optionName:"Align left"},{Icon:T,alignPos:"center",optionName:"Align Center"},{Icon:I,alignPos:"right",optionName:"Align right"},{Icon:L,optionName:"Delete"}];return n.createElement(k,{buttonProps:{className:"neeto-editor__image-menu-btn"},buttonSize:"small",buttonStyle:"secondary",className:"neeto-editor__image-menu",icon:j,position:"top"},o.map((e=>{let{Icon:o,optionName:s,alignPos:a}=e;return n.createElement(x,{icon:o,key:s,style:a===t?"secondary":"text",tooltipProps:{content:m(s),position:"top"},onClick:()=>(e=>e?r({align:e}):i())(a)})})))},PT=e=>{var t;let{node:r,editor:o,getPos:s,updateAttributes:a,deleteNode:l}=e;const c=i(null),{alt:u,src:d,figheight:p,figwidth:h,align:f}=r.attrs,{view:m}=o;let g=p,y=h;const v=c.current?null===(t=c.current.querySelector("figcaption>div"))||void 0===t?void 0:t.textContent:u;return n.createElement(jM,{className:`neeto-editor__image-wrapper neeto-editor__image--${f}`},n.createElement("figure",{ref:c},n.createElement(BT,{align:f,deleteNode:l,updateAttributes:a}),n.createElement(RT,{lockAspectRatio:!0,className:"neeto-editor__image",size:{height:g,width:y},onResizeStop:(e,t,n)=>{g=n.offsetHeight,y=n.offsetWidth,m.dispatch(m.state.tr.setNodeMarkup(s(),void 0,{...r.attrs,figheight:g,figwidth:y,height:g,width:y})),o.commands.focus()}},n.createElement("img",yb({},r.attrs,{alt:v,src:d}))),n.createElement(zM,{as:"figcaption",className:_s({"is-empty":b(v)})})))},UT=mE.create({name:"image",addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",draggable:!0,isolating:!0,addAttributes:()=>({src:{default:null,parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("src")}},alt:{default:"",parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("alt")}},figheight:{default:288,parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("figheight")}},figwidth:{default:"fit-content",parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("figwidth")}},align:{default:"left",parseHTML:e=>{var t;return null===(t=e.querySelector("img"))||void 0===t?void 0:t.getAttribute("align")}}}),parseHTML:()=>[{tag:"figure",contentElement:"figcaption"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;const{align:r,src:i,figheight:o,figwidth:s}=t.attrs,a={class:"neeto-editor__image",style:`height:${o}px;width:${s}px;`};return["a",{href:i,target:"_blank",rel:"noopener noreferrer",class:`neeto-editor__image-wrapper neeto-editor__image--${r}`},["figure",this.options.HTMLAttributes,["div",a,["img",sx(n,{draggable:!1,contenteditable:!1})]],["figcaption",0]]]},addNodeView:()=>PM(PT),addCommands(){return{setFigure:e=>{let{caption:t,...n}=e;return e=>{let{chain:r}=e;return r().insertContent({type:this.name,attrs:n,content:t?[{type:"text",text:t}]:[]}).command((e=>{let{tr:t,commands:n}=e;const{doc:r,selection:i}=t,o=r.resolve(i.to).end();return n.setTextSelection(o)})).run()}}}}}),HT=async(e,t)=>{if(e.size<=hm){const n=new cb({file:e,url:t}),{blobUrl:r}=await n.create();return r}const n=hm/(1024*1024);return v.error(`Image size should be less than ${n} MB`),""};var $T=e=>{let{uploadEndpoint:t}=e;return UT.extend({addProseMirrorPlugins:()=>[new $n({props:{handleDOMEvents:{paste(e,n){var r,i;const{schema:o,selection:{$anchor:{pos:s}}}=e.state;if(!(null===(r=n.clipboardData)||void 0===r||null===(i=r.files)||void 0===i?void 0:i.length))return;const a=Array.from(n.clipboardData.files).filter((e=>/image/i.test(e.type)));b(a)||(n.preventDefault(),a.forEach((async n=>{const r=o.nodes.image.create({src:await HT(n,t)});if(r.attrs.src){const t=e.state.tr.insert(s,r);e.dispatch(t)}})))}}}})]})},VT=mE.create({name:"figcaption",selectable:!1,draggable:!1,parseHTML:()=>[{tag:"figcaption"}]});const WT=e=>{let{onSubmit:t,shortcuts:n}=e;return kx.create({name:"keyboard-shortcuts",addKeyboardShortcuts(){return{"Mod-Enter":()=>(null==t||t(this.editor.getHTML()),this.editor.commands.blur(),!0),...n}}})};var qT=e=>{let{onSubmit:t,shortcuts:n}=e;return WT({onSubmit:t,shortcuts:n})};const KT=new qn("mention"),GT=mE.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${null!==(n=t.attrs.label)&&void 0!==n?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:KT,command:({editor:e,range:t,props:n})=>{var r,i;const o=e.view.state.selection.$to.nodeAfter;(null===(r=null==o?void 0:o.text)||void 0===r?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(i=window.getSelection())||void 0===i||i.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",sx({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:i,anchor:o}=r;return!!i&&(t.doc.nodesBetween(o-1,o,((t,r)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",r,r+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}}),YT=e=>{let{wrapperRef:t,index:n}=e;if(!t.current||n>=t.current.children.length)return;const r=8,i=t.current,o=i.children[n],s=o.clientHeight+r;let a=i.scrollTop;o.offsetTop+s>a+i.clientHeight?a=o.offsetTop-i.clientHeight+s:a>o.offsetTop&&(a=o.offsetTop-r),t.current.scrollTop=a};class QT extends n.Component{constructor(e){super(e),_m(this,"selectItem",(e=>{const{items:t,command:n}=this.props,r=t[e];r&&n({label:r.name,id:r.key})})),_m(this,"upHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+e.length-1)%e.length}}))})),_m(this,"downHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+1)%e.length}}))})),_m(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),_m(this,"onKeyDown",(e=>{let{event:t}=e;const n={ArrowUp:this.upHandler,ArrowDown:this.downHandler,Enter:this.enterHandler};return!!Object.prototype.hasOwnProperty.call(n,t.key)&&(n[t.key](),!0)})),this.state={selectedIndex:0},this.mentionRef=n.createRef()}componentDidUpdate(e){const{items:t}=this.props;t!==e.items&&this.setState({selectedIndex:0}),YT({wrapperRef:this.mentionRef,index:this.state.selectedIndex})}render(){const{selectedIndex:e}=this.state,{items:t}=this.props;return b(t)?n.createElement("div",{className:"neeto-editor-mentions__wrapper"},n.createElement("p",{className:"neeto-editor-mentions__item"},"No Results")):n.createElement("div",{className:"neeto-editor-mentions__wrapper","data-cy":"neeto-editor-mention-list",ref:this.mentionRef},t.map(((t,r)=>{let{key:i,name:o,imageUrl:s}=t;return n.createElement("button",{"data-cy":`neeto-editor-mention-list-${o}`,key:i,type:"button",className:_s("neeto-editor-mentions__item",{active:r===e}),onClick:()=>this.selectItem(r)},n.createElement(S,{user:{name:o,imageUrl:s}}),n.createElement("p",null,o))})))}}function JT(e){return Array.isArray?Array.isArray(e):"[object Array]"===sI(e)}const ZT=1/0;function XT(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-ZT?"-0":t}(e)}function eI(e){return"string"==typeof e}function tI(e){return"number"==typeof e}function nI(e){return!0===e||!1===e||function(e){return rI(e)&&null!==e}(e)&&"[object Boolean]"==sI(e)}function rI(e){return"object"==typeof e}function iI(e){return null!=e}function oI(e){return!e.trim().length}function sI(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const aI="Extended search is not available",lI="Incorrect 'index' type",cI=Object.prototype.hasOwnProperty;class uI{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=dI(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function dI(e){let t=null,n=null,r=null,i=1,o=null;if(eI(e)||JT(e))r=e,t=pI(e),n=hI(e);else{if(!cI.call(e,"name"))throw new Error((e=>`Missing ${e} property in key`)("name"));const s=e.name;if(r=s,cI.call(e,"weight")&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(s));t=pI(s),n=hI(s),o=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:o}}function pI(e){return JT(e)?e:e.split(".")}function hI(e){return JT(e)?e.join("."):e}const fI={useExtendedSearch:!1,getFn:function(e,t){let n=[],r=!1;const i=(e,t,o)=>{if(iI(e))if(t[o]){const s=e[t[o]];if(!iI(s))return;if(o===t.length-1&&(eI(s)||tI(s)||nI(s)))n.push(XT(s));else if(JT(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,o+1)}else t.length&&i(s,t,o+1)}else n.push(e)};return i(e,eI(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var mI={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...fI};const gI=/[^ ]+/g;class bI{constructor({getFn:e=mI.getFn,fieldNormWeight:t=mI.fieldNormWeight}={}){this.norm=function(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(t){const i=t.match(gI).length;if(n.has(i))return n.get(i);const o=1/Math.pow(i,.5*e),s=parseFloat(Math.round(o*r)/r);return n.set(i,s),s},clear(){n.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,eI(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();eI(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!iI(e)||oI(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(iI(i))if(JT(i)){let e=[];const t=[{nestedArrIndex:-1,value:i}];for(;t.length;){const{nestedArrIndex:n,value:r}=t.pop();if(iI(r))if(eI(r)&&!oI(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else JT(r)&&r.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[r]=e}else if(eI(i)&&!oI(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function yI(e,t,{getFn:n=mI.getFn,fieldNormWeight:r=mI.fieldNormWeight}={}){const i=new bI({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(dI)),i.setSources(t),i.create(),i}function vI(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=mI.distance,ignoreLocation:o=mI.ignoreLocation}={}){const s=t/e.length;if(o)return s;const a=Math.abs(r-n);return i?s+a/i:a?1:s}const wI=32;function _I(e,t,n,{location:r=mI.location,distance:i=mI.distance,threshold:o=mI.threshold,findAllMatches:s=mI.findAllMatches,minMatchCharLength:a=mI.minMatchCharLength,includeMatches:l=mI.includeMatches,ignoreLocation:c=mI.ignoreLocation}={}){if(t.length>wI)throw new Error((e=>`Pattern length exceeds max of ${e}.`)(wI));const u=t.length,d=e.length,p=Math.max(0,Math.min(r,d));let h=o,f=p;const m=a>1||l,g=m?Array(d):[];let b;for(;(b=e.indexOf(t,f))>-1;){let e=vI(t,{currentLocation:b,expectedLocation:p,distance:i,ignoreLocation:c});if(h=Math.min(e,h),f=b+u,m){let e=0;for(;e<u;)g[b+e]=1,e+=1}}f=-1;let y=[],v=1,w=u+d;const _=1<<u-1;for(let r=0;r<u;r+=1){let o=0,a=w;for(;o<a;){vI(t,{errors:r,currentLocation:p+a,expectedLocation:p,distance:i,ignoreLocation:c})<=h?o=a:w=a,a=Math.floor((w-o)/2+o)}w=a;let l=Math.max(1,p-a+1),b=s?d:Math.min(p+a,d)+u,x=Array(b+2);x[b+1]=(1<<r)-1;for(let o=b;o>=l;o-=1){let s=o-1,a=n[e.charAt(s)];if(m&&(g[s]=+!!a),x[o]=(x[o+1]<<1|1)&a,r&&(x[o]|=(y[o+1]|y[o])<<1|1|y[o+1]),x[o]&_&&(v=vI(t,{errors:r,currentLocation:s,expectedLocation:p,distance:i,ignoreLocation:c}),v<=h)){if(h=v,f=s,f<=p)break;l=Math.max(1,2*p-f)}}if(vI(t,{errors:r+1,currentLocation:p,expectedLocation:p,distance:i,ignoreLocation:c})>h)break;y=x}const x={isMatch:f>=0,score:Math.max(.001,v)};if(m){const e=function(e=[],t=mI.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let s=e.length;o<s;o+=1){let s=e[o];s&&-1===r?r=o:s||-1===r||(i=o-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}(g,a);e.length?l&&(x.indices=e):x.isMatch=!1}return x}function xI(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}class EI{constructor(e,{location:t=mI.location,threshold:n=mI.threshold,distance:r=mI.distance,includeMatches:i=mI.includeMatches,findAllMatches:o=mI.findAllMatches,minMatchCharLength:s=mI.minMatchCharLength,isCaseSensitive:a=mI.isCaseSensitive,ignoreLocation:l=mI.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const c=(e,t)=>{this.chunks.push({pattern:e,alphabet:xI(e),startIndex:t})},u=this.pattern.length;if(u>wI){let e=0;const t=u%wI,n=u-t;for(;e<n;)c(this.pattern.substr(e,wI),e),e+=wI;if(t){const e=u-wI;c(this.pattern.substr(e),e)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:n}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}const{location:r,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:a,ignoreLocation:l}=this.options;let c=[],u=0,d=!1;this.chunks.forEach((({pattern:t,alphabet:p,startIndex:h})=>{const{isMatch:f,score:m,indices:g}=_I(e,t,p,{location:r+h,distance:i,threshold:o,findAllMatches:s,minMatchCharLength:a,includeMatches:n,ignoreLocation:l});f&&(d=!0),u+=m,f&&g&&(c=[...c,...g])}));let p={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(p.indices=c),p}}class kI{constructor(e){this.pattern=e}static isMultiMatch(e){return MI(e,this.multiRegex)}static isSingleMatch(e){return MI(e,this.singleRegex)}search(){}}function MI(e,t){const n=e.match(t);return n?n[1]:null}class DI extends kI{constructor(e,{location:t=mI.location,threshold:n=mI.threshold,distance:r=mI.distance,includeMatches:i=mI.includeMatches,findAllMatches:o=mI.findAllMatches,minMatchCharLength:s=mI.minMatchCharLength,isCaseSensitive:a=mI.isCaseSensitive,ignoreLocation:l=mI.ignoreLocation}={}){super(e),this._bitapSearch=new EI(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class CI extends kI{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const r=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const SI=[class extends kI{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},CI,class extends kI{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends kI{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends kI{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends kI{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends kI{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},DI],AI=SI.length,NI=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,OI="|";const TI=new Set([DI.type,CI.type]);class II{constructor(e,{isCaseSensitive:t=mI.isCaseSensitive,includeMatches:n=mI.includeMatches,minMatchCharLength:r=mI.minMatchCharLength,ignoreLocation:i=mI.ignoreLocation,findAllMatches:o=mI.findAllMatches,location:s=mI.location,threshold:a=mI.threshold,distance:l=mI.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:i,location:s,threshold:a,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split(OI).map((e=>{let n=e.trim().split(NI).filter((e=>e&&!!e.trim())),r=[];for(let e=0,i=n.length;e<i;e+=1){const i=n[e];let o=!1,s=-1;for(;!o&&++s<AI;){const e=SI[s];let n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),o=!0)}if(!o)for(s=-1;++s<AI;){const e=SI[s];let n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let i=0,o=[],s=0;for(let r=0,a=t.length;r<a;r+=1){const a=t[r];o.length=0,i=0;for(let t=0,r=a.length;t<r;t+=1){const r=a[t],{isMatch:l,indices:c,score:u}=r.search(e);if(!l){s=0,i=0,o.length=0;break}if(i+=1,s+=u,n){const e=r.constructor.type;TI.has(e)?o=[...o,...c]:o.push(c)}}if(i){let e={isMatch:!0,score:s/i};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}}const LI=[];function FI(e,t){for(let n=0,r=LI.length;n<r;n+=1){let r=LI[n];if(r.condition(e,t))return new r(e,t)}return new EI(e,t)}const zI="$and",jI="$or",RI="$path",BI="$val",PI=e=>!(!e[zI]&&!e[jI]),UI=e=>({[zI]:Object.keys(e).map((t=>({[t]:e[t]})))});function HI(e,t,{auto:n=!0}={}){const r=e=>{let i=Object.keys(e);const o=(e=>!!e[RI])(e);if(!o&&i.length>1&&!PI(e))return r(UI(e));if((e=>!JT(e)&&rI(e)&&!PI(e))(e)){const r=o?e[RI]:i[0],s=o?e[BI]:e[r];if(!eI(s))throw new Error((e=>`Invalid value for key ${e}`)(r));const a={keyId:hI(r),pattern:s};return n&&(a.searcher=FI(s,t)),a}let s={children:[],operator:i[0]};return i.forEach((t=>{const n=e[t];JT(n)&&n.forEach((e=>{s.children.push(r(e))}))})),s};return PI(e)||(e=UI(e)),r(e)}function $I(e,t){const n=e.matches;t.matches=[],iI(n)&&n.forEach((e=>{if(!iI(e.indices)||!e.indices.length)return;const{indices:n,value:r}=e;let i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function VI(e,t){t.score=e.score}class WI{constructor(e,t={},n){if(this.options={...mI,...t},this.options.useExtendedSearch&&!1)throw new Error(aI);this._keyStore=new uI(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof bI))throw new Error(lI);this._myIndex=t||yI(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){iI(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:o,ignoreFieldNorm:s}=this.options;let a=eI(e)?eI(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=mI.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:r,score:i})=>{const o=e?e.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(t?1:r))})),e.score=n}))}(a,{ignoreFieldNorm:s}),i&&a.sort(o),tI(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:n=mI.includeMatches,includeScore:r=mI.includeScore}={}){const i=[];return n&&i.push($I),r&&i.push(VI),e.map((e=>{const{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach((t=>{t(e,r)})),r}))}(a,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){const t=FI(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:e,i:n,n:i})=>{if(!iI(e))return;const{isMatch:o,score:s,indices:a}=t.searchIn(e);o&&r.push({item:e,idx:n,matches:[{score:s,value:e,norm:i,indices:a}]})})),r}_searchLogical(e){const t=HI(e,this.options),n=(e,t,r)=>{if(!e.children){const{keyId:n,searcher:i}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return o&&o.length?[{idx:r,item:t,matches:o}]:[]}const i=[];for(let o=0,s=e.children.length;o<s;o+=1){const s=e.children[o],a=n(s,t,r);if(a.length)i.push(...a);else if(e.operator===zI)return[]}return i},r=this._myIndex.records,i={},o=[];return r.forEach((({$:e,i:r})=>{if(iI(e)){let s=n(t,e,r);s.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},o.push(i[r])),s.forEach((({matches:e})=>{i[r].matches.push(...e)})))}})),o}_searchObjectList(e){const t=FI(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach((({$:e,i:r})=>{if(!iI(e))return;let o=[];n.forEach(((n,r)=>{o.push(...this._findMatches({key:n,value:e[r],searcher:t}))})),o.length&&i.push({idx:r,item:e,matches:o})})),i}_findMatches({key:e,value:t,searcher:n}){if(!iI(t))return[];let r=[];if(JT(t))t.forEach((({v:t,i:i,n:o})=>{if(!iI(t))return;const{isMatch:s,score:a,indices:l}=n.searchIn(t);s&&r.push({score:a,key:e,value:t,idx:i,norm:o,indices:l})}));else{const{v:i,n:o}=t,{isMatch:s,score:a,indices:l}=n.searchIn(i);s&&r.push({score:a,key:e,value:i,norm:o,indices:l})}return r}}WI.version="6.6.2",WI.createIndex=yI,WI.parseIndex=function(e,{getFn:t=mI.getFn,fieldNormWeight:n=mI.fieldNormWeight}={}){const{keys:r,records:i}=e,o=new bI({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o},WI.config=mI,WI.parseQuery=HI,function(...e){LI.push(...e)}(II);const qI=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.sort(((e,t)=>e.name.localeCompare(t.name)))},KI={render:()=>{let e,t;return{onStart:n=>{e=new RM(QT,{props:n,editor:n.editor}),t=MM("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var r;return"Escape"===n.event.key?(t[0].hide(),!0):null===(r=e.ref)||void 0===r?void 0:r.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},GI=GT.extend({addCommands(){return{setMention:e=>{let{id:t,label:n}=e;return e=>{let{chain:r}=e;r().focus().insertContent([{type:this.name,attrs:{id:t,label:n}},{type:"text",text:" "}]).run()}}}}});var YI=e=>{let{suggestion:t={},...n}=e;return GI.configure({...n,suggestion:{...KI,...t}})};const QI=kx.create({name:"placeholder",addOptions:()=>({excludeNodeTypes:["variable","codeBlock"],emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!1}),addProseMirrorPlugins(){return[new $n({props:{decorations:e=>{let{doc:t,selection:n}=e;const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,o=[];return r?(t.descendants(((e,t)=>{const n=i>=t&&i<=t+e.nodeSize,r=!e.isLeaf&&!e.childCount,s=this.options.excludeNodeTypes.includes(e.type.name);if((n||!this.options.showOnlyCurrent)&&!s&&r){const n=[this.options.emptyNodeClass];this.editor.isEmpty&&n.push(this.options.emptyEditorClass);const r=t_.node(t,t+e.nodeSize,{class:n.join(" "),"data-placeholder":this.options.placeholder});o.push(r)}return this.options.includeChildren})),i_.create(t,o)):null}}})]}});var JI={exports:{}};
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Lodash <https://lodash.com/>
|
|
@@ -39,5 +39,5 @@ return function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=i.create(
|
|
|
39
39
|
* Released under MIT license <https://lodash.com/license>
|
|
40
40
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
41
41
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
42
|
-
*/!function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,p=2,h=4,f=1,m=2,g=1,b=2,y=4,v=8,w=16,_=32,x=64,E=128,k=256,M=512,D=30,C="...",S=800,A=16,N=1,O=2,T=3,I=1/0,L=9007199254740991,F=17976931348623157e292,z=0/0,j=4294967295,R=j-1,B=j>>>1,P=[["ary",E],["bind",g],["bindKey",b],["curry",v],["curryRight",w],["flip",M],["partial",_],["partialRight",x],["rearg",k]],U="[object Arguments]",H="[object Array]",$="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",q="[object DOMException]",K="[object Error]",G="[object Function]",Y="[object GeneratorFunction]",Q="[object Map]",J="[object Number]",Z="[object Null]",X="[object Object]",ee="[object Promise]",te="[object Proxy]",ne="[object RegExp]",re="[object Set]",ie="[object String]",oe="[object Symbol]",se="[object Undefined]",ae="[object WeakMap]",le="[object WeakSet]",ce="[object ArrayBuffer]",ue="[object DataView]",de="[object Float32Array]",pe="[object Float64Array]",he="[object Int8Array]",fe="[object Int16Array]",me="[object Int32Array]",ge="[object Uint8Array]",be="[object Uint8ClampedArray]",ye="[object Uint16Array]",ve="[object Uint32Array]",we=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,ke=/[&<>"']/g,Me=RegExp(Ee.source),De=RegExp(ke.source),Ce=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Ae=/<%=([\s\S]+?)%>/g,Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oe=/^\w*$/,Te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ie=/[\\^$.*+?()[\]{}|]/g,Le=RegExp(Ie.source),Fe=/^\s+/,ze=/\s/,je=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Re=/\{\n\/\* \[wrapped with (.+)\] \*/,Be=/,? & /,Pe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ue=/[()=,{}\[\]\/\s]/,He=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ve=/\w*$/,We=/^[-+]0x[0-9a-f]+$/i,qe=/^0b[01]+$/i,Ke=/^\[object .+?Constructor\]$/,Ge=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Je=/($^)/,Ze=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",et="\\u0300-\\u036f"+"\\ufe20-\\ufe2f"+"\\u20d0-\\u20ff",tt="\\u2700-\\u27bf",nt="a-z\\xdf-\\xf6\\xf8-\\xff",rt="A-Z\\xc0-\\xd6\\xd8-\\xde",it="\\ufe0e\\ufe0f",ot="\\xac\\xb1\\xd7\\xf7"+"\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf"+"\\u2000-\\u206f"+" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",st="['’]",at="["+Xe+"]",lt="["+ot+"]",ct="["+et+"]",ut="\\d+",dt="["+tt+"]",pt="["+nt+"]",ht="[^"+Xe+ot+ut+tt+nt+rt+"]",ft="\\ud83c[\\udffb-\\udfff]",mt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",bt="[\\ud800-\\udbff][\\udc00-\\udfff]",yt="["+rt+"]",vt="\\u200d",wt="(?:"+pt+"|"+ht+")",_t="(?:"+yt+"|"+ht+")",xt="(?:"+st+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+st+"(?:D|LL|M|RE|S|T|VE))?",kt="(?:"+ct+"|"+ft+")"+"?",Mt="["+it+"]?",Dt=Mt+kt+("(?:"+vt+"(?:"+[mt,gt,bt].join("|")+")"+Mt+kt+")*"),Ct="(?:"+[dt,gt,bt].join("|")+")"+Dt,St="(?:"+[mt+ct+"?",ct,gt,bt,at].join("|")+")",At=RegExp(st,"g"),Nt=RegExp(ct,"g"),Ot=RegExp(ft+"(?="+ft+")|"+St+Dt,"g"),Tt=RegExp([yt+"?"+pt+"+"+xt+"(?="+[lt,yt,"$"].join("|")+")",_t+"+"+Et+"(?="+[lt,yt+wt,"$"].join("|")+")",yt+"?"+wt+"+"+xt,yt+"+"+Et,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ut,Ct].join("|"),"g"),It=RegExp("["+vt+Xe+et+it+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ft=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zt=-1,jt={};jt[de]=jt[pe]=jt[he]=jt[fe]=jt[me]=jt[ge]=jt[be]=jt[ye]=jt[ve]=!0,jt[U]=jt[H]=jt[ce]=jt[V]=jt[ue]=jt[W]=jt[K]=jt[G]=jt[Q]=jt[J]=jt[X]=jt[ne]=jt[re]=jt[ie]=jt[ae]=!1;var Rt={};Rt[U]=Rt[H]=Rt[ce]=Rt[ue]=Rt[V]=Rt[W]=Rt[de]=Rt[pe]=Rt[he]=Rt[fe]=Rt[me]=Rt[Q]=Rt[J]=Rt[X]=Rt[ne]=Rt[re]=Rt[ie]=Rt[oe]=Rt[ge]=Rt[be]=Rt[ye]=Rt[ve]=!0,Rt[K]=Rt[G]=Rt[ae]=!1;var Bt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pt=parseFloat,Ut=parseInt,Ht="object"==typeof yi&&yi&&yi.Object===Object&&yi,$t="object"==typeof self&&self&&self.Object===Object&&self,Vt=Ht||$t||Function("return this")(),Wt=t&&!t.nodeType&&t,qt=Wt&&"object"=="object"&&e&&!e.nodeType&&e,Kt=qt&&qt.exports===Wt,Gt=Kt&&Ht.process,Yt=function(){try{var e=qt&&qt.require&&qt.require("util").types;return e||Gt&&Gt.binding&&Gt.binding("util")}catch(e){}}(),Qt=Yt&&Yt.isArrayBuffer,Jt=Yt&&Yt.isDate,Zt=Yt&&Yt.isMap,Xt=Yt&&Yt.isRegExp,en=Yt&&Yt.isSet,tn=Yt&&Yt.isTypedArray;function nn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function rn(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function on(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function sn(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function an(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ln(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function cn(e,t){return!!(null==e?0:e.length)&&vn(e,t,0)>-1}function un(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function dn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function pn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function hn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function fn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function mn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var gn=En("length");function bn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function yn(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function vn(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):yn(e,_n,n)}function wn(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function _n(e){return e!=e}function xn(e,t){var n=null==e?0:e.length;return n?Dn(e,t)/n:z}function En(e){return function(t){return null==t?n:t[e]}}function kn(e){return function(t){return null==e?n:e[t]}}function Mn(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Dn(e,t){for(var r,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==n&&(r=r===n?s:r+s)}return r}function Cn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Sn(e){return e?e.slice(0,qn(e)+1).replace(Fe,""):e}function An(e){return function(t){return e(t)}}function Nn(e,t){return dn(t,(function(t){return e[t]}))}function On(e,t){return e.has(t)}function Tn(e,t){for(var n=-1,r=e.length;++n<r&&vn(t,e[n],0)>-1;);return n}function In(e,t){for(var n=e.length;n--&&vn(t,e[n],0)>-1;);return n}function Ln(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Fn=kn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),zn=kn({"&":"&","<":"<",">":">",'"':""","'":"'"});function jn(e){return"\\"+Bt[e]}function Rn(e){return It.test(e)}function Bn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Pn(e,t){return function(n){return e(t(n))}}function Un(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==u||(e[n]=u,o[i++]=n)}return o}function Hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function $n(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Vn(e){return Rn(e)?function(e){var t=Ot.lastIndex=0;for(;Ot.test(e);)++t;return t}(e):gn(e)}function Wn(e){return Rn(e)?function(e){return e.match(Ot)||[]}(e):function(e){return e.split("")}(e)}function qn(e){for(var t=e.length;t--&&ze.test(e.charAt(t)););return t}var Kn=kn({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Gn=function e(t){var ze,Xe=(t=null==t?Vt:Gn.defaults(Vt.Object(),t,Gn.pick(Vt,Ft))).Array,et=t.Date,tt=t.Error,nt=t.Function,rt=t.Math,it=t.Object,ot=t.RegExp,st=t.String,at=t.TypeError,lt=Xe.prototype,ct=nt.prototype,ut=it.prototype,dt=t["__core-js_shared__"],pt=ct.toString,ht=ut.hasOwnProperty,ft=0,mt=(ze=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ze:"",gt=ut.toString,bt=pt.call(it),yt=Vt._,vt=ot("^"+pt.call(ht).replace(Ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wt=Kt?t.Buffer:n,_t=t.Symbol,xt=t.Uint8Array,Et=wt?wt.allocUnsafe:n,kt=Pn(it.getPrototypeOf,it),Mt=it.create,Dt=ut.propertyIsEnumerable,Ct=lt.splice,St=_t?_t.isConcatSpreadable:n,Ot=_t?_t.iterator:n,It=_t?_t.toStringTag:n,Bt=function(){try{var e=Wo(it,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ht=t.clearTimeout!==Vt.clearTimeout&&t.clearTimeout,$t=et&&et.now!==Vt.Date.now&&et.now,Wt=t.setTimeout!==Vt.setTimeout&&t.setTimeout,qt=rt.ceil,Gt=rt.floor,Yt=it.getOwnPropertySymbols,gn=wt?wt.isBuffer:n,kn=t.isFinite,Yn=lt.join,Qn=Pn(it.keys,it),Jn=rt.max,Zn=rt.min,Xn=et.now,er=t.parseInt,tr=rt.random,nr=lt.reverse,rr=Wo(t,"DataView"),ir=Wo(t,"Map"),or=Wo(t,"Promise"),sr=Wo(t,"Set"),ar=Wo(t,"WeakMap"),lr=Wo(it,"create"),cr=ar&&new ar,ur={},dr=ys(rr),pr=ys(ir),hr=ys(or),fr=ys(sr),mr=ys(ar),gr=_t?_t.prototype:n,br=gr?gr.valueOf:n,yr=gr?gr.toString:n;function vr(e){if(Fa(e)&&!ka(e)&&!(e instanceof Er)){if(e instanceof xr)return e;if(ht.call(e,"__wrapped__"))return vs(e)}return new xr(e)}var wr=function(){function e(){}return function(t){if(!La(t))return{};if(Mt)return Mt(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function _r(){}function xr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Er(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function kr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Cr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Dr;++t<n;)this.add(e[t])}function Sr(e){var t=this.__data__=new Mr(e);this.size=t.size}function Ar(e,t){var n=ka(e),r=!n&&Ea(e),i=!n&&!r&&Sa(e),o=!n&&!r&&!i&&$a(e),s=n||r||i||o,a=s?Cn(e.length,st):[],l=a.length;for(var c in e)!t&&!ht.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Zo(c,l))||a.push(c);return a}function Nr(e){var t=e.length;return t?e[Ci(0,t-1)]:n}function Or(e,t){return ms(lo(e),Pr(t,0,e.length))}function Tr(e){return ms(lo(e))}function Ir(e,t,r){(r!==n&&!wa(e[t],r)||r===n&&!(t in e))&&Rr(e,t,r)}function Lr(e,t,r){var i=e[t];ht.call(e,t)&&wa(i,r)&&(r!==n||t in e)||Rr(e,t,r)}function Fr(e,t){for(var n=e.length;n--;)if(wa(e[n][0],t))return n;return-1}function zr(e,t,n,r){return Wr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function jr(e,t){return e&&co(t,dl(t),e)}function Rr(e,t,n){"__proto__"==t&&Bt?Bt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Br(e,t){for(var r=-1,i=t.length,o=Xe(i),s=null==e;++r<i;)o[r]=s?n:sl(e,t[r]);return o}function Pr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function Ur(e,t,r,i,o,s){var a,l=t&d,c=t&p,u=t&h;if(r&&(a=o?r(e,i,o,s):r(e)),a!==n)return a;if(!La(e))return e;var f=ka(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&ht.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return lo(e,a)}else{var m=Go(e),g=m==G||m==Y;if(Sa(e))return no(e,l);if(m==X||m==U||g&&!o){if(a=c||g?{}:Qo(e),!l)return c?function(e,t){return co(e,Ko(e),t)}(e,function(e,t){return e&&co(t,pl(t),e)}(a,e)):function(e,t){return co(e,qo(e),t)}(e,jr(a,e))}else{if(!Rt[m])return o?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case ce:return ro(e);case V:case W:return new r(+e);case ue:return function(e,t){var n=t?ro(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case de:case pe:case he:case fe:case me:case ge:case be:case ye:case ve:return io(e,n);case Q:return new r;case J:case ie:return new r(e);case ne:return function(e){var t=new e.constructor(e.source,Ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case re:return new r;case oe:return i=e,br?it(br.call(i)):{}}var i}(e,m,l)}}s||(s=new Sr);var b=s.get(e);if(b)return b;s.set(e,a),Pa(e)?e.forEach((function(n){a.add(Ur(n,t,r,n,e,s))})):za(e)&&e.forEach((function(n,i){a.set(i,Ur(n,t,r,i,e,s))}));var y=f?n:(u?c?Ro:jo:c?pl:dl)(e);return on(y||e,(function(n,i){y&&(n=e[i=n]),Lr(a,i,Ur(n,t,r,i,e,s))})),a}function Hr(e,t,r){var i=r.length;if(null==e)return!i;for(e=it(e);i--;){var o=r[i],s=t[o],a=e[o];if(a===n&&!(o in e)||!s(a))return!1}return!0}function $r(e,t,r){if("function"!=typeof e)throw new at(s);return ds((function(){e.apply(n,r)}),t)}function Vr(e,t,n,r){var o=-1,s=cn,a=!0,l=e.length,c=[],u=t.length;if(!l)return c;n&&(t=dn(t,An(n))),r?(s=un,a=!1):t.length>=i&&(s=On,a=!1,t=new Cr(t));e:for(;++o<l;){var d=e[o],p=null==n?d:n(d);if(d=r||0!==d?d:0,a&&p==p){for(var h=u;h--;)if(t[h]===p)continue e;c.push(d)}else s(t,p,r)||c.push(d)}return c}vr.templateSettings={escape:Ce,evaluate:Se,interpolate:Ae,variable:"",imports:{_:vr}},vr.prototype=_r.prototype,vr.prototype.constructor=vr,xr.prototype=wr(_r.prototype),xr.prototype.constructor=xr,Er.prototype=wr(_r.prototype),Er.prototype.constructor=Er,kr.prototype.clear=function(){this.__data__=lr?lr(null):{},this.size=0},kr.prototype["delete"]=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},kr.prototype.get=function(e){var t=this.__data__;if(lr){var r=t[e];return r===l?n:r}return ht.call(t,e)?t[e]:n},kr.prototype.has=function(e){var t=this.__data__;return lr?t[e]!==n:ht.call(t,e)},kr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=lr&&t===n?l:t,this},Mr.prototype.clear=function(){this.__data__=[],this.size=0},Mr.prototype["delete"]=function(e){var t=this.__data__,n=Fr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ct.call(t,n,1),--this.size,!0)},Mr.prototype.get=function(e){var t=this.__data__,r=Fr(t,e);return r<0?n:t[r][1]},Mr.prototype.has=function(e){return Fr(this.__data__,e)>-1},Mr.prototype.set=function(e,t){var n=this.__data__,r=Fr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Dr.prototype.clear=function(){this.size=0,this.__data__={hash:new kr,map:new(ir||Mr),string:new kr}},Dr.prototype["delete"]=function(e){var t=$o(this,e)["delete"](e);return this.size-=t?1:0,t},Dr.prototype.get=function(e){return $o(this,e).get(e)},Dr.prototype.has=function(e){return $o(this,e).has(e)},Dr.prototype.set=function(e,t){var n=$o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Cr.prototype.add=Cr.prototype.push=function(e){return this.__data__.set(e,l),this},Cr.prototype.has=function(e){return this.__data__.has(e)},Sr.prototype.clear=function(){this.__data__=new Mr,this.size=0},Sr.prototype["delete"]=function(e){var t=this.__data__,n=t["delete"](e);return this.size=t.size,n},Sr.prototype.get=function(e){return this.__data__.get(e)},Sr.prototype.has=function(e){return this.__data__.has(e)},Sr.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mr){var r=n.__data__;if(!ir||r.length<i-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Dr(r)}return n.set(e,t),this.size=n.size,this};var Wr=ho(Xr),qr=ho(ei,!0);function Kr(e,t){var n=!0;return Wr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function Gr(e,t,r){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(l===n?a==a&&!Ha(a):r(a,l)))var l=a,c=s}return c}function Yr(e,t){var n=[];return Wr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Qr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=Jo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?Qr(a,t-1,n,r,i):pn(i,a):r||(i[i.length]=a)}return i}var Jr=fo(),Zr=fo(!0);function Xr(e,t){return e&&Jr(e,t,dl)}function ei(e,t){return e&&Zr(e,t,dl)}function ti(e,t){return ln(t,(function(t){return Oa(e[t])}))}function ni(e,t){for(var r=0,i=(t=Zi(t,e)).length;null!=e&&r<i;)e=e[bs(t[r++])];return r&&r==i?e:n}function ri(e,t,n){var r=t(e);return ka(e)?r:pn(r,n(e))}function ii(e){return null==e?e===n?se:Z:It&&It in it(e)?function(e){var t=ht.call(e,It),r=e[It];try{e[It]=n;var i=!0}catch(e){}var o=gt.call(e);i&&(t?e[It]=r:delete e[It]);return o}(e):function(e){return gt.call(e)}(e)}function oi(e,t){return e>t}function si(e,t){return null!=e&&ht.call(e,t)}function ai(e,t){return null!=e&&t in it(e)}function li(e,t,r){for(var i=r?un:cn,o=e[0].length,s=e.length,a=s,l=Xe(s),c=1/0,u=[];a--;){var d=e[a];a&&t&&(d=dn(d,An(t))),c=Zn(d.length,c),l[a]=!r&&(t||o>=120&&d.length>=120)?new Cr(a&&d):n}d=e[0];var p=-1,h=l[0];e:for(;++p<o&&u.length<c;){var f=d[p],m=t?t(f):f;if(f=r||0!==f?f:0,!(h?On(h,m):i(u,m,r))){for(a=s;--a;){var g=l[a];if(!(g?On(g,m):i(e[a],m,r)))continue e}h&&h.push(m),u.push(f)}}return u}function ci(e,t,r){var i=null==(e=as(e,t=Zi(t,e)))?e:e[bs(Ns(t))];return null==i?n:nn(i,e,r)}function ui(e){return Fa(e)&&ii(e)==U}function di(e,t,r,i,o){return e===t||(null==e||null==t||!Fa(e)&&!Fa(t)?e!=e&&t!=t:function(e,t,r,i,o,s){var a=ka(e),l=ka(t),c=a?H:Go(e),u=l?H:Go(t),d=(c=c==U?X:c)==X,p=(u=u==U?X:u)==X,h=c==u;if(h&&Sa(e)){if(!Sa(t))return!1;a=!0,d=!1}if(h&&!d)return s||(s=new Sr),a||$a(e)?Fo(e,t,r,i,o,s):function(e,t,n,r,i,o,s){switch(n){case ue:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ce:return!(e.byteLength!=t.byteLength||!o(new xt(e),new xt(t)));case V:case W:case J:return wa(+e,+t);case K:return e.name==t.name&&e.message==t.message;case ne:case ie:return e==t+"";case Q:var a=Bn;case re:var l=r&f;if(a||(a=Hn),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=m,s.set(e,t);var u=Fo(a(e),a(t),r,i,o,s);return s["delete"](e),u;case oe:if(br)return br.call(e)==br.call(t)}return!1}(e,t,c,r,i,o,s);if(!(r&f)){var g=d&&ht.call(e,"__wrapped__"),b=p&&ht.call(t,"__wrapped__");if(g||b){var y=g?e.value():e,v=b?t.value():t;return s||(s=new Sr),o(y,v,r,i,s)}}if(!h)return!1;return s||(s=new Sr),function(e,t,r,i,o,s){var a=r&f,l=jo(e),c=l.length,u=jo(t).length;if(c!=u&&!a)return!1;var d=c;for(;d--;){var p=l[d];if(!(a?p in t:ht.call(t,p)))return!1}var h=s.get(e),m=s.get(t);if(h&&m)return h==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);var b=a;for(;++d<c;){var y=e[p=l[d]],v=t[p];if(i)var w=a?i(v,y,p,t,e,s):i(y,v,p,e,t,s);if(!(w===n?y===v||o(y,v,r,i,s):w)){g=!1;break}b||(b="constructor"==p)}if(g&&!b){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(g=!1)}return s["delete"](e),s["delete"](t),g}(e,t,r,i,o,s)}(e,t,r,i,di,o))}function pi(e,t,r,i){var o=r.length,s=o,a=!i;if(null==e)return!s;for(e=it(e);o--;){var l=r[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var c=(l=r[o])[0],u=e[c],d=l[1];if(a&&l[2]){if(u===n&&!(c in e))return!1}else{var p=new Sr;if(i)var h=i(u,d,c,e,t,p);if(!(h===n?di(d,u,f|m,i,p):h))return!1}}return!0}function hi(e){return!(!La(e)||(t=e,mt&&mt in t))&&(Oa(e)?vt:Ke).test(ys(e));var t}function fi(e){return"function"==typeof e?e:null==e?jl:"object"==typeof e?ka(e)?wi(e[0],e[1]):vi(e):ql(e)}function mi(e){if(!rs(e))return Qn(e);var t=[];for(var n in it(e))ht.call(e,n)&&"constructor"!=n&&t.push(n);return t}function gi(e){if(!La(e))return function(e){var t=[];if(null!=e)for(var n in it(e))t.push(n);return t}(e);var t=rs(e),n=[];for(var r in e)("constructor"!=r||!t&&ht.call(e,r))&&n.push(r);return n}function bi(e,t){return e<t}function yi(e,t){var n=-1,r=Da(e)?Xe(e.length):[];return Wr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function vi(e){var t=Vo(e);return 1==t.length&&t[0][2]?os(t[0][0],t[0][1]):function(n){return n===e||pi(n,e,t)}}function wi(e,t){return es(e)&&is(t)?os(bs(e),t):function(r){var i=sl(r,e);return i===n&&i===t?al(r,e):di(t,i,f|m)}}function _i(e,t,r,i,o){e!==t&&Jr(t,(function(s,a){if(o||(o=new Sr),La(s))!function(e,t,r,i,o,s,a){var l=cs(e,r),c=cs(t,r),u=a.get(c);if(u)return void Ir(e,r,u);var d=s?s(l,c,r+"",e,t,a):n,p=d===n;if(p){var h=ka(c),f=!h&&Sa(c),m=!h&&!f&&$a(c);d=c,h||f||m?ka(l)?d=l:Ca(l)?d=lo(l):f?(p=!1,d=no(c,!0)):m?(p=!1,d=io(c,!0)):d=[]:Ra(c)||Ea(c)?(d=l,Ea(l)?d=Ja(l):La(l)&&!Oa(l)||(d=Qo(c))):p=!1}p&&(a.set(c,d),o(d,c,i,s,a),a["delete"](c));Ir(e,r,d)}(e,t,a,r,_i,i,o);else{var l=i?i(cs(e,a),s,a+"",e,t,o):n;l===n&&(l=s),Ir(e,a,l)}}),pl)}function xi(e,t){var r=e.length;if(r)return Zo(t+=t<0?r:0,r)?e[t]:n}function Ei(e,t,n){t=t.length?dn(t,(function(e){return ka(e)?function(t){return ni(t,1===e.length?e[0]:e)}:e})):[jl];var r=-1;t=dn(t,An(Ho()));var i=yi(e,(function(e,n,i){var o=dn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;for(;++r<s;){var l=oo(i[r],o[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function ki(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=ni(e,s);n(a,s)&&Ti(o,Zi(s,e),a)}return o}function Mi(e,t,n,r){var i=r?wn:vn,o=-1,s=t.length,a=e;for(e===t&&(t=lo(t)),n&&(a=dn(e,An(n)));++o<s;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(a,u,l,r))>-1;)a!==e&&Ct.call(a,l,1),Ct.call(e,l,1);return e}function Di(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Zo(i)?Ct.call(e,i,1):Vi(e,i)}}return e}function Ci(e,t){return e+Gt(tr()*(t-e+1))}function Si(e,t){var n="";if(!e||t<1||t>L)return n;do{t%2&&(n+=e),(t=Gt(t/2))&&(e+=e)}while(t);return n}function Ai(e,t){return ps(ss(e,t,jl),e+"")}function Ni(e){return Nr(wl(e))}function Oi(e,t){var n=wl(e);return ms(n,Pr(t,0,n.length))}function Ti(e,t,r,i){if(!La(e))return e;for(var o=-1,s=(t=Zi(t,e)).length,a=s-1,l=e;null!=l&&++o<s;){var c=bs(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var d=l[c];(u=i?i(d,c,l):n)===n&&(u=La(d)?d:Zo(t[o+1])?[]:{})}Lr(l,c,u),l=l[c]}return e}var Ii=cr?function(e,t){return cr.set(e,t),e}:jl,Li=Bt?function(e,t){return Bt(e,"toString",{configurable:!0,enumerable:!1,value:Ll(t),writable:!0})}:jl;function Fi(e){return ms(wl(e))}function zi(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Xe(i);++r<i;)o[r]=e[r+t];return o}function ji(e,t){var n;return Wr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=B){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!Ha(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Bi(e,t,jl,n)}function Bi(e,t,r,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,l=null===t,c=Ha(t),u=t===n;o<s;){var d=Gt((o+s)/2),p=r(e[d]),h=p!==n,f=null===p,m=p==p,g=Ha(p);if(a)var b=i||m;else b=u?m&&(i||h):l?m&&h&&(i||!f):c?m&&h&&!f&&(i||!g):!f&&!g&&(i?p<=t:p<t);b?o=d+1:s=d}return Zn(s,R)}function Pi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!wa(a,l)){var l=a;o[i++]=0===s?0:s}}return o}function Ui(e){return"number"==typeof e?e:Ha(e)?z:+e}function Hi(e){if("string"==typeof e)return e;if(ka(e))return dn(e,Hi)+"";if(Ha(e))return yr?yr.call(e):"";var t=e+"";return"0"==t&&1/e==-I?"-0":t}function $i(e,t,n){var r=-1,o=cn,s=e.length,a=!0,l=[],c=l;if(n)a=!1,o=un;else if(s>=i){var u=t?null:Ao(e);if(u)return Hn(u);a=!1,o=On,c=new Cr}else c=t?[]:l;e:for(;++r<s;){var d=e[r],p=t?t(d):d;if(d=n||0!==d?d:0,a&&p==p){for(var h=c.length;h--;)if(c[h]===p)continue e;t&&c.push(p),l.push(d)}else o(c,p,n)||(c!==l&&c.push(p),l.push(d))}return l}function Vi(e,t){return null==(e=as(e,t=Zi(t,e)))||delete e[bs(Ns(t))]}function Wi(e,t,n,r){return Ti(e,t,n(ni(e,t)),r)}function qi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?zi(e,r?0:o,r?o+1:i):zi(e,r?o+1:0,r?i:o)}function Ki(e,t){var n=e;return n instanceof Er&&(n=n.value()),hn(t,(function(e,t){return t.func.apply(t.thisArg,pn([e],t.args))}),n)}function Gi(e,t,n){var r=e.length;if(r<2)return r?$i(e[0]):[];for(var i=-1,o=Xe(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=Vr(o[i]||s,e[a],t,n));return $i(Qr(o,1),t,n)}function Yi(e,t,r){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var l=i<s?t[i]:n;r(a,e[i],l)}return a}function Qi(e){return Ca(e)?e:[]}function Ji(e){return"function"==typeof e?e:jl}function Zi(e,t){return ka(e)?e:es(e,t)?[e]:gs(Za(e))}var Xi=Ai;function eo(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:zi(e,t,r)}var to=Ht||function(e){return Vt.clearTimeout(e)};function no(e,t){if(t)return e.slice();var n=e.length,r=Et?Et(n):new e.constructor(n);return e.copy(r),r}function ro(e){var t=new e.constructor(e.byteLength);return new xt(t).set(new xt(e)),t}function io(e,t){var n=t?ro(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function oo(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,s=Ha(e),a=t!==n,l=null===t,c=t==t,u=Ha(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!u&&e<t||u&&r&&o&&!i&&!s||l&&r&&o||!a&&o||!c)return-1}return 0}function so(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,l=t.length,c=Jn(o-s,0),u=Xe(l+c),d=!r;++a<l;)u[a]=t[a];for(;++i<s;)(d||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[a++]=e[i++];return u}function ao(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,l=-1,c=t.length,u=Jn(o-a,0),d=Xe(u+c),p=!r;++i<u;)d[i]=e[i];for(var h=i;++l<c;)d[h+l]=t[l];for(;++s<a;)(p||i<o)&&(d[h+n[s]]=e[i++]);return d}function lo(e,t){var n=-1,r=e.length;for(t||(t=Xe(r));++n<r;)t[n]=e[n];return t}function co(e,t,r,i){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var l=t[s],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?Rr(r,l,c):Lr(r,l,c)}return r}function uo(e,t){return function(n,r){var i=ka(n)?rn:zr,o=t?t():{};return i(n,e,Ho(r,2),o)}}function po(e){return Ai((function(t,r){var i=-1,o=r.length,s=o>1?r[o-1]:n,a=o>2?r[2]:n;for(s=e.length>3&&"function"==typeof s?(o--,s):n,a&&Xo(r[0],r[1],a)&&(s=o<3?n:s,o=1),t=it(t);++i<o;){var l=r[i];l&&e(t,l,i,s)}return t}))}function ho(e,t){return function(n,r){if(null==n)return n;if(!Da(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=it(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function fo(e){return function(t,n,r){for(var i=-1,o=it(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function mo(e){return function(t){var r=Rn(t=Za(t))?Wn(t):n,i=r?r[0]:t.charAt(0),o=r?eo(r,1).join(""):t.slice(1);return i[e]()+o}}function go(e){return function(t){return hn(Ol(El(t).replace(At,"")),e,"")}}function bo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=wr(e.prototype),r=e.apply(n,t);return La(r)?r:n}}function yo(e){return function(t,r,i){var o=it(t);if(!Da(t)){var s=Ho(r,3);t=dl(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,i);return a>-1?o[s?t[a]:a]:n}}function vo(e){return zo((function(t){var r=t.length,i=r,o=xr.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new at(s);if(o&&!l&&"wrapper"==Po(a))var l=new xr([],!0)}for(i=l?i:r;++i<r;){var c=Po(a=t[i]),u="wrapper"==c?Bo(a):n;l=u&&ts(u[0])&&u[1]==(E|v|_|k)&&!u[4].length&&1==u[9]?l[Po(u[0])].apply(l,u[3]):1==a.length&&ts(a)?l[c]():l.thru(a)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&ka(n))return l.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function wo(e,t,r,i,o,s,a,l,c,u){var d=t&E,p=t&g,h=t&b,f=t&(v|w),m=t&M,y=h?n:bo(e);return function n(){for(var g=arguments.length,b=Xe(g),v=g;v--;)b[v]=arguments[v];if(f)var w=Uo(n),_=Ln(b,w);if(i&&(b=so(b,i,o,f)),s&&(b=ao(b,s,a,f)),g-=_,f&&g<u){var x=Un(b,w);return Co(e,t,wo,n.placeholder,r,b,x,l,c,u-g)}var E=p?r:this,k=h?E[e]:e;return g=b.length,l?b=ls(b,l):m&&g>1&&b.reverse(),d&&c<g&&(b.length=c),this&&this!==Vt&&this instanceof n&&(k=y||bo(k)),k.apply(E,b)}}function _o(e,t){return function(n,r){return function(e,t,n,r){return Xr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function xo(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=Hi(r),i=Hi(i)):(r=Ui(r),i=Ui(i)),o=e(r,i)}return o}}function Eo(e){return zo((function(t){return t=dn(t,An(Ho())),Ai((function(n){var r=this;return e(t,(function(e){return nn(e,r,n)}))}))}))}function ko(e,t){var r=(t=t===n?" ":Hi(t)).length;if(r<2)return r?Si(t,e):t;var i=Si(t,qt(e/Vn(t)));return Rn(t)?eo(Wn(i),0,e).join(""):i.slice(0,e)}function Mo(e){return function(t,r,i){return i&&"number"!=typeof i&&Xo(t,r,i)&&(r=i=n),t=Ka(t),r===n?(r=t,t=0):r=Ka(r),function(e,t,n,r){for(var i=-1,o=Jn(qt((t-e)/(n||1)),0),s=Xe(o);o--;)s[r?o:++i]=e,e+=n;return s}(t,r,i=i===n?t<r?1:-1:Ka(i),e)}}function Do(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Qa(t),n=Qa(n)),e(t,n)}}function Co(e,t,r,i,o,s,a,l,c,u){var d=t&v;t|=d?_:x,(t&=~(d?x:_))&y||(t&=~(g|b));var p=[e,t,o,d?s:n,d?a:n,d?n:s,d?n:a,l,c,u],h=r.apply(n,p);return ts(e)&&us(h,p),h.placeholder=i,hs(h,e,t)}function So(e){var t=rt[e];return function(e,n){if(e=Qa(e),(n=null==n?0:Zn(Ga(n),292))&&kn(e)){var r=(Za(e)+"e").split("e");return+((r=(Za(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Ao=sr&&1/Hn(new sr([,-0]))[1]==I?function(e){return new sr(e)}:Hl;function No(e){return function(t){var n=Go(t);return n==Q?Bn(t):n==re?$n(t):function(e,t){return dn(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Oo(e,t,r,i,o,a,l,c){var d=t&b;if(!d&&"function"!=typeof e)throw new at(s);var p=i?i.length:0;if(p||(t&=~(_|x),i=o=n),l=l===n?l:Jn(Ga(l),0),c=c===n?c:Ga(c),p-=o?o.length:0,t&x){var h=i,f=o;i=o=n}var m=d?n:Bo(e),M=[e,t,r,i,o,h,f,a,l,c];if(m&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|b|E),s=r==E&&n==v||r==E&&n==k&&e[7].length<=t[8]||r==(E|k)&&t[7].length<=t[8]&&n==v;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:y);var a=t[3];if(a){var l=e[3];e[3]=l?so(l,a,t[4]):a,e[4]=l?Un(e[3],u):t[4]}(a=t[5])&&(l=e[5],e[5]=l?ao(l,a,t[6]):a,e[6]=l?Un(e[5],u):t[6]);(a=t[7])&&(e[7]=a);r&E&&(e[8]=null==e[8]?t[8]:Zn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(M,m),e=M[0],t=M[1],r=M[2],i=M[3],o=M[4],!(c=M[9]=M[9]===n?d?0:e.length:Jn(M[9]-p,0))&&t&(v|w)&&(t&=~(v|w)),t&&t!=g)D=t==v||t==w?function(e,t,r){var i=bo(e);return function o(){for(var s=arguments.length,a=Xe(s),l=s,c=Uo(o);l--;)a[l]=arguments[l];var u=s<3&&a[0]!==c&&a[s-1]!==c?[]:Un(a,c);return(s-=u.length)<r?Co(e,t,wo,o.placeholder,n,a,u,n,n,r-s):nn(this&&this!==Vt&&this instanceof o?i:e,this,a)}}(e,t,c):t!=_&&t!=(g|_)||o.length?wo.apply(n,M):function(e,t,n,r){var i=t&g,o=bo(e);return function t(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=Xe(c+a),d=this&&this!==Vt&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return nn(d,i?n:this,u)}}(e,t,r,i);else var D=function(e,t,n){var r=t&g,i=bo(e);return function t(){return(this&&this!==Vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return hs((m?Ii:us)(D,M),e,t)}function To(e,t,r,i){return e===n||wa(e,ut[r])&&!ht.call(i,r)?t:e}function Io(e,t,r,i,o,s){return La(e)&&La(t)&&(s.set(t,e),_i(e,t,n,Io,s),s["delete"](t)),e}function Lo(e){return Ra(e)?n:e}function Fo(e,t,r,i,o,s){var a=r&f,l=e.length,c=t.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var p=-1,h=!0,g=r&m?new Cr:n;for(s.set(e,t),s.set(t,e);++p<l;){var b=e[p],y=t[p];if(i)var v=a?i(y,b,p,t,e,s):i(b,y,p,e,t,s);if(v!==n){if(v)continue;h=!1;break}if(g){if(!mn(t,(function(e,t){if(!On(g,t)&&(b===e||o(b,e,r,i,s)))return g.push(t)}))){h=!1;break}}else if(b!==y&&!o(b,y,r,i,s)){h=!1;break}}return s["delete"](e),s["delete"](t),h}function zo(e){return ps(ss(e,n,Ms),e+"")}function jo(e){return ri(e,dl,qo)}function Ro(e){return ri(e,pl,Ko)}var Bo=cr?function(e){return cr.get(e)}:Hl;function Po(e){for(var t=e.name+"",n=ur[t],r=ht.call(ur,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Uo(e){return(ht.call(vr,"placeholder")?vr:e).placeholder}function Ho(){var e=vr.iteratee||Rl;return e=e===Rl?fi:e,arguments.length?e(arguments[0],arguments[1]):e}function $o(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Vo(e){for(var t=dl(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,is(i)]}return t}function Wo(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return hi(r)?r:n}var qo=Yt?function(e){return null==e?[]:(e=it(e),ln(Yt(e),(function(t){return Dt.call(e,t)})))}:Yl,Ko=Yt?function(e){for(var t=[];e;)pn(t,qo(e)),e=kt(e);return t}:Yl,Go=ii;function Yo(e,t,n){for(var r=-1,i=(t=Zi(t,e)).length,o=!1;++r<i;){var s=bs(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ia(i)&&Zo(s,i)&&(ka(e)||Ea(e))}function Qo(e){return"function"!=typeof e.constructor||rs(e)?{}:wr(kt(e))}function Jo(e){return ka(e)||Ea(e)||!!(St&&e&&e[St])}function Zo(e,t){var n=typeof e;return!!(t=null==t?L:t)&&("number"==n||"symbol"!=n&&Ye.test(e))&&e>-1&&e%1==0&&e<t}function Xo(e,t,n){if(!La(n))return!1;var r=typeof t;return!!("number"==r?Da(n)&&Zo(t,n.length):"string"==r&&t in n)&&wa(n[t],e)}function es(e,t){if(ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ha(e))||(Oe.test(e)||!Ne.test(e)||null!=t&&e in it(t))}function ts(e){var t=Po(e),n=vr[t];if("function"!=typeof n||!(t in Er.prototype))return!1;if(e===n)return!0;var r=Bo(n);return!!r&&e===r[0]}(rr&&Go(new rr(new ArrayBuffer(1)))!=ue||ir&&Go(new ir)!=Q||or&&Go(or.resolve())!=ee||sr&&Go(new sr)!=re||ar&&Go(new ar)!=ae)&&(Go=function(e){var t=ii(e),r=t==X?e.constructor:n,i=r?ys(r):"";if(i)switch(i){case dr:return ue;case pr:return Q;case hr:return ee;case fr:return re;case mr:return ae}return t});var ns=dt?Oa:Ql;function rs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function is(e){return e==e&&!La(e)}function os(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in it(r)))}}function ss(e,t,r){return t=Jn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Jn(n.length-t,0),s=Xe(o);++i<o;)s[i]=n[t+i];i=-1;for(var a=Xe(t+1);++i<t;)a[i]=n[i];return a[t]=r(s),nn(e,this,a)}}function as(e,t){return t.length<2?e:ni(e,zi(t,0,-1))}function ls(e,t){for(var r=e.length,i=Zn(t.length,r),o=lo(e);i--;){var s=t[i];e[i]=Zo(s,r)?o[s]:n}return e}function cs(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var us=fs(Ii),ds=Wt||function(e,t){return Vt.setTimeout(e,t)},ps=fs(Li);function hs(e,t,n){var r=t+"";return ps(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(je,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return on(P,(function(n){var r="_."+n[0];t&n[1]&&!cn(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Re);return t?t[1].split(Be):[]}(r),n)))}function fs(e){var t=0,r=0;return function(){var i=Xn(),o=A-(i-r);if(r=i,o>0){if(++t>=S)return arguments[0]}else t=0;return e.apply(n,arguments)}}function ms(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var s=Ci(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var gs=function(e){var t=fa(e,(function(e){return n.size===c&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Te,(function(e,n,r,i){t.push(r?i.replace(He,"$1"):n||e)})),t}));function bs(e){if("string"==typeof e||Ha(e))return e;var t=e+"";return"0"==t&&1/e==-I?"-0":t}function ys(e){if(null!=e){try{return pt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function vs(e){if(e instanceof Er)return e.clone();var t=new xr(e.__wrapped__,e.__chain__);return t.__actions__=lo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ws=Ai((function(e,t){return Ca(e)?Vr(e,Qr(t,1,Ca,!0)):[]})),_s=Ai((function(e,t){var r=Ns(t);return Ca(r)&&(r=n),Ca(e)?Vr(e,Qr(t,1,Ca,!0),Ho(r,2)):[]})),xs=Ai((function(e,t){var r=Ns(t);return Ca(r)&&(r=n),Ca(e)?Vr(e,Qr(t,1,Ca,!0),n,r):[]}));function Es(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ga(n);return i<0&&(i=Jn(r+i,0)),yn(e,Ho(t,3),i)}function ks(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=Ga(r),o=r<0?Jn(i+o,0):Zn(o,i-1)),yn(e,Ho(t,3),o,!0)}function Ms(e){return(null==e?0:e.length)?Qr(e,1):[]}function Ds(e){return e&&e.length?e[0]:n}var Cs=Ai((function(e){var t=dn(e,Qi);return t.length&&t[0]===e[0]?li(t):[]})),Ss=Ai((function(e){var t=Ns(e),r=dn(e,Qi);return t===Ns(r)?t=n:r.pop(),r.length&&r[0]===e[0]?li(r,Ho(t,2)):[]})),As=Ai((function(e){var t=Ns(e),r=dn(e,Qi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?li(r,n,t):[]}));function Ns(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Os=Ai(Ts);function Ts(e,t){return e&&e.length&&t&&t.length?Mi(e,t):e}var Is=zo((function(e,t){var n=null==e?0:e.length,r=Br(e,t);return Di(e,dn(t,(function(e){return Zo(e,n)?+e:e})).sort(oo)),r}));function Ls(e){return null==e?e:nr.call(e)}var Fs=Ai((function(e){return $i(Qr(e,1,Ca,!0))})),zs=Ai((function(e){var t=Ns(e);return Ca(t)&&(t=n),$i(Qr(e,1,Ca,!0),Ho(t,2))})),js=Ai((function(e){var t=Ns(e);return t="function"==typeof t?t:n,$i(Qr(e,1,Ca,!0),n,t)}));function Rs(e){if(!e||!e.length)return[];var t=0;return e=ln(e,(function(e){if(Ca(e))return t=Jn(e.length,t),!0})),Cn(t,(function(t){return dn(e,En(t))}))}function Bs(e,t){if(!e||!e.length)return[];var r=Rs(e);return null==t?r:dn(r,(function(e){return nn(t,n,e)}))}var Ps=Ai((function(e,t){return Ca(e)?Vr(e,t):[]})),Us=Ai((function(e){return Gi(ln(e,Ca))})),Hs=Ai((function(e){var t=Ns(e);return Ca(t)&&(t=n),Gi(ln(e,Ca),Ho(t,2))})),$s=Ai((function(e){var t=Ns(e);return t="function"==typeof t?t:n,Gi(ln(e,Ca),n,t)})),Vs=Ai(Rs);var Ws=Ai((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,Bs(e,r)}));function qs(e){var t=vr(e);return t.__chain__=!0,t}function Ks(e,t){return t(e)}var Gs=zo((function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return Br(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Er&&Zo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:Ks,args:[o],thisArg:n}),new xr(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)}));var Ys=uo((function(e,t,n){ht.call(e,n)?++e[n]:Rr(e,n,1)}));var Qs=yo(Es),Js=yo(ks);function Zs(e,t){return(ka(e)?on:Wr)(e,Ho(t,3))}function Xs(e,t){return(ka(e)?sn:qr)(e,Ho(t,3))}var ea=uo((function(e,t,n){ht.call(e,n)?e[n].push(t):Rr(e,n,[t])}));var ta=Ai((function(e,t,n){var r=-1,i="function"==typeof t,o=Da(e)?Xe(e.length):[];return Wr(e,(function(e){o[++r]=i?nn(t,e,n):ci(e,t,n)})),o})),na=uo((function(e,t,n){Rr(e,n,t)}));function ra(e,t){return(ka(e)?dn:yi)(e,Ho(t,3))}var ia=uo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var oa=Ai((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Xo(e,t[0],t[1])?t=[]:n>2&&Xo(t[0],t[1],t[2])&&(t=[t[0]]),Ei(e,Qr(t,1),[])})),sa=$t||function(){return Vt.Date.now()};function aa(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Oo(e,E,n,n,n,n,t)}function la(e,t){var r;if("function"!=typeof t)throw new at(s);return e=Ga(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var ca=Ai((function(e,t,n){var r=g;if(n.length){var i=Un(n,Uo(ca));r|=_}return Oo(e,r,t,n,i)})),ua=Ai((function(e,t,n){var r=g|b;if(n.length){var i=Un(n,Uo(ua));r|=_}return Oo(t,r,e,n,i)}));function da(e,t,r){var i,o,a,l,c,u,d=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new at(s);function m(t){var r=i,s=o;return i=o=n,d=t,l=e.apply(s,r)}function g(e){return d=e,c=ds(y,t),p?m(e):l}function b(e){var r=e-u;return u===n||r>=t||r<0||h&&e-d>=a}function y(){var e=sa();if(b(e))return v(e);c=ds(y,function(e){var n=t-(e-u);return h?Zn(n,a-(e-d)):n}(e))}function v(e){return c=n,f&&i?m(e):(i=o=n,l)}function w(){var e=sa(),r=b(e);if(i=arguments,o=this,u=e,r){if(c===n)return g(u);if(h)return to(c),c=ds(y,t),m(u)}return c===n&&(c=ds(y,t)),l}return t=Qa(t)||0,La(r)&&(p=!!r.leading,a=(h="maxWait"in r)?Jn(Qa(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f),w.cancel=function(){c!==n&&to(c),d=0,i=u=o=c=n},w.flush=function(){return c===n?l:v(sa())},w}var pa=Ai((function(e,t){return $r(e,1,t)})),ha=Ai((function(e,t,n){return $r(e,Qa(t)||0,n)}));function fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new at(s);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(fa.Cache||Dr),n}function ma(e){if("function"!=typeof e)throw new at(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}fa.Cache=Dr;var ga=Xi((function(e,t){var n=(t=1==t.length&&ka(t[0])?dn(t[0],An(Ho())):dn(Qr(t,1),An(Ho()))).length;return Ai((function(r){for(var i=-1,o=Zn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return nn(e,this,r)}))})),ba=Ai((function(e,t){var r=Un(t,Uo(ba));return Oo(e,_,n,t,r)})),ya=Ai((function(e,t){var r=Un(t,Uo(ya));return Oo(e,x,n,t,r)})),va=zo((function(e,t){return Oo(e,k,n,n,n,t)}));function wa(e,t){return e===t||e!=e&&t!=t}var _a=Do(oi),xa=Do((function(e,t){return e>=t})),Ea=ui(function(){return arguments}())?ui:function(e){return Fa(e)&&ht.call(e,"callee")&&!Dt.call(e,"callee")},ka=Xe.isArray,Ma=Qt?An(Qt):function(e){return Fa(e)&&ii(e)==ce};function Da(e){return null!=e&&Ia(e.length)&&!Oa(e)}function Ca(e){return Fa(e)&&Da(e)}var Sa=gn||Ql,Aa=Jt?An(Jt):function(e){return Fa(e)&&ii(e)==W};function Na(e){if(!Fa(e))return!1;var t=ii(e);return t==K||t==q||"string"==typeof e.message&&"string"==typeof e.name&&!Ra(e)}function Oa(e){if(!La(e))return!1;var t=ii(e);return t==G||t==Y||t==$||t==te}function Ta(e){return"number"==typeof e&&e==Ga(e)}function Ia(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=L}function La(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Fa(e){return null!=e&&"object"==typeof e}var za=Zt?An(Zt):function(e){return Fa(e)&&Go(e)==Q};function ja(e){return"number"==typeof e||Fa(e)&&ii(e)==J}function Ra(e){if(!Fa(e)||ii(e)!=X)return!1;var t=kt(e);if(null===t)return!0;var n=ht.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&pt.call(n)==bt}var Ba=Xt?An(Xt):function(e){return Fa(e)&&ii(e)==ne};var Pa=en?An(en):function(e){return Fa(e)&&Go(e)==re};function Ua(e){return"string"==typeof e||!ka(e)&&Fa(e)&&ii(e)==ie}function Ha(e){return"symbol"==typeof e||Fa(e)&&ii(e)==oe}var $a=tn?An(tn):function(e){return Fa(e)&&Ia(e.length)&&!!jt[ii(e)]};var Va=Do(bi),Wa=Do((function(e,t){return e<=t}));function qa(e){if(!e)return[];if(Da(e))return Ua(e)?Wn(e):lo(e);if(Ot&&e[Ot])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ot]());var t=Go(e);return(t==Q?Bn:t==re?Hn:wl)(e)}function Ka(e){return e?(e=Qa(e))===I||e===-I?(e<0?-1:1)*F:e==e?e:0:0===e?e:0}function Ga(e){var t=Ka(e),n=t%1;return t==t?n?t-n:t:0}function Ya(e){return e?Pr(Ga(e),0,j):0}function Qa(e){if("number"==typeof e)return e;if(Ha(e))return z;if(La(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=La(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Sn(e);var n=qe.test(e);return n||Ge.test(e)?Ut(e.slice(2),n?2:8):We.test(e)?z:+e}function Ja(e){return co(e,pl(e))}function Za(e){return null==e?"":Hi(e)}var Xa=po((function(e,t){if(rs(t)||Da(t))co(t,dl(t),e);else for(var n in t)ht.call(t,n)&&Lr(e,n,t[n])})),el=po((function(e,t){co(t,pl(t),e)})),tl=po((function(e,t,n,r){co(t,pl(t),e,r)})),nl=po((function(e,t,n,r){co(t,dl(t),e,r)})),rl=zo(Br);var il=Ai((function(e,t){e=it(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&Xo(t[0],t[1],o)&&(i=1);++r<i;)for(var s=t[r],a=pl(s),l=-1,c=a.length;++l<c;){var u=a[l],d=e[u];(d===n||wa(d,ut[u])&&!ht.call(e,u))&&(e[u]=s[u])}return e})),ol=Ai((function(e){return e.push(n,Io),nn(fl,n,e)}));function sl(e,t,r){var i=null==e?n:ni(e,t);return i===n?r:i}function al(e,t){return null!=e&&Yo(e,t,ai)}var ll=_o((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=gt.call(t)),e[t]=n}),Ll(jl)),cl=_o((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=gt.call(t)),ht.call(e,t)?e[t].push(n):e[t]=[n]}),Ho),ul=Ai(ci);function dl(e){return Da(e)?Ar(e):mi(e)}function pl(e){return Da(e)?Ar(e,!0):gi(e)}var hl=po((function(e,t,n){_i(e,t,n)})),fl=po((function(e,t,n,r){_i(e,t,n,r)})),ml=zo((function(e,t){var n={};if(null==e)return n;var r=!1;t=dn(t,(function(t){return t=Zi(t,e),r||(r=t.length>1),t})),co(e,Ro(e),n),r&&(n=Ur(n,d|p|h,Lo));for(var i=t.length;i--;)Vi(n,t[i]);return n}));var gl=zo((function(e,t){return null==e?{}:function(e,t){return ki(e,t,(function(t,n){return al(e,n)}))}(e,t)}));function bl(e,t){if(null==e)return{};var n=dn(Ro(e),(function(e){return[e]}));return t=Ho(t),ki(e,n,(function(e,n){return t(e,n[0])}))}var yl=No(dl),vl=No(pl);function wl(e){return null==e?[]:Nn(e,dl(e))}var _l=go((function(e,t,n){return t=t.toLowerCase(),e+(n?xl(t):t)}));function xl(e){return Nl(Za(e).toLowerCase())}function El(e){return(e=Za(e))&&e.replace(Qe,Fn).replace(Nt,"")}var kl=go((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ml=go((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Dl=mo("toLowerCase");var Cl=go((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Sl=go((function(e,t,n){return e+(n?" ":"")+Nl(t)}));var Al=go((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Nl=mo("toUpperCase");function Ol(e,t,r){return e=Za(e),(t=r?n:t)===n?function(e){return Lt.test(e)}(e)?function(e){return e.match(Tt)||[]}(e):function(e){return e.match(Pe)||[]}(e):e.match(t)||[]}var Tl=Ai((function(e,t){try{return nn(e,n,t)}catch(e){return Na(e)?e:new tt(e)}})),Il=zo((function(e,t){return on(t,(function(t){t=bs(t),Rr(e,t,ca(e[t],e))})),e}));function Ll(e){return function(){return e}}var Fl=vo(),zl=vo(!0);function jl(e){return e}function Rl(e){return fi("function"==typeof e?e:Ur(e,d))}var Bl=Ai((function(e,t){return function(n){return ci(n,e,t)}})),Pl=Ai((function(e,t){return function(n){return ci(e,n,t)}}));function Ul(e,t,n){var r=dl(t),i=ti(t,r);null!=n||La(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=ti(t,dl(t)));var o=!(La(n)&&"chain"in n&&!n.chain),s=Oa(e);return on(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=lo(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pn([this.value()],arguments))})})),e}function Hl(){}var $l=Eo(dn),Vl=Eo(an),Wl=Eo(mn);function ql(e){return es(e)?En(bs(e)):function(e){return function(t){return ni(t,e)}}(e)}var Kl=Mo(),Gl=Mo(!0);function Yl(){return[]}function Ql(){return!1}var Jl=xo((function(e,t){return e+t}),0),Zl=So("ceil"),Xl=xo((function(e,t){return e/t}),1),ec=So("floor");var tc=xo((function(e,t){return e*t}),1),nc=So("round"),rc=xo((function(e,t){return e-t}),0);return vr.after=function(e,t){if("function"!=typeof t)throw new at(s);return e=Ga(e),function(){if(--e<1)return t.apply(this,arguments)}},vr.ary=aa,vr.assign=Xa,vr.assignIn=el,vr.assignInWith=tl,vr.assignWith=nl,vr.at=rl,vr.before=la,vr.bind=ca,vr.bindAll=Il,vr.bindKey=ua,vr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ka(e)?e:[e]},vr.chain=qs,vr.chunk=function(e,t,r){t=(r?Xo(e,t,r):t===n)?1:Jn(Ga(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,a=Xe(qt(i/t));o<i;)a[s++]=zi(e,o,o+=t);return a},vr.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},vr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Xe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return pn(ka(n)?lo(n):[n],Qr(t,1))},vr.cond=function(e){var t=null==e?0:e.length,n=Ho();return e=t?dn(e,(function(e){if("function"!=typeof e[1])throw new at(s);return[n(e[0]),e[1]]})):[],Ai((function(n){for(var r=-1;++r<t;){var i=e[r];if(nn(i[0],this,n))return nn(i[1],this,n)}}))},vr.conforms=function(e){return function(e){var t=dl(e);return function(n){return Hr(n,e,t)}}(Ur(e,d))},vr.constant=Ll,vr.countBy=Ys,vr.create=function(e,t){var n=wr(e);return null==t?n:jr(n,t)},vr.curry=function e(t,r,i){var o=Oo(t,v,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},vr.curryRight=function e(t,r,i){var o=Oo(t,w,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},vr.debounce=da,vr.defaults=il,vr.defaultsDeep=ol,vr.defer=pa,vr.delay=ha,vr.difference=ws,vr.differenceBy=_s,vr.differenceWith=xs,vr.drop=function(e,t,r){var i=null==e?0:e.length;return i?zi(e,(t=r||t===n?1:Ga(t))<0?0:t,i):[]},vr.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?zi(e,0,(t=i-(t=r||t===n?1:Ga(t)))<0?0:t):[]},vr.dropRightWhile=function(e,t){return e&&e.length?qi(e,Ho(t,3),!0,!0):[]},vr.dropWhile=function(e,t){return e&&e.length?qi(e,Ho(t,3),!0):[]},vr.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&Xo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=Ga(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:Ga(i))<0&&(i+=o),i=r>i?0:Ya(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},vr.filter=function(e,t){return(ka(e)?ln:Yr)(e,Ho(t,3))},vr.flatMap=function(e,t){return Qr(ra(e,t),1)},vr.flatMapDeep=function(e,t){return Qr(ra(e,t),I)},vr.flatMapDepth=function(e,t,r){return r=r===n?1:Ga(r),Qr(ra(e,t),r)},vr.flatten=Ms,vr.flattenDeep=function(e){return(null==e?0:e.length)?Qr(e,I):[]},vr.flattenDepth=function(e,t){return(null==e?0:e.length)?Qr(e,t=t===n?1:Ga(t)):[]},vr.flip=function(e){return Oo(e,M)},vr.flow=Fl,vr.flowRight=zl,vr.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},vr.functions=function(e){return null==e?[]:ti(e,dl(e))},vr.functionsIn=function(e){return null==e?[]:ti(e,pl(e))},vr.groupBy=ea,vr.initial=function(e){return(null==e?0:e.length)?zi(e,0,-1):[]},vr.intersection=Cs,vr.intersectionBy=Ss,vr.intersectionWith=As,vr.invert=ll,vr.invertBy=cl,vr.invokeMap=ta,vr.iteratee=Rl,vr.keyBy=na,vr.keys=dl,vr.keysIn=pl,vr.map=ra,vr.mapKeys=function(e,t){var n={};return t=Ho(t,3),Xr(e,(function(e,r,i){Rr(n,t(e,r,i),e)})),n},vr.mapValues=function(e,t){var n={};return t=Ho(t,3),Xr(e,(function(e,r,i){Rr(n,r,t(e,r,i))})),n},vr.matches=function(e){return vi(Ur(e,d))},vr.matchesProperty=function(e,t){return wi(e,Ur(t,d))},vr.memoize=fa,vr.merge=hl,vr.mergeWith=fl,vr.method=Bl,vr.methodOf=Pl,vr.mixin=Ul,vr.negate=ma,vr.nthArg=function(e){return e=Ga(e),Ai((function(t){return xi(t,e)}))},vr.omit=ml,vr.omitBy=function(e,t){return bl(e,ma(Ho(t)))},vr.once=function(e){return la(2,e)},vr.orderBy=function(e,t,r,i){return null==e?[]:(ka(t)||(t=null==t?[]:[t]),ka(r=i?n:r)||(r=null==r?[]:[r]),Ei(e,t,r))},vr.over=$l,vr.overArgs=ga,vr.overEvery=Vl,vr.overSome=Wl,vr.partial=ba,vr.partialRight=ya,vr.partition=ia,vr.pick=gl,vr.pickBy=bl,vr.property=ql,vr.propertyOf=function(e){return function(t){return null==e?n:ni(e,t)}},vr.pull=Os,vr.pullAll=Ts,vr.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Mi(e,t,Ho(n,2)):e},vr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Mi(e,t,n,r):e},vr.pullAt=Is,vr.range=Kl,vr.rangeRight=Gl,vr.rearg=va,vr.reject=function(e,t){return(ka(e)?ln:Yr)(e,ma(Ho(t,3)))},vr.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Ho(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Di(e,i),n},vr.rest=function(e,t){if("function"!=typeof e)throw new at(s);return Ai(e,t=t===n?t:Ga(t))},vr.reverse=Ls,vr.sampleSize=function(e,t,r){return t=(r?Xo(e,t,r):t===n)?1:Ga(t),(ka(e)?Or:Oi)(e,t)},vr.set=function(e,t,n){return null==e?e:Ti(e,t,n)},vr.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Ti(e,t,r,i)},vr.shuffle=function(e){return(ka(e)?Tr:Fi)(e)},vr.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Xo(e,t,r)?(t=0,r=i):(t=null==t?0:Ga(t),r=r===n?i:Ga(r)),zi(e,t,r)):[]},vr.sortBy=oa,vr.sortedUniq=function(e){return e&&e.length?Pi(e):[]},vr.sortedUniqBy=function(e,t){return e&&e.length?Pi(e,Ho(t,2)):[]},vr.split=function(e,t,r){return r&&"number"!=typeof r&&Xo(e,t,r)&&(t=r=n),(r=r===n?j:r>>>0)?(e=Za(e))&&("string"==typeof t||null!=t&&!Ba(t))&&!(t=Hi(t))&&Rn(e)?eo(Wn(e),0,r):e.split(t,r):[]},vr.spread=function(e,t){if("function"!=typeof e)throw new at(s);return t=null==t?0:Jn(Ga(t),0),Ai((function(n){var r=n[t],i=eo(n,0,t);return r&&pn(i,r),nn(e,this,i)}))},vr.tail=function(e){var t=null==e?0:e.length;return t?zi(e,1,t):[]},vr.take=function(e,t,r){return e&&e.length?zi(e,0,(t=r||t===n?1:Ga(t))<0?0:t):[]},vr.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?zi(e,(t=i-(t=r||t===n?1:Ga(t)))<0?0:t,i):[]},vr.takeRightWhile=function(e,t){return e&&e.length?qi(e,Ho(t,3),!1,!0):[]},vr.takeWhile=function(e,t){return e&&e.length?qi(e,Ho(t,3)):[]},vr.tap=function(e,t){return t(e),e},vr.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new at(s);return La(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),da(e,t,{leading:r,maxWait:t,trailing:i})},vr.thru=Ks,vr.toArray=qa,vr.toPairs=yl,vr.toPairsIn=vl,vr.toPath=function(e){return ka(e)?dn(e,bs):Ha(e)?[e]:lo(gs(Za(e)))},vr.toPlainObject=Ja,vr.transform=function(e,t,n){var r=ka(e),i=r||Sa(e)||$a(e);if(t=Ho(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:La(e)&&Oa(o)?wr(kt(e)):{}}return(i?on:Xr)(e,(function(e,r,i){return t(n,e,r,i)})),n},vr.unary=function(e){return aa(e,1)},vr.union=Fs,vr.unionBy=zs,vr.unionWith=js,vr.uniq=function(e){return e&&e.length?$i(e):[]},vr.uniqBy=function(e,t){return e&&e.length?$i(e,Ho(t,2)):[]},vr.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?$i(e,n,t):[]},vr.unset=function(e,t){return null==e||Vi(e,t)},vr.unzip=Rs,vr.unzipWith=Bs,vr.update=function(e,t,n){return null==e?e:Wi(e,t,Ji(n))},vr.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Wi(e,t,Ji(r),i)},vr.values=wl,vr.valuesIn=function(e){return null==e?[]:Nn(e,pl(e))},vr.without=Ps,vr.words=Ol,vr.wrap=function(e,t){return ba(Ji(t),e)},vr.xor=Us,vr.xorBy=Hs,vr.xorWith=$s,vr.zip=Vs,vr.zipObject=function(e,t){return Yi(e||[],t||[],Lr)},vr.zipObjectDeep=function(e,t){return Yi(e||[],t||[],Ti)},vr.zipWith=Ws,vr.entries=yl,vr.entriesIn=vl,vr.extend=el,vr.extendWith=tl,Ul(vr,vr),vr.add=Jl,vr.attempt=Tl,vr.camelCase=_l,vr.capitalize=xl,vr.ceil=Zl,vr.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=Qa(r))==r?r:0),t!==n&&(t=(t=Qa(t))==t?t:0),Pr(Qa(e),t,r)},vr.clone=function(e){return Ur(e,h)},vr.cloneDeep=function(e){return Ur(e,d|h)},vr.cloneDeepWith=function(e,t){return Ur(e,d|h,t="function"==typeof t?t:n)},vr.cloneWith=function(e,t){return Ur(e,h,t="function"==typeof t?t:n)},vr.conformsTo=function(e,t){return null==t||Hr(e,t,dl(t))},vr.deburr=El,vr.defaultTo=function(e,t){return null==e||e!=e?t:e},vr.divide=Xl,vr.endsWith=function(e,t,r){e=Za(e),t=Hi(t);var i=e.length,o=r=r===n?i:Pr(Ga(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},vr.eq=wa,vr.escape=function(e){return(e=Za(e))&&De.test(e)?e.replace(ke,zn):e},vr.escapeRegExp=function(e){return(e=Za(e))&&Le.test(e)?e.replace(Ie,"\\$&"):e},vr.every=function(e,t,r){var i=ka(e)?an:Kr;return r&&Xo(e,t,r)&&(t=n),i(e,Ho(t,3))},vr.find=Qs,vr.findIndex=Es,vr.findKey=function(e,t){return bn(e,Ho(t,3),Xr)},vr.findLast=Js,vr.findLastIndex=ks,vr.findLastKey=function(e,t){return bn(e,Ho(t,3),ei)},vr.floor=ec,vr.forEach=Zs,vr.forEachRight=Xs,vr.forIn=function(e,t){return null==e?e:Jr(e,Ho(t,3),pl)},vr.forInRight=function(e,t){return null==e?e:Zr(e,Ho(t,3),pl)},vr.forOwn=function(e,t){return e&&Xr(e,Ho(t,3))},vr.forOwnRight=function(e,t){return e&&ei(e,Ho(t,3))},vr.get=sl,vr.gt=_a,vr.gte=xa,vr.has=function(e,t){return null!=e&&Yo(e,t,si)},vr.hasIn=al,vr.head=Ds,vr.identity=jl,vr.includes=function(e,t,n,r){e=Da(e)?e:wl(e),n=n&&!r?Ga(n):0;var i=e.length;return n<0&&(n=Jn(i+n,0)),Ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&vn(e,t,n)>-1},vr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ga(n);return i<0&&(i=Jn(r+i,0)),vn(e,t,i)},vr.inRange=function(e,t,r){return t=Ka(t),r===n?(r=t,t=0):r=Ka(r),function(e,t,n){return e>=Zn(t,n)&&e<Jn(t,n)}(e=Qa(e),t,r)},vr.invoke=ul,vr.isArguments=Ea,vr.isArray=ka,vr.isArrayBuffer=Ma,vr.isArrayLike=Da,vr.isArrayLikeObject=Ca,vr.isBoolean=function(e){return!0===e||!1===e||Fa(e)&&ii(e)==V},vr.isBuffer=Sa,vr.isDate=Aa,vr.isElement=function(e){return Fa(e)&&1===e.nodeType&&!Ra(e)},vr.isEmpty=function(e){if(null==e)return!0;if(Da(e)&&(ka(e)||"string"==typeof e||"function"==typeof e.splice||Sa(e)||$a(e)||Ea(e)))return!e.length;var t=Go(e);if(t==Q||t==re)return!e.size;if(rs(e))return!mi(e).length;for(var n in e)if(ht.call(e,n))return!1;return!0},vr.isEqual=function(e,t){return di(e,t)},vr.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?di(e,t,n,r):!!i},vr.isError=Na,vr.isFinite=function(e){return"number"==typeof e&&kn(e)},vr.isFunction=Oa,vr.isInteger=Ta,vr.isLength=Ia,vr.isMap=za,vr.isMatch=function(e,t){return e===t||pi(e,t,Vo(t))},vr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,pi(e,t,Vo(t),r)},vr.isNaN=function(e){return ja(e)&&e!=+e},vr.isNative=function(e){if(ns(e))throw new tt(o);return hi(e)},vr.isNil=function(e){return null==e},vr.isNull=function(e){return null===e},vr.isNumber=ja,vr.isObject=La,vr.isObjectLike=Fa,vr.isPlainObject=Ra,vr.isRegExp=Ba,vr.isSafeInteger=function(e){return Ta(e)&&e>=-L&&e<=L},vr.isSet=Pa,vr.isString=Ua,vr.isSymbol=Ha,vr.isTypedArray=$a,vr.isUndefined=function(e){return e===n},vr.isWeakMap=function(e){return Fa(e)&&Go(e)==ae},vr.isWeakSet=function(e){return Fa(e)&&ii(e)==le},vr.join=function(e,t){return null==e?"":Yn.call(e,t)},vr.kebabCase=kl,vr.last=Ns,vr.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=Ga(r))<0?Jn(i+o,0):Zn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):yn(e,_n,o,!0)},vr.lowerCase=Ml,vr.lowerFirst=Dl,vr.lt=Va,vr.lte=Wa,vr.max=function(e){return e&&e.length?Gr(e,jl,oi):n},vr.maxBy=function(e,t){return e&&e.length?Gr(e,Ho(t,2),oi):n},vr.mean=function(e){return xn(e,jl)},vr.meanBy=function(e,t){return xn(e,Ho(t,2))},vr.min=function(e){return e&&e.length?Gr(e,jl,bi):n},vr.minBy=function(e,t){return e&&e.length?Gr(e,Ho(t,2),bi):n},vr.stubArray=Yl,vr.stubFalse=Ql,vr.stubObject=function(){return{}},vr.stubString=function(){return""},vr.stubTrue=function(){return!0},vr.multiply=tc,vr.nth=function(e,t){return e&&e.length?xi(e,Ga(t)):n},vr.noConflict=function(){return Vt._===this&&(Vt._=yt),this},vr.noop=Hl,vr.now=sa,vr.pad=function(e,t,n){e=Za(e);var r=(t=Ga(t))?Vn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ko(Gt(i),n)+e+ko(qt(i),n)},vr.padEnd=function(e,t,n){e=Za(e);var r=(t=Ga(t))?Vn(e):0;return t&&r<t?e+ko(t-r,n):e},vr.padStart=function(e,t,n){e=Za(e);var r=(t=Ga(t))?Vn(e):0;return t&&r<t?ko(t-r,n)+e:e},vr.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),er(Za(e).replace(Fe,""),t||0)},vr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Xo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=Ka(e),t===n?(t=e,e=0):t=Ka(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=tr();return Zn(e+o*(t-e+Pt("1e-"+((o+"").length-1))),t)}return Ci(e,t)},vr.reduce=function(e,t,n){var r=ka(e)?hn:Mn,i=arguments.length<3;return r(e,Ho(t,4),n,i,Wr)},vr.reduceRight=function(e,t,n){var r=ka(e)?fn:Mn,i=arguments.length<3;return r(e,Ho(t,4),n,i,qr)},vr.repeat=function(e,t,r){return t=(r?Xo(e,t,r):t===n)?1:Ga(t),Si(Za(e),t)},vr.replace=function(){var e=arguments,t=Za(e[0]);return e.length<3?t:t.replace(e[1],e[2])},vr.result=function(e,t,r){var i=-1,o=(t=Zi(t,e)).length;for(o||(o=1,e=n);++i<o;){var s=null==e?n:e[bs(t[i])];s===n&&(i=o,s=r),e=Oa(s)?s.call(e):s}return e},vr.round=nc,vr.runInContext=e,vr.sample=function(e){return(ka(e)?Nr:Ni)(e)},vr.size=function(e){if(null==e)return 0;if(Da(e))return Ua(e)?Vn(e):e.length;var t=Go(e);return t==Q||t==re?e.size:mi(e).length},vr.snakeCase=Cl,vr.some=function(e,t,r){var i=ka(e)?mn:ji;return r&&Xo(e,t,r)&&(t=n),i(e,Ho(t,3))},vr.sortedIndex=function(e,t){return Ri(e,t)},vr.sortedIndexBy=function(e,t,n){return Bi(e,t,Ho(n,2))},vr.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Ri(e,t);if(r<n&&wa(e[r],t))return r}return-1},vr.sortedLastIndex=function(e,t){return Ri(e,t,!0)},vr.sortedLastIndexBy=function(e,t,n){return Bi(e,t,Ho(n,2),!0)},vr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Ri(e,t,!0)-1;if(wa(e[n],t))return n}return-1},vr.startCase=Sl,vr.startsWith=function(e,t,n){return e=Za(e),n=null==n?0:Pr(Ga(n),0,e.length),t=Hi(t),e.slice(n,n+t.length)==t},vr.subtract=rc,vr.sum=function(e){return e&&e.length?Dn(e,jl):0},vr.sumBy=function(e,t){return e&&e.length?Dn(e,Ho(t,2)):0},vr.template=function(e,t,r){var i=vr.templateSettings;r&&Xo(e,t,r)&&(t=n),e=Za(e),t=tl({},t,i,To);var o,s,l=tl({},t.imports,i.imports,To),c=dl(l),u=Nn(l,c),d=0,p=t.interpolate||Je,h="__p += '",f=ot((t.escape||Je).source+"|"+p.source+"|"+(p===Ae?$e:Je).source+"|"+(t.evaluate||Je).source+"|$","g"),m="//# sourceURL="+(ht.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zt+"]")+"\n";e.replace(f,(function(t,n,r,i,a,l){return r||(r=i),h+=e.slice(d,l).replace(Ze,jn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),h+="';\n";var g=ht.call(t,"variable")&&t.variable;if(g){if(Ue.test(g))throw new tt(a)}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(we,""):h).replace(_e,"$1").replace(xe,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var b=Tl((function(){return nt(c,m+"return "+h).apply(n,u)}));if(b.source=h,Na(b))throw b;return b},vr.times=function(e,t){if((e=Ga(e))<1||e>L)return[];var n=j,r=Zn(e,j);t=Ho(t),e-=j;for(var i=Cn(r,t);++n<e;)t(n);return i},vr.toFinite=Ka,vr.toInteger=Ga,vr.toLength=Ya,vr.toLower=function(e){return Za(e).toLowerCase()},vr.toNumber=Qa,vr.toSafeInteger=function(e){return e?Pr(Ga(e),-L,L):0===e?e:0},vr.toString=Za,vr.toUpper=function(e){return Za(e).toUpperCase()},vr.trim=function(e,t,r){if((e=Za(e))&&(r||t===n))return Sn(e);if(!e||!(t=Hi(t)))return e;var i=Wn(e),o=Wn(t);return eo(i,Tn(i,o),In(i,o)+1).join("")},vr.trimEnd=function(e,t,r){if((e=Za(e))&&(r||t===n))return e.slice(0,qn(e)+1);if(!e||!(t=Hi(t)))return e;var i=Wn(e);return eo(i,0,In(i,Wn(t))+1).join("")},vr.trimStart=function(e,t,r){if((e=Za(e))&&(r||t===n))return e.replace(Fe,"");if(!e||!(t=Hi(t)))return e;var i=Wn(e);return eo(i,Tn(i,Wn(t))).join("")},vr.truncate=function(e,t){var r=D,i=C;if(La(t)){var o="separator"in t?t.separator:o;r="length"in t?Ga(t.length):r,i="omission"in t?Hi(t.omission):i}var s=(e=Za(e)).length;if(Rn(e)){var a=Wn(e);s=a.length}if(r>=s)return e;var l=r-Vn(i);if(l<1)return i;var c=a?eo(a,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(a&&(l+=c.length-l),Ba(o)){if(e.slice(l).search(o)){var u,d=c;for(o.global||(o=ot(o.source,Za(Ve.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var p=u.index;c=c.slice(0,p===n?l:p)}}else if(e.indexOf(Hi(o),l)!=l){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+i},vr.unescape=function(e){return(e=Za(e))&&Me.test(e)?e.replace(Ee,Kn):e},vr.uniqueId=function(e){var t=++ft;return Za(e)+t},vr.upperCase=Al,vr.upperFirst=Nl,vr.each=Zs,vr.eachRight=Xs,vr.first=Ds,Ul(vr,function(){var e={};return Xr(vr,(function(t,n){ht.call(vr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),vr.VERSION=r,on(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){vr[e].placeholder=vr})),on(["drop","take"],(function(e,t){Er.prototype[e]=function(r){r=r===n?1:Jn(Ga(r),0);var i=this.__filtered__&&!t?new Er(this):this.clone();return i.__filtered__?i.__takeCount__=Zn(r,i.__takeCount__):i.__views__.push({size:Zn(r,j),type:e+(i.__dir__<0?"Right":"")}),i},Er.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),on(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==N||n==T;Er.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ho(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),on(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Er.prototype[e]=function(){return this[n](1).value()[0]}})),on(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Er.prototype[e]=function(){return this.__filtered__?new Er(this):this[n](1)}})),Er.prototype.compact=function(){return this.filter(jl)},Er.prototype.find=function(e){return this.filter(e).head()},Er.prototype.findLast=function(e){return this.reverse().find(e)},Er.prototype.invokeMap=Ai((function(e,t){return"function"==typeof e?new Er(this):this.map((function(n){return ci(n,e,t)}))})),Er.prototype.reject=function(e){return this.filter(ma(Ho(e)))},Er.prototype.slice=function(e,t){e=Ga(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Er(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=Ga(t))<0?r.dropRight(-t):r.take(t-e)),r)},Er.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Er.prototype.toArray=function(){return this.take(j)},Xr(Er.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=vr[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(vr.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,l=t instanceof Er,c=a[0],u=l||ka(t),d=function(e){var t=o.apply(vr,pn([e],a));return i&&p?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,h=!!this.__actions__.length,f=s&&!p,m=l&&!h;if(!s&&u){t=m?t:new Er(this);var g=e.apply(t,a);return g.__actions__.push({func:Ks,args:[d],thisArg:n}),new xr(g,p)}return f&&m?e.apply(this,a):(g=this.thru(d),f?i?g.value()[0]:g.value():g)})})),on(["pop","push","shift","sort","splice","unshift"],(function(e){var t=lt[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);vr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ka(i)?i:[],e)}return this[n]((function(n){return t.apply(ka(n)?n:[],e)}))}})),Xr(Er.prototype,(function(e,t){var n=vr[t];if(n){var r=n.name+"";ht.call(ur,r)||(ur[r]=[]),ur[r].push({name:t,func:n})}})),ur[wo(n,b).name]=[{name:"wrapper",func:n}],Er.prototype.clone=function(){var e=new Er(this.__wrapped__);return e.__actions__=lo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=lo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=lo(this.__views__),e},Er.prototype.reverse=function(){if(this.__filtered__){var e=new Er(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Er.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=ka(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=Zn(t,e+s);break;case"takeRight":e=Jn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,l=a-s,c=r?a:s-1,u=this.__iteratees__,d=u.length,p=0,h=Zn(l,this.__takeCount__);if(!n||!r&&i==l&&h==l)return Ki(e,this.__actions__);var f=[];e:for(;l--&&p<h;){for(var m=-1,g=e[c+=t];++m<d;){var b=u[m],y=b.iteratee,v=b.type,w=y(g);if(v==O)g=w;else if(!w){if(v==N)continue e;break e}}f[p++]=g}return f},vr.prototype.at=Gs,vr.prototype.chain=function(){return qs(this)},vr.prototype.commit=function(){return new xr(this.value(),this.__chain__)},vr.prototype.next=function(){this.__values__===n&&(this.__values__=qa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},vr.prototype.plant=function(e){for(var t,r=this;r instanceof _r;){var i=vs(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},vr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Er){var t=e;return this.__actions__.length&&(t=new Er(this)),(t=t.reverse()).__actions__.push({func:Ks,args:[Ls],thisArg:n}),new xr(t,this.__chain__)}return this.thru(Ls)},vr.prototype.toJSON=vr.prototype.valueOf=vr.prototype.value=function(){return Ki(this.__wrapped__,this.__actions__)},vr.prototype.first=vr.prototype.head,Ot&&(vr.prototype[Ot]=function(){return this}),vr}();qt?((qt.exports=Gn)._=Gn,Wt._=Gn):Vt._=Gn}).call(yi)}(YI,YI.exports);const QI=()=>document.documentElement.style.setProperty("--focus-background-color","rgba(234, 243, 252, 0.5)"),JI=()=>document.documentElement.style.setProperty("--focus-background-color","transparent"),ZI={onMouseEnter:QI,onMouseLeave:JI},XI=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?ZI:{}};function eL(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var tL="undefined"!=typeof window&&"undefined"!=typeof document;function nL(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function rL(){return tL&&document.createElement("div")}function iL(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!iL(e[n],t[n]))return!1}return!0}return!1}function oL(e){var t=[];return e.forEach((function(e){t.find((function(t){return iL(e,t)}))||t.push(e)})),t}var sL=tL?d:s;function aL(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var lL={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||aL(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&aL(t,"remove",e.props.className)},onAfterUpdate:r}}};function cL(e){return function(t){var o=t.children,s=t.content,a=t.visible,l=t.singleton,c=t.render,d=t.reference,p=t.disabled,h=void 0!==p&&p,f=t.ignoreAttributes,m=void 0===f||f;t.__source,t.__self;var g,b,y=eL(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),v=void 0!==a,w=void 0!==l,_=r(!1),x=_[0],E=_[1],k=r({}),M=k[0],D=k[1],C=r(),S=C[0],A=C[1],N=(g=function(){return{container:rL(),renders:1}},(b=i()).current||(b.current="function"==typeof g?g():g),b.current),O=Object.assign({ignoreAttributes:m},y,{content:N.container});v&&(O.trigger="manual",O.hideOnClick=!1),w&&(h=!0);var T=O,I=O.plugins||[];c&&(T=Object.assign({},O,{plugins:w&&null!=l.data?[].concat(I,[{fn:function(){return{onTrigger:function(e,t){var n=l.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,A(n.content)}}}}]):I,render:function(){return{popper:N.container}}}));var L=[d].concat(o?[o.type]:[]);return sL((function(){var t=d;d&&d.hasOwnProperty("current")&&(t=d.current);var n=e(t||N.ref||rL(),Object.assign({},T,{plugins:[lL].concat(O.plugins||[])}));return N.instance=n,h&&n.disable(),a&&n.show(),w&&l.hook({instance:n,content:s,props:T,setSingletonContent:A}),E(!0),function(){n.destroy(),null==l||l.cleanup(n)}}),L),sL((function(){var e;if(1!==N.renders){var t,n,r,i,o=N.instance;o.setProps((t=o.props,n=T,Object.assign({},n,{popperOptions:Object.assign({},t.popperOptions,n.popperOptions,{modifiers:oL([].concat((null==(r=t.popperOptions)?void 0:r.modifiers)||[],(null==(i=n.popperOptions)?void 0:i.modifiers)||[]))})}))),null==(e=o.popperInstance)||e.forceUpdate(),h?o.disable():o.enable(),v&&(a?o.show():o.hide()),w&&l.hook({instance:o,content:s,props:T,setSingletonContent:A})}else N.renders++})),sL((function(){var e;if(c){var t=N.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;M.placement===n.placement&&M.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&M.escaped===(null==r?void 0:r.hasPopperEscaped)||D({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[M.placement,M.referenceHidden,M.escaped].concat(L)),n.createElement(n.Fragment,null,o?u(o,{ref:function(e){N.ref=e,nL(o.ref,e)}}):null,x&&ge(c?c(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(M),S,N.instance):s,N.container))}}var uL=function(e,t){return c((function(r,i){var o=r.children,s=eL(r,["children"]);return n.createElement(e,Object.assign({},t,s),o?u(o,{ref:function(e){nL(i,e),nL(o.ref,e)}}):null)}))},dL=uL(cL(MM));class pL extends n.Component{constructor(e){super(e),_m(this,"keydownHandler",(e=>{const t={Enter:this.enterHandler,ArrowUp:this.upHandler,ArrowDown:this.downHandler,ArrowLeft:this.leftArrowHandler,ArrowRight:this.rightArrowHandler};e.key in t&&t[e.key](e)})),_m(this,"selectItem",(e=>{const{items:t,editor:n,range:r}=this.props,i=t[e],o=i&&i.command,s=Xo(i.items);o&&s&&i.command({editor:n,range:r})})),_m(this,"upHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+e.length-1)%e.length})})),_m(this,"downHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+1)%e.length})})),_m(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),_m(this,"leftArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t}=this.props;e>0&&t(e-1)})),_m(this,"rightArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t,items:n}=this.props,{selectedIndex:r}=this.state,i=n[r];i&&!Xo(i.items)&&t(e+1)})),this.state={selectedIndex:0},this.menuRef=n.createRef()}componentDidMount(){const{menuIndex:e,activeMenuIndex:t}=this.props;e===t&&document.addEventListener("keydown",this.keydownHandler)}componentWillUnmount(){document.removeEventListener("keydown",this.keydownHandler)}componentDidUpdate(e){const{items:t,menuIndex:n,activeMenuIndex:r}=this.props,i=n===r;t!==e.items&&this.setState({selectedIndex:0}),KT({wrapperRef:this.menuRef,index:this.state.selectedIndex}),i?document.addEventListener("keydown",this.keydownHandler):document.removeEventListener("keydown",this.keydownHandler)}render(){const{items:e,menuIndex:t,activeMenuIndex:r}=this.props,{selectedIndex:i}=this.state,o=t===r;return n.createElement("div",{className:"neeto-editor-slash-commands__wrapper",ref:this.menuRef},e.map(((e,r)=>{const s=Xo(e.items),a=n.createElement(hL,{index:r,item:e,key:e.title,selectItem:()=>s&&this.selectItem(r),selectedIndex:o?i:-1,onHover:()=>this.setState({selectedIndex:r})});return s?a:n.createElement(dL,{interactive:!0,key:e.title,placement:"right",visible:i===r,content:n.createElement(pL,yb({},this.props,{items:e.items,menuIndex:t+1})),onCreate:e=>{let{popper:t}=e;return t.style.width="max-content"},onHide:()=>{this.isSubmenuOpened=!1},onShow:()=>{this.isSubmenuOpened=!0}},a)})))}}const hL=c(((e,t)=>{let{item:r,selectedIndex:i,index:o,selectItem:s,onHover:a}=e;const{Icon:l}=r;return n.createElement("div",{"data-cy":`neeto-editor-command-list-item-${o}`,ref:t,className:_s("neeto-editor-slash-commands__item",{active:o===i}),onClick:s,onMouseEnter:a},l&&n.createElement(l,{size:20}),n.createElement("div",{className:"neeto-editor-slash-commands__item-content"},n.createElement("h5",null,r.title),n.createElement("p",null,r.description)))}));class fL extends n.Component{constructor(){super(...arguments),_m(this,"state",{activeMenuIndex:0}),_m(this,"onKeyDown",(e=>{let{event:t}=e;return["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)})),_m(this,"setActiveMenuIndex",(e=>this.setState({activeMenuIndex:e})))}render(){return n.createElement(pL,yb({},this.props,{activeMenuIndex:this.state.activeMenuIndex,items:this.props.items,menuIndex:0,setActiveMenuIndex:this.setActiveMenuIndex}))}}const mL=[{optionName:Kn.PARAGRAPH,title:"Paragraph",description:"Add a plain text block.",Icon:R,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("paragraph").run()}},{optionName:Kn.H1,title:"H1",description:"Add a big heading.",Icon:B,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:1}).run()}},{optionName:Kn.H2,title:"H2",description:"Add a sub-heading.",Icon:P,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:2}).run()}},{optionName:Kn.H3,title:"H3",description:"Add a sub-heading of level 3.",Icon:U,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:3}).run()}},{optionName:Kn.H4,title:"H4",description:"Add a sub-heading of level 4.",Icon:U,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:4}).run()}},{optionName:Kn.H5,title:"H5",description:"Add a sub-heading of level 5.",Icon:U,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:5}).run()}},{optionName:Kn.H6,title:"H6",description:"Add a sub-heading of level 6.",Icon:U,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:6}).run()}},{optionName:Kn.LIST_ORDERED,title:"Numbered list",description:"Add a list with numbering.",Icon:H,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleOrderedList().run()}},{optionName:Kn.LIST_BULLETS,title:"Bulleted list",description:"Add a list with bullets.",Icon:$,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBulletList().run()}},{optionName:Kn.IMAGE_UPLOAD,title:"Image",description:"Add an image.",Icon:V,command:f},{optionName:Kn.VIDEO_UPLOAD,title:"Video",description:"Add a video.",Icon:W,command:f},{optionName:Kn.BLOCKQUOTE,title:"Blockquote",description:"Add a quote.",Icon:q,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBlockquote().run()}},{optionName:Kn.CODE_BLOCK,title:"Code block",description:"Add a code block with syntax highlighting.",Icon:K,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleCodeBlock().run()}},{optionName:Kn.EMOJI,title:"Emoji",description:"Add an emoji.",Icon:G,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).insertContent("::").run()}},{optionName:Kn.DIVIDER,title:"Divider",description:"Add an horizontal line to separate sections.",Icon:Y,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setHorizontalRule().run()}},{optionName:Kn.VIDEO_EMBED,title:"Embed Youtube/Loom/Vimeo",description:"Embed a video from major services.",Icon:Q,command:f},{optionName:Kn.PASTE_UNFORMATTED,title:"Paste Unformatted",description:"Paste by removing all styles.",Icon:J,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).pasteUnformatted().run()}}],gL={title:"No results",command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).run()}},bL=e=>{let{options:t,addonCommands:n,setMediaUploader:r,setIsEmbedModalOpen:i}=e;const o=mL.map((e=>e.optionName===Kn.IMAGE_UPLOAD?pe("command",(e=>t=>{let{editor:n,range:r}=t;e(pe("image",!0)),n.chain().focus().deleteRange(r).run()})(r),e):e.optionName===Kn.VIDEO_UPLOAD?pe("command",(e=>t=>{let{editor:n,range:r}=t;e(pe("video",!0)),n.chain().focus().deleteRange(r).run()})(r),e):e.optionName===Kn.VIDEO_EMBED?pe("command",(e=>t=>{let{editor:n,range:r}=t;e(!0),n.chain().focus().deleteRange(r).run()})(i),e):e));return[...o.filter((e=>{let{optionName:n}=e;return t.includes(n)})),...n]},yL=new qn("commands");var vL=e=>{let{addonCommands:t,options:n,setMediaUploader:r,setIsEmbedModalOpen:i}=e;const o=bL({options:n,addonCommands:t,setMediaUploader:r,setIsEmbedModalOpen:i});return kx.create({name:"slash-commands",addOptions:()=>({HTMLAttributes:{class:"commands"},suggestion:{char:"/",startOfLine:!1,pluginKey:yL,command:e=>{let{editor:t,range:n,props:r}=e;r.command({editor:t,range:n})},items:e=>{let{query:t}=e;const n=o.filter((e=>{let{title:n}=e;return n.toLowerCase().includes(t.toLowerCase())}));return YI.exports.isEmpty(n)?[gL]:n},render:()=>{let e,t;return{onStart:n=>{e=new RM(fL,{props:n,editor:n.editor}),t=MM("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,zIndex:99999,role:"dropdown",theme:"neeto-editor-slash-menu"}),QI()},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t&&t[0].destroy(),e&&e.destroy(),JI()}}}}}),addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}})};const wL=new qn("special-mention"),_L=e=>{var t;let{options:n,node:r}=e;return`${n.suggestion.char}${null!==(t=r.attrs.label)&&void 0!==t?t:r.attrs.id}`},xL={char:"@@",pluginKey:wL,render:()=>{let e,t;return{onStart:n=>{e=new RM(GT,{props:n,editor:n.editor}),t=MM("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var r;return"Escape"===n.event.key?(t[0].hide(),!0):null===(r=e.ref)||void 0===r?void 0:r.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},EL=qT.extend({name:"special-mention",renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",sx({"data-type":this.name},this.options.HTMLAttributes,n),_L({options:this.options,node:t})]}});var kL=e=>{let{suggestion:t={},...n}=e;return EL.configure({...n,suggestion:{...xL,...t}})};const ML=e=>{let{onClickVariable:t,variables:r}=e;const i=function(){const e=[],t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((n=>{const{category_key:r,category_label:i,variables:o}=n;if(r&&o){const e=o.map(pe("category_key",r));t.push({label:i,variables:e})}else e.push(n)})),YI.exports.isEmpty(e)||t.push({label:YI.exports.isEmpty(t)?null:"Others",variables:e}),t}(r);return b(r)?null:n.createElement("div",{className:"neeto-editor-variables-list"},i.map(((e,r)=>{let{label:i,variables:o}=e;return n.createElement(DL,{index:r,key:r,title:i,variables:o,onClickItem:t})})))},DL=e=>{let{index:t,title:r,variables:i,onClickItem:o}=e;return n.createElement("div",{className:"neeto-editor-variables-block","data-cy":`neeto-editor-variable-option-category-${t}`},r&&n.createElement("h6",null,r),n.createElement("div",{className:"neeto-editor-variables-row"},i.map((e=>n.createElement("button",{className:"neeto-editor-variable","data-cy":`neeto-editor-variable-option-item-${e.label}--${e.value}`,key:`${e.label}--${e.value}`,type:"button",onClick:()=>o(e)},e.label)))))},CL=e=>{let{items:t,command:r}=e;return n.createElement("div",{className:"neeto-editor-variables-suggestion"},n.createElement(ML,{variables:t,onClickVariable:e=>{const{category_key:t,key:n}=e,i=t?`${t}.${n}`:n;r({label:i,id:i})}}))},SL=new qn("variables"),AL=mE.create({name:"variable",addOptions:()=>({HTMLAttributes:{class:"neeto-editor-variable"},charOpen:"{{",charClose:"}}",renderLabel(e){let{options:t,node:n}=e;return`${t.charOpen}${n.attrs.label||n.attrs.id}${t.charClose}`},suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-variable]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",sx({"data-variable":""},this.options.HTMLAttributes,n),this.options.renderLabel({options:this.options,node:t})]},renderText(e){let{node:t}=e;return this.options.renderLabel({options:this.options,node:t})},addCommands(){return{setVariable:e=>t=>{let{chain:n}=t;n().focus().insertContent([{type:this.name,attrs:e},{type:"text",text:" "}]).run()}}},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((e=>{let{tr:t,state:n}=e,r=!1;const{selection:i}=n,{empty:o,anchor:s}=i;return!!o&&(n.doc.nodesBetween(s-1,s,((e,n)=>{if(e.type.name===this.name)return r=!0,t.insertText("",n,n+e.nodeSize),!1})),r)}))}},addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}}),NL={char:"{{",startOfLine:!1,pluginKey:SL,command:e=>{let{editor:t,range:n,props:r}=e;t.chain().focus().deleteRange(n).setVariable(r).run()},items:()=>[],render:()=>{let e,t;return{onStart:n=>{e=new RM(CL,{props:n,editor:n.editor}),t=MM("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onExit(){t[0].destroy(),e.destroy()}}}};var OL=e=>{let{suggestion:t={}}=e;return AL.configure({suggestion:{...NL,...t}})};const TL=e=>{var t;let{node:r,editor:o,getPos:s,updateAttributes:a,deleteNode:l}=e;const c=i(null),{alt:u,src:d,vidheight:p,vidwidth:h,align:f}=r.attrs,{view:m}=o;let g=p,y=h;const v=c.current?null===(t=c.current.querySelector("figcaption>div"))||void 0===t?void 0:t.textContent:u;return n.createElement(jM,{className:`neeto-editor__image-wrapper neeto-editor__image--${f}`},n.createElement("figure",{ref:c},n.createElement(jT,{align:f,deleteNode:l,updateAttributes:a}),n.createElement(zT,{lockAspectRatio:!0,className:"neeto-editor__image",size:{height:g,width:y},onResizeStop:(e,t,n)=>{g=n.offsetHeight,y=n.offsetWidth,m.dispatch(m.state.tr.setNodeMarkup(s(),void 0,{...r.attrs,vidheight:g,vidwidth:y,height:g,width:y})),o.commands.focus()}},n.createElement("video",yb({controls:!0},r.attrs,{alt:v,preload:"metadata",src:d}))),n.createElement(zM,{as:"figcaption",className:_s({"is-empty":b(v)})})))},IL=mE.create({name:"video",addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",draggable:!0,isolating:!0,addAttributes:()=>({src:{default:null,parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("src")}},alt:{default:"",parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("alt")}},vidheight:{default:288,parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("vidheight")}},vidwidth:{default:"fit-content",parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("vidwidth")}},align:{default:"left",parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("align")}}}),parseHTML:()=>[{tag:"figure[data-video]",getAttrs:e=>"normal"!==e.style.fontWeight&&null,contentElement:"figcaption"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;const{align:r,src:i,vidheight:o,vidwidth:s}=t.attrs,a={class:"neeto-editor__image",style:`height:${o}px;width:${s}px;`};return["a",{href:i,target:"_blank",rel:"noopener noreferrer",class:`neeto-editor__image-wrapper neeto-editor__image--${r}`},["figure",sx(this.options.HTMLAttributes,{"data-video":""}),["div",a,["video",sx(n,{preload:"metadata",controls:!0,draggable:!1,contenteditable:!1})]],["figcaption",0]]]},addNodeView:()=>PM(TL),addCommands(){return{setVideo:e=>{let{caption:t,...n}=e;return e=>{let{chain:r}=e;return r().insertContent({type:this.name,attrs:n,content:t?[{type:"text",text:t}]:[]}).command((e=>{let{tr:t,commands:n}=e;const{doc:r,selection:i}=t,o=r.resolve(i.to).end();return n.setTextSelection(o)})).run()}}}}}),LL=t=>{let{placeholder:n,extensions:r,mentions:i,variables:o,isSlashCommandsActive:s,options:a,addonCommands:l,onSubmit:c,keyboardShortcuts:u,uploadEndpoint:d,isVideoEmbedActive:p,setMediaUploader:h,setIsEmbedModalOpen:f}=t,m=[XM,ZM,SC,rD,iN,HT,CC,gT,uT,oN,YM,eD.configure({mode:"shallowest"}),IL,UT({uploadEndpoint:d}),zS.configure({document:!1,codeBlock:!1,code:!1}),VT({onSubmit:c,shortcuts:u}),GI.configure({placeholder:n})];if(p&&m.push(sN),s&&m.push(vL({options:a,addonCommands:l,setMediaUploader:h,setIsEmbedModalOpen:f})),!b(i)){const t=function(){const t=VI(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);return n=>{let{query:r}=n;if(!r)return t.slice(0,10);const i=new $I(t,{keys:["name"],threshold:.25}).search(r).slice(0,10);return e("item",i)}}(i);m.push(KI({suggestion:{items:t}})),m.push(kL({suggestion:{items:t}}))}return b(o)||m.push(OL({suggestion:{items:()=>o}})),m=m.concat(r),m},FL=e=>{var t;let{uppy:i}=e;const[o,a]=r(0);s((()=>{i.on("upload-progress",((e,t)=>{let{progress:n}=t;return a(n)}))}),[i]);const l=`${o}%`;return n.createElement("div",{className:"ne-media-uploader__progress"},n.createElement("p",{className:"ne-media-uploader__progress-title"},"Uploading..."),n.createElement("p",{className:"ne-media-uploader__progress-file"},null===(t=i.getFiles()[0])||void 0===t?void 0:t.name),n.createElement("div",{className:"neeto-editor-progress-bar__wrapper","data-cy":"neeto-editor-image-upload-progress-bar"},n.createElement("div",{className:"neeto-editor-progress-bar__percent"},n.createElement("p",null,l),n.createElement(x,{icon:F,size:"small",style:"text",onClick:()=>i.cancelAll()})),n.createElement("div",{className:"neeto-editor-progress-bar__indicator"},n.createElement("div",{className:"neeto-editor-progress-bar__indicator-inner",style:{width:l}}))))},zL=e=>{let{isImage:t,endpoint:r,onSuccess:i}=e;const o=t?fm:mm,{uppy:s,isUploading:a}=db({endpoint:r,uppyConfig:o,onSuccess:i});return a?n.createElement(FL,{uppy:s}):n.createElement("div",{className:"ne-media-uploader__dnd-wrapper"},n.createElement(Of,{className:"ne-media-uploader__dnd","data-cy":"neeto-editor-media-local-uploader",uppy:s,locale:{strings:{dropHereOr:"Drop your file(s) here or %{browse}",browse:"Browse"}},note:`Max. File Size: ${ym(o.restrictions.maxFileSize)}`}))},jL=e=>{let{isImage:t,url:i,editor:o,onClose:s,alt:a="",setMediaUrl:l}=e;const[c,u]=r(a||""),[d,p]=r(!1),h=()=>{t?o.chain().focus().setFigure({src:i,caption:c,alt:c}).run():o.chain().focus().setVideo({src:i,caption:c,alt:c}).run(),s()};return n.createElement("div",{className:"ne-media-editor",onKeyDown:e=>{"Enter"===e.key&&h()}},n.createElement(x,{icon:Z,iconPosition:"left",label:"back",size:"small",style:"text",onClick:()=>l("")}),d?n.createElement("div",{className:"ne-media-editor__error"},n.createElement("h2",null,"Something Went Wrong!"),n.createElement("p",null,"The selected media cannot be displayed. Please try again.")):n.createElement(n.Fragment,null,t?n.createElement("img",{loading:"lazy",src:i,onError:e=>{let{currentTarget:t}=e;p(!0),t.onerror=null}}):n.createElement("video",{src:i,onError:e=>{let{currentTarget:t}=e;p(!0),t.onerror=null}}),n.createElement(_,{autoFocus:!0,label:"Caption",placeholder:"Enter a caption",value:c,onChange:e=>u(e.target.value)})),n.createElement("div",{className:"ne-media-editor__footer"},n.createElement(x,{disabled:d,label:"Save changes",onClick:h}),n.createElement(x,{label:"Cancel",style:"text",onClick:s})))};var RL={},BL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PL=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.create(null);function n(e,n){return t[e]=t[e]||[],t[e].push(n),this}function r(e,t){return t._once=!0,n(e,t),this}function i(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n?t[e].splice(t[e].indexOf(n),1):delete t[e],this}function o(e){for(var n=this,r=arguments.length,o=Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];var a=t[e]&&t[e].slice();return a&&a.forEach((function(t){t._once&&i(e,t),t.apply(n,o)})),this}return BL({},e,{on:n,once:r,off:i,emit:o})},UL=Object.freeze({__proto__:null,default:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,s=void 0,a=void 0,l=void 0,c=void 0,u=void 0,d=void 0,p=void 0,h=void 0,f=0===e.packed.indexOf("data-")?e.packed:"data-"+e.packed,m=e.sizes.slice().reverse(),g=!1!==e.position,b=e.container.nodeType?e.container:document.querySelector(e.container),y={all:function(){return E(b.children)},new:function(){return E(b.children).filter((function(e){return!e.hasAttribute(""+f)}))}},v=[D,C,S],w=[A,N,O,T],_=PL({pack:F,update:z,resize:j});return _;function x(e){e.forEach((function(e){return e()}))}function E(e){return Array.prototype.slice.call(e)}function k(e){return Array.apply(null,Array(e)).map((function(){return 0}))}function M(){return m.map((function(e){return e.mq&&window.matchMedia("(min-width: "+e.mq+")").matches})).indexOf(!0)}function D(){r=M()}function C(){i=-1===r?m[m.length-1]:m[r]}function S(){s=k(i.columns)}function A(){d=y[t?"new":"all"]()}function N(){0!==d.length&&(p=d.map((function(e){return e.clientWidth})),h=d.map((function(e){return e.clientHeight})))}function O(){d.forEach((function(e,t){o=s.indexOf(Math.min.apply(Math,s)),e.style.position="absolute",a=s[o]+"px",l=o*p[t]+o*i.gutter+"px",g?(e.style.top=a,e.style.left=l):e.style.transform="translate3d("+l+", "+a+", 0)",e.setAttribute(f,""),c=p[t],u=h[t],c&&u&&(s[o]+=u+i.gutter)}))}function T(){b.style.position="relative",b.style.width=i.columns*c+(i.columns-1)*i.gutter+"px",b.style.height=Math.max.apply(Math,s)-i.gutter+"px"}function I(){n||(window.requestAnimationFrame(L),n=!0)}function L(){r!==M()&&(F(),_.emit("resize",i)),n=!1}function F(){return t=!1,x(v.concat(w)),_.emit("pack")}function z(){return t=!0,x(w),_.emit("update")}function j(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"addEventListener":"removeEventListener";return window[t]("resize",I),_}}}),HL=wi(UL),$L={exports:{}},VL={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n,o=a(i),s=a(jh.exports);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){this.props.useCapture;return this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var i=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:i.scrollTop;r=this.props.isReverse?o:this.calculateOffset(e,o)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,i=t.hasMore;t.initialLoad;var s=t.isReverse,a=t.loader;t.loadMore,t.pageStart;var l=t.ref;t.threshold,t.useCapture,t.useWindow,t.getScrollParent;var c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(a?s?u.unshift(a):u.push(a):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t["default"]}(VL,VL.exports),$L.exports=VL.exports,Object.defineProperty(RL,"__esModule",{value:!0});var WL,qL,KL=RL.default=void 0,GL=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),YL=n,QL=eF(YL),JL=eF(jh.exports),ZL=eF(HL),XL=eF($L.exports);function eF(e){return e&&e.__esModule?e:{default:e}}function tF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nF(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var rF=(qL=WL=function(e){function t(){var e,n,r;tF(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=nF(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.setContainerRef=function(e){r.masonryContainer=e},r.forcePack=function(){r.masonryContainer&&r.state.instance.pack()},r.forceUpdate=function(){r.masonryContainer&&r.state.instance.update()},r.createNewInstance=function(){var e=r.props,t=e.packed,n=e.sizes,i=e.children,o=e.position,s=(0,ZL.default)({container:r.masonryContainer,packed:t,sizes:n,position:o});s.resize(!0),i.length>0&&s.pack(),r.setState((function(){return{instance:s}}))},nF(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,YL.Component),GL(t,[{key:"componentDidMount",value:function(){this.createNewInstance()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.state.instance;if(0!==e.children.length||0!==t.length)return 0===e.children.length&&t.length>0?n.pack():e.children.length!==t.length?this.props.pack?n.pack():n.update():void 0}},{key:"componentWillUnmount",value:function(){this.state&&this.state.instance.resize(!1)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.style;e.pack,e.packed,e.position,e.sizes;var i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","className","style","pack","packed","position","sizes"]);return QL.default.createElement(XL.default,i,QL.default.createElement("div",{ref:this.setContainerRef,className:n,style:r},t))}}]),t}(),WL.propTypes={children:JL.default.arrayOf(JL.default.element).isRequired,className:JL.default.string,initialLoad:JL.default.bool,pack:JL.default.bool,packed:JL.default.string,position:JL.default.bool,sizes:JL.default.array,style:JL.default.object},WL.defaultProps={className:"",initialLoad:!0,pack:!1,packed:"data-packed",position:!0,sizes:[{columns:1,gutter:20},{mq:"768px",columns:2,gutter:20},{mq:"1024px",columns:3,gutter:20}],style:{}},qL);KL=RL.default=rF;const iF=e=>{let{onSubmit:t,unsplashApiKey:o}=e;const a=i(null),[l,c]=r(""),[u,d]=r(!1),[p,h]=r([]),[f,m]=r(1),[g,b]=r(!0),[y,v]=r(!1),w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;const[n,i]=r(e);return s((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e]),n}(l||"latest");s((()=>{x(1)}),[w]);const x=async e=>{try{v(!0),d(!1);const t=await(e=>{let{pageNo:t,query:n,apiKey:r}=e;return de.get(Gn,{headers:{Authorization:`Client-ID ${r}`},params:{page:t,per_page:30,order_by:"popular",query:n}})})({page:e,query:w,apiKey:o}),{data:{results:n,total_pages:r}}=t;h(1===e?n:[...p,...n]),m(e+1),b(e<r)}catch{d(!0)}finally{v(!1)}},E=n.createElement("div",{className:"neeto-editor-unsplash-gallery__loader"},n.createElement(C,null));return n.createElement("div",{className:"neeto-editor-unsplash-wrapper"},n.createElement(_,{autoFocus:!0,className:"neeto-editor-unsplash-search","data-cy":"neeto-editor-unsplash-image-picker-search-input",name:"text",placeholder:"Search Unsplash",value:l,onChange:e=>{let{target:{value:t}}=e;c(t)}}),u&&n.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-error"},"Something went wrong! Please try again later."),!u&&!y&&Xo(p)&&n.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-no-results-error"},"No results"),!u&&n.createElement("div",{className:"neeto-editor-unsplash-container"},n.createElement(KL,{pack:!0,position:!0,className:"neeto-editor-unsplash-gallery",hasMore:g,loadMore:()=>{!y&&g&&f>1&&x(f)},loader:E,ref:a,style:{width:"100%"},useWindow:!1,sizes:[{columns:3,gutter:0},{mq:"768px",columns:3,gutter:0},{mq:"1024px",columns:3,gutter:0}]},p&&p.map(((e,r)=>n.createElement("div",{className:"neeto-editor-unsplash-gallery__item","data-cy":`neeto-editor-unsplash-image-picker-result-${r}`,key:r},n.createElement("div",{className:"neeto-editor-unsplash-gallery__item-placeholder",style:{paddingBottom:`${e.height/e.width*100}%`}},n.createElement("div",{className:"neeto-editor-unsplash-gallery__item-inner",id:`unsplashImage${r}`},n.createElement("img",{src:e.urls.regular,onClick:()=>t(e.urls.small)}),n.createElement("a",{href:`https://unsplash.com/@${e.user.username}`,rel:"noreferrer",target:"_blank"},e.user.name," "))))))),!g&&n.createElement("p",{className:"neeto-editor-unsplash-gallery__text"},"End of results")))},oF=e=>{let{buttonLabel:t="Submit",placeholder:i,onSubmit:o,className:s}=e;const[a,l]=r(""),[c,u]=r("");return n.createElement("div",{className:_s("neeto-editor-url-form__wrapper",{[s]:s})},n.createElement(_,{autoFocus:!0,"data-cy":"neeto-editor-media-upload-url-input",error:c,name:"url",placeholder:i,value:a,onChange:e=>{let{target:{value:t}}=e;return l(t)},onFocus:()=>u("")}),n.createElement(x,{"data-cy":"neeto-editor-media-upload-url-submit",disabled:!a,label:t,onClick:e=>{e.preventDefault(),Qn.test(a)?o(a):u("Please enter a valid url")}}))},sF=e=>{let{mediaUploader:t,onClose:i,editor:o,uploadEndpoint:s,unsplashApiKey:a}=e;const[l,c]=r("local"),[u,d]=r(""),p=t.image||t.video;let h=a?bm:bm.slice(0,2);t.video&&(h=[]);const f=()=>{i(),d(""),c("local")};return n.createElement(D,{closeButton:!1,isOpen:p,onClose:f},n.createElement("div",{className:"ne-media-uploader"},!Xo(h)&&n.createElement(A,null,h.map((e=>{let{key:t,title:r}=e;return n.createElement(A.Item,{active:l===t,key:t,onClick:()=>{d(""),c(t)}},r)}))),n.createElement("div",{className:"ne-media-uploader__content"},u?n.createElement(jL,{editor:o,isImage:t.image,setMediaUrl:d,url:u,onClose:f}):n.createElement(n.Fragment,null,"local"===l&&n.createElement(zL,{endpoint:s,isImage:t.image,onSuccess:d}),"link"===l&&n.createElement(oF,{placeholder:"Paste the link here...",buttonLabel:t.image?"Upload image":"Upload video",onSubmit:d}),"unsplash"===l&&n.createElement(iF,{unsplashApiKey:a,onSubmit:d})))))};var aF=[],lF=[];function cF(e,t){if(e&&"undefined"!=typeof document){var n,r=!0===t.prepend?"prepend":"append",i=!0===t.singleTag,o="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(i){var s=aF.indexOf(o);-1===s&&(s=aF.push(o)-1,lF[s]={}),n=lF[s]&&lF[s][r]?lF[s][r]:lF[s][r]=a()}else n=a();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function a(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),i=0;i<n.length;i++)e.setAttribute(n[i],t.attributes[n[i]]);var s="prepend"===r?"afterbegin":"beforeend";return o.insertAdjacentElement(s,e),e}}cF(".tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}",{});const uF=e=>{let{editor:t,handleClose:i,handleAnimateInvalidLink:o}=e;const[a,l]=r("");s((()=>{l(t.getAttributes("link").href||"")}),[]);const c=()=>{Qn.test(a)?(t.chain().focus().setLink({href:a}).run(),i()):Xo(a)?(t.chain().focus().unsetLink().run(),i()):(l(""),o())};return n.createElement("div",{className:"neeto-editor-bubble-menu__link",onKeyDown:e=>{"Escape"===e.key?i():"Enter"===e.key&&c()}},n.createElement("input",{autoFocus:!0,className:"neeto-editor-bubble-menu-link__input","data-cy":"neeto-editor-link-input",name:"url",placeholder:"Paste or type a link...",value:a,onChange:e=>{let{target:{value:t}}=e;return l(t)}}),n.createElement(x,{"data-cy":"neeto-editor-link-cancel-button",icon:F,size:"small",style:"icon",onClick:()=>{a?(l(""),t.chain().focus().unsetLink().run()):i()}}))},dF=e=>{let{tooltip:t,Icon:r,command:i,active:o,optionName:s,highlight:a}=e;return n.createElement(x,yb({"data-cy":`neeto-editor-bubble-menu-${s}-option`,icon:r,key:s,size:"small",style:o?"secondary":"text",tooltipProps:{content:t,position:"bottom",theme:"dark",delay:[500]},onClick:i},XI(a)))},pF=e=>{let{editor:t,mentions:r,tooltipContent:i}=e;const o=VI(r),{Menu:s,MenuItem:a}=k;return b(o)?null:n.createElement(k,{buttonStyle:"text","data-cy":"neeto-editor-mention-option",icon:X,strategy:"fixed",buttonProps:{tooltipProps:{content:i,position:"bottom"},className:"neeto-editor-fixed-menu__item"}},n.createElement(s,null,o.map((e=>{let{key:r,name:i,imageUrl:o}=e;return n.createElement(a.Button,{"data-cy":`neeto-editor-mention-option-${r}`,key:r,onClick:()=>t.commands.setMention({id:r,label:i})},n.createElement(S,{size:"small",user:{name:i,imageUrl:o}}),n.createElement(E,{style:"body2"},i))}))))},hF=e=>{let{editor:t,isActive:r,setActive:i,tooltipContent:o}=e;return n.createElement(k,{buttonStyle:"text",closeOnSelect:!1,dropdownProps:{classNames:"neeto-editor-fixed-menu__emoji-dropdown"},icon:G,isOpen:r,position:"bottom-start",strategy:"fixed",buttonProps:{tooltipProps:{content:o,position:"bottom"},className:"neeto-editor-fixed-menu__item"},onClick:()=>i((e=>!e)),onClose:()=>i(!1)},n.createElement(lT,{editor:t,setActive:i}))},fF=e=>{let{size:t,color:r,strokeWidth:i,...o}=e;return n.createElement("svg",yb({fill:"none",height:t,viewBox:"0 0 24 24",width:t},o),n.createElement("path",{d:"M13.8791 8.37527L8.39309 13.8613C7.56709 14.6873 7.56709 16.0273 8.39309 16.8533C9.21909 17.6793 10.5591 17.6793 11.3851 16.8533L18.6171 9.62127C20.1321 8.10627 20.1321 5.65027 18.6171 4.13527C17.1021 2.62027 14.6461 2.62027 13.1311 4.13527L5.89909 11.3673C3.69509 13.5713 3.69509 17.1433 5.89909 19.3473C8.10309 21.5513 11.6751 21.5513 13.8791 19.3473L18.2681 14.9583",stroke:r,strokeWidth:i}))};fF.defaultProps={color:"currentColor",size:24,strokeWidth:"1.5"},fF.propTypes={color:jh.exports.string,size:jh.exports.oneOfType([jh.exports.string,jh.exports.number]),strokeWidth:jh.exports.oneOfType([jh.exports.string,jh.exports.number])};const mF=[{label:"Paragraph",value:0},{label:"Heading 1",value:1},{label:"Heading 2",value:2},{label:"Heading 3",value:3}],gF=e=>{let{tooltips:t,editor:n,options:r,setMediaUploader:i,handleUploadAttachments:o,setIsEmbedModalOpen:s}=e;const a=(e=>{let{tooltips:t,editor:n,setMediaUploader:r,handleUploadAttachments:i,setIsEmbedModalOpen:o}=e;return{font:[{Icon:ee,command:()=>n.chain().focus().toggleBold().run(),active:n.isActive("bold"),optionName:"bold",tooltip:t.bold||"Bold"},{Icon:te,command:()=>n.chain().focus().toggleItalic().run(),active:n.isActive("italic"),optionName:"italic",tooltip:t.italic||"Italic"},{Icon:ne,command:()=>n.chain().focus().toggleUnderline().run(),active:n.isActive("underline"),optionName:"underline",tooltip:t.underline||"Underline"},{Icon:re,command:()=>n.chain().focus().toggleStrike().run(),active:n.isActive("strike"),optionName:"strike",tooltip:t.strike||"Strike"},{Icon:ie,command:()=>n.chain().focus().toggleHighlight().run(),active:n.isActive("highlight"),optionName:"highlight",tooltip:t.highlight||"Highlight"}],block:[{Icon:oe,command:()=>n.chain().focus().toggleBlockquote().run(),active:n.isActive("blockquote"),optionName:"block-quote",highlight:!0,tooltip:t.blockQuote||"Block Quote"},{Icon:K,command:()=>n.chain().focus().toggleCode().run(),active:n.isActive("code"),optionName:"code",tooltip:t.code||"Code"}],list:[{Icon:$,command:()=>n.chain().focus().toggleBulletList().run(),active:n.isActive("bulletList"),optionName:"bullet-list",highlight:!0,tooltip:t.bulletList||"Bullet List"},{Icon:H,command:()=>n.chain().focus().toggleOrderedList().run(),active:n.isActive("orderedList"),optionName:"ordered-list",highlight:!0,tooltip:t.orderedList||"Ordered List"}],misc:[{Icon:fF,command:i,active:!1,optionName:"attachments",tooltip:t.attachments||"Attachments"},{Icon:V,command:()=>r(pe("image",!0)),optionName:"image-upload",tooltip:t.imageUpload||"Image Upload"},{Icon:W,command:()=>r(pe("video",!0)),optionName:"video-upload",tooltip:t.videoUpload||"Video Upload"},{Icon:Q,command:()=>o(!0),optionName:"video-embed",tooltip:t.videoEmbed||"Embed Video"}],right:[{Icon:se,command:()=>n.chain().focus().undo().run(),active:!1,disabled:!n.can().undo(),optionName:"undo",tooltip:t.undo||"Undo"},{Icon:ae,command:()=>n.chain().focus().redo().run(),active:!1,disabled:!n.can().redo(),optionName:"redo",tooltip:t.redo||"Redo"}]}})({tooltips:t,editor:n,setMediaUploader:i,handleUploadAttachments:o,setIsEmbedModalOpen:s});return ve(["font","block","list","misc","right"].map((e=>[e,a[e].filter((e=>r.includes(e.optionName)))])))},bF=e=>{let{Icon:t,command:r,active:i,optionName:o,highlight:s,disabled:a,tooltip:l}=e;return n.createElement(x,yb({className:"neeto-editor-fixed-menu__item","data-cy":`neeto-editor-fixed-menu-${o}-option`,disabled:a,icon:t,key:o,style:i?"secondary":"text",tooltipProps:{content:l,position:"bottom"},onClick:r},XI(s)))},yF=e=>{let{editor:t,commands:n}=e;const{to:r}=t.state.selection;return n.map((e=>{var n;return{...e,active:null===(n=e.active)||void 0===n?void 0:n.call(e,{editor:t}),command:()=>{var n;return null===(n=e.command)||void 0===n?void 0:n.call(e,{editor:t,range:{from:r,to:r}})}}}))},vF=e=>{let{editor:t,options:r,mentions:i,tooltips:o,setIsInvalidLink:s,isLinkOptionActive:a,setIsLinkOptionActive:l,setMediaUploader:c,handleUploadAttachments:u,isEmojiPickerActive:d,setIsEmojiPickerActive:p,setIsEmbedModalOpen:h}=e;const{Menu:f,MenuItem:m}=k,g=(e=>{let{editor:t}=e;return[{optionName:"Heading 1",active:t.isActive("heading",{level:1}),command:()=>t.chain().focus().setNode("heading",{level:1}).run()},{optionName:"Heading 2",active:t.isActive("heading",{level:2}),command:()=>t.chain().focus().setNode("heading",{level:2}).run()},{optionName:"Heading 3",active:t.isActive("heading",{level:3}),command:()=>t.chain().focus().setNode("heading",{level:3}).run()},{optionName:"Ordered List",active:t.isActive("orderedList"),command:()=>t.chain().focus().toggleOrderedList().run()},{optionName:"Bulleted List",active:t.isActive("bulletList"),command:()=>t.chain().focus().toggleBulletList().run()},{optionName:"Text",active:t.isActive("paragraph"),command:()=>t.chain().focus().setNode("paragraph").run()}]})({editor:t}),b=(e=>{var t;return(null===(t=e.find(ye("active")))||void 0===t?void 0:t.optionName)||"Text"})(g),y=r.includes(Kn.EMOJI),v=r.includes(Kn.LINK),{font:w,block:_,list:x}=gF({editor:t,options:r,setMediaUploader:c,tooltips:o,handleUploadAttachments:u,setIsEmbedModalOpen:h}),E=()=>{s(!0),setTimeout((()=>{s(!1)}),1e3)};return a?n.createElement(uF,{editor:t,handleAnimateInvalidLink:E,handleClose:()=>l(!1)}):n.createElement(n.Fragment,null,n.createElement(k,{buttonSize:"small",buttonStyle:"text",label:b,strategy:"fixed"},n.createElement(f,null,g.map((e=>{let{optionName:t,command:r}=e;return n.createElement(m.Button,{key:t,onClick:r},t)})))),w.map(dF),_.map(dF),y&&n.createElement(hF,{editor:t,isActive:d,setActive:p,tooltipContent:o.emoji||"Emoji"}),x.map(dF),v&&dF({Icon:le,command:()=>l(!0),active:t.isActive("link"),optionName:"link",highlight:!1,tooltip:o.link||"Link"}),n.createElement(pF,{editor:t,mentions:i,tooltipContent:o.mention||"Mention"}))},wF=e=>{let{editor:t,options:i,mentions:o=[],setMediaUploader:s,tooltips:a={},handleUploadAttachments:l,isEmojiPickerActive:c,setIsEmojiPickerActive:u,setIsEmbedModalOpen:d}=e;const[p,h]=r(!1),[f,m]=r(!1),g=t&&t.view.state.selection.node,b=g&&"image"===g.type.name,y=[Kn.BOLD,Kn.ITALIC,Kn.UNDERLINE,Kn.STRIKETHROUGH,Kn.LINK],v=Xo(i.filter((e=>y.includes(e))));return!t||!b&&v?null:n.createElement("div",null,n.createElement(AM,{editor:t,className:_s("neeto-editor-bubble-menu",{"neeto-editor-bubble-menu-animate-shake":p}),tippyOptions:{arrow:jk,zIndex:99999,onHide:()=>m(!1),theme:"neeto-editor-bubble-menu",maxWidth:500}},n.createElement(vF,{editor:t,handleUploadAttachments:l,isEmojiPickerActive:c,isLinkOptionActive:f,mentions:o,options:i,setIsEmbedModalOpen:d,setIsEmojiPickerActive:u,setIsInvalidLink:h,setIsLinkOptionActive:m,setMediaUploader:s,tooltips:a})))},{Menu:_F,MenuItem:xF}=k,EF=e=>{var t;let{editor:r,tooltipContent:i}=e;const o=(null===(t=mF.find((e=>{let{value:t}=e;return n=t,r.isActive("heading",{level:n});var n})))||void 0===t?void 0:t.label)||"Paragraph";return n.createElement(k,{autoWidth:!0,buttonStyle:"text","data-cy":"neeto-editor-fixed-menu-font-size-option",label:o,placement:"bottom-start",buttonProps:{tooltipProps:{content:i,position:"bottom"},className:"neeto-editor-fixed-menu__item neeto-editor-font-size__wrapper"}},n.createElement(_F,null,mF.map((e=>{let{label:t,value:i}=e;return n.createElement(xF.Button,{"data-cy":`neeto-editor-fixed-menu-font-size-option-${t}`,key:i,onClick:()=>{return(e=i)?r.chain().focus().toggleHeading({level:e}).run():r.chain().focus().setNode("paragraph").run();var e}},t)}))))},{Menu:kF}=k,MF=e=>{let{editor:t,tooltipContent:i}=e;const[o,s]=r(""),[a,l]=r(""),[c,u]=r(!1),d=t.isActive("link"),p=()=>{u(!1),l(""),s("")},h=()=>{Qn.test(a)?(t.chain().focus().setLink({href:a}).run(),p()):s("Please enter a valid url")};return n.createElement(k,{buttonStyle:d?"secondary":"text",closeOnSelect:!1,"data-cy":"neeto-editor-fixed-menu-link-option",icon:le,isOpen:c,position:"bottom",buttonProps:{tooltipProps:{content:i,position:"bottom"},className:"neeto-editor-fixed-menu__item"},onClick:()=>{l(t.getAttributes("link").href),u((e=>!e))},onClose:p},n.createElement(kF,{className:"neeto-editor-link__item",onKeyDown:e=>{"Escape"===e.key?p():"Enter"===e.key&&h()}},n.createElement(_,{autoFocus:!0,"data-cy":"neeto-editor-fixed-menu-link-option-input",error:o,name:"url",placeholder:"Paste URL",value:a,onChange:e=>{let{target:{value:t}}=e;return l(t)},onFocus:()=>s("")}),n.createElement(x,{"data-cy":"neeto-editor-fixed-menu-link-option-link-button",label:"Link",onClick:h}),d&&n.createElement(x,{"data-cy":"neeto-editor-fixed-menu-link-option-unlink-button",label:"Unlink",style:"text",onClick:()=>{t.chain().focus().unsetLink().run(),l(""),p()}})))},{Menu:DF}=k,CF=e=>{let{editor:t,variables:r,tooltipContent:i}=e;return b(r)?null:n.createElement(k,{buttonSize:"small",buttonStyle:"secondary","data-cy":"neeto-editor-variable-option",icon:ce,strategy:"fixed",buttonProps:{tooltipProps:{content:i,position:"bottom"}}},n.createElement(DF,null,n.createElement(ML,{variables:r,onClickVariable:e=>{const{category_key:n,key:r}=e,i=n?`${n}.${r}`:r;t.chain().focus().setVariable({label:i}).run()}})))},SF=e=>{let{editor:t,options:r,mentions:i=[],variables:o=[],setMediaUploader:s,addonCommands:a=[],isIndependant:l=!0,className:c,tooltips:u={},handleUploadAttachments:d,isEmojiPickerActive:p,setIsEmojiPickerActive:h,setIsEmbedModalOpen:f}=e;if(!t)return null;const{font:m,block:g,list:b,misc:y,right:v}=gF({tooltips:u,editor:t,options:r,setMediaUploader:s,handleUploadAttachments:d,setIsEmbedModalOpen:f}),w=r.filter((e=>e.match(/^h[1-6]$/))).length>0,_=r.includes(Kn.EMOJI),x=r.includes(Kn.LINK),E=yF({editor:t,commands:a});return n.createElement("div",{className:_s("neeto-editor-fixed-menu",{"neeto-editor-fixed-menu--independant":l,[c]:c})},n.createElement("div",{className:"neeto-editor-fixed-menu__wrapper"},w&&n.createElement(EF,{editor:t,tooltipContent:u.fontSize||"Font size"}),m.map(bF),g.map(bF),_&&n.createElement(hF,{editor:t,isActive:p,setActive:h,tooltipContent:u.emoji||"Emoji"}),b.map(bF),x&&n.createElement(MF,{editor:t,tooltipContent:u.link||"Link"}),y.map(bF),n.createElement(pF,{editor:t,mentions:i,tooltipContent:u.mention||"Mention"}),E.map(bF),n.createElement("div",{className:"neeto-editor-fixed-menu__right-options"},v.map(bF))),n.createElement("div",{className:"neeto-editor-fixed-menu__variables"},n.createElement(CF,{editor:t,tooltipContent:u.variables||"Variables",variables:o})))},AF=e=>{let{icon:t=null,onClick:r=(()=>{}),disabled:i=!1,className:o,tooltipProps:s,...a}=e;const l=t;return n.createElement(w,yb({disabled:!s,onClick:()=>r()},s),n.createElement("button",yb({className:_s("ne-headless-btn",{[o]:o}),disabled:i,type:"button",onClick:r},a),t&&n.createElement(l,{"aria-hidden":"true",key:"2",size:18})))},NF={name:"hideOnEsc",defaultValue:!0,fn(e){let{hide:t,props:{hideOnEsc:n,onClose:r}}=e;function i(e){"escape"===e.key.toLowerCase()&&n&&(r(),t())}return{onShow(){document.addEventListener("keydown",i)},onHide(){document.removeEventListener("keydown",i)}}}},OF=e=>{let{icon:t,isOpen:i,onClose:o=(()=>{}),children:s,className:a,onClick:l,buttonProps:c={},...u}=e;const[d,p]=r(!1);return n.createElement(dL,yb({hideOnEsc:!0,interactive:!0,animation:!1,arrow:!1,duration:0,hideOnClick:!1,maxWidth:"none",offset:0,plugins:[NF],popperOptions:{strategy:"fixed"},role:"dropdown",theme:"light",trigger:"click",visible:i,className:_s("ne-headless-dropdown",{[a]:a}),content:d&&n.createElement("div",{className:"ne-headless-dropdown__popup"},s),onClickOutside:o,onClose:o,onHidden:()=>p(!1),onMount:()=>p(!0)},u),n.createElement("span",null,n.createElement(AF,yb({icon:t,onClick:l},c))))},TF=e=>{let{editor:t,isActive:r,setActive:i,tooltipContent:o}=e;return n.createElement(OF,{className:"ne-headless__emoji",icon:G,isOpen:r,buttonProps:{tooltipProps:{content:o,delay:[500],position:"bottom"}},onClick:()=>i((e=>!e)),onClose:()=>i(!1)},n.createElement(lT,{editor:t,setActive:i}))},IF=e=>{let{editor:t,optionName:r,command:i,disabled:o,Icon:s,isActive:a,setActive:l,tooltip:c}=e;return r===Kn.EMOJI?n.createElement(TF,{editor:t,isActive:a,setActive:l,tooltipContent:c||"Emoji"}):n.createElement(AF,{className:a?"ne-headless-btn--active":"",disabled:o,icon:s,tooltipProps:{content:c,delay:[500],position:"bottom"},onClick:i})},LF=e=>{let{tooltips:t,editor:n,options:r,setMediaUploader:i,handleUploadAttachments:o,isEmojiPickerActive:s,setIsEmojiPickerActive:a,setIsEmbedModalOpen:l}=e;const c=(e=>{let{editor:t,tooltips:n,setMediaUploader:r,handleUploadAttachments:i,isEmojiPickerActive:o,setIsEmojiPickerActive:s,setIsEmbedModalOpen:a}=e;return[{Icon:ee,command:()=>t.chain().focus().toggleBold().run(),active:t.isActive("bold"),optionName:"bold",tooltip:n.bold||"Bold"},{Icon:te,command:()=>t.chain().focus().toggleItalic().run(),active:t.isActive("italic"),optionName:"italic",tooltip:n.italic||"Italic"},{Icon:ne,command:()=>t.chain().focus().toggleUnderline().run(),active:t.isActive("underline"),optionName:"underline",tooltip:n.underline||"Underline"},{Icon:re,command:()=>t.chain().focus().toggleStrike().run(),active:t.isActive("strike"),optionName:"strike",tooltip:n.strike||"Strike"},{Icon:ie,command:()=>t.chain().focus().toggleHighlight().run(),active:t.isActive("highlight"),optionName:"highlight",tooltip:n.highlight||"Highlight"},{Icon:oe,command:()=>t.chain().focus().toggleBlockquote().run(),active:t.isActive("blockquote"),optionName:"block-quote",tooltip:n.blockQuote||"Block Quote"},{Icon:K,command:()=>t.chain().focus().toggleCode().run(),active:t.isActive("code"),optionName:"code",tooltip:n.code||"Code"},{Icon:$,command:()=>t.chain().focus().toggleBulletList().run(),active:t.isActive("bulletList"),optionName:"bullet-list",tooltip:n.bulletList||"Bullet List"},{Icon:H,command:()=>t.chain().focus().toggleOrderedList().run(),active:t.isActive("orderedList"),optionName:"ordered-list",tooltip:n.orderedList||"Ordered List"},{Icon:ue,command:i,optionName:"attachments",tooltip:n.attachments||"Attachments"},{Icon:V,command:()=>r(pe("image",!0)),optionName:"image-upload",tooltip:n.imageUpload||"Image Upload"},{Icon:W,command:()=>r(pe("video",!0)),optionName:"video-upload",tooltip:n.videoUpload||"Video Upload"},{Icon:Q,command:()=>a(!0),optionName:"video-embed",tooltip:n.videoEmbed||"Embed Video"},{Icon:G,command:()=>{},optionName:"emoji",tooltip:n.emoji||"Emoji",isActive:o,setActive:s},{Icon:se,command:()=>t.chain().focus().undo().run(),disabled:!t.can().undo(),optionName:"undo",tooltip:n.undo||"Undo"},{Icon:ae,command:()=>t.chain().focus().redo().run(),disabled:!t.can().redo(),optionName:"redo",tooltip:n.redo||"Redo"}]})({editor:n,tooltips:t,setMediaUploader:i,handleUploadAttachments:o,isEmojiPickerActive:s,setIsEmojiPickerActive:a,setIsEmbedModalOpen:l});return r.map((e=>c.find((t=>{let{optionName:n}=t;return n===e})))).filter(Boolean)},FF=e=>{let{editor:t,options:r,tooltips:i={},setMediaUploader:o,addonCommands:s=[],children:a,className:l,handleUploadAttachments:c,isEmojiPickerActive:u,setIsEmojiPickerActive:d,setIsEmbedModalOpen:p}=e;if(!t)return null;const h=[...LF({tooltips:i,editor:t,options:r,setMediaUploader:o,handleUploadAttachments:c,isEmojiPickerActive:u,setIsEmojiPickerActive:d,setIsEmbedModalOpen:p}),...yF({editor:t,commands:s})];return n.createElement("div",{className:_s("ne-headless",{[l]:l})},h.map((e=>n.createElement(IF,yb({editor:t,key:e.optionName},e)))),a)},zF=e=>{const[t,i]=r(!1),[o,a]=r(!1),[l,c]=r({image:!1,video:!1}),{menuType:u="fixed",addons:d=[],options:p=[],editor:h,uploadEndpoint:f=Yn,editorSecrets:m={},handleUploadAttachments:g}=e,y={fixed:SF,bubble:wF,headless:FF,none:()=>n.createElement("div",null)}[u],v=b(p)?[...tr,...d]:p;return s((()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&e.altKey&&("KeyE"===e.code?i((e=>!e)):"KeyA"===e.code?g():"KeyK"===e.code?c(pe("image",!0)):"KeyV"===e.code&&c(pe("video",!0)))};return"none"!==u&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[]),n.createElement(n.Fragment,null,n.createElement(y,yb({},e,{handleUploadAttachments:g,isEmojiPickerActive:t,options:v,setIsEmbedModalOpen:a,setIsEmojiPickerActive:i,setMediaUploader:c})),n.createElement(sF,{editor:h,mediaUploader:l,unsplashApiKey:m.unsplash,uploadEndpoint:f,onClose:()=>c({image:!1,video:!1})}),d.includes("video-embed")&&n.createElement(GM,{editor:h,isEmbedModalOpen:o,setIsEmbedModalOpen:a}))},jF=(e,t)=>{let{addonCommands:a=[],addons:l=[],attachments:c=[],attachmentsConfig:u={},autoFocus:d=!1,className:p,contentClassName:h,defaults:m=tr,editorSecrets:b={},error:y=null,extensions:v=[],hideSlashCommands:w=!1,initialValue:_="",isCharacterCountActive:x=!1,keyboardShortcuts:E=[],label:k="",mentions:M=[],menuType:D="fixed",placeholder:C,required:S=!1,rows:A=6,tooltips:O={},uploadEndpoint:T=Yn,variables:I=[],onChange:L=f,onFocus:F=f,onBlur:z=f,onSubmit:j=f,onChangeAttachments:R=f,...B}=e;const P=i(null),U=l.includes(Kn.ATTACHMENTS),H=l.includes(Kn.VIDEO_EMBED),$="fixed"===D,V="bubble"===D,W=!w,q=!!C,[K,G]=r(!1),[Y,Q]=r({image:!1,video:!1}),J=i(null),Z=LL({placeholder:C,extensions:v,mentions:M,variables:I,isSlashCommandsActive:W,options:[...m,...l],addonCommands:a,onSubmit:j,keyboardShortcuts:E,uploadEndpoint:T,setMediaUploader:Q,setIsEmbedModalOpen:G,isVideoEmbedActive:H});(e=>{let{initialValue:t}=e;s((()=>{![process.env.RAILS_ENV,"production"].includes("production")&&Xo(t)&&console.warn(`[neeto-editor]: Empty value of "initialValue" in needtoEditor is expected to be "<p></p>" instead of "${t}".`)}),[t])})({initialValue:_});const X=_s("neeto-editor",{"slash-active":W&&!q,"fixed-menu-active border":$,"bubble-menu-active":V,"placeholder-active":q,"attachments-active":U,[h]:h}),ee=UM({extensions:Z,content:_,injectCSS:!1,autofocus:d&&"end",editorProps:{attributes:{class:X,style:or({rows:A})},clipboardTextParser:sr},parseOptions:{preserveWhitespace:!0},onCreate:e=>{let{editor:t}=e;return!d&&(e=>{const{state:t,view:n}=e,r=_n.atEnd(t.doc),i=t.tr;i.setSelection(r),n.dispatch(i)})(t)},onUpdate:e=>{let{editor:t}=e;return L(t.getHTML())},onFocus:F,onBlur:z});return o(t,(()=>({editor:ee,focus:()=>ee.commands.focus()}))),M_.prototype.updateState=function(e){this.docView&&this.updateStateInner(e,this.state.plugins!==e.plugins)},n.createElement("div",{ref:P,className:_s({[p]:p,"ne-attachments__wrapper":U})},k&&n.createElement(N,{className:"neeto-ui-mb-2","data-cy":`${g(k)}-editor-label`,required:S},k),n.createElement(HM,{error:y},n.createElement($M,{editor:ee,isActive:x},n.createElement(zF,{addonCommands:a,addons:l,defaults:m,editor:ee,editorSecrets:b,handleUploadAttachments:()=>{var e;return(null===(e=J.current)||void 0===e?void 0:e.handleUploadAttachments())||f()},isIndependant:!1,mentions:M,menuType:D,tooltips:O,uploadEndpoint:T,variables:I}),n.createElement(IM,yb({editor:ee},B)),n.createElement(sF,{editor:ee,mediaUploader:Y,unsplashApiKey:b.unsplash,uploadEndpoint:T,onClose:()=>Q({image:!1,video:!1})}),H&&n.createElement(GM,{editor:ee,isEmbedModalOpen:K,setIsEmbedModalOpen:G}),U&&n.createElement(wy,{attachments:c,className:"ne-attachments--integrated",config:u,dragDropRef:P,isIndependent:!1,ref:J,onChange:R}))))};var RF=n.forwardRef(jF);cF('@charset "UTF-8";\n@import url("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/github.min.css");\n@keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 10% {\n transform: translateX(-4px);\n }\n 20% {\n transform: translateX(4px);\n }\n 30% {\n transform: translateX(-4px);\n }\n 40% {\n transform: translateX(4px);\n }\n 50% {\n transform: translateX(-4px);\n }\n 60% {\n transform: translateX(4px);\n }\n 70% {\n transform: translateX(-4px);\n }\n 80% {\n transform: translateX(4px);\n }\n 90% {\n transform: translateX(-4px);\n }\n 100% {\n transform: translateX(0);\n }\n}\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.neeto-editor-slash-commands__wrapper {\n padding: 12px;\n overflow-y: auto;\n max-height: 384px;\n width: 256px;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 4px;\n}\n.neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n padding: 8px 12px;\n gap: 12px;\n border-radius: var(--neeto-ui-rounded);\n transition: var(--neeto-ui-transition);\n cursor: pointer;\n color: rgb(var(--neeto-ui-white));\n}\n.neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item:hover, .neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item.active {\n background-color: rgb(var(--neeto-ui-gray-700));\n}\n.neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item .neeto-editor-slash-commands__item-content h5 {\n font-size: var(--neeto-ui-text-sm);\n font-weight: var(--neeto-ui-font-semibold);\n line-height: var(--neeto-ui-leading-normal);\n}\n.neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item .neeto-editor-slash-commands__item-content p {\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-300));\n}\n.neeto-editor-mentions__wrapper {\n padding: 8px;\n width: auto;\n min-width: 208px;\n max-height: 256px;\n overflow-y: auto;\n}\n.neeto-editor-mentions__wrapper .neeto-editor-mentions__item {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n padding: 8px;\n transition: var(--neeto-ui-transition);\n cursor: pointer;\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-white));\n border-radius: var(--neeto-ui-rounded);\n gap: 8px;\n}\n.neeto-editor-mentions__wrapper .neeto-editor-mentions__item p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.neeto-editor-mentions__wrapper .neeto-editor-mentions__item:hover, .neeto-editor-mentions__wrapper .neeto-editor-mentions__item.active {\n background-color: rgb(var(--neeto-ui-gray-700));\n}\n.ProseMirror.slash-active p.is-empty:last-child::before {\n content: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAwIDIwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMy44MjEyOSAxNUg1LjA1MTc2VjYuMjQzMTZIOC4yMzA0N1Y1LjEzNTc0SDAuNjQyNTc4VjYuMjQzMTZIMy44MjEyOVYxNVpNOS43MjA3IDE3LjU4NEMxMS4wMjY0IDE3LjU4NCAxMS42MzQ4IDE3LjEwNTUgMTIuMjQzMiAxNS40NTEyTDE1LjEyMTEgNy42MzA4NkgxMy44NzAxTDExLjg1MzUgMTMuNjk0M0gxMS43NDQxTDkuNzIwNyA3LjYzMDg2SDguNDQ5MjJMMTEuMTc2OCAxNS4wMDY4TDExLjA0IDE1LjQ0NDNDMTAuNzczNCAxNi4yOTIgMTAuMzYzMyAxNi41OTk2IDkuNjg2NTIgMTYuNTk5NkM5LjUyMjQ2IDE2LjU5OTYgOS4zMzc4OSAxNi41OTI4IDkuMTk0MzQgMTYuNTY1NFYxNy41NDNDOS4zNTg0IDE3LjU3MDMgOS41NjM0OCAxNy41ODQgOS43MjA3IDE3LjU4NFpNMTYuNjkzNCAxNy40NjA5SDE3Ljg4MjhWMTMuODM3OUgxNy45OTIyQzE4LjM5NTUgMTQuNjI0IDE5LjI3NzMgMTUuMTI5OSAyMC4yODkxIDE1LjEyOTlDMjIuMTYyMSAxNS4xMjk5IDIzLjM3ODkgMTMuNjMyOCAyMy4zNzg5IDExLjMyMjNWMTEuMzA4NkMyMy4zNzg5IDkuMDExNzIgMjIuMTU1MyA3LjUwMDk4IDIwLjI4OTEgNy41MDA5OEMxOS4yNjM3IDcuNTAwOTggMTguNDQzNCA3Ljk4NjMzIDE3Ljk5MjIgOC44MDY2NEgxNy44ODI4VjcuNjMwODZIMTYuNjkzNFYxNy40NjA5Wk0yMC4wMTU2IDE0LjA3NzFDMTguNjc1OCAxNC4wNzcxIDE3Ljg1NTUgMTMuMDI0NCAxNy44NTU1IDExLjMyMjNWMTEuMzA4NkMxNy44NTU1IDkuNjA2NDUgMTguNjc1OCA4LjU1MzcxIDIwLjAxNTYgOC41NTM3MUMyMS4zNjIzIDguNTUzNzEgMjIuMTYyMSA5LjU5Mjc3IDIyLjE2MjEgMTEuMzA4NlYxMS4zMjIzQzIyLjE2MjEgMTMuMDM4MSAyMS4zNjIzIDE0LjA3NzEgMjAuMDE1NiAxNC4wNzcxWk0yOC4yNDYxIDE1LjEyOTlDMjkuOTgyNCAxNS4xMjk5IDMxLjAzNTIgMTQuMTQ1NSAzMS4yODgxIDEzLjE0NzVMMzEuMzAxOCAxMy4wOTI4SDMwLjExMjNMMzAuMDg1IDEzLjE1NDNDMjkuODg2NyAxMy41OTg2IDI5LjI3MTUgMTQuMDcwMyAyOC4yNzM0IDE0LjA3MDNDMjYuOTYwOSAxNC4wNzAzIDI2LjEyMDEgMTMuMTgxNiAyNi4wODU5IDExLjY1NzJIMzEuMzkwNlYxMS4xOTI0QzMxLjM5MDYgOC45OTEyMSAzMC4xNzM4IDcuNTAwOTggMjguMTcwOSA3LjUwMDk4QzI2LjE2OCA3LjUwMDk4IDI0Ljg2OTEgOS4wNTk1NyAyNC44NjkxIDExLjMzNTlWMTEuMzQyOEMyNC44NjkxIDEzLjY1MzMgMjYuMTQwNiAxNS4xMjk5IDI4LjI0NjEgMTUuMTI5OVpNMjguMTY0MSA4LjU2MDU1QzI5LjI1MSA4LjU2MDU1IDMwLjA1NzYgOS4yNTA5OCAzMC4xODA3IDEwLjcwN0gyNi4xMDY0QzI2LjIzNjMgOS4zMDU2NiAyNy4wNzAzIDguNTYwNTUgMjguMTY0MSA4LjU2MDU1WiIgZmlsbD0iIzg3OTI5RCIvPgo8cmVjdCB4PSIzNyIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiByeD0iMyIgZmlsbD0iI0U5RUJFRCIvPgo8cGF0aCBkPSJNNTAuNDI4MiA1LjkxNDQzTDQzLjU3MTggMTQuMDg1NiIgc3Ryb2tlPSIjMjUyQzMyIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik02NC43MjU2IDE1LjA1NDdDNjQuOTU4IDE1LjA1NDcgNjUuMTgzNiAxNS4wMjczIDY1LjQxNiAxNC45ODYzVjEzLjk3NDZDNjUuMTk3MyAxMy45OTUxIDY1LjA4MTEgMTQuMDAyIDY0Ljg2OTEgMTQuMDAyQzY0LjEwMzUgMTQuMDAyIDYzLjgwMjcgMTMuNjUzMyA2My44MDI3IDEyLjc4NTJWOC42MTUyM0g2NS40MTZWNy42MzA4Nkg2My44MDI3VjUuNzIzNjNINjIuNTcyM1Y3LjYzMDg2SDYxLjQxMDJWOC42MTUyM0g2Mi41NzIzVjEzLjA4NTlDNjIuNTcyMyAxNC40OTQxIDYzLjIwOCAxNS4wNTQ3IDY0LjcyNTYgMTUuMDU0N1pNNzAuMTEyMyAxNS4xMjk5QzcyLjIxMDkgMTUuMTI5OSA3My41MDk4IDEzLjY4MDcgNzMuNTA5OCAxMS4zMjIzVjExLjMwODZDNzMuNTA5OCA4Ljk0MzM2IDcyLjIxMDkgNy41MDA5OCA3MC4xMTIzIDcuNTAwOThDNjguMDEzNyA3LjUwMDk4IDY2LjcxNDggOC45NDMzNiA2Ni43MTQ4IDExLjMwODZWMTEuMzIyM0M2Ni43MTQ4IDEzLjY4MDcgNjguMDEzNyAxNS4xMjk5IDcwLjExMjMgMTUuMTI5OVpNNzAuMTEyMyAxNC4wNzcxQzY4LjcxNzggMTQuMDc3MSA2Ny45MzE2IDEzLjA1ODYgNjcuOTMxNiAxMS4zMjIzVjExLjMwODZDNjcuOTMxNiA5LjU2NTQzIDY4LjcxNzggOC41NTM3MSA3MC4xMTIzIDguNTUzNzFDNzEuNTA2OCA4LjU1MzcxIDcyLjI5MyA5LjU2NTQzIDcyLjI5MyAxMS4zMDg2VjExLjMyMjNDNzIuMjkzIDEzLjA1ODYgNzEuNTA2OCAxNC4wNzcxIDcwLjExMjMgMTQuMDc3MVpNODIuMzA3NiAxNS4xMjk5Qzg0LjA3ODEgMTUuMTI5OSA4NS4wNjkzIDE0LjE3OTcgODUuMzcwMSAxMi44NDY3TDg1LjM4MzggMTIuNzcxNUw4NC4yMDggMTIuNzc4M0w4NC4xOTQzIDEyLjgxOTNDODMuOTIwOSAxMy42Mzk2IDgzLjI5MiAxNC4wNzcxIDgyLjMwMDggMTQuMDc3MUM4MC45ODgzIDE0LjA3NzEgODAuMTQwNiAxMi45OTAyIDgwLjE0MDYgMTEuMjk0OVYxMS4yODEyQzgwLjE0MDYgOS42MjAxMiA4MC45NzQ2IDguNTUzNzEgODIuMzAwOCA4LjU1MzcxQzgzLjM2MDQgOC41NTM3MSA4NC4wMTY2IDkuMTQxNiA4NC4yMDEyIDkuODY2MjFMODQuMjA4IDkuODg2NzJIODUuMzkwNkw4NS4zODM4IDkuODQ1N0M4NS4xNjUgOC41MzMyIDg0LjA5MTggNy41MDA5OCA4Mi4zMDA4IDcuNTAwOThDODAuMjM2MyA3LjUwMDk4IDc4LjkyMzggOC45OTEyMSA3OC45MjM4IDExLjI4MTJWMTEuMjk0OUM3OC45MjM4IDEzLjYzMjggODAuMjQzMiAxNS4xMjk5IDgyLjMwNzYgMTUuMTI5OVpNODcuMTk1MyAxNUg4OC4zODQ4VjEwLjYzODdDODguMzg0OCA5LjM0NjY4IDg5LjEyOTkgOC41NTM3MSA5MC4zMDU3IDguNTUzNzFDOTEuNDgxNCA4LjU1MzcxIDkyLjAyODMgOS4xODk0NSA5Mi4wMjgzIDEwLjUxNTZWMTVIOTMuMjE3OFYxMC4yMjg1QzkzLjIxNzggOC40Nzg1MiA5Mi4yOTQ5IDcuNTAwOTggOTAuNjQwNiA3LjUwMDk4Qzg5LjU1MzcgNy41MDA5OCA4OC44NjMzIDcuOTU4OTggODguNDk0MSA4LjczODI4SDg4LjM4NDhWNC43MDUwOEg4Ny4xOTUzVjE1Wk05Ny4zOTQ1IDE1LjEyOTlDOTguMzg1NyAxNS4xMjk5IDk5LjE1ODIgMTQuNjk5MiA5OS42MjMgMTMuOTEzMUg5OS43MzI0VjE1SDEwMC45MjJWOS45NTUwOEMxMDAuOTIyIDguNDIzODMgOTkuOTE3IDcuNTAwOTggOTguMTE5MSA3LjUwMDk4Qzk2LjU0NjkgNy41MDA5OCA5NS40MjU4IDguMjgwMjcgOTUuMjM0NCA5LjQzNTU1TDk1LjIyNzUgOS40NzY1Nkg5Ni40MTdMOTYuNDIzOCA5LjQ1NjA1Qzk2LjYxNTIgOC44ODE4NCA5Ny4xOTYzIDguNTUzNzEgOTguMDc4MSA4LjU1MzcxQzk5LjE3ODcgOC41NTM3MSA5OS43MzI0IDkuMDQ1OSA5OS43MzI0IDkuOTU1MDhWMTAuNjI1TDk3LjYyMDEgMTAuNzU0OUM5NS45MDQzIDEwLjg1NzQgOTQuOTMzNiAxMS42MTYyIDk0LjkzMzYgMTIuOTI4N1YxMi45NDI0Qzk0LjkzMzYgMTQuMjgyMiA5NS45OTMyIDE1LjEyOTkgOTcuMzk0NSAxNS4xMjk5Wk05Ni4xNTA0IDEyLjkxNVYxMi45MDE0Qzk2LjE1MDQgMTIuMTY5OSA5Ni42NDI2IDExLjc3MzQgOTcuNzYzNyAxMS43MDUxTDk5LjczMjQgMTEuNTgyVjEyLjI1MkM5OS43MzI0IDEzLjMwNDcgOTguODUwNiAxNC4wOTc3IDk3LjY0MDYgMTQuMDk3N0M5Ni43ODYxIDE0LjA5NzcgOTYuMTUwNCAxMy42NjAyIDk2LjE1MDQgMTIuOTE1Wk0xMDMuMDk2IDE1SDEwNC4yODVWMTAuNjM4N0MxMDQuMjg1IDkuMzQ2NjggMTA1LjAzIDguNTUzNzEgMTA2LjIwNiA4LjU1MzcxQzEwNy4zODIgOC41NTM3MSAxMDcuOTI5IDkuMTg5NDUgMTA3LjkyOSAxMC41MTU2VjE1SDEwOS4xMThWMTAuMjI4NUMxMDkuMTE4IDguNDc4NTIgMTA4LjE5NSA3LjUwMDk4IDEwNi41NDEgNy41MDA5OEMxMDUuNDU0IDcuNTAwOTggMTA0Ljc2NCA3Ljk1ODk4IDEwNC4zOTUgOC43MzgyOEgxMDQuMjg1VjcuNjMwODZIMTAzLjA5NlYxNVpNMTE0LjMwNyAxNy41OTc3QzExNi4zMTYgMTcuNTk3NyAxMTcuNTg4IDE2LjU0NDkgMTE3LjU4OCAxNC44OTc1VjcuNjMwODZIMTE2LjM5OFY4Ljg0NzY2SDExNi4zMTZDMTE1Ljg2NSA4LjAxMzY3IDExNS4wNTkgNy41MDA5OCAxMTQuMDIgNy41MDA5OEMxMTIuMDkyIDcuNTAwOTggMTEwLjkwMiA4Ljk5ODA1IDExMC45MDIgMTEuMDYyNVYxMS4wNzYyQzExMC45MDIgMTMuMTQwNiAxMTIuMDg1IDE0LjYxNzIgMTEzLjk5MiAxNC42MTcyQzExNS4wMDQgMTQuNjE3MiAxMTUuODM4IDE0LjE1OTIgMTE2LjMwMyAxMy4zNDU3SDExNi40MTJWMTQuODM1OUMxMTYuNDEyIDE1LjkyMjkgMTE1LjYyNiAxNi41NDQ5IDExNC4zMDcgMTYuNTQ0OUMxMTMuMjQ3IDE2LjU0NDkgMTEyLjU5MSAxNi4xNDg0IDExMi40NjEgMTUuNTg3OUwxMTIuNDU0IDE1LjU4MTFIMTExLjIyNEwxMTEuMjEgMTUuNTg3OUMxMTEuMzk1IDE2Ljc5NzkgMTEyLjUyOSAxNy41OTc3IDExNC4zMDcgMTcuNTk3N1pNMTE0LjI1MiAxMy41NjQ1QzExMi44ODUgMTMuNTY0NSAxMTIuMTE5IDEyLjUzOTEgMTEyLjExOSAxMS4wNzYyVjExLjA2MjVDMTEyLjExOSA5LjU5OTYxIDExMi44ODUgOC41NTM3MSAxMTQuMjUyIDguNTUzNzFDMTE1LjYxMiA4LjU1MzcxIDExNi40MzkgOS41OTk2MSAxMTYuNDM5IDExLjA2MjVWMTEuMDc2MkMxMTYuNDM5IDEyLjUzOTEgMTE1LjYxOSAxMy41NjQ1IDExNC4yNTIgMTMuNTY0NVpNMTIyLjgxMSAxNS4xMjk5QzEyNC41NDcgMTUuMTI5OSAxMjUuNiAxNC4xNDU1IDEyNS44NTMgMTMuMTQ3NUwxMjUuODY2IDEzLjA5MjhIMTI0LjY3N0wxMjQuNjQ5IDEzLjE1NDNDMTI0LjQ1MSAxMy41OTg2IDEyMy44MzYgMTQuMDcwMyAxMjIuODM4IDE0LjA3MDNDMTIxLjUyNSAxNC4wNzAzIDEyMC42ODUgMTMuMTgxNiAxMjAuNjUgMTEuNjU3MkgxMjUuOTU1VjExLjE5MjRDMTI1Ljk1NSA4Ljk5MTIxIDEyNC43MzggNy41MDA5OCAxMjIuNzM1IDcuNTAwOThDMTIwLjczMiA3LjUwMDk4IDExOS40MzQgOS4wNTk1NyAxMTkuNDM0IDExLjMzNTlWMTEuMzQyOEMxMTkuNDM0IDEzLjY1MzMgMTIwLjcwNSAxNS4xMjk5IDEyMi44MTEgMTUuMTI5OVpNMTIyLjcyOSA4LjU2MDU1QzEyMy44MTUgOC41NjA1NSAxMjQuNjIyIDkuMjUwOTggMTI0Ljc0NSAxMC43MDdIMTIwLjY3MUMxMjAuODAxIDkuMzA1NjYgMTIxLjYzNSA4LjU2MDU1IDEyMi43MjkgOC41NjA1NVpNMTM1LjQwMiAxNS4xMjk5QzEzNy4yNjkgMTUuMTI5OSAxMzguNDkyIDEzLjYxOTEgMTM4LjQ5MiAxMS4zMjIzVjExLjMwODZDMTM4LjQ5MiA4Ljk5ODA1IDEzNy4yNzUgNy41MDA5OCAxMzUuNDAyIDcuNTAwOThDMTM0LjM5MSA3LjUwMDk4IDEzMy41MDkgOC4wMDY4NCAxMzMuMTA1IDguNzkyOTdIMTMyLjk5NlY0LjcwNTA4SDEzMS44MDdWMTVIMTMyLjk5NlYxMy44MjQySDEzMy4xMDVDMTMzLjU1NyAxNC42NDQ1IDEzNC4zNzcgMTUuMTI5OSAxMzUuNDAyIDE1LjEyOTlaTTEzNS4xMjkgMTQuMDc3MUMxMzMuNzg5IDE0LjA3NzEgMTMyLjk2OSAxMy4wMjQ0IDEzMi45NjkgMTEuMzIyM1YxMS4zMDg2QzEzMi45NjkgOS42MDY0NSAxMzMuNzg5IDguNTUzNzEgMTM1LjEyOSA4LjU1MzcxQzEzNi40NzYgOC41NTM3MSAxMzcuMjc1IDkuNTkyNzcgMTM3LjI3NSAxMS4zMDg2VjExLjMyMjNDMTM3LjI3NSAxMy4wMzgxIDEzNi40NzYgMTQuMDc3MSAxMzUuMTI5IDE0LjA3NzFaTTE0MC40MDYgMTVIMTQxLjU5NlY0LjcwNTA4SDE0MC40MDZWMTVaTTE0Ni45MDcgMTUuMTI5OUMxNDkuMDA2IDE1LjEyOTkgMTUwLjMwNSAxMy42ODA3IDE1MC4zMDUgMTEuMzIyM1YxMS4zMDg2QzE1MC4zMDUgOC45NDMzNiAxNDkuMDA2IDcuNTAwOTggMTQ2LjkwNyA3LjUwMDk4QzE0NC44MDkgNy41MDA5OCAxNDMuNTEgOC45NDMzNiAxNDMuNTEgMTEuMzA4NlYxMS4zMjIzQzE0My41MSAxMy42ODA3IDE0NC44MDkgMTUuMTI5OSAxNDYuOTA3IDE1LjEyOTlaTTE0Ni45MDcgMTQuMDc3MUMxNDUuNTEzIDE0LjA3NzEgMTQ0LjcyNyAxMy4wNTg2IDE0NC43MjcgMTEuMzIyM1YxMS4zMDg2QzE0NC43MjcgOS41NjU0MyAxNDUuNTEzIDguNTUzNzEgMTQ2LjkwNyA4LjU1MzcxQzE0OC4zMDIgOC41NTM3MSAxNDkuMDg4IDkuNTY1NDMgMTQ5LjA4OCAxMS4zMDg2VjExLjMyMjNDMTQ5LjA4OCAxMy4wNTg2IDE0OC4zMDIgMTQuMDc3MSAxNDYuOTA3IDE0LjA3NzFaTTE1NS4xNjUgMTUuMTI5OUMxNTYuOTM2IDE1LjEyOTkgMTU3LjkyNyAxNC4xNzk3IDE1OC4yMjggMTIuODQ2N0wxNTguMjQxIDEyLjc3MTVMMTU3LjA2NSAxMi43NzgzTDE1Ny4wNTIgMTIuODE5M0MxNTYuNzc4IDEzLjYzOTYgMTU2LjE0OSAxNC4wNzcxIDE1NS4xNTggMTQuMDc3MUMxNTMuODQ2IDE0LjA3NzEgMTUyLjk5OCAxMi45OTAyIDE1Mi45OTggMTEuMjk0OVYxMS4yODEyQzE1Mi45OTggOS42MjAxMiAxNTMuODMyIDguNTUzNzEgMTU1LjE1OCA4LjU1MzcxQzE1Ni4yMTggOC41NTM3MSAxNTYuODc0IDkuMTQxNiAxNTcuMDU5IDkuODY2MjFMMTU3LjA2NSA5Ljg4NjcySDE1OC4yNDhMMTU4LjI0MSA5Ljg0NTdDMTU4LjAyMiA4LjUzMzIgMTU2Ljk0OSA3LjUwMDk4IDE1NS4xNTggNy41MDA5OEMxNTMuMDk0IDcuNTAwOTggMTUxLjc4MSA4Ljk5MTIxIDE1MS43ODEgMTEuMjgxMlYxMS4yOTQ5QzE1MS43ODEgMTMuNjMyOCAxNTMuMTAxIDE1LjEyOTkgMTU1LjE2NSAxNS4xMjk5Wk0xNjAuMDUzIDE1SDE2MS4yNDJWMTIuMjA0MUwxNjEuOTMzIDExLjUzNDJMMTY0LjY5NCAxNUgxNjYuMTkxTDE2Mi43NjcgMTAuNzI3NUwxNjUuOTc5IDcuNjMwODZIMTY0LjUzN0wxNjEuMzUyIDEwLjg1MDZIMTYxLjI0MlY0LjcwNTA4SDE2MC4wNTNWMTVaTTE3NC4xNDIgMTUuMDU0N0MxNzQuMzc0IDE1LjA1NDcgMTc0LjYgMTUuMDI3MyAxNzQuODMyIDE0Ljk4NjNWMTMuOTc0NkMxNzQuNjEzIDEzLjk5NTEgMTc0LjQ5NyAxNC4wMDIgMTc0LjI4NSAxNC4wMDJDMTczLjUyIDE0LjAwMiAxNzMuMjE5IDEzLjY1MzMgMTczLjIxOSAxMi43ODUyVjguNjE1MjNIMTc0LjgzMlY3LjYzMDg2SDE3My4yMTlWNS43MjM2M0gxNzEuOTg4VjcuNjMwODZIMTcwLjgyNlY4LjYxNTIzSDE3MS45ODhWMTMuMDg1OUMxNzEuOTg4IDE0LjQ5NDEgMTcyLjYyNCAxNS4wNTQ3IDE3NC4xNDIgMTUuMDU0N1pNMTc3LjIzOCAxNy41ODRDMTc4LjU0NCAxNy41ODQgMTc5LjE1MiAxNy4xMDU1IDE3OS43NjEgMTUuNDUxMkwxODIuNjM5IDcuNjMwODZIMTgxLjM4OEwxNzkuMzcxIDEzLjY5NDNIMTc5LjI2MkwxNzcuMjM4IDcuNjMwODZIMTc1Ljk2N0wxNzguNjk0IDE1LjAwNjhMMTc4LjU1OCAxNS40NDQzQzE3OC4yOTEgMTYuMjkyIDE3Ny44ODEgMTYuNTk5NiAxNzcuMjA0IDE2LjU5OTZDMTc3LjA0IDE2LjU5OTYgMTc2Ljg1NSAxNi41OTI4IDE3Ni43MTIgMTYuNTY1NFYxNy41NDNDMTc2Ljg3NiAxNy41NzAzIDE3Ny4wODEgMTcuNTg0IDE3Ny4yMzggMTcuNTg0Wk0xODQuMjExIDE3LjQ2MDlIMTg1LjRWMTMuODM3OUgxODUuNTFDMTg1LjkxMyAxNC42MjQgMTg2Ljc5NSAxNS4xMjk5IDE4Ny44MDcgMTUuMTI5OUMxODkuNjggMTUuMTI5OSAxOTAuODk2IDEzLjYzMjggMTkwLjg5NiAxMS4zMjIzVjExLjMwODZDMTkwLjg5NiA5LjAxMTcyIDE4OS42NzMgNy41MDA5OCAxODcuODA3IDcuNTAwOThDMTg2Ljc4MSA3LjUwMDk4IDE4NS45NjEgNy45ODYzMyAxODUuNTEgOC44MDY2NEgxODUuNFY3LjYzMDg2SDE4NC4yMTFWMTcuNDYwOVpNMTg3LjUzMyAxNC4wNzcxQzE4Ni4xOTMgMTQuMDc3MSAxODUuMzczIDEzLjAyNDQgMTg1LjM3MyAxMS4zMjIzVjExLjMwODZDMTg1LjM3MyA5LjYwNjQ1IDE4Ni4xOTMgOC41NTM3MSAxODcuNTMzIDguNTUzNzFDMTg4Ljg4IDguNTUzNzEgMTg5LjY4IDkuNTkyNzcgMTg5LjY4IDExLjMwODZWMTEuMzIyM0MxODkuNjggMTMuMDM4MSAxODguODggMTQuMDc3MSAxODcuNTMzIDE0LjA3NzFaTTE5NS43NjQgMTUuMTI5OUMxOTcuNSAxNS4xMjk5IDE5OC41NTMgMTQuMTQ1NSAxOTguODA2IDEzLjE0NzVMMTk4LjgxOSAxMy4wOTI4SDE5Ny42M0wxOTcuNjAzIDEzLjE1NDNDMTk3LjQwNCAxMy41OTg2IDE5Ni43ODkgMTQuMDcwMyAxOTUuNzkxIDE0LjA3MDNDMTk0LjQ3OSAxNC4wNzAzIDE5My42MzggMTMuMTgxNiAxOTMuNjA0IDExLjY1NzJIMTk4LjkwOFYxMS4xOTI0QzE5OC45MDggOC45OTEyMSAxOTcuNjkxIDcuNTAwOTggMTk1LjY4OCA3LjUwMDk4QzE5My42ODYgNy41MDA5OCAxOTIuMzg3IDkuMDU5NTcgMTkyLjM4NyAxMS4zMzU5VjExLjM0MjhDMTkyLjM4NyAxMy42NTMzIDE5My42NTggMTUuMTI5OSAxOTUuNzY0IDE1LjEyOTlaTTE5NS42ODIgOC41NjA1NUMxOTYuNzY5IDguNTYwNTUgMTk3LjU3NSA5LjI1MDk4IDE5Ny42OTggMTAuNzA3SDE5My42MjRDMTkzLjc1NCA5LjMwNTY2IDE5NC41ODggOC41NjA1NSAxOTUuNjgyIDguNTYwNTVaIiBmaWxsPSIjODc5MjlEIi8+Cjwvc3ZnPgo=");\n position: absolute;\n top: -2px;\n height: 0;\n z-index: -1;\n pointer-events: none;\n}\n.neeto-editor {\n max-width: 100% !important;\n border-radius: var(--neeto-ui-rounded);\n white-space: pre-wrap;\n padding: 16px;\n color: rgb(var(--neeto-ui-gray-800));\n background-color: rgb(var(--neeto-ui-white));\n}\n.neeto-editor:focus {\n outline: none;\n}\n.neeto-editor a {\n pointer-events: none;\n}\n.neeto-editor mark {\n background: rgb(var(--neeto-ui-pastel-green));\n border-radius: var(--neeto-ui-rounded-sm);\n padding: 0px 4px;\n color: inherit;\n}\n.neeto-editor [data-variable] {\n display: inline-flex;\n color: rgb(var(--neeto-ui-gray-700));\n background-color: rgb(var(--neeto-ui-gray-200));\n border-radius: var(--neeto-ui-rounded-sm);\n line-height: 1;\n padding: 4px 6px;\n}\n.neeto-editor .ProseMirror-separator {\n display: none;\n}\n.neeto-editor.fixed-menu-active {\n border: thin solid rgb(var(--neeto-ui-gray-300));\n border-top: none;\n border-top-left-radius: 0px;\n border-top-right-radius: 0px;\n}\n.neeto-editor.attachments-active {\n border-bottom: none;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n}\n.neeto-editor .is-empty {\n position: relative;\n}\n.neeto-editor.placeholder-active .is-editor-empty:first-child::before {\n content: attr(data-placeholder);\n float: left;\n color: #ced4da;\n pointer-events: none;\n height: 0;\n}\n.neeto-editor hr {\n margin: 8px 0;\n}\n.neeto-editor .ProseMirror-selectednode {\n outline: 3px solid rgb(var(--neeto-ui-pastel-blue));\n}\n.neeto-editor .has-focus {\n background: var(--focus-background-color);\n transition: background-color 200ms ease;\n}\n.neeto-editor-character-count {\n padding: 4px;\n color: rgb(var(--neeto-ui-gray-600));\n font-size: 12px;\n text-align: right;\n}\n.neeto-editor-error {\n color: rgb(var(--neeto-ui-error-500));\n border-width: 1px;\n border-color: rgb(var(--neeto-ui-error-500));\n border-radius: var(--neeto-ui-rounded);\n}\n.neeto-editor-error:focus-within {\n border-color: rgb(var(--neeto-ui-error-600));\n}\n.neeto-editor-content, .neeto-editor {\n white-space: pre-wrap;\n word-break: break-word;\n -moz-tab-size: 2;\n -o-tab-size: 2;\n tab-size: 2;\n}\n.neeto-editor-content h1, .neeto-editor h1,\n.neeto-editor-content h2,\n.neeto-editor h2,\n.neeto-editor-content h3,\n.neeto-editor h3,\n.neeto-editor-content h4,\n.neeto-editor h4,\n.neeto-editor-content h5,\n.neeto-editor h5,\n.neeto-editor-content h6,\n.neeto-editor h6 {\n font-size: revert;\n margin: 0 0 16px 0;\n}\n.neeto-editor-content p, .neeto-editor p {\n line-height: var(--neeto-ui-leading-normal);\n color: rgb(var(--neeto-ui-gray-700));\n margin-bottom: 8px;\n}\n.neeto-editor-content p:empty::after, .neeto-editor p:empty::after {\n content: " ";\n}\n.neeto-editor-content p:last-child, .neeto-editor p:last-child {\n margin-bottom: 0;\n}\n.neeto-editor-content code, .neeto-editor code {\n padding: 2px;\n font-size: 85%;\n border-radius: var(--neeto-ui-rounded-sm);\n background-color: rgb(var(--neeto-ui-gray-200));\n font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n}\n.neeto-editor-content pre, .neeto-editor pre {\n background-color: #f6f8fa;\n overflow-x: auto;\n font-size: 14px;\n line-height: 20px;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: var(--neeto-ui-rounded-sm);\n padding: 16px;\n}\n.neeto-editor-content pre > code, .neeto-editor pre > code {\n background-color: transparent;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-weight: 400;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\n.neeto-editor-content blockquote, .neeto-editor blockquote {\n font-weight: var(--neeto-ui-font-medium);\n color: rgb(var(--neeto-ui-black));\n border-left-width: 4px;\n border-left-color: #e5e7eb;\n quotes: "“" "”" "‘" "’";\n margin: 8px 0;\n padding-left: 12px;\n}\n.neeto-editor-content blockquote > p::before, .neeto-editor blockquote > p::before {\n content: "" !important;\n}\n.neeto-editor-content blockquote > p::after, .neeto-editor blockquote > p::after {\n content: "" !important;\n}\n.neeto-editor-content ul, .neeto-editor ul,\n.neeto-editor-content ol,\n.neeto-editor ol {\n list-style: revert;\n margin: revert;\n padding: revert;\n}\n.neeto-editor-content ul > li > p, .neeto-editor ul > li > p,\n.neeto-editor-content ol > li > p,\n.neeto-editor ol > li > p {\n margin-top: 0 !important;\n margin-bottom: 0.375rem !important;\n}\n.neeto-editor-content ul li::before, .neeto-editor ul li::before,\n.neeto-editor-content ol li::before,\n.neeto-editor ol li::before {\n background-color: rgb(var(--neeto-ui-black));\n}\n.neeto-editor-content a[href], .neeto-editor a[href] {\n color: rgb(var(--neeto-ui-primary-800));\n font-weight: 500;\n}\n.neeto-editor-content .video-wrapper, .neeto-editor .video-wrapper {\n width: 560px;\n height: 315px;\n margin: auto;\n}\n.neeto-editor-content mark, .neeto-editor mark {\n background: rgb(var(--neeto-ui-pastel-green));\n border-radius: var(--neeto-ui-rounded-sm);\n padding: 0px 4px;\n color: inherit;\n}\n.neeto-editor-content [data-variable], .neeto-editor [data-variable] {\n display: inline-flex;\n color: rgb(var(--neeto-ui-gray-700));\n background-color: rgb(var(--neeto-ui-gray-200));\n border-radius: var(--neeto-ui-rounded-sm);\n line-height: 1;\n padding: 4px 6px;\n}\n.neeto-editor-content [data-type=mention], .neeto-editor [data-type=mention] {\n color: rgb(var(--neeto-ui-primary-800));\n}\n.neeto-editor-content [data-type=special-mention], .neeto-editor [data-type=special-mention] {\n color: rgb(var(--neeto-ui-primary-800));\n}\n.neeto-editor-content--hidden {\n display: none;\n}\n.neeto-editor__image-wrapper {\n display: flex;\n color: unset !important;\n font-weight: normal !important;\n}\n.neeto-editor__image-wrapper figure {\n position: relative;\n display: inline-block;\n}\n.neeto-editor__image-wrapper .neeto-editor__image {\n display: inline-block;\n}\n.neeto-editor__image-wrapper .neeto-editor__image img,\n.neeto-editor__image-wrapper .neeto-editor__image video {\n display: inline-block;\n height: 100%;\n border: 2px solid rgb(var(--neeto-ui-gray-300));\n border-radius: var(--neeto-ui-rounded-lg);\n padding: 4px;\n}\n.neeto-editor__image-wrapper figcaption {\n margin-top: 4px;\n text-align: center;\n font-size: var(--neeto-ui-text-sm);\n font-weight: var(--neeto-ui-font-normal);\n}\n.neeto-editor__image-wrapper figcaption a {\n display: inline-block;\n text-align: center;\n}\n.neeto-editor__image-wrapper figcaption.is-empty div:before {\n position: absolute;\n inset: 0;\n content: "Add a caption";\n color: rgb(var(--neeto-ui-gray-500));\n}\n.neeto-editor__image--left {\n justify-content: flex-start;\n}\n.neeto-editor__image--center {\n justify-content: center;\n}\n.neeto-editor__image--right {\n justify-content: flex-end;\n}\n.neeto-editor-fixed-menu {\n border: thin solid rgb(var(--neeto-ui-gray-300));\n border-radius: var(--neeto-ui-rounded) var(--neeto-ui-rounded) 0px 0px;\n border-bottom: none;\n background-color: rgb(var(--neeto-ui-white));\n text-align: center;\n position: relative;\n}\n.neeto-editor-fixed-menu--independant {\n border-radius: unset;\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n.neeto-editor-fixed-menu__item {\n border-radius: var(--neeto-ui-rounded-sm) !important;\n}\n.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item {\n min-width: -moz-fit-content;\n min-width: fit-content;\n}\n.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item .neeto-ui-btn__icon {\n height: 18px !important;\n width: 18px !important;\n}\n.neeto-editor-fixed-menu__wrapper {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n overflow: auto;\n width: 100%;\n padding: 2px;\n gap: 0 4px;\n}\n.neeto-editor-fixed-menu__variables {\n position: absolute;\n right: 8px;\n bottom: -24px;\n z-index: 10;\n}\n.neeto-editor-fixed-menu__variables .neeto-editor-menu__item {\n padding: 4px;\n border-radius: var(--neeto-ui-rounded-sm);\n background-color: rgb(var(--neeto-ui-gray-800));\n}\n.neeto-editor-fixed-menu__variables .neeto-editor-menu__item:hover, .neeto-editor-fixed-menu__variables .neeto-editor-menu__item.active {\n background-color: rgb(var(--neeto-ui-gray-700));\n}\n.neeto-editor-fixed-menu__right-options {\n display: flex;\n justify-self: flex-end;\n margin-left: auto;\n}\n.neeto-editor-fixed-menu__emoji-dropdown {\n max-height: unset !important;\n}\n.neeto-editor-fixed-menu__separator {\n display: flex;\n height: 28px;\n width: 32px;\n}\n.neeto-editor-fixed-menu__separator span {\n width: 100%;\n}\n.neeto-editor-fixed-menu__separator span:first-child {\n border-right: 1px solid rgb(var(--neeto-ui-gray-200));\n}\n.neeto-editor-menu__item {\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 4px;\n align-items: center;\n padding: 8px;\n cursor: pointer;\n transition: var(--neeto-ui-transition);\n border-radius: 2px;\n}\n.neeto-editor-menu__item p {\n color: rgb(var(--neeto-ui-gray-700));\n font-size: var(--neeto-ui-text-xs);\n line-height: 1;\n white-space: nowrap;\n}\n.neeto-editor-menu__item:hover, .neeto-editor-menu__item.active {\n background-color: rgb(var(--neeto-ui-gray-200));\n}\n.neeto-editor-menu__item:focus, .neeto-editor-menu__item:focus-visible {\n outline: rgb(var(--neeto-ui-gray-300)) auto 1px;\n}\n.neeto-editor-menu__item input[type=color] {\n visibility: hidden;\n height: 0;\n width: 0;\n}\n.neeto-editor-menu__item:disabled {\n opacity: 0.5;\n background-color: rgb(var(--neeto-ui-gray-100));\n}\n.neeto-editor-variables-suggestion {\n padding: 4px 0;\n}\n.neeto-editor-variables-list {\n padding: 4px 8px;\n min-width: 184px;\n max-width: 360px;\n}\n.neeto-editor-variables-list .neeto-editor-variables-block:not(:last-child) {\n margin-bottom: 12px;\n}\n.neeto-editor-variables-list .neeto-editor-variables-block h6 {\n font-size: var(--neeto-ui-text-xs);\n font-weight: var(--neeto-ui-font-medium);\n color: rgb(var(--neeto-ui-gray-600));\n margin-bottom: 4px;\n}\n.neeto-editor-variables-list .neeto-editor-variables-block .neeto-editor-variables-row {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n.neeto-editor-variables-list .neeto-editor-variables-block .neeto-editor-variables-row .neeto-editor-variable {\n padding: 4px 6px;\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-700));\n line-height: 1;\n background-color: rgb(var(--neeto-ui-pastel-blue));\n border-radius: var(--neeto-ui-rounded-sm);\n transition: var(--neeto-ui-transition);\n}\n.neeto-editor-variables-list .neeto-editor-variables-block .neeto-editor-variables-row .neeto-editor-variable:hover {\n background-color: rgb(var(--neeto-ui-info-100));\n}\n.neeto-editor-link__item {\n display: flex !important;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 8px;\n padding: 8px !important;\n}\n.neeto-editor-font-size__wrapper {\n font-weight: var(--neeto-ui-font-normal) !important;\n padding: 8px !important;\n}\n.neeto-editor-bubble-menu {\n position: relative;\n display: flex;\n gap: 1px;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n border-radius: var(--neeto-ui-rounded);\n background: rgb(var(--neeto-ui-gray-800));\n padding: 0 4px;\n}\n.neeto-editor-bubble-menu button.neeto-ui-btn--style-text {\n color: rgb(var(--neeto-ui-gray-200));\n min-width: -moz-fit-content;\n min-width: fit-content;\n}\n.neeto-editor-bubble-menu button.neeto-ui-btn--style-text:hover, .neeto-editor-bubble-menu button.neeto-ui-btn--style-text:active, .neeto-editor-bubble-menu button.neeto-ui-btn--style-text.active {\n color: rgb(var(--neeto-ui-gray-200)) !important;\n background-color: rgb(var(--neeto-ui-gray-600)) !important;\n}\n.neeto-editor-bubble-menu button.neeto-ui-btn--style-secondary {\n min-width: -moz-fit-content;\n min-width: fit-content;\n background-color: rgb(var(--neeto-ui-gray-400));\n}\n.neeto-editor-bubble-menu .neeto-ui-dropdown__popup {\n background-color: rgb(var(--neeto-ui-gray-800));\n}\n.neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn {\n color: rgb(var(--neeto-ui-gray-200)) !important;\n}\n.neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn:hover, .neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn:active, .neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn.active {\n background-color: rgb(var(--neeto-ui-gray-600)) !important;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link {\n width: 256px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px;\n gap: 8px;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input {\n background-color: transparent;\n outline: none;\n line-height: 20px;\n width: 100%;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input::-moz-placeholder {\n color: rgba(var(--neeto-ui-white, 0.4));\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input::placeholder {\n color: rgba(var(--neeto-ui-white, 0.4));\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .ne-btn--icon-only {\n padding: 0;\n min-height: 0;\n opacity: 0.8;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .ne-btn--icon-only:hover {\n opacity: 1;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown-target {\n display: flex;\n align-items: center;\n gap: 4px;\n white-space: nowrap;\n font-size: var(--neeto-ui-text-xs);\n line-height: var(--neeto-ui-leading-normal);\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item {\n width: 100%;\n text-align: left;\n padding: 8px 12px;\n font-size: var(--neeto-ui-text-xs);\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item:first-child {\n border-top-left-radius: var(--neeto-ui-rounded);\n border-top-right-radius: var(--neeto-ui-rounded);\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item:last-child {\n border-bottom-left-radius: var(--neeto-ui-rounded);\n border-bottom-right-radius: var(--neeto-ui-rounded);\n}\n.neeto-editor-bubble-menu-animate-shake {\n animation: 1s linear infinite alternate both shake;\n}\n.neeto-editor__image-menu .neeto-ui-dropdown__popup {\n display: flex;\n min-width: unset;\n}\n.neeto-editor__image-menu .neeto-ui-dropdown__popup .neeto-ui-btn .neeto-ui-btn__icon {\n height: 18px !important;\n width: 18px !important;\n}\n.neeto-editor__image-menu-btn {\n position: absolute !important;\n top: 4px;\n right: 4px;\n z-index: 1;\n padding: 2px !important;\n}\n.ne-media-uploader {\n display: flex;\n flex-direction: column;\n min-height: 184px;\n}\n.ne-media-uploader .ne-tab__wrapper .ne-tab {\n min-width: 88px;\n}\n.ne-media-uploader .ne-media-uploader__content {\n flex-grow: 1;\n display: flex;\n padding: 16px;\n}\n.ne-media-uploader .ne-media-uploader__progress {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n text-align: center;\n}\n.ne-media-uploader .ne-media-uploader__progress-title, .ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-label {\n color: rgb(var(--neeto-ui-gray-700));\n font-size: var(--neeto-ui-text-sm);\n margin-bottom: 4px;\n}\n.ne-media-uploader .ne-media-uploader__progress-file, .ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-note {\n color: rgb(var(--neeto-ui-gray-400));\n font-size: var(--neeto-ui-text-xs);\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n border: 1px dashed rgb(var(--neeto-ui-gray-400));\n box-sizing: border-box;\n border-radius: var(--neeto-ui-rounded);\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-Root {\n width: 100%;\n height: 100%;\n background-color: rgb(var(--neeto-ui-white));\n cursor: pointer;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-Root::-moz-focus-inner {\n border: 0;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n line-height: 1.4;\n text-align: center;\n font-weight: var(--neeto-ui-font-normal);\n margin: 0;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-arrow {\n visibility: hidden;\n display: none;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop--isDraggingOver {\n background-color: rgb(var(--neeto-ui-gray-200));\n border: 2px dashed rgb(var(--neeto-ui-primary-500));\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-browse {\n color: rgb(var(--neeto-ui-primary-500));\n font-size: var(--neeto-ui-text-sm);\n font-weight: var(--neeto-ui-font-semibold);\n cursor: pointer;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd--error {\n color: rgb(var(--neeto-ui-error));\n font-size: var(--neeto-ui-text-xs);\n margin-top: 12px;\n text-align: center;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper {\n width: 100%;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-container {\n max-height: 50vh;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-search {\n padding: 0px 8px;\n margin-bottom: 16px;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery {\n width: 100%;\n right: -8px;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__loader {\n display: flex;\n justify-content: center;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item {\n width: 33.3%;\n padding-right: 16px;\n padding-bottom: 16px;\n float: left;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder {\n width: 100%;\n position: relative;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner {\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: rgb(var(--neeto-ui-gray-100));\n border-radius: var(--neeto-ui-rounded-sm);\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner img {\n height: 100%;\n width: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n animation: fade-in 1.2s 1s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n border-radius: var(--neeto-ui-rounded);\n position: relative;\n cursor: pointer;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner a {\n opacity: 0;\n position: absolute;\n left: 8px;\n bottom: 8px;\n margin: auto;\n color: rgb(var(--neeto-ui-white));\n font-size: 12px;\n font-weight: var(--neeto-ui-font-normal);\n line-height: 1;\n text-transform: capitalize;\n transition: var(--neeto-ui-transition);\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner a:hover {\n text-decoration: underline;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner:hover a {\n opacity: 1;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__text {\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-800));\n text-align: center;\n margin-top: 12px;\n}\n.neeto-editor-progress-bar__wrapper {\n width: 100%;\n max-width: 256px;\n margin-top: 10px;\n}\n.neeto-editor-progress-bar__wrapper .neeto-editor-progress-bar__percent {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.neeto-editor-progress-bar__wrapper .neeto-editor-progress-bar__percent p {\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-800));\n}\n.neeto-editor-progress-bar__wrapper .neeto-editor-progress-bar__indicator {\n position: relative;\n width: 100%;\n height: 6px;\n border-radius: var(--neeto-ui-rounded-full);\n overflow: hidden;\n background-color: rgba(var(--neeto-ui-primary-500), 0.2);\n margin-top: 4px;\n}\n.neeto-editor-progress-bar__wrapper .neeto-editor-progress-bar__indicator-inner {\n height: 100%;\n background-color: rgb(var(--neeto-ui-primary-500));\n}\n.neeto-editor-url-form__wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n padding: 0 24px;\n}\n.neeto-editor-url-form__wrapper .neeto-ui-input__wrapper {\n width: 100%;\n flex-grow: 0;\n margin-bottom: 16px;\n}\n.neeto-editor-emoji {\n font-family: apple color emoji, segoe ui emoji, noto color emoji, android emoji, emojisymbols, emojione mozilla, twemoji mozilla, segoe ui symbol;\n}\n.emoji-mart.emoji-mart-light {\n font-size: 14px;\n color: rgb(var(--neeto-ui-gray-800));\n border: none;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-bar .emoji-mart-anchors .emoji-mart-anchor {\n color: rgb(var(--neeto-ui-gray-500));\n}\n.emoji-mart.emoji-mart-light .emoji-mart-bar .emoji-mart-anchors .emoji-mart-anchor svg {\n margin: auto;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-bar .emoji-mart-anchors .emoji-mart-anchor .emoji-mart-anchor-bar {\n background-color: rgb(var(--neeto-ui-gray-800)) !important;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-bar .emoji-mart-anchors .emoji-mart-anchor.emoji-mart-anchor-selected {\n color: rgb(var(--neeto-ui-gray-800)) !important;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-search input {\n border-radius: var(--neeto-ui-rounded-sm);\n}\n.emoji-mart.emoji-mart-light .emoji-mart-category .emoji-mart-category-label span {\n padding-top: 8px;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-category .emoji-mart-emoji span {\n cursor: pointer;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-category .emoji-mart-emoji:hover::before {\n background-color: rgb(var(--neeto-ui-gray-200));\n border-radius: var(--neeto-ui-rounded-sm);\n}\n.emoji-mart.emoji-mart-light .emoji-mart-scroll {\n height: 264px;\n padding-bottom: 0px;\n}\n.neeto-editor-emoji-suggestion {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n padding: 4px;\n gap: 2px;\n font-family: apple color emoji, segoe ui emoji, noto color emoji, android emoji, emojisymbols, emojione mozilla, twemoji mozilla, segoe ui symbol;\n}\n.neeto-editor-emoji-suggestion p {\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-800));\n}\n.neeto-editor-emoji-suggestion span {\n height: 16px !important;\n width: 16px !important;\n font-size: 10px;\n}\n.neeto-editor-emoji-suggestion .neeto-editor-emoji-suggestion__item {\n padding: 6px;\n font-size: var(--neeto-ui-text-2xl);\n transition: var(--neeto-ui-transition);\n border-radius: var(--neeto-ui-rounded-sm);\n line-height: 1;\n cursor: pointer;\n}\n.neeto-editor-emoji-suggestion .neeto-editor-emoji-suggestion__item:hover {\n background-color: rgb(var(--neeto-ui-gray-200));\n}\n.neeto-editor-emoji-suggestion .neeto-editor-emoji-suggestion__item--selected {\n background-color: rgb(var(--neeto-ui-gray-200));\n}\n.ne-media-editor {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1.25rem;\n}\n.ne-media-editor button {\n margin-right: auto;\n}\n.ne-media-editor img,\n.ne-media-editor video {\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 208px;\n max-height: 400px;\n height: -moz-fit-content;\n height: fit-content;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.ne-media-editor__error {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n min-height: 288px;\n max-height: 400px;\n width: 100%;\n padding: 24px;\n background: rgb(var(--neeto-ui-gray-100));\n border-radius: var(--neeto-ui-rounded-sm);\n gap: 8px;\n}\n.ne-media-editor__error h2 {\n font-size: var(--neeto-ui-text-lg);\n font-weight: var(--neeto-ui-font-medium);\n}\n.ne-media-editor .neeto-ui-input__wrapper {\n width: 100%;\n}\n.ne-media-editor .ne-media-editor__footer {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 0.5rem;\n}\n.ne-media-editor .ne-media-editor__footer button {\n margin-right: 0;\n}\n.ne-attachments {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.ne-attachments__items {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.ne-attachments__attachment {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 2px 4px 8px;\n border-radius: var(--neeto-ui-rounded-sm);\n border: 1px solid rgb(var(--neeto-ui-gray-200));\n background-color: rgb(var(--neeto-ui-white));\n width: 256px;\n}\n.ne-attachments__attachment-file-icon {\n height: auto;\n width: 15px;\n}\n.ne-attachments__attachment__progress {\n display: flex;\n opacity: 0.5;\n justify-content: space-between;\n width: 76%;\n}\n.ne-attachments__attachment__progress p {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n}\n.ne-attachments__attachment__progress p:nth-child(2) {\n width: -moz-fit-content;\n width: fit-content;\n}\n.ne-attachments__attachment__progress-icon {\n width: 15px;\n height: auto;\n}\n.ne-attachments__attachment p {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n width: 75%;\n}\n.ne-attachments input[type=file] {\n display: none;\n}\n.ne-attachments--integrated {\n padding: 0px 6px;\n border: 1px solid rgb(var(--neeto-ui-gray-300));\n border-top: none;\n border-radius: 0px 0px var(--neeto-ui-rounded) var(--neeto-ui-rounded);\n}\n.ne-attachments__wrapper {\n position: relative;\n}\n.ne-attachments__wrapper.uppy-is-drag-over::after {\n position: absolute;\n inset: 7px;\n border-radius: 5px;\n background-color: rgba(var(--neeto-ui-gray-300), 0.5);\n border: 3px dashed rgb(var(--neeto-ui-gray-500));\n color: rgb(var(--neeto-ui-gray-700));\n content: "Drop the file here";\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 1.2rem;\n font-weight: bold;\n}\n.ProseMirror {\n overflow-y: auto;\n height: 100%;\n white-space: break-spaces;\n}\n.ProseMirror:focus {\n outline: none;\n}',{});const BF=(e,t)=>{let{name:r,...i}=e;return n.createElement(we,{name:r},(e=>{let{field:o,form:s,meta:a}=e;return n.createElement(RF,yb({error:a.touched?a.error:"",initialValue:o.value,ref:t,onBlur:()=>s.setFieldTouched(r,!0),onChange:e=>s.setFieldValue(r,e)},i))}))};var PF=c(BF);
|
|
43
|
-
/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */function UF(e){return UF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UF(e)}function HF(e,t){return HF=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},HF(e,t)}function $F(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function VF(e,t,n){return VF=$F()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&HF(i,n.prototype),i},VF.apply(null,arguments)}function WF(e){return function(e){if(Array.isArray(e))return qF(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return qF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qF(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var KF=Object.hasOwnProperty,GF=Object.setPrototypeOf,YF=Object.isFrozen,QF=Object.getPrototypeOf,JF=Object.getOwnPropertyDescriptor,ZF=Object.freeze,XF=Object.seal,ez=Object.create,tz="undefined"!=typeof Reflect&&Reflect,nz=tz.apply,rz=tz.construct;nz||(nz=function(e,t,n){return e.apply(t,n)}),ZF||(ZF=function(e){return e}),XF||(XF=function(e){return e}),rz||(rz=function(e,t){return VF(e,WF(t))});var iz,oz=mz(Array.prototype.forEach),sz=mz(Array.prototype.pop),az=mz(Array.prototype.push),lz=mz(String.prototype.toLowerCase),cz=mz(String.prototype.match),uz=mz(String.prototype.replace),dz=mz(String.prototype.indexOf),pz=mz(String.prototype.trim),hz=mz(RegExp.prototype.test),fz=(iz=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return rz(iz,t)});function mz(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return nz(e,t,r)}}function gz(e,t,n){n=n||lz,GF&&GF(e,null);for(var r=t.length;r--;){var i=t[r];if("string"==typeof i){var o=n(i);o!==i&&(YF(t)||(t[r]=o),i=o)}e[i]=!0}return e}function bz(e){var t,n=ez(null);for(t in e)nz(KF,e,[t])&&(n[t]=e[t]);return n}function yz(e,t){for(;null!==e;){var n=JF(e,t);if(n){if(n.get)return mz(n.get);if("function"==typeof n.value)return mz(n.value)}e=QF(e)}return function(e){return console.warn("fallback value for",e),null}}var vz=ZF(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),wz=ZF(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_z=ZF(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),xz=ZF(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ez=ZF(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),kz=ZF(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Mz=ZF(["#text"]),Dz=ZF(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Cz=ZF(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Sz=ZF(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Az=ZF(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Nz=XF(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Oz=XF(/<%[\w\W]*|[\w\W]*%>/gm),Tz=XF(/^data-[\-\w.\u00B7-\uFFFF]/),Iz=XF(/^aria-[\-\w]+$/),Lz=XF(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fz=XF(/^(?:\w+script|data):/i),zz=XF(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jz=XF(/^html$/i),Rz=function(){return"undefined"==typeof window?null:window},Bz=function(e,t){if("object"!==UF(e)||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var Pz=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rz(),n=function(t){return e(t)};if(n.version="2.4.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,p=t.HTMLFormElement,h=t.DOMParser,f=t.trustedTypes,m=l.prototype,g=yz(m,"cloneNode"),b=yz(m,"nextSibling"),y=yz(m,"childNodes"),v=yz(m,"parentNode");if("function"==typeof s){var w=i.createElement("template");w.content&&w.content.ownerDocument&&(i=w.content.ownerDocument)}var _=Bz(f,r),x=_?_.createHTML(""):"",E=i,k=E.implementation,M=E.createNodeIterator,D=E.createDocumentFragment,C=E.getElementsByTagName,S=r.importNode,A={};try{A=bz(i).documentMode?i.documentMode:{}}catch(e){}var N={};n.isSupported="function"==typeof v&&k&&void 0!==k.createHTMLDocument&&9!==A;var O,T,I=Nz,L=Oz,F=Tz,z=Iz,j=Fz,R=zz,B=Lz,P=null,U=gz({},[].concat(WF(vz),WF(wz),WF(_z),WF(Ez),WF(Mz))),H=null,$=gz({},[].concat(WF(Dz),WF(Cz),WF(Sz),WF(Az))),V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,q=null,K=!0,G=!0,Y=!1,Q=!1,J=!1,Z=!1,X=!1,ee=!1,te=!1,ne=!1,re=!0,ie=!1,oe="user-content-",se=!0,ae=!1,le={},ce=null,ue=gz({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),de=null,pe=gz({},["audio","video","img","source","image","track"]),he=null,fe=gz({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml",ye=be,ve=!1,we=["application/xhtml+xml","text/html"],_e="text/html",xe=null,Ee=i.createElement("form"),ke=function(e){return e instanceof RegExp||e instanceof Function},Me=function(e){xe&&xe===e||(e&&"object"===UF(e)||(e={}),e=bz(e),O=O=-1===we.indexOf(e.PARSER_MEDIA_TYPE)?_e:e.PARSER_MEDIA_TYPE,T="application/xhtml+xml"===O?function(e){return e}:lz,P="ALLOWED_TAGS"in e?gz({},e.ALLOWED_TAGS,T):U,H="ALLOWED_ATTR"in e?gz({},e.ALLOWED_ATTR,T):$,he="ADD_URI_SAFE_ATTR"in e?gz(bz(fe),e.ADD_URI_SAFE_ATTR,T):fe,de="ADD_DATA_URI_TAGS"in e?gz(bz(pe),e.ADD_DATA_URI_TAGS,T):pe,ce="FORBID_CONTENTS"in e?gz({},e.FORBID_CONTENTS,T):ue,W="FORBID_TAGS"in e?gz({},e.FORBID_TAGS,T):{},q="FORBID_ATTR"in e?gz({},e.FORBID_ATTR,T):{},le="USE_PROFILES"in e&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=e.SAFE_FOR_TEMPLATES||!1,J=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||B,ye=e.NAMESPACE||be,e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(G=!1),te&&(ee=!0),le&&(P=gz({},WF(Mz)),H=[],!0===le.html&&(gz(P,vz),gz(H,Dz)),!0===le.svg&&(gz(P,wz),gz(H,Cz),gz(H,Az)),!0===le.svgFilters&&(gz(P,_z),gz(H,Cz),gz(H,Az)),!0===le.mathMl&&(gz(P,Ez),gz(H,Sz),gz(H,Az))),e.ADD_TAGS&&(P===U&&(P=bz(P)),gz(P,e.ADD_TAGS,T)),e.ADD_ATTR&&(H===$&&(H=bz(H)),gz(H,e.ADD_ATTR,T)),e.ADD_URI_SAFE_ATTR&&gz(he,e.ADD_URI_SAFE_ATTR,T),e.FORBID_CONTENTS&&(ce===ue&&(ce=bz(ce)),gz(ce,e.FORBID_CONTENTS,T)),se&&(P["#text"]=!0),J&&gz(P,["html","head","body"]),P.table&&(gz(P,["tbody"]),delete W.tbody),ZF&&ZF(e),xe=e)},De=gz({},["mi","mo","mn","ms","mtext"]),Ce=gz({},["foreignobject","desc","title","annotation-xml"]),Se=gz({},["title","style","font","a","script"]),Ae=gz({},wz);gz(Ae,_z),gz(Ae,xz);var Ne=gz({},Ez);gz(Ne,kz);var Oe=function(e){var t=v(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});var n=lz(e.tagName),r=lz(t.tagName);return e.namespaceURI===ge?t.namespaceURI===be?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===r||De[r]):Boolean(Ae[n]):e.namespaceURI===me?t.namespaceURI===be?"math"===n:t.namespaceURI===ge?"math"===n&&Ce[r]:Boolean(Ne[n]):e.namespaceURI===be&&(!(t.namespaceURI===ge&&!Ce[r])&&(!(t.namespaceURI===me&&!De[r])&&(!Ne[n]&&(Se[n]||!Ae[n]))))},Te=function(e){az(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=x}catch(t){e.remove()}}},Ie=function(e,t){try{az(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){az(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(ee||te)try{Te(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){var t,n;if(X)e="<remove></remove>"+e;else{var r=cz(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===O&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=_?_.createHTML(e):e;if(ye===be)try{t=(new h).parseFromString(o,O)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(ye,"template",null);try{t.documentElement.innerHTML=ve?"":o}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),ye===be?C.call(t,J?"html":"body")[0]:J?t.documentElement:s},Fe=function(e){return M.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},ze=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},je=function(e){return"object"===UF(a)?e instanceof a:e&&"object"===UF(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Re=function(e,t,r){N[e]&&oz(N[e],(function(e){e.call(n,t,r,xe)}))},Be=function(e){var t;if(Re("beforeSanitizeElements",e,null),ze(e))return Te(e),!0;if(hz(/[\u0080-\uFFFF]/,e.nodeName))return Te(e),!0;var r=T(e.nodeName);if(Re("uponSanitizeElement",e,{tagName:r,allowedTags:P}),e.hasChildNodes()&&!je(e.firstElementChild)&&(!je(e.content)||!je(e.content.firstElementChild))&&hz(/<[/\w]/g,e.innerHTML)&&hz(/<[/\w]/g,e.textContent))return Te(e),!0;if("select"===r&&hz(/<template/i,e.innerHTML))return Te(e),!0;if(!P[r]||W[r]){if(!W[r]&&Ue(r)){if(V.tagNameCheck instanceof RegExp&&hz(V.tagNameCheck,r))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(r))return!1}if(se&&!ce[r]){var i=v(e)||e.parentNode,o=y(e)||e.childNodes;if(o&&i)for(var s=o.length-1;s>=0;--s)i.insertBefore(g(o[s],!0),b(e))}return Te(e),!0}return e instanceof l&&!Oe(e)?(Te(e),!0):"noscript"!==r&&"noembed"!==r||!hz(/<\/no(script|embed)/i,e.innerHTML)?(Q&&3===e.nodeType&&(t=e.textContent,t=uz(t,I," "),t=uz(t,L," "),e.textContent!==t&&(az(n.removed,{element:e.cloneNode()}),e.textContent=t)),Re("afterSanitizeElements",e,null),!1):(Te(e),!0)},Pe=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in i||n in Ee))return!1;if(G&&!q[t]&&hz(F,t));else if(K&&hz(z,t));else if(!H[t]||q[t]){if(!(Ue(e)&&(V.tagNameCheck instanceof RegExp&&hz(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&hz(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&hz(V.tagNameCheck,n)||V.tagNameCheck instanceof Function&&V.tagNameCheck(n))))return!1}else if(he[t]);else if(hz(B,uz(n,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==dz(n,"data:")||!de[e]){if(Y&&!hz(j,uz(n,R,"")));else if(n)return!1}else;return!0},Ue=function(e){return e.indexOf("-")>0},He=function(e){var t,r,i,o;Re("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(o=s.length;o--;){var l=t=s[o],c=l.name,u=l.namespaceURI;if(r="value"===c?t.value:pz(t.value),i=T(c),a.attrName=i,a.attrValue=r,a.keepAttr=!0,a.forceKeepAttr=void 0,Re("uponSanitizeAttribute",e,a),r=a.attrValue,!a.forceKeepAttr&&(Ie(c,e),a.keepAttr))if(hz(/\/>/i,r))Ie(c,e);else{Q&&(r=uz(r,I," "),r=uz(r,L," "));var d=T(e.nodeName);if(Pe(d,i,r)){if(!ie||"id"!==i&&"name"!==i||(Ie(c,e),r=oe+r),_&&"object"===UF(f)&&"function"==typeof f.getAttributeType)if(u);else switch(f.getAttributeType(d,i)){case"TrustedHTML":r=_.createHTML(r);break;case"TrustedScriptURL":r=_.createScriptURL(r)}try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),sz(n.removed)}catch(e){}}}}Re("afterSanitizeAttributes",e,null)}},$e=function e(t){var n,r=Fe(t);for(Re("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Re("uponSanitizeShadowNode",n,null),Be(n)||(n.content instanceof o&&e(n.content),He(n));Re("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){var i,s,l,c,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ve=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!je(e)){if("function"!=typeof e.toString)throw fz("toString is not a function");if("string"!=typeof(e=e.toString()))throw fz("dirty is not a string, aborting")}if(!n.isSupported){if("object"===UF(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(je(e))return t.toStaticHTML(e.outerHTML)}return e}if(Z||Me(d),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){var p=T(e.nodeName);if(!P[p]||W[p])throw fz("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)1===(s=(i=Le("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!ee&&!Q&&!J&&-1===e.indexOf("<"))return _&&ne?_.createHTML(e):e;if(!(i=Le(e)))return ee?null:ne?x:""}i&&X&&Te(i.firstChild);for(var h=Fe(ae?e:i);l=h.nextNode();)3===l.nodeType&&l===c||Be(l)||(l.content instanceof o&&$e(l.content),He(l),c=l);if(c=null,ae)return e;if(ee){if(te)for(u=D.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return H.shadowroot&&(u=S.call(r,u,!0)),u}var f=J?i.outerHTML:i.innerHTML;return J&&P["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&hz(jz,i.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+f),Q&&(f=uz(f,I," "),f=uz(f,L," ")),_&&ne?_.createHTML(f):f},n.setConfig=function(e){Me(e),Z=!0},n.clearConfig=function(){xe=null,Z=!1},n.isValidAttribute=function(e,t,n){xe||Me({});var r=T(e),i=T(t);return Pe(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(N[e]=N[e]||[],az(N[e],t))},n.removeHook=function(e){if(N[e])return sz(N[e])},n.removeHooks=function(e){N[e]&&(N[e]=[])},n.removeAllHooks=function(){N={}},n}();const Uz=e=>{let{content:t="",variables:r=[],className:i,...o}=e;const s=Jo((e=>e.replace(Go,((e,t)=>{const n=Wo.highlightAuto(t.replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&")).children.map(Qo);return`<pre><code>${p(n)}</code></pre>`})))(t),r),a=Pz.sanitize;return n.createElement("div",yb({"data-cy":"neeto-editor-content",className:_s(qo,{[i]:i}),dangerouslySetInnerHTML:{__html:a(s,Ko)}},o))};export{wy as Attachments,RF as Editor,Uz as EditorContent,PF as FormikEditor,zF as Menu,es as isEditorEmpty,ar as isEditorOverlaysActive,Jo as substituteVariables};
|
|
42
|
+
*/!function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,p=2,h=4,f=1,m=2,g=1,b=2,y=4,v=8,w=16,_=32,x=64,E=128,k=256,M=512,D=30,C="...",S=800,A=16,N=1,O=2,T=3,I=1/0,L=9007199254740991,F=17976931348623157e292,z=0/0,j=4294967295,R=j-1,B=j>>>1,P=[["ary",E],["bind",g],["bindKey",b],["curry",v],["curryRight",w],["flip",M],["partial",_],["partialRight",x],["rearg",k]],U="[object Arguments]",H="[object Array]",$="[object AsyncFunction]",V="[object Boolean]",W="[object Date]",q="[object DOMException]",K="[object Error]",G="[object Function]",Y="[object GeneratorFunction]",Q="[object Map]",J="[object Number]",Z="[object Null]",X="[object Object]",ee="[object Promise]",te="[object Proxy]",ne="[object RegExp]",re="[object Set]",ie="[object String]",oe="[object Symbol]",se="[object Undefined]",ae="[object WeakMap]",le="[object WeakSet]",ce="[object ArrayBuffer]",ue="[object DataView]",de="[object Float32Array]",pe="[object Float64Array]",he="[object Int8Array]",fe="[object Int16Array]",me="[object Int32Array]",ge="[object Uint8Array]",be="[object Uint8ClampedArray]",ye="[object Uint16Array]",ve="[object Uint32Array]",we=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,ke=/[&<>"']/g,Me=RegExp(Ee.source),De=RegExp(ke.source),Ce=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Ae=/<%=([\s\S]+?)%>/g,Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oe=/^\w*$/,Te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ie=/[\\^$.*+?()[\]{}|]/g,Le=RegExp(Ie.source),Fe=/^\s+/,ze=/\s/,je=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Re=/\{\n\/\* \[wrapped with (.+)\] \*/,Be=/,? & /,Pe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ue=/[()=,{}\[\]\/\s]/,He=/\\(\\)?/g,$e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ve=/\w*$/,We=/^[-+]0x[0-9a-f]+$/i,qe=/^0b[01]+$/i,Ke=/^\[object .+?Constructor\]$/,Ge=/^0o[0-7]+$/i,Ye=/^(?:0|[1-9]\d*)$/,Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Je=/($^)/,Ze=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",et="\\u0300-\\u036f"+"\\ufe20-\\ufe2f"+"\\u20d0-\\u20ff",tt="\\u2700-\\u27bf",nt="a-z\\xdf-\\xf6\\xf8-\\xff",rt="A-Z\\xc0-\\xd6\\xd8-\\xde",it="\\ufe0e\\ufe0f",ot="\\xac\\xb1\\xd7\\xf7"+"\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf"+"\\u2000-\\u206f"+" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",st="['’]",at="["+Xe+"]",lt="["+ot+"]",ct="["+et+"]",ut="\\d+",dt="["+tt+"]",pt="["+nt+"]",ht="[^"+Xe+ot+ut+tt+nt+rt+"]",ft="\\ud83c[\\udffb-\\udfff]",mt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",bt="[\\ud800-\\udbff][\\udc00-\\udfff]",yt="["+rt+"]",vt="\\u200d",wt="(?:"+pt+"|"+ht+")",_t="(?:"+yt+"|"+ht+")",xt="(?:"+st+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+st+"(?:D|LL|M|RE|S|T|VE))?",kt="(?:"+ct+"|"+ft+")"+"?",Mt="["+it+"]?",Dt=Mt+kt+("(?:"+vt+"(?:"+[mt,gt,bt].join("|")+")"+Mt+kt+")*"),Ct="(?:"+[dt,gt,bt].join("|")+")"+Dt,St="(?:"+[mt+ct+"?",ct,gt,bt,at].join("|")+")",At=RegExp(st,"g"),Nt=RegExp(ct,"g"),Ot=RegExp(ft+"(?="+ft+")|"+St+Dt,"g"),Tt=RegExp([yt+"?"+pt+"+"+xt+"(?="+[lt,yt,"$"].join("|")+")",_t+"+"+Et+"(?="+[lt,yt+wt,"$"].join("|")+")",yt+"?"+wt+"+"+xt,yt+"+"+Et,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ut,Ct].join("|"),"g"),It=RegExp("["+vt+Xe+et+it+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ft=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zt=-1,jt={};jt[de]=jt[pe]=jt[he]=jt[fe]=jt[me]=jt[ge]=jt[be]=jt[ye]=jt[ve]=!0,jt[U]=jt[H]=jt[ce]=jt[V]=jt[ue]=jt[W]=jt[K]=jt[G]=jt[Q]=jt[J]=jt[X]=jt[ne]=jt[re]=jt[ie]=jt[ae]=!1;var Rt={};Rt[U]=Rt[H]=Rt[ce]=Rt[ue]=Rt[V]=Rt[W]=Rt[de]=Rt[pe]=Rt[he]=Rt[fe]=Rt[me]=Rt[Q]=Rt[J]=Rt[X]=Rt[ne]=Rt[re]=Rt[ie]=Rt[oe]=Rt[ge]=Rt[be]=Rt[ye]=Rt[ve]=!0,Rt[K]=Rt[G]=Rt[ae]=!1;var Bt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pt=parseFloat,Ut=parseInt,Ht="object"==typeof yi&&yi&&yi.Object===Object&&yi,$t="object"==typeof self&&self&&self.Object===Object&&self,Vt=Ht||$t||Function("return this")(),Wt=t&&!t.nodeType&&t,qt=Wt&&"object"=="object"&&e&&!e.nodeType&&e,Kt=qt&&qt.exports===Wt,Gt=Kt&&Ht.process,Yt=function(){try{var e=qt&&qt.require&&qt.require("util").types;return e||Gt&&Gt.binding&&Gt.binding("util")}catch(e){}}(),Qt=Yt&&Yt.isArrayBuffer,Jt=Yt&&Yt.isDate,Zt=Yt&&Yt.isMap,Xt=Yt&&Yt.isRegExp,en=Yt&&Yt.isSet,tn=Yt&&Yt.isTypedArray;function nn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function rn(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function on(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function sn(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function an(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ln(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function cn(e,t){return!!(null==e?0:e.length)&&vn(e,t,0)>-1}function un(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function dn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function pn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function hn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function fn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function mn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var gn=En("length");function bn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function yn(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function vn(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):yn(e,_n,n)}function wn(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function _n(e){return e!=e}function xn(e,t){var n=null==e?0:e.length;return n?Dn(e,t)/n:z}function En(e){return function(t){return null==t?n:t[e]}}function kn(e){return function(t){return null==e?n:e[t]}}function Mn(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Dn(e,t){for(var r,i=-1,o=e.length;++i<o;){var s=t(e[i]);s!==n&&(r=r===n?s:r+s)}return r}function Cn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Sn(e){return e?e.slice(0,qn(e)+1).replace(Fe,""):e}function An(e){return function(t){return e(t)}}function Nn(e,t){return dn(t,(function(t){return e[t]}))}function On(e,t){return e.has(t)}function Tn(e,t){for(var n=-1,r=e.length;++n<r&&vn(t,e[n],0)>-1;);return n}function In(e,t){for(var n=e.length;n--&&vn(t,e[n],0)>-1;);return n}function Ln(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Fn=kn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),zn=kn({"&":"&","<":"<",">":">",'"':""","'":"'"});function jn(e){return"\\"+Bt[e]}function Rn(e){return It.test(e)}function Bn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Pn(e,t){return function(n){return e(t(n))}}function Un(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==u||(e[n]=u,o[i++]=n)}return o}function Hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function $n(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Vn(e){return Rn(e)?function(e){var t=Ot.lastIndex=0;for(;Ot.test(e);)++t;return t}(e):gn(e)}function Wn(e){return Rn(e)?function(e){return e.match(Ot)||[]}(e):function(e){return e.split("")}(e)}function qn(e){for(var t=e.length;t--&&ze.test(e.charAt(t)););return t}var Kn=kn({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Gn=function e(t){var ze,Xe=(t=null==t?Vt:Gn.defaults(Vt.Object(),t,Gn.pick(Vt,Ft))).Array,et=t.Date,tt=t.Error,nt=t.Function,rt=t.Math,it=t.Object,ot=t.RegExp,st=t.String,at=t.TypeError,lt=Xe.prototype,ct=nt.prototype,ut=it.prototype,dt=t["__core-js_shared__"],pt=ct.toString,ht=ut.hasOwnProperty,ft=0,mt=(ze=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ze:"",gt=ut.toString,bt=pt.call(it),yt=Vt._,vt=ot("^"+pt.call(ht).replace(Ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wt=Kt?t.Buffer:n,_t=t.Symbol,xt=t.Uint8Array,Et=wt?wt.allocUnsafe:n,kt=Pn(it.getPrototypeOf,it),Mt=it.create,Dt=ut.propertyIsEnumerable,Ct=lt.splice,St=_t?_t.isConcatSpreadable:n,Ot=_t?_t.iterator:n,It=_t?_t.toStringTag:n,Bt=function(){try{var e=Wo(it,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ht=t.clearTimeout!==Vt.clearTimeout&&t.clearTimeout,$t=et&&et.now!==Vt.Date.now&&et.now,Wt=t.setTimeout!==Vt.setTimeout&&t.setTimeout,qt=rt.ceil,Gt=rt.floor,Yt=it.getOwnPropertySymbols,gn=wt?wt.isBuffer:n,kn=t.isFinite,Yn=lt.join,Qn=Pn(it.keys,it),Jn=rt.max,Zn=rt.min,Xn=et.now,er=t.parseInt,tr=rt.random,nr=lt.reverse,rr=Wo(t,"DataView"),ir=Wo(t,"Map"),or=Wo(t,"Promise"),sr=Wo(t,"Set"),ar=Wo(t,"WeakMap"),lr=Wo(it,"create"),cr=ar&&new ar,ur={},dr=ys(rr),pr=ys(ir),hr=ys(or),fr=ys(sr),mr=ys(ar),gr=_t?_t.prototype:n,br=gr?gr.valueOf:n,yr=gr?gr.toString:n;function vr(e){if(Fa(e)&&!ka(e)&&!(e instanceof Er)){if(e instanceof xr)return e;if(ht.call(e,"__wrapped__"))return vs(e)}return new xr(e)}var wr=function(){function e(){}return function(t){if(!La(t))return{};if(Mt)return Mt(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function _r(){}function xr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Er(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function kr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Cr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Dr;++t<n;)this.add(e[t])}function Sr(e){var t=this.__data__=new Mr(e);this.size=t.size}function Ar(e,t){var n=ka(e),r=!n&&Ea(e),i=!n&&!r&&Sa(e),o=!n&&!r&&!i&&$a(e),s=n||r||i||o,a=s?Cn(e.length,st):[],l=a.length;for(var c in e)!t&&!ht.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Zo(c,l))||a.push(c);return a}function Nr(e){var t=e.length;return t?e[Ci(0,t-1)]:n}function Or(e,t){return ms(lo(e),Pr(t,0,e.length))}function Tr(e){return ms(lo(e))}function Ir(e,t,r){(r!==n&&!wa(e[t],r)||r===n&&!(t in e))&&Rr(e,t,r)}function Lr(e,t,r){var i=e[t];ht.call(e,t)&&wa(i,r)&&(r!==n||t in e)||Rr(e,t,r)}function Fr(e,t){for(var n=e.length;n--;)if(wa(e[n][0],t))return n;return-1}function zr(e,t,n,r){return Wr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function jr(e,t){return e&&co(t,dl(t),e)}function Rr(e,t,n){"__proto__"==t&&Bt?Bt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Br(e,t){for(var r=-1,i=t.length,o=Xe(i),s=null==e;++r<i;)o[r]=s?n:sl(e,t[r]);return o}function Pr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function Ur(e,t,r,i,o,s){var a,l=t&d,c=t&p,u=t&h;if(r&&(a=o?r(e,i,o,s):r(e)),a!==n)return a;if(!La(e))return e;var f=ka(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&ht.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return lo(e,a)}else{var m=Go(e),g=m==G||m==Y;if(Sa(e))return no(e,l);if(m==X||m==U||g&&!o){if(a=c||g?{}:Qo(e),!l)return c?function(e,t){return co(e,Ko(e),t)}(e,function(e,t){return e&&co(t,pl(t),e)}(a,e)):function(e,t){return co(e,qo(e),t)}(e,jr(a,e))}else{if(!Rt[m])return o?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case ce:return ro(e);case V:case W:return new r(+e);case ue:return function(e,t){var n=t?ro(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case de:case pe:case he:case fe:case me:case ge:case be:case ye:case ve:return io(e,n);case Q:return new r;case J:case ie:return new r(e);case ne:return function(e){var t=new e.constructor(e.source,Ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case re:return new r;case oe:return i=e,br?it(br.call(i)):{}}var i}(e,m,l)}}s||(s=new Sr);var b=s.get(e);if(b)return b;s.set(e,a),Pa(e)?e.forEach((function(n){a.add(Ur(n,t,r,n,e,s))})):za(e)&&e.forEach((function(n,i){a.set(i,Ur(n,t,r,i,e,s))}));var y=f?n:(u?c?Ro:jo:c?pl:dl)(e);return on(y||e,(function(n,i){y&&(n=e[i=n]),Lr(a,i,Ur(n,t,r,i,e,s))})),a}function Hr(e,t,r){var i=r.length;if(null==e)return!i;for(e=it(e);i--;){var o=r[i],s=t[o],a=e[o];if(a===n&&!(o in e)||!s(a))return!1}return!0}function $r(e,t,r){if("function"!=typeof e)throw new at(s);return ds((function(){e.apply(n,r)}),t)}function Vr(e,t,n,r){var o=-1,s=cn,a=!0,l=e.length,c=[],u=t.length;if(!l)return c;n&&(t=dn(t,An(n))),r?(s=un,a=!1):t.length>=i&&(s=On,a=!1,t=new Cr(t));e:for(;++o<l;){var d=e[o],p=null==n?d:n(d);if(d=r||0!==d?d:0,a&&p==p){for(var h=u;h--;)if(t[h]===p)continue e;c.push(d)}else s(t,p,r)||c.push(d)}return c}vr.templateSettings={escape:Ce,evaluate:Se,interpolate:Ae,variable:"",imports:{_:vr}},vr.prototype=_r.prototype,vr.prototype.constructor=vr,xr.prototype=wr(_r.prototype),xr.prototype.constructor=xr,Er.prototype=wr(_r.prototype),Er.prototype.constructor=Er,kr.prototype.clear=function(){this.__data__=lr?lr(null):{},this.size=0},kr.prototype["delete"]=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},kr.prototype.get=function(e){var t=this.__data__;if(lr){var r=t[e];return r===l?n:r}return ht.call(t,e)?t[e]:n},kr.prototype.has=function(e){var t=this.__data__;return lr?t[e]!==n:ht.call(t,e)},kr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=lr&&t===n?l:t,this},Mr.prototype.clear=function(){this.__data__=[],this.size=0},Mr.prototype["delete"]=function(e){var t=this.__data__,n=Fr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ct.call(t,n,1),--this.size,!0)},Mr.prototype.get=function(e){var t=this.__data__,r=Fr(t,e);return r<0?n:t[r][1]},Mr.prototype.has=function(e){return Fr(this.__data__,e)>-1},Mr.prototype.set=function(e,t){var n=this.__data__,r=Fr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Dr.prototype.clear=function(){this.size=0,this.__data__={hash:new kr,map:new(ir||Mr),string:new kr}},Dr.prototype["delete"]=function(e){var t=$o(this,e)["delete"](e);return this.size-=t?1:0,t},Dr.prototype.get=function(e){return $o(this,e).get(e)},Dr.prototype.has=function(e){return $o(this,e).has(e)},Dr.prototype.set=function(e,t){var n=$o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Cr.prototype.add=Cr.prototype.push=function(e){return this.__data__.set(e,l),this},Cr.prototype.has=function(e){return this.__data__.has(e)},Sr.prototype.clear=function(){this.__data__=new Mr,this.size=0},Sr.prototype["delete"]=function(e){var t=this.__data__,n=t["delete"](e);return this.size=t.size,n},Sr.prototype.get=function(e){return this.__data__.get(e)},Sr.prototype.has=function(e){return this.__data__.has(e)},Sr.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mr){var r=n.__data__;if(!ir||r.length<i-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Dr(r)}return n.set(e,t),this.size=n.size,this};var Wr=ho(Xr),qr=ho(ei,!0);function Kr(e,t){var n=!0;return Wr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function Gr(e,t,r){for(var i=-1,o=e.length;++i<o;){var s=e[i],a=t(s);if(null!=a&&(l===n?a==a&&!Ha(a):r(a,l)))var l=a,c=s}return c}function Yr(e,t){var n=[];return Wr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Qr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=Jo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?Qr(a,t-1,n,r,i):pn(i,a):r||(i[i.length]=a)}return i}var Jr=fo(),Zr=fo(!0);function Xr(e,t){return e&&Jr(e,t,dl)}function ei(e,t){return e&&Zr(e,t,dl)}function ti(e,t){return ln(t,(function(t){return Oa(e[t])}))}function ni(e,t){for(var r=0,i=(t=Zi(t,e)).length;null!=e&&r<i;)e=e[bs(t[r++])];return r&&r==i?e:n}function ri(e,t,n){var r=t(e);return ka(e)?r:pn(r,n(e))}function ii(e){return null==e?e===n?se:Z:It&&It in it(e)?function(e){var t=ht.call(e,It),r=e[It];try{e[It]=n;var i=!0}catch(e){}var o=gt.call(e);i&&(t?e[It]=r:delete e[It]);return o}(e):function(e){return gt.call(e)}(e)}function oi(e,t){return e>t}function si(e,t){return null!=e&&ht.call(e,t)}function ai(e,t){return null!=e&&t in it(e)}function li(e,t,r){for(var i=r?un:cn,o=e[0].length,s=e.length,a=s,l=Xe(s),c=1/0,u=[];a--;){var d=e[a];a&&t&&(d=dn(d,An(t))),c=Zn(d.length,c),l[a]=!r&&(t||o>=120&&d.length>=120)?new Cr(a&&d):n}d=e[0];var p=-1,h=l[0];e:for(;++p<o&&u.length<c;){var f=d[p],m=t?t(f):f;if(f=r||0!==f?f:0,!(h?On(h,m):i(u,m,r))){for(a=s;--a;){var g=l[a];if(!(g?On(g,m):i(e[a],m,r)))continue e}h&&h.push(m),u.push(f)}}return u}function ci(e,t,r){var i=null==(e=as(e,t=Zi(t,e)))?e:e[bs(Ns(t))];return null==i?n:nn(i,e,r)}function ui(e){return Fa(e)&&ii(e)==U}function di(e,t,r,i,o){return e===t||(null==e||null==t||!Fa(e)&&!Fa(t)?e!=e&&t!=t:function(e,t,r,i,o,s){var a=ka(e),l=ka(t),c=a?H:Go(e),u=l?H:Go(t),d=(c=c==U?X:c)==X,p=(u=u==U?X:u)==X,h=c==u;if(h&&Sa(e)){if(!Sa(t))return!1;a=!0,d=!1}if(h&&!d)return s||(s=new Sr),a||$a(e)?Fo(e,t,r,i,o,s):function(e,t,n,r,i,o,s){switch(n){case ue:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ce:return!(e.byteLength!=t.byteLength||!o(new xt(e),new xt(t)));case V:case W:case J:return wa(+e,+t);case K:return e.name==t.name&&e.message==t.message;case ne:case ie:return e==t+"";case Q:var a=Bn;case re:var l=r&f;if(a||(a=Hn),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=m,s.set(e,t);var u=Fo(a(e),a(t),r,i,o,s);return s["delete"](e),u;case oe:if(br)return br.call(e)==br.call(t)}return!1}(e,t,c,r,i,o,s);if(!(r&f)){var g=d&&ht.call(e,"__wrapped__"),b=p&&ht.call(t,"__wrapped__");if(g||b){var y=g?e.value():e,v=b?t.value():t;return s||(s=new Sr),o(y,v,r,i,s)}}if(!h)return!1;return s||(s=new Sr),function(e,t,r,i,o,s){var a=r&f,l=jo(e),c=l.length,u=jo(t).length;if(c!=u&&!a)return!1;var d=c;for(;d--;){var p=l[d];if(!(a?p in t:ht.call(t,p)))return!1}var h=s.get(e),m=s.get(t);if(h&&m)return h==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);var b=a;for(;++d<c;){var y=e[p=l[d]],v=t[p];if(i)var w=a?i(v,y,p,t,e,s):i(y,v,p,e,t,s);if(!(w===n?y===v||o(y,v,r,i,s):w)){g=!1;break}b||(b="constructor"==p)}if(g&&!b){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(g=!1)}return s["delete"](e),s["delete"](t),g}(e,t,r,i,o,s)}(e,t,r,i,di,o))}function pi(e,t,r,i){var o=r.length,s=o,a=!i;if(null==e)return!s;for(e=it(e);o--;){var l=r[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var c=(l=r[o])[0],u=e[c],d=l[1];if(a&&l[2]){if(u===n&&!(c in e))return!1}else{var p=new Sr;if(i)var h=i(u,d,c,e,t,p);if(!(h===n?di(d,u,f|m,i,p):h))return!1}}return!0}function hi(e){return!(!La(e)||(t=e,mt&&mt in t))&&(Oa(e)?vt:Ke).test(ys(e));var t}function fi(e){return"function"==typeof e?e:null==e?jl:"object"==typeof e?ka(e)?wi(e[0],e[1]):vi(e):ql(e)}function mi(e){if(!rs(e))return Qn(e);var t=[];for(var n in it(e))ht.call(e,n)&&"constructor"!=n&&t.push(n);return t}function gi(e){if(!La(e))return function(e){var t=[];if(null!=e)for(var n in it(e))t.push(n);return t}(e);var t=rs(e),n=[];for(var r in e)("constructor"!=r||!t&&ht.call(e,r))&&n.push(r);return n}function bi(e,t){return e<t}function yi(e,t){var n=-1,r=Da(e)?Xe(e.length):[];return Wr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function vi(e){var t=Vo(e);return 1==t.length&&t[0][2]?os(t[0][0],t[0][1]):function(n){return n===e||pi(n,e,t)}}function wi(e,t){return es(e)&&is(t)?os(bs(e),t):function(r){var i=sl(r,e);return i===n&&i===t?al(r,e):di(t,i,f|m)}}function _i(e,t,r,i,o){e!==t&&Jr(t,(function(s,a){if(o||(o=new Sr),La(s))!function(e,t,r,i,o,s,a){var l=cs(e,r),c=cs(t,r),u=a.get(c);if(u)return void Ir(e,r,u);var d=s?s(l,c,r+"",e,t,a):n,p=d===n;if(p){var h=ka(c),f=!h&&Sa(c),m=!h&&!f&&$a(c);d=c,h||f||m?ka(l)?d=l:Ca(l)?d=lo(l):f?(p=!1,d=no(c,!0)):m?(p=!1,d=io(c,!0)):d=[]:Ra(c)||Ea(c)?(d=l,Ea(l)?d=Ja(l):La(l)&&!Oa(l)||(d=Qo(c))):p=!1}p&&(a.set(c,d),o(d,c,i,s,a),a["delete"](c));Ir(e,r,d)}(e,t,a,r,_i,i,o);else{var l=i?i(cs(e,a),s,a+"",e,t,o):n;l===n&&(l=s),Ir(e,a,l)}}),pl)}function xi(e,t){var r=e.length;if(r)return Zo(t+=t<0?r:0,r)?e[t]:n}function Ei(e,t,n){t=t.length?dn(t,(function(e){return ka(e)?function(t){return ni(t,1===e.length?e[0]:e)}:e})):[jl];var r=-1;t=dn(t,An(Ho()));var i=yi(e,(function(e,n,i){var o=dn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;for(;++r<s;){var l=oo(i[r],o[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function ki(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=ni(e,s);n(a,s)&&Ti(o,Zi(s,e),a)}return o}function Mi(e,t,n,r){var i=r?wn:vn,o=-1,s=t.length,a=e;for(e===t&&(t=lo(t)),n&&(a=dn(e,An(n)));++o<s;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(a,u,l,r))>-1;)a!==e&&Ct.call(a,l,1),Ct.call(e,l,1);return e}function Di(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Zo(i)?Ct.call(e,i,1):Vi(e,i)}}return e}function Ci(e,t){return e+Gt(tr()*(t-e+1))}function Si(e,t){var n="";if(!e||t<1||t>L)return n;do{t%2&&(n+=e),(t=Gt(t/2))&&(e+=e)}while(t);return n}function Ai(e,t){return ps(ss(e,t,jl),e+"")}function Ni(e){return Nr(wl(e))}function Oi(e,t){var n=wl(e);return ms(n,Pr(t,0,n.length))}function Ti(e,t,r,i){if(!La(e))return e;for(var o=-1,s=(t=Zi(t,e)).length,a=s-1,l=e;null!=l&&++o<s;){var c=bs(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var d=l[c];(u=i?i(d,c,l):n)===n&&(u=La(d)?d:Zo(t[o+1])?[]:{})}Lr(l,c,u),l=l[c]}return e}var Ii=cr?function(e,t){return cr.set(e,t),e}:jl,Li=Bt?function(e,t){return Bt(e,"toString",{configurable:!0,enumerable:!1,value:Ll(t),writable:!0})}:jl;function Fi(e){return ms(wl(e))}function zi(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Xe(i);++r<i;)o[r]=e[r+t];return o}function ji(e,t){var n;return Wr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=B){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!Ha(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Bi(e,t,jl,n)}function Bi(e,t,r,i){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,l=null===t,c=Ha(t),u=t===n;o<s;){var d=Gt((o+s)/2),p=r(e[d]),h=p!==n,f=null===p,m=p==p,g=Ha(p);if(a)var b=i||m;else b=u?m&&(i||h):l?m&&h&&(i||!f):c?m&&h&&!f&&(i||!g):!f&&!g&&(i?p<=t:p<t);b?o=d+1:s=d}return Zn(s,R)}function Pi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!wa(a,l)){var l=a;o[i++]=0===s?0:s}}return o}function Ui(e){return"number"==typeof e?e:Ha(e)?z:+e}function Hi(e){if("string"==typeof e)return e;if(ka(e))return dn(e,Hi)+"";if(Ha(e))return yr?yr.call(e):"";var t=e+"";return"0"==t&&1/e==-I?"-0":t}function $i(e,t,n){var r=-1,o=cn,s=e.length,a=!0,l=[],c=l;if(n)a=!1,o=un;else if(s>=i){var u=t?null:Ao(e);if(u)return Hn(u);a=!1,o=On,c=new Cr}else c=t?[]:l;e:for(;++r<s;){var d=e[r],p=t?t(d):d;if(d=n||0!==d?d:0,a&&p==p){for(var h=c.length;h--;)if(c[h]===p)continue e;t&&c.push(p),l.push(d)}else o(c,p,n)||(c!==l&&c.push(p),l.push(d))}return l}function Vi(e,t){return null==(e=as(e,t=Zi(t,e)))||delete e[bs(Ns(t))]}function Wi(e,t,n,r){return Ti(e,t,n(ni(e,t)),r)}function qi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?zi(e,r?0:o,r?o+1:i):zi(e,r?o+1:0,r?i:o)}function Ki(e,t){var n=e;return n instanceof Er&&(n=n.value()),hn(t,(function(e,t){return t.func.apply(t.thisArg,pn([e],t.args))}),n)}function Gi(e,t,n){var r=e.length;if(r<2)return r?$i(e[0]):[];for(var i=-1,o=Xe(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=Vr(o[i]||s,e[a],t,n));return $i(Qr(o,1),t,n)}function Yi(e,t,r){for(var i=-1,o=e.length,s=t.length,a={};++i<o;){var l=i<s?t[i]:n;r(a,e[i],l)}return a}function Qi(e){return Ca(e)?e:[]}function Ji(e){return"function"==typeof e?e:jl}function Zi(e,t){return ka(e)?e:es(e,t)?[e]:gs(Za(e))}var Xi=Ai;function eo(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:zi(e,t,r)}var to=Ht||function(e){return Vt.clearTimeout(e)};function no(e,t){if(t)return e.slice();var n=e.length,r=Et?Et(n):new e.constructor(n);return e.copy(r),r}function ro(e){var t=new e.constructor(e.byteLength);return new xt(t).set(new xt(e)),t}function io(e,t){var n=t?ro(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function oo(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,s=Ha(e),a=t!==n,l=null===t,c=t==t,u=Ha(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!u&&e<t||u&&r&&o&&!i&&!s||l&&r&&o||!a&&o||!c)return-1}return 0}function so(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,l=t.length,c=Jn(o-s,0),u=Xe(l+c),d=!r;++a<l;)u[a]=t[a];for(;++i<s;)(d||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[a++]=e[i++];return u}function ao(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,l=-1,c=t.length,u=Jn(o-a,0),d=Xe(u+c),p=!r;++i<u;)d[i]=e[i];for(var h=i;++l<c;)d[h+l]=t[l];for(;++s<a;)(p||i<o)&&(d[h+n[s]]=e[i++]);return d}function lo(e,t){var n=-1,r=e.length;for(t||(t=Xe(r));++n<r;)t[n]=e[n];return t}function co(e,t,r,i){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var l=t[s],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?Rr(r,l,c):Lr(r,l,c)}return r}function uo(e,t){return function(n,r){var i=ka(n)?rn:zr,o=t?t():{};return i(n,e,Ho(r,2),o)}}function po(e){return Ai((function(t,r){var i=-1,o=r.length,s=o>1?r[o-1]:n,a=o>2?r[2]:n;for(s=e.length>3&&"function"==typeof s?(o--,s):n,a&&Xo(r[0],r[1],a)&&(s=o<3?n:s,o=1),t=it(t);++i<o;){var l=r[i];l&&e(t,l,i,s)}return t}))}function ho(e,t){return function(n,r){if(null==n)return n;if(!Da(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=it(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function fo(e){return function(t,n,r){for(var i=-1,o=it(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}function mo(e){return function(t){var r=Rn(t=Za(t))?Wn(t):n,i=r?r[0]:t.charAt(0),o=r?eo(r,1).join(""):t.slice(1);return i[e]()+o}}function go(e){return function(t){return hn(Ol(El(t).replace(At,"")),e,"")}}function bo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=wr(e.prototype),r=e.apply(n,t);return La(r)?r:n}}function yo(e){return function(t,r,i){var o=it(t);if(!Da(t)){var s=Ho(r,3);t=dl(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,i);return a>-1?o[s?t[a]:a]:n}}function vo(e){return zo((function(t){var r=t.length,i=r,o=xr.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new at(s);if(o&&!l&&"wrapper"==Po(a))var l=new xr([],!0)}for(i=l?i:r;++i<r;){var c=Po(a=t[i]),u="wrapper"==c?Bo(a):n;l=u&&ts(u[0])&&u[1]==(E|v|_|k)&&!u[4].length&&1==u[9]?l[Po(u[0])].apply(l,u[3]):1==a.length&&ts(a)?l[c]():l.thru(a)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&ka(n))return l.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function wo(e,t,r,i,o,s,a,l,c,u){var d=t&E,p=t&g,h=t&b,f=t&(v|w),m=t&M,y=h?n:bo(e);return function n(){for(var g=arguments.length,b=Xe(g),v=g;v--;)b[v]=arguments[v];if(f)var w=Uo(n),_=Ln(b,w);if(i&&(b=so(b,i,o,f)),s&&(b=ao(b,s,a,f)),g-=_,f&&g<u){var x=Un(b,w);return Co(e,t,wo,n.placeholder,r,b,x,l,c,u-g)}var E=p?r:this,k=h?E[e]:e;return g=b.length,l?b=ls(b,l):m&&g>1&&b.reverse(),d&&c<g&&(b.length=c),this&&this!==Vt&&this instanceof n&&(k=y||bo(k)),k.apply(E,b)}}function _o(e,t){return function(n,r){return function(e,t,n,r){return Xr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function xo(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=Hi(r),i=Hi(i)):(r=Ui(r),i=Ui(i)),o=e(r,i)}return o}}function Eo(e){return zo((function(t){return t=dn(t,An(Ho())),Ai((function(n){var r=this;return e(t,(function(e){return nn(e,r,n)}))}))}))}function ko(e,t){var r=(t=t===n?" ":Hi(t)).length;if(r<2)return r?Si(t,e):t;var i=Si(t,qt(e/Vn(t)));return Rn(t)?eo(Wn(i),0,e).join(""):i.slice(0,e)}function Mo(e){return function(t,r,i){return i&&"number"!=typeof i&&Xo(t,r,i)&&(r=i=n),t=Ka(t),r===n?(r=t,t=0):r=Ka(r),function(e,t,n,r){for(var i=-1,o=Jn(qt((t-e)/(n||1)),0),s=Xe(o);o--;)s[r?o:++i]=e,e+=n;return s}(t,r,i=i===n?t<r?1:-1:Ka(i),e)}}function Do(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Qa(t),n=Qa(n)),e(t,n)}}function Co(e,t,r,i,o,s,a,l,c,u){var d=t&v;t|=d?_:x,(t&=~(d?x:_))&y||(t&=~(g|b));var p=[e,t,o,d?s:n,d?a:n,d?n:s,d?n:a,l,c,u],h=r.apply(n,p);return ts(e)&&us(h,p),h.placeholder=i,hs(h,e,t)}function So(e){var t=rt[e];return function(e,n){if(e=Qa(e),(n=null==n?0:Zn(Ga(n),292))&&kn(e)){var r=(Za(e)+"e").split("e");return+((r=(Za(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Ao=sr&&1/Hn(new sr([,-0]))[1]==I?function(e){return new sr(e)}:Hl;function No(e){return function(t){var n=Go(t);return n==Q?Bn(t):n==re?$n(t):function(e,t){return dn(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Oo(e,t,r,i,o,a,l,c){var d=t&b;if(!d&&"function"!=typeof e)throw new at(s);var p=i?i.length:0;if(p||(t&=~(_|x),i=o=n),l=l===n?l:Jn(Ga(l),0),c=c===n?c:Ga(c),p-=o?o.length:0,t&x){var h=i,f=o;i=o=n}var m=d?n:Bo(e),M=[e,t,r,i,o,h,f,a,l,c];if(m&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|b|E),s=r==E&&n==v||r==E&&n==k&&e[7].length<=t[8]||r==(E|k)&&t[7].length<=t[8]&&n==v;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:y);var a=t[3];if(a){var l=e[3];e[3]=l?so(l,a,t[4]):a,e[4]=l?Un(e[3],u):t[4]}(a=t[5])&&(l=e[5],e[5]=l?ao(l,a,t[6]):a,e[6]=l?Un(e[5],u):t[6]);(a=t[7])&&(e[7]=a);r&E&&(e[8]=null==e[8]?t[8]:Zn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(M,m),e=M[0],t=M[1],r=M[2],i=M[3],o=M[4],!(c=M[9]=M[9]===n?d?0:e.length:Jn(M[9]-p,0))&&t&(v|w)&&(t&=~(v|w)),t&&t!=g)D=t==v||t==w?function(e,t,r){var i=bo(e);return function o(){for(var s=arguments.length,a=Xe(s),l=s,c=Uo(o);l--;)a[l]=arguments[l];var u=s<3&&a[0]!==c&&a[s-1]!==c?[]:Un(a,c);return(s-=u.length)<r?Co(e,t,wo,o.placeholder,n,a,u,n,n,r-s):nn(this&&this!==Vt&&this instanceof o?i:e,this,a)}}(e,t,c):t!=_&&t!=(g|_)||o.length?wo.apply(n,M):function(e,t,n,r){var i=t&g,o=bo(e);return function t(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=Xe(c+a),d=this&&this!==Vt&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return nn(d,i?n:this,u)}}(e,t,r,i);else var D=function(e,t,n){var r=t&g,i=bo(e);return function t(){return(this&&this!==Vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return hs((m?Ii:us)(D,M),e,t)}function To(e,t,r,i){return e===n||wa(e,ut[r])&&!ht.call(i,r)?t:e}function Io(e,t,r,i,o,s){return La(e)&&La(t)&&(s.set(t,e),_i(e,t,n,Io,s),s["delete"](t)),e}function Lo(e){return Ra(e)?n:e}function Fo(e,t,r,i,o,s){var a=r&f,l=e.length,c=t.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var p=-1,h=!0,g=r&m?new Cr:n;for(s.set(e,t),s.set(t,e);++p<l;){var b=e[p],y=t[p];if(i)var v=a?i(y,b,p,t,e,s):i(b,y,p,e,t,s);if(v!==n){if(v)continue;h=!1;break}if(g){if(!mn(t,(function(e,t){if(!On(g,t)&&(b===e||o(b,e,r,i,s)))return g.push(t)}))){h=!1;break}}else if(b!==y&&!o(b,y,r,i,s)){h=!1;break}}return s["delete"](e),s["delete"](t),h}function zo(e){return ps(ss(e,n,Ms),e+"")}function jo(e){return ri(e,dl,qo)}function Ro(e){return ri(e,pl,Ko)}var Bo=cr?function(e){return cr.get(e)}:Hl;function Po(e){for(var t=e.name+"",n=ur[t],r=ht.call(ur,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Uo(e){return(ht.call(vr,"placeholder")?vr:e).placeholder}function Ho(){var e=vr.iteratee||Rl;return e=e===Rl?fi:e,arguments.length?e(arguments[0],arguments[1]):e}function $o(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Vo(e){for(var t=dl(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,is(i)]}return t}function Wo(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return hi(r)?r:n}var qo=Yt?function(e){return null==e?[]:(e=it(e),ln(Yt(e),(function(t){return Dt.call(e,t)})))}:Yl,Ko=Yt?function(e){for(var t=[];e;)pn(t,qo(e)),e=kt(e);return t}:Yl,Go=ii;function Yo(e,t,n){for(var r=-1,i=(t=Zi(t,e)).length,o=!1;++r<i;){var s=bs(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ia(i)&&Zo(s,i)&&(ka(e)||Ea(e))}function Qo(e){return"function"!=typeof e.constructor||rs(e)?{}:wr(kt(e))}function Jo(e){return ka(e)||Ea(e)||!!(St&&e&&e[St])}function Zo(e,t){var n=typeof e;return!!(t=null==t?L:t)&&("number"==n||"symbol"!=n&&Ye.test(e))&&e>-1&&e%1==0&&e<t}function Xo(e,t,n){if(!La(n))return!1;var r=typeof t;return!!("number"==r?Da(n)&&Zo(t,n.length):"string"==r&&t in n)&&wa(n[t],e)}function es(e,t){if(ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ha(e))||(Oe.test(e)||!Ne.test(e)||null!=t&&e in it(t))}function ts(e){var t=Po(e),n=vr[t];if("function"!=typeof n||!(t in Er.prototype))return!1;if(e===n)return!0;var r=Bo(n);return!!r&&e===r[0]}(rr&&Go(new rr(new ArrayBuffer(1)))!=ue||ir&&Go(new ir)!=Q||or&&Go(or.resolve())!=ee||sr&&Go(new sr)!=re||ar&&Go(new ar)!=ae)&&(Go=function(e){var t=ii(e),r=t==X?e.constructor:n,i=r?ys(r):"";if(i)switch(i){case dr:return ue;case pr:return Q;case hr:return ee;case fr:return re;case mr:return ae}return t});var ns=dt?Oa:Ql;function rs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function is(e){return e==e&&!La(e)}function os(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in it(r)))}}function ss(e,t,r){return t=Jn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Jn(n.length-t,0),s=Xe(o);++i<o;)s[i]=n[t+i];i=-1;for(var a=Xe(t+1);++i<t;)a[i]=n[i];return a[t]=r(s),nn(e,this,a)}}function as(e,t){return t.length<2?e:ni(e,zi(t,0,-1))}function ls(e,t){for(var r=e.length,i=Zn(t.length,r),o=lo(e);i--;){var s=t[i];e[i]=Zo(s,r)?o[s]:n}return e}function cs(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var us=fs(Ii),ds=Wt||function(e,t){return Vt.setTimeout(e,t)},ps=fs(Li);function hs(e,t,n){var r=t+"";return ps(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(je,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return on(P,(function(n){var r="_."+n[0];t&n[1]&&!cn(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Re);return t?t[1].split(Be):[]}(r),n)))}function fs(e){var t=0,r=0;return function(){var i=Xn(),o=A-(i-r);if(r=i,o>0){if(++t>=S)return arguments[0]}else t=0;return e.apply(n,arguments)}}function ms(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var s=Ci(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var gs=function(e){var t=fa(e,(function(e){return n.size===c&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Te,(function(e,n,r,i){t.push(r?i.replace(He,"$1"):n||e)})),t}));function bs(e){if("string"==typeof e||Ha(e))return e;var t=e+"";return"0"==t&&1/e==-I?"-0":t}function ys(e){if(null!=e){try{return pt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function vs(e){if(e instanceof Er)return e.clone();var t=new xr(e.__wrapped__,e.__chain__);return t.__actions__=lo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ws=Ai((function(e,t){return Ca(e)?Vr(e,Qr(t,1,Ca,!0)):[]})),_s=Ai((function(e,t){var r=Ns(t);return Ca(r)&&(r=n),Ca(e)?Vr(e,Qr(t,1,Ca,!0),Ho(r,2)):[]})),xs=Ai((function(e,t){var r=Ns(t);return Ca(r)&&(r=n),Ca(e)?Vr(e,Qr(t,1,Ca,!0),n,r):[]}));function Es(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ga(n);return i<0&&(i=Jn(r+i,0)),yn(e,Ho(t,3),i)}function ks(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=Ga(r),o=r<0?Jn(i+o,0):Zn(o,i-1)),yn(e,Ho(t,3),o,!0)}function Ms(e){return(null==e?0:e.length)?Qr(e,1):[]}function Ds(e){return e&&e.length?e[0]:n}var Cs=Ai((function(e){var t=dn(e,Qi);return t.length&&t[0]===e[0]?li(t):[]})),Ss=Ai((function(e){var t=Ns(e),r=dn(e,Qi);return t===Ns(r)?t=n:r.pop(),r.length&&r[0]===e[0]?li(r,Ho(t,2)):[]})),As=Ai((function(e){var t=Ns(e),r=dn(e,Qi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?li(r,n,t):[]}));function Ns(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Os=Ai(Ts);function Ts(e,t){return e&&e.length&&t&&t.length?Mi(e,t):e}var Is=zo((function(e,t){var n=null==e?0:e.length,r=Br(e,t);return Di(e,dn(t,(function(e){return Zo(e,n)?+e:e})).sort(oo)),r}));function Ls(e){return null==e?e:nr.call(e)}var Fs=Ai((function(e){return $i(Qr(e,1,Ca,!0))})),zs=Ai((function(e){var t=Ns(e);return Ca(t)&&(t=n),$i(Qr(e,1,Ca,!0),Ho(t,2))})),js=Ai((function(e){var t=Ns(e);return t="function"==typeof t?t:n,$i(Qr(e,1,Ca,!0),n,t)}));function Rs(e){if(!e||!e.length)return[];var t=0;return e=ln(e,(function(e){if(Ca(e))return t=Jn(e.length,t),!0})),Cn(t,(function(t){return dn(e,En(t))}))}function Bs(e,t){if(!e||!e.length)return[];var r=Rs(e);return null==t?r:dn(r,(function(e){return nn(t,n,e)}))}var Ps=Ai((function(e,t){return Ca(e)?Vr(e,t):[]})),Us=Ai((function(e){return Gi(ln(e,Ca))})),Hs=Ai((function(e){var t=Ns(e);return Ca(t)&&(t=n),Gi(ln(e,Ca),Ho(t,2))})),$s=Ai((function(e){var t=Ns(e);return t="function"==typeof t?t:n,Gi(ln(e,Ca),n,t)})),Vs=Ai(Rs);var Ws=Ai((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,Bs(e,r)}));function qs(e){var t=vr(e);return t.__chain__=!0,t}function Ks(e,t){return t(e)}var Gs=zo((function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return Br(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Er&&Zo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:Ks,args:[o],thisArg:n}),new xr(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)}));var Ys=uo((function(e,t,n){ht.call(e,n)?++e[n]:Rr(e,n,1)}));var Qs=yo(Es),Js=yo(ks);function Zs(e,t){return(ka(e)?on:Wr)(e,Ho(t,3))}function Xs(e,t){return(ka(e)?sn:qr)(e,Ho(t,3))}var ea=uo((function(e,t,n){ht.call(e,n)?e[n].push(t):Rr(e,n,[t])}));var ta=Ai((function(e,t,n){var r=-1,i="function"==typeof t,o=Da(e)?Xe(e.length):[];return Wr(e,(function(e){o[++r]=i?nn(t,e,n):ci(e,t,n)})),o})),na=uo((function(e,t,n){Rr(e,n,t)}));function ra(e,t){return(ka(e)?dn:yi)(e,Ho(t,3))}var ia=uo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var oa=Ai((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Xo(e,t[0],t[1])?t=[]:n>2&&Xo(t[0],t[1],t[2])&&(t=[t[0]]),Ei(e,Qr(t,1),[])})),sa=$t||function(){return Vt.Date.now()};function aa(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Oo(e,E,n,n,n,n,t)}function la(e,t){var r;if("function"!=typeof t)throw new at(s);return e=Ga(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var ca=Ai((function(e,t,n){var r=g;if(n.length){var i=Un(n,Uo(ca));r|=_}return Oo(e,r,t,n,i)})),ua=Ai((function(e,t,n){var r=g|b;if(n.length){var i=Un(n,Uo(ua));r|=_}return Oo(t,r,e,n,i)}));function da(e,t,r){var i,o,a,l,c,u,d=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new at(s);function m(t){var r=i,s=o;return i=o=n,d=t,l=e.apply(s,r)}function g(e){return d=e,c=ds(y,t),p?m(e):l}function b(e){var r=e-u;return u===n||r>=t||r<0||h&&e-d>=a}function y(){var e=sa();if(b(e))return v(e);c=ds(y,function(e){var n=t-(e-u);return h?Zn(n,a-(e-d)):n}(e))}function v(e){return c=n,f&&i?m(e):(i=o=n,l)}function w(){var e=sa(),r=b(e);if(i=arguments,o=this,u=e,r){if(c===n)return g(u);if(h)return to(c),c=ds(y,t),m(u)}return c===n&&(c=ds(y,t)),l}return t=Qa(t)||0,La(r)&&(p=!!r.leading,a=(h="maxWait"in r)?Jn(Qa(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f),w.cancel=function(){c!==n&&to(c),d=0,i=u=o=c=n},w.flush=function(){return c===n?l:v(sa())},w}var pa=Ai((function(e,t){return $r(e,1,t)})),ha=Ai((function(e,t,n){return $r(e,Qa(t)||0,n)}));function fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new at(s);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(fa.Cache||Dr),n}function ma(e){if("function"!=typeof e)throw new at(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}fa.Cache=Dr;var ga=Xi((function(e,t){var n=(t=1==t.length&&ka(t[0])?dn(t[0],An(Ho())):dn(Qr(t,1),An(Ho()))).length;return Ai((function(r){for(var i=-1,o=Zn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return nn(e,this,r)}))})),ba=Ai((function(e,t){var r=Un(t,Uo(ba));return Oo(e,_,n,t,r)})),ya=Ai((function(e,t){var r=Un(t,Uo(ya));return Oo(e,x,n,t,r)})),va=zo((function(e,t){return Oo(e,k,n,n,n,t)}));function wa(e,t){return e===t||e!=e&&t!=t}var _a=Do(oi),xa=Do((function(e,t){return e>=t})),Ea=ui(function(){return arguments}())?ui:function(e){return Fa(e)&&ht.call(e,"callee")&&!Dt.call(e,"callee")},ka=Xe.isArray,Ma=Qt?An(Qt):function(e){return Fa(e)&&ii(e)==ce};function Da(e){return null!=e&&Ia(e.length)&&!Oa(e)}function Ca(e){return Fa(e)&&Da(e)}var Sa=gn||Ql,Aa=Jt?An(Jt):function(e){return Fa(e)&&ii(e)==W};function Na(e){if(!Fa(e))return!1;var t=ii(e);return t==K||t==q||"string"==typeof e.message&&"string"==typeof e.name&&!Ra(e)}function Oa(e){if(!La(e))return!1;var t=ii(e);return t==G||t==Y||t==$||t==te}function Ta(e){return"number"==typeof e&&e==Ga(e)}function Ia(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=L}function La(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Fa(e){return null!=e&&"object"==typeof e}var za=Zt?An(Zt):function(e){return Fa(e)&&Go(e)==Q};function ja(e){return"number"==typeof e||Fa(e)&&ii(e)==J}function Ra(e){if(!Fa(e)||ii(e)!=X)return!1;var t=kt(e);if(null===t)return!0;var n=ht.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&pt.call(n)==bt}var Ba=Xt?An(Xt):function(e){return Fa(e)&&ii(e)==ne};var Pa=en?An(en):function(e){return Fa(e)&&Go(e)==re};function Ua(e){return"string"==typeof e||!ka(e)&&Fa(e)&&ii(e)==ie}function Ha(e){return"symbol"==typeof e||Fa(e)&&ii(e)==oe}var $a=tn?An(tn):function(e){return Fa(e)&&Ia(e.length)&&!!jt[ii(e)]};var Va=Do(bi),Wa=Do((function(e,t){return e<=t}));function qa(e){if(!e)return[];if(Da(e))return Ua(e)?Wn(e):lo(e);if(Ot&&e[Ot])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ot]());var t=Go(e);return(t==Q?Bn:t==re?Hn:wl)(e)}function Ka(e){return e?(e=Qa(e))===I||e===-I?(e<0?-1:1)*F:e==e?e:0:0===e?e:0}function Ga(e){var t=Ka(e),n=t%1;return t==t?n?t-n:t:0}function Ya(e){return e?Pr(Ga(e),0,j):0}function Qa(e){if("number"==typeof e)return e;if(Ha(e))return z;if(La(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=La(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Sn(e);var n=qe.test(e);return n||Ge.test(e)?Ut(e.slice(2),n?2:8):We.test(e)?z:+e}function Ja(e){return co(e,pl(e))}function Za(e){return null==e?"":Hi(e)}var Xa=po((function(e,t){if(rs(t)||Da(t))co(t,dl(t),e);else for(var n in t)ht.call(t,n)&&Lr(e,n,t[n])})),el=po((function(e,t){co(t,pl(t),e)})),tl=po((function(e,t,n,r){co(t,pl(t),e,r)})),nl=po((function(e,t,n,r){co(t,dl(t),e,r)})),rl=zo(Br);var il=Ai((function(e,t){e=it(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&Xo(t[0],t[1],o)&&(i=1);++r<i;)for(var s=t[r],a=pl(s),l=-1,c=a.length;++l<c;){var u=a[l],d=e[u];(d===n||wa(d,ut[u])&&!ht.call(e,u))&&(e[u]=s[u])}return e})),ol=Ai((function(e){return e.push(n,Io),nn(fl,n,e)}));function sl(e,t,r){var i=null==e?n:ni(e,t);return i===n?r:i}function al(e,t){return null!=e&&Yo(e,t,ai)}var ll=_o((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=gt.call(t)),e[t]=n}),Ll(jl)),cl=_o((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=gt.call(t)),ht.call(e,t)?e[t].push(n):e[t]=[n]}),Ho),ul=Ai(ci);function dl(e){return Da(e)?Ar(e):mi(e)}function pl(e){return Da(e)?Ar(e,!0):gi(e)}var hl=po((function(e,t,n){_i(e,t,n)})),fl=po((function(e,t,n,r){_i(e,t,n,r)})),ml=zo((function(e,t){var n={};if(null==e)return n;var r=!1;t=dn(t,(function(t){return t=Zi(t,e),r||(r=t.length>1),t})),co(e,Ro(e),n),r&&(n=Ur(n,d|p|h,Lo));for(var i=t.length;i--;)Vi(n,t[i]);return n}));var gl=zo((function(e,t){return null==e?{}:function(e,t){return ki(e,t,(function(t,n){return al(e,n)}))}(e,t)}));function bl(e,t){if(null==e)return{};var n=dn(Ro(e),(function(e){return[e]}));return t=Ho(t),ki(e,n,(function(e,n){return t(e,n[0])}))}var yl=No(dl),vl=No(pl);function wl(e){return null==e?[]:Nn(e,dl(e))}var _l=go((function(e,t,n){return t=t.toLowerCase(),e+(n?xl(t):t)}));function xl(e){return Nl(Za(e).toLowerCase())}function El(e){return(e=Za(e))&&e.replace(Qe,Fn).replace(Nt,"")}var kl=go((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ml=go((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Dl=mo("toLowerCase");var Cl=go((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Sl=go((function(e,t,n){return e+(n?" ":"")+Nl(t)}));var Al=go((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Nl=mo("toUpperCase");function Ol(e,t,r){return e=Za(e),(t=r?n:t)===n?function(e){return Lt.test(e)}(e)?function(e){return e.match(Tt)||[]}(e):function(e){return e.match(Pe)||[]}(e):e.match(t)||[]}var Tl=Ai((function(e,t){try{return nn(e,n,t)}catch(e){return Na(e)?e:new tt(e)}})),Il=zo((function(e,t){return on(t,(function(t){t=bs(t),Rr(e,t,ca(e[t],e))})),e}));function Ll(e){return function(){return e}}var Fl=vo(),zl=vo(!0);function jl(e){return e}function Rl(e){return fi("function"==typeof e?e:Ur(e,d))}var Bl=Ai((function(e,t){return function(n){return ci(n,e,t)}})),Pl=Ai((function(e,t){return function(n){return ci(e,n,t)}}));function Ul(e,t,n){var r=dl(t),i=ti(t,r);null!=n||La(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=ti(t,dl(t)));var o=!(La(n)&&"chain"in n&&!n.chain),s=Oa(e);return on(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=lo(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pn([this.value()],arguments))})})),e}function Hl(){}var $l=Eo(dn),Vl=Eo(an),Wl=Eo(mn);function ql(e){return es(e)?En(bs(e)):function(e){return function(t){return ni(t,e)}}(e)}var Kl=Mo(),Gl=Mo(!0);function Yl(){return[]}function Ql(){return!1}var Jl=xo((function(e,t){return e+t}),0),Zl=So("ceil"),Xl=xo((function(e,t){return e/t}),1),ec=So("floor");var tc=xo((function(e,t){return e*t}),1),nc=So("round"),rc=xo((function(e,t){return e-t}),0);return vr.after=function(e,t){if("function"!=typeof t)throw new at(s);return e=Ga(e),function(){if(--e<1)return t.apply(this,arguments)}},vr.ary=aa,vr.assign=Xa,vr.assignIn=el,vr.assignInWith=tl,vr.assignWith=nl,vr.at=rl,vr.before=la,vr.bind=ca,vr.bindAll=Il,vr.bindKey=ua,vr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ka(e)?e:[e]},vr.chain=qs,vr.chunk=function(e,t,r){t=(r?Xo(e,t,r):t===n)?1:Jn(Ga(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,a=Xe(qt(i/t));o<i;)a[s++]=zi(e,o,o+=t);return a},vr.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},vr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Xe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return pn(ka(n)?lo(n):[n],Qr(t,1))},vr.cond=function(e){var t=null==e?0:e.length,n=Ho();return e=t?dn(e,(function(e){if("function"!=typeof e[1])throw new at(s);return[n(e[0]),e[1]]})):[],Ai((function(n){for(var r=-1;++r<t;){var i=e[r];if(nn(i[0],this,n))return nn(i[1],this,n)}}))},vr.conforms=function(e){return function(e){var t=dl(e);return function(n){return Hr(n,e,t)}}(Ur(e,d))},vr.constant=Ll,vr.countBy=Ys,vr.create=function(e,t){var n=wr(e);return null==t?n:jr(n,t)},vr.curry=function e(t,r,i){var o=Oo(t,v,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},vr.curryRight=function e(t,r,i){var o=Oo(t,w,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},vr.debounce=da,vr.defaults=il,vr.defaultsDeep=ol,vr.defer=pa,vr.delay=ha,vr.difference=ws,vr.differenceBy=_s,vr.differenceWith=xs,vr.drop=function(e,t,r){var i=null==e?0:e.length;return i?zi(e,(t=r||t===n?1:Ga(t))<0?0:t,i):[]},vr.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?zi(e,0,(t=i-(t=r||t===n?1:Ga(t)))<0?0:t):[]},vr.dropRightWhile=function(e,t){return e&&e.length?qi(e,Ho(t,3),!0,!0):[]},vr.dropWhile=function(e,t){return e&&e.length?qi(e,Ho(t,3),!0):[]},vr.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&Xo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=Ga(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:Ga(i))<0&&(i+=o),i=r>i?0:Ya(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},vr.filter=function(e,t){return(ka(e)?ln:Yr)(e,Ho(t,3))},vr.flatMap=function(e,t){return Qr(ra(e,t),1)},vr.flatMapDeep=function(e,t){return Qr(ra(e,t),I)},vr.flatMapDepth=function(e,t,r){return r=r===n?1:Ga(r),Qr(ra(e,t),r)},vr.flatten=Ms,vr.flattenDeep=function(e){return(null==e?0:e.length)?Qr(e,I):[]},vr.flattenDepth=function(e,t){return(null==e?0:e.length)?Qr(e,t=t===n?1:Ga(t)):[]},vr.flip=function(e){return Oo(e,M)},vr.flow=Fl,vr.flowRight=zl,vr.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},vr.functions=function(e){return null==e?[]:ti(e,dl(e))},vr.functionsIn=function(e){return null==e?[]:ti(e,pl(e))},vr.groupBy=ea,vr.initial=function(e){return(null==e?0:e.length)?zi(e,0,-1):[]},vr.intersection=Cs,vr.intersectionBy=Ss,vr.intersectionWith=As,vr.invert=ll,vr.invertBy=cl,vr.invokeMap=ta,vr.iteratee=Rl,vr.keyBy=na,vr.keys=dl,vr.keysIn=pl,vr.map=ra,vr.mapKeys=function(e,t){var n={};return t=Ho(t,3),Xr(e,(function(e,r,i){Rr(n,t(e,r,i),e)})),n},vr.mapValues=function(e,t){var n={};return t=Ho(t,3),Xr(e,(function(e,r,i){Rr(n,r,t(e,r,i))})),n},vr.matches=function(e){return vi(Ur(e,d))},vr.matchesProperty=function(e,t){return wi(e,Ur(t,d))},vr.memoize=fa,vr.merge=hl,vr.mergeWith=fl,vr.method=Bl,vr.methodOf=Pl,vr.mixin=Ul,vr.negate=ma,vr.nthArg=function(e){return e=Ga(e),Ai((function(t){return xi(t,e)}))},vr.omit=ml,vr.omitBy=function(e,t){return bl(e,ma(Ho(t)))},vr.once=function(e){return la(2,e)},vr.orderBy=function(e,t,r,i){return null==e?[]:(ka(t)||(t=null==t?[]:[t]),ka(r=i?n:r)||(r=null==r?[]:[r]),Ei(e,t,r))},vr.over=$l,vr.overArgs=ga,vr.overEvery=Vl,vr.overSome=Wl,vr.partial=ba,vr.partialRight=ya,vr.partition=ia,vr.pick=gl,vr.pickBy=bl,vr.property=ql,vr.propertyOf=function(e){return function(t){return null==e?n:ni(e,t)}},vr.pull=Os,vr.pullAll=Ts,vr.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Mi(e,t,Ho(n,2)):e},vr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Mi(e,t,n,r):e},vr.pullAt=Is,vr.range=Kl,vr.rangeRight=Gl,vr.rearg=va,vr.reject=function(e,t){return(ka(e)?ln:Yr)(e,ma(Ho(t,3)))},vr.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Ho(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Di(e,i),n},vr.rest=function(e,t){if("function"!=typeof e)throw new at(s);return Ai(e,t=t===n?t:Ga(t))},vr.reverse=Ls,vr.sampleSize=function(e,t,r){return t=(r?Xo(e,t,r):t===n)?1:Ga(t),(ka(e)?Or:Oi)(e,t)},vr.set=function(e,t,n){return null==e?e:Ti(e,t,n)},vr.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Ti(e,t,r,i)},vr.shuffle=function(e){return(ka(e)?Tr:Fi)(e)},vr.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Xo(e,t,r)?(t=0,r=i):(t=null==t?0:Ga(t),r=r===n?i:Ga(r)),zi(e,t,r)):[]},vr.sortBy=oa,vr.sortedUniq=function(e){return e&&e.length?Pi(e):[]},vr.sortedUniqBy=function(e,t){return e&&e.length?Pi(e,Ho(t,2)):[]},vr.split=function(e,t,r){return r&&"number"!=typeof r&&Xo(e,t,r)&&(t=r=n),(r=r===n?j:r>>>0)?(e=Za(e))&&("string"==typeof t||null!=t&&!Ba(t))&&!(t=Hi(t))&&Rn(e)?eo(Wn(e),0,r):e.split(t,r):[]},vr.spread=function(e,t){if("function"!=typeof e)throw new at(s);return t=null==t?0:Jn(Ga(t),0),Ai((function(n){var r=n[t],i=eo(n,0,t);return r&&pn(i,r),nn(e,this,i)}))},vr.tail=function(e){var t=null==e?0:e.length;return t?zi(e,1,t):[]},vr.take=function(e,t,r){return e&&e.length?zi(e,0,(t=r||t===n?1:Ga(t))<0?0:t):[]},vr.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?zi(e,(t=i-(t=r||t===n?1:Ga(t)))<0?0:t,i):[]},vr.takeRightWhile=function(e,t){return e&&e.length?qi(e,Ho(t,3),!1,!0):[]},vr.takeWhile=function(e,t){return e&&e.length?qi(e,Ho(t,3)):[]},vr.tap=function(e,t){return t(e),e},vr.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new at(s);return La(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),da(e,t,{leading:r,maxWait:t,trailing:i})},vr.thru=Ks,vr.toArray=qa,vr.toPairs=yl,vr.toPairsIn=vl,vr.toPath=function(e){return ka(e)?dn(e,bs):Ha(e)?[e]:lo(gs(Za(e)))},vr.toPlainObject=Ja,vr.transform=function(e,t,n){var r=ka(e),i=r||Sa(e)||$a(e);if(t=Ho(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:La(e)&&Oa(o)?wr(kt(e)):{}}return(i?on:Xr)(e,(function(e,r,i){return t(n,e,r,i)})),n},vr.unary=function(e){return aa(e,1)},vr.union=Fs,vr.unionBy=zs,vr.unionWith=js,vr.uniq=function(e){return e&&e.length?$i(e):[]},vr.uniqBy=function(e,t){return e&&e.length?$i(e,Ho(t,2)):[]},vr.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?$i(e,n,t):[]},vr.unset=function(e,t){return null==e||Vi(e,t)},vr.unzip=Rs,vr.unzipWith=Bs,vr.update=function(e,t,n){return null==e?e:Wi(e,t,Ji(n))},vr.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Wi(e,t,Ji(r),i)},vr.values=wl,vr.valuesIn=function(e){return null==e?[]:Nn(e,pl(e))},vr.without=Ps,vr.words=Ol,vr.wrap=function(e,t){return ba(Ji(t),e)},vr.xor=Us,vr.xorBy=Hs,vr.xorWith=$s,vr.zip=Vs,vr.zipObject=function(e,t){return Yi(e||[],t||[],Lr)},vr.zipObjectDeep=function(e,t){return Yi(e||[],t||[],Ti)},vr.zipWith=Ws,vr.entries=yl,vr.entriesIn=vl,vr.extend=el,vr.extendWith=tl,Ul(vr,vr),vr.add=Jl,vr.attempt=Tl,vr.camelCase=_l,vr.capitalize=xl,vr.ceil=Zl,vr.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=Qa(r))==r?r:0),t!==n&&(t=(t=Qa(t))==t?t:0),Pr(Qa(e),t,r)},vr.clone=function(e){return Ur(e,h)},vr.cloneDeep=function(e){return Ur(e,d|h)},vr.cloneDeepWith=function(e,t){return Ur(e,d|h,t="function"==typeof t?t:n)},vr.cloneWith=function(e,t){return Ur(e,h,t="function"==typeof t?t:n)},vr.conformsTo=function(e,t){return null==t||Hr(e,t,dl(t))},vr.deburr=El,vr.defaultTo=function(e,t){return null==e||e!=e?t:e},vr.divide=Xl,vr.endsWith=function(e,t,r){e=Za(e),t=Hi(t);var i=e.length,o=r=r===n?i:Pr(Ga(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},vr.eq=wa,vr.escape=function(e){return(e=Za(e))&&De.test(e)?e.replace(ke,zn):e},vr.escapeRegExp=function(e){return(e=Za(e))&&Le.test(e)?e.replace(Ie,"\\$&"):e},vr.every=function(e,t,r){var i=ka(e)?an:Kr;return r&&Xo(e,t,r)&&(t=n),i(e,Ho(t,3))},vr.find=Qs,vr.findIndex=Es,vr.findKey=function(e,t){return bn(e,Ho(t,3),Xr)},vr.findLast=Js,vr.findLastIndex=ks,vr.findLastKey=function(e,t){return bn(e,Ho(t,3),ei)},vr.floor=ec,vr.forEach=Zs,vr.forEachRight=Xs,vr.forIn=function(e,t){return null==e?e:Jr(e,Ho(t,3),pl)},vr.forInRight=function(e,t){return null==e?e:Zr(e,Ho(t,3),pl)},vr.forOwn=function(e,t){return e&&Xr(e,Ho(t,3))},vr.forOwnRight=function(e,t){return e&&ei(e,Ho(t,3))},vr.get=sl,vr.gt=_a,vr.gte=xa,vr.has=function(e,t){return null!=e&&Yo(e,t,si)},vr.hasIn=al,vr.head=Ds,vr.identity=jl,vr.includes=function(e,t,n,r){e=Da(e)?e:wl(e),n=n&&!r?Ga(n):0;var i=e.length;return n<0&&(n=Jn(i+n,0)),Ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&vn(e,t,n)>-1},vr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ga(n);return i<0&&(i=Jn(r+i,0)),vn(e,t,i)},vr.inRange=function(e,t,r){return t=Ka(t),r===n?(r=t,t=0):r=Ka(r),function(e,t,n){return e>=Zn(t,n)&&e<Jn(t,n)}(e=Qa(e),t,r)},vr.invoke=ul,vr.isArguments=Ea,vr.isArray=ka,vr.isArrayBuffer=Ma,vr.isArrayLike=Da,vr.isArrayLikeObject=Ca,vr.isBoolean=function(e){return!0===e||!1===e||Fa(e)&&ii(e)==V},vr.isBuffer=Sa,vr.isDate=Aa,vr.isElement=function(e){return Fa(e)&&1===e.nodeType&&!Ra(e)},vr.isEmpty=function(e){if(null==e)return!0;if(Da(e)&&(ka(e)||"string"==typeof e||"function"==typeof e.splice||Sa(e)||$a(e)||Ea(e)))return!e.length;var t=Go(e);if(t==Q||t==re)return!e.size;if(rs(e))return!mi(e).length;for(var n in e)if(ht.call(e,n))return!1;return!0},vr.isEqual=function(e,t){return di(e,t)},vr.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?di(e,t,n,r):!!i},vr.isError=Na,vr.isFinite=function(e){return"number"==typeof e&&kn(e)},vr.isFunction=Oa,vr.isInteger=Ta,vr.isLength=Ia,vr.isMap=za,vr.isMatch=function(e,t){return e===t||pi(e,t,Vo(t))},vr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,pi(e,t,Vo(t),r)},vr.isNaN=function(e){return ja(e)&&e!=+e},vr.isNative=function(e){if(ns(e))throw new tt(o);return hi(e)},vr.isNil=function(e){return null==e},vr.isNull=function(e){return null===e},vr.isNumber=ja,vr.isObject=La,vr.isObjectLike=Fa,vr.isPlainObject=Ra,vr.isRegExp=Ba,vr.isSafeInteger=function(e){return Ta(e)&&e>=-L&&e<=L},vr.isSet=Pa,vr.isString=Ua,vr.isSymbol=Ha,vr.isTypedArray=$a,vr.isUndefined=function(e){return e===n},vr.isWeakMap=function(e){return Fa(e)&&Go(e)==ae},vr.isWeakSet=function(e){return Fa(e)&&ii(e)==le},vr.join=function(e,t){return null==e?"":Yn.call(e,t)},vr.kebabCase=kl,vr.last=Ns,vr.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=Ga(r))<0?Jn(i+o,0):Zn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):yn(e,_n,o,!0)},vr.lowerCase=Ml,vr.lowerFirst=Dl,vr.lt=Va,vr.lte=Wa,vr.max=function(e){return e&&e.length?Gr(e,jl,oi):n},vr.maxBy=function(e,t){return e&&e.length?Gr(e,Ho(t,2),oi):n},vr.mean=function(e){return xn(e,jl)},vr.meanBy=function(e,t){return xn(e,Ho(t,2))},vr.min=function(e){return e&&e.length?Gr(e,jl,bi):n},vr.minBy=function(e,t){return e&&e.length?Gr(e,Ho(t,2),bi):n},vr.stubArray=Yl,vr.stubFalse=Ql,vr.stubObject=function(){return{}},vr.stubString=function(){return""},vr.stubTrue=function(){return!0},vr.multiply=tc,vr.nth=function(e,t){return e&&e.length?xi(e,Ga(t)):n},vr.noConflict=function(){return Vt._===this&&(Vt._=yt),this},vr.noop=Hl,vr.now=sa,vr.pad=function(e,t,n){e=Za(e);var r=(t=Ga(t))?Vn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ko(Gt(i),n)+e+ko(qt(i),n)},vr.padEnd=function(e,t,n){e=Za(e);var r=(t=Ga(t))?Vn(e):0;return t&&r<t?e+ko(t-r,n):e},vr.padStart=function(e,t,n){e=Za(e);var r=(t=Ga(t))?Vn(e):0;return t&&r<t?ko(t-r,n)+e:e},vr.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),er(Za(e).replace(Fe,""),t||0)},vr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Xo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=Ka(e),t===n?(t=e,e=0):t=Ka(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=tr();return Zn(e+o*(t-e+Pt("1e-"+((o+"").length-1))),t)}return Ci(e,t)},vr.reduce=function(e,t,n){var r=ka(e)?hn:Mn,i=arguments.length<3;return r(e,Ho(t,4),n,i,Wr)},vr.reduceRight=function(e,t,n){var r=ka(e)?fn:Mn,i=arguments.length<3;return r(e,Ho(t,4),n,i,qr)},vr.repeat=function(e,t,r){return t=(r?Xo(e,t,r):t===n)?1:Ga(t),Si(Za(e),t)},vr.replace=function(){var e=arguments,t=Za(e[0]);return e.length<3?t:t.replace(e[1],e[2])},vr.result=function(e,t,r){var i=-1,o=(t=Zi(t,e)).length;for(o||(o=1,e=n);++i<o;){var s=null==e?n:e[bs(t[i])];s===n&&(i=o,s=r),e=Oa(s)?s.call(e):s}return e},vr.round=nc,vr.runInContext=e,vr.sample=function(e){return(ka(e)?Nr:Ni)(e)},vr.size=function(e){if(null==e)return 0;if(Da(e))return Ua(e)?Vn(e):e.length;var t=Go(e);return t==Q||t==re?e.size:mi(e).length},vr.snakeCase=Cl,vr.some=function(e,t,r){var i=ka(e)?mn:ji;return r&&Xo(e,t,r)&&(t=n),i(e,Ho(t,3))},vr.sortedIndex=function(e,t){return Ri(e,t)},vr.sortedIndexBy=function(e,t,n){return Bi(e,t,Ho(n,2))},vr.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Ri(e,t);if(r<n&&wa(e[r],t))return r}return-1},vr.sortedLastIndex=function(e,t){return Ri(e,t,!0)},vr.sortedLastIndexBy=function(e,t,n){return Bi(e,t,Ho(n,2),!0)},vr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Ri(e,t,!0)-1;if(wa(e[n],t))return n}return-1},vr.startCase=Sl,vr.startsWith=function(e,t,n){return e=Za(e),n=null==n?0:Pr(Ga(n),0,e.length),t=Hi(t),e.slice(n,n+t.length)==t},vr.subtract=rc,vr.sum=function(e){return e&&e.length?Dn(e,jl):0},vr.sumBy=function(e,t){return e&&e.length?Dn(e,Ho(t,2)):0},vr.template=function(e,t,r){var i=vr.templateSettings;r&&Xo(e,t,r)&&(t=n),e=Za(e),t=tl({},t,i,To);var o,s,l=tl({},t.imports,i.imports,To),c=dl(l),u=Nn(l,c),d=0,p=t.interpolate||Je,h="__p += '",f=ot((t.escape||Je).source+"|"+p.source+"|"+(p===Ae?$e:Je).source+"|"+(t.evaluate||Je).source+"|$","g"),m="//# sourceURL="+(ht.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zt+"]")+"\n";e.replace(f,(function(t,n,r,i,a,l){return r||(r=i),h+=e.slice(d,l).replace(Ze,jn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),h+="';\n";var g=ht.call(t,"variable")&&t.variable;if(g){if(Ue.test(g))throw new tt(a)}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(we,""):h).replace(_e,"$1").replace(xe,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var b=Tl((function(){return nt(c,m+"return "+h).apply(n,u)}));if(b.source=h,Na(b))throw b;return b},vr.times=function(e,t){if((e=Ga(e))<1||e>L)return[];var n=j,r=Zn(e,j);t=Ho(t),e-=j;for(var i=Cn(r,t);++n<e;)t(n);return i},vr.toFinite=Ka,vr.toInteger=Ga,vr.toLength=Ya,vr.toLower=function(e){return Za(e).toLowerCase()},vr.toNumber=Qa,vr.toSafeInteger=function(e){return e?Pr(Ga(e),-L,L):0===e?e:0},vr.toString=Za,vr.toUpper=function(e){return Za(e).toUpperCase()},vr.trim=function(e,t,r){if((e=Za(e))&&(r||t===n))return Sn(e);if(!e||!(t=Hi(t)))return e;var i=Wn(e),o=Wn(t);return eo(i,Tn(i,o),In(i,o)+1).join("")},vr.trimEnd=function(e,t,r){if((e=Za(e))&&(r||t===n))return e.slice(0,qn(e)+1);if(!e||!(t=Hi(t)))return e;var i=Wn(e);return eo(i,0,In(i,Wn(t))+1).join("")},vr.trimStart=function(e,t,r){if((e=Za(e))&&(r||t===n))return e.replace(Fe,"");if(!e||!(t=Hi(t)))return e;var i=Wn(e);return eo(i,Tn(i,Wn(t))).join("")},vr.truncate=function(e,t){var r=D,i=C;if(La(t)){var o="separator"in t?t.separator:o;r="length"in t?Ga(t.length):r,i="omission"in t?Hi(t.omission):i}var s=(e=Za(e)).length;if(Rn(e)){var a=Wn(e);s=a.length}if(r>=s)return e;var l=r-Vn(i);if(l<1)return i;var c=a?eo(a,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(a&&(l+=c.length-l),Ba(o)){if(e.slice(l).search(o)){var u,d=c;for(o.global||(o=ot(o.source,Za(Ve.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var p=u.index;c=c.slice(0,p===n?l:p)}}else if(e.indexOf(Hi(o),l)!=l){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+i},vr.unescape=function(e){return(e=Za(e))&&Me.test(e)?e.replace(Ee,Kn):e},vr.uniqueId=function(e){var t=++ft;return Za(e)+t},vr.upperCase=Al,vr.upperFirst=Nl,vr.each=Zs,vr.eachRight=Xs,vr.first=Ds,Ul(vr,function(){var e={};return Xr(vr,(function(t,n){ht.call(vr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),vr.VERSION=r,on(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){vr[e].placeholder=vr})),on(["drop","take"],(function(e,t){Er.prototype[e]=function(r){r=r===n?1:Jn(Ga(r),0);var i=this.__filtered__&&!t?new Er(this):this.clone();return i.__filtered__?i.__takeCount__=Zn(r,i.__takeCount__):i.__views__.push({size:Zn(r,j),type:e+(i.__dir__<0?"Right":"")}),i},Er.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),on(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==N||n==T;Er.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ho(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),on(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Er.prototype[e]=function(){return this[n](1).value()[0]}})),on(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Er.prototype[e]=function(){return this.__filtered__?new Er(this):this[n](1)}})),Er.prototype.compact=function(){return this.filter(jl)},Er.prototype.find=function(e){return this.filter(e).head()},Er.prototype.findLast=function(e){return this.reverse().find(e)},Er.prototype.invokeMap=Ai((function(e,t){return"function"==typeof e?new Er(this):this.map((function(n){return ci(n,e,t)}))})),Er.prototype.reject=function(e){return this.filter(ma(Ho(e)))},Er.prototype.slice=function(e,t){e=Ga(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Er(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=Ga(t))<0?r.dropRight(-t):r.take(t-e)),r)},Er.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Er.prototype.toArray=function(){return this.take(j)},Xr(Er.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=vr[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);o&&(vr.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,l=t instanceof Er,c=a[0],u=l||ka(t),d=function(e){var t=o.apply(vr,pn([e],a));return i&&p?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,h=!!this.__actions__.length,f=s&&!p,m=l&&!h;if(!s&&u){t=m?t:new Er(this);var g=e.apply(t,a);return g.__actions__.push({func:Ks,args:[d],thisArg:n}),new xr(g,p)}return f&&m?e.apply(this,a):(g=this.thru(d),f?i?g.value()[0]:g.value():g)})})),on(["pop","push","shift","sort","splice","unshift"],(function(e){var t=lt[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);vr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ka(i)?i:[],e)}return this[n]((function(n){return t.apply(ka(n)?n:[],e)}))}})),Xr(Er.prototype,(function(e,t){var n=vr[t];if(n){var r=n.name+"";ht.call(ur,r)||(ur[r]=[]),ur[r].push({name:t,func:n})}})),ur[wo(n,b).name]=[{name:"wrapper",func:n}],Er.prototype.clone=function(){var e=new Er(this.__wrapped__);return e.__actions__=lo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=lo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=lo(this.__views__),e},Er.prototype.reverse=function(){if(this.__filtered__){var e=new Er(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Er.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=ka(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=Zn(t,e+s);break;case"takeRight":e=Jn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,l=a-s,c=r?a:s-1,u=this.__iteratees__,d=u.length,p=0,h=Zn(l,this.__takeCount__);if(!n||!r&&i==l&&h==l)return Ki(e,this.__actions__);var f=[];e:for(;l--&&p<h;){for(var m=-1,g=e[c+=t];++m<d;){var b=u[m],y=b.iteratee,v=b.type,w=y(g);if(v==O)g=w;else if(!w){if(v==N)continue e;break e}}f[p++]=g}return f},vr.prototype.at=Gs,vr.prototype.chain=function(){return qs(this)},vr.prototype.commit=function(){return new xr(this.value(),this.__chain__)},vr.prototype.next=function(){this.__values__===n&&(this.__values__=qa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},vr.prototype.plant=function(e){for(var t,r=this;r instanceof _r;){var i=vs(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},vr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Er){var t=e;return this.__actions__.length&&(t=new Er(this)),(t=t.reverse()).__actions__.push({func:Ks,args:[Ls],thisArg:n}),new xr(t,this.__chain__)}return this.thru(Ls)},vr.prototype.toJSON=vr.prototype.valueOf=vr.prototype.value=function(){return Ki(this.__wrapped__,this.__actions__)},vr.prototype.first=vr.prototype.head,Ot&&(vr.prototype[Ot]=function(){return this}),vr}();qt?((qt.exports=Gn)._=Gn,Wt._=Gn):Vt._=Gn}).call(yi)}(JI,JI.exports);const ZI=()=>document.documentElement.style.setProperty("--focus-background-color","rgba(234, 243, 252, 0.5)"),XI=()=>document.documentElement.style.setProperty("--focus-background-color","transparent"),eL={onMouseEnter:ZI,onMouseLeave:XI},tL=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?eL:{}};function nL(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var rL="undefined"!=typeof window&&"undefined"!=typeof document;function iL(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function oL(){return rL&&document.createElement("div")}function sL(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!sL(e[n],t[n]))return!1}return!0}return!1}function aL(e){var t=[];return e.forEach((function(e){t.find((function(t){return sL(e,t)}))||t.push(e)})),t}var lL=rL?d:s;function cL(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var uL={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||cL(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&cL(t,"remove",e.props.className)},onAfterUpdate:r}}};function dL(e){return function(t){var o=t.children,s=t.content,a=t.visible,l=t.singleton,c=t.render,d=t.reference,p=t.disabled,h=void 0!==p&&p,f=t.ignoreAttributes,m=void 0===f||f;t.__source,t.__self;var g,b,y=nL(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),v=void 0!==a,w=void 0!==l,_=r(!1),x=_[0],E=_[1],k=r({}),M=k[0],D=k[1],C=r(),S=C[0],A=C[1],N=(g=function(){return{container:oL(),renders:1}},(b=i()).current||(b.current="function"==typeof g?g():g),b.current),O=Object.assign({ignoreAttributes:m},y,{content:N.container});v&&(O.trigger="manual",O.hideOnClick=!1),w&&(h=!0);var T=O,I=O.plugins||[];c&&(T=Object.assign({},O,{plugins:w&&null!=l.data?[].concat(I,[{fn:function(){return{onTrigger:function(e,t){var n=l.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,A(n.content)}}}}]):I,render:function(){return{popper:N.container}}}));var L=[d].concat(o?[o.type]:[]);return lL((function(){var t=d;d&&d.hasOwnProperty("current")&&(t=d.current);var n=e(t||N.ref||oL(),Object.assign({},T,{plugins:[uL].concat(O.plugins||[])}));return N.instance=n,h&&n.disable(),a&&n.show(),w&&l.hook({instance:n,content:s,props:T,setSingletonContent:A}),E(!0),function(){n.destroy(),null==l||l.cleanup(n)}}),L),lL((function(){var e;if(1!==N.renders){var t,n,r,i,o=N.instance;o.setProps((t=o.props,n=T,Object.assign({},n,{popperOptions:Object.assign({},t.popperOptions,n.popperOptions,{modifiers:aL([].concat((null==(r=t.popperOptions)?void 0:r.modifiers)||[],(null==(i=n.popperOptions)?void 0:i.modifiers)||[]))})}))),null==(e=o.popperInstance)||e.forceUpdate(),h?o.disable():o.enable(),v&&(a?o.show():o.hide()),w&&l.hook({instance:o,content:s,props:T,setSingletonContent:A})}else N.renders++})),lL((function(){var e;if(c){var t=N.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;M.placement===n.placement&&M.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&M.escaped===(null==r?void 0:r.hasPopperEscaped)||D({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[M.placement,M.referenceHidden,M.escaped].concat(L)),n.createElement(n.Fragment,null,o?u(o,{ref:function(e){N.ref=e,iL(o.ref,e)}}):null,x&&ge(c?c(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(M),S,N.instance):s,N.container))}}var pL=function(e,t){return c((function(r,i){var o=r.children,s=nL(r,["children"]);return n.createElement(e,Object.assign({},t,s),o?u(o,{ref:function(e){iL(i,e),iL(o.ref,e)}}):null)}))},hL=pL(dL(MM));class fL extends n.Component{constructor(e){super(e),_m(this,"keydownHandler",(e=>{const t={Enter:this.enterHandler,ArrowUp:this.upHandler,ArrowDown:this.downHandler,ArrowLeft:this.leftArrowHandler,ArrowRight:this.rightArrowHandler};e.key in t&&t[e.key](e)})),_m(this,"selectItem",(e=>{const{items:t,editor:n,range:r}=this.props,i=t[e],o=i&&i.command,s=Xo(i.items);o&&s&&i.command({editor:n,range:r})})),_m(this,"upHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+e.length-1)%e.length})})),_m(this,"downHandler",(()=>{const{items:e}=this.props,{selectedIndex:t}=this.state;this.setState({selectedIndex:(t+1)%e.length})})),_m(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),_m(this,"leftArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t}=this.props;e>0&&t(e-1)})),_m(this,"rightArrowHandler",(()=>{const{menuIndex:e,setActiveMenuIndex:t,items:n}=this.props,{selectedIndex:r}=this.state,i=n[r];i&&!Xo(i.items)&&t(e+1)})),this.state={selectedIndex:0},this.menuRef=n.createRef()}componentDidMount(){const{menuIndex:e,activeMenuIndex:t}=this.props;e===t&&document.addEventListener("keydown",this.keydownHandler)}componentWillUnmount(){document.removeEventListener("keydown",this.keydownHandler)}componentDidUpdate(e){const{items:t,menuIndex:n,activeMenuIndex:r}=this.props,i=n===r;t!==e.items&&this.setState({selectedIndex:0}),YT({wrapperRef:this.menuRef,index:this.state.selectedIndex}),i?document.addEventListener("keydown",this.keydownHandler):document.removeEventListener("keydown",this.keydownHandler)}render(){const{items:e,menuIndex:t,activeMenuIndex:r}=this.props,{selectedIndex:i}=this.state,o=t===r;return n.createElement("div",{className:"neeto-editor-slash-commands__wrapper",ref:this.menuRef},e.map(((e,r)=>{const s=Xo(e.items),a=n.createElement(mL,{index:r,item:e,key:e.title,selectItem:()=>s&&this.selectItem(r),selectedIndex:o?i:-1,onHover:()=>this.setState({selectedIndex:r})});return s?a:n.createElement(hL,{interactive:!0,key:e.title,placement:"right",visible:i===r,content:n.createElement(fL,yb({},this.props,{items:e.items,menuIndex:t+1})),onCreate:e=>{let{popper:t}=e;return t.style.width="max-content"},onHide:()=>{this.isSubmenuOpened=!1},onShow:()=>{this.isSubmenuOpened=!0}},a)})))}}const mL=c(((e,t)=>{let{item:r,selectedIndex:i,index:o,selectItem:s,onHover:a}=e;const{Icon:l}=r;return n.createElement("div",{"data-cy":`neeto-editor-command-list-item-${o}`,ref:t,className:_s("neeto-editor-slash-commands__item",{active:o===i}),onClick:s,onMouseEnter:a},l&&n.createElement(l,{size:20}),n.createElement("div",{className:"neeto-editor-slash-commands__item-content"},n.createElement("h5",null,r.title),n.createElement("p",null,r.description)))}));class gL extends n.Component{constructor(){super(...arguments),_m(this,"state",{activeMenuIndex:0}),_m(this,"onKeyDown",(e=>{let{event:t}=e;return["Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)})),_m(this,"setActiveMenuIndex",(e=>this.setState({activeMenuIndex:e})))}render(){return n.createElement(fL,yb({},this.props,{activeMenuIndex:this.state.activeMenuIndex,items:this.props.items,menuIndex:0,setActiveMenuIndex:this.setActiveMenuIndex}))}}const bL=[{optionName:Kn.PARAGRAPH,title:"Paragraph",description:"Add a plain text block.",Icon:R,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("paragraph").run()}},{optionName:Kn.H1,title:"H1",description:"Add a big heading.",Icon:B,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:1}).run()}},{optionName:Kn.H2,title:"H2",description:"Add a sub-heading.",Icon:P,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:2}).run()}},{optionName:Kn.H3,title:"H3",description:"Add a sub-heading of level 3.",Icon:U,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:3}).run()}},{optionName:Kn.H4,title:"H4",description:"Add a sub-heading of level 4.",Icon:U,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:4}).run()}},{optionName:Kn.H5,title:"H5",description:"Add a sub-heading of level 5.",Icon:U,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:5}).run()}},{optionName:Kn.H6,title:"H6",description:"Add a sub-heading of level 6.",Icon:U,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setNode("heading",{level:6}).run()}},{optionName:Kn.LIST_ORDERED,title:"Numbered list",description:"Add a list with numbering.",Icon:H,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleOrderedList().run()}},{optionName:Kn.LIST_BULLETS,title:"Bulleted list",description:"Add a list with bullets.",Icon:$,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBulletList().run()}},{optionName:Kn.IMAGE_UPLOAD,title:"Image",description:"Add an image.",Icon:V,command:f},{optionName:Kn.VIDEO_UPLOAD,title:"Video",description:"Add a video.",Icon:W,command:f},{optionName:Kn.BLOCKQUOTE,title:"Blockquote",description:"Add a quote.",Icon:q,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleBlockquote().run()}},{optionName:Kn.CODE_BLOCK,title:"Code block",description:"Add a code block with syntax highlighting.",Icon:K,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).toggleCodeBlock().run()}},{optionName:Kn.EMOJI,title:"Emoji",description:"Add an emoji.",Icon:G,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).insertContent("::").run()}},{optionName:Kn.DIVIDER,title:"Divider",description:"Add an horizontal line to separate sections.",Icon:Y,command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).setHorizontalRule().run()}},{optionName:Kn.VIDEO_EMBED,title:"Embed Youtube/Loom/Vimeo",description:"Embed a video from major services.",Icon:Q,command:f},{optionName:Kn.PASTE_UNFORMATTED,title:"Paste Unformatted",description:"Paste by removing all styles.",Icon:J,command:e=>{let{editor:t,range:n}=e;return t.chain().focus().deleteRange(n).pasteUnformatted().run()}}],yL={title:"No results",command:e=>{let{editor:t,range:n}=e;t.chain().focus().deleteRange(n).run()}},vL=e=>{let{options:t,addonCommands:n,setMediaUploader:r,setIsEmbedModalOpen:i}=e;const o=bL.map((e=>e.optionName===Kn.IMAGE_UPLOAD?pe("command",(e=>t=>{let{editor:n,range:r}=t;e(pe("image",!0)),n.chain().focus().deleteRange(r).run()})(r),e):e.optionName===Kn.VIDEO_UPLOAD?pe("command",(e=>t=>{let{editor:n,range:r}=t;e(pe("video",!0)),n.chain().focus().deleteRange(r).run()})(r),e):e.optionName===Kn.VIDEO_EMBED?pe("command",(e=>t=>{let{editor:n,range:r}=t;e(!0),n.chain().focus().deleteRange(r).run()})(i),e):e));return[...o.filter((e=>{let{optionName:n}=e;return t.includes(n)})),...n]},wL=new qn("commands");var _L=e=>{let{addonCommands:t,options:n,setMediaUploader:r,setIsEmbedModalOpen:i}=e;const o=vL({options:n,addonCommands:t,setMediaUploader:r,setIsEmbedModalOpen:i});return kx.create({name:"slash-commands",addOptions:()=>({HTMLAttributes:{class:"commands"},suggestion:{char:"/",startOfLine:!1,pluginKey:wL,command:e=>{let{editor:t,range:n,props:r}=e;r.command({editor:t,range:n})},items:e=>{let{query:t}=e;const n=o.filter((e=>{let{title:n}=e;return n.toLowerCase().includes(t.toLowerCase())}));return JI.exports.isEmpty(n)?[yL]:n},render:()=>{let e,t;return{onStart:n=>{e=new RM(gL,{props:n,editor:n.editor}),t=MM("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",arrow:!1,zIndex:99999,role:"dropdown",theme:"neeto-editor-slash-menu"}),ZI()},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(t){var n;return null===(n=e.ref)||void 0===n?void 0:n.onKeyDown(t)},onExit(){t&&t[0].destroy(),e&&e.destroy(),XI()}}}}}),addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}})};const xL=new qn("special-mention"),EL=e=>{var t;let{options:n,node:r}=e;return`${n.suggestion.char}${null!==(t=r.attrs.label)&&void 0!==t?t:r.attrs.id}`},kL={char:"@@",pluginKey:xL,render:()=>{let e,t;return{onStart:n=>{e=new RM(QT,{props:n,editor:n.editor}),t=MM("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){var r;return"Escape"===n.event.key?(t[0].hide(),!0):null===(r=e.ref)||void 0===r?void 0:r.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},ML=GT.extend({name:"special-mention",renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",sx({"data-type":this.name},this.options.HTMLAttributes,n),EL({options:this.options,node:t})]}});var DL=e=>{let{suggestion:t={},...n}=e;return ML.configure({...n,suggestion:{...kL,...t}})};const CL=e=>{let{onClickVariable:t,variables:r}=e;const i=function(){const e=[],t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((n=>{const{category_key:r,category_label:i,variables:o}=n;if(r&&o){const e=o.map(pe("category_key",r));t.push({label:i,variables:e})}else e.push(n)})),JI.exports.isEmpty(e)||t.push({label:JI.exports.isEmpty(t)?null:"Others",variables:e}),t}(r);return b(r)?null:n.createElement("div",{className:"neeto-editor-variables-list"},i.map(((e,r)=>{let{label:i,variables:o}=e;return n.createElement(SL,{index:r,key:r,title:i,variables:o,onClickItem:t})})))},SL=e=>{let{index:t,title:r,variables:i,onClickItem:o}=e;return n.createElement("div",{className:"neeto-editor-variables-block","data-cy":`neeto-editor-variable-option-category-${t}`},r&&n.createElement("h6",null,r),n.createElement("div",{className:"neeto-editor-variables-row"},i.map((e=>n.createElement("button",{className:"neeto-editor-variable","data-cy":`neeto-editor-variable-option-item-${e.label}--${e.value}`,key:`${e.label}--${e.value}`,type:"button",onClick:()=>o(e)},e.label)))))},AL=e=>{let{items:t,command:r}=e;return n.createElement("div",{className:"neeto-editor-variables-suggestion"},n.createElement(CL,{variables:t,onClickVariable:e=>{const{category_key:t,key:n}=e,i=t?`${t}.${n}`:n;r({label:i,id:i})}}))},NL=new qn("variables"),OL=mE.create({name:"variable",addOptions:()=>({HTMLAttributes:{class:"neeto-editor-variable"},charOpen:"{{",charClose:"}}",renderLabel(e){let{options:t,node:n}=e;return`${t.charOpen}${n.attrs.label||n.attrs.id}${t.charClose}`},suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}),parseHTML:()=>[{tag:"span[data-variable]"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;return["span",sx({"data-variable":""},this.options.HTMLAttributes,n),this.options.renderLabel({options:this.options,node:t})]},renderText(e){let{node:t}=e;return this.options.renderLabel({options:this.options,node:t})},addCommands(){return{setVariable:e=>t=>{let{chain:n}=t;n().focus().insertContent([{type:this.name,attrs:e},{type:"text",text:" "}]).run()}}},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command((e=>{let{tr:t,state:n}=e,r=!1;const{selection:i}=n,{empty:o,anchor:s}=i;return!!o&&(n.doc.nodesBetween(s-1,s,((e,n)=>{if(e.type.name===this.name)return r=!0,t.insertText("",n,n+e.nodeSize),!1})),r)}))}},addProseMirrorPlugins(){return[lN({editor:this.editor,...this.options.suggestion})]}}),TL={char:"{{",startOfLine:!1,pluginKey:NL,command:e=>{let{editor:t,range:n,props:r}=e;t.chain().focus().deleteRange(n).setVariable(r).run()},items:()=>[],render:()=>{let e,t;return{onStart:n=>{e=new RM(AL,{props:n,editor:n.editor}),t=MM("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",zIndex:99999})},onUpdate(n){e.updateProps(n),t[0].setProps({getReferenceClientRect:n.clientRect})},onExit(){t[0].destroy(),e.destroy()}}}};var IL=e=>{let{suggestion:t={}}=e;return OL.configure({suggestion:{...TL,...t}})};const LL=e=>{var t;let{node:r,editor:o,getPos:s,updateAttributes:a,deleteNode:l}=e;const c=i(null),{alt:u,src:d,vidheight:p,vidwidth:h,align:f}=r.attrs,{view:m}=o;let g=p,y=h;const v=c.current?null===(t=c.current.querySelector("figcaption>div"))||void 0===t?void 0:t.textContent:u;return n.createElement(jM,{className:`neeto-editor__image-wrapper neeto-editor__image--${f}`},n.createElement("figure",{ref:c},n.createElement(BT,{align:f,deleteNode:l,updateAttributes:a}),n.createElement(RT,{lockAspectRatio:!0,className:"neeto-editor__image",size:{height:g,width:y},onResizeStop:(e,t,n)=>{g=n.offsetHeight,y=n.offsetWidth,m.dispatch(m.state.tr.setNodeMarkup(s(),void 0,{...r.attrs,vidheight:g,vidwidth:y,height:g,width:y})),o.commands.focus()}},n.createElement("video",yb({controls:!0},r.attrs,{alt:v,preload:"metadata",src:d}))),n.createElement(zM,{as:"figcaption",className:_s({"is-empty":b(v)})})))},FL=mE.create({name:"video",addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",draggable:!0,isolating:!0,addAttributes:()=>({src:{default:null,parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("src")}},alt:{default:"",parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("alt")}},vidheight:{default:288,parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("vidheight")}},vidwidth:{default:"fit-content",parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("vidwidth")}},align:{default:"left",parseHTML:e=>{var t;return null===(t=e.querySelector("video"))||void 0===t?void 0:t.getAttribute("align")}}}),parseHTML:()=>[{tag:"figure[data-video]",getAttrs:e=>"normal"!==e.style.fontWeight&&null,contentElement:"figcaption"}],renderHTML(e){let{node:t,HTMLAttributes:n}=e;const{align:r,src:i,vidheight:o,vidwidth:s}=t.attrs,a={class:"neeto-editor__image",style:`height:${o}px;width:${s}px;`};return["a",{href:i,target:"_blank",rel:"noopener noreferrer",class:`neeto-editor__image-wrapper neeto-editor__image--${r}`},["figure",sx(this.options.HTMLAttributes,{"data-video":""}),["div",a,["video",sx(n,{preload:"metadata",controls:!0,draggable:!1,contenteditable:!1})]],["figcaption",0]]]},addNodeView:()=>PM(LL),addCommands(){return{setVideo:e=>{let{caption:t,...n}=e;return e=>{let{chain:r}=e;return r().insertContent({type:this.name,attrs:n,content:t?[{type:"text",text:t}]:[]}).command((e=>{let{tr:t,commands:n}=e;const{doc:r,selection:i}=t,o=r.resolve(i.to).end();return n.setTextSelection(o)})).run()}}}}}),zL=t=>{let{placeholder:n,extensions:r,mentions:i,variables:o,isSlashCommandsActive:s,options:a,addonCommands:l,onSubmit:c,keyboardShortcuts:u,uploadEndpoint:d,isVideoEmbedActive:p,setMediaUploader:h,setIsEmbedModalOpen:f}=t,m=[XM,ZM,SC,rD,iN,VT,CC,yT,uT,oN,YM,eD.configure({mode:"shallowest"}),FL,$T({uploadEndpoint:d}),zS.configure({document:!1,codeBlock:!1,code:!1}),qT({onSubmit:c,shortcuts:u}),QI.configure({placeholder:n})];if(p&&m.push(sN),s&&m.push(_L({options:a,addonCommands:l,setMediaUploader:h,setIsEmbedModalOpen:f})),!b(i)){const t=function(){const t=qI(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);return n=>{let{query:r}=n;if(!r)return t.slice(0,10);const i=new WI(t,{keys:["name"],threshold:.25}).search(r).slice(0,10);return e("item",i)}}(i);m.push(YI({suggestion:{items:t}})),m.push(DL({suggestion:{items:t}}))}return b(o)||m.push(IL({suggestion:{items:()=>o}})),m=m.concat(r),m},jL=e=>{var t;let{uppy:i}=e;const[o,a]=r(0);s((()=>{i.on("upload-progress",((e,t)=>{let{progress:n}=t;return a(n)}))}),[i]);const l=`${o}%`;return n.createElement("div",{className:"ne-media-uploader__progress"},n.createElement("p",{className:"ne-media-uploader__progress-title"},"Uploading..."),n.createElement("p",{className:"ne-media-uploader__progress-file"},null===(t=i.getFiles()[0])||void 0===t?void 0:t.name),n.createElement("div",{className:"neeto-editor-progress-bar__wrapper","data-cy":"neeto-editor-image-upload-progress-bar"},n.createElement("div",{className:"neeto-editor-progress-bar__percent"},n.createElement("p",null,l),n.createElement(x,{icon:F,size:"small",style:"text",onClick:()=>i.cancelAll()})),n.createElement("div",{className:"neeto-editor-progress-bar__indicator"},n.createElement("div",{className:"neeto-editor-progress-bar__indicator-inner",style:{width:l}}))))},RL=e=>{let{isImage:t,endpoint:r,onSuccess:i}=e;const o=t?fm:mm,{uppy:s,isUploading:a}=db({endpoint:r,uppyConfig:o,onSuccess:i});return a?n.createElement(jL,{uppy:s}):n.createElement("div",{className:"ne-media-uploader__dnd-wrapper"},n.createElement(Of,{className:"ne-media-uploader__dnd","data-cy":"neeto-editor-media-local-uploader",uppy:s,locale:{strings:{dropHereOr:"Drop your file(s) here or %{browse}",browse:"Browse"}},note:`Max. File Size: ${ym(o.restrictions.maxFileSize)}`}))},BL=e=>{let{isImage:t,url:i,editor:o,onClose:s,alt:a="",setMediaUrl:l}=e;const[c,u]=r(a||""),[d,p]=r(!1),h=()=>{t?o.chain().focus().setFigure({src:i,caption:c,alt:c}).run():o.chain().focus().setVideo({src:i,caption:c,alt:c}).run(),s()};return n.createElement("div",{className:"ne-media-editor",onKeyDown:e=>{"Enter"===e.key&&h()}},n.createElement(x,{icon:Z,iconPosition:"left",label:"back",size:"small",style:"text",onClick:()=>l("")}),d?n.createElement("div",{className:"ne-media-editor__error"},n.createElement("h2",null,"Something Went Wrong!"),n.createElement("p",null,"The selected media cannot be displayed. Please try again.")):n.createElement(n.Fragment,null,t?n.createElement("img",{loading:"lazy",src:i,onError:e=>{let{currentTarget:t}=e;p(!0),t.onerror=null}}):n.createElement("video",{src:i,onError:e=>{let{currentTarget:t}=e;p(!0),t.onerror=null}}),n.createElement(_,{autoFocus:!0,label:"Caption",placeholder:"Enter a caption",value:c,onChange:e=>u(e.target.value)})),n.createElement("div",{className:"ne-media-editor__footer"},n.createElement(x,{disabled:d,label:"Save changes",onClick:h}),n.createElement(x,{label:"Cancel",style:"text",onClick:s})))};var PL={},UL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HL=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.create(null);function n(e,n){return t[e]=t[e]||[],t[e].push(n),this}function r(e,t){return t._once=!0,n(e,t),this}function i(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n?t[e].splice(t[e].indexOf(n),1):delete t[e],this}function o(e){for(var n=this,r=arguments.length,o=Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];var a=t[e]&&t[e].slice();return a&&a.forEach((function(t){t._once&&i(e,t),t.apply(n,o)})),this}return UL({},e,{on:n,once:r,off:i,emit:o})},$L=Object.freeze({__proto__:null,default:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,s=void 0,a=void 0,l=void 0,c=void 0,u=void 0,d=void 0,p=void 0,h=void 0,f=0===e.packed.indexOf("data-")?e.packed:"data-"+e.packed,m=e.sizes.slice().reverse(),g=!1!==e.position,b=e.container.nodeType?e.container:document.querySelector(e.container),y={all:function(){return E(b.children)},new:function(){return E(b.children).filter((function(e){return!e.hasAttribute(""+f)}))}},v=[D,C,S],w=[A,N,O,T],_=HL({pack:F,update:z,resize:j});return _;function x(e){e.forEach((function(e){return e()}))}function E(e){return Array.prototype.slice.call(e)}function k(e){return Array.apply(null,Array(e)).map((function(){return 0}))}function M(){return m.map((function(e){return e.mq&&window.matchMedia("(min-width: "+e.mq+")").matches})).indexOf(!0)}function D(){r=M()}function C(){i=-1===r?m[m.length-1]:m[r]}function S(){s=k(i.columns)}function A(){d=y[t?"new":"all"]()}function N(){0!==d.length&&(p=d.map((function(e){return e.clientWidth})),h=d.map((function(e){return e.clientHeight})))}function O(){d.forEach((function(e,t){o=s.indexOf(Math.min.apply(Math,s)),e.style.position="absolute",a=s[o]+"px",l=o*p[t]+o*i.gutter+"px",g?(e.style.top=a,e.style.left=l):e.style.transform="translate3d("+l+", "+a+", 0)",e.setAttribute(f,""),c=p[t],u=h[t],c&&u&&(s[o]+=u+i.gutter)}))}function T(){b.style.position="relative",b.style.width=i.columns*c+(i.columns-1)*i.gutter+"px",b.style.height=Math.max.apply(Math,s)-i.gutter+"px"}function I(){n||(window.requestAnimationFrame(L),n=!0)}function L(){r!==M()&&(F(),_.emit("resize",i)),n=!1}function F(){return t=!1,x(v.concat(w)),_.emit("pack")}function z(){return t=!0,x(w),_.emit("update")}function j(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"addEventListener":"removeEventListener";return window[t]("resize",I),_}}}),VL=wi($L),WL={exports:{}},qL={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n,o=a(i),s=a(jh.exports);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){this.props.useCapture;return this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var i=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:i.scrollTop;r=this.props.isReverse?o:this.calculateOffset(e,o)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,i=t.hasMore;t.initialLoad;var s=t.isReverse,a=t.loader;t.loadMore,t.pageStart;var l=t.ref;t.threshold,t.useCapture,t.useWindow,t.getScrollParent;var c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(a?s?u.unshift(a):u.push(a):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t["default"]}(qL,qL.exports),WL.exports=qL.exports,Object.defineProperty(PL,"__esModule",{value:!0});var KL,GL,YL=PL.default=void 0,QL=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),JL=n,ZL=nF(JL),XL=nF(jh.exports),eF=nF(VL),tF=nF(WL.exports);function nF(e){return e&&e.__esModule?e:{default:e}}function rF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iF(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var oF=(GL=KL=function(e){function t(){var e,n,r;rF(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=iF(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.setContainerRef=function(e){r.masonryContainer=e},r.forcePack=function(){r.masonryContainer&&r.state.instance.pack()},r.forceUpdate=function(){r.masonryContainer&&r.state.instance.update()},r.createNewInstance=function(){var e=r.props,t=e.packed,n=e.sizes,i=e.children,o=e.position,s=(0,eF.default)({container:r.masonryContainer,packed:t,sizes:n,position:o});s.resize(!0),i.length>0&&s.pack(),r.setState((function(){return{instance:s}}))},iF(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,JL.Component),QL(t,[{key:"componentDidMount",value:function(){this.createNewInstance()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.state.instance;if(0!==e.children.length||0!==t.length)return 0===e.children.length&&t.length>0?n.pack():e.children.length!==t.length?this.props.pack?n.pack():n.update():void 0}},{key:"componentWillUnmount",value:function(){this.state&&this.state.instance.resize(!1)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.style;e.pack,e.packed,e.position,e.sizes;var i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","className","style","pack","packed","position","sizes"]);return ZL.default.createElement(tF.default,i,ZL.default.createElement("div",{ref:this.setContainerRef,className:n,style:r},t))}}]),t}(),KL.propTypes={children:XL.default.arrayOf(XL.default.element).isRequired,className:XL.default.string,initialLoad:XL.default.bool,pack:XL.default.bool,packed:XL.default.string,position:XL.default.bool,sizes:XL.default.array,style:XL.default.object},KL.defaultProps={className:"",initialLoad:!0,pack:!1,packed:"data-packed",position:!0,sizes:[{columns:1,gutter:20},{mq:"768px",columns:2,gutter:20},{mq:"1024px",columns:3,gutter:20}],style:{}},GL);YL=PL.default=oF;const sF=e=>{let{onSubmit:t,unsplashApiKey:o}=e;const a=i(null),[l,c]=r(""),[u,d]=r(!1),[p,h]=r([]),[f,m]=r(1),[g,b]=r(!0),[y,v]=r(!1),w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;const[n,i]=r(e);return s((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e]),n}(l||"latest");s((()=>{x(1)}),[w]);const x=async e=>{try{v(!0),d(!1);const t=await(e=>{let{pageNo:t,query:n,apiKey:r}=e;return de.get(Gn,{headers:{Authorization:`Client-ID ${r}`},params:{page:t,per_page:30,order_by:"popular",query:n}})})({page:e,query:w,apiKey:o}),{data:{results:n,total_pages:r}}=t;h(1===e?n:[...p,...n]),m(e+1),b(e<r)}catch{d(!0)}finally{v(!1)}},E=n.createElement("div",{className:"neeto-editor-unsplash-gallery__loader"},n.createElement(C,null));return n.createElement("div",{className:"neeto-editor-unsplash-wrapper"},n.createElement(_,{autoFocus:!0,className:"neeto-editor-unsplash-search","data-cy":"neeto-editor-unsplash-image-picker-search-input",name:"text",placeholder:"Search Unsplash",value:l,onChange:e=>{let{target:{value:t}}=e;c(t)}}),u&&n.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-error"},"Something went wrong! Please try again later."),!u&&!y&&Xo(p)&&n.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-no-results-error"},"No results"),!u&&n.createElement("div",{className:"neeto-editor-unsplash-container"},n.createElement(YL,{pack:!0,position:!0,className:"neeto-editor-unsplash-gallery",hasMore:g,loadMore:()=>{!y&&g&&f>1&&x(f)},loader:E,ref:a,style:{width:"100%"},useWindow:!1,sizes:[{columns:3,gutter:0},{mq:"768px",columns:3,gutter:0},{mq:"1024px",columns:3,gutter:0}]},p&&p.map(((e,r)=>n.createElement("div",{className:"neeto-editor-unsplash-gallery__item","data-cy":`neeto-editor-unsplash-image-picker-result-${r}`,key:r},n.createElement("div",{className:"neeto-editor-unsplash-gallery__item-placeholder",style:{paddingBottom:`${e.height/e.width*100}%`}},n.createElement("div",{className:"neeto-editor-unsplash-gallery__item-inner",id:`unsplashImage${r}`},n.createElement("img",{src:e.urls.regular,onClick:()=>t(e.urls.small)}),n.createElement("a",{href:`https://unsplash.com/@${e.user.username}`,rel:"noreferrer",target:"_blank"},e.user.name," "))))))),!g&&n.createElement("p",{className:"neeto-editor-unsplash-gallery__text"},"End of results")))},aF=e=>{let{buttonLabel:t="Submit",placeholder:i,onSubmit:o,className:s}=e;const[a,l]=r(""),[c,u]=r("");return n.createElement("div",{className:_s("neeto-editor-url-form__wrapper",{[s]:s})},n.createElement(_,{autoFocus:!0,"data-cy":"neeto-editor-media-upload-url-input",error:c,name:"url",placeholder:i,value:a,onChange:e=>{let{target:{value:t}}=e;return l(t)},onFocus:()=>u("")}),n.createElement(x,{"data-cy":"neeto-editor-media-upload-url-submit",disabled:!a,label:t,onClick:e=>{e.preventDefault(),Qn.test(a)?o(a):u("Please enter a valid url")}}))},lF=e=>{let{mediaUploader:t,onClose:i,editor:o,uploadEndpoint:s,unsplashApiKey:a}=e;const[l,c]=r("local"),[u,d]=r(""),p=t.image||t.video;let h=a?bm:bm.slice(0,2);t.video&&(h=[]);const f=()=>{i(),d(""),c("local")};return n.createElement(D,{closeButton:!1,isOpen:p,onClose:f},n.createElement("div",{className:"ne-media-uploader"},!Xo(h)&&n.createElement(A,null,h.map((e=>{let{key:t,title:r}=e;return n.createElement(A.Item,{active:l===t,key:t,onClick:()=>{d(""),c(t)}},r)}))),n.createElement("div",{className:"ne-media-uploader__content"},u?n.createElement(BL,{editor:o,isImage:t.image,setMediaUrl:d,url:u,onClose:f}):n.createElement(n.Fragment,null,"local"===l&&n.createElement(RL,{endpoint:s,isImage:t.image,onSuccess:d}),"link"===l&&n.createElement(aF,{placeholder:"Paste the link here...",buttonLabel:t.image?"Upload image":"Upload video",onSubmit:d}),"unsplash"===l&&n.createElement(sF,{unsplashApiKey:a,onSubmit:d})))))};var cF=[],uF=[];function dF(e,t){if(e&&"undefined"!=typeof document){var n,r=!0===t.prepend?"prepend":"append",i=!0===t.singleTag,o="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(i){var s=cF.indexOf(o);-1===s&&(s=cF.push(o)-1,uF[s]={}),n=uF[s]&&uF[s][r]?uF[s][r]:uF[s][r]=a()}else n=a();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function a(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),i=0;i<n.length;i++)e.setAttribute(n[i],t.attributes[n[i]]);var s="prepend"===r?"afterbegin":"beforeend";return o.insertAdjacentElement(s,e),e}}dF(".tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}",{});const pF=e=>{let{editor:t,handleClose:i,handleAnimateInvalidLink:o}=e;const[a,l]=r("");s((()=>{l(t.getAttributes("link").href||"")}),[]);const c=()=>{Qn.test(a)?(t.chain().focus().setLink({href:a}).run(),i()):Xo(a)?(t.chain().focus().unsetLink().run(),i()):(l(""),o())};return n.createElement("div",{className:"neeto-editor-bubble-menu__link",onKeyDown:e=>{"Escape"===e.key?i():"Enter"===e.key&&c()}},n.createElement("input",{autoFocus:!0,className:"neeto-editor-bubble-menu-link__input","data-cy":"neeto-editor-link-input",name:"url",placeholder:"Paste or type a link...",value:a,onChange:e=>{let{target:{value:t}}=e;return l(t)}}),n.createElement(x,{"data-cy":"neeto-editor-link-cancel-button",icon:F,size:"small",style:"icon",onClick:()=>{a?(l(""),t.chain().focus().unsetLink().run()):i()}}))},hF=e=>{let{tooltip:t,Icon:r,command:i,active:o,optionName:s,highlight:a}=e;return n.createElement(x,yb({"data-cy":`neeto-editor-bubble-menu-${s}-option`,icon:r,key:s,size:"small",style:o?"secondary":"text",tooltipProps:{content:t,position:"bottom",theme:"dark",delay:[500]},onClick:i},tL(a)))},fF=e=>{let{editor:t,mentions:r,tooltipContent:i}=e;const o=qI(r),{Menu:s,MenuItem:a}=k;return b(o)?null:n.createElement(k,{buttonStyle:"text","data-cy":"neeto-editor-mention-option",icon:X,strategy:"fixed",buttonProps:{tooltipProps:{content:i,position:"bottom"},className:"neeto-editor-fixed-menu__item"}},n.createElement(s,null,o.map((e=>{let{key:r,name:i,imageUrl:o}=e;return n.createElement(a.Button,{"data-cy":`neeto-editor-mention-option-${r}`,key:r,onClick:()=>t.commands.setMention({id:r,label:i})},n.createElement(S,{size:"small",user:{name:i,imageUrl:o}}),n.createElement(E,{style:"body2"},i))}))))},mF=e=>{let{editor:t,isActive:r,setActive:i,tooltipContent:o}=e;return n.createElement(k,{buttonStyle:"text",closeOnSelect:!1,dropdownProps:{classNames:"neeto-editor-fixed-menu__emoji-dropdown"},icon:G,isOpen:r,position:"bottom-start",strategy:"fixed",buttonProps:{tooltipProps:{content:o,position:"bottom"},className:"neeto-editor-fixed-menu__item"},onClick:()=>i((e=>!e)),onClose:()=>i(!1)},n.createElement(lT,{editor:t,setActive:i}))},gF=e=>{let{size:t,color:r,strokeWidth:i,...o}=e;return n.createElement("svg",yb({fill:"none",height:t,viewBox:"0 0 24 24",width:t},o),n.createElement("path",{d:"M13.8791 8.37527L8.39309 13.8613C7.56709 14.6873 7.56709 16.0273 8.39309 16.8533C9.21909 17.6793 10.5591 17.6793 11.3851 16.8533L18.6171 9.62127C20.1321 8.10627 20.1321 5.65027 18.6171 4.13527C17.1021 2.62027 14.6461 2.62027 13.1311 4.13527L5.89909 11.3673C3.69509 13.5713 3.69509 17.1433 5.89909 19.3473C8.10309 21.5513 11.6751 21.5513 13.8791 19.3473L18.2681 14.9583",stroke:r,strokeWidth:i}))};gF.defaultProps={color:"currentColor",size:24,strokeWidth:"1.5"},gF.propTypes={color:jh.exports.string,size:jh.exports.oneOfType([jh.exports.string,jh.exports.number]),strokeWidth:jh.exports.oneOfType([jh.exports.string,jh.exports.number])};const bF=[{label:"Paragraph",value:0},{label:"Heading 1",value:1},{label:"Heading 2",value:2},{label:"Heading 3",value:3}],yF=e=>{let{tooltips:t,editor:n,options:r,setMediaUploader:i,handleUploadAttachments:o,setIsEmbedModalOpen:s}=e;const a=(e=>{let{tooltips:t,editor:n,setMediaUploader:r,handleUploadAttachments:i,setIsEmbedModalOpen:o}=e;return{font:[{Icon:ee,command:()=>n.chain().focus().toggleBold().run(),active:n.isActive("bold"),optionName:"bold",tooltip:t.bold||"Bold"},{Icon:te,command:()=>n.chain().focus().toggleItalic().run(),active:n.isActive("italic"),optionName:"italic",tooltip:t.italic||"Italic"},{Icon:ne,command:()=>n.chain().focus().toggleUnderline().run(),active:n.isActive("underline"),optionName:"underline",tooltip:t.underline||"Underline"},{Icon:re,command:()=>n.chain().focus().toggleStrike().run(),active:n.isActive("strike"),optionName:"strike",tooltip:t.strike||"Strike"},{Icon:ie,command:()=>n.chain().focus().toggleHighlight().run(),active:n.isActive("highlight"),optionName:"highlight",tooltip:t.highlight||"Highlight"}],block:[{Icon:oe,command:()=>n.chain().focus().toggleBlockquote().run(),active:n.isActive("blockquote"),optionName:"block-quote",highlight:!0,tooltip:t.blockQuote||"Block Quote"},{Icon:K,command:()=>n.chain().focus().toggleCode().run(),active:n.isActive("code"),optionName:"code",tooltip:t.code||"Code"}],list:[{Icon:$,command:()=>n.chain().focus().toggleBulletList().run(),active:n.isActive("bulletList"),optionName:"bullet-list",highlight:!0,tooltip:t.bulletList||"Bullet List"},{Icon:H,command:()=>n.chain().focus().toggleOrderedList().run(),active:n.isActive("orderedList"),optionName:"ordered-list",highlight:!0,tooltip:t.orderedList||"Ordered List"}],misc:[{Icon:gF,command:i,active:!1,optionName:"attachments",tooltip:t.attachments||"Attachments"},{Icon:V,command:()=>r(pe("image",!0)),optionName:"image-upload",tooltip:t.imageUpload||"Image Upload"},{Icon:W,command:()=>r(pe("video",!0)),optionName:"video-upload",tooltip:t.videoUpload||"Video Upload"},{Icon:Q,command:()=>o(!0),optionName:"video-embed",tooltip:t.videoEmbed||"Embed Video"}],right:[{Icon:se,command:()=>n.chain().focus().undo().run(),active:!1,disabled:!n.can().undo(),optionName:"undo",tooltip:t.undo||"Undo"},{Icon:ae,command:()=>n.chain().focus().redo().run(),active:!1,disabled:!n.can().redo(),optionName:"redo",tooltip:t.redo||"Redo"}]}})({tooltips:t,editor:n,setMediaUploader:i,handleUploadAttachments:o,setIsEmbedModalOpen:s});return ve(["font","block","list","misc","right"].map((e=>[e,a[e].filter((e=>r.includes(e.optionName)))])))},vF=e=>{let{Icon:t,command:r,active:i,optionName:o,highlight:s,disabled:a,tooltip:l}=e;return n.createElement(x,yb({className:"neeto-editor-fixed-menu__item","data-cy":`neeto-editor-fixed-menu-${o}-option`,disabled:a,icon:t,key:o,style:i?"secondary":"text",tooltipProps:{content:l,position:"bottom"},onClick:r},tL(s)))},wF=e=>{let{editor:t,commands:n}=e;const{to:r}=t.state.selection;return n.map((e=>{var n;return{...e,active:null===(n=e.active)||void 0===n?void 0:n.call(e,{editor:t}),command:()=>{var n;return null===(n=e.command)||void 0===n?void 0:n.call(e,{editor:t,range:{from:r,to:r}})}}}))},_F=e=>{let{editor:t,options:r,mentions:i,tooltips:o,setIsInvalidLink:s,isLinkOptionActive:a,setIsLinkOptionActive:l,setMediaUploader:c,handleUploadAttachments:u,isEmojiPickerActive:d,setIsEmojiPickerActive:p,setIsEmbedModalOpen:h}=e;const{Menu:f,MenuItem:m}=k,g=(e=>{let{editor:t}=e;return[{optionName:"Heading 1",active:t.isActive("heading",{level:1}),command:()=>t.chain().focus().setNode("heading",{level:1}).run()},{optionName:"Heading 2",active:t.isActive("heading",{level:2}),command:()=>t.chain().focus().setNode("heading",{level:2}).run()},{optionName:"Heading 3",active:t.isActive("heading",{level:3}),command:()=>t.chain().focus().setNode("heading",{level:3}).run()},{optionName:"Ordered List",active:t.isActive("orderedList"),command:()=>t.chain().focus().toggleOrderedList().run()},{optionName:"Bulleted List",active:t.isActive("bulletList"),command:()=>t.chain().focus().toggleBulletList().run()},{optionName:"Text",active:t.isActive("paragraph"),command:()=>t.chain().focus().setNode("paragraph").run()}]})({editor:t}),b=(e=>{var t;return(null===(t=e.find(ye("active")))||void 0===t?void 0:t.optionName)||"Text"})(g),y=r.includes(Kn.EMOJI),v=r.includes(Kn.LINK),{font:w,block:_,list:x}=yF({editor:t,options:r,setMediaUploader:c,tooltips:o,handleUploadAttachments:u,setIsEmbedModalOpen:h}),E=()=>{s(!0),setTimeout((()=>{s(!1)}),1e3)};return a?n.createElement(pF,{editor:t,handleAnimateInvalidLink:E,handleClose:()=>l(!1)}):n.createElement(n.Fragment,null,n.createElement(k,{buttonSize:"small",buttonStyle:"text",label:b,strategy:"fixed"},n.createElement(f,null,g.map((e=>{let{optionName:t,command:r}=e;return n.createElement(m.Button,{key:t,onClick:r},t)})))),w.map(hF),_.map(hF),y&&n.createElement(mF,{editor:t,isActive:d,setActive:p,tooltipContent:o.emoji||"Emoji"}),x.map(hF),v&&hF({Icon:le,command:()=>l(!0),active:t.isActive("link"),optionName:"link",highlight:!1,tooltip:o.link||"Link"}),n.createElement(fF,{editor:t,mentions:i,tooltipContent:o.mention||"Mention"}))},xF=e=>{let{editor:t,options:i,mentions:o=[],setMediaUploader:s,tooltips:a={},handleUploadAttachments:l,isEmojiPickerActive:c,setIsEmojiPickerActive:u,setIsEmbedModalOpen:d}=e;const[p,h]=r(!1),[f,m]=r(!1),g=t&&t.view.state.selection.node,b=g&&"image"===g.type.name,y=[Kn.BOLD,Kn.ITALIC,Kn.UNDERLINE,Kn.STRIKETHROUGH,Kn.LINK],v=Xo(i.filter((e=>y.includes(e))));return!t||!b&&v?null:n.createElement("div",null,n.createElement(AM,{editor:t,className:_s("neeto-editor-bubble-menu",{"neeto-editor-bubble-menu-animate-shake":p}),tippyOptions:{arrow:jk,zIndex:99999,onHide:()=>m(!1),theme:"neeto-editor-bubble-menu",maxWidth:500}},n.createElement(_F,{editor:t,handleUploadAttachments:l,isEmojiPickerActive:c,isLinkOptionActive:f,mentions:o,options:i,setIsEmbedModalOpen:d,setIsEmojiPickerActive:u,setIsInvalidLink:h,setIsLinkOptionActive:m,setMediaUploader:s,tooltips:a})))},{Menu:EF,MenuItem:kF}=k,MF=e=>{var t;let{editor:r,tooltipContent:i}=e;const o=(null===(t=bF.find((e=>{let{value:t}=e;return n=t,r.isActive("heading",{level:n});var n})))||void 0===t?void 0:t.label)||"Paragraph";return n.createElement(k,{autoWidth:!0,buttonStyle:"text","data-cy":"neeto-editor-fixed-menu-font-size-option",label:o,placement:"bottom-start",buttonProps:{tooltipProps:{content:i,position:"bottom"},className:"neeto-editor-fixed-menu__item neeto-editor-font-size__wrapper"}},n.createElement(EF,null,bF.map((e=>{let{label:t,value:i}=e;return n.createElement(kF.Button,{"data-cy":`neeto-editor-fixed-menu-font-size-option-${t}`,key:i,onClick:()=>{return(e=i)?r.chain().focus().toggleHeading({level:e}).run():r.chain().focus().setNode("paragraph").run();var e}},t)}))))},{Menu:DF}=k,CF=e=>{let{editor:t,tooltipContent:i}=e;const[o,s]=r(""),[a,l]=r(""),[c,u]=r(!1),d=t.isActive("link"),p=()=>{u(!1),l(""),s("")},h=()=>{Qn.test(a)?(t.chain().focus().setLink({href:a}).run(),p()):s("Please enter a valid url")};return n.createElement(k,{buttonStyle:d?"secondary":"text",closeOnSelect:!1,"data-cy":"neeto-editor-fixed-menu-link-option",icon:le,isOpen:c,position:"bottom",buttonProps:{tooltipProps:{content:i,position:"bottom"},className:"neeto-editor-fixed-menu__item"},onClick:()=>{l(t.getAttributes("link").href),u((e=>!e))},onClose:p},n.createElement(DF,{className:"neeto-editor-link__item",onKeyDown:e=>{"Escape"===e.key?p():"Enter"===e.key&&h()}},n.createElement(_,{autoFocus:!0,"data-cy":"neeto-editor-fixed-menu-link-option-input",error:o,name:"url",placeholder:"Paste URL",value:a,onChange:e=>{let{target:{value:t}}=e;return l(t)},onFocus:()=>s("")}),n.createElement(x,{"data-cy":"neeto-editor-fixed-menu-link-option-link-button",label:"Link",onClick:h}),d&&n.createElement(x,{"data-cy":"neeto-editor-fixed-menu-link-option-unlink-button",label:"Unlink",style:"text",onClick:()=>{t.chain().focus().unsetLink().run(),l(""),p()}})))},{Menu:SF}=k,AF=e=>{let{editor:t,variables:r,tooltipContent:i}=e;return b(r)?null:n.createElement(k,{buttonSize:"small",buttonStyle:"secondary","data-cy":"neeto-editor-variable-option",icon:ce,strategy:"fixed",buttonProps:{tooltipProps:{content:i,position:"bottom"}}},n.createElement(SF,null,n.createElement(CL,{variables:r,onClickVariable:e=>{const{category_key:n,key:r}=e,i=n?`${n}.${r}`:r;t.chain().focus().setVariable({label:i}).run()}})))},NF=e=>{let{editor:t,options:r,mentions:i=[],variables:o=[],setMediaUploader:s,addonCommands:a=[],isIndependant:l=!0,className:c,tooltips:u={},handleUploadAttachments:d,isEmojiPickerActive:p,setIsEmojiPickerActive:h,setIsEmbedModalOpen:f}=e;if(!t)return null;const{font:m,block:g,list:b,misc:y,right:v}=yF({tooltips:u,editor:t,options:r,setMediaUploader:s,handleUploadAttachments:d,setIsEmbedModalOpen:f}),w=r.filter((e=>e.match(/^h[1-6]$/))).length>0,_=r.includes(Kn.EMOJI),x=r.includes(Kn.LINK),E=wF({editor:t,commands:a});return n.createElement("div",{className:_s("neeto-editor-fixed-menu",{"neeto-editor-fixed-menu--independant":l,[c]:c})},n.createElement("div",{className:"neeto-editor-fixed-menu__wrapper"},w&&n.createElement(MF,{editor:t,tooltipContent:u.fontSize||"Font size"}),m.map(vF),g.map(vF),_&&n.createElement(mF,{editor:t,isActive:p,setActive:h,tooltipContent:u.emoji||"Emoji"}),b.map(vF),x&&n.createElement(CF,{editor:t,tooltipContent:u.link||"Link"}),y.map(vF),n.createElement(fF,{editor:t,mentions:i,tooltipContent:u.mention||"Mention"}),E.map(vF),n.createElement("div",{className:"neeto-editor-fixed-menu__right-options"},v.map(vF))),n.createElement("div",{className:"neeto-editor-fixed-menu__variables"},n.createElement(AF,{editor:t,tooltipContent:u.variables||"Variables",variables:o})))},OF=e=>{let{icon:t=null,onClick:r=(()=>{}),disabled:i=!1,className:o,tooltipProps:s,...a}=e;const l=t;return n.createElement(w,yb({disabled:!s,onClick:()=>r()},s),n.createElement("button",yb({className:_s("ne-headless-btn",{[o]:o}),disabled:i,type:"button",onClick:r},a),t&&n.createElement(l,{"aria-hidden":"true",key:"2",size:18})))},TF={name:"hideOnEsc",defaultValue:!0,fn(e){let{hide:t,props:{hideOnEsc:n,onClose:r}}=e;function i(e){"escape"===e.key.toLowerCase()&&n&&(r(),t())}return{onShow(){document.addEventListener("keydown",i)},onHide(){document.removeEventListener("keydown",i)}}}},IF=e=>{let{icon:t,isOpen:i,onClose:o=(()=>{}),children:s,className:a,onClick:l,buttonProps:c={},...u}=e;const[d,p]=r(!1);return n.createElement(hL,yb({hideOnEsc:!0,interactive:!0,animation:!1,arrow:!1,duration:0,hideOnClick:!1,maxWidth:"none",offset:0,plugins:[TF],popperOptions:{strategy:"fixed"},role:"dropdown",theme:"light",trigger:"click",visible:i,className:_s("ne-headless-dropdown",{[a]:a}),content:d&&n.createElement("div",{className:"ne-headless-dropdown__popup"},s),onClickOutside:o,onClose:o,onHidden:()=>p(!1),onMount:()=>p(!0)},u),n.createElement("span",null,n.createElement(OF,yb({icon:t,onClick:l},c))))},LF=e=>{let{editor:t,isActive:r,setActive:i,tooltipContent:o}=e;return n.createElement(IF,{className:"ne-headless__emoji",icon:G,isOpen:r,buttonProps:{tooltipProps:{content:o,delay:[500],position:"bottom"}},onClick:()=>i((e=>!e)),onClose:()=>i(!1)},n.createElement(lT,{editor:t,setActive:i}))},FF=e=>{let{editor:t,optionName:r,command:i,disabled:o,Icon:s,isActive:a,setActive:l,tooltip:c}=e;return r===Kn.EMOJI?n.createElement(LF,{editor:t,isActive:a,setActive:l,tooltipContent:c||"Emoji"}):n.createElement(OF,{className:a?"ne-headless-btn--active":"",disabled:o,icon:s,tooltipProps:{content:c,delay:[500],position:"bottom"},onClick:i})},zF=e=>{let{tooltips:t,editor:n,options:r,setMediaUploader:i,handleUploadAttachments:o,isEmojiPickerActive:s,setIsEmojiPickerActive:a,setIsEmbedModalOpen:l}=e;const c=(e=>{let{editor:t,tooltips:n,setMediaUploader:r,handleUploadAttachments:i,isEmojiPickerActive:o,setIsEmojiPickerActive:s,setIsEmbedModalOpen:a}=e;return[{Icon:ee,command:()=>t.chain().focus().toggleBold().run(),active:t.isActive("bold"),optionName:"bold",tooltip:n.bold||"Bold"},{Icon:te,command:()=>t.chain().focus().toggleItalic().run(),active:t.isActive("italic"),optionName:"italic",tooltip:n.italic||"Italic"},{Icon:ne,command:()=>t.chain().focus().toggleUnderline().run(),active:t.isActive("underline"),optionName:"underline",tooltip:n.underline||"Underline"},{Icon:re,command:()=>t.chain().focus().toggleStrike().run(),active:t.isActive("strike"),optionName:"strike",tooltip:n.strike||"Strike"},{Icon:ie,command:()=>t.chain().focus().toggleHighlight().run(),active:t.isActive("highlight"),optionName:"highlight",tooltip:n.highlight||"Highlight"},{Icon:oe,command:()=>t.chain().focus().toggleBlockquote().run(),active:t.isActive("blockquote"),optionName:"block-quote",tooltip:n.blockQuote||"Block Quote"},{Icon:K,command:()=>t.chain().focus().toggleCode().run(),active:t.isActive("code"),optionName:"code",tooltip:n.code||"Code"},{Icon:$,command:()=>t.chain().focus().toggleBulletList().run(),active:t.isActive("bulletList"),optionName:"bullet-list",tooltip:n.bulletList||"Bullet List"},{Icon:H,command:()=>t.chain().focus().toggleOrderedList().run(),active:t.isActive("orderedList"),optionName:"ordered-list",tooltip:n.orderedList||"Ordered List"},{Icon:ue,command:i,optionName:"attachments",tooltip:n.attachments||"Attachments"},{Icon:V,command:()=>r(pe("image",!0)),optionName:"image-upload",tooltip:n.imageUpload||"Image Upload"},{Icon:W,command:()=>r(pe("video",!0)),optionName:"video-upload",tooltip:n.videoUpload||"Video Upload"},{Icon:Q,command:()=>a(!0),optionName:"video-embed",tooltip:n.videoEmbed||"Embed Video"},{Icon:G,command:()=>{},optionName:"emoji",tooltip:n.emoji||"Emoji",isActive:o,setActive:s},{Icon:se,command:()=>t.chain().focus().undo().run(),disabled:!t.can().undo(),optionName:"undo",tooltip:n.undo||"Undo"},{Icon:ae,command:()=>t.chain().focus().redo().run(),disabled:!t.can().redo(),optionName:"redo",tooltip:n.redo||"Redo"}]})({editor:n,tooltips:t,setMediaUploader:i,handleUploadAttachments:o,isEmojiPickerActive:s,setIsEmojiPickerActive:a,setIsEmbedModalOpen:l});return r.map((e=>c.find((t=>{let{optionName:n}=t;return n===e})))).filter(Boolean)},jF=e=>{let{editor:t,options:r,tooltips:i={},setMediaUploader:o,addonCommands:s=[],children:a,className:l,handleUploadAttachments:c,isEmojiPickerActive:u,setIsEmojiPickerActive:d,setIsEmbedModalOpen:p}=e;if(!t)return null;const h=[...zF({tooltips:i,editor:t,options:r,setMediaUploader:o,handleUploadAttachments:c,isEmojiPickerActive:u,setIsEmojiPickerActive:d,setIsEmbedModalOpen:p}),...wF({editor:t,commands:s})];return n.createElement("div",{className:_s("ne-headless",{[l]:l})},h.map((e=>n.createElement(FF,yb({editor:t,key:e.optionName},e)))),a)},RF=e=>{const[t,i]=r(!1),[o,a]=r(!1),[l,c]=r({image:!1,video:!1}),{menuType:u="fixed",addons:d=[],options:p=[],editor:h,uploadEndpoint:f=Yn,editorSecrets:m={},handleUploadAttachments:g}=e,y={fixed:NF,bubble:xF,headless:jF,none:()=>n.createElement("div",null)}[u],v=b(p)?[...tr,...d]:p;return s((()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&e.altKey&&("KeyE"===e.code?i((e=>!e)):"KeyA"===e.code?g():"KeyK"===e.code?c(pe("image",!0)):"KeyV"===e.code&&c(pe("video",!0)))};return"none"!==u&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[]),n.createElement(n.Fragment,null,n.createElement(y,yb({},e,{handleUploadAttachments:g,isEmojiPickerActive:t,options:v,setIsEmbedModalOpen:a,setIsEmojiPickerActive:i,setMediaUploader:c})),n.createElement(lF,{editor:h,mediaUploader:l,unsplashApiKey:m.unsplash,uploadEndpoint:f,onClose:()=>c({image:!1,video:!1})}),d.includes("video-embed")&&n.createElement(GM,{editor:h,isEmbedModalOpen:o,setIsEmbedModalOpen:a}))},BF=(e,t)=>{let{addonCommands:a=[],addons:l=[],attachments:c=[],attachmentsConfig:u={},autoFocus:d=!1,className:p,contentClassName:h,defaults:m=tr,editorSecrets:b={},error:y=null,extensions:v=[],hideSlashCommands:w=!1,initialValue:_="",isCharacterCountActive:x=!1,keyboardShortcuts:E=[],label:k="",mentions:M=[],menuType:D="fixed",placeholder:C,required:S=!1,rows:A=6,tooltips:O={},uploadEndpoint:T=Yn,variables:I=[],onChange:L=f,onFocus:F=f,onBlur:z=f,onSubmit:j=f,onChangeAttachments:R=f,...B}=e;const P=i(null),U=l.includes(Kn.ATTACHMENTS),H=l.includes(Kn.VIDEO_EMBED),$="fixed"===D,V="bubble"===D,W=!w,q=!!C,[K,G]=r(!1),[Y,Q]=r({image:!1,video:!1}),J=i(null),Z=zL({placeholder:C,extensions:v,mentions:M,variables:I,isSlashCommandsActive:W,options:[...m,...l],addonCommands:a,onSubmit:j,keyboardShortcuts:E,uploadEndpoint:T,setMediaUploader:Q,setIsEmbedModalOpen:G,isVideoEmbedActive:H});(e=>{let{initialValue:t}=e;s((()=>{![process.env.RAILS_ENV,"production"].includes("production")&&Xo(t)&&console.warn(`[neeto-editor]: Empty value of "initialValue" in needtoEditor is expected to be "<p></p>" instead of "${t}".`)}),[t])})({initialValue:_});const X=_s("neeto-editor",{"slash-active":W&&!q,"fixed-menu-active border":$,"bubble-menu-active":V,"placeholder-active":q,"attachments-active":U,[h]:h}),ee=UM({extensions:Z,content:_,injectCSS:!1,autofocus:d&&"end",editorProps:{attributes:{class:X,style:or({rows:A})},clipboardTextParser:sr},parseOptions:{preserveWhitespace:!0},onCreate:e=>{let{editor:t}=e;return!d&&(e=>{const{state:t,view:n}=e,r=_n.atEnd(t.doc),i=t.tr;i.setSelection(r),n.dispatch(i)})(t)},onUpdate:e=>{let{editor:t}=e;return L(t.getHTML())},onFocus:F,onBlur:z});return o(t,(()=>({editor:ee,focus:()=>ee.commands.focus()}))),M_.prototype.updateState=function(e){this.docView&&this.updateStateInner(e,this.state.plugins!==e.plugins)},n.createElement("div",{ref:P,className:_s({[p]:p,"ne-attachments__wrapper":U})},k&&n.createElement(N,{className:"neeto-ui-mb-2","data-cy":`${g(k)}-editor-label`,required:S},k),n.createElement(HM,{error:y},n.createElement($M,{editor:ee,isActive:x},n.createElement(RF,{addonCommands:a,addons:l,defaults:m,editor:ee,editorSecrets:b,handleUploadAttachments:()=>{var e;return(null===(e=J.current)||void 0===e?void 0:e.handleUploadAttachments())||f()},isIndependant:!1,mentions:M,menuType:D,tooltips:O,uploadEndpoint:T,variables:I}),n.createElement(IM,yb({editor:ee},B)),n.createElement(lF,{editor:ee,mediaUploader:Y,unsplashApiKey:b.unsplash,uploadEndpoint:T,onClose:()=>Q({image:!1,video:!1})}),H&&n.createElement(GM,{editor:ee,isEmbedModalOpen:K,setIsEmbedModalOpen:G}),U&&n.createElement(wy,{attachments:c,className:"ne-attachments--integrated",config:u,dragDropRef:P,isIndependent:!1,ref:J,onChange:R}))))};var PF=n.forwardRef(BF);dF('@charset "UTF-8";\n@import url("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/github.min.css");\n@keyframes shake {\n 0% {\n transform: translateX(0);\n }\n 10% {\n transform: translateX(-4px);\n }\n 20% {\n transform: translateX(4px);\n }\n 30% {\n transform: translateX(-4px);\n }\n 40% {\n transform: translateX(4px);\n }\n 50% {\n transform: translateX(-4px);\n }\n 60% {\n transform: translateX(4px);\n }\n 70% {\n transform: translateX(-4px);\n }\n 80% {\n transform: translateX(4px);\n }\n 90% {\n transform: translateX(-4px);\n }\n 100% {\n transform: translateX(0);\n }\n}\n@keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.neeto-editor-slash-commands__wrapper {\n padding: 12px;\n overflow-y: auto;\n max-height: 384px;\n width: 256px;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 4px;\n}\n.neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n padding: 8px 12px;\n gap: 12px;\n border-radius: var(--neeto-ui-rounded);\n transition: var(--neeto-ui-transition);\n cursor: pointer;\n color: rgb(var(--neeto-ui-white));\n}\n.neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item:hover, .neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item.active {\n background-color: rgb(var(--neeto-ui-gray-700));\n}\n.neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item .neeto-editor-slash-commands__item-content h5 {\n font-size: var(--neeto-ui-text-sm);\n font-weight: var(--neeto-ui-font-semibold);\n line-height: var(--neeto-ui-leading-normal);\n}\n.neeto-editor-slash-commands__wrapper .neeto-editor-slash-commands__item .neeto-editor-slash-commands__item-content p {\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-300));\n}\n.neeto-editor-mentions__wrapper {\n padding: 8px;\n width: auto;\n min-width: 208px;\n max-height: 256px;\n overflow-y: auto;\n}\n.neeto-editor-mentions__wrapper .neeto-editor-mentions__item {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n padding: 8px;\n transition: var(--neeto-ui-transition);\n cursor: pointer;\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-white));\n border-radius: var(--neeto-ui-rounded);\n gap: 8px;\n}\n.neeto-editor-mentions__wrapper .neeto-editor-mentions__item p {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.neeto-editor-mentions__wrapper .neeto-editor-mentions__item:hover, .neeto-editor-mentions__wrapper .neeto-editor-mentions__item.active {\n background-color: rgb(var(--neeto-ui-gray-700));\n}\n.ProseMirror.slash-active p.is-empty:last-child::before {\n content: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAwIDIwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMy44MjEyOSAxNUg1LjA1MTc2VjYuMjQzMTZIOC4yMzA0N1Y1LjEzNTc0SDAuNjQyNTc4VjYuMjQzMTZIMy44MjEyOVYxNVpNOS43MjA3IDE3LjU4NEMxMS4wMjY0IDE3LjU4NCAxMS42MzQ4IDE3LjEwNTUgMTIuMjQzMiAxNS40NTEyTDE1LjEyMTEgNy42MzA4NkgxMy44NzAxTDExLjg1MzUgMTMuNjk0M0gxMS43NDQxTDkuNzIwNyA3LjYzMDg2SDguNDQ5MjJMMTEuMTc2OCAxNS4wMDY4TDExLjA0IDE1LjQ0NDNDMTAuNzczNCAxNi4yOTIgMTAuMzYzMyAxNi41OTk2IDkuNjg2NTIgMTYuNTk5NkM5LjUyMjQ2IDE2LjU5OTYgOS4zMzc4OSAxNi41OTI4IDkuMTk0MzQgMTYuNTY1NFYxNy41NDNDOS4zNTg0IDE3LjU3MDMgOS41NjM0OCAxNy41ODQgOS43MjA3IDE3LjU4NFpNMTYuNjkzNCAxNy40NjA5SDE3Ljg4MjhWMTMuODM3OUgxNy45OTIyQzE4LjM5NTUgMTQuNjI0IDE5LjI3NzMgMTUuMTI5OSAyMC4yODkxIDE1LjEyOTlDMjIuMTYyMSAxNS4xMjk5IDIzLjM3ODkgMTMuNjMyOCAyMy4zNzg5IDExLjMyMjNWMTEuMzA4NkMyMy4zNzg5IDkuMDExNzIgMjIuMTU1MyA3LjUwMDk4IDIwLjI4OTEgNy41MDA5OEMxOS4yNjM3IDcuNTAwOTggMTguNDQzNCA3Ljk4NjMzIDE3Ljk5MjIgOC44MDY2NEgxNy44ODI4VjcuNjMwODZIMTYuNjkzNFYxNy40NjA5Wk0yMC4wMTU2IDE0LjA3NzFDMTguNjc1OCAxNC4wNzcxIDE3Ljg1NTUgMTMuMDI0NCAxNy44NTU1IDExLjMyMjNWMTEuMzA4NkMxNy44NTU1IDkuNjA2NDUgMTguNjc1OCA4LjU1MzcxIDIwLjAxNTYgOC41NTM3MUMyMS4zNjIzIDguNTUzNzEgMjIuMTYyMSA5LjU5Mjc3IDIyLjE2MjEgMTEuMzA4NlYxMS4zMjIzQzIyLjE2MjEgMTMuMDM4MSAyMS4zNjIzIDE0LjA3NzEgMjAuMDE1NiAxNC4wNzcxWk0yOC4yNDYxIDE1LjEyOTlDMjkuOTgyNCAxNS4xMjk5IDMxLjAzNTIgMTQuMTQ1NSAzMS4yODgxIDEzLjE0NzVMMzEuMzAxOCAxMy4wOTI4SDMwLjExMjNMMzAuMDg1IDEzLjE1NDNDMjkuODg2NyAxMy41OTg2IDI5LjI3MTUgMTQuMDcwMyAyOC4yNzM0IDE0LjA3MDNDMjYuOTYwOSAxNC4wNzAzIDI2LjEyMDEgMTMuMTgxNiAyNi4wODU5IDExLjY1NzJIMzEuMzkwNlYxMS4xOTI0QzMxLjM5MDYgOC45OTEyMSAzMC4xNzM4IDcuNTAwOTggMjguMTcwOSA3LjUwMDk4QzI2LjE2OCA3LjUwMDk4IDI0Ljg2OTEgOS4wNTk1NyAyNC44NjkxIDExLjMzNTlWMTEuMzQyOEMyNC44NjkxIDEzLjY1MzMgMjYuMTQwNiAxNS4xMjk5IDI4LjI0NjEgMTUuMTI5OVpNMjguMTY0MSA4LjU2MDU1QzI5LjI1MSA4LjU2MDU1IDMwLjA1NzYgOS4yNTA5OCAzMC4xODA3IDEwLjcwN0gyNi4xMDY0QzI2LjIzNjMgOS4zMDU2NiAyNy4wNzAzIDguNTYwNTUgMjguMTY0MSA4LjU2MDU1WiIgZmlsbD0iIzg3OTI5RCIvPgo8cmVjdCB4PSIzNyIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiByeD0iMyIgZmlsbD0iI0U5RUJFRCIvPgo8cGF0aCBkPSJNNTAuNDI4MiA1LjkxNDQzTDQzLjU3MTggMTQuMDg1NiIgc3Ryb2tlPSIjMjUyQzMyIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik02NC43MjU2IDE1LjA1NDdDNjQuOTU4IDE1LjA1NDcgNjUuMTgzNiAxNS4wMjczIDY1LjQxNiAxNC45ODYzVjEzLjk3NDZDNjUuMTk3MyAxMy45OTUxIDY1LjA4MTEgMTQuMDAyIDY0Ljg2OTEgMTQuMDAyQzY0LjEwMzUgMTQuMDAyIDYzLjgwMjcgMTMuNjUzMyA2My44MDI3IDEyLjc4NTJWOC42MTUyM0g2NS40MTZWNy42MzA4Nkg2My44MDI3VjUuNzIzNjNINjIuNTcyM1Y3LjYzMDg2SDYxLjQxMDJWOC42MTUyM0g2Mi41NzIzVjEzLjA4NTlDNjIuNTcyMyAxNC40OTQxIDYzLjIwOCAxNS4wNTQ3IDY0LjcyNTYgMTUuMDU0N1pNNzAuMTEyMyAxNS4xMjk5QzcyLjIxMDkgMTUuMTI5OSA3My41MDk4IDEzLjY4MDcgNzMuNTA5OCAxMS4zMjIzVjExLjMwODZDNzMuNTA5OCA4Ljk0MzM2IDcyLjIxMDkgNy41MDA5OCA3MC4xMTIzIDcuNTAwOThDNjguMDEzNyA3LjUwMDk4IDY2LjcxNDggOC45NDMzNiA2Ni43MTQ4IDExLjMwODZWMTEuMzIyM0M2Ni43MTQ4IDEzLjY4MDcgNjguMDEzNyAxNS4xMjk5IDcwLjExMjMgMTUuMTI5OVpNNzAuMTEyMyAxNC4wNzcxQzY4LjcxNzggMTQuMDc3MSA2Ny45MzE2IDEzLjA1ODYgNjcuOTMxNiAxMS4zMjIzVjExLjMwODZDNjcuOTMxNiA5LjU2NTQzIDY4LjcxNzggOC41NTM3MSA3MC4xMTIzIDguNTUzNzFDNzEuNTA2OCA4LjU1MzcxIDcyLjI5MyA5LjU2NTQzIDcyLjI5MyAxMS4zMDg2VjExLjMyMjNDNzIuMjkzIDEzLjA1ODYgNzEuNTA2OCAxNC4wNzcxIDcwLjExMjMgMTQuMDc3MVpNODIuMzA3NiAxNS4xMjk5Qzg0LjA3ODEgMTUuMTI5OSA4NS4wNjkzIDE0LjE3OTcgODUuMzcwMSAxMi44NDY3TDg1LjM4MzggMTIuNzcxNUw4NC4yMDggMTIuNzc4M0w4NC4xOTQzIDEyLjgxOTNDODMuOTIwOSAxMy42Mzk2IDgzLjI5MiAxNC4wNzcxIDgyLjMwMDggMTQuMDc3MUM4MC45ODgzIDE0LjA3NzEgODAuMTQwNiAxMi45OTAyIDgwLjE0MDYgMTEuMjk0OVYxMS4yODEyQzgwLjE0MDYgOS42MjAxMiA4MC45NzQ2IDguNTUzNzEgODIuMzAwOCA4LjU1MzcxQzgzLjM2MDQgOC41NTM3MSA4NC4wMTY2IDkuMTQxNiA4NC4yMDEyIDkuODY2MjFMODQuMjA4IDkuODg2NzJIODUuMzkwNkw4NS4zODM4IDkuODQ1N0M4NS4xNjUgOC41MzMyIDg0LjA5MTggNy41MDA5OCA4Mi4zMDA4IDcuNTAwOThDODAuMjM2MyA3LjUwMDk4IDc4LjkyMzggOC45OTEyMSA3OC45MjM4IDExLjI4MTJWMTEuMjk0OUM3OC45MjM4IDEzLjYzMjggODAuMjQzMiAxNS4xMjk5IDgyLjMwNzYgMTUuMTI5OVpNODcuMTk1MyAxNUg4OC4zODQ4VjEwLjYzODdDODguMzg0OCA5LjM0NjY4IDg5LjEyOTkgOC41NTM3MSA5MC4zMDU3IDguNTUzNzFDOTEuNDgxNCA4LjU1MzcxIDkyLjAyODMgOS4xODk0NSA5Mi4wMjgzIDEwLjUxNTZWMTVIOTMuMjE3OFYxMC4yMjg1QzkzLjIxNzggOC40Nzg1MiA5Mi4yOTQ5IDcuNTAwOTggOTAuNjQwNiA3LjUwMDk4Qzg5LjU1MzcgNy41MDA5OCA4OC44NjMzIDcuOTU4OTggODguNDk0MSA4LjczODI4SDg4LjM4NDhWNC43MDUwOEg4Ny4xOTUzVjE1Wk05Ny4zOTQ1IDE1LjEyOTlDOTguMzg1NyAxNS4xMjk5IDk5LjE1ODIgMTQuNjk5MiA5OS42MjMgMTMuOTEzMUg5OS43MzI0VjE1SDEwMC45MjJWOS45NTUwOEMxMDAuOTIyIDguNDIzODMgOTkuOTE3IDcuNTAwOTggOTguMTE5MSA3LjUwMDk4Qzk2LjU0NjkgNy41MDA5OCA5NS40MjU4IDguMjgwMjcgOTUuMjM0NCA5LjQzNTU1TDk1LjIyNzUgOS40NzY1Nkg5Ni40MTdMOTYuNDIzOCA5LjQ1NjA1Qzk2LjYxNTIgOC44ODE4NCA5Ny4xOTYzIDguNTUzNzEgOTguMDc4MSA4LjU1MzcxQzk5LjE3ODcgOC41NTM3MSA5OS43MzI0IDkuMDQ1OSA5OS43MzI0IDkuOTU1MDhWMTAuNjI1TDk3LjYyMDEgMTAuNzU0OUM5NS45MDQzIDEwLjg1NzQgOTQuOTMzNiAxMS42MTYyIDk0LjkzMzYgMTIuOTI4N1YxMi45NDI0Qzk0LjkzMzYgMTQuMjgyMiA5NS45OTMyIDE1LjEyOTkgOTcuMzk0NSAxNS4xMjk5Wk05Ni4xNTA0IDEyLjkxNVYxMi45MDE0Qzk2LjE1MDQgMTIuMTY5OSA5Ni42NDI2IDExLjc3MzQgOTcuNzYzNyAxMS43MDUxTDk5LjczMjQgMTEuNTgyVjEyLjI1MkM5OS43MzI0IDEzLjMwNDcgOTguODUwNiAxNC4wOTc3IDk3LjY0MDYgMTQuMDk3N0M5Ni43ODYxIDE0LjA5NzcgOTYuMTUwNCAxMy42NjAyIDk2LjE1MDQgMTIuOTE1Wk0xMDMuMDk2IDE1SDEwNC4yODVWMTAuNjM4N0MxMDQuMjg1IDkuMzQ2NjggMTA1LjAzIDguNTUzNzEgMTA2LjIwNiA4LjU1MzcxQzEwNy4zODIgOC41NTM3MSAxMDcuOTI5IDkuMTg5NDUgMTA3LjkyOSAxMC41MTU2VjE1SDEwOS4xMThWMTAuMjI4NUMxMDkuMTE4IDguNDc4NTIgMTA4LjE5NSA3LjUwMDk4IDEwNi41NDEgNy41MDA5OEMxMDUuNDU0IDcuNTAwOTggMTA0Ljc2NCA3Ljk1ODk4IDEwNC4zOTUgOC43MzgyOEgxMDQuMjg1VjcuNjMwODZIMTAzLjA5NlYxNVpNMTE0LjMwNyAxNy41OTc3QzExNi4zMTYgMTcuNTk3NyAxMTcuNTg4IDE2LjU0NDkgMTE3LjU4OCAxNC44OTc1VjcuNjMwODZIMTE2LjM5OFY4Ljg0NzY2SDExNi4zMTZDMTE1Ljg2NSA4LjAxMzY3IDExNS4wNTkgNy41MDA5OCAxMTQuMDIgNy41MDA5OEMxMTIuMDkyIDcuNTAwOTggMTEwLjkwMiA4Ljk5ODA1IDExMC45MDIgMTEuMDYyNVYxMS4wNzYyQzExMC45MDIgMTMuMTQwNiAxMTIuMDg1IDE0LjYxNzIgMTEzLjk5MiAxNC42MTcyQzExNS4wMDQgMTQuNjE3MiAxMTUuODM4IDE0LjE1OTIgMTE2LjMwMyAxMy4zNDU3SDExNi40MTJWMTQuODM1OUMxMTYuNDEyIDE1LjkyMjkgMTE1LjYyNiAxNi41NDQ5IDExNC4zMDcgMTYuNTQ0OUMxMTMuMjQ3IDE2LjU0NDkgMTEyLjU5MSAxNi4xNDg0IDExMi40NjEgMTUuNTg3OUwxMTIuNDU0IDE1LjU4MTFIMTExLjIyNEwxMTEuMjEgMTUuNTg3OUMxMTEuMzk1IDE2Ljc5NzkgMTEyLjUyOSAxNy41OTc3IDExNC4zMDcgMTcuNTk3N1pNMTE0LjI1MiAxMy41NjQ1QzExMi44ODUgMTMuNTY0NSAxMTIuMTE5IDEyLjUzOTEgMTEyLjExOSAxMS4wNzYyVjExLjA2MjVDMTEyLjExOSA5LjU5OTYxIDExMi44ODUgOC41NTM3MSAxMTQuMjUyIDguNTUzNzFDMTE1LjYxMiA4LjU1MzcxIDExNi40MzkgOS41OTk2MSAxMTYuNDM5IDExLjA2MjVWMTEuMDc2MkMxMTYuNDM5IDEyLjUzOTEgMTE1LjYxOSAxMy41NjQ1IDExNC4yNTIgMTMuNTY0NVpNMTIyLjgxMSAxNS4xMjk5QzEyNC41NDcgMTUuMTI5OSAxMjUuNiAxNC4xNDU1IDEyNS44NTMgMTMuMTQ3NUwxMjUuODY2IDEzLjA5MjhIMTI0LjY3N0wxMjQuNjQ5IDEzLjE1NDNDMTI0LjQ1MSAxMy41OTg2IDEyMy44MzYgMTQuMDcwMyAxMjIuODM4IDE0LjA3MDNDMTIxLjUyNSAxNC4wNzAzIDEyMC42ODUgMTMuMTgxNiAxMjAuNjUgMTEuNjU3MkgxMjUuOTU1VjExLjE5MjRDMTI1Ljk1NSA4Ljk5MTIxIDEyNC43MzggNy41MDA5OCAxMjIuNzM1IDcuNTAwOThDMTIwLjczMiA3LjUwMDk4IDExOS40MzQgOS4wNTk1NyAxMTkuNDM0IDExLjMzNTlWMTEuMzQyOEMxMTkuNDM0IDEzLjY1MzMgMTIwLjcwNSAxNS4xMjk5IDEyMi44MTEgMTUuMTI5OVpNMTIyLjcyOSA4LjU2MDU1QzEyMy44MTUgOC41NjA1NSAxMjQuNjIyIDkuMjUwOTggMTI0Ljc0NSAxMC43MDdIMTIwLjY3MUMxMjAuODAxIDkuMzA1NjYgMTIxLjYzNSA4LjU2MDU1IDEyMi43MjkgOC41NjA1NVpNMTM1LjQwMiAxNS4xMjk5QzEzNy4yNjkgMTUuMTI5OSAxMzguNDkyIDEzLjYxOTEgMTM4LjQ5MiAxMS4zMjIzVjExLjMwODZDMTM4LjQ5MiA4Ljk5ODA1IDEzNy4yNzUgNy41MDA5OCAxMzUuNDAyIDcuNTAwOThDMTM0LjM5MSA3LjUwMDk4IDEzMy41MDkgOC4wMDY4NCAxMzMuMTA1IDguNzkyOTdIMTMyLjk5NlY0LjcwNTA4SDEzMS44MDdWMTVIMTMyLjk5NlYxMy44MjQySDEzMy4xMDVDMTMzLjU1NyAxNC42NDQ1IDEzNC4zNzcgMTUuMTI5OSAxMzUuNDAyIDE1LjEyOTlaTTEzNS4xMjkgMTQuMDc3MUMxMzMuNzg5IDE0LjA3NzEgMTMyLjk2OSAxMy4wMjQ0IDEzMi45NjkgMTEuMzIyM1YxMS4zMDg2QzEzMi45NjkgOS42MDY0NSAxMzMuNzg5IDguNTUzNzEgMTM1LjEyOSA4LjU1MzcxQzEzNi40NzYgOC41NTM3MSAxMzcuMjc1IDkuNTkyNzcgMTM3LjI3NSAxMS4zMDg2VjExLjMyMjNDMTM3LjI3NSAxMy4wMzgxIDEzNi40NzYgMTQuMDc3MSAxMzUuMTI5IDE0LjA3NzFaTTE0MC40MDYgMTVIMTQxLjU5NlY0LjcwNTA4SDE0MC40MDZWMTVaTTE0Ni45MDcgMTUuMTI5OUMxNDkuMDA2IDE1LjEyOTkgMTUwLjMwNSAxMy42ODA3IDE1MC4zMDUgMTEuMzIyM1YxMS4zMDg2QzE1MC4zMDUgOC45NDMzNiAxNDkuMDA2IDcuNTAwOTggMTQ2LjkwNyA3LjUwMDk4QzE0NC44MDkgNy41MDA5OCAxNDMuNTEgOC45NDMzNiAxNDMuNTEgMTEuMzA4NlYxMS4zMjIzQzE0My41MSAxMy42ODA3IDE0NC44MDkgMTUuMTI5OSAxNDYuOTA3IDE1LjEyOTlaTTE0Ni45MDcgMTQuMDc3MUMxNDUuNTEzIDE0LjA3NzEgMTQ0LjcyNyAxMy4wNTg2IDE0NC43MjcgMTEuMzIyM1YxMS4zMDg2QzE0NC43MjcgOS41NjU0MyAxNDUuNTEzIDguNTUzNzEgMTQ2LjkwNyA4LjU1MzcxQzE0OC4zMDIgOC41NTM3MSAxNDkuMDg4IDkuNTY1NDMgMTQ5LjA4OCAxMS4zMDg2VjExLjMyMjNDMTQ5LjA4OCAxMy4wNTg2IDE0OC4zMDIgMTQuMDc3MSAxNDYuOTA3IDE0LjA3NzFaTTE1NS4xNjUgMTUuMTI5OUMxNTYuOTM2IDE1LjEyOTkgMTU3LjkyNyAxNC4xNzk3IDE1OC4yMjggMTIuODQ2N0wxNTguMjQxIDEyLjc3MTVMMTU3LjA2NSAxMi43NzgzTDE1Ny4wNTIgMTIuODE5M0MxNTYuNzc4IDEzLjYzOTYgMTU2LjE0OSAxNC4wNzcxIDE1NS4xNTggMTQuMDc3MUMxNTMuODQ2IDE0LjA3NzEgMTUyLjk5OCAxMi45OTAyIDE1Mi45OTggMTEuMjk0OVYxMS4yODEyQzE1Mi45OTggOS42MjAxMiAxNTMuODMyIDguNTUzNzEgMTU1LjE1OCA4LjU1MzcxQzE1Ni4yMTggOC41NTM3MSAxNTYuODc0IDkuMTQxNiAxNTcuMDU5IDkuODY2MjFMMTU3LjA2NSA5Ljg4NjcySDE1OC4yNDhMMTU4LjI0MSA5Ljg0NTdDMTU4LjAyMiA4LjUzMzIgMTU2Ljk0OSA3LjUwMDk4IDE1NS4xNTggNy41MDA5OEMxNTMuMDk0IDcuNTAwOTggMTUxLjc4MSA4Ljk5MTIxIDE1MS43ODEgMTEuMjgxMlYxMS4yOTQ5QzE1MS43ODEgMTMuNjMyOCAxNTMuMTAxIDE1LjEyOTkgMTU1LjE2NSAxNS4xMjk5Wk0xNjAuMDUzIDE1SDE2MS4yNDJWMTIuMjA0MUwxNjEuOTMzIDExLjUzNDJMMTY0LjY5NCAxNUgxNjYuMTkxTDE2Mi43NjcgMTAuNzI3NUwxNjUuOTc5IDcuNjMwODZIMTY0LjUzN0wxNjEuMzUyIDEwLjg1MDZIMTYxLjI0MlY0LjcwNTA4SDE2MC4wNTNWMTVaTTE3NC4xNDIgMTUuMDU0N0MxNzQuMzc0IDE1LjA1NDcgMTc0LjYgMTUuMDI3MyAxNzQuODMyIDE0Ljk4NjNWMTMuOTc0NkMxNzQuNjEzIDEzLjk5NTEgMTc0LjQ5NyAxNC4wMDIgMTc0LjI4NSAxNC4wMDJDMTczLjUyIDE0LjAwMiAxNzMuMjE5IDEzLjY1MzMgMTczLjIxOSAxMi43ODUyVjguNjE1MjNIMTc0LjgzMlY3LjYzMDg2SDE3My4yMTlWNS43MjM2M0gxNzEuOTg4VjcuNjMwODZIMTcwLjgyNlY4LjYxNTIzSDE3MS45ODhWMTMuMDg1OUMxNzEuOTg4IDE0LjQ5NDEgMTcyLjYyNCAxNS4wNTQ3IDE3NC4xNDIgMTUuMDU0N1pNMTc3LjIzOCAxNy41ODRDMTc4LjU0NCAxNy41ODQgMTc5LjE1MiAxNy4xMDU1IDE3OS43NjEgMTUuNDUxMkwxODIuNjM5IDcuNjMwODZIMTgxLjM4OEwxNzkuMzcxIDEzLjY5NDNIMTc5LjI2MkwxNzcuMjM4IDcuNjMwODZIMTc1Ljk2N0wxNzguNjk0IDE1LjAwNjhMMTc4LjU1OCAxNS40NDQzQzE3OC4yOTEgMTYuMjkyIDE3Ny44ODEgMTYuNTk5NiAxNzcuMjA0IDE2LjU5OTZDMTc3LjA0IDE2LjU5OTYgMTc2Ljg1NSAxNi41OTI4IDE3Ni43MTIgMTYuNTY1NFYxNy41NDNDMTc2Ljg3NiAxNy41NzAzIDE3Ny4wODEgMTcuNTg0IDE3Ny4yMzggMTcuNTg0Wk0xODQuMjExIDE3LjQ2MDlIMTg1LjRWMTMuODM3OUgxODUuNTFDMTg1LjkxMyAxNC42MjQgMTg2Ljc5NSAxNS4xMjk5IDE4Ny44MDcgMTUuMTI5OUMxODkuNjggMTUuMTI5OSAxOTAuODk2IDEzLjYzMjggMTkwLjg5NiAxMS4zMjIzVjExLjMwODZDMTkwLjg5NiA5LjAxMTcyIDE4OS42NzMgNy41MDA5OCAxODcuODA3IDcuNTAwOThDMTg2Ljc4MSA3LjUwMDk4IDE4NS45NjEgNy45ODYzMyAxODUuNTEgOC44MDY2NEgxODUuNFY3LjYzMDg2SDE4NC4yMTFWMTcuNDYwOVpNMTg3LjUzMyAxNC4wNzcxQzE4Ni4xOTMgMTQuMDc3MSAxODUuMzczIDEzLjAyNDQgMTg1LjM3MyAxMS4zMjIzVjExLjMwODZDMTg1LjM3MyA5LjYwNjQ1IDE4Ni4xOTMgOC41NTM3MSAxODcuNTMzIDguNTUzNzFDMTg4Ljg4IDguNTUzNzEgMTg5LjY4IDkuNTkyNzcgMTg5LjY4IDExLjMwODZWMTEuMzIyM0MxODkuNjggMTMuMDM4MSAxODguODggMTQuMDc3MSAxODcuNTMzIDE0LjA3NzFaTTE5NS43NjQgMTUuMTI5OUMxOTcuNSAxNS4xMjk5IDE5OC41NTMgMTQuMTQ1NSAxOTguODA2IDEzLjE0NzVMMTk4LjgxOSAxMy4wOTI4SDE5Ny42M0wxOTcuNjAzIDEzLjE1NDNDMTk3LjQwNCAxMy41OTg2IDE5Ni43ODkgMTQuMDcwMyAxOTUuNzkxIDE0LjA3MDNDMTk0LjQ3OSAxNC4wNzAzIDE5My42MzggMTMuMTgxNiAxOTMuNjA0IDExLjY1NzJIMTk4LjkwOFYxMS4xOTI0QzE5OC45MDggOC45OTEyMSAxOTcuNjkxIDcuNTAwOTggMTk1LjY4OCA3LjUwMDk4QzE5My42ODYgNy41MDA5OCAxOTIuMzg3IDkuMDU5NTcgMTkyLjM4NyAxMS4zMzU5VjExLjM0MjhDMTkyLjM4NyAxMy42NTMzIDE5My42NTggMTUuMTI5OSAxOTUuNzY0IDE1LjEyOTlaTTE5NS42ODIgOC41NjA1NUMxOTYuNzY5IDguNTYwNTUgMTk3LjU3NSA5LjI1MDk4IDE5Ny42OTggMTAuNzA3SDE5My42MjRDMTkzLjc1NCA5LjMwNTY2IDE5NC41ODggOC41NjA1NSAxOTUuNjgyIDguNTYwNTVaIiBmaWxsPSIjODc5MjlEIi8+Cjwvc3ZnPgo=");\n position: absolute;\n top: -2px;\n height: 0;\n z-index: -1;\n pointer-events: none;\n}\n.neeto-editor {\n max-width: 100% !important;\n border-radius: var(--neeto-ui-rounded);\n white-space: pre-wrap;\n padding: 16px;\n color: rgb(var(--neeto-ui-gray-800));\n background-color: rgb(var(--neeto-ui-white));\n}\n.neeto-editor:focus {\n outline: none;\n}\n.neeto-editor a {\n pointer-events: none;\n}\n.neeto-editor mark {\n background: rgb(var(--neeto-ui-pastel-green));\n border-radius: var(--neeto-ui-rounded-sm);\n padding: 0px 4px;\n color: inherit;\n}\n.neeto-editor [data-variable] {\n display: inline-flex;\n color: rgb(var(--neeto-ui-gray-700));\n background-color: rgb(var(--neeto-ui-gray-200));\n border-radius: var(--neeto-ui-rounded-sm);\n line-height: 1;\n padding: 4px 6px;\n}\n.neeto-editor .ProseMirror-separator {\n display: none;\n}\n.neeto-editor.fixed-menu-active {\n border: thin solid rgb(var(--neeto-ui-gray-300));\n border-top: none;\n border-top-left-radius: 0px;\n border-top-right-radius: 0px;\n}\n.neeto-editor.attachments-active {\n border-bottom: none;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n}\n.neeto-editor .is-empty {\n position: relative;\n}\n.neeto-editor.placeholder-active .is-editor-empty:first-child::before {\n content: attr(data-placeholder);\n float: left;\n color: #ced4da;\n pointer-events: none;\n height: 0;\n}\n.neeto-editor hr {\n margin: 8px 0;\n}\n.neeto-editor .ProseMirror-selectednode {\n outline: 3px solid rgb(var(--neeto-ui-pastel-blue));\n}\n.neeto-editor .has-focus {\n background: var(--focus-background-color);\n transition: background-color 200ms ease;\n}\n.neeto-editor-character-count {\n padding: 4px;\n color: rgb(var(--neeto-ui-gray-600));\n font-size: 12px;\n text-align: right;\n}\n.neeto-editor-error {\n color: rgb(var(--neeto-ui-error-500));\n border-width: 1px;\n border-color: rgb(var(--neeto-ui-error-500));\n border-radius: var(--neeto-ui-rounded);\n}\n.neeto-editor-error:focus-within {\n border-color: rgb(var(--neeto-ui-error-600));\n}\n.neeto-editor-content, .neeto-editor {\n white-space: pre-wrap;\n word-break: break-word;\n -moz-tab-size: 2;\n -o-tab-size: 2;\n tab-size: 2;\n}\n.neeto-editor-content h1, .neeto-editor h1,\n.neeto-editor-content h2,\n.neeto-editor h2,\n.neeto-editor-content h3,\n.neeto-editor h3,\n.neeto-editor-content h4,\n.neeto-editor h4,\n.neeto-editor-content h5,\n.neeto-editor h5,\n.neeto-editor-content h6,\n.neeto-editor h6 {\n font-size: revert;\n margin: 0 0 16px 0;\n}\n.neeto-editor-content p, .neeto-editor p {\n line-height: var(--neeto-ui-leading-normal);\n color: rgb(var(--neeto-ui-gray-700));\n margin-bottom: 8px;\n}\n.neeto-editor-content p:empty::after, .neeto-editor p:empty::after {\n content: " ";\n}\n.neeto-editor-content p:last-child, .neeto-editor p:last-child {\n margin-bottom: 0;\n}\n.neeto-editor-content code, .neeto-editor code {\n padding: 2px;\n font-size: 85%;\n border-radius: var(--neeto-ui-rounded-sm);\n background-color: rgb(var(--neeto-ui-gray-200));\n font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;\n}\n.neeto-editor-content pre, .neeto-editor pre {\n background-color: #f6f8fa;\n overflow-x: auto;\n font-size: 14px;\n line-height: 20px;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: var(--neeto-ui-rounded-sm);\n padding: 16px;\n}\n.neeto-editor-content pre > code, .neeto-editor pre > code {\n background-color: transparent;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-weight: 400;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\n.neeto-editor-content blockquote, .neeto-editor blockquote {\n font-weight: var(--neeto-ui-font-medium);\n color: rgb(var(--neeto-ui-black));\n border-left-width: 4px;\n border-left-color: #e5e7eb;\n quotes: "“" "”" "‘" "’";\n margin: 8px 0;\n padding-left: 12px;\n}\n.neeto-editor-content blockquote > p::before, .neeto-editor blockquote > p::before {\n content: "" !important;\n}\n.neeto-editor-content blockquote > p::after, .neeto-editor blockquote > p::after {\n content: "" !important;\n}\n.neeto-editor-content ul, .neeto-editor ul,\n.neeto-editor-content ol,\n.neeto-editor ol {\n list-style: revert;\n margin: revert;\n padding: revert;\n}\n.neeto-editor-content ul > li > p, .neeto-editor ul > li > p,\n.neeto-editor-content ol > li > p,\n.neeto-editor ol > li > p {\n margin-top: 0 !important;\n margin-bottom: 0.375rem !important;\n}\n.neeto-editor-content ul li::before, .neeto-editor ul li::before,\n.neeto-editor-content ol li::before,\n.neeto-editor ol li::before {\n background-color: rgb(var(--neeto-ui-black));\n}\n.neeto-editor-content a[href], .neeto-editor a[href] {\n color: rgb(var(--neeto-ui-primary-800));\n font-weight: 500;\n}\n.neeto-editor-content .video-wrapper, .neeto-editor .video-wrapper {\n width: 560px;\n height: 315px;\n margin: auto;\n}\n.neeto-editor-content mark, .neeto-editor mark {\n background: rgb(var(--neeto-ui-pastel-green));\n border-radius: var(--neeto-ui-rounded-sm);\n padding: 0px 4px;\n color: inherit;\n}\n.neeto-editor-content [data-variable], .neeto-editor [data-variable] {\n display: inline-flex;\n color: rgb(var(--neeto-ui-gray-700));\n background-color: rgb(var(--neeto-ui-gray-200));\n border-radius: var(--neeto-ui-rounded-sm);\n line-height: 1;\n padding: 4px 6px;\n}\n.neeto-editor-content [data-type=mention], .neeto-editor [data-type=mention] {\n color: rgb(var(--neeto-ui-primary-800));\n}\n.neeto-editor-content [data-type=special-mention], .neeto-editor [data-type=special-mention] {\n color: rgb(var(--neeto-ui-primary-800));\n}\n.neeto-editor-content--hidden {\n display: none;\n}\n.neeto-editor__image-wrapper {\n display: flex;\n color: unset !important;\n font-weight: normal !important;\n}\n.neeto-editor__image-wrapper figure {\n position: relative;\n display: inline-block;\n}\n.neeto-editor__image-wrapper .neeto-editor__image {\n display: inline-block;\n}\n.neeto-editor__image-wrapper .neeto-editor__image img,\n.neeto-editor__image-wrapper .neeto-editor__image video {\n display: inline-block;\n height: 100%;\n border: 2px solid rgb(var(--neeto-ui-gray-300));\n border-radius: var(--neeto-ui-rounded-lg);\n padding: 4px;\n}\n.neeto-editor__image-wrapper figcaption {\n margin-top: 4px;\n text-align: center;\n font-size: var(--neeto-ui-text-sm);\n font-weight: var(--neeto-ui-font-normal);\n}\n.neeto-editor__image-wrapper figcaption a {\n display: inline-block;\n text-align: center;\n}\n.neeto-editor__image-wrapper figcaption.is-empty div:before {\n position: absolute;\n inset: 0;\n content: "Add a caption";\n color: rgb(var(--neeto-ui-gray-500));\n}\n.neeto-editor__image--left {\n justify-content: flex-start;\n}\n.neeto-editor__image--center {\n justify-content: center;\n}\n.neeto-editor__image--right {\n justify-content: flex-end;\n}\n.neeto-editor-fixed-menu {\n border: thin solid rgb(var(--neeto-ui-gray-300));\n border-radius: var(--neeto-ui-rounded) var(--neeto-ui-rounded) 0px 0px;\n border-bottom: none;\n background-color: rgb(var(--neeto-ui-white));\n text-align: center;\n position: relative;\n}\n.neeto-editor-fixed-menu--independant {\n border-radius: unset;\n border-bottom: thin solid rgb(var(--neeto-ui-gray-300));\n}\n.neeto-editor-fixed-menu__item {\n border-radius: var(--neeto-ui-rounded-sm) !important;\n}\n.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item {\n min-width: -moz-fit-content;\n min-width: fit-content;\n}\n.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item .neeto-ui-btn__icon {\n height: 18px !important;\n width: 18px !important;\n}\n.neeto-editor-fixed-menu__wrapper {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n overflow: auto;\n width: 100%;\n padding: 2px;\n gap: 0 4px;\n}\n.neeto-editor-fixed-menu__variables {\n position: absolute;\n right: 8px;\n bottom: -24px;\n z-index: 10;\n}\n.neeto-editor-fixed-menu__variables .neeto-editor-menu__item {\n padding: 4px;\n border-radius: var(--neeto-ui-rounded-sm);\n background-color: rgb(var(--neeto-ui-gray-800));\n}\n.neeto-editor-fixed-menu__variables .neeto-editor-menu__item:hover, .neeto-editor-fixed-menu__variables .neeto-editor-menu__item.active {\n background-color: rgb(var(--neeto-ui-gray-700));\n}\n.neeto-editor-fixed-menu__right-options {\n display: flex;\n justify-self: flex-end;\n margin-left: auto;\n}\n.neeto-editor-fixed-menu__emoji-dropdown {\n max-height: unset !important;\n}\n.neeto-editor-fixed-menu__separator {\n display: flex;\n height: 28px;\n width: 32px;\n}\n.neeto-editor-fixed-menu__separator span {\n width: 100%;\n}\n.neeto-editor-fixed-menu__separator span:first-child {\n border-right: 1px solid rgb(var(--neeto-ui-gray-200));\n}\n.neeto-editor-menu__item {\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 4px;\n align-items: center;\n padding: 8px;\n cursor: pointer;\n transition: var(--neeto-ui-transition);\n border-radius: 2px;\n}\n.neeto-editor-menu__item p {\n color: rgb(var(--neeto-ui-gray-700));\n font-size: var(--neeto-ui-text-xs);\n line-height: 1;\n white-space: nowrap;\n}\n.neeto-editor-menu__item:hover, .neeto-editor-menu__item.active {\n background-color: rgb(var(--neeto-ui-gray-200));\n}\n.neeto-editor-menu__item:focus, .neeto-editor-menu__item:focus-visible {\n outline: rgb(var(--neeto-ui-gray-300)) auto 1px;\n}\n.neeto-editor-menu__item input[type=color] {\n visibility: hidden;\n height: 0;\n width: 0;\n}\n.neeto-editor-menu__item:disabled {\n opacity: 0.5;\n background-color: rgb(var(--neeto-ui-gray-100));\n}\n.neeto-editor-variables-suggestion {\n padding: 4px 0;\n}\n.neeto-editor-variables-list {\n padding: 4px 8px;\n min-width: 184px;\n max-width: 360px;\n}\n.neeto-editor-variables-list .neeto-editor-variables-block:not(:last-child) {\n margin-bottom: 12px;\n}\n.neeto-editor-variables-list .neeto-editor-variables-block h6 {\n font-size: var(--neeto-ui-text-xs);\n font-weight: var(--neeto-ui-font-medium);\n color: rgb(var(--neeto-ui-gray-600));\n margin-bottom: 4px;\n}\n.neeto-editor-variables-list .neeto-editor-variables-block .neeto-editor-variables-row {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n.neeto-editor-variables-list .neeto-editor-variables-block .neeto-editor-variables-row .neeto-editor-variable {\n padding: 4px 6px;\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-700));\n line-height: 1;\n background-color: rgb(var(--neeto-ui-pastel-blue));\n border-radius: var(--neeto-ui-rounded-sm);\n transition: var(--neeto-ui-transition);\n}\n.neeto-editor-variables-list .neeto-editor-variables-block .neeto-editor-variables-row .neeto-editor-variable:hover {\n background-color: rgb(var(--neeto-ui-info-100));\n}\n.neeto-editor-link__item {\n display: flex !important;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 8px;\n padding: 8px !important;\n}\n.neeto-editor-font-size__wrapper {\n font-weight: var(--neeto-ui-font-normal) !important;\n padding: 8px !important;\n}\n.neeto-editor-bubble-menu {\n position: relative;\n display: flex;\n gap: 1px;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n border-radius: var(--neeto-ui-rounded);\n background: rgb(var(--neeto-ui-gray-800));\n padding: 0 4px;\n}\n.neeto-editor-bubble-menu button.neeto-ui-btn--style-text {\n color: rgb(var(--neeto-ui-gray-200));\n min-width: -moz-fit-content;\n min-width: fit-content;\n}\n.neeto-editor-bubble-menu button.neeto-ui-btn--style-text:hover, .neeto-editor-bubble-menu button.neeto-ui-btn--style-text:active, .neeto-editor-bubble-menu button.neeto-ui-btn--style-text.active {\n color: rgb(var(--neeto-ui-gray-200)) !important;\n background-color: rgb(var(--neeto-ui-gray-600)) !important;\n}\n.neeto-editor-bubble-menu button.neeto-ui-btn--style-secondary {\n min-width: -moz-fit-content;\n min-width: fit-content;\n background-color: rgb(var(--neeto-ui-gray-400));\n}\n.neeto-editor-bubble-menu .neeto-ui-dropdown__popup {\n background-color: rgb(var(--neeto-ui-gray-800));\n}\n.neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn {\n color: rgb(var(--neeto-ui-gray-200)) !important;\n}\n.neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn:hover, .neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn:active, .neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn.active {\n background-color: rgb(var(--neeto-ui-gray-600)) !important;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link {\n width: 256px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px;\n gap: 8px;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input {\n background-color: transparent;\n outline: none;\n line-height: 20px;\n width: 100%;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input::-moz-placeholder {\n color: rgba(var(--neeto-ui-white, 0.4));\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input::placeholder {\n color: rgba(var(--neeto-ui-white, 0.4));\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .ne-btn--icon-only {\n padding: 0;\n min-height: 0;\n opacity: 0.8;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .ne-btn--icon-only:hover {\n opacity: 1;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown-target {\n display: flex;\n align-items: center;\n gap: 4px;\n white-space: nowrap;\n font-size: var(--neeto-ui-text-xs);\n line-height: var(--neeto-ui-leading-normal);\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item {\n width: 100%;\n text-align: left;\n padding: 8px 12px;\n font-size: var(--neeto-ui-text-xs);\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item:first-child {\n border-top-left-radius: var(--neeto-ui-rounded);\n border-top-right-radius: var(--neeto-ui-rounded);\n}\n.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item:last-child {\n border-bottom-left-radius: var(--neeto-ui-rounded);\n border-bottom-right-radius: var(--neeto-ui-rounded);\n}\n.neeto-editor-bubble-menu-animate-shake {\n animation: 1s linear infinite alternate both shake;\n}\n.neeto-editor__image-menu .neeto-ui-dropdown__popup {\n display: flex;\n min-width: unset;\n}\n.neeto-editor__image-menu .neeto-ui-dropdown__popup .neeto-ui-btn .neeto-ui-btn__icon {\n height: 18px !important;\n width: 18px !important;\n}\n.neeto-editor__image-menu-btn {\n position: absolute !important;\n top: 4px;\n right: 4px;\n z-index: 1;\n padding: 2px !important;\n}\n.ne-media-uploader {\n display: flex;\n flex-direction: column;\n min-height: 184px;\n}\n.ne-media-uploader .ne-tab__wrapper .ne-tab {\n min-width: 88px;\n}\n.ne-media-uploader .ne-media-uploader__content {\n flex-grow: 1;\n display: flex;\n padding: 16px;\n}\n.ne-media-uploader .ne-media-uploader__progress {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n text-align: center;\n}\n.ne-media-uploader .ne-media-uploader__progress-title, .ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-label {\n color: rgb(var(--neeto-ui-gray-700));\n font-size: var(--neeto-ui-text-sm);\n margin-bottom: 4px;\n}\n.ne-media-uploader .ne-media-uploader__progress-file, .ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-note {\n color: rgb(var(--neeto-ui-gray-400));\n font-size: var(--neeto-ui-text-xs);\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 100%;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n border: 1px dashed rgb(var(--neeto-ui-gray-400));\n box-sizing: border-box;\n border-radius: var(--neeto-ui-rounded);\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-Root {\n width: 100%;\n height: 100%;\n background-color: rgb(var(--neeto-ui-white));\n cursor: pointer;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-Root::-moz-focus-inner {\n border: 0;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n line-height: 1.4;\n text-align: center;\n font-weight: var(--neeto-ui-font-normal);\n margin: 0;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-arrow {\n visibility: hidden;\n display: none;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop--isDraggingOver {\n background-color: rgb(var(--neeto-ui-gray-200));\n border: 2px dashed rgb(var(--neeto-ui-primary-500));\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd .uppy-DragDrop-browse {\n color: rgb(var(--neeto-ui-primary-500));\n font-size: var(--neeto-ui-text-sm);\n font-weight: var(--neeto-ui-font-semibold);\n cursor: pointer;\n}\n.ne-media-uploader .ne-media-uploader__dnd-wrapper .ne-media-uploader__dnd--error {\n color: rgb(var(--neeto-ui-error));\n font-size: var(--neeto-ui-text-xs);\n margin-top: 12px;\n text-align: center;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper {\n width: 100%;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-container {\n max-height: 50vh;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-search {\n padding: 0px 8px;\n margin-bottom: 16px;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery {\n width: 100%;\n right: -8px;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__loader {\n display: flex;\n justify-content: center;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item {\n width: 33.3%;\n padding-right: 16px;\n padding-bottom: 16px;\n float: left;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder {\n width: 100%;\n position: relative;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner {\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: rgb(var(--neeto-ui-gray-100));\n border-radius: var(--neeto-ui-rounded-sm);\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner img {\n height: 100%;\n width: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n animation: fade-in 1.2s 1s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n border-radius: var(--neeto-ui-rounded);\n position: relative;\n cursor: pointer;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner a {\n opacity: 0;\n position: absolute;\n left: 8px;\n bottom: 8px;\n margin: auto;\n color: rgb(var(--neeto-ui-white));\n font-size: 12px;\n font-weight: var(--neeto-ui-font-normal);\n line-height: 1;\n text-transform: capitalize;\n transition: var(--neeto-ui-transition);\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner a:hover {\n text-decoration: underline;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__item-placeholder .neeto-editor-unsplash-gallery__item-inner:hover a {\n opacity: 1;\n}\n.ne-media-uploader .neeto-editor-unsplash-wrapper .neeto-editor-unsplash-gallery__text {\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-800));\n text-align: center;\n margin-top: 12px;\n}\n.neeto-editor-progress-bar__wrapper {\n width: 100%;\n max-width: 256px;\n margin-top: 10px;\n}\n.neeto-editor-progress-bar__wrapper .neeto-editor-progress-bar__percent {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.neeto-editor-progress-bar__wrapper .neeto-editor-progress-bar__percent p {\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-800));\n}\n.neeto-editor-progress-bar__wrapper .neeto-editor-progress-bar__indicator {\n position: relative;\n width: 100%;\n height: 6px;\n border-radius: var(--neeto-ui-rounded-full);\n overflow: hidden;\n background-color: rgba(var(--neeto-ui-primary-500), 0.2);\n margin-top: 4px;\n}\n.neeto-editor-progress-bar__wrapper .neeto-editor-progress-bar__indicator-inner {\n height: 100%;\n background-color: rgb(var(--neeto-ui-primary-500));\n}\n.neeto-editor-url-form__wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n padding: 0 24px;\n}\n.neeto-editor-url-form__wrapper .neeto-ui-input__wrapper {\n width: 100%;\n flex-grow: 0;\n margin-bottom: 16px;\n}\n.neeto-editor-emoji {\n font-family: apple color emoji, segoe ui emoji, noto color emoji, android emoji, emojisymbols, emojione mozilla, twemoji mozilla, segoe ui symbol;\n}\n.emoji-mart.emoji-mart-light {\n font-size: 14px;\n color: rgb(var(--neeto-ui-gray-800));\n border: none;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-bar .emoji-mart-anchors .emoji-mart-anchor {\n color: rgb(var(--neeto-ui-gray-500));\n}\n.emoji-mart.emoji-mart-light .emoji-mart-bar .emoji-mart-anchors .emoji-mart-anchor svg {\n margin: auto;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-bar .emoji-mart-anchors .emoji-mart-anchor .emoji-mart-anchor-bar {\n background-color: rgb(var(--neeto-ui-gray-800)) !important;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-bar .emoji-mart-anchors .emoji-mart-anchor.emoji-mart-anchor-selected {\n color: rgb(var(--neeto-ui-gray-800)) !important;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-search input {\n border-radius: var(--neeto-ui-rounded-sm);\n}\n.emoji-mart.emoji-mart-light .emoji-mart-category .emoji-mart-category-label span {\n padding-top: 8px;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-category .emoji-mart-emoji span {\n cursor: pointer;\n}\n.emoji-mart.emoji-mart-light .emoji-mart-category .emoji-mart-emoji:hover::before {\n background-color: rgb(var(--neeto-ui-gray-200));\n border-radius: var(--neeto-ui-rounded-sm);\n}\n.emoji-mart.emoji-mart-light .emoji-mart-scroll {\n height: 264px;\n padding-bottom: 0px;\n}\n.neeto-editor-emoji-suggestion {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n padding: 4px;\n gap: 2px;\n font-family: apple color emoji, segoe ui emoji, noto color emoji, android emoji, emojisymbols, emojione mozilla, twemoji mozilla, segoe ui symbol;\n}\n.neeto-editor-emoji-suggestion p {\n font-size: var(--neeto-ui-text-xs);\n color: rgb(var(--neeto-ui-gray-800));\n}\n.neeto-editor-emoji-suggestion span {\n height: 16px !important;\n width: 16px !important;\n font-size: 10px;\n}\n.neeto-editor-emoji-suggestion .neeto-editor-emoji-suggestion__item {\n padding: 6px;\n font-size: var(--neeto-ui-text-2xl);\n transition: var(--neeto-ui-transition);\n border-radius: var(--neeto-ui-rounded-sm);\n line-height: 1;\n cursor: pointer;\n}\n.neeto-editor-emoji-suggestion .neeto-editor-emoji-suggestion__item:hover {\n background-color: rgb(var(--neeto-ui-gray-200));\n}\n.neeto-editor-emoji-suggestion .neeto-editor-emoji-suggestion__item--selected {\n background-color: rgb(var(--neeto-ui-gray-200));\n}\n.ne-media-editor {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1.25rem;\n}\n.ne-media-editor button {\n margin-right: auto;\n}\n.ne-media-editor img,\n.ne-media-editor video {\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 208px;\n max-height: 400px;\n height: -moz-fit-content;\n height: fit-content;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.ne-media-editor__error {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n min-height: 288px;\n max-height: 400px;\n width: 100%;\n padding: 24px;\n background: rgb(var(--neeto-ui-gray-100));\n border-radius: var(--neeto-ui-rounded-sm);\n gap: 8px;\n}\n.ne-media-editor__error h2 {\n font-size: var(--neeto-ui-text-lg);\n font-weight: var(--neeto-ui-font-medium);\n}\n.ne-media-editor .neeto-ui-input__wrapper {\n width: 100%;\n}\n.ne-media-editor .ne-media-editor__footer {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 0.5rem;\n}\n.ne-media-editor .ne-media-editor__footer button {\n margin-right: 0;\n}\n.ne-attachments {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.ne-attachments__items {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.ne-attachments__attachment {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 2px 4px 8px;\n border-radius: var(--neeto-ui-rounded-sm);\n border: 1px solid rgb(var(--neeto-ui-gray-200));\n background-color: rgb(var(--neeto-ui-white));\n width: 256px;\n}\n.ne-attachments__attachment-file-icon {\n height: auto;\n width: 15px;\n}\n.ne-attachments__attachment__progress {\n display: flex;\n opacity: 0.5;\n justify-content: space-between;\n width: 76%;\n}\n.ne-attachments__attachment__progress p {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n}\n.ne-attachments__attachment__progress p:nth-child(2) {\n width: -moz-fit-content;\n width: fit-content;\n}\n.ne-attachments__attachment__progress-icon {\n width: 15px;\n height: auto;\n}\n.ne-attachments__attachment p {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n width: 75%;\n}\n.ne-attachments input[type=file] {\n display: none;\n}\n.ne-attachments--integrated {\n padding: 0px 6px;\n border: 1px solid rgb(var(--neeto-ui-gray-300));\n border-top: none;\n border-radius: 0px 0px var(--neeto-ui-rounded) var(--neeto-ui-rounded);\n}\n.ne-attachments__wrapper {\n position: relative;\n}\n.ne-attachments__wrapper.uppy-is-drag-over::after {\n position: absolute;\n inset: 7px;\n border-radius: 5px;\n background-color: rgba(var(--neeto-ui-gray-300), 0.5);\n border: 3px dashed rgb(var(--neeto-ui-gray-500));\n color: rgb(var(--neeto-ui-gray-700));\n content: "Drop the file here";\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 1.2rem;\n font-weight: bold;\n}\n.ProseMirror {\n overflow-y: auto;\n height: 100%;\n white-space: break-spaces;\n}\n.ProseMirror:focus {\n outline: none;\n}',{});const UF=(e,t)=>{let{name:r,...i}=e;return n.createElement(we,{name:r},(e=>{let{field:o,form:s,meta:a}=e;return n.createElement(PF,yb({error:a.touched?a.error:"",initialValue:o.value,ref:t,onBlur:()=>s.setFieldTouched(r,!0),onChange:e=>s.setFieldValue(r,e)},i))}))};var HF=c(UF);
|
|
43
|
+
/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */function $F(e){return $F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$F(e)}function VF(e,t){return VF=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},VF(e,t)}function WF(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function qF(e,t,n){return qF=WF()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&VF(i,n.prototype),i},qF.apply(null,arguments)}function KF(e){return function(e){if(Array.isArray(e))return GF(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return GF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GF(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var YF=Object.hasOwnProperty,QF=Object.setPrototypeOf,JF=Object.isFrozen,ZF=Object.getPrototypeOf,XF=Object.getOwnPropertyDescriptor,ez=Object.freeze,tz=Object.seal,nz=Object.create,rz="undefined"!=typeof Reflect&&Reflect,iz=rz.apply,oz=rz.construct;iz||(iz=function(e,t,n){return e.apply(t,n)}),ez||(ez=function(e){return e}),tz||(tz=function(e){return e}),oz||(oz=function(e,t){return qF(e,KF(t))});var sz,az=bz(Array.prototype.forEach),lz=bz(Array.prototype.pop),cz=bz(Array.prototype.push),uz=bz(String.prototype.toLowerCase),dz=bz(String.prototype.match),pz=bz(String.prototype.replace),hz=bz(String.prototype.indexOf),fz=bz(String.prototype.trim),mz=bz(RegExp.prototype.test),gz=(sz=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return oz(sz,t)});function bz(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return iz(e,t,r)}}function yz(e,t,n){n=n||uz,QF&&QF(e,null);for(var r=t.length;r--;){var i=t[r];if("string"==typeof i){var o=n(i);o!==i&&(JF(t)||(t[r]=o),i=o)}e[i]=!0}return e}function vz(e){var t,n=nz(null);for(t in e)iz(YF,e,[t])&&(n[t]=e[t]);return n}function wz(e,t){for(;null!==e;){var n=XF(e,t);if(n){if(n.get)return bz(n.get);if("function"==typeof n.value)return bz(n.value)}e=ZF(e)}return function(e){return console.warn("fallback value for",e),null}}var _z=ez(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xz=ez(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ez=ez(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),kz=ez(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mz=ez(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Dz=ez(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Cz=ez(["#text"]),Sz=ez(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Az=ez(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Nz=ez(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Oz=ez(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Tz=tz(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Iz=tz(/<%[\w\W]*|[\w\W]*%>/gm),Lz=tz(/^data-[\-\w.\u00B7-\uFFFF]/),Fz=tz(/^aria-[\-\w]+$/),zz=tz(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jz=tz(/^(?:\w+script|data):/i),Rz=tz(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bz=tz(/^html$/i),Pz=function(){return"undefined"==typeof window?null:window},Uz=function(e,t){if("object"!==$F(e)||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var Hz=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pz(),n=function(t){return e(t)};if(n.version="2.4.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,p=t.HTMLFormElement,h=t.DOMParser,f=t.trustedTypes,m=l.prototype,g=wz(m,"cloneNode"),b=wz(m,"nextSibling"),y=wz(m,"childNodes"),v=wz(m,"parentNode");if("function"==typeof s){var w=i.createElement("template");w.content&&w.content.ownerDocument&&(i=w.content.ownerDocument)}var _=Uz(f,r),x=_?_.createHTML(""):"",E=i,k=E.implementation,M=E.createNodeIterator,D=E.createDocumentFragment,C=E.getElementsByTagName,S=r.importNode,A={};try{A=vz(i).documentMode?i.documentMode:{}}catch(e){}var N={};n.isSupported="function"==typeof v&&k&&void 0!==k.createHTMLDocument&&9!==A;var O,T,I=Tz,L=Iz,F=Lz,z=Fz,j=jz,R=Rz,B=zz,P=null,U=yz({},[].concat(KF(_z),KF(xz),KF(Ez),KF(Mz),KF(Cz))),H=null,$=yz({},[].concat(KF(Sz),KF(Az),KF(Nz),KF(Oz))),V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,q=null,K=!0,G=!0,Y=!1,Q=!1,J=!1,Z=!1,X=!1,ee=!1,te=!1,ne=!1,re=!0,ie=!1,oe="user-content-",se=!0,ae=!1,le={},ce=null,ue=yz({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),de=null,pe=yz({},["audio","video","img","source","image","track"]),he=null,fe=yz({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml",ye=be,ve=!1,we=["application/xhtml+xml","text/html"],_e="text/html",xe=null,Ee=i.createElement("form"),ke=function(e){return e instanceof RegExp||e instanceof Function},Me=function(e){xe&&xe===e||(e&&"object"===$F(e)||(e={}),e=vz(e),O=O=-1===we.indexOf(e.PARSER_MEDIA_TYPE)?_e:e.PARSER_MEDIA_TYPE,T="application/xhtml+xml"===O?function(e){return e}:uz,P="ALLOWED_TAGS"in e?yz({},e.ALLOWED_TAGS,T):U,H="ALLOWED_ATTR"in e?yz({},e.ALLOWED_ATTR,T):$,he="ADD_URI_SAFE_ATTR"in e?yz(vz(fe),e.ADD_URI_SAFE_ATTR,T):fe,de="ADD_DATA_URI_TAGS"in e?yz(vz(pe),e.ADD_DATA_URI_TAGS,T):pe,ce="FORBID_CONTENTS"in e?yz({},e.FORBID_CONTENTS,T):ue,W="FORBID_TAGS"in e?yz({},e.FORBID_TAGS,T):{},q="FORBID_ATTR"in e?yz({},e.FORBID_ATTR,T):{},le="USE_PROFILES"in e&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=e.SAFE_FOR_TEMPLATES||!1,J=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||B,ye=e.NAMESPACE||be,e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(G=!1),te&&(ee=!0),le&&(P=yz({},KF(Cz)),H=[],!0===le.html&&(yz(P,_z),yz(H,Sz)),!0===le.svg&&(yz(P,xz),yz(H,Az),yz(H,Oz)),!0===le.svgFilters&&(yz(P,Ez),yz(H,Az),yz(H,Oz)),!0===le.mathMl&&(yz(P,Mz),yz(H,Nz),yz(H,Oz))),e.ADD_TAGS&&(P===U&&(P=vz(P)),yz(P,e.ADD_TAGS,T)),e.ADD_ATTR&&(H===$&&(H=vz(H)),yz(H,e.ADD_ATTR,T)),e.ADD_URI_SAFE_ATTR&&yz(he,e.ADD_URI_SAFE_ATTR,T),e.FORBID_CONTENTS&&(ce===ue&&(ce=vz(ce)),yz(ce,e.FORBID_CONTENTS,T)),se&&(P["#text"]=!0),J&&yz(P,["html","head","body"]),P.table&&(yz(P,["tbody"]),delete W.tbody),ez&&ez(e),xe=e)},De=yz({},["mi","mo","mn","ms","mtext"]),Ce=yz({},["foreignobject","desc","title","annotation-xml"]),Se=yz({},["title","style","font","a","script"]),Ae=yz({},xz);yz(Ae,Ez),yz(Ae,kz);var Ne=yz({},Mz);yz(Ne,Dz);var Oe=function(e){var t=v(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});var n=uz(e.tagName),r=uz(t.tagName);return e.namespaceURI===ge?t.namespaceURI===be?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===r||De[r]):Boolean(Ae[n]):e.namespaceURI===me?t.namespaceURI===be?"math"===n:t.namespaceURI===ge?"math"===n&&Ce[r]:Boolean(Ne[n]):e.namespaceURI===be&&(!(t.namespaceURI===ge&&!Ce[r])&&(!(t.namespaceURI===me&&!De[r])&&(!Ne[n]&&(Se[n]||!Ae[n]))))},Te=function(e){cz(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=x}catch(t){e.remove()}}},Ie=function(e,t){try{cz(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){cz(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(ee||te)try{Te(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){var t,n;if(X)e="<remove></remove>"+e;else{var r=dz(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===O&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=_?_.createHTML(e):e;if(ye===be)try{t=(new h).parseFromString(o,O)}catch(e){}if(!t||!t.documentElement){t=k.createDocument(ye,"template",null);try{t.documentElement.innerHTML=ve?"":o}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(i.createTextNode(n),s.childNodes[0]||null),ye===be?C.call(t,J?"html":"body")[0]:J?t.documentElement:s},Fe=function(e){return M.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},ze=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},je=function(e){return"object"===$F(a)?e instanceof a:e&&"object"===$F(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Re=function(e,t,r){N[e]&&az(N[e],(function(e){e.call(n,t,r,xe)}))},Be=function(e){var t;if(Re("beforeSanitizeElements",e,null),ze(e))return Te(e),!0;if(mz(/[\u0080-\uFFFF]/,e.nodeName))return Te(e),!0;var r=T(e.nodeName);if(Re("uponSanitizeElement",e,{tagName:r,allowedTags:P}),e.hasChildNodes()&&!je(e.firstElementChild)&&(!je(e.content)||!je(e.content.firstElementChild))&&mz(/<[/\w]/g,e.innerHTML)&&mz(/<[/\w]/g,e.textContent))return Te(e),!0;if("select"===r&&mz(/<template/i,e.innerHTML))return Te(e),!0;if(!P[r]||W[r]){if(!W[r]&&Ue(r)){if(V.tagNameCheck instanceof RegExp&&mz(V.tagNameCheck,r))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(r))return!1}if(se&&!ce[r]){var i=v(e)||e.parentNode,o=y(e)||e.childNodes;if(o&&i)for(var s=o.length-1;s>=0;--s)i.insertBefore(g(o[s],!0),b(e))}return Te(e),!0}return e instanceof l&&!Oe(e)?(Te(e),!0):"noscript"!==r&&"noembed"!==r||!mz(/<\/no(script|embed)/i,e.innerHTML)?(Q&&3===e.nodeType&&(t=e.textContent,t=pz(t,I," "),t=pz(t,L," "),e.textContent!==t&&(cz(n.removed,{element:e.cloneNode()}),e.textContent=t)),Re("afterSanitizeElements",e,null),!1):(Te(e),!0)},Pe=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in i||n in Ee))return!1;if(G&&!q[t]&&mz(F,t));else if(K&&mz(z,t));else if(!H[t]||q[t]){if(!(Ue(e)&&(V.tagNameCheck instanceof RegExp&&mz(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&mz(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&mz(V.tagNameCheck,n)||V.tagNameCheck instanceof Function&&V.tagNameCheck(n))))return!1}else if(he[t]);else if(mz(B,pz(n,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==hz(n,"data:")||!de[e]){if(Y&&!mz(j,pz(n,R,"")));else if(n)return!1}else;return!0},Ue=function(e){return e.indexOf("-")>0},He=function(e){var t,r,i,o;Re("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(o=s.length;o--;){var l=t=s[o],c=l.name,u=l.namespaceURI;if(r="value"===c?t.value:fz(t.value),i=T(c),a.attrName=i,a.attrValue=r,a.keepAttr=!0,a.forceKeepAttr=void 0,Re("uponSanitizeAttribute",e,a),r=a.attrValue,!a.forceKeepAttr&&(Ie(c,e),a.keepAttr))if(mz(/\/>/i,r))Ie(c,e);else{Q&&(r=pz(r,I," "),r=pz(r,L," "));var d=T(e.nodeName);if(Pe(d,i,r)){if(!ie||"id"!==i&&"name"!==i||(Ie(c,e),r=oe+r),_&&"object"===$F(f)&&"function"==typeof f.getAttributeType)if(u);else switch(f.getAttributeType(d,i)){case"TrustedHTML":r=_.createHTML(r);break;case"TrustedScriptURL":r=_.createScriptURL(r)}try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),lz(n.removed)}catch(e){}}}}Re("afterSanitizeAttributes",e,null)}},$e=function e(t){var n,r=Fe(t);for(Re("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Re("uponSanitizeShadowNode",n,null),Be(n)||(n.content instanceof o&&e(n.content),He(n));Re("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){var i,s,l,c,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ve=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!je(e)){if("function"!=typeof e.toString)throw gz("toString is not a function");if("string"!=typeof(e=e.toString()))throw gz("dirty is not a string, aborting")}if(!n.isSupported){if("object"===$F(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(je(e))return t.toStaticHTML(e.outerHTML)}return e}if(Z||Me(d),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){var p=T(e.nodeName);if(!P[p]||W[p])throw gz("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)1===(s=(i=Le("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!ee&&!Q&&!J&&-1===e.indexOf("<"))return _&&ne?_.createHTML(e):e;if(!(i=Le(e)))return ee?null:ne?x:""}i&&X&&Te(i.firstChild);for(var h=Fe(ae?e:i);l=h.nextNode();)3===l.nodeType&&l===c||Be(l)||(l.content instanceof o&&$e(l.content),He(l),c=l);if(c=null,ae)return e;if(ee){if(te)for(u=D.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return H.shadowroot&&(u=S.call(r,u,!0)),u}var f=J?i.outerHTML:i.innerHTML;return J&&P["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&mz(Bz,i.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+f),Q&&(f=pz(f,I," "),f=pz(f,L," ")),_&&ne?_.createHTML(f):f},n.setConfig=function(e){Me(e),Z=!0},n.clearConfig=function(){xe=null,Z=!1},n.isValidAttribute=function(e,t,n){xe||Me({});var r=T(e),i=T(t);return Pe(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(N[e]=N[e]||[],cz(N[e],t))},n.removeHook=function(e){if(N[e])return lz(N[e])},n.removeHooks=function(e){N[e]&&(N[e]=[])},n.removeAllHooks=function(){N={}},n}();const $z=e=>{let{content:t="",variables:r=[],className:i,...o}=e;const s=Jo((e=>e.replace(Go,((e,t)=>{const n=Wo.highlightAuto(t.replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&")).children.map(Qo);return`<pre><code>${p(n)}</code></pre>`})))(t),r),a=Hz.sanitize;return n.createElement("div",yb({"data-cy":"neeto-editor-content",className:_s(qo,{[i]:i}),dangerouslySetInnerHTML:{__html:a(s,Ko)}},o))};export{wy as Attachments,PF as Editor,$z as EditorContent,HF as FormikEditor,RF as Menu,es as isEditorEmpty,ar as isEditorOverlaysActive,Jo as substituteVariables};
|