@bigbinary/neeto-editor 1.0.4 → 1.0.5

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/build/index.js CHANGED
@@ -57,7 +57,7 @@ return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();functio
57
57
 
58
58
  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.
59
59
  */
60
- return function(t){var n=e,i=n.lib,r=i.WordArray,o=i.Hasher,s=n.algo,a=r.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=r.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=r.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=r.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]),p=r.create([0,1518500249,1859775393,2400959708,2840853838]),d=r.create([1352829926,1548603684,1836072691,2053994217,0]),h=s.RIPEMD160=o.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var i=t+n,r=e[i];e[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o,s,h,x,w,_,k,E,C,M,O,D=this._hash.words,T=p.words,S=d.words,N=a.words,A=l.words,j=c.words,L=u.words;for(_=o=D[0],k=s=D[1],E=h=D[2],C=x=D[3],M=w=D[4],n=0;n<80;n+=1)O=o+e[t+N[n]]|0,O+=n<16?f(s,h,x)+T[0]:n<32?m(s,h,x)+T[1]:n<48?g(s,h,x)+T[2]:n<64?b(s,h,x)+T[3]:v(s,h,x)+T[4],O=(O=y(O|=0,j[n]))+w|0,o=w,w=x,x=y(h,10),h=s,s=O,O=_+e[t+A[n]]|0,O+=n<16?v(k,E,C)+S[0]:n<32?b(k,E,C)+S[1]:n<48?g(k,E,C)+S[2]:n<64?m(k,E,C)+S[3]:f(k,E,C)+S[4],O=(O=y(O|=0,L[n]))+M|0,_=M,M=C,C=y(E,10),E=k,k=O;O=D[1]+h+C|0,D[1]=D[2]+x+M|0,D[2]=D[3]+w+_|0,D[3]=D[4]+o+k|0,D[4]=D[0]+s+E|0,D[0]=O},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[(i+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,o=r.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return r},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 v(e,t,n){return e^(t|~n)}function y(e,t){return e<<t|e>>>32-t}n.RIPEMD160=o._createHelper(h),n.HmacRIPEMD160=o._createHmacHelper(h)}(),e.RIPEMD160}(GO())),jD(),LD||(LD=1,zD.exports=function(e){return function(){var t=e,n=t.lib,i=n.Base,r=n.WordArray,o=t.algo,s=o.SHA1,a=o.HMAC,l=o.PBKDF2=i.extend({cfg:i.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,i=a.create(n.hasher,e),o=r.create(),s=r.create([1]),l=o.words,c=s.words,u=n.keySize,p=n.iterations;l.length<u;){var d=i.update(t).finalize(s);i.reset();for(var h=d.words,f=h.length,m=d,g=1;g<p;g++){m=i.finalize(m),i.reset();for(var b=m.words,v=0;v<f;v++)h[v]^=b[v]}o.concat(d),c[0]++}return o.sigBytes=4*u,o}});t.PBKDF2=function(e,t,n){return l.create(n).compute(e,t)}}(),e.PBKDF2}(GO(),mD(),jD())),FD(),UD(),WD(),KD(),QD(),XD(),eT||(eT=1,tT.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}(GO(),UD())),nT||(nT=1,iT.exports=function(e){return e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,i=4*t,r=i-n%i,o=n+r-1;e.clamp(),e.words[o>>>2]|=r<<24-o%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923}(GO(),UD())),rT||(rT=1,oT.exports=function(e){return e.pad.Iso10126={pad:function(t,n){var i=4*n,r=i-t.sigBytes%i;t.concat(e.lib.WordArray.random(r-1)).concat(e.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126}(GO(),UD())),sT||(sT=1,aT.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}(GO(),UD())),lT||(lT=1,cT.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}(GO(),UD())),uT||(uT=1,pT.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(GO(),UD())),dT||(dT=1,hT.exports=function(e){return function(t){var n=e,i=n.lib.CipherParams,r=n.enc.Hex;n.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var t=r.parse(e);return i.create({ciphertext:t})}}}(),e.format.Hex}(GO(),UD())),fT||(fT=1,mT.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,i=t.algo,r=[],o=[],s=[],a=[],l=[],c=[],u=[],p=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,i=0;for(t=0;t<256;t++){var f=i^i<<1^i<<2^i<<3^i<<4;f=f>>>8^255&f^99,r[n]=f,o[f]=n;var m=e[n],g=e[m],b=e[g],v=257*e[f]^16843008*f;s[n]=v<<24|v>>>8,a[n]=v<<16|v>>>16,l[n]=v<<8|v>>>24,c[n]=v,v=16843009*b^65537*g^257*m^16843008*n,u[f]=v<<24|v>>>8,p[f]=v<<16|v>>>16,d[f]=v<<8|v>>>24,h[f]=v,n?(n=m^e[e[e[b^m]]],i^=e[e[i]]):n=i=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=i.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,i=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<i;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=f[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],l=0;l<i;l++){if(s=i-l,l%4)var c=o[s];else c=o[s-4];a[l]=l<4||s<=4?c:u[r[c>>>24]]^p[r[c>>>16&255]]^d[r[c>>>8&255]]^h[r[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,l,c,r)},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,p,d,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,r,o,s,a){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],p=e[t+2]^n[2],d=e[t+3]^n[3],h=4,f=1;f<l;f++){var m=i[c>>>24]^r[u>>>16&255]^o[p>>>8&255]^s[255&d]^n[h++],g=i[u>>>24]^r[p>>>16&255]^o[d>>>8&255]^s[255&c]^n[h++],b=i[p>>>24]^r[d>>>16&255]^o[c>>>8&255]^s[255&u]^n[h++],v=i[d>>>24]^r[c>>>16&255]^o[u>>>8&255]^s[255&p]^n[h++];c=m,u=g,p=b,d=v}m=(a[c>>>24]<<24|a[u>>>16&255]<<16|a[p>>>8&255]<<8|a[255&d])^n[h++],g=(a[u>>>24]<<24|a[p>>>16&255]<<16|a[d>>>8&255]<<8|a[255&c])^n[h++],b=(a[p>>>24]<<24|a[d>>>16&255]<<16|a[c>>>8&255]<<8|a[255&u])^n[h++],v=(a[d>>>24]<<24|a[c>>>16&255]<<16|a[u>>>8&255]<<8|a[255&p])^n[h++],e[t]=m,e[t+1]=g,e[t+2]=b,e[t+3]=v},keySize:256/32});t.AES=n._createHelper(m)}(),e.AES}(GO(),sD(),dD(),FD(),UD())),vT(),yT||(yT=1,xT.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,r=i.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,i=this._S=[],r=0;r<256;r++)i[r]=r;r=0;for(var o=0;r<256;r++){var s=r%n,a=t[s>>>2]>>>24-s%4*8&255;o=(o+i[r]+a)%256;var l=i[r];i[r]=i[o],i[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,i=0,r=0;r<4;r++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,i|=e[(e[t]+e[n])%256]<<24-8*r}return this._i=t,this._j=n,i}t.RC4=n._createHelper(r);var s=i.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});t.RC4Drop=n._createHelper(s)}(),e.RC4}(GO(),sD(),dD(),FD(),UD())),wT||(wT=1,_T.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,r=[],o=[],s=[],a=i.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 i=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]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)r[n]^=i[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),p=c>>>16|4294901760&u,d=u<<16|65535&c;for(r[0]^=c,r[1]^=p,r[2]^=u,r[3]^=d,r[4]^=c,r[5]^=p,r[6]^=u,r[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8),e[t+i]^=r[i]},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 i=e[n]+t[n],r=65535&i,a=i>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|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}(GO(),sD(),dD(),FD(),UD())),kT||(kT=1,ET.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,r=[],o=[],s=[],a=i.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],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]];this._b=0;for(var r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)i[r]^=n[r+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),p=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=p,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=p,i[6]^=u,i[7]^=d,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8),e[t+i]^=r[i]},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 i=e[n]+t[n],r=65535&i,a=i>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|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}(GO(),sD(),dD(),FD(),UD())));const MT=async e=>{const t=await(e=>new Promise(((t,n)=>{const i=new FileReader;i.onload=e=>{const n=CT.lib.WordArray.create(e.target.result);t(CT.MD5(n))},i.onerror=()=>n(new Error("Corrupted file")),i.readAsArrayBuffer(e)})))(e);return t.toString(CT.enc.Base64)};class OT{constructor(e){let{url:t,file:n,progress:i=Vu}=e;bE(this,"create",(async()=>{const{data:e}=await this.generateUrl(),{direct_upload:{url:t,headers:n}}=e;return await this.uploadToCloud(t,n),e})),bE(this,"generateUrl",(async()=>{const e={blob:{filename:this.file.name,byte_size:this.file.size,content_type:this.file.type,checksum:await MT(this.file)}};return HO(this.url,e)})),bE(this,"abort",(()=>this.abortController.abort())),bE(this,"uploadToCloud",((e,t)=>{const n={headers:t,onUploadProgress:this.progress,signal:this.abortController.signal};return $O(e,this.file,n)})),this.url=t,this.file=n,this.progress=i,this.abortController=new AbortController}}class DT extends vm.exports.BasePlugin{constructor(e,t){super(e,t),bE(this,"upload",(e=>{if(Pu(e))return Promise.resolve();const t=e.map((e=>this.uploadFile(this.uppy.getFile(e))));return Promise.all(t)})),bE(this,"uploadFile",(async e=>{this.uppy.on("file-removed",(n=>{n.id===e.id&&t.abort()})),this.uppy.on("upload-cancel",(n=>{n===e.id&&t.abort()})),this.uppy.on("cancel-all",(()=>t.abort()));const t=new OT({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})}});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){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 TT=e=>{var n;let{uppy:i}=e;const[s,a]=r(0);o((()=>{i.on("progress",a)}),[i]);const l=`${s}%`;return t.createElement("div",{className:"neeto-editor-image-uploader__progress"},t.createElement("p",{className:"neeto-editor-image-uploader__progress-title"},"Uploading..."),t.createElement("p",{className:"neeto-editor-image-uploader__progress-file"},null===(n=i.getFiles()[0])||void 0===n?void 0:n.name),t.createElement("div",{className:"neeto-editor-progress-bar__wrapper","data-cy":"neeto-editor-image-upload-progress-bar"},t.createElement("div",{className:"neeto-editor-progress-bar__percent"},t.createElement("p",null,l),t.createElement(rm,{icon:vd,size:"small",style:"text",onClick:()=>i.cancelAll()})),t.createElement("div",{className:"neeto-editor-progress-bar__indicator"},t.createElement("div",{className:"neeto-editor-progress-bar__indicator-inner",style:{width:l}}))))},ST=e=>{const t=["B","KB","MB","GB"];let n=0;for(;e>=1024&&n<t.length;)e/=1024,++n;return`${e.toFixed(1)} ${t[n]}`},NT=e=>{let{endpoint:n,onSuccess:i,uploadConfig:o}=e;const[s,a]=r(!1),[l,c]=r(""),u={...dm,...o},p=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=mE(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof gE)))throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof t.current}`);return fE((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}((()=>new hv({...u,onBeforeFileAdded:e=>{const{maxFileSize:t,allowedFileTypes:n}=u.restrictions;return e.size>t?(c(`File size is too large. Max size is ${ST(u.restrictions.maxFileSize)}.`),!1):!!n.includes(`.${e.extension}`)||(c(`File type is not permitted. Allowed file types are: ${n.join(", ")}.`),!1)}}).use(DT,{directUploadUrl:n,...hm}).on("upload",(()=>a(!0))).on("upload-success",((e,t)=>{let{blob_url:n}=t;return i(n)})).on("cancel-all",(()=>a(!1))).on("complete",(()=>a(!1)))));return s?t.createElement(TT,{uppy:p}):t.createElement("div",{className:"neeto-editor-image-uploader__dnd-wrapper"},t.createElement(zk,{className:"neeto-editor-image-uploader__dnd","data-cy":"neeto-editor-image-local-uploader",uppy:p,locale:{strings:{dropHereOr:"Drop your file(s) here or %{browse}",browse:"Browse"}},note:`Max. File Size: ${ST(u.restrictions.maxFileSize)}`}),l&&t.createElement("p",{className:"neeto-editor-image-uploader__dnd--error"},l))};var AT={},jT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},LT=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 i(e,t){return t._once=!0,n(e,t),this}function r(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,i=arguments.length,o=Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];var a=t[e]&&t[e].slice();return a&&a.forEach((function(t){t._once&&r(e,t),t.apply(n,o)})),this}return jT({},e,{on:n,once:i,off:r,emit:o})},zT=Object.freeze({__proto__:null,default:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,i=void 0,r=void 0,o=void 0,s=void 0,a=void 0,l=void 0,c=void 0,u=void 0,p=void 0,d=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),v={all:function(){return k(b.children)},new:function(){return k(b.children).filter((function(e){return!e.hasAttribute(""+f)}))}},y=[M,O,D],x=[T,S,N,A],w=LT({pack:z,update:I,resize:R});return w;function _(e){e.forEach((function(e){return e()}))}function k(e){return Array.prototype.slice.call(e)}function E(e){return Array.apply(null,Array(e)).map((function(){return 0}))}function C(){return m.map((function(e){return e.mq&&window.matchMedia("(min-width: "+e.mq+")").matches})).indexOf(!0)}function M(){i=C()}function O(){r=-1===i?m[m.length-1]:m[i]}function D(){s=E(r.columns)}function T(){p=v[t?"new":"all"]()}function S(){0!==p.length&&(d=p.map((function(e){return e.clientWidth})),h=p.map((function(e){return e.clientHeight})))}function N(){p.forEach((function(e,t){o=s.indexOf(Math.min.apply(Math,s)),e.style.position="absolute",a=s[o]+"px",l=o*d[t]+o*r.gutter+"px",g?(e.style.top=a,e.style.left=l):e.style.transform="translate3d("+l+", "+a+", 0)",e.setAttribute(f,""),c=d[t],u=h[t],c&&u&&(s[o]+=u+r.gutter)}))}function A(){b.style.position="relative",b.style.width=r.columns*c+(r.columns-1)*r.gutter+"px",b.style.height=Math.max.apply(Math,s)-r.gutter+"px"}function j(){n||(window.requestAnimationFrame(L),n=!0)}function L(){i!==C()&&(z(),w.emit("resize",r)),n=!1}function z(){return t=!1,_(y.concat(x)),w.emit("pack")}function I(){return t=!0,_(x),w.emit("update")}function R(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"addEventListener":"removeEventListener";return window[t]("resize",j),w}}}),IT=Lc(zT),RT={exports:{}},FT={exports:{}};!function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=t,o=a(r),s=a(wh.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),i(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),i=void 0;if(this.props.useWindow){var r=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:r.scrollTop;i=this.props.isReverse?o:this.calculateOffset(e,o)}else i=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;i<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,i=t.element,r=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 i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);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 r&&(a?s?u.unshift(a):u.push(a):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(i,c,u)}}]),t}(r.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},n.default=l,e.exports=n["default"]}(FT,FT.exports),RT.exports=FT.exports,Object.defineProperty(AT,"__esModule",{value:!0});var BT,PT,UT=AT.default=void 0,HT=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),$T=t,WT=GT($T),qT=GT(wh.exports),VT=GT(IT),KT=GT(RT.exports);function GT(e){return e&&e.__esModule?e:{default:e}}function YT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QT(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 ZT=(PT=BT=function(e){function t(){var e,n,i;YT(this,t);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=QT(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),i.setContainerRef=function(e){i.masonryContainer=e},i.forcePack=function(){i.masonryContainer&&i.state.instance.pack()},i.forceUpdate=function(){i.masonryContainer&&i.state.instance.update()},i.createNewInstance=function(){var e=i.props,t=e.packed,n=e.sizes,r=e.children,o=e.position,s=(0,VT.default)({container:i.masonryContainer,packed:t,sizes:n,position:o});s.resize(!0),r.length>0&&s.pack(),i.setState((function(){return{instance:s}}))},QT(i,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,$T.Component),HT(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,i=e.style;e.pack,e.packed,e.position,e.sizes;var r=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(e,["children","className","style","pack","packed","position","sizes"]);return WT.default.createElement(KT.default,r,WT.default.createElement("div",{ref:this.setContainerRef,className:n,style:i},t))}}]),t}(),BT.propTypes={children:qT.default.arrayOf(qT.default.element).isRequired,className:qT.default.string,initialLoad:qT.default.bool,pack:qT.default.bool,packed:qT.default.string,position:qT.default.bool,sizes:qT.default.array,style:qT.default.object},BT.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:{}},PT);UT=AT.default=ZT;const JT=()=>t.createElement("div",{className:"neeto-editor-loader"},t.createElement("span",{className:"neeto-editor-loader__spinner-icon"})),XT=e=>{let{onSubmit:n,unsplashApiKey:i}=e;const s=c(null),[a,l]=r(""),[u,p]=r(!1),[d,h]=r([]),[f,m]=r(1),[g,b]=r(!0),[v,y]=r(!1),x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;const[n,i]=r(e);return o((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e]),n}(a||"latest");o((()=>{w(1)}),[x]);const w=async e=>{try{y(!0),p(!1);const t=await(e=>{let{pageNo:t,query:n,apiKey:i}=e;return UO.get(Bc,{headers:{Authorization:`Client-ID ${i}`},params:{page:t,per_page:30,order_by:"popular",query:n}})})({page:e,query:x,apiKey:i}),{data:{results:n,total_pages:r}}=t;h(1===e?n:[...d,...n]),m(e+1),b(e<r)}catch{p(!0)}finally{y(!1)}};return t.createElement("div",{className:"neeto-editor-unsplash-wrapper"},t.createElement(gm,{autoFocus:!0,"data-cy":"neeto-editor-unsplash-image-picker-search-input",name:"text",placeholder:"Search Unsplash",value:a,onChange:e=>{let{target:{value:t}}=e;l(t)}}),u&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-error"},"Something went wrong! Please try again later."),!u&&!v&&qu(d)&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-no-results-error"},"No results"),!u&&t.createElement("div",{className:"neeto-editor-unsplash-container"},t.createElement(UT,{pack:!0,position:!0,className:"neeto-editor-unsplash-gallery",hasMore:g,loadMore:()=>{!v&&g&&f>1&&w(f)},loader:t.createElement(JT,{key:0}),ref:s,style:{width:"100%"},useWindow:!1,sizes:[{columns:3,gutter:0},{mq:"768px",columns:3,gutter:0},{mq:"1024px",columns:3,gutter:0}]},d&&d.map(((e,i)=>t.createElement("div",{className:"neeto-editor-unsplash-gallery__item","data-cy":`neeto-editor-unsplash-image-picker-result-${i}`,key:i},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-placeholder",style:{paddingBottom:`${e.height/e.width*100}%`}},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-inner",id:`unsplashImage${i}`},t.createElement("img",{src:e.urls.regular,onClick:()=>n(e.urls.small)}),t.createElement("a",{href:`https://unsplash.com/@${e.user.username}`,rel:"noreferrer",target:"_blank"},e.user.name," "))))))),!g&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text"},"End of results")))},eS=e=>{let{buttonLabel:n="Submit",placeholder:i,onSubmit:o,className:s}=e;const[a,l]=r(""),[c,u]=r("");return t.createElement("div",{className:Rc("neeto-editor-url-form__wrapper",{[s]:s})},t.createElement(gm,{autoFocus:!0,"data-cy":"neeto-editor-image-upload-url-input",error:c,name:"url",placeholder:i,value:a,onChange:e=>{let{target:{value:t}}=e;return l(t)},onFocus:()=>u("")}),t.createElement(rm,{"data-cy":"neeto-editor-image-upload-url-submit",disabled:!a,label:n,onClick:e=>{e.preventDefault(),Uc.test(a)?o(a):u("Please enter a valid url")}}))},tS=e=>{let{isOpen:n,onClose:i,editor:o,imageUploadUrl:s,uploadConfig:a,unsplashApiKey:l}=e;const[c,u]=(e=>{var t;const[n,i]=r(null===(t=e[0])||void 0===t?void 0:t.key);return[n,e=>i(e.key)]})(fm),[p,d]=r(""),h=!!l,f=e=>{d(e)},m={local:()=>t.createElement(NT,{endpoint:s,uploadConfig:a,onSuccess:f}),link:()=>t.createElement(eS,{buttonLabel:"Upload Image",placeholder:"Paste the image link",onSubmit:f}),unsplash:()=>t.createElement(XT,{unsplashApiKey:l,onSubmit:f})}[c];return t.createElement(am,{closeButton:!1,isOpen:n,onClose:()=>{i(),u(fm[0])}},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement(pm,null,fm.filter((e=>"unsplash"!==e.key||h)).map((e=>t.createElement(pm.Item,{active:c===e.key,key:e.key,onClick:()=>u(e)},e.title)))),t.createElement("div",{className:"neeto-editor-image-uploader__content"},p?t.createElement(bm,{editor:o,url:p,onClose:()=>{d(""),i()}}):t.createElement(m,null))))};var nS=Jc;var iS="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,i=arguments.length;n<i;){var r=arguments[n];if(null!=r)for(var o in r)nS(o,r)&&(t[o]=r[o]);n+=1}return t},rS=iS,oS=Qc((function(e,t){return rS({},t,e)})),sS=oS;const aS=as.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 Zt({key:new en("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const i=this.storage.characters({node:t.doc}),r=this.storage.characters({node:e.doc});if(r<=n)return!0;if(i>n&&r>n&&r<=i)return!0;if(i>n&&r>n&&r>i)return!1;if(!e.getMeta("paste"))return!1;const o=e.selection.$head.pos,s=o-(r-n),a=o;e.deleteRange(s,a);return!(this.storage.characters({node:e.doc})>n)}})]}}),lS=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,cS=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,uS=Js.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",Ho(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[Gs({find:lS,type:this.type})]},addPasteRules(){return[ea({find:cS,type:this.type})]}}),pS=Xs.create({name:"doc",topNode:!0,content:"block+"}),dS=as.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new Zt({key:new en("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:i}=this.editor,{anchor:r}=t,o=[];if(!n||!i)return Br.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(r>=t&&r<=t+e.nodeSize-1))return!1;s+=1}));let a=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(r>=t&&r<=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(Ir.node(t,t+e.nodeSize,{class:this.options.className}))})),Br.create(e,o)}}})]}}),hS=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,fS=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,mS=Js.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",Ho(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[Gs({find:hS,type:this.type})]},addPasteRules(){return[ea({find:fS,type:this.type})]}});function gS(e){this.j={},this.jr=[],this.jd=null,this.t=e}gS.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,i=this.j[e];if(i)return n&&(i.t=n),i;i=bS();var r=wS(this,e);return r?(Object.assign(i.j,r.j),i.jr.append(r.jr),i.jr=r.jd,i.t=n||r.t):i.t=n,this.j[e]=i,i}};var bS=function(){return new gS},vS=function(e){return new gS(e)},yS=function(e,t,n){e.j[t]||(e.j[t]=n)},xS=function(e,t,n){e.jr.push([t,n])},wS=function(e,t){var n=e.j[t];if(n)return n;for(var i=0;i<e.jr.length;i++){var r=e.jr[i][0],o=e.jr[i][1];if(r.test(t))return o}return e.jd},_S=function(e,t,n){for(var i=0;i<t.length;i++)yS(e,t[i],n)},kS=function(e,t){for(var n=0;n<t.length;n++){var i=t[n][0],r=t[n][1];yS(e,i,r)}},ES=function(e,t,n,i){for(var r,o=0,s=t.length;o<s&&(r=e.j[t[o]]);)e=r,o++;if(o>=s)return[];for(;o<s-1;)r=i(),yS(e,t[o],r),e=r,o++;yS(e,t[s-1],n)},CS="DOMAIN",MS="LOCALHOST",OS="TLD",DS="NUM",TS="PROTOCOL",SS="MAILTO",NS="WS",AS="NL",jS="OPENBRACE",LS="OPENBRACKET",zS="OPENANGLEBRACKET",IS="OPENPAREN",RS="CLOSEBRACE",FS="CLOSEBRACKET",BS="CLOSEANGLEBRACKET",PS="CLOSEPAREN",US="AMPERSAND",HS="APOSTROPHE",$S="ASTERISK",WS="AT",qS="BACKSLASH",VS="BACKTICK",KS="CARET",GS="COLON",YS="COMMA",QS="DOLLAR",ZS="DOT",JS="EQUALS",XS="EXCLAMATION",eN="HYPHEN",tN="PERCENT",nN="PIPE",iN="PLUS",rN="POUND",oN="QUERY",sN="QUOTE",aN="SEMI",lN="SLASH",cN="TILDE",uN="UNDERSCORE",pN="SYM",dN=Object.freeze({__proto__:null,DOMAIN:CS,LOCALHOST:MS,TLD:OS,NUM:DS,PROTOCOL:TS,MAILTO:SS,WS:NS,NL:AS,OPENBRACE:jS,OPENBRACKET:LS,OPENANGLEBRACKET:zS,OPENPAREN:IS,CLOSEBRACE:RS,CLOSEBRACKET:FS,CLOSEANGLEBRACKET:BS,CLOSEPAREN:PS,AMPERSAND:US,APOSTROPHE:HS,ASTERISK:$S,AT:WS,BACKSLASH:qS,BACKTICK:VS,CARET:KS,COLON:GS,COMMA:YS,DOLLAR:QS,DOT:ZS,EQUALS:JS,EXCLAMATION:XS,HYPHEN:eN,PERCENT:tN,PIPE:nN,PLUS:iN,POUND:rN,QUERY:oN,QUOTE:sN,SEMI:aN,SLASH:lN,TILDE:cN,UNDERSCORE:uN,SYM:pN}),hN="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(" "),fN=/(?:[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])/,mN=/(?:[#\*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])/,gN=/\uFE0F/,bN=/\d/,vN=/\s/;function yN(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=bS(),n=vS(DS),i=vS(CS),r=bS(),o=vS(NS),s=[[bN,i],[fN,i],[mN,i],[gN,i]],a=function(){var e=vS(CS);return e.j={"-":r},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};kS(t,[["'",vS(HS)],["{",vS(jS)],["[",vS(LS)],["<",vS(zS)],["(",vS(IS)],["}",vS(RS)],["]",vS(FS)],[">",vS(BS)],[")",vS(PS)],["&",vS(US)],["*",vS($S)],["@",vS(WS)],["`",vS(VS)],["^",vS(KS)],[":",vS(GS)],[",",vS(YS)],["$",vS(QS)],[".",vS(ZS)],["=",vS(JS)],["!",vS(XS)],["-",vS(eN)],["%",vS(tN)],["|",vS(nN)],["+",vS(iN)],["#",vS(rN)],["?",vS(oN)],['"',vS(sN)],["/",vS(lN)],[";",vS(aN)],["~",vS(cN)],["_",vS(uN)],["\\",vS(qS)]]),yS(t,"\n",vS(AS)),xS(t,vN,o),yS(o,"\n",bS()),xS(o,vN,o);for(var c=0;c<hN.length;c++)ES(t,hN[c],l(OS),a);var u=a(),p=a(),d=a(),h=a();ES(t,"file",u,a),ES(t,"ftp",p,a),ES(t,"http",d,a),ES(t,"mailto",h,a);var f=a(),m=vS(TS),g=vS(SS);yS(p,"s",f),yS(p,":",m),yS(d,"s",f),yS(d,":",m),yS(u,":",m),yS(f,":",m),yS(h,":",g);for(var b=a(),v=0;v<e.length;v++)ES(t,e[v],b,a);return yS(b,":",m),ES(t,"localhost",l(MS),a),xS(t,bN,n),xS(t,fN,i),xS(t,mN,i),xS(t,gN,i),xS(n,bN,n),xS(n,fN,i),xS(n,mN,i),xS(n,gN,i),yS(n,"-",r),yS(i,"-",r),yS(r,"-",r),xS(i,bN,i),xS(i,fN,i),xS(i,mN,i),xS(i,gN,i),xS(r,bN,i),xS(r,fN,i),xS(r,mN,i),xS(r,gN,i),t.jd=vS(pN),t}var xN={defaultProtocol:"http",events:null,format:wN,formatHref:wN,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function wN(e){return e}function _N(){}function kN(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]:{},i=Object.create(e.prototype);for(var r in n)i[r]=n[r];i.constructor=t,t.prototype=i}(_N,n,t),n}_N.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]:xN.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var EN=kN("email",{isLink:!0}),CN=kN("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),MN=kN("text"),ON=kN("nl"),DN=kN("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xN.defaultProtocol,t=this.tk,n=!1,i=!1,r=[],o=0;t[o].t===TS;)n=!0,r.push(t[o].v),o++;for(;t[o].t===lN;)i=!0,r.push(t[o].v),o++;for(;o<t.length;o++)r.push(t[o].v);return r=r.join(""),n||i||(r="".concat(e,"://").concat(r)),r},hasProtocol:function(){return this.tk[0].t===TS}}),TN=Object.freeze({__proto__:null,MultiToken:_N,Base:_N,createTokenClass:kN,MailtoEmail:EN,Email:CN,Text:MN,Nl:ON,Url:DN});function SN(){var e=bS(),t=bS(),n=bS(),i=bS(),r=bS(),o=bS(),s=bS(),a=vS(DN),l=bS(),c=vS(DN),u=vS(DN),p=bS(),d=bS(),h=bS(),f=bS(),m=bS(),g=vS(DN),b=vS(DN),v=vS(DN),y=vS(DN),x=bS(),w=bS(),_=bS(),k=bS(),E=bS(),C=bS(),M=vS(CN),O=bS(),D=vS(CN),T=vS(EN),S=bS(),N=bS(),A=bS(),j=bS(),L=vS(ON);yS(e,AS,L),yS(e,TS,t),yS(e,SS,n),yS(t,lN,i),yS(i,lN,r),yS(e,OS,o),yS(e,CS,o),yS(e,MS,a),yS(e,DS,o),yS(r,OS,u),yS(r,CS,u),yS(r,DS,u),yS(r,MS,u),yS(o,ZS,s),yS(E,ZS,C),yS(s,OS,a),yS(s,CS,o),yS(s,DS,o),yS(s,MS,o),yS(C,OS,M),yS(C,CS,E),yS(C,DS,E),yS(C,MS,E),yS(a,ZS,s),yS(M,ZS,C),yS(a,GS,l),yS(a,lN,u),yS(l,DS,c),yS(c,lN,u),yS(M,GS,O),yS(O,DS,D);var z=[US,$S,WS,qS,VS,KS,QS,CS,JS,eN,MS,DS,tN,nN,iN,rN,TS,lN,pN,cN,OS,uN],I=[HS,BS,RS,FS,PS,GS,YS,ZS,XS,zS,jS,LS,IS,oN,sN,aN];yS(u,jS,d),yS(u,LS,h),yS(u,zS,f),yS(u,IS,m),yS(p,jS,d),yS(p,LS,h),yS(p,zS,f),yS(p,IS,m),yS(d,RS,u),yS(h,FS,u),yS(f,BS,u),yS(m,PS,u),yS(g,RS,u),yS(b,FS,u),yS(v,BS,u),yS(y,PS,u),yS(x,RS,u),yS(w,FS,u),yS(_,BS,u),yS(k,PS,u),_S(d,z,g),_S(h,z,b),_S(f,z,v),_S(m,z,y),_S(d,I,x),_S(h,I,w),_S(f,I,_),_S(m,I,k),_S(g,z,g),_S(b,z,b),_S(v,z,v),_S(y,z,y),_S(g,I,g),_S(b,I,b),_S(v,I,v),_S(y,I,y),_S(x,z,g),_S(w,z,b),_S(_,z,v),_S(k,z,y),_S(x,I,x),_S(w,I,w),_S(_,I,_),_S(k,I,k),_S(u,z,u),_S(p,z,u),_S(u,I,p),_S(p,I,p),yS(n,OS,T),yS(n,CS,T),yS(n,DS,T),yS(n,MS,T),_S(T,z,T),_S(T,I,S),_S(S,z,T),_S(S,I,S);var R=[US,HS,$S,qS,VS,KS,RS,QS,CS,JS,eN,DS,jS,tN,nN,iN,rN,oN,lN,pN,cN,OS,uN];return _S(o,R,N),yS(o,WS,A),_S(a,R,N),yS(a,WS,A),_S(s,R,N),_S(N,R,N),yS(N,WS,A),yS(N,ZS,j),_S(j,R,N),yS(A,OS,E),yS(A,CS,E),yS(A,DS,E),yS(A,MS,M),e}function NN(e,t,n){var i=n[0].s,r=n[n.length-1].e;return new e(t.substr(i,r-i),n)}var AN="undefined"!=typeof console&&console&&console.warn||function(){},jN={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function LN(e){if(jN.initialized&&AN('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");jN.customProtocols.push(e)}function zN(e){return jN.initialized||function(){jN.scanner={start:yN(jN.customProtocols),tokens:dN},jN.parser={start:SN(),tokens:TN};for(var e={createTokenClass:kN},t=0;t<jN.pluginQueue.length;t++)jN.pluginQueue[t][1]({scanner:jN.scanner,parser:jN.parser,utils:e});jN.initialized=!0}(),function(e,t,n){for(var i=n.length,r=0,o=[],s=[];r<i;){for(var a=e,l=null,c=null,u=0,p=null,d=-1;r<i&&!(l=wS(a,n[r].t));)s.push(n[r++]);for(;r<i&&(c=l||wS(a,n[r].t));)l=null,(a=c).accepts()?(d=0,p=a):d>=0&&d++,r++,u++;if(d<0)for(var h=r-u;h<r;h++)s.push(n[h]);else{s.length>0&&(o.push(NN(MN,t,s)),s=[]),r-=d,u-=d;var f=p.t,m=n.slice(r-u,r);o.push(NN(f,t,m))}}return s.length>0&&o.push(NN(MN,t,s)),o}(jN.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,i=0;i<n;){var r=e.charCodeAt(i),o=void 0,s=r<55296||r>56319||i+1===n||(o=e.charCodeAt(i+1))<56320||o>57343?e[i]:e.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),i=n.length,r=[],o=0,s=0;s<i;){for(var a=e,l=null,c=0,u=null,p=-1,d=-1;s<i&&(l=wS(a,n[s]));)(a=l).accepts()?(p=0,d=0,u=a):p>=0&&(p+=n[s].length,d++),c+=n[s].length,o+=n[s].length,s++;o-=p,s-=d,c-=p,r.push({t:u.t,v:t.substr(o-c,c),s:o-c,e:o})}return r}(jN.scanner.start,e))}function IN(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=zN(e),i=[],r=0;r<n.length;r++){var o=n[r];!o.isLink||t&&o.t!==t||i.push(o.toObject())}return i}function RN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=zN(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function FN(e){return new Zt({key:new en("autolink"),appendTransaction:(t,n,i)=>{const r=t.some((e=>e.docChanged))&&!n.doc.eq(i.doc),o=t.some((e=>e.getMeta("preventAutolink")));if(!r||o)return;const{tr:s}=i,a=function(e,t){const n=new Ot(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,i=[];return t.maps.forEach(((e,r)=>{const o=[];if(e.ranges.length)e.forEach(((e,t)=>{o.push({from:e,to:t})}));else{const{from:e,to:t}=n[r];if(void 0===e||void 0===t)return;o.push({from:e,to:t})}o.forEach((({from:e,to:n})=>{const o=t.slice(r).map(e,-1),s=t.slice(r).map(n),a=t.invert().map(o,-1),l=t.invert().map(s);i.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),Ns(i)}(a);return c.forEach((({oldRange:t,newRange:r})=>{As(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const r=As(l.map(t.from),l.map(t.to),i.doc).filter((t=>t.mark.type===e.type));if(!r.length)return;const o=r[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=i.doc.textBetween(o.from,o.to,void 0," "),u=RN(a),p=RN(c);u&&!p&&s.removeMark(o.from,o.to,e.type)}));const o=function(e,t,n){const i=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&i.push({node:e,pos:t})})),i}(i.doc,r,(e=>e.isTextblock));let a,c;if(o.length>1?(a=o[0],c=i.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):o.length&&i.doc.textBetween(r.from,r.to," "," ").endsWith(" ")&&(a=o[0],c=i.doc.textBetween(a.pos,r.to,void 0," ")),a&&c){const t=c.split(" ").filter((e=>""!==e));if(t.length<=0)return!1;const n=t[t.length-1],i=a.pos+c.lastIndexOf(n);if(!n)return!1;IN(n).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:i+e.start+1,to:i+e.end+1}))).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}})),s.steps.length?s:void 0}})}const BN=Js.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(LN)},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",Ho(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[ea({find:e=>IN(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(FN({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new Zt({key:new en("handleClickLink"),props:{handleClick:(e,n,i)=>{var r;const o=Ss(e.state,t.type.name);return!(!(null===(r=i.target)||void 0===r?void 0:r.closest("a"))||!o.href||(window.open(o.href,o.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new Zt({key:new en("handlePasteLink"),props:{handlePaste:(t,n,i)=>{const{state:r}=t,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach((e=>{a+=e.textContent}));const l=IN(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}}),PN=Js.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",Ho(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()}}}),UN=/^\s*>\s$/,HN=Xs.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",Ho(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[Zs({find:UN,type:this.type})]}}),$N=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,WN=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,qN=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,VN=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,KN=Js.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",Ho(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[Gs({find:$N,type:this.type}),Gs({find:qN,type:this.type})]},addPasteRules(){return[ea({find:WN,type:this.type}),ea({find:VN,type:this.type})]}}),GN=/^\s*([-+*])\s$/,YN=Xs.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",Ho(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[Zs({find:GN,type:this.type})]}}),QN=/^```([a-z]+)?[\s\n]$/,ZN=/^~~~([a-z]+)?[\s\n]$/,JN=Xs.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,i=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return i||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",Ho(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:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;const o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!o||!s)&&e.chain().command((({tr:e})=>(e.delete(i.pos-2,i.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:i}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;if(!(r.parentOffset===r.parent.nodeSize-2))return!1;const s=r.after();if(void 0===s)return!1;return!i.nodeAt(s)&&e.commands.exitCode()}}},addInputRules(){return[Qs({find:QN,type:this.type,getAttributes:e=>({language:e[1]})}),Qs({find:ZN,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Zt({key:new en("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"),i=t.clipboardData.getData("vscode-editor-data"),r=i?JSON.parse(i):void 0,o=null==r?void 0:r.mode;if(!n||!o)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(jt.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 XN(e={}){return new Zt({view:t=>new eA(t,e)})}class eA{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,i=t.nodeAfter;if(n||i){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),r=n?t.bottom:t.top;n&&i&&(r=(r+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:r-this.width/2,bottom:r+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,i,r=this.editorView.dom.offsetParent;if(this.element||(this.element=r.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),!r||r==document.body&&"static"==getComputedStyle(r).position)n=-pageXOffset,i=-pageYOffset;else{let e=r.getBoundingClientRect();n=e.left-r.scrollLeft,i=e.top-r.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-i+"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),i=n&&n.type.spec.disableDropCursor,r="function"==typeof i?i(this.editorView,t):i;if(t&&!r){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=ht(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 tA=as.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[XN(this.options)]}});class nA extends Tt{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return nA.valid(n)?new nA(n):Tt.near(n)}content(){return B.empty}eq(e){return e instanceof nA&&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 nA(e.resolve(t.pos))}getBookmark(){return new iA(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),i=e.node(t);if(0!=n)for(let e=i.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(i.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n!=i.childCount)for(let e=i.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(i.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&nA.valid(e))return e;let i=e.pos,r=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){r=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;i+=t;let s=e.doc.resolve(i);if(nA.valid(s))return s}for(;;){let o=t>0?r.firstChild:r.lastChild;if(!o){if(r.isAtom&&!r.isText&&!zt.isSelectable(r)){e=e.doc.resolve(i+r.nodeSize*t),n=!1;continue e}break}r=o,i+=t;let s=e.doc.resolve(i);if(nA.valid(s))return s}return null}}}nA.prototype.visible=!1,nA.findFrom=nA.findGapCursorFrom,Tt.jsonID("gapcursor",nA);class iA{constructor(e){this.pos=e}map(e){return new iA(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return nA.valid(t)?new nA(t):Tt.near(t)}}const rA=Eo({ArrowLeft:oA("horiz",-1),ArrowRight:oA("horiz",1),ArrowUp:oA("vert",-1),ArrowDown:oA("vert",1)});function oA(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,i,r){let o=e.selection,s=t>0?o.$to:o.$from,a=o.empty;if(o instanceof jt){if(!r.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=nA.findGapCursorFrom(s,t,a);return!!l&&(i&&i(e.tr.setSelection(new nA(l))),!0)}}function sA(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!nA.valid(i))return!1;let r=e.posAtCoords({left:n.clientX,top:n.clientY});return!(r&&r.inside>-1&&zt.isSelectable(e.state.doc.nodeAt(r.inside)))&&(e.dispatch(e.state.tr.setSelection(new nA(i))),!0)}function aA(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof nA))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let r=j.empty;for(let e=i.length-1;e>=0;e--)r=j.from(i[e].createAndFill(null,r));let o=e.state.tr.replace(n.pos,n.pos,new B(r,0,0));return o.setSelection(jt.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function lA(e){if(!(e.selection instanceof nA))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Br.create(e.doc,[Ir.widget(e.selection.head,t,{key:"gapcursor"})])}const cA=as.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Zt({props:{decorations:lA,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&nA.valid(n)?new nA(n):null,handleClick:sA,handleKeyDown:rA,handleDOMEvents:{beforeinput:aA}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=qo(Fo(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),uA=Xs.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",Ho(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:r}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,a=r||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()}}}),pA=Xs.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]}`,Ho(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=>Qs({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var dA=200,hA=function(){};hA.prototype.append=function(e){return e.length?(e=hA.from(e),!this.length&&e||e.length<dA&&this.leafAppend(e)||this.length<dA&&e.leafPrepend(this)||this.appendInner(e)):this},hA.prototype.prepend=function(e){return e.length?hA.from(e).append(this):this},hA.prototype.appendInner=function(e){return new mA(this,e)},hA.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?hA.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},hA.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},hA.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)},hA.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var i=[];return this.forEach((function(t,n){return i.push(e(t,n))}),t,n),i},hA.from=function(e){return e instanceof hA?e:e&&e.length?new fA(e):hA.empty};var fA=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,i){for(var r=t;r<n;r++)if(!1===e(this.values[r],i+r))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){for(var r=t-1;r>=n;r--)if(!1===e(this.values[r],i+r))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=dA)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=dA)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}(hA);hA.empty=new fA([]);var mA=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,i){var r=this.left.length;return!(t<r&&!1===this.left.forEachInner(e,t,Math.min(n,r),i))&&(!(n>r&&!1===this.right.forEachInner(e,Math.max(t-r,0),Math.min(this.length,n)-r,i+r))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,i){var r=this.left.length;return!(t>r&&!1===this.right.forEachInvertedInner(e,t-r,Math.max(n,r)-r,i+r))&&(!(n<r&&!1===this.left.forEachInvertedInner(e,Math.min(t,r),n,i))&&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}(hA),gA=hA;const bA=500;class vA{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,i,r=this.items.length;for(;;r--){if(this.items.get(r-1).selection){--r;break}}t&&(n=this.remapping(r,this.items.length),i=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(r,t+1),i=n.maps.length),i--,void c.push(e);if(n){c.push(new yA(e.map));let t,r=e.step.map(n.slice(i));r&&a.maybeStep(r).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new yA(t,void 0,void 0,l.length+c.length))),i--,t&&n.appendMap(t,i)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(i)):e.selection,s=new vA(this.items.slice(0,r).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,i){let r=[],o=this.eventCount,s=this.items,a=!i&&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 yA(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?r.pop():s=s.slice(0,s.length-1)),r.push(u),t&&(o++,t=void 0),i||(a=u)}let l=o-n.depth;return l>wA&&(s=function(e,t){let n;return e.forEach(((e,i)=>{if(e.selection&&0==t--)return n=i,!1})),e.slice(n)}(s,l),o-=l),new vA(s.append(r),o)}remapping(e,t){let n=new Ye;return this.items.forEach(((t,i)=>{let r=null!=t.mirrorOffset&&i-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,r)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new vA(this.items.append(e.map((e=>new yA(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),r=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),i);let a=t;this.items.forEach((t=>{let i=r.getMirror(--a);if(null==i)return;o=Math.min(o,i);let l=r.maps[i];if(t.step){let o=e.steps[i].invert(e.docs[i]),c=t.selection&&t.selection.map(r.slice(a+1,i));c&&s++,n.push(new yA(l,o,c))}else n.push(new yA(l))}),i);let l=[];for(let e=t;e<o;e++)l.push(new yA(r.maps[e]));let c=this.items.slice(0,i).append(l).append(n),u=new vA(c,s);return u.emptyItemCount()>bA&&(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,i=[],r=0;return this.items.forEach(((o,s)=>{if(s>=e)i.push(o),o.selection&&r++;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&&r++;let l,c=new yA(s.invert(),e,a),u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else o.map&&n--}),this.items.length,0),new vA(gA.from(i.reverse()),r)}}vA.empty=new vA(gA.empty,0);class yA{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new yA(t.getMap().invert(),t,this.selection)}}}class xA{constructor(e,t,n,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i}}const wA=20;function _A(e){let t=[];return e.forEach(((e,n,i,r)=>t.push(i,r))),t}function kA(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let r=t.map(e[i],1),o=t.map(e[i+1],-1);r<=o&&n.push(r,o)}return n}function EA(e,t,n,i){let r=OA(t),o=DA.get(t).spec.config,s=(i?e.undone:e.done).popEvent(t,r);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(i?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,r),c=new xA(i?l:s.remaining,i?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(DA,{redo:i,historyState:c}).scrollIntoView())}let CA=!1,MA=null;function OA(e){let t=e.plugins;if(MA!=t){CA=!1,MA=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){CA=!0;break}}return CA}const DA=new en("history"),TA=new en("closeHistory");function SA(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Zt({key:DA,state:{init:()=>new xA(vA.empty,vA.empty,null,0),apply:(t,n,i)=>function(e,t,n,i){let r,o=n.getMeta(DA);if(o)return o.historyState;n.getMeta(TA)&&(e=new xA(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(DA))return s.getMeta(DA).redo?new xA(e.done.addTransform(n,void 0,i,OA(t)),e.undone,_A(n.mapping.maps[n.steps.length-1]),e.prevTime):new xA(e.done,e.undone.addTransform(n,void 0,i,OA(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(r=n.getMeta("rebased"))?new xA(e.done.rebased(n,r),e.undone.rebased(n,r),kA(e.prevRanges,n.mapping),e.prevTime):new xA(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),kA(e.prevRanges,n.mapping),e.prevTime);{let r=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-i.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,i)=>{for(let r=0;r<t.length;r+=2)e<=t[r+1]&&i>=t[r]&&(n=!0)})),n}(n,e.prevRanges)),o=s?kA(e.prevRanges,n.mapping):_A(n.mapping.maps[n.steps.length-1]);return new xA(e.done.addTransform(n,r?t.selection.getBookmark():void 0,i,OA(t)),vA.empty,o,n.time)}}(n,i,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i="historyUndo"==n?NA:"historyRedo"==n?AA:null;return!!i&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}const NA=(e,t)=>{let n=DA.getState(e);return!(!n||0==n.done.eventCount)&&(t&&EA(n,e,t,!1),!0)},AA=(e,t)=>{let n=DA.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&EA(n,e,t,!0),!0)},jA=as.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>NA(e,t),redo:()=>({state:e,dispatch:t})=>AA(e,t)}),addProseMirrorPlugins(){return[SA(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()}}}),LA=Xs.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",Ho(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,i=t.end();if(t.nodeAfter)e.setSelection(jt.create(e.doc,t.pos));else{const r=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();r&&(e.insert(i,r),e.setSelection(jt.create(e.doc,i)))}e.scrollIntoView()}return!0})).run()}},addInputRules(){return[Ys({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),zA=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,IA=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,RA=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,FA=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,BA=Js.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",Ho(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[Gs({find:zA,type:this.type}),Gs({find:RA,type:this.type})]},addPasteRules(){return[ea({find:IA,type:this.type}),ea({find:FA,type:this.type})]}}),PA=Xs.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",Ho(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)}}}),UA=/^(\d+)\.\s$/,HA=Xs.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",Ho(this.options.HTMLAttributes,n),0]:["ol",Ho(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[Zs({find:UA,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})]}}),$A=Xs.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",Ho(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),WA=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,qA=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,VA=Js.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",Ho(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[Gs({find:WA,type:this.type})]},addPasteRules(){return[ea({find:qA,type:this.type})]}}),KA=Xs.create({name:"text",group:"inline"}),GA=as.create({name:"starterKit",addExtensions(){var e,t,n,i,r,o,s,a,l,c,u,p,d,h,f,m,g,b;const v=[];return!1!==this.options.blockquote&&v.push(HN.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&v.push(KN.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&v.push(YN.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&v.push(uS.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&v.push(JN.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&v.push(pS.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&v.push(tA.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(cA.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(uA.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(pA.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(jA.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&v.push(LA.configure(null===(p=this.options)||void 0===p?void 0:p.horizontalRule)),!1!==this.options.italic&&v.push(BA.configure(null===(d=this.options)||void 0===d?void 0:d.italic)),!1!==this.options.listItem&&v.push(PA.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&v.push(HA.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&v.push($A.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&v.push(VA.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&v.push(KA.configure(null===(b=this.options)||void 0===b?void 0:b.text)),v}});var YA={exports:{}};function QA(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)||QA(n)})),e}YA.exports=QA,YA.exports.default=QA;class ZA{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function JA(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function XA(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 ej="</span>",tj=e=>!!e.scope||e.sublanguage&&e.language;class nj{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=JA(e)}openNode(e){if(!tj(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){tj(e)&&(this.buffer+=ej)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const ij=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class rj{constructor(){this.rootNode=ij(),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=ij({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=>{rj._collapse(e)})))}}class oj extends rj{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 nj(this,this.options).value()}finalize(){return!0}}function sj(e){return e?"string"==typeof e?e:e.source:null}function aj(e){return uj("(?=",e,")")}function lj(e){return uj("(?:",e,")*")}function cj(e){return uj("(?:",e,")?")}function uj(...e){const t=e.map((e=>sj(e))).join("");return t}function pj(...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=>sj(e))).join("|")+")";return n}function dj(e){return new RegExp(e.toString()+"|").exec("").length-1}const hj=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function fj(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let i=sj(e),r="";for(;i.length>0;){const e=hj.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)}const mj="[a-zA-Z]\\w*",gj="[a-zA-Z_]\\w*",bj="\\b\\d+(\\.\\d+)?",vj="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",yj="\\b(0b[01]+)",xj={begin:"\\\\[\\s\\S]",relevance:0},wj={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[xj]},_j={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[xj]},kj=function(e,t,n={}){const i=XA({scope:"comment",begin:e,end:t,contains:[]},n);i.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 r=pj("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 i.contains.push({begin:uj(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},Ej=kj("//","$"),Cj=kj("/\\*","\\*/"),Mj=kj("#","$"),Oj={scope:"number",begin:bj,relevance:0},Dj={scope:"number",begin:vj,relevance:0},Tj={scope:"number",begin:yj,relevance:0},Sj={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[xj,{begin:/\[/,end:/\]/,relevance:0,contains:[xj]}]}]},Nj={scope:"title",begin:mj,relevance:0},Aj={scope:"title",begin:gj,relevance:0},jj={begin:"\\.\\s*"+gj,relevance:0};var Lj=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:mj,UNDERSCORE_IDENT_RE:gj,NUMBER_RE:bj,C_NUMBER_RE:vj,BINARY_NUMBER_RE:yj,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=uj(t,/.*\b/,e.binary,/\b.*/)),XA({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:xj,APOS_STRING_MODE:wj,QUOTE_STRING_MODE:_j,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:kj,C_LINE_COMMENT_MODE:Ej,C_BLOCK_COMMENT_MODE:Cj,HASH_COMMENT_MODE:Mj,NUMBER_MODE:Oj,C_NUMBER_MODE:Dj,BINARY_NUMBER_MODE:Tj,REGEXP_MODE:Sj,TITLE_MODE:Nj,UNDERSCORE_TITLE_MODE:Aj,METHOD_GUARD:jj,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 zj(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Ij(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Rj(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=zj,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Fj(e,t){Array.isArray(e.illegal)&&(e.illegal=pj(...e.illegal))}function Bj(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 Pj(e,t){void 0===e.relevance&&(e.relevance=1)}const Uj=(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=uj(n.beforeMatch,aj(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Hj=["of","and","for","in","not","or","if","then","parent","list","value"],$j="keyword";function Wj(e,t,n=$j){const i=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((function(n){Object.assign(i,Wj(e[n],t,n))})),i;function r(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,qj(n[0],n[1])]}))}}function qj(e,t){return t?Number(t):function(e){return Hj.includes(e.toLowerCase())}(e)?0:1}const Vj={},Kj=e=>{console.error(e)},Gj=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Yj=(e,t)=>{Vj[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Vj[`${e}/${t}`]=!0)},Qj=new Error;function Zj(e,t,{key:n}){let i=0;const r=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+i]=r[e],o[e+i]=!0,i+=dj(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function Jj(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 Kj("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Qj;if("object"!=typeof e.beginScope||null===e.beginScope)throw Kj("beginScope must be object"),Qj;Zj(e,e.begin,{key:"beginScope"}),e.begin=fj(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Kj("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Qj;if("object"!=typeof e.endScope||null===e.endScope)throw Kj("endScope must be object"),Qj;Zj(e,e.end,{key:"endScope"}),e.end=fj(e.end,{joinWith:""})}}(e)}function Xj(e){function t(t,n){return new RegExp(sj(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+=dj(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(fj(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)),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{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=XA(e.classNameAliases||{}),function n(r,o){const s=r;if(r.isCompiled)return s;[Ij,Bj,Jj,Uj].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[Rj,Fj,Pj].forEach((e=>e(r,o))),r.isCompiled=!0;let a=null;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),a=r.keywords.$pattern,delete r.keywords.$pattern),a=a||/\w+/,r.keywords&&(r.keywords=Wj(r.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(r.begin||(r.begin=/\B|\b/),s.beginRe=t(s.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(s.endRe=t(s.end)),s.terminatorEnd=sj(s.end)||"",r.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(s.illegalRe=t(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return XA(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(eL(e))return XA(e,{starts:e.starts?XA(e.starts):null});if(Object.isFrozen(e))return XA(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){n(e,s)})),r.starts&&n(r.starts,o),s.matcher=function(e){const t=new i;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 eL(e){return!!e&&(e.endsWithParent||eL(e.starts))}var tL="11.6.0";class nL extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const iL=JA,rL=XA,oL=Symbol("nomatch"),sL=7;var aL=function(e){const t=Object.create(null),n=Object.create(null),i=[];let r=!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:oj};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let i="",r="";"object"==typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(Yj("10.7.0","highlight(lang, code, ...args) has been deprecated."),Yj("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const o={code:i,language:r};v("before:highlight",o);const s=o.result?o.result:u(o.language,o.code,n);return s.code=o.code,v("after:highlight",s),s}function u(e,n,i,s){const l=Object.create(null);function c(){if(!E.keywords)return void M.addText(O);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(O),n="";for(;t;){n+=O.substring(e,t.index);const r=w.case_insensitive?t[0].toLowerCase():t[0],o=(i=r,E.keywords[i]);if(o){const[e,i]=o;if(M.addText(n),n="",l[r]=(l[r]||0)+1,l[r]<=sL&&(D+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(O)}var i;n+=O.substring(e),M.addText(n)}function d(){null!=E.subLanguage?function(){if(""===O)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void M.addText(O);e=u(E.subLanguage,O,!0,C[E.subLanguage]),C[E.subLanguage]=e._top}else e=p(O,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(D+=e.relevance),M.addSublanguage(e._emitter,e.language)}():c(),O=""}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],r=t[n];i?M.addKeyword(r,i):(O=r,c(),O=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&M.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(M.addKeyword(O,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),O=""):e.beginScope._multi&&(h(e.beginScope,t),O="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,t,n){let i=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(i){if(e["on:end"]){const n=new ZA(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===E.matcher.regexIndex?(O+=e[0],1):(N=!0,0)}function v(e){const t=e[0],i=n.substring(e.index),r=g(E,e,i);if(!r)return oL;const o=E;E.endScope&&E.endScope._wrap?(d(),M.addKeyword(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),h(E.endScope,e)):o.skip?O+=t:(o.returnEnd||o.excludeEnd||(O+=t),d(),o.excludeEnd&&(O=t));do{E.scope&&M.closeNode(),E.skip||E.subLanguage||(D+=E.relevance),E=E.parent}while(E!==r.parent);return r.starts&&f(r.starts,e),o.returnEnd?0:t.length}let y={};function x(t,o){const s=o&&o[0];if(O+=t,null==s)return d(),0;if("begin"===y.type&&"end"===o.type&&y.index===o.index&&""===s){if(O+=n.slice(o.index,o.index+1),!r){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,i=new ZA(n),r=[n.__beforeBegin,n["on:begin"]];for(const n of r)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?O+=t:(n.excludeBegin&&(O+=t),d(),n.returnBegin||n.excludeBegin||(O=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===o.type){const e=v(o);if(e!==oL)return e}if("illegal"===o.type&&""===s)return 1;if(S>1e5&&S>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return O+=s,s.length}const w=m(e);if(!w)throw Kj(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const _=Xj(w);let k="",E=s||_;const C={},M=new a.__emitter(a);!function(){const e=[];for(let t=E;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>M.openNode(e)))}();let O="",D=0,T=0,S=0,N=!1;try{for(E.matcher.considerAll();;){S++,N?N=!1:E.matcher.considerAll(),E.matcher.lastIndex=T;const e=E.matcher.exec(n);if(!e)break;const t=x(n.substring(T,e.index),e);T=e.index+t}return x(n.substring(T)),M.closeAllNodes(),M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:D,illegal:!1,_emitter:M,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:iL(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:k},_emitter:M};if(r)return{language:e,value:iL(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:E};throw t}}function p(e,n){n=n||a.languages||Object.keys(t);const i=function(e){const t={value:iL(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),r=n.filter(m).filter(b).map((t=>u(t,e,!1)));r.unshift(i);const o=r.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,p=l;return p.secondBest=c,p}function d(e){let t=null;const i=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||(Gj(o.replace("{}",n[1])),Gj("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(i))return;if(v("before:highlightElement",{el:e,language:i}),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 nL("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const r=t.textContent,s=i?c(r,{language:i,ignoreIllegals:!0}):p(r);e.innerHTML=s.value,function(e,t,i){const r=t&&n[t]||i;e.classList.add("hljs"),e.classList.add(`language-${r}`)}(e,i,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}),v("after:highlightElement",{el:e,result:s,text:r})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(d)}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 v(e,t){const n=e;i.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:p,highlightAll:f,highlightElement:d,highlightBlock:function(e){return Yj("10.7.0","highlightBlock will be removed entirely in v12.0"),Yj("10.7.0","Please use highlightElement now."),d(e)},configure:function(e){a=rL(a,e)},initHighlighting:()=>{f(),Yj("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),Yj("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,i){let o=null;try{o=i(e)}catch(e){if(Kj("Language definition for '{}' could not be registered.".replace("{}",n)),!r)throw e;Kj(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=i.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:rL,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),i.push(e)}}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=tL,e.regex={concat:uj,lookahead:aj,either:pj,optional:cj,anyNumberOfTimes:lj};for(const e in Lj)"object"==typeof Lj[e]&&YA.exports(Lj[e]);return Object.assign(e,Lj),e}({}),lL=aL;aL.HighlightJS=aL,aL.default=aL;var cL=lL;function uL(e,t=[]){return e.map((e=>{const n=[...t,...e.properties?e.properties.className:[]];return e.children?uL(e.children,n):{text:e.value,classes:n}})).flat()}function pL(e){return e.value||e.children||[]}function dL({doc:e,name:t,lowlight:n,defaultLanguage:i}){const r=[];return Os(e,(e=>e.type.name===t)).forEach((e=>{let t=e.pos+1;const o=e.node.attrs.language||i,s=n.listLanguages();var a;uL(o&&(s.includes(o)||(a=o,Boolean(cL.getLanguage(a))))?pL(n.highlight(o,e.node.textContent)):pL(n.highlightAuto(e.node.textContent))).forEach((e=>{const n=t+e.text.length;if(e.classes.length){const i=Ir.inline(t,n,{class:e.classes.join(" ")});r.push(i)}t=n}))})),Br.create(e,r)}function hL({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 i=new Zt({key:new en("lowlight"),state:{init:(i,{doc:r})=>dL({doc:r,name:e,lowlight:t,defaultLanguage:n}),apply:(i,r,o,s)=>{const a=o.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=Os(o.doc,(t=>t.type.name===e)),u=Os(s.doc,(t=>t.type.name===e));return i.docChanged&&([a,l].includes(e)||u.length!==c.length||i.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)))))?dL({doc:i.doc,name:e,lowlight:t,defaultLanguage:n}):r.map(i.mapping,i.doc)}},props:{decorations:e=>i.getState(e)}});return i}const fL=JN.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))||[],hL({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const mL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],gL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],bL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],vL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],yL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();var xL="[0-9](_*[0-9])*",wL=`\\.(${xL})`,_L="[0-9a-fA-F](_*[0-9a-fA-F])*",kL={className:"number",variants:[{begin:`(\\b(${xL})((${wL})|\\.)?|(${wL}))`+`[eE][+-]?(${xL})[fFdD]?\\b`},{begin:`\\b(${xL})((${wL})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${wL})[fFdD]?\\b`},{begin:`\\b(${xL})[fFdD]\\b`},{begin:`\\b0[xX]((${_L})\\.?|(${_L})?\\.(${_L}))`+`[pP][+-]?(${xL})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${_L})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function EL(e,t,n){return-1===n?"":e.replace(t,(i=>EL(e,t,n-1)))}const CL="[A-Za-z$_][0-9A-Za-z$_]*",ML=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],OL=["true","false","null","undefined","NaN","Infinity"],DL=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],TL=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],SL=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],NL=["arguments","this","super","console","window","document","localStorage","module","global"],AL=[].concat(SL,DL,TL);var jL="[0-9](_*[0-9])*",LL=`\\.(${jL})`,zL="[0-9a-fA-F](_*[0-9a-fA-F])*",IL={className:"number",variants:[{begin:`(\\b(${jL})((${LL})|\\.)?|(${LL}))`+`[eE][+-]?(${jL})[fFdD]?\\b`},{begin:`\\b(${jL})((${LL})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${LL})[fFdD]?\\b`},{begin:`\\b(${jL})[fFdD]\\b`},{begin:`\\b0[xX]((${zL})\\.?|(${zL})?\\.(${zL}))`+`[pP][+-]?(${jL})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${zL})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const RL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],FL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],BL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],PL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],UL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),HL=BL.concat(PL);const $L=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],WL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],qL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],VL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],KL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function GL(e){return e?"string"==typeof e?e:e.source:null}function YL(e){return QL("(?=",e,")")}function QL(...e){const t=e.map((e=>GL(e))).join("");return t}function ZL(...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=>GL(e))).join("|")+")";return n}const JL=e=>QL(/\b/,e,/\w$/.test(e)?/\b/:/\B/),XL=["Protocol","Type"].map(JL),ez=["init","self"].map(JL),tz=["Any","Self"],nz=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],iz=["false","nil","true"],rz=["assignment","associativity","higherThan","left","lowerThan","none","right"],oz=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],sz=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],az=ZL(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),lz=ZL(az,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),cz=QL(az,lz,"*"),uz=ZL(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),pz=ZL(uz,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),dz=QL(uz,pz,"*"),hz=QL(/[A-Z]/,pz,"*"),fz=["autoclosure",QL(/convention\(/,ZL("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",QL(/objc\(/,dz,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],mz=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const gz="[A-Za-z$_][0-9A-Za-z$_]*",bz=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],vz=["true","false","null","undefined","NaN","Infinity"],yz=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],xz=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wz=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],_z=["arguments","this","super","console","window","document","localStorage","module","global"],kz=[].concat(wz,yz,xz);function Ez(e){const t=e.regex,n=gz,i="<>",r="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let r;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(r=e.input.substring(n).match(/^\s+extends\s+/))&&0===r.index&&t.ignoreMatch()}},s={$pattern:gz,keyword:bz,literal:vz,built_in:kz,"variable.language":_z},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,u={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},m={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,f,u];p.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,p.contains),v=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),y={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...yz,...xz]}},_={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/};const k={match:t.concat(/\b/,(E=[...wz,"super"],t.concat("(?!",E.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var E;const C={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},M={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},O="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(O)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:w},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,f,m,u,w,{className:"attr",begin:n+t.lookahead(":"),relevance:0},D,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{className:"function",begin:O,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:r},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},C,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,M,{match:/\$[(.]/}]}}var Cz={exports:{}};function Mz(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)||Mz(n)})),e}Cz.exports=Mz,Cz.exports.default=Mz;class Oz{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Dz(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Tz(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 Sz="</span>",Nz=e=>!!e.scope||e.sublanguage&&e.language;class Az{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Dz(e)}openNode(e){if(!Nz(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){Nz(e)&&(this.buffer+=Sz)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const jz=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Lz{constructor(){this.rootNode=jz(),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=jz({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=>{Lz._collapse(e)})))}}class zz extends Lz{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 Az(this,this.options).value()}finalize(){return!0}}function Iz(e){return e?"string"==typeof e?e:e.source:null}function Rz(e){return Pz("(?=",e,")")}function Fz(e){return Pz("(?:",e,")*")}function Bz(e){return Pz("(?:",e,")?")}function Pz(...e){const t=e.map((e=>Iz(e))).join("");return t}function Uz(...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=>Iz(e))).join("|")+")";return n}function Hz(e){return new RegExp(e.toString()+"|").exec("").length-1}const $z=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Wz(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let i=Iz(e),r="";for(;i.length>0;){const e=$z.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)}const qz="[a-zA-Z]\\w*",Vz="[a-zA-Z_]\\w*",Kz="\\b\\d+(\\.\\d+)?",Gz="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Yz="\\b(0b[01]+)",Qz={begin:"\\\\[\\s\\S]",relevance:0},Zz={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Qz]},Jz={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Qz]},Xz=function(e,t,n={}){const i=Tz({scope:"comment",begin:e,end:t,contains:[]},n);i.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 r=Uz("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 i.contains.push({begin:Pz(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},eI=Xz("//","$"),tI=Xz("/\\*","\\*/"),nI=Xz("#","$"),iI={scope:"number",begin:Kz,relevance:0},rI={scope:"number",begin:Gz,relevance:0},oI={scope:"number",begin:Yz,relevance:0},sI={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Qz,{begin:/\[/,end:/\]/,relevance:0,contains:[Qz]}]}]},aI={scope:"title",begin:qz,relevance:0},lI={scope:"title",begin:Vz,relevance:0},cI={begin:"\\.\\s*"+Vz,relevance:0};var uI=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:qz,UNDERSCORE_IDENT_RE:Vz,NUMBER_RE:Kz,C_NUMBER_RE:Gz,BINARY_NUMBER_RE:Yz,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Pz(t,/.*\b/,e.binary,/\b.*/)),Tz({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:Qz,APOS_STRING_MODE:Zz,QUOTE_STRING_MODE:Jz,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:Xz,C_LINE_COMMENT_MODE:eI,C_BLOCK_COMMENT_MODE:tI,HASH_COMMENT_MODE:nI,NUMBER_MODE:iI,C_NUMBER_MODE:rI,BINARY_NUMBER_MODE:oI,REGEXP_MODE:sI,TITLE_MODE:aI,UNDERSCORE_TITLE_MODE:lI,METHOD_GUARD:cI,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 pI(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function dI(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function hI(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=pI,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function fI(e,t){Array.isArray(e.illegal)&&(e.illegal=Uz(...e.illegal))}function mI(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 gI(e,t){void 0===e.relevance&&(e.relevance=1)}const bI=(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=Pz(n.beforeMatch,Rz(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},vI=["of","and","for","in","not","or","if","then","parent","list","value"],yI="keyword";function xI(e,t,n=yI){const i=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((function(n){Object.assign(i,xI(e[n],t,n))})),i;function r(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,wI(n[0],n[1])]}))}}function wI(e,t){return t?Number(t):function(e){return vI.includes(e.toLowerCase())}(e)?0:1}const _I={},kI=e=>{console.error(e)},EI=(e,...t)=>{console.log(`WARN: ${e}`,...t)},CI=(e,t)=>{_I[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),_I[`${e}/${t}`]=!0)},MI=new Error;function OI(e,t,{key:n}){let i=0;const r=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+i]=r[e],o[e+i]=!0,i+=Hz(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function DI(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 kI("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),MI;if("object"!=typeof e.beginScope||null===e.beginScope)throw kI("beginScope must be object"),MI;OI(e,e.begin,{key:"beginScope"}),e.begin=Wz(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw kI("skip, excludeEnd, returnEnd not compatible with endScope: {}"),MI;if("object"!=typeof e.endScope||null===e.endScope)throw kI("endScope must be object"),MI;OI(e,e.end,{key:"endScope"}),e.end=Wz(e.end,{joinWith:""})}}(e)}function TI(e){function t(t,n){return new RegExp(Iz(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+=Hz(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(Wz(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)),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{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=Tz(e.classNameAliases||{}),function n(r,o){const s=r;if(r.isCompiled)return s;[dI,mI,DI,bI].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[hI,fI,gI].forEach((e=>e(r,o))),r.isCompiled=!0;let a=null;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),a=r.keywords.$pattern,delete r.keywords.$pattern),a=a||/\w+/,r.keywords&&(r.keywords=xI(r.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(r.begin||(r.begin=/\B|\b/),s.beginRe=t(s.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(s.endRe=t(s.end)),s.terminatorEnd=Iz(s.end)||"",r.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(s.illegalRe=t(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return Tz(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(SI(e))return Tz(e,{starts:e.starts?Tz(e.starts):null});if(Object.isFrozen(e))return Tz(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){n(e,s)})),r.starts&&n(r.starts,o),s.matcher=function(e){const t=new i;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 SI(e){return!!e&&(e.endsWithParent||SI(e.starts))}var NI="11.6.0";class AI extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const jI=Dz,LI=Tz,zI=Symbol("nomatch"),II=7;var RI=function(e){const t=Object.create(null),n=Object.create(null),i=[];let r=!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:zz};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let i="",r="";"object"==typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(CI("10.7.0","highlight(lang, code, ...args) has been deprecated."),CI("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const o={code:i,language:r};v("before:highlight",o);const s=o.result?o.result:u(o.language,o.code,n);return s.code=o.code,v("after:highlight",s),s}function u(e,n,i,s){const l=Object.create(null);function c(){if(!E.keywords)return void M.addText(O);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(O),n="";for(;t;){n+=O.substring(e,t.index);const r=w.case_insensitive?t[0].toLowerCase():t[0],o=(i=r,E.keywords[i]);if(o){const[e,i]=o;if(M.addText(n),n="",l[r]=(l[r]||0)+1,l[r]<=II&&(D+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(O)}var i;n+=O.substring(e),M.addText(n)}function d(){null!=E.subLanguage?function(){if(""===O)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void M.addText(O);e=u(E.subLanguage,O,!0,C[E.subLanguage]),C[E.subLanguage]=e._top}else e=p(O,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(D+=e.relevance),M.addSublanguage(e._emitter,e.language)}():c(),O=""}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],r=t[n];i?M.addKeyword(r,i):(O=r,c(),O=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&M.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(M.addKeyword(O,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),O=""):e.beginScope._multi&&(h(e.beginScope,t),O="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,t,n){let i=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(i){if(e["on:end"]){const n=new Oz(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===E.matcher.regexIndex?(O+=e[0],1):(N=!0,0)}function v(e){const t=e[0],i=n.substring(e.index),r=g(E,e,i);if(!r)return zI;const o=E;E.endScope&&E.endScope._wrap?(d(),M.addKeyword(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),h(E.endScope,e)):o.skip?O+=t:(o.returnEnd||o.excludeEnd||(O+=t),d(),o.excludeEnd&&(O=t));do{E.scope&&M.closeNode(),E.skip||E.subLanguage||(D+=E.relevance),E=E.parent}while(E!==r.parent);return r.starts&&f(r.starts,e),o.returnEnd?0:t.length}let y={};function x(t,o){const s=o&&o[0];if(O+=t,null==s)return d(),0;if("begin"===y.type&&"end"===o.type&&y.index===o.index&&""===s){if(O+=n.slice(o.index,o.index+1),!r){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,i=new Oz(n),r=[n.__beforeBegin,n["on:begin"]];for(const n of r)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?O+=t:(n.excludeBegin&&(O+=t),d(),n.returnBegin||n.excludeBegin||(O=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===o.type){const e=v(o);if(e!==zI)return e}if("illegal"===o.type&&""===s)return 1;if(S>1e5&&S>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return O+=s,s.length}const w=m(e);if(!w)throw kI(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const _=TI(w);let k="",E=s||_;const C={},M=new a.__emitter(a);!function(){const e=[];for(let t=E;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>M.openNode(e)))}();let O="",D=0,T=0,S=0,N=!1;try{for(E.matcher.considerAll();;){S++,N?N=!1:E.matcher.considerAll(),E.matcher.lastIndex=T;const e=E.matcher.exec(n);if(!e)break;const t=x(n.substring(T,e.index),e);T=e.index+t}return x(n.substring(T)),M.closeAllNodes(),M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:D,illegal:!1,_emitter:M,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:jI(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:k},_emitter:M};if(r)return{language:e,value:jI(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:E};throw t}}function p(e,n){n=n||a.languages||Object.keys(t);const i=function(e){const t={value:jI(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),r=n.filter(m).filter(b).map((t=>u(t,e,!1)));r.unshift(i);const o=r.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,p=l;return p.secondBest=c,p}function d(e){let t=null;const i=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||(EI(o.replace("{}",n[1])),EI("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(i))return;if(v("before:highlightElement",{el:e,language:i}),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 AI("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const r=t.textContent,s=i?c(r,{language:i,ignoreIllegals:!0}):p(r);e.innerHTML=s.value,function(e,t,i){const r=t&&n[t]||i;e.classList.add("hljs"),e.classList.add(`language-${r}`)}(e,i,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}),v("after:highlightElement",{el:e,result:s,text:r})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(d)}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 v(e,t){const n=e;i.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:p,highlightAll:f,highlightElement:d,highlightBlock:function(e){return CI("10.7.0","highlightBlock will be removed entirely in v12.0"),CI("10.7.0","Please use highlightElement now."),d(e)},configure:function(e){a=LI(a,e)},initHighlighting:()=>{f(),CI("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),CI("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,i){let o=null;try{o=i(e)}catch(e){if(kI("Language definition for '{}' could not be registered.".replace("{}",n)),!r)throw e;kI(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=i.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:LI,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),i.push(e)}}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=NI,e.regex={concat:Pz,lookahead:Rz,either:Uz,optional:Bz,anyNumberOfTimes:Fz};for(const e in uI)"object"==typeof uI[e]&&Cz.exports(uI[e]);return Object.assign(e,uI),e}({}),FI=RI;RI.HighlightJS=RI,RI.default=RI;var BI={exports:{}};!function(e){!function(){var t;function n(e){for(var t,n,i,r,o=1,s=[].slice.call(arguments),a=0,l=e.length,c="",u=!1,p=!1,d=function(){return s[o++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<l;++a)if(t=e[a],u)switch(u=!1,"."==t?(p=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(p=!0,t=e[a+=2]):p=!0,r=h(),t){case"b":c+=parseInt(d(),10).toString(2);break;case"c":c+="string"==typeof(n=d())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(d(),10);break;case"f":i=String(parseFloat(d()).toFixed(r||6)),c+=p?i:i.replace(/^0/,"");break;case"j":c+=JSON.stringify(d());break;case"o":c+="0"+parseInt(d(),10).toString(8);break;case"s":c+=d();break;case"x":c+="0x"+parseInt(d(),10).toString(16);break;case"X":c+="0x"+parseInt(d(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()}(BI);var PI=BI.exports;const UI=Object.assign(HI(Error),{eval:HI(EvalError),range:HI(RangeError),reference:HI(ReferenceError),syntax:HI(SyntaxError),type:HI(TypeError),uri:HI(URIError)});function HI(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){const i=t?PI(t,...n):t;return new e(i)}}const $I={}.hasOwnProperty,WI="hljs-";function qI(e,t,n={}){let i=n.prefix;if("string"!=typeof e)throw UI("Expected `string` for name, got `%s`",e);if(!FI.getLanguage(e))throw UI("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw UI("Expected `string` for value, got `%s`",t);null==i&&(i=WI),FI.configure({__emitter:VI,classPrefix:i});const r=FI.highlight(t,{language:e,ignoreIllegals:!0});if(FI.configure({}),r.errorRaised)throw r.errorRaised;return r._emitter.root.data.language=r.language,r._emitter.root.data.relevance=r.relevance,r._emitter.root}class VI{constructor(e){this.options=e,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}addKeyword(e,t){this.openNode(t),this.addText(e),this.closeNode()}addSublanguage(e,t){const n=this.stack[this.stack.length-1],i=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):n.children.push(...i)}openNode(e){const t=e.split(".").map(((e,t)=>t?e+"_".repeat(t):this.options.classPrefix+e)),n={type:"element",tagName:"span",properties:{className:t},children:[]};this.stack[this.stack.length-1].children.push(n),this.stack.push(n)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const KI={highlight:qI,highlightAuto:function(e,t={}){const n=t.subset||FI.listLanguages();t.prefix;let i=-1,r={type:"root",data:{language:null,relevance:0},children:[]};if("string"!=typeof e)throw UI("Expected `string` for value, got `%s`",e);for(;++i<n.length;){const o=n[i];if(!FI.getLanguage(o))continue;const s=qI(o,e,t);s.data.relevance>r.data.relevance&&(r=s)}return r},registerLanguage:function(e,t){FI.registerLanguage(e,t)},registered:function(e){return Boolean(FI.getLanguage(e))},listLanguages:function(){return FI.listLanguages()},registerAlias:function(e,t){if("string"==typeof e)FI.registerAliases(t,{languageName:e});else{let t;for(t in e)$I.call(e,t)&&FI.registerAliases(e[t],{languageName:t})}}};KI.registerLanguage("arduino",(function(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:f.concat([{begin:/\(/,end:/\)/,keywords:d,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:p,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,h,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),i=n.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),KI.registerLanguage("bash",(function(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(s);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},l=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,o,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),KI.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",d={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream "+"auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set "+"unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos "+"asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp "+"fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper "+"isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow "+"printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp "+"strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan "+"vfprintf vprintf vsprintf endl initializer_list unique_ptr"},h=[c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:h.concat([{begin:/\(/,end:/\)/,keywords:d,contains:h.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(u,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:d,disableAutodetect:!0,illegal:"</",contains:[].concat(f,m,h,[c,{begin:e.IDENT_RE+"::",keywords:d},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:d}}})),KI.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:f.concat([{begin:/\(/,end:/\)/,keywords:d,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:p,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,h,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),KI.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},r={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(r,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},u=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE],a.contains=[u,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const p={variants:[c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},p,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,d],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[p,i,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},f]}})),KI.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),i=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+bL.join("|")+")"},{begin:":(:)?("+vL.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+yL.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...i,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...i,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:gL.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...i,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+mL.join("|")+")\\b"}]}})),KI.registerLanguage("diff",(function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}})),KI.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}})),KI.registerLanguage("graphql",(function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}})),KI.registerLanguage("ini",(function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},i=e.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const r={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[i,o,r,s,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[i,a,o,r,s,n]}}]}})),KI.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+EL("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),r={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:r,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:r,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,kL,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},kL,o]}})),KI.registerLanguage("javascript",(function(e){const t=e.regex,n=CL,i="<>",r="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let r;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(r=e.input.substring(n).match(/^\s+extends\s+/))&&0===r.index&&t.ignoreMatch()}},s={$pattern:CL,keyword:ML,literal:OL,built_in:AL,"variable.language":NL},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,u={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},m={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,f,u];p.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,p.contains),v=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),y={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...DL,...TL]}},_={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},k={match:t.concat(/\b/,(E=[...SL,"super"],t.concat("(?!",E.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var E;const C={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},M={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},O="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(O)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:w},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,f,m,u,w,{className:"attr",begin:n+t.lookahead(":"),relevance:0},D,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{className:"function",begin:O,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:r},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},C,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,M,{match:/\$[(.]/}]}})),KI.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),KI.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline "+"crossinline dynamic final enum if else do while for when throw try catch finally "+"import package is in fun override companion reified inline lateinit init "+"interface annotation data sealed internal infix operator out by constructor super "+"tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},r={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[r,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,r,i]}]};i.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},l=IL,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},p=u;return p.variants[1].contains=[u],u.variants[1].contains=[p],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,a,o,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),KI.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=HL,i="[\\w-]+",r="("+i+"|@\\{"+i+"\\})",o=[],s=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},l=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:FL.join(" ")},u={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,u,l("variable","@@?"+i,10),l("variable","@\\{"+i+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const p=s.concat({begin:/\{/,end:/\}/,contains:o}),d={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:r+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+UL.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:p}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,l("keyword","all\\b"),l("variable","@\\{"+i+"\\}"),{begin:"\\b("+RL.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,l("selector-tag",r,0),l("selector-id","#"+r),l("selector-class","\\."+r,0),l("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+BL.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PL.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:p},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:i+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,m,b,h,g,d,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),KI.registerLanguage("lua",(function(e){const t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},r=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len "+"__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert "+"collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring "+"module next pairs pcall print rawequal rawget rawset require select setfenv "+"setmetatable tonumber tostring type unpack xpcall arg self "+"coroutine resume yield status wrap create running debug getupvalue "+"debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv "+"io lines write close flush open output type read stderr stdin input stdout popen tmpfile "+"math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan "+"os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall "+"string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower "+"table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}})),KI.registerLanguage("makefile",(function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},i={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort "+"word wordlist firstword lastword dir notdir suffix basename "+"addsuffix addprefix join wildcard realpath abspath error warning "+"shell origin flavor foreach if or and call eval file value"},contains:[t]},r={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif "+"include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,i,r,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}})),KI.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},r={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]},o=e.inherit(i,{contains:[]}),s=e.inherit(r,{contains:[]});i.contains.push(s),r.contains.push(o);let a=[t,n];return[i,r,o,s].forEach((e=>{e.contains=e.contains.concat(a)})),a=a.concat(i,r),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,r,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),KI.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),KI.registerLanguage("perl",(function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},r={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,r,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,i,r="\\1")=>{const o="\\1"===r?r:t.concat(r,i);return t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,r,n)},u=(e,i,r)=>t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,r,n),p=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",t.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:u("(?:m|qr)?",/\//,/\//)},{begin:u("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:u("m|qr",/\(/,/\)/)},{begin:u("m|qr",/\[/,/\]/)},{begin:u("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return r.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}})),KI.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),r=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+i},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),a,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(s)})]},u={scope:"number",variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},p=["false","null","true"],d=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],f={keyword:d,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(p),built_in:h},m=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",m(h).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},b=t.concat(i,"\\b(?!\\()"),v={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{1:"title.class",3:"variable.constant"}},{match:[r,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},y={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},x={relevance:0,begin:/\(/,end:/\)/,keywords:f,contains:[y,o,v,e.C_BLOCK_COMMENT_MODE,c,u,g]},w={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",m(d).join("\\b|"),"|",m(h).join("\\b|"),"\\b)"),i,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[x]};x.contains.push(w);const _=[y,v,e.C_BLOCK_COMMENT_MODE,c,u,g];return{case_insensitive:!1,keywords:f,contains:[{begin:t.concat(/#\[\s*/,r),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:p,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:p,keyword:["new","array"]},contains:["self",..._]},..._,{scope:"meta",match:r}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,w,v,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",o,v,e.C_BLOCK_COMMENT_MODE,c,u]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,u]}})),KI.registerLanguage("php-template",(function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),KI.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),KI.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],r={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:r,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",u=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,p=`\\b|${i.join("|")}`,d={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${u}))[eE][+-]?(${c})[jJ]?(?=${p})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${c})[jJ](?=${p})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:r,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:["self",o,d,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,d,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:r,illegal:/(<\/|->|\?)|=>/,contains:[o,d,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[d,f,l]}]}})),KI.registerLanguage("python-repl",(function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),KI.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),r=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 "+"NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F "+"abs acos acosh all any anyNA Arg as.call as.character "+"as.complex as.double as.environment as.integer as.logical "+"as.null.default as.numeric as.raw asin asinh atan atanh attr "+"attributes baseenv browser c call ceiling class Conj cos cosh "+"cospi cummax cummin cumprod cumsum digamma dim dimnames "+"emptyenv exp expression floor forceAndCall gamma gc.time "+"globalenv Im interactive invisible is.array is.atomic is.call "+"is.character is.complex is.double is.environment is.expression "+"is.finite is.function is.infinite is.integer is.language "+"is.list is.logical is.matrix is.na is.name is.nan is.null "+"is.numeric is.object is.pairlist is.raw is.recursive is.single "+"is.symbol lazyLoadDBfetch length lgamma list log max min "+"missing Mod names nargs nzchar oldClass on.exit pos.to.env "+"proc.time prod quote range Re rep retracemem return round "+"seq_along seq_len seq.int sign signif sin sinh sinpi sqrt "+"standardGeneric substitute sum switch tan tanh tanpi tracemem "+"trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[r,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[o,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:r},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),KI.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(i,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__"],"variable.language":["self","super"],keyword:["alias","and","attr_accessor","attr_reader","attr_writer","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","include","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield"],built_in:["proc","lambda"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},p="[0-9](_?[0-9])*",d={className:"number",relevance:0,variants:[{begin:`\\b(${"[1-9](_?[0-9])*|0"})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},f=[u,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/class\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{relevance:0,match:[r,/\.new[ (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},d,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])"+`(?![A-Za-z])(?![@$?'])`},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,l),relevance:0}].concat(a,l);c.contains=f,h.contains=f;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:f}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(f)}})),KI.registerLanguage("rust",(function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",r=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:r},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+i}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:r,type:o}},{className:"punctuation",begin:"->"},n]}})),KI.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=VL,i=qL,r="@[a-z-]+",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+$L.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+KL.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:r,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:WL.join(" ")},contains:[{begin:r,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),KI.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),KI.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),i=["true","false","unknown"],r=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],a=o,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),c={begin:t.concat(/\b/,t.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const i=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:i(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:i,type:r,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:i,type:r}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),KI.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],r={match:[/\./,ZL(...XL,...ez)],className:{2:"keyword"}},o={match:QL(/\./,ZL(...nz)),relevance:0},s=nz.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:ZL(...nz.filter((e=>"string"!=typeof e)).concat(tz).map(JL),...ez)}]},l={$pattern:ZL(/\b\w+/,/#\w+/),keyword:s.concat(oz),literal:iz},c=[r,o,a],u=[{match:QL(/\./,ZL(...sz)),relevance:0},{className:"built_in",match:QL(/\b/,ZL(...sz),/(?=\()/)}],p={match:/->/,relevance:0},d=[p,{className:"operator",relevance:0,variants:[{match:cz},{match:`\\.(\\.|${lz})+`}]}],h="([0-9]_*)+",f="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${h})(\\.(${h}))?`+`([eE][+-]?(${h}))?\\b`},{match:`\\b0x(${f})(\\.(${f}))?`+`([pP][+-]?(${h}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:QL(/\\/,e,/[0\\tnr"']/)},{match:QL(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:QL(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e="")=>({className:"subst",label:"interpol",begin:QL(/\\/,e,/\(/),end:/\)/}),y=(e="")=>({begin:QL(e,/"""/),end:QL(/"""/,e),contains:[g(e),b(e),v(e)]}),x=(e="")=>({begin:QL(e,/"/),end:QL(/"/,e),contains:[g(e),v(e)]}),w={className:"string",variants:[y(),y("#"),y("##"),y("###"),x(),x("#"),x("##"),x("###")]},_={match:QL(/`/,dz,/`/)},k=[_,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${pz}+`}],E=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:mz,contains:[...d,m,w]}]}},{className:"keyword",match:QL(/@/,ZL(...fz))},{className:"meta",match:QL(/@/,dz)}],C={match:YL(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:QL(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,pz,"+")},{className:"type",match:hz,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:QL(/\s+&\s+/,YL(hz)),relevance:0}]},M={begin:/</,end:/>/,keywords:l,contains:[...i,...c,...E,p,C]};C.contains.push(M);const O={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:QL(dz,/\s*:/),keywords:"_|0",relevance:0},...i,...c,...u,...d,m,w,...k,...E,C]},D={begin:/</,end:/>/,contains:[...i,C]},T={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:ZL(YL(QL(dz,/\s*:/)),YL(QL(dz,/\s+/,dz,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:dz}]},...i,...c,...d,m,w,...E,C,O],endsParent:!0,illegal:/["']/},S={match:[/func/,/\s+/,ZL(_.match,dz,cz)],className:{1:"keyword",3:"title.function"},contains:[D,T,t],illegal:[/\[/,/%/]},N={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[D,T,t],illegal:/\[|%/},A={match:[/operator/,/\s+/,cz],className:{1:"keyword",3:"title"}},j={begin:[/precedencegroup/,/\s+/,hz],className:{1:"keyword",3:"title"},contains:[C],keywords:[...rz,...iz],end:/}/};for(const e of w.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const n=[...c,...u,...d,m,w,...k];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...i,S,N,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},A,j,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},...c,...u,...d,m,w,...k,...E,C,O]}})),KI.registerLanguage("typescript",(function(e){const t=Ez(e),n=gz,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[t.exports.CLASS_REFERENCE]},s={$pattern:gz,keyword:bz.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:vz,built_in:kz.concat(i),"variable.language":_z},a={className:"meta",begin:"@"+n},l=(e,t,n)=>{const i=e.contains.findIndex((e=>e.label===t));if(-1===i)throw new Error("can not find mode to replace");e.contains.splice(i,1,n)};Object.assign(t.keywords,s),t.exports.PARAMS_CONTAINS.push(a),t.contains=t.contains.concat([a,r,o]),l(t,"shebang",e.SHEBANG()),l(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});const c=t.contains.find((e=>"func.def"===e.label));return c.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t})),KI.registerLanguage("vbnet",(function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,r=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,n),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,r,/ *#/)},{begin:t.concat(/# */,t.either(i,n),/ +/,t.either(r,o),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval "+"call case catch class compare const continue custom declare default delegate dim distinct do "+"each equals else elseif end enum erase error event exit explicit finally for friend from function "+"get global goto group handles if implements imports in inherits interface into iterator "+"join key let lib loop me mid module mustinherit mustoverride mybase myclass "+"namespace narrowing new next notinheritable notoverridable "+"of off on operator option optional order overloads overridable overrides "+"paramarray partial preserve private property protected public "+"raiseevent readonly redim removehandler resume return "+"select set shadows shared skip static step stop structure strict sub synclock "+"take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor "+"cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}})),KI.registerLanguage("wasm",(function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}})),KI.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(r,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,o,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),KI.registerLanguage("yaml",(function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},r=e.inherit(i,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},o,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},a,l,i],u=[...c];return u.pop(),u.push(r),s.contains=u,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));const GI=()=>t.createElement(Oc,{"data-cy":"neeto-editor-code-block"},t.createElement("pre",null,t.createElement(Mc,{as:"code"})));var YI=fL.extend({addNodeView:()=>new Sc(GI)}).configure({lowlight:KI});const QI={code:{},underline:{},highlight:{},codeBlock:{},figCaption:{},embeds:{},link:{},emojiSuggestion:{},emojiPicker:{},customCommands:{},characterCount:{},focus:{mode:"shallowest"},starterKit:{document:!1,codeBlock:!1,code:!1},placeholder:{}};var ZI=as.create({name:"paste-unformatted",addCommands:()=>({pasteUnformatted:()=>async e=>{let{editor:t}=e;const n=await navigator.clipboard.readText();t.commands.insertContent(n)}})}),JI=Xs.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",Ho(this.options.HTMLAttributes,{...t,class:"video-wrapper"})]},addCommands(){return{setExternalVideo:e=>t=>{let{commands:n}=t;return n.insertContent({type:this.name,attrs:e})}}}});const XI=new en("suggestion");function eR({pluginKey:e=XI,editor:t,char:n="@",allowSpaces:i=!1,allowedPrefixes:r=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:p=(()=>!0)}){let d;const h=null==u?void 0:u(),f=new Zt({key:e,view(){return{update:async(e,n)=>{var i,r,o,s,a,u,p;const f=null===(i=this.key)||void 0===i?void 0:i.getState(n),m=null===(r=this.key)||void 0===r?void 0:r.getState(e.state),g=f.active&&m.active&&f.range.from!==m.range.from,b=!f.active&&m.active,v=f.active&&!m.active,y=b||g,x=!b&&!v&&f.query!==m.query&&!g,w=v||g;if(!y&&!x&&!w)return;const _=w&&!y?f:m,k=e.dom.querySelector(`[data-decoration-id="${_.decorationId}"]`);d={editor:t,range:_.range,query:_.query,text:_.text,items:[],command:e=>{l({editor:t,range:_.range,props:e})},decorationNode:k,clientRect:k?()=>{var n;const{decorationId:i}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),r=e.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==r?void 0:r.getBoundingClientRect())||null}:null},y&&(null===(o=null==h?void 0:h.onBeforeStart)||void 0===o||o.call(h,d)),x&&(null===(s=null==h?void 0:h.onBeforeUpdate)||void 0===s||s.call(h,d)),(x||y)&&(d.items=await c({editor:t,query:_.query})),w&&(null===(a=null==h?void 0:h.onExit)||void 0===a||a.call(h,d)),x&&(null===(u=null==h?void 0:h.onUpdate)||void 0===u||u.call(h,d)),y&&(null===(p=null==h?void 0:h.onStart)||void 0===p||p.call(h,d))},destroy:()=>{var e;d&&(null===(e=null==h?void 0:h.onExit)||void 0===e||e.call(h,d))}}},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:d}=e,{empty:h,from:f}=d,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:i,allowedPrefixes:r,startOfLine:o,$position:s}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=i?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),p=(null===(t=s.nodeBefore)||void 0===t?void 0:t.isText)&&s.nodeBefore.text;if(!p)return null;const d=s.pos-p.length,h=Array.from(p.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==r?void 0:r.join("")}\0]?$`).test(f);if(null!==r&&!m)return null;const g=d+h.index;let b=g+h[0].length;return i&&l.test(p.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:i,allowedPrefixes:r,startOfLine:o,$position:d.$from}),a=`id_${Math.floor(4294967295*Math.random())}`;e&&p({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:i,range:r}=f.getState(e.state);return i&&(null===(n=null==h?void 0:h.onKeyDown)||void 0===n?void 0:n.call(h,{view:e,event:t,range:r}))||!1},decorations(e){const{active:t,range:n,decorationId:i}=f.getState(e);return t?Br.create(e.doc,[Ir.inline(n.from,n.to,{nodeName:s,class:a,"data-decoration-id":i})]):null}}});return f}function tR(e){return e&&e.__esModule?e.default:e}function nR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iR,rR,oR,sR,aR,lR,cR={},uR=[],pR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function dR(e,t){for(var n in t)e[n]=t[n];return e}function hR(e){var t=e.parentNode;t&&t.removeChild(e)}function fR(e,t,n){var i,r,o,s={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?iR.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 mR(e,s,i,r,null)}function mR(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++oR:r};return null==r&&null!=rR.vnode&&rR.vnode(o),o}function gR(e){return e.children}function bR(e,t){this.props=e,this.context=t}function vR(e,t){if(null==t)return e.__?vR(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?vR(e):null}function yR(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 yR(e)}}function xR(e){(!e.__d&&(e.__d=!0)&&sR.push(e)&&!wR.__r++||lR!==rR.debounceRendering)&&((lR=rR.debounceRendering)||aR)(wR)}function wR(){for(var e;wR.__r=sR.length;)e=sR.sort((function(e,t){return e.__v.__b-t.__v.__b})),sR=[],e.some((function(e){var t,n,i,r,o,s;e.__d&&(o=(r=(t=e).__v).__e,(s=t.__P)&&(n=[],(i=dR({},r)).__v=r.__v+1,SR(s,r,i,t.__n,void 0!==s.ownerSVGElement,null!=r.__h?[o]:null,n,null==o?vR(r):o,r.__h),NR(n,r),r.__e!=o&&yR(r)))}))}function _R(e,t,n,i,r,o,s,a,l,c){var u,p,d,h,f,m,g,b=i&&i.__k||uR,v=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?mR(null,h,null,null,h):Array.isArray(h)?mR(gR,{children:h},null,null,null):h.__b>0?mR(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(d=b[u])||d&&h.key==d.key&&h.type===d.type)b[u]=void 0;else for(p=0;p<v;p++){if((d=b[p])&&h.key==d.key&&h.type===d.type){b[p]=void 0;break}d=null}SR(e,h,d=d||cR,r,o,s,a,l,c),f=h.__e,(p=h.ref)&&d.ref!=p&&(g||(g=[]),d.ref&&g.push(d.ref,null,h),g.push(p,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===d.__k?h.__d=l=kR(h,l,e):l=CR(e,h,d,b,f,l),"function"==typeof n.type&&(n.__d=l)):l&&d.__e==l&&l.parentNode!=e&&(l=vR(d))}for(n.__e=m,u=v;u--;)null!=b[u]&&("function"==typeof n.type&&null!=b[u].__e&&b[u].__e==n.__d&&(n.__d=vR(i,u+1)),jR(b[u],b[u]));if(g)for(u=0;u<g.length;u++)AR(g[u],g[++u],g[++u])}function kR(e,t,n){for(var i,r=e.__k,o=0;r&&o<r.length;o++)(i=r[o])&&(i.__=e,t="function"==typeof i.type?kR(i,t,n):CR(n,i,i,r,i.__e,t));return t}function ER(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){ER(e,t)})):t.push(e)),t}function CR(e,t,n,i,r,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<i.length;l+=2)if(a==r)break e;e.insertBefore(r,o),s=o}return void 0!==s?s:r.nextSibling}function MR(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||pR.test(t)?n:n+"px"}function OR(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||MR(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||MR(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?i||e.addEventListener(t,o?TR:DR,o):e.removeEventListener(t,o?TR:DR,o);else if("dangerouslySetInnerHTML"!==t){if(r)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 DR(e){this.l[e.type+!1](rR.event?rR.event(e):e)}function TR(e){this.l[e.type+!0](rR.event?rR.event(e):e)}function SR(e,t,n,i,r,o,s,a,l){var c,u,p,d,h,f,m,g,b,v,y,x=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=rR.__b)&&c(t);try{e:if("function"==typeof x){if(g=t.props,b=(c=x.contextType)&&i[c.__c],v=c?b?b.props.value:c.__:i,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in x&&x.prototype.render?t.__c=u=new x(g,v):(t.__c=u=new bR(g,v),u.constructor=x,u.render=LR),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=i,p=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=x.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=dR({},u.__s)),dR(u.__s,x.getDerivedStateFromProps(g,u.__s))),d=u.props,h=u.state,p)null==x.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==x.getDerivedStateFromProps&&g!==d&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||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,v),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(d,h,f)}))}u.context=v,u.props=g,u.state=u.__s,(c=rR.__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&&(i=dR(dR({},i),u.getChildContext())),p||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(d,h)),y=null!=c&&c.type===gR&&null==c.key?c.props.children:c,_R(e,Array.isArray(y)?y:[y],t,n,i,r,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,i,r,o,s,a){var l,c,u,p=n.props,d=t.props,h=t.type,f=0;if("svg"===h&&(r=!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(d);e=r?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),o=null,a=!1}if(null===h)p===d||a&&e.data===d||(e.data=d);else{if(o=o&&iR.call(e.childNodes),c=(p=n.props||cR).dangerouslySetInnerHTML,u=d.dangerouslySetInnerHTML,!a){if(null!=o)for(p={},f=0;f<e.attributes.length;f++)p[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,i,r){var o;for(o in n)"children"===o||"key"===o||o in t||OR(e,o,null,n[o],i);for(o in t)r&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||OR(e,o,t[o],n[o],i)}(e,d,p,r,a),u)t.__k=[];else if(f=t.props.children,_R(e,Array.isArray(f)?f:[f],t,n,i,r&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&vR(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&hR(o[f]);a||("value"in d&&void 0!==(f=d.value)&&(f!==p.value||f!==e.value||"progress"===h&&!f)&&OR(e,"value",f,p.value,!1),"checked"in d&&void 0!==(f=d.checked)&&f!==e.checked&&OR(e,"checked",f,p.checked,!1))}return e}(n.__e,t,n,i,r,o,s,l);(c=rR.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),rR.__e(e,t,n)}}function NR(e,t){rR.__c&&rR.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){rR.__e(e,t.__v)}}))}function AR(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){rR.__e(e,n)}}function jR(e,t,n){var i,r;if(rR.unmount&&rR.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||AR(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){rR.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&jR(i[r],t,"function"!=typeof e.type);n||null==e.__e||hR(e.__e),e.__e=e.__d=void 0}function LR(e,t,n){return this.constructor(e,n)}function zR(e,t,n){var i,r,o;rR.__&&rR.__(e,t),r=(i="function"==typeof n)?null:n&&n.__k||t.__k,o=[],SR(t,e=(!i&&n||t).__k=fR(gR,null,[e]),r||cR,cR,void 0!==t.ownerSVGElement,!i&&n?[n]:r?null:t.firstChild?iR.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i),NR(o,e)}iR=uR.slice,rR={__e:function(e,t){for(var n,i,r;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&null!=i.getDerivedStateFromError&&(n.setState(i.getDerivedStateFromError(e)),r=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),r=n.__d),r)return n.__E=n}catch(t){e=t}throw e}},oR=0,bR.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=dR({},this.state),"function"==typeof e&&(e=e(dR({},n),this.props)),e&&dR(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),xR(this))},bR.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),xR(this))},bR.prototype.render=gR,sR=[],aR="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,wR.__r=0;var IR=0;function RR(e,t,n,i,r){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:--IR,__source:i,__self:r};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===a[s]&&(a[s]=o[s]);return rR.vnode&&rR.vnode(l),l}var FR={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 BR=new Map,PR=[{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 UR(e){if(BR.has(e))return BR.get(e);const t=HR(e);return BR.set(e,t),t}const HR=(()=>{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d"))}catch{}if(!e)return()=>!1;const t=25,n=20,i=Math.floor(t/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=2*n,e.canvas.height=t,i=>{e.clearRect(0,0,2*n,t),e.fillStyle="#FF0000",e.fillText(i,0,22),e.fillStyle="#0000FF",e.fillText(i,n,22);const r=e.getImageData(0,0,n,t).data,o=r.length;let s=0;for(;s<o&&!r[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 r[s]===c[0]&&r[s+2]===c[2]&&!(e.measureText(i).width>=n)}})();var $R={latestVersion:function(){for(const{v:e,emoji:t}of PR)if(UR(t))return e},noCountryFlags:function(){return!UR("🇨🇦")}};const WR=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let qR=null;var VR,KR={add:function(e){qR||(qR=FR.get("frequently")||{});const t=e.id||e;t&&(qR[t]||(qR[t]=0),qR[t]+=1,FR.set("last",t),FR.set("frequently",qR))},get:function({maxFrequentRows:e,perLine:t}){if(!e)return[];qR||(qR=FR.get("frequently"));let n=[];if(!qR){qR={};for(let e in WR.slice(0,t)){const i=WR[e];qR[i]=t-e,n.push(i)}return n}const i=e*t,r=FR.get("last");for(let e in qR)n.push(e);if(n.sort(((e,t)=>{const n=qR[t],i=qR[e];return n==i?e.localeCompare(t):n-i})),n.length>i){const e=n.slice(i);n=n.slice(0,i);for(let t of e)t!=r&&delete qR[t];r&&-1==n.indexOf(r)&&(delete qR[n[n.length-1]],n.splice(-1,1,r)),FR.set("frequently",qR)}return n}};VR=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 GR={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 YR=null,QR=null;const ZR={};async function JR(e){if(ZR[e])return ZR[e];const t=await fetch(e),n=await t.json();return ZR[e]=n,n}let XR=null,eF=null,tF=!1;function nF(e,{caller:t}={}){return XR||(XR=new Promise((e=>{eF=e}))),e?async function(e){tF=!0;let{emojiVersion:t,set:n,locale:i}=e;if(t||(t=GR.emojiVersion.value),n||(n=GR.set.value),i||(i=GR.locale.value),QR)QR.categories=QR.categories.filter((e=>!!!e.name));else{QR=("function"==typeof e.data?await e.data():e.data)||await JR(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${n}.json`),QR.emoticons={},QR.natives={},QR.categories.unshift({id:"frequent",emojis:[]});for(const e in QR.aliases){const t=QR.aliases[e],n=QR.emojis[t];n&&(n.aliases||(n.aliases=[]),n.aliases.push(e))}}if(YR=("function"==typeof e.i18n?await e.i18n():e.i18n)||("en"==i?tR(VR):await JR(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let t in e.custom){t=parseInt(t);const n=e.custom[t],i=e.custom[t-1];if(n.emojis&&n.emojis.length){n.id||(n.id=`custom_${t+1}`),n.name||(n.name=YR.categories.custom),i&&!n.icon&&(n.target=i.target||i),QR.categories.push(n);for(const e of n.emojis)QR.emojis[e.id]=e}}e.categories&&(QR.categories=QR.categories.filter((t=>-1!=e.categories.indexOf(t.id))).sort(((t,n)=>e.categories.indexOf(t.id)-e.categories.indexOf(n.id))));let r=null,o=null;"native"==n&&(r=$R.latestVersion(),o=e.noCountryFlags||$R.noCountryFlags());let s=QR.categories.length,a=!1;for(;s--;){const t=QR.categories[s];if("frequent"==t.id){let{maxFrequentRows:n,perLine:i}=e;n||(n=GR.maxFrequentRows.value),i||(i=GR.perLine.value),t.emojis=KR.get({maxFrequentRows:n,perLine:i})}if(!t.emojis||!t.emojis.length){QR.categories.splice(s,1);continue}const{categoryIcons:n}=e;if(n){const e=n[t.id];e&&!t.icon&&(t.icon=e)}let i=t.emojis.length;for(;i--;){const e=t.emojis[i],n=e.id?e:QR.emojis[e],s=()=>{t.emojis.splice(i,1)};if(n)if(r&&n.version>r)s();else if(!o||"flags"!=t.id||aF.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)QR.emoticons[e]||(QR.emoticons[e]=n.id);let e=0;for(const t of n.skins){if(!t)continue;e++;const{native:i}=t;i&&(QR.natives[i]=n.id,n.search+=`,${i}`);const r=1==e?"":`:skin-tone-${e}:`;t.shortcodes=`:${n.id}:${r}`}}}else s();else s()}}a&&sF.reset();eF()}(e):t&&!tF&&console.warn(`\`${t}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),XR}function iF(e,t,n){e||(e={});const i={};for(let r in t)i[r]=rF(r,e,t,n);return i}function rF(e,t,n,i){const r=n[e];let o=i&&i.getAttribute(e)||(null!=t[e]&&null!=t[e]?t[e]:null);return r?(null!=o&&r.value&&typeof r.value!=typeof o&&(o="boolean"==typeof r.value?"false"!=o:r.value.constructor(o)),r.transform&&o&&(o=r.transform(o)),(null==o||r.choices&&-1==r.choices.indexOf(o))&&(o=r.value),o):o}let oF=null;var sF={search:async function(e,{maxResults:t,caller:n}={}){if(!e||!e.trim().length)return null;t||(t=90),await nF(null,{caller:n||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter(((e,t,n)=>e.trim()&&n.indexOf(e)==t));if(!i.length)return;let r,o,s=oF||(oF=Object.values(QR.emojis));for(const e of i){if(!s.length)break;r=[],o={};for(const t of s){if(!t.search)continue;const n=t.search.indexOf(`,${e}`);-1!=n&&(r.push(t),o[t.id]||(o[t.id]=0),o[t.id]+=t.id==e?0:n+1)}s=r}return r.length<2||(r.sort(((e,t)=>{const n=o[e.id],i=o[t.id];return n==i?e.id.localeCompare(t.id):n-i})),r.length>t&&(r=r.slice(0,t))),r},get:function(e){return e.id?e:QR.emojis[e]||QR.emojis[QR.aliases[e]]||QR.emojis[QR.natives[e]]},reset:function(){oF=null},SHORTCODES_REGEX:/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/};const aF=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];var lF={categories:{activity:{outline:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("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"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("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"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("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"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("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"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:RR("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 cF(e){let{id:t,skin:n,emoji:i}=e;if(e.shortcodes){const i=e.shortcodes.match(sF.SHORTCODES_REGEX);i&&(t=i[1],i[2]&&(n=i[2]))}if(i||(i=sF.get(t||e.native)),!i)return e.fallback;const r=i.skins[n-1]||i.skins[0],o=r.src||("native"==e.set||e.spritesheet?void 0:"function"==typeof e.getImageURL?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/64/${r.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 RR("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:o?RR("img",{style:{height:e.size||"1em",width:"auto",display:"inline-block",position:"relative",top:".1em"},alt:r.native||r.shortcodes,src:o}):"native"==e.set?RR("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:r.native}):RR("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${s})`,backgroundSize:`${100*QR.sheet.cols}% ${100*QR.sheet.rows}%`,backgroundPosition:`${100/(QR.sheet.cols-1)*r.x}% ${100/(QR.sheet.rows-1)*r.y}%`}})})}const uF="undefined"!=typeof window?window.HTMLElement:Object;class pF extends uF{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 i=rF(e,{[e]:n},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:i}):(this.component.props[e]=i,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 dF extends pF{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 hF={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:GR.set,skin:GR.skin};class fF extends pF{async connectedCallback(){const e=iF(this.props,hF,this);e.element=this,e.ref=e=>{this.component=e},await nF(),zR(RR(cF,{...e}),this)}constructor(e){super(e)}}nR(fF,"Props",hF),"undefined"==typeof customElements||customElements.get("em-emoji")||customElements.define("em-emoji",fF);var mF,gF=[],bF=rR.__b,vF=rR.__r,yF=rR.diffed,xF=rR.__c,wF=rR.unmount;function _F(){var e;for(gF.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=gF.pop();)if(e.__P)try{e.__H.__h.forEach(EF),e.__H.__h.forEach(CF),e.__H.__h=[]}catch(t){e.__H.__h=[],rR.__e(t,e.__v)}}rR.__b=function(e){bF&&bF(e)},rR.__r=function(e){vF&&vF(e);var t=e.__c.__H;t&&(t.__h.forEach(EF),t.__h.forEach(CF),t.__h=[])},rR.diffed=function(e){yF&&yF(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==gF.push(t)&&mF===rR.requestAnimationFrame||((mF=rR.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(i),kF&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);kF&&(t=requestAnimationFrame(n))})(_F))},rR.__c=function(e,t){t.some((function(e){try{e.__h.forEach(EF),e.__h=e.__h.filter((function(e){return!e.__||CF(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],rR.__e(n,e.__v)}})),xF&&xF(e,t)},rR.unmount=function(e){wF&&wF(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{EF(e)}catch(e){t=e}})),t&&rR.__e(t,n.__v))};var kF="function"==typeof requestAnimationFrame;function EF(e){var t=e.__c;"function"==typeof t&&(e.__c=void 0,t())}function CF(e){e.__c=e.__()}function MF(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function OF(e){this.props=e}(OF.prototype=new bR).isPureReactComponent=!0,OF.prototype.shouldComponentUpdate=function(e,t){return MF(this.props,e)||MF(this.state,t)};var DF=rR.__b;rR.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),DF&&DF(e)};var TF=rR.__e;rR.__e=function(e,t,n){if(e.then)for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);TF(e,t,n)};var SF=rR.unmount;function NF(){this.__u=0,this.t=null,this.__b=null}function AF(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function jF(){this.u=null,this.o=null}rR.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),SF&&SF(e)},(NF.prototype=new bR).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=AF(i.__v),o=!1,s=function(){o||(o=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(!--i.__u){if(i.state.__e){var e=i.state.__e;i.__v.__k[0]=function e(t,n,i){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,i)})),t.__c&&t.__c.__P===n&&(t.__e&&i.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=i)),t}(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__e:i.__b=null});t=i.t.pop();)t.forceUpdate()}},l=!0===t.__h;i.__u++||l||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(s,s)},NF.prototype.componentWillUnmount=function(){this.t=[]},NF.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,i){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===i&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,i)}))),t}(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__e&&fR(gR,null,e.fallback);return r&&(r.__h=null),[fR(gR,null,t.__e?null:e.children),r]};var LF=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]}};(jF.prototype=new bR).__e=function(e){var t=this,n=AF(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),LF(t,e,i)):r()};n?n(o):o()}},jF.prototype.render=function(e){this.u=null,this.o=new Map;var t=ER(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},jF.prototype.componentDidUpdate=jF.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){LF(e,n,t)}))};var zF="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,IF=/^(?: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]/,RF="undefined"!=typeof document,FF=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};bR.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(bR.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var BF=rR.event;function PF(){}function UF(){return this.cancelBubble}function HF(){return this.defaultPrevented}rR.event=function(e){return BF&&(e=BF(e)),e.persist=PF,e.isPropagationStopped=UF,e.isDefaultPrevented=HF,e.nativeEvent=e};var $F={configurable:!0,get:function(){return this.class}},WF=rR.vnode;rR.vnode=function(e){var t=e.type,n=e.props,i=n;if("string"==typeof t){var r=-1===t.indexOf("-");for(var o in i={},n){var s=n[o];RF&&"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)&&!FF(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():r&&IF.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),i[o]=s)}"select"==t&&i.multiple&&Array.isArray(i.value)&&(i.value=ER(n.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==t&&null!=i.defaultValue&&(i.value=ER(n.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),e.props=i,n.class!=n.className&&($F.enumerable="className"in n,null!=n.className&&(i.class=n.className),Object.defineProperty(i,"className",$F))}e.$$typeof=zF,WF&&WF(e)};var qF=rR.__r;rR.__r=function(e){qF&&qF(e),e.__c};const VF={light:"outline",dark:"solid"};class KF extends OF{renderIcon(e){const{icon:t}=e;if(t){if(t.svg)return RR("span",{class:"flex",dangerouslySetInnerHTML:{__html:t.svg}});if(t.src)return RR("img",{src:t.src})}const n=lF.categories[e.id]||lF.categories.custom;return n["auto"==this.props.icons?VF[this.props.theme]:this.props.icons]||n}render(){let e=null;return RR("nav",{id:"nav",class:"padding","data-position":this.props.position,children:RR("div",{class:"flex relative",children:[this.categories.map(((t,n)=>{const i=t.name||YR.categories[t.id],r=!this.props.unfocused&&t.id==this.state.categoryId;return r&&(e=n),RR("button",{"aria-label":i,"aria-selected":r||void 0,title:i,type:"button",class:"flex flex-grow flex-center",onMouseDown:e=>e.preventDefault(),onClick:()=>{this.props.onClick({category:t,i:n})},children:this.renderIcon(t)})})),RR("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:null==e?0:1,transform:`translateX(${100*e}%)`}})]})})}constructor(){super(),this.categories=QR.categories.filter((e=>!e.target)),this.state={categoryId:this.categories[0].id}}}class GF extends OF{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 YF=10;class QF extends bR{getInitialState(e=this.props){return{skin:FR.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.observers=[],this.dir=YR.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 nF(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}=QR;this.refs.categories=new Map;const t=QR.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 i=this.grid.length-1,r=i%YF?{}:{current:null};return r.index=i,r.posinset=this.grid.setsize+1,e.push(r),n};for(let t of e){const e=[];let i=n(e,t);for(let r of t.emojis)i.length==this.props.perLine&&(i=n(e,t)),this.grid.setsize+=1,i.push(r);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,i=n[e]&&n[e][t];if(i)return sF.get(i)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const t=new Map,n=t=>{t!=e.state.categoryId&&e.setState({categoryId:t})},i={root:this.refs.scroll.current,threshold:[0,1]},r=new IntersectionObserver((e=>{for(const n of e){const e=n.target.dataset.id;t.set(e,n.intersectionRatio)}const i=[...t],r=i[i.length-1];if(1==r[1])return n(r[0]);for(const[e,t]of i)if(t){n(e);break}}),i);for(const{root:e}of this.refs.categories.values())r.observe(e.current);this.observers.push(r)}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*(YF+5)}px 0px ${this.props.emojiButtonSize*YF}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:i,up:r,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||r))return null;if(-1==a)return e.repeat||!i&&!o||t.selectionStart!=t.value.length?null:[0,0];if(n||i){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(r||o){a+=r?-1:1;const e=s[a];return e?(e[l]||(l=e.length-1),[a,l]):(a=r?0:s.length-1,l=r?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 i=this.refs.scroll.current,r=i.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-(r.top-i.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<i.scrollTop)o=e;else{if(!(s>i.scrollTop+r.height))return;o=s-r.height}}else o=0;this.ignoreMouse(),i.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]),i={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&&(i.skin=t+1),n.src&&(i.src=n.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}(e,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&KR.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}),FR.set("skin",e)}renderNav(){return RR(KF,{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 RR("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[RR("div",{class:"flex flex-middle flex-grow",children:[RR("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:RR(cF,{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})}),RR("div",{class:`margin-${this.dir[0]}`,children:RR("div",e?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[RR("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:e.name}),RR("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:e.skins[0].shortcodes})]}:t?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[RR("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:YR.search_no_results_1}),RR("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:YR.search_no_results_2})]}:{class:"color-c",style:{fontSize:21},children:YR.pick})})]}),!e&&"preview"==this.props.skinTonePosition&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:t,posinset:n,grid:i}){const r=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 RR(GF,{selected:a,skin:o,size:r,children:RR("button",{"aria-label":s,"aria-selected":a||void 0,"aria-posinset":n,"aria-setsize":i.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:[RR("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}}),RR(cF,{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 RR("div",{children:[RR("div",{class:"spacer"}),RR("div",{class:"flex flex-middle",children:[e&&"rtl"==this.dir&&this.renderSkinToneButton(),RR("div",{class:"search relative flex-grow",children:[RR("input",{type:"search",ref:this.refs.searchInput,placeholder:YR.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),RR("span",{class:"icon loupe flex",children:lF.search.loupe}),this.state.searchResults&&RR("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:lF.search.delete})]}),e&&"ltr"==this.dir&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?RR("div",{class:"category",ref:this.refs.search,children:[RR("div",{class:`sticky padding-small align-${this.dir[0]}`,children:YR.categories.search}),RR("div",{children:e.length?e.map(((t,n)=>RR("div",{class:"flex",children:t.map(((t,i)=>this.renderEmojiButton(t,{pos:[n,i],posinset:n*this.props.perLine+i+1,grid:e})))}))):RR("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&RR("a",{onClick:this.props.onAddCustomEmoji,children:YR.add_custom})})})]}):null}renderCategories(){const{categories:e}=QR,t=!!this.state.searchResults;return RR("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 RR("div",{"data-id":e.target?e.target.id:e.id,class:"category",ref:t,children:[RR("div",{class:`sticky padding-small align-${this.dir[0]}`,children:e.name||YR.categories[e.id]}),RR("div",{class:"relative",style:{height:n.length*this.props.emojiButtonSize},children:n.map(((t,n)=>{const i=t.index-t.index%YF,r=this.state.visibleRows[i],o="current"in t?t:void 0;if(!r&&!o)return null;const s=n*this.props.perLine,a=s+this.props.perLine,l=e.emojis.slice(s,a);return RR("div",{"data-index":t.index,ref:o,class:"flex row",style:{top:n*this.props.emojiButtonSize},children:r&&l.map(((e,n)=>{const i=sF.get(e);return this.renderEmojiButton(i,{pos:[t.index,n],posinset:t.posinset+n,grid:this.grid})}))},t.index)}))})]})}))})}renderSkinToneButton(){return"none"==this.props.skinTonePosition?null:RR("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:RR("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":YR.skins.choose,title:YR.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:RR("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const e=this.getEmojiByPos(this.state.pos);return RR("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"),RR("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":YR.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 RR("div",{children:[RR("input",{type:"radio",name:"skin-tone",value:t,"aria-label":YR.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))}}),RR("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:[RR("span",{class:`skin-tone skin-tone-${t}`}),RR("span",{class:"margin-small-lr",children:YR.skins[t]})]})]})}))})}render(){return RR("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&&RR("div",{class:"padding-lr",children:this.renderSearch()}),RR("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:RR("div",{style:{width:this.props.perLine*this.props.emojiButtonSize},children:["static"==this.props.searchPosition&&this.renderSearch(),this.renderSearchResults(),this.renderCategories(),RR("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(),nR(this,"handleClickOutside",(e=>{const{element:t}=this.props;e.target!=t&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside())})),nR(this,"handleBaseClick",(e=>{this.state.showSkins&&(e.target.closest(".menu")||(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins()))})),nR(this,"handleBaseKeydown",(e=>{this.state.showSkins&&"Escape"==e.key&&(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins())})),nR(this,"handleSearchClick",(()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})})),nR(this,"handleSearchInput",(async()=>{const e=this.refs.searchInput.current;if(!e)return;const{value:t}=e,n=await sF.search(t),i=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!n)return this.setState({searchResults:n,pos:[-1,-1]},i);const r=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:r},i)})),nR(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()}})),nR(this,"clearSearch",(()=>{const e=this.refs.searchInput.current;e&&(e.value="",e.focus(),this.handleSearchInput())})),nR(this,"handleCategoryClick",(({category:e,i:t})=>{this.scrollTo(0==t?{row:-1}:{categoryId:e.id})})),nR(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 ZF extends dF{async connectedCallback(){const e=iF(this.props,GR,this);e.element=this,e.ref=e=>{this.component=e},await nF(e),zR(RR(QF,{...e}),this.shadowRoot)}disconnectedCallback(){this.component&&this.component.unregister()}constructor(e){super(e,{styles:tR(JF)})}}nR(ZF,"Props",GR),"undefined"==typeof customElements||customElements.get("em-emoji-picker")||customElements.define("em-emoji-picker",ZF);var JF={};JF=':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 XF=()=>UO.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");class eB extends t.Component{constructor(){super(...arguments),bE(this,"ref",t.createRef()),bE(this,"fetchEmojiData",(async()=>{try{const{data:e}=await XF();return e}catch{return{}}})),bE(this,"onKeyDown",(e=>{let{event:t}=e;return"Escape"===t.key&&(this.props.editor.chain().focus().deleteRange(this.props.range).run(),!0)})),bE(this,"handleSelect",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e).run()}))}componentDidMount(){new ZF({...this.props,onEmojiSelect:this.handleSelect,style:{maxWidth:"100%"},theme:"light",native:!0,previewPosition:"none",showSkinTones:!1,data:this.fetchEmojiData,ref:this.ref})}render(){return t.createElement("div",{"data-cy":"neeto-editor-emoji-picker",ref:this.ref})}}eB.defaultProps={editor:{},range:{}},eB.propTypes={editor:wh.exports.object.isRequired,range:wh.exports.object};const tB=new en("emoji-picker"),nB=Xs.create({name:"emojiPicker",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({suggestion:{char:"::",startOfLine:!1,pluginKey:tB,items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Dc(eB,{props:n,editor:n.editor}),t=pc("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[eR({editor:this.editor,...this.options.suggestion})]}});class iB extends t.Component{constructor(){super(...arguments),bE(this,"state",{isLoading:!1,selectedIndex:0,emojiSuggestions:[]}),bE(this,"fetchEmojiData",(async()=>{this.setState({isLoading:!0});try{const{data:e}=await XF();return this.setState({isLoading:!1}),e}catch{return this.setState({isLoading:!1}),{}}})),bE(this,"searchEmoji",(async()=>{if(this.props.query)return(await sF.search(this.props.query)).slice(0,5);return(await Promise.all(["+1","-1","smile","tada","heart"].map((e=>sF.search(e))))).map((e=>e[0]))})),bE(this,"searchEmojiAndSetState",(async()=>{const e=await this.searchEmoji();this.setState({emojiSuggestions:e})})),bE(this,"setEditorState",(async()=>{const e=await this.searchEmoji();this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e[0]).run()})),bE(this,"onKeyDown",(e=>{let{event:t}=e;return"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):" "===t.key?(qu(this.props.query)?this.props.editor.chain().focus().insertContent(" ").run():this.setEditorState(),!0):"Escape"===t.key&&(this.props.editor.chain().focus().insertContent(" ").run(),!0)})),bE(this,"selectItem",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(this.state.emojiSuggestions[e]).run()}))}componentDidMount(){nF({data:this.fetchEmojiData,theme:"light",previewPosition:"none"}),this.searchEmojiAndSetState()}componentDidUpdate(e){this.props.query!==e.query&&this.searchEmojiAndSetState()}render(){return t.createElement("div",{className:"neeto-editor-emoji-suggestion"},this.state.isLoading&&t.createElement(JT,null),!this.state.isLoading&&(this.state.emojiSuggestions.length>0?this.state.emojiSuggestions.map(((e,n)=>t.createElement("div",{"data-cy":`neeto-editor-emoji-suggestion-${e.id}`,key:e.id,className:Rc("neeto-editor-emoji-suggestion__item",{"neeto-editor-emoji-suggestion__item--selected":n===this.state.selectedIndex}),onClick:()=>this.selectItem(n)},e.skins[0].native))):t.createElement("p",null,"No results")))}}const rB=new en("emoji-suggestion"),oB=Xs.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",Ho({"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:i}=t;i().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[eR({editor:this.editor,...this.options.suggestion})]}}),sB={char:":",startOfLine:!1,pluginKey:rB,command:e=>{let{editor:t,range:n,props:i}=e;t.chain().focus().deleteRange(n).setEmoji(i).run()},items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Dc(iB,{props:n,editor:n.editor}),t=pc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"top-start",zIndex:99999})},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[0].destroy(),e.destroy()}}}};var aB=oB.configure({suggestion:sB});const lB=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,cB=Xs.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Ho(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Ys({find:lB,type:this.type,getAttributes:e=>{const[,,t,n,i]=e;return{src:n,alt:t,title:i}}})]}});var uB,pB=void 0&&(void 0).__extends||(uB=function(e,t){return uB=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])},uB(e,t)},function(e,t){function n(){this.constructor=e}uB(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),dB=void 0&&(void 0).__assign||function(){return dB=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},dB.apply(this,arguments)},hB={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},fB={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},mB={width:"20px",height:"20px",position:"absolute"},gB={top:dB(dB({},hB),{top:"-5px"}),right:dB(dB({},fB),{left:void 0,right:"-5px"}),bottom:dB(dB({},hB),{top:void 0,bottom:"-5px"}),left:dB(dB({},fB),{left:"-5px"}),topRight:dB(dB({},mB),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:dB(dB({},mB),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:dB(dB({},mB),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:dB(dB({},mB),{left:"-10px",top:"-10px",cursor:"nw-resize"})},bB=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return pB(n,t),n.prototype.render=function(){return e.createElement("div",{className:this.props.className||"",style:dB(dB({position:"absolute",userSelect:"none"},gB[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},n}(e.PureComponent),vB=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 i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yB=void 0&&(void 0).__assign||function(){return yB=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},yB.apply(this,arguments)},xB={width:"auto",height:"auto"},wB=function(e,t,n){return Math.max(Math.min(e,n),t)},_B=function(e,t){return Math.round(e/t)*t},kB=function(e,t){return new RegExp(e,"i").test(t)},EB=function(e){return Boolean(e.touches&&e.touches.length)},CB=function(e,t,n){void 0===n&&(n=0);var i=t.reduce((function(n,i,r){return Math.abs(i-e)<Math.abs(t[n]-e)?r:n}),0),r=Math.abs(t[i]-e);return 0===n||r<n?t[i]:e},MB=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"},OB=function(e,t,n,i){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 i*(Number(e.replace("vh",""))/100)}return e},DB=["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"],TB="__resizable_base__",SB=function(t){function n(e){var n=t.call(this,e)||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(TB):t.className+=TB,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 vB(n,t),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||xB},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,i=this.resizable.offsetHeight,r=this.resizable.style.position;"relative"!==r&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=r}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 MB(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?MB(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?MB(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 i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),i},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,i,r=this.props.boundsByDirection,o=this.state.direction,s=r&&kB("left",o),a=r&&kB("top",o);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=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,i=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),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,i=this.props.resizeRatio||1,r=this.state,o=r.direction,s=r.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,p=s.width,d=s.height,h=c||0,f=u||0;return kB("right",o)&&(p=s.width+(e-s.x)*i/n,l&&(d=(p-f)/this.ratio+h)),kB("left",o)&&(p=s.width-(e-s.x)*i/n,l&&(d=(p-f)/this.ratio+h)),kB("bottom",o)&&(d=s.height+(t-s.y)*i/n,l&&(p=(d-h)*this.ratio+f)),kB("top",o)&&(d=s.height-(t-s.y)*i/n,l&&(p=(d-h)*this.ratio+f)),{newWidth:p,newHeight:d}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,i){var r=this.props,o=r.lockAspectRatio,s=r.lockAspectRatioExtraHeight,a=r.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===i.height?10:i.height,p=void 0===n.height||n.height<0?t:n.height,d=s||0,h=a||0;if(o){var f=(u-d)*this.ratio+h,m=(p-d)*this.ratio+h,g=(l-h)/this.ratio+d,b=(c-h)/this.ratio+d,v=Math.max(l,f),y=Math.min(c,m),x=Math.max(u,g),w=Math.min(p,b);e=wB(e,v,y),t=wB(t,x,w)}else e=wB(e,l,c),t=wB(t,u,p);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 i=this.resizable.getBoundingClientRect(),r=i.left,o=i.top,s=i.right,a=i.bottom;this.resizableLeft=r,this.resizableRight=s,this.resizableTop=o,this.resizableBottom=a}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,i=0,r=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,r=e.nativeEvent.clientY):e.nativeEvent&&EB(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,r=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:i,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:yB(yB({},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&&EB(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,i=n.maxWidth,r=n.maxHeight,o=n.minWidth,s=n.minHeight,a=EB(e)?e.touches[0].clientX:e.clientX,l=EB(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,p=c.original,d=c.width,h=c.height,f=this.getParentSize(),g=function(e,t,n,i,r,o,s){return i=OB(i,e.width,t,n),r=OB(r,e.height,t,n),o=OB(o,e.width,t,n),s=OB(s,e.height,t,n),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===r?void 0:Number(r),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,r,o,s);i=g.maxWidth,r=g.maxHeight,o=g.minWidth,s=g.minHeight;var b=this.calculateNewSizeFromDirection(a,l),v=b.newHeight,y=b.newWidth,x=this.calculateNewMaxFromBoundary(i,r);this.props.snap&&this.props.snap.x&&(y=CB(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=CB(v,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,v,{width:x.maxWidth,height:x.maxHeight},{width:o,height:s});if(y=w.newWidth,v=w.newHeight,this.props.grid){var _=_B(y,this.props.grid[0]),k=_B(v,this.props.grid[1]),E=this.props.snapGap||0;y=0===E||Math.abs(_-y)<=E?_:y,v=0===E||Math.abs(k-v)<=E?k:v}var C={width:y-p.width,height:v-p.height};if(d&&"string"==typeof d)if(d.endsWith("%"))y=y/f.width*100+"%";else if(d.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(d.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))v=v/f.height*100+"%";else if(h.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var M={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?M.flexBasis=M.width:"column"===this.flexDir&&(M.flexBasis=M.height),m((function(){t.setState(M)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,C)}},n.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,i=t.direction,r=t.original;if(n&&this.resizable){var o={width:this.size.width-r.width,height:this.size.height-r.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:yB(yB({},this.state.backgroundStyle),{cursor:"auto"})})}},n.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},n.prototype.renderResizer=function(){var t=this,n=this.props,i=n.enable,r=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,a=n.handleWrapperClass,l=n.handleComponent;if(!i)return null;var c=Object.keys(i).map((function(n){return!1!==i[n]?e.createElement(bB,{key:n,direction:n,onResizeStart:t.onResizeStart,replaceStyles:r&&r[n],className:o&&o[n]},l&&l[n]?l[n]:null):null}));return e.createElement("div",{className:a,style:s},c)},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce((function(e,n){return-1!==DB.indexOf(n)||(e[n]=t.props[n]),e}),{}),i=yB(yB(yB({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&&(i.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return e.createElement(r,yB({ref:this.ref,style:i,className:this.props.className},n),this.state.isResizing&&e.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}(e.PureComponent);const NB=e=>{let{node:n,editor:i,getPos:r}=e;const{alt:o,src:s,float:a,align:l,height:c,width:u}=n.attrs,p=o||"",{view:d}=i;return t.createElement(Oc,null,t.createElement(SB,{lockAspectRatio:!0,className:`neeto-editor__image neeto-editor__image--${a} neeto-editor__image--${l} neeto-editor__image-defaults`,size:{height:c,width:u},onResizeStop:(e,t,o)=>{d.dispatch(d.state.tr.setNodeMarkup(r(),void 0,{...n.attrs,height:o.offsetHeight,width:o.offsetWidth})),i.commands.focus()}},t.createElement("figure",null,t.createElement("img",T({alt:p,src:s},n.attrs)),t.createElement("figcaption",null,p))))},AB=cB.extend({name:"image",addAttributes:()=>({...cB.config.addAttributes(),height:{default:"auto",rendered:!1},width:{default:"fit-content",rendered:!1},float:{default:"none",rendered:!1},align:{default:"center",rendered:!1}}),addCommands(){return{setImage:e=>t=>{var n,i,r;let{tr:o,commands:s}=t;return"image"===(null===(n=o.selection)||void 0===n||null===(i=n.node)||void 0===i||null===(r=i.type)||void 0===r?void 0:r.name)?s.updateAttributes("image",e):s.insertContent({type:this.name,attrs:e})},setImageAttributes:e=>t=>{let{tr:n}=t;const{selection:i}=n,r={...i.node.attrs,...e},o=this.type.create(r);n.replaceRangeWith(i.from,i.to,o)}}},parseHTML:()=>[{tag:"img"}],renderHTML(e){let{node:t}=e;const{alt:n,src:i,float:r,align:o,height:s,width:a}=t.attrs,l=n||"";return["a",{class:`neeto-editor__image neeto-editor__image--${r} neeto-editor__image--${o} neeto-editor__image-defaults`,style:`height:${isNaN(s)?s:`${s}px`};width:${isNaN(a)?a:`${a}px`};`,href:i,target:"_blank",rel:"noopener noreferrer"},["figure",{},["img",Ho(t.attrs,{src:i,caption:l})],["figcaption",l]]]},addNodeView:()=>Sc(NB)}),jB=async(e,t)=>{const n=new OT({file:e,url:t}),{blob_url:i}=await n.create();return i};var LB=e=>{let{uploadEndpoint:t}=e;return AB.extend({addProseMirrorPlugins:()=>[new Zt({props:{handleDOMEvents:{paste(e,n){var i,r;const{schema:o,selection:{$anchor:{pos:s}}}=e.state;if(!(null===(i=n.clipboardData)||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length))return;const a=Array.from(n.clipboardData.files).filter((e=>/image/i.test(e.type)));Pu(a)||(n.preventDefault(),a.forEach((async n=>{const i=o.nodes.image.create({src:await jB(n,t)}),r=e.state.tr.insert(s,i);e.dispatch(r)})))}}}})]})},zB=Xs.create({name:"figcaption",selectable:!1,draggable:!1,parseHTML:()=>[{tag:"figcaption"}]});const IB=e=>{let{onSubmit:t,shortcuts:n}=e;return as.create({name:"keyboard-shortcuts",addKeyboardShortcuts(){return{"Mod-Enter":()=>(null==t||t(this.editor.getHTML()),this.editor.commands.blur(),!0),...n}}})};var RB=e=>{let{onSubmit:t,shortcuts:n}=e;return IB({onSubmit:t,shortcuts:n})};const FB=new en("mention"),BB=Xs.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:FB,command:({editor:e,range:t,props:n})=>{var i,r;const o=e.view.state.selection.$to.nodeAfter;(null===(i=null==o?void 0:o.text)||void 0===i?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(r=window.getSelection())||void 0===r||r.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),i=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(i)}}}},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",Ho({"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:i}=t,{empty:r,anchor:o}=i;return!!r&&(t.doc.nodesBetween(o-1,o,((t,i)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",i,i+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[eR({editor:this.editor,...this.options.suggestion})]}}),PB=e=>{let{size:n="medium",user:i={},isSquare:o=!1,status:s=null,onClick:a=(()=>{}),className:l="",...c}=e;const[u,p]=r(!1),{name:d="",imageUrl:h}=i,f="medium"===n,m="large"===n,g="extraLarge"===n,b=(e=>{if(e&&"string"==typeof e){const t=e.trim().split(" "),n=t.reduce(((e,n,i)=>(0!==i&&i!==t.length-1||(e=`${e}${n.charAt(0).toUpperCase()}`),e)),"");return n}return""})(d),v={height:Rf[n],width:Rf[n]},y=Rc("ne-avatar ",{"ne-avatar--medium":f,"ne-avatar--large":m,"ne-avatar--xlarge":g,"ne-avatar--round":!o,hidden:u}),x=Rc("ne-avatar__text",{"ne-avatar__text-medium":f,"ne-avatar__text-large":m,"ne-avatar__text-xlarge":g}),w=Rc("ne-avatar__status",s,{"ne-avatar__status-medium":f,"ne-avatar__status-large":m,"ne-avatar__status-xlarge":g,"ne-avatar__status-square":o}),_=()=>Hu(s)?t.Fragment:t.createElement("span",{className:w,"data-testid":"indicator"}),k=()=>t.createElement("span",{className:x,"data-testid":"initials"},b),E=b&&!(h&&!u);return t.createElement("span",T({style:v,className:Rc("ne-avatar--container ne-select-none",{"ne-avatar--container-round":!o},l,(()=>{const e=(b.charCodeAt(0)||0)+(b.charCodeAt(1)||0);return Ff[e%65%Ff.length]||Ff[0]})()),onClick:a},c),t.createElement(_,null),E?t.createElement(k,null):t.createElement("img",{alt:`avatar-${b}`,className:y,"data-chromatic":"ignore",src:h||Bf,onError:()=>p(!0)}))};PB.propTypes={size:wh.exports.oneOf(Object.keys(Rf)),user:wh.exports.shape({imageUrl:wh.exports.string,name:wh.exports.string}),isSquare:wh.exports.bool,onClick:wh.exports.func,status:wh.exports.oneOf(Object.keys({online:"online",idle:"idle",offline:"offline"})),className:wh.exports.string};const UB=e=>{let{wrapperRef:t,index:n}=e;if(!t.current||n>=t.current.children.length)return;const i=8,r=t.current,o=r.children[n],s=o.clientHeight+i;let a=r.scrollTop;o.offsetTop+s>a+r.clientHeight?a=o.offsetTop-r.clientHeight+s:a>o.offsetTop&&(a=o.offsetTop-i),t.current.scrollTop=a};class HB extends t.Component{constructor(e){super(e),bE(this,"selectItem",(e=>{const{items:t,command:n}=this.props,i=t[e];i&&n({label:i.name,id:i.key})})),bE(this,"upHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+e.length-1)%e.length}}))})),bE(this,"downHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+1)%e.length}}))})),bE(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),bE(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=t.createRef()}componentDidUpdate(e){const{items:t}=this.props;t!==e.items&&this.setState({selectedIndex:0}),UB({wrapperRef:this.mentionRef,index:this.state.selectedIndex})}render(){const{selectedIndex:e}=this.state,{items:n}=this.props;return Pu(n)?t.createElement("div",{className:"neeto-editor-mentions__wrapper"},t.createElement("p",{className:"neeto-editor-mentions__item"},"No Results")):t.createElement("div",{className:"neeto-editor-mentions__wrapper","data-cy":"neeto-editor-mention-list",ref:this.mentionRef},n.map(((n,i)=>{let{key:r,name:o,imageUrl:s,showImage:a}=n;return t.createElement("button",{"data-cy":`neeto-editor-mention-list-${o}`,key:r,type:"button",className:Rc("neeto-editor-mentions__item",{active:i===e}),onClick:()=>this.selectItem(i)},a&&t.createElement(PB,{user:{name:o,imageUrl:s}}),t.createElement("p",null,o))})))}}const $B=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.sort(((e,t)=>e.name.localeCompare(t.name)))},WB=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=$B(e);return e=>{let{query:n}=e;return t.filter((e=>{let{name:t}=e;return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}))}},qB={render:()=>{let e,t;return{onStart:n=>{e=new Dc(HB,{props:n,editor:n.editor}),t=pc("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 i;return"Escape"===n.event.key?(t[0].hide(),!0):null===(i=e.ref)||void 0===i?void 0:i.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},VB=BB.extend({addCommands(){return{setMention:e=>{let{id:t,label:n}=e;return e=>{let{chain:i}=e;i().focus().insertContent([{type:this.name,attrs:{id:t,label:n}},{type:"text",text:" "}]).run()}}}}});var KB=e=>{let{suggestion:t={},...n}=e;return VB.configure({...n,suggestion:{...qB,...t}})};const GB=as.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 Zt({props:{decorations:e=>{let{doc:t,selection:n}=e;const i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=n,o=[];return i?(t.descendants(((e,t)=>{const n=r>=t&&r<=t+e.nodeSize,i=!e.isLeaf&&!e.childCount,s=this.options.excludeNodeTypes.includes(e.type.name);if((n||!this.options.showOnlyCurrent)&&!s&&i){const n=[this.options.emptyNodeClass];this.editor.isEmpty&&n.push(this.options.emptyEditorClass);const i=Ir.node(t,t+e.nodeSize,{class:n.join(" "),"data-placeholder":this.options.placeholder});o.push(i)}return this.options.includeChildren})),Br.create(t,o)):null}}})]}});var YB={exports:{}};
60
+ return function(t){var n=e,i=n.lib,r=i.WordArray,o=i.Hasher,s=n.algo,a=r.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=r.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=r.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=r.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]),p=r.create([0,1518500249,1859775393,2400959708,2840853838]),d=r.create([1352829926,1548603684,1836072691,2053994217,0]),h=s.RIPEMD160=o.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var i=t+n,r=e[i];e[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o,s,h,x,w,_,k,E,C,M,O,D=this._hash.words,T=p.words,S=d.words,N=a.words,A=l.words,j=c.words,L=u.words;for(_=o=D[0],k=s=D[1],E=h=D[2],C=x=D[3],M=w=D[4],n=0;n<80;n+=1)O=o+e[t+N[n]]|0,O+=n<16?f(s,h,x)+T[0]:n<32?m(s,h,x)+T[1]:n<48?g(s,h,x)+T[2]:n<64?b(s,h,x)+T[3]:v(s,h,x)+T[4],O=(O=y(O|=0,j[n]))+w|0,o=w,w=x,x=y(h,10),h=s,s=O,O=_+e[t+A[n]]|0,O+=n<16?v(k,E,C)+S[0]:n<32?b(k,E,C)+S[1]:n<48?g(k,E,C)+S[2]:n<64?m(k,E,C)+S[3]:f(k,E,C)+S[4],O=(O=y(O|=0,L[n]))+M|0,_=M,M=C,C=y(E,10),E=k,k=O;O=D[1]+h+C|0,D[1]=D[2]+x+M|0,D[2]=D[3]+w+_|0,D[3]=D[4]+o+k|0,D[4]=D[0]+s+E|0,D[0]=O},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[(i+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,o=r.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return r},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 v(e,t,n){return e^(t|~n)}function y(e,t){return e<<t|e>>>32-t}n.RIPEMD160=o._createHelper(h),n.HmacRIPEMD160=o._createHmacHelper(h)}(),e.RIPEMD160}(GO())),jD(),LD||(LD=1,zD.exports=function(e){return function(){var t=e,n=t.lib,i=n.Base,r=n.WordArray,o=t.algo,s=o.SHA1,a=o.HMAC,l=o.PBKDF2=i.extend({cfg:i.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,i=a.create(n.hasher,e),o=r.create(),s=r.create([1]),l=o.words,c=s.words,u=n.keySize,p=n.iterations;l.length<u;){var d=i.update(t).finalize(s);i.reset();for(var h=d.words,f=h.length,m=d,g=1;g<p;g++){m=i.finalize(m),i.reset();for(var b=m.words,v=0;v<f;v++)h[v]^=b[v]}o.concat(d),c[0]++}return o.sigBytes=4*u,o}});t.PBKDF2=function(e,t,n){return l.create(n).compute(e,t)}}(),e.PBKDF2}(GO(),mD(),jD())),FD(),UD(),WD(),KD(),QD(),XD(),eT||(eT=1,tT.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}(GO(),UD())),nT||(nT=1,iT.exports=function(e){return e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,i=4*t,r=i-n%i,o=n+r-1;e.clamp(),e.words[o>>>2]|=r<<24-o%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923}(GO(),UD())),rT||(rT=1,oT.exports=function(e){return e.pad.Iso10126={pad:function(t,n){var i=4*n,r=i-t.sigBytes%i;t.concat(e.lib.WordArray.random(r-1)).concat(e.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126}(GO(),UD())),sT||(sT=1,aT.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}(GO(),UD())),lT||(lT=1,cT.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}(GO(),UD())),uT||(uT=1,pT.exports=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}(GO(),UD())),dT||(dT=1,hT.exports=function(e){return function(t){var n=e,i=n.lib.CipherParams,r=n.enc.Hex;n.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var t=r.parse(e);return i.create({ciphertext:t})}}}(),e.format.Hex}(GO(),UD())),fT||(fT=1,mT.exports=function(e){return function(){var t=e,n=t.lib.BlockCipher,i=t.algo,r=[],o=[],s=[],a=[],l=[],c=[],u=[],p=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,i=0;for(t=0;t<256;t++){var f=i^i<<1^i<<2^i<<3^i<<4;f=f>>>8^255&f^99,r[n]=f,o[f]=n;var m=e[n],g=e[m],b=e[g],v=257*e[f]^16843008*f;s[n]=v<<24|v>>>8,a[n]=v<<16|v>>>16,l[n]=v<<8|v>>>24,c[n]=v,v=16843009*b^65537*g^257*m^16843008*n,u[f]=v<<24|v>>>8,p[f]=v<<16|v>>>16,d[f]=v<<8|v>>>24,h[f]=v,n?(n=m^e[e[e[b^m]]],i^=e[e[i]]):n=i=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=i.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,i=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<i;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=f[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],l=0;l<i;l++){if(s=i-l,l%4)var c=o[s];else c=o[s-4];a[l]=l<4||s<=4?c:u[r[c>>>24]]^p[r[c>>>16&255]]^d[r[c>>>8&255]]^h[r[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,l,c,r)},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,p,d,h,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,r,o,s,a){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],p=e[t+2]^n[2],d=e[t+3]^n[3],h=4,f=1;f<l;f++){var m=i[c>>>24]^r[u>>>16&255]^o[p>>>8&255]^s[255&d]^n[h++],g=i[u>>>24]^r[p>>>16&255]^o[d>>>8&255]^s[255&c]^n[h++],b=i[p>>>24]^r[d>>>16&255]^o[c>>>8&255]^s[255&u]^n[h++],v=i[d>>>24]^r[c>>>16&255]^o[u>>>8&255]^s[255&p]^n[h++];c=m,u=g,p=b,d=v}m=(a[c>>>24]<<24|a[u>>>16&255]<<16|a[p>>>8&255]<<8|a[255&d])^n[h++],g=(a[u>>>24]<<24|a[p>>>16&255]<<16|a[d>>>8&255]<<8|a[255&c])^n[h++],b=(a[p>>>24]<<24|a[d>>>16&255]<<16|a[c>>>8&255]<<8|a[255&u])^n[h++],v=(a[d>>>24]<<24|a[c>>>16&255]<<16|a[u>>>8&255]<<8|a[255&p])^n[h++],e[t]=m,e[t+1]=g,e[t+2]=b,e[t+3]=v},keySize:256/32});t.AES=n._createHelper(m)}(),e.AES}(GO(),sD(),dD(),FD(),UD())),vT(),yT||(yT=1,xT.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,r=i.RC4=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,i=this._S=[],r=0;r<256;r++)i[r]=r;r=0;for(var o=0;r<256;r++){var s=r%n,a=t[s>>>2]>>>24-s%4*8&255;o=(o+i[r]+a)%256;var l=i[r];i[r]=i[o],i[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,i=0,r=0;r<4;r++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,i|=e[(e[t]+e[n])%256]<<24-8*r}return this._i=t,this._j=n,i}t.RC4=n._createHelper(r);var s=i.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});t.RC4Drop=n._createHelper(s)}(),e.RC4}(GO(),sD(),dD(),FD(),UD())),wT||(wT=1,_T.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,r=[],o=[],s=[],a=i.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 i=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]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)r[n]^=i[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),p=c>>>16|4294901760&u,d=u<<16|65535&c;for(r[0]^=c,r[1]^=p,r[2]^=u,r[3]^=d,r[4]^=c,r[5]^=p,r[6]^=u,r[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8),e[t+i]^=r[i]},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 i=e[n]+t[n],r=65535&i,a=i>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|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}(GO(),sD(),dD(),FD(),UD())),kT||(kT=1,ET.exports=function(e){return function(){var t=e,n=t.lib.StreamCipher,i=t.algo,r=[],o=[],s=[],a=i.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],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]];this._b=0;for(var r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)i[r]^=n[r+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),p=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=p,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=p,i[6]^=u,i[7]^=d,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8),e[t+i]^=r[i]},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 i=e[n]+t[n],r=65535&i,a=i>>>16,l=((r*r>>>17)+r*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|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}(GO(),sD(),dD(),FD(),UD())));const MT=async e=>{const t=await(e=>new Promise(((t,n)=>{const i=new FileReader;i.onload=e=>{const n=CT.lib.WordArray.create(e.target.result);t(CT.MD5(n))},i.onerror=()=>n(new Error("Corrupted file")),i.readAsArrayBuffer(e)})))(e);return t.toString(CT.enc.Base64)};class OT{constructor(e){let{url:t,file:n,progress:i=Vu}=e;bE(this,"create",(async()=>{const{data:e}=await this.generateUrl(),{direct_upload:{url:t,headers:n}}=e;return await this.uploadToCloud(t,n),e})),bE(this,"generateUrl",(async()=>{const e={blob:{filename:this.file.name,byte_size:this.file.size,content_type:this.file.type,checksum:await MT(this.file)}};return HO(this.url,e)})),bE(this,"abort",(()=>this.abortController.abort())),bE(this,"uploadToCloud",((e,t)=>{const n={headers:t,onUploadProgress:this.progress,signal:this.abortController.signal};return $O(e,this.file,n)})),this.url=t,this.file=n,this.progress=i,this.abortController=new AbortController}}class DT extends vm.exports.BasePlugin{constructor(e,t){super(e,t),bE(this,"upload",(e=>{if(Pu(e))return Promise.resolve();const t=e.map((e=>this.uploadFile(this.uppy.getFile(e))));return Promise.all(t)})),bE(this,"uploadFile",(async e=>{this.uppy.on("file-removed",(n=>{n.id===e.id&&t.abort()})),this.uppy.on("upload-cancel",(n=>{n===e.id&&t.abort()})),this.uppy.on("cancel-all",(()=>t.abort()));const t=new OT({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})}});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){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 TT=e=>{var n;let{uppy:i}=e;const[s,a]=r(0);o((()=>{i.on("progress",a)}),[i]);const l=`${s}%`;return t.createElement("div",{className:"neeto-editor-image-uploader__progress"},t.createElement("p",{className:"neeto-editor-image-uploader__progress-title"},"Uploading..."),t.createElement("p",{className:"neeto-editor-image-uploader__progress-file"},null===(n=i.getFiles()[0])||void 0===n?void 0:n.name),t.createElement("div",{className:"neeto-editor-progress-bar__wrapper","data-cy":"neeto-editor-image-upload-progress-bar"},t.createElement("div",{className:"neeto-editor-progress-bar__percent"},t.createElement("p",null,l),t.createElement(rm,{icon:vd,size:"small",style:"text",onClick:()=>i.cancelAll()})),t.createElement("div",{className:"neeto-editor-progress-bar__indicator"},t.createElement("div",{className:"neeto-editor-progress-bar__indicator-inner",style:{width:l}}))))},ST=e=>{const t=["B","KB","MB","GB"];let n=0;for(;e>=1024&&n<t.length;)e/=1024,++n;return`${e.toFixed(1)} ${t[n]}`},NT=e=>{let{endpoint:n,onSuccess:i,uploadConfig:o}=e;const[s,a]=r(!1),[l,c]=r(""),u={...dm,...o},p=function(e){if("function"!=typeof e)throw new TypeError("useUppy: expected a function that returns a new Uppy instance");const t=mE(void 0);if(void 0===t.current&&(t.current=e(),!(t.current instanceof gE)))throw new TypeError(`useUppy: factory function must return an Uppy instance, got ${typeof t.current}`);return fE((()=>()=>{t.current.close({reason:"unmount"}),t.current=void 0}),[t]),t.current}((()=>new hv({...u,onBeforeFileAdded:e=>{const{maxFileSize:t,allowedFileTypes:n}=u.restrictions;return e.size>t?(c(`File size is too large. Max size is ${ST(u.restrictions.maxFileSize)}.`),!1):!!n.includes(`.${e.extension}`)||(c(`File type is not permitted. Allowed file types are: ${n.join(", ")}.`),!1)}}).use(DT,{directUploadUrl:n,...hm}).on("upload",(()=>a(!0))).on("upload-success",((e,t)=>{let{blob_url:n}=t;return i(n)})).on("cancel-all",(()=>a(!1))).on("complete",(()=>a(!1)))));return s?t.createElement(TT,{uppy:p}):t.createElement("div",{className:"neeto-editor-image-uploader__dnd-wrapper"},t.createElement(zk,{className:"neeto-editor-image-uploader__dnd","data-cy":"neeto-editor-image-local-uploader",uppy:p,locale:{strings:{dropHereOr:"Drop your file(s) here or %{browse}",browse:"Browse"}},note:`Max. File Size: ${ST(u.restrictions.maxFileSize)}`}),l&&t.createElement("p",{className:"neeto-editor-image-uploader__dnd--error"},l))};var AT={},jT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},LT=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 i(e,t){return t._once=!0,n(e,t),this}function r(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,i=arguments.length,o=Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];var a=t[e]&&t[e].slice();return a&&a.forEach((function(t){t._once&&r(e,t),t.apply(n,o)})),this}return jT({},e,{on:n,once:i,off:r,emit:o})},zT=Object.freeze({__proto__:null,default:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,n=void 0,i=void 0,r=void 0,o=void 0,s=void 0,a=void 0,l=void 0,c=void 0,u=void 0,p=void 0,d=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),v={all:function(){return k(b.children)},new:function(){return k(b.children).filter((function(e){return!e.hasAttribute(""+f)}))}},y=[M,O,D],x=[T,S,N,A],w=LT({pack:z,update:I,resize:R});return w;function _(e){e.forEach((function(e){return e()}))}function k(e){return Array.prototype.slice.call(e)}function E(e){return Array.apply(null,Array(e)).map((function(){return 0}))}function C(){return m.map((function(e){return e.mq&&window.matchMedia("(min-width: "+e.mq+")").matches})).indexOf(!0)}function M(){i=C()}function O(){r=-1===i?m[m.length-1]:m[i]}function D(){s=E(r.columns)}function T(){p=v[t?"new":"all"]()}function S(){0!==p.length&&(d=p.map((function(e){return e.clientWidth})),h=p.map((function(e){return e.clientHeight})))}function N(){p.forEach((function(e,t){o=s.indexOf(Math.min.apply(Math,s)),e.style.position="absolute",a=s[o]+"px",l=o*d[t]+o*r.gutter+"px",g?(e.style.top=a,e.style.left=l):e.style.transform="translate3d("+l+", "+a+", 0)",e.setAttribute(f,""),c=d[t],u=h[t],c&&u&&(s[o]+=u+r.gutter)}))}function A(){b.style.position="relative",b.style.width=r.columns*c+(r.columns-1)*r.gutter+"px",b.style.height=Math.max.apply(Math,s)-r.gutter+"px"}function j(){n||(window.requestAnimationFrame(L),n=!0)}function L(){i!==C()&&(z(),w.emit("resize",r)),n=!1}function z(){return t=!1,_(y.concat(x)),w.emit("pack")}function I(){return t=!0,_(x),w.emit("update")}function R(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?"addEventListener":"removeEventListener";return window[t]("resize",j),w}}}),IT=Lc(zT),RT={exports:{}},FT={exports:{}};!function(e,n){Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=t,o=a(r),s=a(wh.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),i(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),i=void 0;if(this.props.useWindow){var r=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:r.scrollTop;i=this.props.isReverse?o:this.calculateOffset(e,o)}else i=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;i<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,i=t.element,r=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 i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);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 r&&(a?s?u.unshift(a):u.push(a):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(i,c,u)}}]),t}(r.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},n.default=l,e.exports=n["default"]}(FT,FT.exports),RT.exports=FT.exports,Object.defineProperty(AT,"__esModule",{value:!0});var BT,PT,UT=AT.default=void 0,HT=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),$T=t,WT=GT($T),qT=GT(wh.exports),VT=GT(IT),KT=GT(RT.exports);function GT(e){return e&&e.__esModule?e:{default:e}}function YT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QT(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 ZT=(PT=BT=function(e){function t(){var e,n,i;YT(this,t);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n=i=QT(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),i.setContainerRef=function(e){i.masonryContainer=e},i.forcePack=function(){i.masonryContainer&&i.state.instance.pack()},i.forceUpdate=function(){i.masonryContainer&&i.state.instance.update()},i.createNewInstance=function(){var e=i.props,t=e.packed,n=e.sizes,r=e.children,o=e.position,s=(0,VT.default)({container:i.masonryContainer,packed:t,sizes:n,position:o});s.resize(!0),r.length>0&&s.pack(),i.setState((function(){return{instance:s}}))},QT(i,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,$T.Component),HT(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,i=e.style;e.pack,e.packed,e.position,e.sizes;var r=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(e,["children","className","style","pack","packed","position","sizes"]);return WT.default.createElement(KT.default,r,WT.default.createElement("div",{ref:this.setContainerRef,className:n,style:i},t))}}]),t}(),BT.propTypes={children:qT.default.arrayOf(qT.default.element).isRequired,className:qT.default.string,initialLoad:qT.default.bool,pack:qT.default.bool,packed:qT.default.string,position:qT.default.bool,sizes:qT.default.array,style:qT.default.object},BT.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:{}},PT);UT=AT.default=ZT;const JT=()=>t.createElement("div",{className:"neeto-editor-loader"},t.createElement("span",{className:"neeto-editor-loader__spinner-icon"})),XT=e=>{let{onSubmit:n,unsplashApiKey:i}=e;const s=c(null),[a,l]=r(""),[u,p]=r(!1),[d,h]=r([]),[f,m]=r(1),[g,b]=r(!0),[v,y]=r(!1),x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:800;const[n,i]=r(e);return o((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e]),n}(a||"latest");o((()=>{w(1)}),[x]);const w=async e=>{try{y(!0),p(!1);const t=await(e=>{let{pageNo:t,query:n,apiKey:i}=e;return UO.get(Bc,{headers:{Authorization:`Client-ID ${i}`},params:{page:t,per_page:30,order_by:"popular",query:n}})})({page:e,query:x,apiKey:i}),{data:{results:n,total_pages:r}}=t;h(1===e?n:[...d,...n]),m(e+1),b(e<r)}catch{p(!0)}finally{y(!1)}};return t.createElement("div",{className:"neeto-editor-unsplash-wrapper"},t.createElement(gm,{autoFocus:!0,"data-cy":"neeto-editor-unsplash-image-picker-search-input",name:"text",placeholder:"Search Unsplash",value:a,onChange:e=>{let{target:{value:t}}=e;l(t)}}),u&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-error"},"Something went wrong! Please try again later."),!u&&!v&&qu(d)&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text","data-cy":"neeto-editor-unsplash-image-picker-no-results-error"},"No results"),!u&&t.createElement("div",{className:"neeto-editor-unsplash-container"},t.createElement(UT,{pack:!0,position:!0,className:"neeto-editor-unsplash-gallery",hasMore:g,loadMore:()=>{!v&&g&&f>1&&w(f)},loader:t.createElement(JT,{key:0}),ref:s,style:{width:"100%"},useWindow:!1,sizes:[{columns:3,gutter:0},{mq:"768px",columns:3,gutter:0},{mq:"1024px",columns:3,gutter:0}]},d&&d.map(((e,i)=>t.createElement("div",{className:"neeto-editor-unsplash-gallery__item","data-cy":`neeto-editor-unsplash-image-picker-result-${i}`,key:i},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-placeholder",style:{paddingBottom:`${e.height/e.width*100}%`}},t.createElement("div",{className:"neeto-editor-unsplash-gallery__item-inner",id:`unsplashImage${i}`},t.createElement("img",{src:e.urls.regular,onClick:()=>n(e.urls.small)}),t.createElement("a",{href:`https://unsplash.com/@${e.user.username}`,rel:"noreferrer",target:"_blank"},e.user.name," "))))))),!g&&t.createElement("p",{className:"neeto-editor-unsplash-gallery__text"},"End of results")))},eS=e=>{let{buttonLabel:n="Submit",placeholder:i,onSubmit:o,className:s}=e;const[a,l]=r(""),[c,u]=r("");return t.createElement("div",{className:Rc("neeto-editor-url-form__wrapper",{[s]:s})},t.createElement(gm,{autoFocus:!0,"data-cy":"neeto-editor-image-upload-url-input",error:c,name:"url",placeholder:i,value:a,onChange:e=>{let{target:{value:t}}=e;return l(t)},onFocus:()=>u("")}),t.createElement(rm,{"data-cy":"neeto-editor-image-upload-url-submit",disabled:!a,label:n,onClick:e=>{e.preventDefault(),Uc.test(a)?o(a):u("Please enter a valid url")}}))},tS=e=>{let{isOpen:n,onClose:i,editor:o,imageUploadUrl:s,uploadConfig:a,unsplashApiKey:l}=e;const[c,u]=(e=>{var t;const[n,i]=r(null===(t=e[0])||void 0===t?void 0:t.key);return[n,e=>i(e.key)]})(fm),[p,d]=r(""),h=!!l,f=e=>{d(e)},m={local:()=>t.createElement(NT,{endpoint:s,uploadConfig:a,onSuccess:f}),link:()=>t.createElement(eS,{buttonLabel:"Upload Image",placeholder:"Paste the image link",onSubmit:f}),unsplash:()=>t.createElement(XT,{unsplashApiKey:l,onSubmit:f})}[c];return t.createElement(am,{closeButton:!1,isOpen:n,onClose:()=>{i(),u(fm[0])}},t.createElement("div",{className:"neeto-editor-image-uploader"},t.createElement(pm,null,fm.filter((e=>"unsplash"!==e.key||h)).map((e=>t.createElement(pm.Item,{active:c===e.key,key:e.key,onClick:()=>u(e)},e.title)))),t.createElement("div",{className:"neeto-editor-image-uploader__content"},p?t.createElement(bm,{editor:o,url:p,onClose:()=>{d(""),i()}}):t.createElement(m,null))))};var nS=Jc;var iS="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,i=arguments.length;n<i;){var r=arguments[n];if(null!=r)for(var o in r)nS(o,r)&&(t[o]=r[o]);n+=1}return t},rS=iS,oS=Qc((function(e,t){return rS({},t,e)})),sS=oS;const aS=as.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 Zt({key:new en("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const i=this.storage.characters({node:t.doc}),r=this.storage.characters({node:e.doc});if(r<=n)return!0;if(i>n&&r>n&&r<=i)return!0;if(i>n&&r>n&&r>i)return!1;if(!e.getMeta("paste"))return!1;const o=e.selection.$head.pos,s=o-(r-n),a=o;e.deleteRange(s,a);return!(this.storage.characters({node:e.doc})>n)}})]}}),lS=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,cS=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,uS=Js.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",Ho(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[Gs({find:lS,type:this.type})]},addPasteRules(){return[ea({find:cS,type:this.type})]}}),pS=Xs.create({name:"doc",topNode:!0,content:"block+"}),dS=as.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new Zt({key:new en("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:i}=this.editor,{anchor:r}=t,o=[];if(!n||!i)return Br.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(r>=t&&r<=t+e.nodeSize-1))return!1;s+=1}));let a=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(r>=t&&r<=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(Ir.node(t,t+e.nodeSize,{class:this.options.className}))})),Br.create(e,o)}}})]}}),hS=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,fS=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,mS=Js.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",Ho(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[Gs({find:hS,type:this.type})]},addPasteRules(){return[ea({find:fS,type:this.type})]}});function gS(e){this.j={},this.jr=[],this.jd=null,this.t=e}gS.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,i=this.j[e];if(i)return n&&(i.t=n),i;i=bS();var r=wS(this,e);return r?(Object.assign(i.j,r.j),i.jr.append(r.jr),i.jr=r.jd,i.t=n||r.t):i.t=n,this.j[e]=i,i}};var bS=function(){return new gS},vS=function(e){return new gS(e)},yS=function(e,t,n){e.j[t]||(e.j[t]=n)},xS=function(e,t,n){e.jr.push([t,n])},wS=function(e,t){var n=e.j[t];if(n)return n;for(var i=0;i<e.jr.length;i++){var r=e.jr[i][0],o=e.jr[i][1];if(r.test(t))return o}return e.jd},_S=function(e,t,n){for(var i=0;i<t.length;i++)yS(e,t[i],n)},kS=function(e,t){for(var n=0;n<t.length;n++){var i=t[n][0],r=t[n][1];yS(e,i,r)}},ES=function(e,t,n,i){for(var r,o=0,s=t.length;o<s&&(r=e.j[t[o]]);)e=r,o++;if(o>=s)return[];for(;o<s-1;)r=i(),yS(e,t[o],r),e=r,o++;yS(e,t[s-1],n)},CS="DOMAIN",MS="LOCALHOST",OS="TLD",DS="NUM",TS="PROTOCOL",SS="MAILTO",NS="WS",AS="NL",jS="OPENBRACE",LS="OPENBRACKET",zS="OPENANGLEBRACKET",IS="OPENPAREN",RS="CLOSEBRACE",FS="CLOSEBRACKET",BS="CLOSEANGLEBRACKET",PS="CLOSEPAREN",US="AMPERSAND",HS="APOSTROPHE",$S="ASTERISK",WS="AT",qS="BACKSLASH",VS="BACKTICK",KS="CARET",GS="COLON",YS="COMMA",QS="DOLLAR",ZS="DOT",JS="EQUALS",XS="EXCLAMATION",eN="HYPHEN",tN="PERCENT",nN="PIPE",iN="PLUS",rN="POUND",oN="QUERY",sN="QUOTE",aN="SEMI",lN="SLASH",cN="TILDE",uN="UNDERSCORE",pN="SYM",dN=Object.freeze({__proto__:null,DOMAIN:CS,LOCALHOST:MS,TLD:OS,NUM:DS,PROTOCOL:TS,MAILTO:SS,WS:NS,NL:AS,OPENBRACE:jS,OPENBRACKET:LS,OPENANGLEBRACKET:zS,OPENPAREN:IS,CLOSEBRACE:RS,CLOSEBRACKET:FS,CLOSEANGLEBRACKET:BS,CLOSEPAREN:PS,AMPERSAND:US,APOSTROPHE:HS,ASTERISK:$S,AT:WS,BACKSLASH:qS,BACKTICK:VS,CARET:KS,COLON:GS,COMMA:YS,DOLLAR:QS,DOT:ZS,EQUALS:JS,EXCLAMATION:XS,HYPHEN:eN,PERCENT:tN,PIPE:nN,PLUS:iN,POUND:rN,QUERY:oN,QUOTE:sN,SEMI:aN,SLASH:lN,TILDE:cN,UNDERSCORE:uN,SYM:pN}),hN="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(" "),fN=/(?:[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])/,mN=/(?:[#\*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])/,gN=/\uFE0F/,bN=/\d/,vN=/\s/;function yN(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=bS(),n=vS(DS),i=vS(CS),r=bS(),o=vS(NS),s=[[bN,i],[fN,i],[mN,i],[gN,i]],a=function(){var e=vS(CS);return e.j={"-":r},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};kS(t,[["'",vS(HS)],["{",vS(jS)],["[",vS(LS)],["<",vS(zS)],["(",vS(IS)],["}",vS(RS)],["]",vS(FS)],[">",vS(BS)],[")",vS(PS)],["&",vS(US)],["*",vS($S)],["@",vS(WS)],["`",vS(VS)],["^",vS(KS)],[":",vS(GS)],[",",vS(YS)],["$",vS(QS)],[".",vS(ZS)],["=",vS(JS)],["!",vS(XS)],["-",vS(eN)],["%",vS(tN)],["|",vS(nN)],["+",vS(iN)],["#",vS(rN)],["?",vS(oN)],['"',vS(sN)],["/",vS(lN)],[";",vS(aN)],["~",vS(cN)],["_",vS(uN)],["\\",vS(qS)]]),yS(t,"\n",vS(AS)),xS(t,vN,o),yS(o,"\n",bS()),xS(o,vN,o);for(var c=0;c<hN.length;c++)ES(t,hN[c],l(OS),a);var u=a(),p=a(),d=a(),h=a();ES(t,"file",u,a),ES(t,"ftp",p,a),ES(t,"http",d,a),ES(t,"mailto",h,a);var f=a(),m=vS(TS),g=vS(SS);yS(p,"s",f),yS(p,":",m),yS(d,"s",f),yS(d,":",m),yS(u,":",m),yS(f,":",m),yS(h,":",g);for(var b=a(),v=0;v<e.length;v++)ES(t,e[v],b,a);return yS(b,":",m),ES(t,"localhost",l(MS),a),xS(t,bN,n),xS(t,fN,i),xS(t,mN,i),xS(t,gN,i),xS(n,bN,n),xS(n,fN,i),xS(n,mN,i),xS(n,gN,i),yS(n,"-",r),yS(i,"-",r),yS(r,"-",r),xS(i,bN,i),xS(i,fN,i),xS(i,mN,i),xS(i,gN,i),xS(r,bN,i),xS(r,fN,i),xS(r,mN,i),xS(r,gN,i),t.jd=vS(pN),t}var xN={defaultProtocol:"http",events:null,format:wN,formatHref:wN,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function wN(e){return e}function _N(){}function kN(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]:{},i=Object.create(e.prototype);for(var r in n)i[r]=n[r];i.constructor=t,t.prototype=i}(_N,n,t),n}_N.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]:xN.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var EN=kN("email",{isLink:!0}),CN=kN("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),MN=kN("text"),ON=kN("nl"),DN=kN("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xN.defaultProtocol,t=this.tk,n=!1,i=!1,r=[],o=0;t[o].t===TS;)n=!0,r.push(t[o].v),o++;for(;t[o].t===lN;)i=!0,r.push(t[o].v),o++;for(;o<t.length;o++)r.push(t[o].v);return r=r.join(""),n||i||(r="".concat(e,"://").concat(r)),r},hasProtocol:function(){return this.tk[0].t===TS}}),TN=Object.freeze({__proto__:null,MultiToken:_N,Base:_N,createTokenClass:kN,MailtoEmail:EN,Email:CN,Text:MN,Nl:ON,Url:DN});function SN(){var e=bS(),t=bS(),n=bS(),i=bS(),r=bS(),o=bS(),s=bS(),a=vS(DN),l=bS(),c=vS(DN),u=vS(DN),p=bS(),d=bS(),h=bS(),f=bS(),m=bS(),g=vS(DN),b=vS(DN),v=vS(DN),y=vS(DN),x=bS(),w=bS(),_=bS(),k=bS(),E=bS(),C=bS(),M=vS(CN),O=bS(),D=vS(CN),T=vS(EN),S=bS(),N=bS(),A=bS(),j=bS(),L=vS(ON);yS(e,AS,L),yS(e,TS,t),yS(e,SS,n),yS(t,lN,i),yS(i,lN,r),yS(e,OS,o),yS(e,CS,o),yS(e,MS,a),yS(e,DS,o),yS(r,OS,u),yS(r,CS,u),yS(r,DS,u),yS(r,MS,u),yS(o,ZS,s),yS(E,ZS,C),yS(s,OS,a),yS(s,CS,o),yS(s,DS,o),yS(s,MS,o),yS(C,OS,M),yS(C,CS,E),yS(C,DS,E),yS(C,MS,E),yS(a,ZS,s),yS(M,ZS,C),yS(a,GS,l),yS(a,lN,u),yS(l,DS,c),yS(c,lN,u),yS(M,GS,O),yS(O,DS,D);var z=[US,$S,WS,qS,VS,KS,QS,CS,JS,eN,MS,DS,tN,nN,iN,rN,TS,lN,pN,cN,OS,uN],I=[HS,BS,RS,FS,PS,GS,YS,ZS,XS,zS,jS,LS,IS,oN,sN,aN];yS(u,jS,d),yS(u,LS,h),yS(u,zS,f),yS(u,IS,m),yS(p,jS,d),yS(p,LS,h),yS(p,zS,f),yS(p,IS,m),yS(d,RS,u),yS(h,FS,u),yS(f,BS,u),yS(m,PS,u),yS(g,RS,u),yS(b,FS,u),yS(v,BS,u),yS(y,PS,u),yS(x,RS,u),yS(w,FS,u),yS(_,BS,u),yS(k,PS,u),_S(d,z,g),_S(h,z,b),_S(f,z,v),_S(m,z,y),_S(d,I,x),_S(h,I,w),_S(f,I,_),_S(m,I,k),_S(g,z,g),_S(b,z,b),_S(v,z,v),_S(y,z,y),_S(g,I,g),_S(b,I,b),_S(v,I,v),_S(y,I,y),_S(x,z,g),_S(w,z,b),_S(_,z,v),_S(k,z,y),_S(x,I,x),_S(w,I,w),_S(_,I,_),_S(k,I,k),_S(u,z,u),_S(p,z,u),_S(u,I,p),_S(p,I,p),yS(n,OS,T),yS(n,CS,T),yS(n,DS,T),yS(n,MS,T),_S(T,z,T),_S(T,I,S),_S(S,z,T),_S(S,I,S);var R=[US,HS,$S,qS,VS,KS,RS,QS,CS,JS,eN,DS,jS,tN,nN,iN,rN,oN,lN,pN,cN,OS,uN];return _S(o,R,N),yS(o,WS,A),_S(a,R,N),yS(a,WS,A),_S(s,R,N),_S(N,R,N),yS(N,WS,A),yS(N,ZS,j),_S(j,R,N),yS(A,OS,E),yS(A,CS,E),yS(A,DS,E),yS(A,MS,M),e}function NN(e,t,n){var i=n[0].s,r=n[n.length-1].e;return new e(t.substr(i,r-i),n)}var AN="undefined"!=typeof console&&console&&console.warn||function(){},jN={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function LN(e){if(jN.initialized&&AN('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");jN.customProtocols.push(e)}function zN(e){return jN.initialized||function(){jN.scanner={start:yN(jN.customProtocols),tokens:dN},jN.parser={start:SN(),tokens:TN};for(var e={createTokenClass:kN},t=0;t<jN.pluginQueue.length;t++)jN.pluginQueue[t][1]({scanner:jN.scanner,parser:jN.parser,utils:e});jN.initialized=!0}(),function(e,t,n){for(var i=n.length,r=0,o=[],s=[];r<i;){for(var a=e,l=null,c=null,u=0,p=null,d=-1;r<i&&!(l=wS(a,n[r].t));)s.push(n[r++]);for(;r<i&&(c=l||wS(a,n[r].t));)l=null,(a=c).accepts()?(d=0,p=a):d>=0&&d++,r++,u++;if(d<0)for(var h=r-u;h<r;h++)s.push(n[h]);else{s.length>0&&(o.push(NN(MN,t,s)),s=[]),r-=d,u-=d;var f=p.t,m=n.slice(r-u,r);o.push(NN(f,t,m))}}return s.length>0&&o.push(NN(MN,t,s)),o}(jN.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,i=0;i<n;){var r=e.charCodeAt(i),o=void 0,s=r<55296||r>56319||i+1===n||(o=e.charCodeAt(i+1))<56320||o>57343?e[i]:e.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),i=n.length,r=[],o=0,s=0;s<i;){for(var a=e,l=null,c=0,u=null,p=-1,d=-1;s<i&&(l=wS(a,n[s]));)(a=l).accepts()?(p=0,d=0,u=a):p>=0&&(p+=n[s].length,d++),c+=n[s].length,o+=n[s].length,s++;o-=p,s-=d,c-=p,r.push({t:u.t,v:t.substr(o-c,c),s:o-c,e:o})}return r}(jN.scanner.start,e))}function IN(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=zN(e),i=[],r=0;r<n.length;r++){var o=n[r];!o.isLink||t&&o.t!==t||i.push(o.toObject())}return i}function RN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=zN(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function FN(e){return new Zt({key:new en("autolink"),appendTransaction:(t,n,i)=>{const r=t.some((e=>e.docChanged))&&!n.doc.eq(i.doc),o=t.some((e=>e.getMeta("preventAutolink")));if(!r||o)return;const{tr:s}=i,a=function(e,t){const n=new Ot(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,i=[];return t.maps.forEach(((e,r)=>{const o=[];if(e.ranges.length)e.forEach(((e,t)=>{o.push({from:e,to:t})}));else{const{from:e,to:t}=n[r];if(void 0===e||void 0===t)return;o.push({from:e,to:t})}o.forEach((({from:e,to:n})=>{const o=t.slice(r).map(e,-1),s=t.slice(r).map(n),a=t.invert().map(o,-1),l=t.invert().map(s);i.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),Ns(i)}(a);return c.forEach((({oldRange:t,newRange:r})=>{As(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const r=As(l.map(t.from),l.map(t.to),i.doc).filter((t=>t.mark.type===e.type));if(!r.length)return;const o=r[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=i.doc.textBetween(o.from,o.to,void 0," "),u=RN(a),p=RN(c);u&&!p&&s.removeMark(o.from,o.to,e.type)}));const o=function(e,t,n){const i=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&i.push({node:e,pos:t})})),i}(i.doc,r,(e=>e.isTextblock));let a,c;if(o.length>1?(a=o[0],c=i.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):o.length&&i.doc.textBetween(r.from,r.to," "," ").endsWith(" ")&&(a=o[0],c=i.doc.textBetween(a.pos,r.to,void 0," ")),a&&c){const t=c.split(" ").filter((e=>""!==e));if(t.length<=0)return!1;const n=t[t.length-1],i=a.pos+c.lastIndexOf(n);if(!n)return!1;IN(n).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:i+e.start+1,to:i+e.end+1}))).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}})),s.steps.length?s:void 0}})}const BN=Js.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(LN)},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",Ho(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[ea({find:e=>IN(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(FN({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new Zt({key:new en("handleClickLink"),props:{handleClick:(e,n,i)=>{var r;const o=Ss(e.state,t.type.name);return!(!(null===(r=i.target)||void 0===r?void 0:r.closest("a"))||!o.href||(window.open(o.href,o.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new Zt({key:new en("handlePasteLink"),props:{handlePaste:(t,n,i)=>{const{state:r}=t,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach((e=>{a+=e.textContent}));const l=IN(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}}),PN=Js.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",Ho(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()}}}),UN=/^\s*>\s$/,HN=Xs.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",Ho(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[Zs({find:UN,type:this.type})]}}),$N=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,WN=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,qN=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,VN=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,KN=Js.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",Ho(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[Gs({find:$N,type:this.type}),Gs({find:qN,type:this.type})]},addPasteRules(){return[ea({find:WN,type:this.type}),ea({find:VN,type:this.type})]}}),GN=/^\s*([-+*])\s$/,YN=Xs.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",Ho(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[Zs({find:GN,type:this.type})]}}),QN=/^```([a-z]+)?[\s\n]$/,ZN=/^~~~([a-z]+)?[\s\n]$/,JN=Xs.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,i=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return i||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",Ho(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:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;const o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!o||!s)&&e.chain().command((({tr:e})=>(e.delete(i.pos-2,i.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:i}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;if(!(r.parentOffset===r.parent.nodeSize-2))return!1;const s=r.after();if(void 0===s)return!1;return!i.nodeAt(s)&&e.commands.exitCode()}}},addInputRules(){return[Qs({find:QN,type:this.type,getAttributes:e=>({language:e[1]})}),Qs({find:ZN,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Zt({key:new en("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"),i=t.clipboardData.getData("vscode-editor-data"),r=i?JSON.parse(i):void 0,o=null==r?void 0:r.mode;if(!n||!o)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(jt.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 XN(e={}){return new Zt({view:t=>new eA(t,e)})}class eA{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,i=t.nodeAfter;if(n||i){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),r=n?t.bottom:t.top;n&&i&&(r=(r+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:t.left,right:t.right,top:r-this.width/2,bottom:r+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,i,r=this.editorView.dom.offsetParent;if(this.element||(this.element=r.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),!r||r==document.body&&"static"==getComputedStyle(r).position)n=-pageXOffset,i=-pageYOffset;else{let e=r.getBoundingClientRect();n=e.left-r.scrollLeft,i=e.top-r.scrollTop}this.element.style.left=e.left-n+"px",this.element.style.top=e.top-i+"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),i=n&&n.type.spec.disableDropCursor,r="function"==typeof i?i(this.editorView,t):i;if(t&&!r){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&(e=ht(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 tA=as.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[XN(this.options)]}});class nA extends Tt{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return nA.valid(n)?new nA(n):Tt.near(n)}content(){return B.empty}eq(e){return e instanceof nA&&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 nA(e.resolve(t.pos))}getBookmark(){return new iA(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),i=e.node(t);if(0!=n)for(let e=i.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(i.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n!=i.childCount)for(let e=i.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(i.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&nA.valid(e))return e;let i=e.pos,r=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){r=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;i+=t;let s=e.doc.resolve(i);if(nA.valid(s))return s}for(;;){let o=t>0?r.firstChild:r.lastChild;if(!o){if(r.isAtom&&!r.isText&&!zt.isSelectable(r)){e=e.doc.resolve(i+r.nodeSize*t),n=!1;continue e}break}r=o,i+=t;let s=e.doc.resolve(i);if(nA.valid(s))return s}return null}}}nA.prototype.visible=!1,nA.findFrom=nA.findGapCursorFrom,Tt.jsonID("gapcursor",nA);class iA{constructor(e){this.pos=e}map(e){return new iA(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return nA.valid(t)?new nA(t):Tt.near(t)}}const rA=Eo({ArrowLeft:oA("horiz",-1),ArrowRight:oA("horiz",1),ArrowUp:oA("vert",-1),ArrowDown:oA("vert",1)});function oA(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,i,r){let o=e.selection,s=t>0?o.$to:o.$from,a=o.empty;if(o instanceof jt){if(!r.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=nA.findGapCursorFrom(s,t,a);return!!l&&(i&&i(e.tr.setSelection(new nA(l))),!0)}}function sA(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!nA.valid(i))return!1;let r=e.posAtCoords({left:n.clientX,top:n.clientY});return!(r&&r.inside>-1&&zt.isSelectable(e.state.doc.nodeAt(r.inside)))&&(e.dispatch(e.state.tr.setSelection(new nA(i))),!0)}function aA(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof nA))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let r=j.empty;for(let e=i.length-1;e>=0;e--)r=j.from(i[e].createAndFill(null,r));let o=e.state.tr.replace(n.pos,n.pos,new B(r,0,0));return o.setSelection(jt.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function lA(e){if(!(e.selection instanceof nA))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Br.create(e.doc,[Ir.widget(e.selection.head,t,{key:"gapcursor"})])}const cA=as.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Zt({props:{decorations:lA,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&nA.valid(n)?new nA(n):null,handleClick:sA,handleKeyDown:rA,handleDOMEvents:{beforeinput:aA}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=qo(Fo(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),uA=Xs.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",Ho(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:r}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:s}=i.extensionManager,a=r||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()}}}),pA=Xs.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]}`,Ho(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=>Qs({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var dA=200,hA=function(){};hA.prototype.append=function(e){return e.length?(e=hA.from(e),!this.length&&e||e.length<dA&&this.leafAppend(e)||this.length<dA&&e.leafPrepend(this)||this.appendInner(e)):this},hA.prototype.prepend=function(e){return e.length?hA.from(e).append(this):this},hA.prototype.appendInner=function(e){return new mA(this,e)},hA.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?hA.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},hA.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},hA.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)},hA.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var i=[];return this.forEach((function(t,n){return i.push(e(t,n))}),t,n),i},hA.from=function(e){return e instanceof hA?e:e&&e.length?new fA(e):hA.empty};var fA=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,i){for(var r=t;r<n;r++)if(!1===e(this.values[r],i+r))return!1},t.prototype.forEachInvertedInner=function(e,t,n,i){for(var r=t-1;r>=n;r--)if(!1===e(this.values[r],i+r))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=dA)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=dA)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}(hA);hA.empty=new fA([]);var mA=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,i){var r=this.left.length;return!(t<r&&!1===this.left.forEachInner(e,t,Math.min(n,r),i))&&(!(n>r&&!1===this.right.forEachInner(e,Math.max(t-r,0),Math.min(this.length,n)-r,i+r))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,i){var r=this.left.length;return!(t>r&&!1===this.right.forEachInvertedInner(e,t-r,Math.max(n,r)-r,i+r))&&(!(n<r&&!1===this.left.forEachInvertedInner(e,Math.min(t,r),n,i))&&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}(hA),gA=hA;const bA=500;class vA{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,i,r=this.items.length;for(;;r--){if(this.items.get(r-1).selection){--r;break}}t&&(n=this.remapping(r,this.items.length),i=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(r,t+1),i=n.maps.length),i--,void c.push(e);if(n){c.push(new yA(e.map));let t,r=e.step.map(n.slice(i));r&&a.maybeStep(r).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new yA(t,void 0,void 0,l.length+c.length))),i--,t&&n.appendMap(t,i)}else a.maybeStep(e.step);return e.selection?(o=n?e.selection.map(n.slice(i)):e.selection,s=new vA(this.items.slice(0,r).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,i){let r=[],o=this.eventCount,s=this.items,a=!i&&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 yA(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?r.pop():s=s.slice(0,s.length-1)),r.push(u),t&&(o++,t=void 0),i||(a=u)}let l=o-n.depth;return l>wA&&(s=function(e,t){let n;return e.forEach(((e,i)=>{if(e.selection&&0==t--)return n=i,!1})),e.slice(n)}(s,l),o-=l),new vA(s.append(r),o)}remapping(e,t){let n=new Ye;return this.items.forEach(((t,i)=>{let r=null!=t.mirrorOffset&&i-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,r)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new vA(this.items.append(e.map((e=>new yA(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),r=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),i);let a=t;this.items.forEach((t=>{let i=r.getMirror(--a);if(null==i)return;o=Math.min(o,i);let l=r.maps[i];if(t.step){let o=e.steps[i].invert(e.docs[i]),c=t.selection&&t.selection.map(r.slice(a+1,i));c&&s++,n.push(new yA(l,o,c))}else n.push(new yA(l))}),i);let l=[];for(let e=t;e<o;e++)l.push(new yA(r.maps[e]));let c=this.items.slice(0,i).append(l).append(n),u=new vA(c,s);return u.emptyItemCount()>bA&&(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,i=[],r=0;return this.items.forEach(((o,s)=>{if(s>=e)i.push(o),o.selection&&r++;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&&r++;let l,c=new yA(s.invert(),e,a),u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else o.map&&n--}),this.items.length,0),new vA(gA.from(i.reverse()),r)}}vA.empty=new vA(gA.empty,0);class yA{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new yA(t.getMap().invert(),t,this.selection)}}}class xA{constructor(e,t,n,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i}}const wA=20;function _A(e){let t=[];return e.forEach(((e,n,i,r)=>t.push(i,r))),t}function kA(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let r=t.map(e[i],1),o=t.map(e[i+1],-1);r<=o&&n.push(r,o)}return n}function EA(e,t,n,i){let r=OA(t),o=DA.get(t).spec.config,s=(i?e.undone:e.done).popEvent(t,r);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(i?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,r),c=new xA(i?l:s.remaining,i?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(DA,{redo:i,historyState:c}).scrollIntoView())}let CA=!1,MA=null;function OA(e){let t=e.plugins;if(MA!=t){CA=!1,MA=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){CA=!0;break}}return CA}const DA=new en("history"),TA=new en("closeHistory");function SA(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Zt({key:DA,state:{init:()=>new xA(vA.empty,vA.empty,null,0),apply:(t,n,i)=>function(e,t,n,i){let r,o=n.getMeta(DA);if(o)return o.historyState;n.getMeta(TA)&&(e=new xA(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(DA))return s.getMeta(DA).redo?new xA(e.done.addTransform(n,void 0,i,OA(t)),e.undone,_A(n.mapping.maps[n.steps.length-1]),e.prevTime):new xA(e.done,e.undone.addTransform(n,void 0,i,OA(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(r=n.getMeta("rebased"))?new xA(e.done.rebased(n,r),e.undone.rebased(n,r),kA(e.prevRanges,n.mapping),e.prevTime):new xA(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),kA(e.prevRanges,n.mapping),e.prevTime);{let r=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-i.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,i)=>{for(let r=0;r<t.length;r+=2)e<=t[r+1]&&i>=t[r]&&(n=!0)})),n}(n,e.prevRanges)),o=s?kA(e.prevRanges,n.mapping):_A(n.mapping.maps[n.steps.length-1]);return new xA(e.done.addTransform(n,r?t.selection.getBookmark():void 0,i,OA(t)),vA.empty,o,n.time)}}(n,i,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i="historyUndo"==n?NA:"historyRedo"==n?AA:null;return!!i&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}const NA=(e,t)=>{let n=DA.getState(e);return!(!n||0==n.done.eventCount)&&(t&&EA(n,e,t,!1),!0)},AA=(e,t)=>{let n=DA.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&EA(n,e,t,!0),!0)},jA=as.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>NA(e,t),redo:()=>({state:e,dispatch:t})=>AA(e,t)}),addProseMirrorPlugins(){return[SA(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()}}}),LA=Xs.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",Ho(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,i=t.end();if(t.nodeAfter)e.setSelection(jt.create(e.doc,t.pos));else{const r=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();r&&(e.insert(i,r),e.setSelection(jt.create(e.doc,i)))}e.scrollIntoView()}return!0})).run()}},addInputRules(){return[Ys({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),zA=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,IA=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,RA=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,FA=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,BA=Js.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",Ho(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[Gs({find:zA,type:this.type}),Gs({find:RA,type:this.type})]},addPasteRules(){return[ea({find:IA,type:this.type}),ea({find:FA,type:this.type})]}}),PA=Xs.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",Ho(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)}}}),UA=/^(\d+)\.\s$/,HA=Xs.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",Ho(this.options.HTMLAttributes,n),0]:["ol",Ho(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[Zs({find:UA,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]})]}}),$A=Xs.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",Ho(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),WA=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,qA=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,VA=Js.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",Ho(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[Gs({find:WA,type:this.type})]},addPasteRules(){return[ea({find:qA,type:this.type})]}}),KA=Xs.create({name:"text",group:"inline"}),GA=as.create({name:"starterKit",addExtensions(){var e,t,n,i,r,o,s,a,l,c,u,p,d,h,f,m,g,b;const v=[];return!1!==this.options.blockquote&&v.push(HN.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&v.push(KN.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&v.push(YN.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&v.push(uS.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&v.push(JN.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&v.push(pS.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&v.push(tA.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&v.push(cA.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&v.push(uA.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&v.push(pA.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&v.push(jA.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&v.push(LA.configure(null===(p=this.options)||void 0===p?void 0:p.horizontalRule)),!1!==this.options.italic&&v.push(BA.configure(null===(d=this.options)||void 0===d?void 0:d.italic)),!1!==this.options.listItem&&v.push(PA.configure(null===(h=this.options)||void 0===h?void 0:h.listItem)),!1!==this.options.orderedList&&v.push(HA.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&v.push($A.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&v.push(VA.configure(null===(g=this.options)||void 0===g?void 0:g.strike)),!1!==this.options.text&&v.push(KA.configure(null===(b=this.options)||void 0===b?void 0:b.text)),v}});var YA={exports:{}};function QA(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)||QA(n)})),e}YA.exports=QA,YA.exports.default=QA;class ZA{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function JA(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function XA(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 ej="</span>",tj=e=>!!e.scope||e.sublanguage&&e.language;class nj{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=JA(e)}openNode(e){if(!tj(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){tj(e)&&(this.buffer+=ej)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const ij=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class rj{constructor(){this.rootNode=ij(),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=ij({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=>{rj._collapse(e)})))}}class oj extends rj{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 nj(this,this.options).value()}finalize(){return!0}}function sj(e){return e?"string"==typeof e?e:e.source:null}function aj(e){return uj("(?=",e,")")}function lj(e){return uj("(?:",e,")*")}function cj(e){return uj("(?:",e,")?")}function uj(...e){const t=e.map((e=>sj(e))).join("");return t}function pj(...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=>sj(e))).join("|")+")";return n}function dj(e){return new RegExp(e.toString()+"|").exec("").length-1}const hj=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function fj(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let i=sj(e),r="";for(;i.length>0;){const e=hj.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)}const mj="[a-zA-Z]\\w*",gj="[a-zA-Z_]\\w*",bj="\\b\\d+(\\.\\d+)?",vj="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",yj="\\b(0b[01]+)",xj={begin:"\\\\[\\s\\S]",relevance:0},wj={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[xj]},_j={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[xj]},kj=function(e,t,n={}){const i=XA({scope:"comment",begin:e,end:t,contains:[]},n);i.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 r=pj("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 i.contains.push({begin:uj(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},Ej=kj("//","$"),Cj=kj("/\\*","\\*/"),Mj=kj("#","$"),Oj={scope:"number",begin:bj,relevance:0},Dj={scope:"number",begin:vj,relevance:0},Tj={scope:"number",begin:yj,relevance:0},Sj={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[xj,{begin:/\[/,end:/\]/,relevance:0,contains:[xj]}]}]},Nj={scope:"title",begin:mj,relevance:0},Aj={scope:"title",begin:gj,relevance:0},jj={begin:"\\.\\s*"+gj,relevance:0};var Lj=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:mj,UNDERSCORE_IDENT_RE:gj,NUMBER_RE:bj,C_NUMBER_RE:vj,BINARY_NUMBER_RE:yj,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=uj(t,/.*\b/,e.binary,/\b.*/)),XA({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:xj,APOS_STRING_MODE:wj,QUOTE_STRING_MODE:_j,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:kj,C_LINE_COMMENT_MODE:Ej,C_BLOCK_COMMENT_MODE:Cj,HASH_COMMENT_MODE:Mj,NUMBER_MODE:Oj,C_NUMBER_MODE:Dj,BINARY_NUMBER_MODE:Tj,REGEXP_MODE:Sj,TITLE_MODE:Nj,UNDERSCORE_TITLE_MODE:Aj,METHOD_GUARD:jj,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 zj(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Ij(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Rj(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=zj,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Fj(e,t){Array.isArray(e.illegal)&&(e.illegal=pj(...e.illegal))}function Bj(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 Pj(e,t){void 0===e.relevance&&(e.relevance=1)}const Uj=(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=uj(n.beforeMatch,aj(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Hj=["of","and","for","in","not","or","if","then","parent","list","value"],$j="keyword";function Wj(e,t,n=$j){const i=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((function(n){Object.assign(i,Wj(e[n],t,n))})),i;function r(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,qj(n[0],n[1])]}))}}function qj(e,t){return t?Number(t):function(e){return Hj.includes(e.toLowerCase())}(e)?0:1}const Vj={},Kj=e=>{console.error(e)},Gj=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Yj=(e,t)=>{Vj[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Vj[`${e}/${t}`]=!0)},Qj=new Error;function Zj(e,t,{key:n}){let i=0;const r=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+i]=r[e],o[e+i]=!0,i+=dj(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function Jj(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 Kj("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Qj;if("object"!=typeof e.beginScope||null===e.beginScope)throw Kj("beginScope must be object"),Qj;Zj(e,e.begin,{key:"beginScope"}),e.begin=fj(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Kj("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Qj;if("object"!=typeof e.endScope||null===e.endScope)throw Kj("endScope must be object"),Qj;Zj(e,e.end,{key:"endScope"}),e.end=fj(e.end,{joinWith:""})}}(e)}function Xj(e){function t(t,n){return new RegExp(sj(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+=dj(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(fj(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)),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{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=XA(e.classNameAliases||{}),function n(r,o){const s=r;if(r.isCompiled)return s;[Ij,Bj,Jj,Uj].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[Rj,Fj,Pj].forEach((e=>e(r,o))),r.isCompiled=!0;let a=null;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),a=r.keywords.$pattern,delete r.keywords.$pattern),a=a||/\w+/,r.keywords&&(r.keywords=Wj(r.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(r.begin||(r.begin=/\B|\b/),s.beginRe=t(s.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(s.endRe=t(s.end)),s.terminatorEnd=sj(s.end)||"",r.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(s.illegalRe=t(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return XA(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(eL(e))return XA(e,{starts:e.starts?XA(e.starts):null});if(Object.isFrozen(e))return XA(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){n(e,s)})),r.starts&&n(r.starts,o),s.matcher=function(e){const t=new i;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 eL(e){return!!e&&(e.endsWithParent||eL(e.starts))}var tL="11.6.0";class nL extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const iL=JA,rL=XA,oL=Symbol("nomatch"),sL=7;var aL=function(e){const t=Object.create(null),n=Object.create(null),i=[];let r=!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:oj};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let i="",r="";"object"==typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(Yj("10.7.0","highlight(lang, code, ...args) has been deprecated."),Yj("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const o={code:i,language:r};v("before:highlight",o);const s=o.result?o.result:u(o.language,o.code,n);return s.code=o.code,v("after:highlight",s),s}function u(e,n,i,s){const l=Object.create(null);function c(){if(!E.keywords)return void M.addText(O);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(O),n="";for(;t;){n+=O.substring(e,t.index);const r=w.case_insensitive?t[0].toLowerCase():t[0],o=(i=r,E.keywords[i]);if(o){const[e,i]=o;if(M.addText(n),n="",l[r]=(l[r]||0)+1,l[r]<=sL&&(D+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(O)}var i;n+=O.substring(e),M.addText(n)}function d(){null!=E.subLanguage?function(){if(""===O)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void M.addText(O);e=u(E.subLanguage,O,!0,C[E.subLanguage]),C[E.subLanguage]=e._top}else e=p(O,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(D+=e.relevance),M.addSublanguage(e._emitter,e.language)}():c(),O=""}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],r=t[n];i?M.addKeyword(r,i):(O=r,c(),O=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&M.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(M.addKeyword(O,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),O=""):e.beginScope._multi&&(h(e.beginScope,t),O="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,t,n){let i=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(i){if(e["on:end"]){const n=new ZA(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===E.matcher.regexIndex?(O+=e[0],1):(N=!0,0)}function v(e){const t=e[0],i=n.substring(e.index),r=g(E,e,i);if(!r)return oL;const o=E;E.endScope&&E.endScope._wrap?(d(),M.addKeyword(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),h(E.endScope,e)):o.skip?O+=t:(o.returnEnd||o.excludeEnd||(O+=t),d(),o.excludeEnd&&(O=t));do{E.scope&&M.closeNode(),E.skip||E.subLanguage||(D+=E.relevance),E=E.parent}while(E!==r.parent);return r.starts&&f(r.starts,e),o.returnEnd?0:t.length}let y={};function x(t,o){const s=o&&o[0];if(O+=t,null==s)return d(),0;if("begin"===y.type&&"end"===o.type&&y.index===o.index&&""===s){if(O+=n.slice(o.index,o.index+1),!r){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,i=new ZA(n),r=[n.__beforeBegin,n["on:begin"]];for(const n of r)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?O+=t:(n.excludeBegin&&(O+=t),d(),n.returnBegin||n.excludeBegin||(O=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===o.type){const e=v(o);if(e!==oL)return e}if("illegal"===o.type&&""===s)return 1;if(S>1e5&&S>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return O+=s,s.length}const w=m(e);if(!w)throw Kj(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const _=Xj(w);let k="",E=s||_;const C={},M=new a.__emitter(a);!function(){const e=[];for(let t=E;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>M.openNode(e)))}();let O="",D=0,T=0,S=0,N=!1;try{for(E.matcher.considerAll();;){S++,N?N=!1:E.matcher.considerAll(),E.matcher.lastIndex=T;const e=E.matcher.exec(n);if(!e)break;const t=x(n.substring(T,e.index),e);T=e.index+t}return x(n.substring(T)),M.closeAllNodes(),M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:D,illegal:!1,_emitter:M,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:iL(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:k},_emitter:M};if(r)return{language:e,value:iL(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:E};throw t}}function p(e,n){n=n||a.languages||Object.keys(t);const i=function(e){const t={value:iL(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),r=n.filter(m).filter(b).map((t=>u(t,e,!1)));r.unshift(i);const o=r.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,p=l;return p.secondBest=c,p}function d(e){let t=null;const i=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||(Gj(o.replace("{}",n[1])),Gj("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(i))return;if(v("before:highlightElement",{el:e,language:i}),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 nL("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const r=t.textContent,s=i?c(r,{language:i,ignoreIllegals:!0}):p(r);e.innerHTML=s.value,function(e,t,i){const r=t&&n[t]||i;e.classList.add("hljs"),e.classList.add(`language-${r}`)}(e,i,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}),v("after:highlightElement",{el:e,result:s,text:r})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(d)}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 v(e,t){const n=e;i.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:p,highlightAll:f,highlightElement:d,highlightBlock:function(e){return Yj("10.7.0","highlightBlock will be removed entirely in v12.0"),Yj("10.7.0","Please use highlightElement now."),d(e)},configure:function(e){a=rL(a,e)},initHighlighting:()=>{f(),Yj("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),Yj("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,i){let o=null;try{o=i(e)}catch(e){if(Kj("Language definition for '{}' could not be registered.".replace("{}",n)),!r)throw e;Kj(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=i.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:rL,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),i.push(e)}}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=tL,e.regex={concat:uj,lookahead:aj,either:pj,optional:cj,anyNumberOfTimes:lj};for(const e in Lj)"object"==typeof Lj[e]&&YA.exports(Lj[e]);return Object.assign(e,Lj),e}({}),lL=aL;aL.HighlightJS=aL,aL.default=aL;var cL=lL;function uL(e,t=[]){return e.map((e=>{const n=[...t,...e.properties?e.properties.className:[]];return e.children?uL(e.children,n):{text:e.value,classes:n}})).flat()}function pL(e){return e.value||e.children||[]}function dL({doc:e,name:t,lowlight:n,defaultLanguage:i}){const r=[];return Os(e,(e=>e.type.name===t)).forEach((e=>{let t=e.pos+1;const o=e.node.attrs.language||i,s=n.listLanguages();var a;uL(o&&(s.includes(o)||(a=o,Boolean(cL.getLanguage(a))))?pL(n.highlight(o,e.node.textContent)):pL(n.highlightAuto(e.node.textContent))).forEach((e=>{const n=t+e.text.length;if(e.classes.length){const i=Ir.inline(t,n,{class:e.classes.join(" ")});r.push(i)}t=n}))})),Br.create(e,r)}function hL({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 i=new Zt({key:new en("lowlight"),state:{init:(i,{doc:r})=>dL({doc:r,name:e,lowlight:t,defaultLanguage:n}),apply:(i,r,o,s)=>{const a=o.selection.$head.parent.type.name,l=s.selection.$head.parent.type.name,c=Os(o.doc,(t=>t.type.name===e)),u=Os(s.doc,(t=>t.type.name===e));return i.docChanged&&([a,l].includes(e)||u.length!==c.length||i.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)))))?dL({doc:i.doc,name:e,lowlight:t,defaultLanguage:n}):r.map(i.mapping,i.doc)}},props:{decorations:e=>i.getState(e)}});return i}const fL=JN.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))||[],hL({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}});const mL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],gL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],bL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],vL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],yL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();var xL="[0-9](_*[0-9])*",wL=`\\.(${xL})`,_L="[0-9a-fA-F](_*[0-9a-fA-F])*",kL={className:"number",variants:[{begin:`(\\b(${xL})((${wL})|\\.)?|(${wL}))`+`[eE][+-]?(${xL})[fFdD]?\\b`},{begin:`\\b(${xL})((${wL})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${wL})[fFdD]?\\b`},{begin:`\\b(${xL})[fFdD]\\b`},{begin:`\\b0[xX]((${_L})\\.?|(${_L})?\\.(${_L}))`+`[pP][+-]?(${xL})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${_L})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function EL(e,t,n){return-1===n?"":e.replace(t,(i=>EL(e,t,n-1)))}const CL="[A-Za-z$_][0-9A-Za-z$_]*",ML=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],OL=["true","false","null","undefined","NaN","Infinity"],DL=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],TL=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],SL=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],NL=["arguments","this","super","console","window","document","localStorage","module","global"],AL=[].concat(SL,DL,TL);var jL="[0-9](_*[0-9])*",LL=`\\.(${jL})`,zL="[0-9a-fA-F](_*[0-9a-fA-F])*",IL={className:"number",variants:[{begin:`(\\b(${jL})((${LL})|\\.)?|(${LL}))`+`[eE][+-]?(${jL})[fFdD]?\\b`},{begin:`\\b(${jL})((${LL})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${LL})[fFdD]?\\b`},{begin:`\\b(${jL})[fFdD]\\b`},{begin:`\\b0[xX]((${zL})\\.?|(${zL})?\\.(${zL}))`+`[pP][+-]?(${jL})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${zL})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};const RL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],FL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],BL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],PL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],UL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),HL=BL.concat(PL);const $L=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],WL=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],qL=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],VL=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],KL=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function GL(e){return e?"string"==typeof e?e:e.source:null}function YL(e){return QL("(?=",e,")")}function QL(...e){const t=e.map((e=>GL(e))).join("");return t}function ZL(...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=>GL(e))).join("|")+")";return n}const JL=e=>QL(/\b/,e,/\w$/.test(e)?/\b/:/\B/),XL=["Protocol","Type"].map(JL),ez=["init","self"].map(JL),tz=["Any","Self"],nz=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],iz=["false","nil","true"],rz=["assignment","associativity","higherThan","left","lowerThan","none","right"],oz=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],sz=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],az=ZL(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),lz=ZL(az,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),cz=QL(az,lz,"*"),uz=ZL(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),pz=ZL(uz,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),dz=QL(uz,pz,"*"),hz=QL(/[A-Z]/,pz,"*"),fz=["autoclosure",QL(/convention\(/,ZL("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",QL(/objc\(/,dz,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],mz=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];const gz="[A-Za-z$_][0-9A-Za-z$_]*",bz=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],vz=["true","false","null","undefined","NaN","Infinity"],yz=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],xz=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wz=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],_z=["arguments","this","super","console","window","document","localStorage","module","global"],kz=[].concat(wz,yz,xz);function Ez(e){const t=e.regex,n=gz,i="<>",r="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let r;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(r=e.input.substring(n).match(/^\s+extends\s+/))&&0===r.index&&t.ignoreMatch()}},s={$pattern:gz,keyword:bz,literal:vz,built_in:kz,"variable.language":_z},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,u={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},m={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,f,u];p.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,p.contains),v=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),y={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...yz,...xz]}},_={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/};const k={match:t.concat(/\b/,(E=[...wz,"super"],t.concat("(?!",E.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var E;const C={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},M={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},O="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(O)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:w},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,f,m,u,w,{className:"attr",begin:n+t.lookahead(":"),relevance:0},D,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{className:"function",begin:O,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:r},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},C,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,M,{match:/\$[(.]/}]}}var Cz={exports:{}};function Mz(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)||Mz(n)})),e}Cz.exports=Mz,Cz.exports.default=Mz;class Oz{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Dz(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Tz(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 Sz="</span>",Nz=e=>!!e.scope||e.sublanguage&&e.language;class Az{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Dz(e)}openNode(e){if(!Nz(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){Nz(e)&&(this.buffer+=Sz)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const jz=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Lz{constructor(){this.rootNode=jz(),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=jz({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=>{Lz._collapse(e)})))}}class zz extends Lz{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 Az(this,this.options).value()}finalize(){return!0}}function Iz(e){return e?"string"==typeof e?e:e.source:null}function Rz(e){return Pz("(?=",e,")")}function Fz(e){return Pz("(?:",e,")*")}function Bz(e){return Pz("(?:",e,")?")}function Pz(...e){const t=e.map((e=>Iz(e))).join("");return t}function Uz(...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=>Iz(e))).join("|")+")";return n}function Hz(e){return new RegExp(e.toString()+"|").exec("").length-1}const $z=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Wz(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let i=Iz(e),r="";for(;i.length>0;){const e=$z.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)}const qz="[a-zA-Z]\\w*",Vz="[a-zA-Z_]\\w*",Kz="\\b\\d+(\\.\\d+)?",Gz="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Yz="\\b(0b[01]+)",Qz={begin:"\\\\[\\s\\S]",relevance:0},Zz={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Qz]},Jz={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Qz]},Xz=function(e,t,n={}){const i=Tz({scope:"comment",begin:e,end:t,contains:[]},n);i.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 r=Uz("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 i.contains.push({begin:Pz(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},eI=Xz("//","$"),tI=Xz("/\\*","\\*/"),nI=Xz("#","$"),iI={scope:"number",begin:Kz,relevance:0},rI={scope:"number",begin:Gz,relevance:0},oI={scope:"number",begin:Yz,relevance:0},sI={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Qz,{begin:/\[/,end:/\]/,relevance:0,contains:[Qz]}]}]},aI={scope:"title",begin:qz,relevance:0},lI={scope:"title",begin:Vz,relevance:0},cI={begin:"\\.\\s*"+Vz,relevance:0};var uI=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:qz,UNDERSCORE_IDENT_RE:Vz,NUMBER_RE:Kz,C_NUMBER_RE:Gz,BINARY_NUMBER_RE:Yz,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Pz(t,/.*\b/,e.binary,/\b.*/)),Tz({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:Qz,APOS_STRING_MODE:Zz,QUOTE_STRING_MODE:Jz,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:Xz,C_LINE_COMMENT_MODE:eI,C_BLOCK_COMMENT_MODE:tI,HASH_COMMENT_MODE:nI,NUMBER_MODE:iI,C_NUMBER_MODE:rI,BINARY_NUMBER_MODE:oI,REGEXP_MODE:sI,TITLE_MODE:aI,UNDERSCORE_TITLE_MODE:lI,METHOD_GUARD:cI,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 pI(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function dI(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function hI(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=pI,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function fI(e,t){Array.isArray(e.illegal)&&(e.illegal=Uz(...e.illegal))}function mI(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 gI(e,t){void 0===e.relevance&&(e.relevance=1)}const bI=(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=Pz(n.beforeMatch,Rz(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},vI=["of","and","for","in","not","or","if","then","parent","list","value"],yI="keyword";function xI(e,t,n=yI){const i=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((function(n){Object.assign(i,xI(e[n],t,n))})),i;function r(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");i[n[0]]=[e,wI(n[0],n[1])]}))}}function wI(e,t){return t?Number(t):function(e){return vI.includes(e.toLowerCase())}(e)?0:1}const _I={},kI=e=>{console.error(e)},EI=(e,...t)=>{console.log(`WARN: ${e}`,...t)},CI=(e,t)=>{_I[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),_I[`${e}/${t}`]=!0)},MI=new Error;function OI(e,t,{key:n}){let i=0;const r=e[n],o={},s={};for(let e=1;e<=t.length;e++)s[e+i]=r[e],o[e+i]=!0,i+=Hz(t[e-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function DI(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 kI("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),MI;if("object"!=typeof e.beginScope||null===e.beginScope)throw kI("beginScope must be object"),MI;OI(e,e.begin,{key:"beginScope"}),e.begin=Wz(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw kI("skip, excludeEnd, returnEnd not compatible with endScope: {}"),MI;if("object"!=typeof e.endScope||null===e.endScope)throw kI("endScope must be object"),MI;OI(e,e.end,{key:"endScope"}),e.end=Wz(e.end,{joinWith:""})}}(e)}function TI(e){function t(t,n){return new RegExp(Iz(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+=Hz(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(Wz(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)),i=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,i)}}class i{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=Tz(e.classNameAliases||{}),function n(r,o){const s=r;if(r.isCompiled)return s;[dI,mI,DI,bI].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[hI,fI,gI].forEach((e=>e(r,o))),r.isCompiled=!0;let a=null;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),a=r.keywords.$pattern,delete r.keywords.$pattern),a=a||/\w+/,r.keywords&&(r.keywords=xI(r.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),o&&(r.begin||(r.begin=/\B|\b/),s.beginRe=t(s.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(s.endRe=t(s.end)),s.terminatorEnd=Iz(s.end)||"",r.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(s.illegalRe=t(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return Tz(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(SI(e))return Tz(e,{starts:e.starts?Tz(e.starts):null});if(Object.isFrozen(e))return Tz(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){n(e,s)})),r.starts&&n(r.starts,o),s.matcher=function(e){const t=new i;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 SI(e){return!!e&&(e.endsWithParent||SI(e.starts))}var NI="11.6.0";class AI extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const jI=Dz,LI=Tz,zI=Symbol("nomatch"),II=7;var RI=function(e){const t=Object.create(null),n=Object.create(null),i=[];let r=!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:zz};function l(e){return a.noHighlightRe.test(e)}function c(e,t,n){let i="",r="";"object"==typeof t?(i=e,n=t.ignoreIllegals,r=t.language):(CI("10.7.0","highlight(lang, code, ...args) has been deprecated."),CI("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=t),void 0===n&&(n=!0);const o={code:i,language:r};v("before:highlight",o);const s=o.result?o.result:u(o.language,o.code,n);return s.code=o.code,v("after:highlight",s),s}function u(e,n,i,s){const l=Object.create(null);function c(){if(!E.keywords)return void M.addText(O);let e=0;E.keywordPatternRe.lastIndex=0;let t=E.keywordPatternRe.exec(O),n="";for(;t;){n+=O.substring(e,t.index);const r=w.case_insensitive?t[0].toLowerCase():t[0],o=(i=r,E.keywords[i]);if(o){const[e,i]=o;if(M.addText(n),n="",l[r]=(l[r]||0)+1,l[r]<=II&&(D+=i),e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0];e=E.keywordPatternRe.lastIndex,t=E.keywordPatternRe.exec(O)}var i;n+=O.substring(e),M.addText(n)}function d(){null!=E.subLanguage?function(){if(""===O)return;let e=null;if("string"==typeof E.subLanguage){if(!t[E.subLanguage])return void M.addText(O);e=u(E.subLanguage,O,!0,C[E.subLanguage]),C[E.subLanguage]=e._top}else e=p(O,E.subLanguage.length?E.subLanguage:null);E.relevance>0&&(D+=e.relevance),M.addSublanguage(e._emitter,e.language)}():c(),O=""}function h(e,t){let n=1;const i=t.length-1;for(;n<=i;){if(!e._emit[n]){n++;continue}const i=w.classNameAliases[e[n]]||e[n],r=t[n];i?M.addKeyword(r,i):(O=r,c(),O=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&M.openNode(w.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(M.addKeyword(O,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),O=""):e.beginScope._multi&&(h(e.beginScope,t),O="")),E=Object.create(e,{parent:{value:E}}),E}function g(e,t,n){let i=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(i){if(e["on:end"]){const n=new Oz(e);e["on:end"](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function b(e){return 0===E.matcher.regexIndex?(O+=e[0],1):(N=!0,0)}function v(e){const t=e[0],i=n.substring(e.index),r=g(E,e,i);if(!r)return zI;const o=E;E.endScope&&E.endScope._wrap?(d(),M.addKeyword(t,E.endScope._wrap)):E.endScope&&E.endScope._multi?(d(),h(E.endScope,e)):o.skip?O+=t:(o.returnEnd||o.excludeEnd||(O+=t),d(),o.excludeEnd&&(O=t));do{E.scope&&M.closeNode(),E.skip||E.subLanguage||(D+=E.relevance),E=E.parent}while(E!==r.parent);return r.starts&&f(r.starts,e),o.returnEnd?0:t.length}let y={};function x(t,o){const s=o&&o[0];if(O+=t,null==s)return d(),0;if("begin"===y.type&&"end"===o.type&&y.index===o.index&&""===s){if(O+=n.slice(o.index,o.index+1),!r){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,i=new Oz(n),r=[n.__beforeBegin,n["on:begin"]];for(const n of r)if(n&&(n(e,i),i.isMatchIgnored))return b(t);return n.skip?O+=t:(n.excludeBegin&&(O+=t),d(),n.returnBegin||n.excludeBegin||(O=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!i){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(E.scope||"<unnamed>")+'"');throw e.mode=E,e}if("end"===o.type){const e=v(o);if(e!==zI)return e}if("illegal"===o.type&&""===s)return 1;if(S>1e5&&S>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return O+=s,s.length}const w=m(e);if(!w)throw kI(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const _=TI(w);let k="",E=s||_;const C={},M=new a.__emitter(a);!function(){const e=[];for(let t=E;t!==w;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>M.openNode(e)))}();let O="",D=0,T=0,S=0,N=!1;try{for(E.matcher.considerAll();;){S++,N?N=!1:E.matcher.considerAll(),E.matcher.lastIndex=T;const e=E.matcher.exec(n);if(!e)break;const t=x(n.substring(T,e.index),e);T=e.index+t}return x(n.substring(T)),M.closeAllNodes(),M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:D,illegal:!1,_emitter:M,_top:E}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:jI(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:T,context:n.slice(T-100,T+100),mode:t.mode,resultSoFar:k},_emitter:M};if(r)return{language:e,value:jI(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:E};throw t}}function p(e,n){n=n||a.languages||Object.keys(t);const i=function(e){const t={value:jI(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),r=n.filter(m).filter(b).map((t=>u(t,e,!1)));r.unshift(i);const o=r.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,p=l;return p.secondBest=c,p}function d(e){let t=null;const i=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||(EI(o.replace("{}",n[1])),EI("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(i))return;if(v("before:highlightElement",{el:e,language:i}),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 AI("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const r=t.textContent,s=i?c(r,{language:i,ignoreIllegals:!0}):p(r);e.innerHTML=s.value,function(e,t,i){const r=t&&n[t]||i;e.classList.add("hljs"),e.classList.add(`language-${r}`)}(e,i,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}),v("after:highlightElement",{el:e,result:s,text:r})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(a.cssSelector).forEach(d)}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 v(e,t){const n=e;i.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:p,highlightAll:f,highlightElement:d,highlightBlock:function(e){return CI("10.7.0","highlightBlock will be removed entirely in v12.0"),CI("10.7.0","Please use highlightElement now."),d(e)},configure:function(e){a=LI(a,e)},initHighlighting:()=>{f(),CI("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),CI("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,i){let o=null;try{o=i(e)}catch(e){if(kI("Language definition for '{}' could not be registered.".replace("{}",n)),!r)throw e;kI(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=i.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:LI,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),i.push(e)}}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=NI,e.regex={concat:Pz,lookahead:Rz,either:Uz,optional:Bz,anyNumberOfTimes:Fz};for(const e in uI)"object"==typeof uI[e]&&Cz.exports(uI[e]);return Object.assign(e,uI),e}({}),FI=RI;RI.HighlightJS=RI,RI.default=RI;var BI={exports:{}};!function(e){!function(){var t;function n(e){for(var t,n,i,r,o=1,s=[].slice.call(arguments),a=0,l=e.length,c="",u=!1,p=!1,d=function(){return s[o++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<l;++a)if(t=e[a],u)switch(u=!1,"."==t?(p=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(p=!0,t=e[a+=2]):p=!0,r=h(),t){case"b":c+=parseInt(d(),10).toString(2);break;case"c":c+="string"==typeof(n=d())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(d(),10);break;case"f":i=String(parseFloat(d()).toFixed(r||6)),c+=p?i:i.replace(/^0/,"");break;case"j":c+=JSON.stringify(d());break;case"o":c+="0"+parseInt(d(),10).toString(8);break;case"s":c+=d();break;case"x":c+="0x"+parseInt(d(),10).toString(16);break;case"X":c+="0x"+parseInt(d(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()}(BI);var PI=BI.exports;const UI=Object.assign(HI(Error),{eval:HI(EvalError),range:HI(RangeError),reference:HI(ReferenceError),syntax:HI(SyntaxError),type:HI(TypeError),uri:HI(URIError)});function HI(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){const i=t?PI(t,...n):t;return new e(i)}}const $I={}.hasOwnProperty,WI="hljs-";function qI(e,t,n={}){let i=n.prefix;if("string"!=typeof e)throw UI("Expected `string` for name, got `%s`",e);if(!FI.getLanguage(e))throw UI("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw UI("Expected `string` for value, got `%s`",t);null==i&&(i=WI),FI.configure({__emitter:VI,classPrefix:i});const r=FI.highlight(t,{language:e,ignoreIllegals:!0});if(FI.configure({}),r.errorRaised)throw r.errorRaised;return r._emitter.root.data.language=r.language,r._emitter.root.data.relevance=r.relevance,r._emitter.root}class VI{constructor(e){this.options=e,this.root={type:"root",data:{language:null,relevance:0},children:[]},this.stack=[this.root]}addText(e){if(""===e)return;const t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})}addKeyword(e,t){this.openNode(t),this.addText(e),this.closeNode()}addSublanguage(e,t){const n=this.stack[this.stack.length-1],i=e.root.children;t?n.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):n.children.push(...i)}openNode(e){const t=e.split(".").map(((e,t)=>t?e+"_".repeat(t):this.options.classPrefix+e)),n={type:"element",tagName:"span",properties:{className:t},children:[]};this.stack[this.stack.length-1].children.push(n),this.stack.push(n)}closeNode(){this.stack.pop()}closeAllNodes(){}finalize(){}toHTML(){return""}}const KI={highlight:qI,highlightAuto:function(e,t={}){const n=t.subset||FI.listLanguages();t.prefix;let i=-1,r={type:"root",data:{language:null,relevance:0},children:[]};if("string"!=typeof e)throw UI("Expected `string` for value, got `%s`",e);for(;++i<n.length;){const o=n[i];if(!FI.getLanguage(o))continue;const s=qI(o,e,t);s.data.relevance>r.data.relevance&&(r=s)}return r},registerLanguage:function(e,t){FI.registerLanguage(e,t)},registered:function(e){return Boolean(FI.getLanguage(e))},listLanguages:function(){return FI.listLanguages()},registerAlias:function(e,t){if("string"==typeof e)FI.registerAliases(t,{languageName:e});else{let t;for(t in e)$I.call(e,t)&&FI.registerAliases(e[t],{languageName:t})}}};KI.registerLanguage("arduino",(function(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:f.concat([{begin:/\(/,end:/\)/,keywords:d,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:p,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,h,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}(e),i=n.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n})),KI.registerLanguage("bash",(function(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},s={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(s);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},l=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[l,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,o,{match:/(\/[a-z._-]+)+/},s,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},n]}})),KI.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",d={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream "+"auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set "+"unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos "+"asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp "+"fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper "+"isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow "+"printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp "+"strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan "+"vfprintf vprintf vsprintf endl initializer_list unique_ptr"},h=[c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:h.concat([{begin:/\(/,end:/\)/,keywords:d,contains:h.concat(["self"]),relevance:0}]),relevance:0},m={begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(u,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:d,disableAutodetect:!0,illegal:"</",contains:[].concat(f,m,h,[c,{begin:e.IDENT_RE+"::",keywords:d},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:a,keywords:d}}})),KI.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},f=[h,c,s,n,e.C_BLOCK_COMMENT_MODE,l,a],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:f.concat([{begin:/\(/,end:/\)/,keywords:d,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:d,relevance:0},{begin:p,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(m,g,h,f,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),KI.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},r={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(r,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},u=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE],a.contains=[u,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const p={variants:[c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",f={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},p,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,d],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[p,i,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},f]}})),KI.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),i=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+bL.join("|")+")"},{begin:":(:)?("+vL.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+yL.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...i,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...i,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:gL.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...i,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+mL.join("|")+")\\b"}]}})),KI.registerLanguage("diff",(function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}})),KI.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}})),KI.registerLanguage("graphql",(function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}})),KI.registerLanguage("ini",(function(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},i=e.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const r={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[i,o,r,s,n,"self"],relevance:0},l=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:t.concat(l,"(\\s*\\.\\s*",l,")*",t.lookahead(/\s*=\s*[^#\s]/)),className:"attr",starts:{end:/$/,contains:[i,a,o,r,s,n]}}]}})),KI.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+EL("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),r={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:r,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:r,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,kL,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},kL,o]}})),KI.registerLanguage("javascript",(function(e){const t=e.regex,n=CL,i="<>",r="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,i=e.input[n];if("<"===i||","===i)return void t.ignoreMatch();let r;">"===i&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());(r=e.input.substring(n).match(/^\s+extends\s+/))&&0===r.index&&t.ignoreMatch()}},s={$pattern:CL,keyword:ML,literal:OL,built_in:AL,"variable.language":NL},a="[0-9](_?[0-9])*",l=`\\.(${a})`,c=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,u={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))`+`[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},p={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,p],subLanguage:"css"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,p]},m={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},g=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,f,u];p.contains=g.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(g)});const b=[].concat(m,p.contains),v=b.concat([{begin:/\(/,end:/\)/,keywords:s,contains:["self"].concat(b)}]),y={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},w={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...DL,...TL]}},_={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},k={match:t.concat(/\b/,(E=[...SL,"super"],t.concat("(?!",E.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var E;const C={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},M={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},O="(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",D={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(O)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:v,CLASS_REFERENCE:w},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,h,f,m,u,w,{className:"attr",begin:n+t.lookahead(":"),relevance:0},D,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[m,e.REGEXP_MODE,{className:"function",begin:O,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:v}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:r},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},C,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,M,{match:/\$[(.]/}]}})),KI.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),KI.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline "+"crossinline dynamic final enum if else do while for when throw try catch finally "+"import package is in fun override companion reified inline lateinit init "+"interface annotation data sealed internal infix operator out by constructor super "+"tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},r={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[r,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,r,i]}]};i.contains.push(o);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},l=IL,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),u={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},p=u;return p.variants[1].contains=[u],u.variants[1].contains=[p],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[u,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,s,a,o,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}})),KI.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=HL,i="[\\w-]+",r="("+i+"|@\\{"+i+"\\})",o=[],s=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},l=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:FL.join(" ")},u={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,u,l("variable","@@?"+i,10),l("variable","@\\{"+i+"\\}"),l("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const p=s.concat({begin:/\{/,end:/\}/,contains:o}),d={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},h={begin:r+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+UL.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},m={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:p}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,l("keyword","all\\b"),l("variable","@\\{"+i+"\\}"),{begin:"\\b("+RL.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,l("selector-tag",r,0),l("selector-id","#"+r),l("selector-class","\\."+r,0),l("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+BL.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PL.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:p},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:i+":(:)?"+`(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,m,b,h,g,d,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),KI.registerLanguage("lua",(function(e){const t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},r=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len "+"__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert "+"collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring "+"module next pairs pcall print rawequal rawget rawset require select setfenv "+"setmetatable tonumber tostring type unpack xpcall arg self "+"coroutine resume yield status wrap create running debug getupvalue "+"debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv "+"io lines write close flush open output type read stderr stdin input stdout popen tmpfile "+"math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan "+"os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall "+"string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower "+"table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}})),KI.registerLanguage("makefile",(function(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},i={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort "+"word wordlist firstword lastword dir notdir suffix basename "+"addsuffix addprefix join wildcard realpath abspath error warning "+"shell origin flavor foreach if or and call eval file value"},contains:[t]},r={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif "+"include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,i,r,{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o]}})),KI.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},r={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]},o=e.inherit(i,{contains:[]}),s=e.inherit(r,{contains:[]});i.contains.push(s),r.contains.push(o);let a=[t,n];return[i,r,o,s].forEach((e=>{e.contains=e.contains.concat(a)})),a=a.concat(i,r),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,r,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),KI.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line "+"pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),KI.registerLanguage("perl",(function(e){const t=e.regex,n=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"].join(" ")},r={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},s={variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,r,s],l=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],c=(e,i,r="\\1")=>{const o="\\1"===r?r:t.concat(r,i);return t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,o,/(?:\\.|[^\\\/])*?/,r,n)},u=(e,i,r)=>t.concat(t.concat("(?:",e,")"),i,/(?:\\.|[^\\\/])*?/,r,n),p=[s,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:c("s|tr|y",t.either(...l,{capture:!0}))},{begin:c("s|tr|y","\\(","\\)")},{begin:c("s|tr|y","\\[","\\]")},{begin:c("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:u("(?:m|qr)?",/\//,/\//)},{begin:u("m|qr",t.either(...l,{capture:!0}),/\1/)},{begin:u("m|qr",/\(/,/\)/)},{begin:u("m|qr",/\[/,/\]/)},{begin:u("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return r.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}})),KI.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),r=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+i},s={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),l="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(s)}),a,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(s)})]},u={scope:"number",variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},p=["false","null","true"],d=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],f={keyword:d,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(p),built_in:h},m=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(l,"+"),t.concat("(?!",m(h).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},b=t.concat(i,"\\b(?!\\()"),v={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{1:"title.class",3:"variable.constant"}},{match:[r,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},y={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},x={relevance:0,begin:/\(/,end:/\)/,keywords:f,contains:[y,o,v,e.C_BLOCK_COMMENT_MODE,c,u,g]},w={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",m(d).join("\\b|"),"|",m(h).join("\\b|"),"\\b)"),i,t.concat(l,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[x]};x.contains.push(w);const _=[y,v,e.C_BLOCK_COMMENT_MODE,c,u,g];return{case_insensitive:!1,keywords:f,contains:[{begin:t.concat(/#\[\s*/,r),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:p,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:p,keyword:["new","array"]},contains:["self",..._]},..._,{scope:"meta",match:r}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,w,v,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",o,v,e.C_BLOCK_COMMENT_MODE,c,u]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,u]}})),KI.registerLanguage("php-template",(function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}})),KI.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),KI.registerLanguage("python",(function(e){const t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],r={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:r,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",u=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,p=`\\b|${i.join("|")}`,d={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${u}))[eE][+-]?(${c})[jJ]?(?=${p})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${c})[jJ](?=${p})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:r,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:["self",o,d,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,d,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:r,illegal:/(<\/|->|\?)|=>/,contains:[o,d,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},l,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[f]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[d,f,l]}]}})),KI.registerLanguage("python-repl",(function(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}})),KI.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),r=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 "+"NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F "+"abs acos acosh all any anyNA Arg as.call as.character "+"as.complex as.double as.environment as.integer as.logical "+"as.null.default as.numeric as.raw asin asinh atan atanh attr "+"attributes baseenv browser c call ceiling class Conj cos cosh "+"cospi cummax cummin cumprod cumsum digamma dim dimnames "+"emptyenv exp expression floor forceAndCall gamma gc.time "+"globalenv Im interactive invisible is.array is.atomic is.call "+"is.character is.complex is.double is.environment is.expression "+"is.finite is.function is.infinite is.integer is.language "+"is.list is.logical is.matrix is.na is.name is.nan is.null "+"is.numeric is.object is.pairlist is.raw is.recursive is.single "+"is.symbol lazyLoadDBfetch length lgamma list log max min "+"missing Mod names nargs nzchar oldClass on.exit pos.to.env "+"proc.time prod quote range Re rep retracemem return round "+"seq_along seq_len seq.int sign signif sin sinh sinpi sqrt "+"standardGeneric substitute sum switch tan tanh tanpi tracemem "+"trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[r,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[o,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:r},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),KI.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(i,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__"],"variable.language":["self","super"],keyword:["alias","and","attr_accessor","attr_reader","attr_writer","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","include","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield"],built_in:["proc","lambda"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},u={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},p="[0-9](_?[0-9])*",d={className:"number",relevance:0,variants:[{begin:`\\b(${"[1-9](_?[0-9])*|0"})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},f=[u,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/class\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{relevance:0,match:[r,/\.new[ (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[u,{begin:n}],relevance:0},d,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])"+`(?![A-Za-z])(?![@$?'])`},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,l),relevance:0}].concat(a,l);c.contains=f,h.contains=f;const m=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:f}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(m).concat(l).concat(f)}})),KI.registerLanguage("rust",(function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",r=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:r},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+i}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:r,type:o}},{className:"punctuation",begin:"->"},n]}})),KI.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"("+"%|em|ex|ch|rem"+"|vw|vh|vmin|vmax"+"|cm|mm|in|pt|pc|px"+"|deg|grad|rad|turn"+"|s|ms"+"|Hz|kHz"+"|dpi|dpcm|dppx"+")?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}))(e),n=VL,i=qL,r="@[a-z-]+",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+$L.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+KL.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:r,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:WL.join(" ")},contains:[{begin:r,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),KI.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),KI.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),i=["true","false","unknown"],r=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],a=o,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),c={begin:t.concat(/\b/,t.either(...a),/\s*\(/),relevance:0,keywords:{built_in:a}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const i=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:i(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:i,type:r,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(s),literal:i,type:r}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),KI.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],r={match:[/\./,ZL(...XL,...ez)],className:{2:"keyword"}},o={match:QL(/\./,ZL(...nz)),relevance:0},s=nz.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:ZL(...nz.filter((e=>"string"!=typeof e)).concat(tz).map(JL),...ez)}]},l={$pattern:ZL(/\b\w+/,/#\w+/),keyword:s.concat(oz),literal:iz},c=[r,o,a],u=[{match:QL(/\./,ZL(...sz)),relevance:0},{className:"built_in",match:QL(/\b/,ZL(...sz),/(?=\()/)}],p={match:/->/,relevance:0},d=[p,{className:"operator",relevance:0,variants:[{match:cz},{match:`\\.(\\.|${lz})+`}]}],h="([0-9]_*)+",f="([0-9a-fA-F]_*)+",m={className:"number",relevance:0,variants:[{match:`\\b(${h})(\\.(${h}))?`+`([eE][+-]?(${h}))?\\b`},{match:`\\b0x(${f})(\\.(${f}))?`+`([pP][+-]?(${h}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:QL(/\\/,e,/[0\\tnr"']/)},{match:QL(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:QL(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e="")=>({className:"subst",label:"interpol",begin:QL(/\\/,e,/\(/),end:/\)/}),y=(e="")=>({begin:QL(e,/"""/),end:QL(/"""/,e),contains:[g(e),b(e),v(e)]}),x=(e="")=>({begin:QL(e,/"/),end:QL(/"/,e),contains:[g(e),v(e)]}),w={className:"string",variants:[y(),y("#"),y("##"),y("###"),x(),x("#"),x("##"),x("###")]},_={match:QL(/`/,dz,/`/)},k=[_,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${pz}+`}],E=[{match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:mz,contains:[...d,m,w]}]}},{className:"keyword",match:QL(/@/,ZL(...fz))},{className:"meta",match:QL(/@/,dz)}],C={match:YL(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:QL(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,pz,"+")},{className:"type",match:hz,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:QL(/\s+&\s+/,YL(hz)),relevance:0}]},M={begin:/</,end:/>/,keywords:l,contains:[...i,...c,...E,p,C]};C.contains.push(M);const O={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:QL(dz,/\s*:/),keywords:"_|0",relevance:0},...i,...c,...u,...d,m,w,...k,...E,C]},D={begin:/</,end:/>/,contains:[...i,C]},T={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:ZL(YL(QL(dz,/\s*:/)),YL(QL(dz,/\s+/,dz,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:dz}]},...i,...c,...d,m,w,...E,C,O],endsParent:!0,illegal:/["']/},S={match:[/func/,/\s+/,ZL(_.match,dz,cz)],className:{1:"keyword",3:"title.function"},contains:[D,T,t],illegal:[/\[/,/%/]},N={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[D,T,t],illegal:/\[|%/},A={match:[/operator/,/\s+/,cz],className:{1:"keyword",3:"title"}},j={begin:[/precedencegroup/,/\s+/,hz],className:{1:"keyword",3:"title"},contains:[C],keywords:[...rz,...iz],end:/}/};for(const e of w.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const n=[...c,...u,...d,m,w,...k];t.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:l,contains:[...i,S,N,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:l,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},A,j,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},...c,...u,...d,m,w,...k,...E,C,O]}})),KI.registerLanguage("typescript",(function(e){const t=Ez(e),n=gz,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[t.exports.CLASS_REFERENCE]},s={$pattern:gz,keyword:bz.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:vz,built_in:kz.concat(i),"variable.language":_z},a={className:"meta",begin:"@"+n},l=(e,t,n)=>{const i=e.contains.findIndex((e=>e.label===t));if(-1===i)throw new Error("can not find mode to replace");e.contains.splice(i,1,n)};Object.assign(t.keywords,s),t.exports.PARAMS_CONTAINS.push(a),t.contains=t.contains.concat([a,r,o]),l(t,"shebang",e.SHEBANG()),l(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});const c=t.contains.find((e=>"func.def"===e.label));return c.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx"]}),t})),KI.registerLanguage("vbnet",(function(e){const t=e.regex,n=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,r=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,s={className:"literal",variants:[{begin:t.concat(/# */,t.either(i,n),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,r,/ *#/)},{begin:t.concat(/# */,t.either(i,n),/ +/,t.either(r,o),/ *#/)}]},a=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),l=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval "+"call case catch class compare const continue custom declare default delegate dim distinct do "+"each equals else elseif end enum erase error event exit explicit finally for friend from function "+"get global goto group handles if implements imports in inherits interface into iterator "+"join key let lib loop me mid module mustinherit mustoverride mybase myclass "+"namespace narrowing new next notinheritable notoverridable "+"of off on operator option optional order overloads overridable overrides "+"paramarray partial preserve private property protected public "+"raiseevent readonly redim removehandler resume return "+"select set shadows shared skip static step stop structure strict sub synclock "+"take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor "+"cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s,{className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{className:"label",begin:/^\w+:/},a,l,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[l]}]}})),KI.registerLanguage("wasm",(function(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);return t.contains.push("self"),{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"]},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},{className:"variable",begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},{className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}})),KI.registerLanguage("xml",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(r,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,a,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,o,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),KI.registerLanguage("yaml",(function(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},r=e.inherit(i,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),o={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},c=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},o,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},a,l,i],u=[...c];return u.pop(),u.push(r),s.contains=u,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:c}}));const GI=()=>t.createElement(Oc,{"data-cy":"neeto-editor-code-block"},t.createElement("pre",null,t.createElement(Mc,{as:"code"})));var YI=fL.extend({addNodeView:()=>new Sc(GI)}).configure({lowlight:KI});const QI={code:{},underline:{},highlight:{},codeBlock:{},figCaption:{},embeds:{},link:{},emojiSuggestion:{},emojiPicker:{},customCommands:{},characterCount:{},focus:{mode:"shallowest"},starterKit:{document:!1,codeBlock:!1,code:!1},placeholder:{}};var ZI=as.create({name:"paste-unformatted",addCommands:()=>({pasteUnformatted:()=>async e=>{let{editor:t}=e;const n=await navigator.clipboard.readText();t.commands.insertContent(n)}})}),JI=Xs.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",Ho(this.options.HTMLAttributes,{...t,class:"video-wrapper"})]},addCommands(){return{setExternalVideo:e=>t=>{let{commands:n}=t;return n.insertContent({type:this.name,attrs:e})}}}});const XI=new en("suggestion");function eR({pluginKey:e=XI,editor:t,char:n="@",allowSpaces:i=!1,allowedPrefixes:r=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=(()=>null),items:c=(()=>[]),render:u=(()=>({})),allow:p=(()=>!0)}){let d;const h=null==u?void 0:u(),f=new Zt({key:e,view(){return{update:async(e,n)=>{var i,r,o,s,a,u,p;const f=null===(i=this.key)||void 0===i?void 0:i.getState(n),m=null===(r=this.key)||void 0===r?void 0:r.getState(e.state),g=f.active&&m.active&&f.range.from!==m.range.from,b=!f.active&&m.active,v=f.active&&!m.active,y=b||g,x=!b&&!v&&f.query!==m.query&&!g,w=v||g;if(!y&&!x&&!w)return;const _=w&&!y?f:m,k=e.dom.querySelector(`[data-decoration-id="${_.decorationId}"]`);d={editor:t,range:_.range,query:_.query,text:_.text,items:[],command:e=>{l({editor:t,range:_.range,props:e})},decorationNode:k,clientRect:k?()=>{var n;const{decorationId:i}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),r=e.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==r?void 0:r.getBoundingClientRect())||null}:null},y&&(null===(o=null==h?void 0:h.onBeforeStart)||void 0===o||o.call(h,d)),x&&(null===(s=null==h?void 0:h.onBeforeUpdate)||void 0===s||s.call(h,d)),(x||y)&&(d.items=await c({editor:t,query:_.query})),w&&(null===(a=null==h?void 0:h.onExit)||void 0===a||a.call(h,d)),x&&(null===(u=null==h?void 0:h.onUpdate)||void 0===u||u.call(h,d)),y&&(null===(p=null==h?void 0:h.onStart)||void 0===p||p.call(h,d))},destroy:()=>{var e;d&&(null===(e=null==h?void 0:h.onExit)||void 0===e||e.call(h,d))}}},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:d}=e,{empty:h,from:f}=d,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:i,allowedPrefixes:r,startOfLine:o,$position:s}=e,a=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=i?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),p=(null===(t=s.nodeBefore)||void 0===t?void 0:t.isText)&&s.nodeBefore.text;if(!p)return null;const d=s.pos-p.length,h=Array.from(p.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==r?void 0:r.join("")}\0]?$`).test(f);if(null!==r&&!m)return null;const g=d+h.index;let b=g+h[0].length;return i&&l.test(p.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:i,allowedPrefixes:r,startOfLine:o,$position:d.$from}),a=`id_${Math.floor(4294967295*Math.random())}`;e&&p({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:i,range:r}=f.getState(e.state);return i&&(null===(n=null==h?void 0:h.onKeyDown)||void 0===n?void 0:n.call(h,{view:e,event:t,range:r}))||!1},decorations(e){const{active:t,range:n,decorationId:i}=f.getState(e);return t?Br.create(e.doc,[Ir.inline(n.from,n.to,{nodeName:s,class:a,"data-decoration-id":i})]):null}}});return f}function tR(e){return e&&e.__esModule?e.default:e}function nR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iR,rR,oR,sR,aR,lR,cR={},uR=[],pR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function dR(e,t){for(var n in t)e[n]=t[n];return e}function hR(e){var t=e.parentNode;t&&t.removeChild(e)}function fR(e,t,n){var i,r,o,s={};for(o in t)"key"==o?i=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?iR.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 mR(e,s,i,r,null)}function mR(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++oR:r};return null==r&&null!=rR.vnode&&rR.vnode(o),o}function gR(e){return e.children}function bR(e,t){this.props=e,this.context=t}function vR(e,t){if(null==t)return e.__?vR(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?vR(e):null}function yR(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 yR(e)}}function xR(e){(!e.__d&&(e.__d=!0)&&sR.push(e)&&!wR.__r++||lR!==rR.debounceRendering)&&((lR=rR.debounceRendering)||aR)(wR)}function wR(){for(var e;wR.__r=sR.length;)e=sR.sort((function(e,t){return e.__v.__b-t.__v.__b})),sR=[],e.some((function(e){var t,n,i,r,o,s;e.__d&&(o=(r=(t=e).__v).__e,(s=t.__P)&&(n=[],(i=dR({},r)).__v=r.__v+1,SR(s,r,i,t.__n,void 0!==s.ownerSVGElement,null!=r.__h?[o]:null,n,null==o?vR(r):o,r.__h),NR(n,r),r.__e!=o&&yR(r)))}))}function _R(e,t,n,i,r,o,s,a,l,c){var u,p,d,h,f,m,g,b=i&&i.__k||uR,v=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?mR(null,h,null,null,h):Array.isArray(h)?mR(gR,{children:h},null,null,null):h.__b>0?mR(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(d=b[u])||d&&h.key==d.key&&h.type===d.type)b[u]=void 0;else for(p=0;p<v;p++){if((d=b[p])&&h.key==d.key&&h.type===d.type){b[p]=void 0;break}d=null}SR(e,h,d=d||cR,r,o,s,a,l,c),f=h.__e,(p=h.ref)&&d.ref!=p&&(g||(g=[]),d.ref&&g.push(d.ref,null,h),g.push(p,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===d.__k?h.__d=l=kR(h,l,e):l=CR(e,h,d,b,f,l),"function"==typeof n.type&&(n.__d=l)):l&&d.__e==l&&l.parentNode!=e&&(l=vR(d))}for(n.__e=m,u=v;u--;)null!=b[u]&&("function"==typeof n.type&&null!=b[u].__e&&b[u].__e==n.__d&&(n.__d=vR(i,u+1)),jR(b[u],b[u]));if(g)for(u=0;u<g.length;u++)AR(g[u],g[++u],g[++u])}function kR(e,t,n){for(var i,r=e.__k,o=0;r&&o<r.length;o++)(i=r[o])&&(i.__=e,t="function"==typeof i.type?kR(i,t,n):CR(n,i,i,r,i.__e,t));return t}function ER(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){ER(e,t)})):t.push(e)),t}function CR(e,t,n,i,r,o){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<i.length;l+=2)if(a==r)break e;e.insertBefore(r,o),s=o}return void 0!==s?s:r.nextSibling}function MR(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||pR.test(t)?n:n+"px"}function OR(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||MR(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||MR(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?i||e.addEventListener(t,o?TR:DR,o):e.removeEventListener(t,o?TR:DR,o);else if("dangerouslySetInnerHTML"!==t){if(r)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 DR(e){this.l[e.type+!1](rR.event?rR.event(e):e)}function TR(e){this.l[e.type+!0](rR.event?rR.event(e):e)}function SR(e,t,n,i,r,o,s,a,l){var c,u,p,d,h,f,m,g,b,v,y,x=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=rR.__b)&&c(t);try{e:if("function"==typeof x){if(g=t.props,b=(c=x.contextType)&&i[c.__c],v=c?b?b.props.value:c.__:i,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in x&&x.prototype.render?t.__c=u=new x(g,v):(t.__c=u=new bR(g,v),u.constructor=x,u.render=LR),b&&b.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=i,p=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=x.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=dR({},u.__s)),dR(u.__s,x.getDerivedStateFromProps(g,u.__s))),d=u.props,h=u.state,p)null==x.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==x.getDerivedStateFromProps&&g!==d&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||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,v),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(d,h,f)}))}u.context=v,u.props=g,u.state=u.__s,(c=rR.__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&&(i=dR(dR({},i),u.getChildContext())),p||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(d,h)),y=null!=c&&c.type===gR&&null==c.key?c.props.children:c,_R(e,Array.isArray(y)?y:[y],t,n,i,r,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,i,r,o,s,a){var l,c,u,p=n.props,d=t.props,h=t.type,f=0;if("svg"===h&&(r=!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(d);e=r?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),o=null,a=!1}if(null===h)p===d||a&&e.data===d||(e.data=d);else{if(o=o&&iR.call(e.childNodes),c=(p=n.props||cR).dangerouslySetInnerHTML,u=d.dangerouslySetInnerHTML,!a){if(null!=o)for(p={},f=0;f<e.attributes.length;f++)p[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,i,r){var o;for(o in n)"children"===o||"key"===o||o in t||OR(e,o,null,n[o],i);for(o in t)r&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||OR(e,o,t[o],n[o],i)}(e,d,p,r,a),u)t.__k=[];else if(f=t.props.children,_R(e,Array.isArray(f)?f:[f],t,n,i,r&&"foreignObject"!==h,o,s,o?o[0]:n.__k&&vR(n,0),a),null!=o)for(f=o.length;f--;)null!=o[f]&&hR(o[f]);a||("value"in d&&void 0!==(f=d.value)&&(f!==p.value||f!==e.value||"progress"===h&&!f)&&OR(e,"value",f,p.value,!1),"checked"in d&&void 0!==(f=d.checked)&&f!==e.checked&&OR(e,"checked",f,p.checked,!1))}return e}(n.__e,t,n,i,r,o,s,l);(c=rR.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),rR.__e(e,t,n)}}function NR(e,t){rR.__c&&rR.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){rR.__e(e,t.__v)}}))}function AR(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){rR.__e(e,n)}}function jR(e,t,n){var i,r;if(rR.unmount&&rR.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||AR(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){rR.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&jR(i[r],t,"function"!=typeof e.type);n||null==e.__e||hR(e.__e),e.__e=e.__d=void 0}function LR(e,t,n){return this.constructor(e,n)}function zR(e,t,n){var i,r,o;rR.__&&rR.__(e,t),r=(i="function"==typeof n)?null:n&&n.__k||t.__k,o=[],SR(t,e=(!i&&n||t).__k=fR(gR,null,[e]),r||cR,cR,void 0!==t.ownerSVGElement,!i&&n?[n]:r?null:t.firstChild?iR.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i),NR(o,e)}iR=uR.slice,rR={__e:function(e,t){for(var n,i,r;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&null!=i.getDerivedStateFromError&&(n.setState(i.getDerivedStateFromError(e)),r=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),r=n.__d),r)return n.__E=n}catch(t){e=t}throw e}},oR=0,bR.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=dR({},this.state),"function"==typeof e&&(e=e(dR({},n),this.props)),e&&dR(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),xR(this))},bR.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),xR(this))},bR.prototype.render=gR,sR=[],aR="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,wR.__r=0;var IR=0;function RR(e,t,n,i,r){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:--IR,__source:i,__self:r};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===a[s]&&(a[s]=o[s]);return rR.vnode&&rR.vnode(l),l}var FR={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 BR=new Map,PR=[{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 UR(e){if(BR.has(e))return BR.get(e);const t=HR(e);return BR.set(e,t),t}const HR=(()=>{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d"))}catch{}if(!e)return()=>!1;const t=25,n=20,i=Math.floor(t/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=2*n,e.canvas.height=t,i=>{e.clearRect(0,0,2*n,t),e.fillStyle="#FF0000",e.fillText(i,0,22),e.fillStyle="#0000FF",e.fillText(i,n,22);const r=e.getImageData(0,0,n,t).data,o=r.length;let s=0;for(;s<o&&!r[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 r[s]===c[0]&&r[s+2]===c[2]&&!(e.measureText(i).width>=n)}})();var $R={latestVersion:function(){for(const{v:e,emoji:t}of PR)if(UR(t))return e},noCountryFlags:function(){return!UR("🇨🇦")}};const WR=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let qR=null;var VR,KR={add:function(e){qR||(qR=FR.get("frequently")||{});const t=e.id||e;t&&(qR[t]||(qR[t]=0),qR[t]+=1,FR.set("last",t),FR.set("frequently",qR))},get:function({maxFrequentRows:e,perLine:t}){if(!e)return[];qR||(qR=FR.get("frequently"));let n=[];if(!qR){qR={};for(let e in WR.slice(0,t)){const i=WR[e];qR[i]=t-e,n.push(i)}return n}const i=e*t,r=FR.get("last");for(let e in qR)n.push(e);if(n.sort(((e,t)=>{const n=qR[t],i=qR[e];return n==i?e.localeCompare(t):n-i})),n.length>i){const e=n.slice(i);n=n.slice(0,i);for(let t of e)t!=r&&delete qR[t];r&&-1==n.indexOf(r)&&(delete qR[n[n.length-1]],n.splice(-1,1,r)),FR.set("frequently",qR)}return n}};VR=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 GR={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 YR=null,QR=null;const ZR={};async function JR(e){if(ZR[e])return ZR[e];const t=await fetch(e),n=await t.json();return ZR[e]=n,n}let XR=null,eF=null,tF=!1;function nF(e,{caller:t}={}){return XR||(XR=new Promise((e=>{eF=e}))),e?async function(e){tF=!0;let{emojiVersion:t,set:n,locale:i}=e;if(t||(t=GR.emojiVersion.value),n||(n=GR.set.value),i||(i=GR.locale.value),QR)QR.categories=QR.categories.filter((e=>!!!e.name));else{QR=("function"==typeof e.data?await e.data():e.data)||await JR(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${n}.json`),QR.emoticons={},QR.natives={},QR.categories.unshift({id:"frequent",emojis:[]});for(const e in QR.aliases){const t=QR.aliases[e],n=QR.emojis[t];n&&(n.aliases||(n.aliases=[]),n.aliases.push(e))}}if(YR=("function"==typeof e.i18n?await e.i18n():e.i18n)||("en"==i?tR(VR):await JR(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let t in e.custom){t=parseInt(t);const n=e.custom[t],i=e.custom[t-1];if(n.emojis&&n.emojis.length){n.id||(n.id=`custom_${t+1}`),n.name||(n.name=YR.categories.custom),i&&!n.icon&&(n.target=i.target||i),QR.categories.push(n);for(const e of n.emojis)QR.emojis[e.id]=e}}e.categories&&(QR.categories=QR.categories.filter((t=>-1!=e.categories.indexOf(t.id))).sort(((t,n)=>e.categories.indexOf(t.id)-e.categories.indexOf(n.id))));let r=null,o=null;"native"==n&&(r=$R.latestVersion(),o=e.noCountryFlags||$R.noCountryFlags());let s=QR.categories.length,a=!1;for(;s--;){const t=QR.categories[s];if("frequent"==t.id){let{maxFrequentRows:n,perLine:i}=e;n||(n=GR.maxFrequentRows.value),i||(i=GR.perLine.value),t.emojis=KR.get({maxFrequentRows:n,perLine:i})}if(!t.emojis||!t.emojis.length){QR.categories.splice(s,1);continue}const{categoryIcons:n}=e;if(n){const e=n[t.id];e&&!t.icon&&(t.icon=e)}let i=t.emojis.length;for(;i--;){const e=t.emojis[i],n=e.id?e:QR.emojis[e],s=()=>{t.emojis.splice(i,1)};if(n)if(r&&n.version>r)s();else if(!o||"flags"!=t.id||aF.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)QR.emoticons[e]||(QR.emoticons[e]=n.id);let e=0;for(const t of n.skins){if(!t)continue;e++;const{native:i}=t;i&&(QR.natives[i]=n.id,n.search+=`,${i}`);const r=1==e?"":`:skin-tone-${e}:`;t.shortcodes=`:${n.id}:${r}`}}}else s();else s()}}a&&sF.reset();eF()}(e):t&&!tF&&console.warn(`\`${t}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),XR}function iF(e,t,n){e||(e={});const i={};for(let r in t)i[r]=rF(r,e,t,n);return i}function rF(e,t,n,i){const r=n[e];let o=i&&i.getAttribute(e)||(null!=t[e]&&null!=t[e]?t[e]:null);return r?(null!=o&&r.value&&typeof r.value!=typeof o&&(o="boolean"==typeof r.value?"false"!=o:r.value.constructor(o)),r.transform&&o&&(o=r.transform(o)),(null==o||r.choices&&-1==r.choices.indexOf(o))&&(o=r.value),o):o}let oF=null;var sF={search:async function(e,{maxResults:t,caller:n}={}){if(!e||!e.trim().length)return null;t||(t=90),await nF(null,{caller:n||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter(((e,t,n)=>e.trim()&&n.indexOf(e)==t));if(!i.length)return;let r,o,s=oF||(oF=Object.values(QR.emojis));for(const e of i){if(!s.length)break;r=[],o={};for(const t of s){if(!t.search)continue;const n=t.search.indexOf(`,${e}`);-1!=n&&(r.push(t),o[t.id]||(o[t.id]=0),o[t.id]+=t.id==e?0:n+1)}s=r}return r.length<2||(r.sort(((e,t)=>{const n=o[e.id],i=o[t.id];return n==i?e.id.localeCompare(t.id):n-i})),r.length>t&&(r=r.slice(0,t))),r},get:function(e){return e.id?e:QR.emojis[e]||QR.emojis[QR.aliases[e]]||QR.emojis[QR.natives[e]]},reset:function(){oF=null},SHORTCODES_REGEX:/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/};const aF=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];var lF={categories:{activity:{outline:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("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"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("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"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("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"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[RR("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"}),RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:RR("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:RR("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:RR("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 cF(e){let{id:t,skin:n,emoji:i}=e;if(e.shortcodes){const i=e.shortcodes.match(sF.SHORTCODES_REGEX);i&&(t=i[1],i[2]&&(n=i[2]))}if(i||(i=sF.get(t||e.native)),!i)return e.fallback;const r=i.skins[n-1]||i.skins[0],o=r.src||("native"==e.set||e.spritesheet?void 0:"function"==typeof e.getImageURL?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/64/${r.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 RR("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:o?RR("img",{style:{height:e.size||"1em",width:"auto",display:"inline-block",position:"relative",top:".1em"},alt:r.native||r.shortcodes,src:o}):"native"==e.set?RR("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:r.native}):RR("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${s})`,backgroundSize:`${100*QR.sheet.cols}% ${100*QR.sheet.rows}%`,backgroundPosition:`${100/(QR.sheet.cols-1)*r.x}% ${100/(QR.sheet.rows-1)*r.y}%`}})})}const uF="undefined"!=typeof window?window.HTMLElement:Object;class pF extends uF{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 i=rF(e,{[e]:n},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:i}):(this.component.props[e]=i,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 dF extends pF{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 hF={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:GR.set,skin:GR.skin};class fF extends pF{async connectedCallback(){const e=iF(this.props,hF,this);e.element=this,e.ref=e=>{this.component=e},await nF(),zR(RR(cF,{...e}),this)}constructor(e){super(e)}}nR(fF,"Props",hF),"undefined"==typeof customElements||customElements.get("em-emoji")||customElements.define("em-emoji",fF);var mF,gF=[],bF=rR.__b,vF=rR.__r,yF=rR.diffed,xF=rR.__c,wF=rR.unmount;function _F(){var e;for(gF.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=gF.pop();)if(e.__P)try{e.__H.__h.forEach(EF),e.__H.__h.forEach(CF),e.__H.__h=[]}catch(t){e.__H.__h=[],rR.__e(t,e.__v)}}rR.__b=function(e){bF&&bF(e)},rR.__r=function(e){vF&&vF(e);var t=e.__c.__H;t&&(t.__h.forEach(EF),t.__h.forEach(CF),t.__h=[])},rR.diffed=function(e){yF&&yF(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==gF.push(t)&&mF===rR.requestAnimationFrame||((mF=rR.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(i),kF&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);kF&&(t=requestAnimationFrame(n))})(_F))},rR.__c=function(e,t){t.some((function(e){try{e.__h.forEach(EF),e.__h=e.__h.filter((function(e){return!e.__||CF(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],rR.__e(n,e.__v)}})),xF&&xF(e,t)},rR.unmount=function(e){wF&&wF(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{EF(e)}catch(e){t=e}})),t&&rR.__e(t,n.__v))};var kF="function"==typeof requestAnimationFrame;function EF(e){var t=e.__c;"function"==typeof t&&(e.__c=void 0,t())}function CF(e){e.__c=e.__()}function MF(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function OF(e){this.props=e}(OF.prototype=new bR).isPureReactComponent=!0,OF.prototype.shouldComponentUpdate=function(e,t){return MF(this.props,e)||MF(this.state,t)};var DF=rR.__b;rR.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),DF&&DF(e)};var TF=rR.__e;rR.__e=function(e,t,n){if(e.then)for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);TF(e,t,n)};var SF=rR.unmount;function NF(){this.__u=0,this.t=null,this.__b=null}function AF(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function jF(){this.u=null,this.o=null}rR.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),SF&&SF(e)},(NF.prototype=new bR).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=AF(i.__v),o=!1,s=function(){o||(o=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(!--i.__u){if(i.state.__e){var e=i.state.__e;i.__v.__k[0]=function e(t,n,i){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,i)})),t.__c&&t.__c.__P===n&&(t.__e&&i.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=i)),t}(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__e:i.__b=null});t=i.t.pop();)t.forceUpdate()}},l=!0===t.__h;i.__u++||l||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(s,s)},NF.prototype.componentWillUnmount=function(){this.t=[]},NF.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,i){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===i&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,i)}))),t}(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__e&&fR(gR,null,e.fallback);return r&&(r.__h=null),[fR(gR,null,t.__e?null:e.children),r]};var LF=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]}};(jF.prototype=new bR).__e=function(e){var t=this,n=AF(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),LF(t,e,i)):r()};n?n(o):o()}},jF.prototype.render=function(e){this.u=null,this.o=new Map;var t=ER(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},jF.prototype.componentDidUpdate=jF.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){LF(e,n,t)}))};var zF="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,IF=/^(?: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]/,RF="undefined"!=typeof document,FF=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};bR.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(bR.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var BF=rR.event;function PF(){}function UF(){return this.cancelBubble}function HF(){return this.defaultPrevented}rR.event=function(e){return BF&&(e=BF(e)),e.persist=PF,e.isPropagationStopped=UF,e.isDefaultPrevented=HF,e.nativeEvent=e};var $F={configurable:!0,get:function(){return this.class}},WF=rR.vnode;rR.vnode=function(e){var t=e.type,n=e.props,i=n;if("string"==typeof t){var r=-1===t.indexOf("-");for(var o in i={},n){var s=n[o];RF&&"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)&&!FF(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():r&&IF.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),i[o]=s)}"select"==t&&i.multiple&&Array.isArray(i.value)&&(i.value=ER(n.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==t&&null!=i.defaultValue&&(i.value=ER(n.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),e.props=i,n.class!=n.className&&($F.enumerable="className"in n,null!=n.className&&(i.class=n.className),Object.defineProperty(i,"className",$F))}e.$$typeof=zF,WF&&WF(e)};var qF=rR.__r;rR.__r=function(e){qF&&qF(e),e.__c};const VF={light:"outline",dark:"solid"};class KF extends OF{renderIcon(e){const{icon:t}=e;if(t){if(t.svg)return RR("span",{class:"flex",dangerouslySetInnerHTML:{__html:t.svg}});if(t.src)return RR("img",{src:t.src})}const n=lF.categories[e.id]||lF.categories.custom;return n["auto"==this.props.icons?VF[this.props.theme]:this.props.icons]||n}render(){let e=null;return RR("nav",{id:"nav",class:"padding","data-position":this.props.position,children:RR("div",{class:"flex relative",children:[this.categories.map(((t,n)=>{const i=t.name||YR.categories[t.id],r=!this.props.unfocused&&t.id==this.state.categoryId;return r&&(e=n),RR("button",{"aria-label":i,"aria-selected":r||void 0,title:i,type:"button",class:"flex flex-grow flex-center",onMouseDown:e=>e.preventDefault(),onClick:()=>{this.props.onClick({category:t,i:n})},children:this.renderIcon(t)})})),RR("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:null==e?0:1,transform:`translateX(${100*e}%)`}})]})})}constructor(){super(),this.categories=QR.categories.filter((e=>!e.target)),this.state={categoryId:this.categories[0].id}}}class GF extends OF{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 YF=10;class QF extends bR{getInitialState(e=this.props){return{skin:FR.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.observers=[],this.dir=YR.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 nF(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}=QR;this.refs.categories=new Map;const t=QR.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 i=this.grid.length-1,r=i%YF?{}:{current:null};return r.index=i,r.posinset=this.grid.setsize+1,e.push(r),n};for(let t of e){const e=[];let i=n(e,t);for(let r of t.emojis)i.length==this.props.perLine&&(i=n(e,t)),this.grid.setsize+=1,i.push(r);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,i=n[e]&&n[e][t];if(i)return sF.get(i)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const t=new Map,n=t=>{t!=e.state.categoryId&&e.setState({categoryId:t})},i={root:this.refs.scroll.current,threshold:[0,1]},r=new IntersectionObserver((e=>{for(const n of e){const e=n.target.dataset.id;t.set(e,n.intersectionRatio)}const i=[...t],r=i[i.length-1];if(1==r[1])return n(r[0]);for(const[e,t]of i)if(t){n(e);break}}),i);for(const{root:e}of this.refs.categories.values())r.observe(e.current);this.observers.push(r)}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*(YF+5)}px 0px ${this.props.emojiButtonSize*YF}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:i,up:r,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||r))return null;if(-1==a)return e.repeat||!i&&!o||t.selectionStart!=t.value.length?null:[0,0];if(n||i){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(r||o){a+=r?-1:1;const e=s[a];return e?(e[l]||(l=e.length-1),[a,l]):(a=r?0:s.length-1,l=r?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 i=this.refs.scroll.current,r=i.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-(r.top-i.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<i.scrollTop)o=e;else{if(!(s>i.scrollTop+r.height))return;o=s-r.height}}else o=0;this.ignoreMouse(),i.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]),i={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&&(i.skin=t+1),n.src&&(i.src=n.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}(e,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&KR.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}),FR.set("skin",e)}renderNav(){return RR(KF,{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 RR("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[RR("div",{class:"flex flex-middle flex-grow",children:[RR("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:RR(cF,{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})}),RR("div",{class:`margin-${this.dir[0]}`,children:RR("div",e?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[RR("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:e.name}),RR("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:e.skins[0].shortcodes})]}:t?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[RR("div",{class:"ellipsis",style:{fontSize:"1.1em"},children:YR.search_no_results_1}),RR("div",{class:"ellipsis color-c",style:{fontSize:".9em"},children:YR.search_no_results_2})]}:{class:"color-c",style:{fontSize:21},children:YR.pick})})]}),!e&&"preview"==this.props.skinTonePosition&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:t,posinset:n,grid:i}){const r=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 RR(GF,{selected:a,skin:o,size:r,children:RR("button",{"aria-label":s,"aria-selected":a||void 0,"aria-posinset":n,"aria-setsize":i.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:[RR("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}}),RR(cF,{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 RR("div",{children:[RR("div",{class:"spacer"}),RR("div",{class:"flex flex-middle",children:[e&&"rtl"==this.dir&&this.renderSkinToneButton(),RR("div",{class:"search relative flex-grow",children:[RR("input",{type:"search",ref:this.refs.searchInput,placeholder:YR.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),RR("span",{class:"icon loupe flex",children:lF.search.loupe}),this.state.searchResults&&RR("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:lF.search.delete})]}),e&&"ltr"==this.dir&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?RR("div",{class:"category",ref:this.refs.search,children:[RR("div",{class:`sticky padding-small align-${this.dir[0]}`,children:YR.categories.search}),RR("div",{children:e.length?e.map(((t,n)=>RR("div",{class:"flex",children:t.map(((t,i)=>this.renderEmojiButton(t,{pos:[n,i],posinset:n*this.props.perLine+i+1,grid:e})))}))):RR("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&RR("a",{onClick:this.props.onAddCustomEmoji,children:YR.add_custom})})})]}):null}renderCategories(){const{categories:e}=QR,t=!!this.state.searchResults;return RR("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 RR("div",{"data-id":e.target?e.target.id:e.id,class:"category",ref:t,children:[RR("div",{class:`sticky padding-small align-${this.dir[0]}`,children:e.name||YR.categories[e.id]}),RR("div",{class:"relative",style:{height:n.length*this.props.emojiButtonSize},children:n.map(((t,n)=>{const i=t.index-t.index%YF,r=this.state.visibleRows[i],o="current"in t?t:void 0;if(!r&&!o)return null;const s=n*this.props.perLine,a=s+this.props.perLine,l=e.emojis.slice(s,a);return RR("div",{"data-index":t.index,ref:o,class:"flex row",style:{top:n*this.props.emojiButtonSize},children:r&&l.map(((e,n)=>{const i=sF.get(e);return this.renderEmojiButton(i,{pos:[t.index,n],posinset:t.posinset+n,grid:this.grid})}))},t.index)}))})]})}))})}renderSkinToneButton(){return"none"==this.props.skinTonePosition?null:RR("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:RR("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":YR.skins.choose,title:YR.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:RR("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const e=this.getEmojiByPos(this.state.pos);return RR("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"),RR("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":YR.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 RR("div",{children:[RR("input",{type:"radio",name:"skin-tone",value:t,"aria-label":YR.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))}}),RR("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:[RR("span",{class:`skin-tone skin-tone-${t}`}),RR("span",{class:"margin-small-lr",children:YR.skins[t]})]})]})}))})}render(){return RR("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&&RR("div",{class:"padding-lr",children:this.renderSearch()}),RR("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:RR("div",{style:{width:this.props.perLine*this.props.emojiButtonSize},children:["static"==this.props.searchPosition&&this.renderSearch(),this.renderSearchResults(),this.renderCategories(),RR("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(),nR(this,"handleClickOutside",(e=>{const{element:t}=this.props;e.target!=t&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside())})),nR(this,"handleBaseClick",(e=>{this.state.showSkins&&(e.target.closest(".menu")||(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins()))})),nR(this,"handleBaseKeydown",(e=>{this.state.showSkins&&"Escape"==e.key&&(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins())})),nR(this,"handleSearchClick",(()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})})),nR(this,"handleSearchInput",(async()=>{const e=this.refs.searchInput.current;if(!e)return;const{value:t}=e,n=await sF.search(t),i=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!n)return this.setState({searchResults:n,pos:[-1,-1]},i);const r=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:r},i)})),nR(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()}})),nR(this,"clearSearch",(()=>{const e=this.refs.searchInput.current;e&&(e.value="",e.focus(),this.handleSearchInput())})),nR(this,"handleCategoryClick",(({category:e,i:t})=>{this.scrollTo(0==t?{row:-1}:{categoryId:e.id})})),nR(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 ZF extends dF{async connectedCallback(){const e=iF(this.props,GR,this);e.element=this,e.ref=e=>{this.component=e},await nF(e),zR(RR(QF,{...e}),this.shadowRoot)}disconnectedCallback(){this.component&&this.component.unregister()}constructor(e){super(e,{styles:tR(JF)})}}nR(ZF,"Props",GR),"undefined"==typeof customElements||customElements.get("em-emoji-picker")||customElements.define("em-emoji-picker",ZF);var JF={};JF=':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 XF=()=>UO.get("https://cdn.jsdelivr.net/npm/@emoji-mart/data");class eB extends t.Component{constructor(){super(...arguments),bE(this,"ref",t.createRef()),bE(this,"fetchEmojiData",(async()=>{try{const{data:e}=await XF();return e}catch{return{}}})),bE(this,"onKeyDown",(e=>{let{event:t}=e;return"Escape"===t.key&&(this.props.editor.chain().focus().deleteRange(this.props.range).run(),!0)})),bE(this,"handleSelect",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e).run()}))}componentDidMount(){new ZF({...this.props,onEmojiSelect:this.handleSelect,style:{maxWidth:"100%"},theme:"light",native:!0,previewPosition:"none",showSkinTones:!1,data:this.fetchEmojiData,ref:this.ref})}render(){return t.createElement("div",{"data-cy":"neeto-editor-emoji-picker",ref:this.ref})}}eB.defaultProps={editor:{},range:{}},eB.propTypes={editor:wh.exports.object.isRequired,range:wh.exports.object};const tB=new en("emoji-picker"),nB=Xs.create({name:"emojiPicker",group:"inline",inline:!0,selectable:!1,atom:!0,addOptions:()=>({suggestion:{char:"::",startOfLine:!1,pluginKey:tB,items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Dc(eB,{props:n,editor:n.editor}),t=pc("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[eR({editor:this.editor,...this.options.suggestion})]}});class iB extends t.Component{constructor(){super(...arguments),bE(this,"state",{isLoading:!1,selectedIndex:0,emojiSuggestions:[]}),bE(this,"fetchEmojiData",(async()=>{this.setState({isLoading:!0});try{const{data:e}=await XF();return this.setState({isLoading:!1}),e}catch{return this.setState({isLoading:!1}),{}}})),bE(this,"searchEmoji",(async()=>{if(this.props.query)return(await sF.search(this.props.query)).slice(0,5);return(await Promise.all(["+1","-1","smile","tada","heart"].map((e=>sF.search(e))))).map((e=>e[0]))})),bE(this,"searchEmojiAndSetState",(async()=>{const e=await this.searchEmoji();this.setState({emojiSuggestions:e})})),bE(this,"setEditorState",(async()=>{const e=await this.searchEmoji();this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(e[0]).run()})),bE(this,"onKeyDown",(e=>{let{event:t}=e;return"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):" "===t.key?(qu(this.props.query)?this.props.editor.chain().focus().insertContent(" ").run():this.setEditorState(),!0):"Escape"===t.key&&(this.props.editor.chain().focus().insertContent(" ").run(),!0)})),bE(this,"selectItem",(e=>{this.props.editor.chain().focus().deleteRange(this.props.range).setEmoji(this.state.emojiSuggestions[e]).run()}))}componentDidMount(){nF({data:this.fetchEmojiData,theme:"light",previewPosition:"none"}),this.searchEmojiAndSetState()}componentDidUpdate(e){this.props.query!==e.query&&this.searchEmojiAndSetState()}render(){return t.createElement("div",{className:"neeto-editor-emoji-suggestion"},this.state.isLoading&&t.createElement(JT,null),!this.state.isLoading&&(this.state.emojiSuggestions.length>0?this.state.emojiSuggestions.map(((e,n)=>t.createElement("div",{"data-cy":`neeto-editor-emoji-suggestion-${e.id}`,key:e.id,className:Rc("neeto-editor-emoji-suggestion__item",{"neeto-editor-emoji-suggestion__item--selected":n===this.state.selectedIndex}),onClick:()=>this.selectItem(n)},e.skins[0].native))):t.createElement("p",null,"No results")))}}const rB=new en("emoji-suggestion"),oB=Xs.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",Ho({"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:i}=t;i().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[eR({editor:this.editor,...this.options.suggestion})]}}),sB={char:":",startOfLine:!1,pluginKey:rB,command:e=>{let{editor:t,range:n,props:i}=e;t.chain().focus().deleteRange(n).setEmoji(i).run()},items:()=>[],render:()=>{let e,t;return{onStart(n){e=new Dc(iB,{props:n,editor:n.editor}),t=pc("body",{theme:"light",getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"top-start",zIndex:99999})},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[0].destroy(),e.destroy()}}}};var aB=oB.configure({suggestion:sB});const lB=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,cB=Xs.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Ho(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Ys({find:lB,type:this.type,getAttributes:e=>{const[,,t,n,i]=e;return{src:n,alt:t,title:i}}})]}});var uB,pB=void 0&&(void 0).__extends||(uB=function(e,t){return uB=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])},uB(e,t)},function(e,t){function n(){this.constructor=e}uB(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),dB=void 0&&(void 0).__assign||function(){return dB=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},dB.apply(this,arguments)},hB={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},fB={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},mB={width:"20px",height:"20px",position:"absolute"},gB={top:dB(dB({},hB),{top:"-5px"}),right:dB(dB({},fB),{left:void 0,right:"-5px"}),bottom:dB(dB({},hB),{top:void 0,bottom:"-5px"}),left:dB(dB({},fB),{left:"-5px"}),topRight:dB(dB({},mB),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:dB(dB({},mB),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:dB(dB({},mB),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:dB(dB({},mB),{left:"-10px",top:"-10px",cursor:"nw-resize"})},bB=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return pB(n,t),n.prototype.render=function(){return e.createElement("div",{className:this.props.className||"",style:dB(dB({position:"absolute",userSelect:"none"},gB[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},n}(e.PureComponent),vB=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 i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yB=void 0&&(void 0).__assign||function(){return yB=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},yB.apply(this,arguments)},xB={width:"auto",height:"auto"},wB=function(e,t,n){return Math.max(Math.min(e,n),t)},_B=function(e,t){return Math.round(e/t)*t},kB=function(e,t){return new RegExp(e,"i").test(t)},EB=function(e){return Boolean(e.touches&&e.touches.length)},CB=function(e,t,n){void 0===n&&(n=0);var i=t.reduce((function(n,i,r){return Math.abs(i-e)<Math.abs(t[n]-e)?r:n}),0),r=Math.abs(t[i]-e);return 0===n||r<n?t[i]:e},MB=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"},OB=function(e,t,n,i){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 i*(Number(e.replace("vh",""))/100)}return e},DB=["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"],TB="__resizable_base__",SB=function(t){function n(e){var n=t.call(this,e)||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(TB):t.className+=TB,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 vB(n,t),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||xB},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,i=this.resizable.offsetHeight,r=this.resizable.style.position;"relative"!==r&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=r}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 MB(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?MB(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?MB(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 i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),i},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,i,r=this.props.boundsByDirection,o=this.state.direction,s=r&&kB("left",o),a=r&&kB("top",o);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=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,i=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),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,i=this.props.resizeRatio||1,r=this.state,o=r.direction,s=r.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,p=s.width,d=s.height,h=c||0,f=u||0;return kB("right",o)&&(p=s.width+(e-s.x)*i/n,l&&(d=(p-f)/this.ratio+h)),kB("left",o)&&(p=s.width-(e-s.x)*i/n,l&&(d=(p-f)/this.ratio+h)),kB("bottom",o)&&(d=s.height+(t-s.y)*i/n,l&&(p=(d-h)*this.ratio+f)),kB("top",o)&&(d=s.height-(t-s.y)*i/n,l&&(p=(d-h)*this.ratio+f)),{newWidth:p,newHeight:d}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,i){var r=this.props,o=r.lockAspectRatio,s=r.lockAspectRatioExtraHeight,a=r.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===i.height?10:i.height,p=void 0===n.height||n.height<0?t:n.height,d=s||0,h=a||0;if(o){var f=(u-d)*this.ratio+h,m=(p-d)*this.ratio+h,g=(l-h)/this.ratio+d,b=(c-h)/this.ratio+d,v=Math.max(l,f),y=Math.min(c,m),x=Math.max(u,g),w=Math.min(p,b);e=wB(e,v,y),t=wB(t,x,w)}else e=wB(e,l,c),t=wB(t,u,p);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 i=this.resizable.getBoundingClientRect(),r=i.left,o=i.top,s=i.right,a=i.bottom;this.resizableLeft=r,this.resizableRight=s,this.resizableTop=o,this.resizableBottom=a}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,i=0,r=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,r=e.nativeEvent.clientY):e.nativeEvent&&EB(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,r=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:i,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:yB(yB({},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&&EB(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,i=n.maxWidth,r=n.maxHeight,o=n.minWidth,s=n.minHeight,a=EB(e)?e.touches[0].clientX:e.clientX,l=EB(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,p=c.original,d=c.width,h=c.height,f=this.getParentSize(),g=function(e,t,n,i,r,o,s){return i=OB(i,e.width,t,n),r=OB(r,e.height,t,n),o=OB(o,e.width,t,n),s=OB(s,e.height,t,n),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===r?void 0:Number(r),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,r,o,s);i=g.maxWidth,r=g.maxHeight,o=g.minWidth,s=g.minHeight;var b=this.calculateNewSizeFromDirection(a,l),v=b.newHeight,y=b.newWidth,x=this.calculateNewMaxFromBoundary(i,r);this.props.snap&&this.props.snap.x&&(y=CB(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=CB(v,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,v,{width:x.maxWidth,height:x.maxHeight},{width:o,height:s});if(y=w.newWidth,v=w.newHeight,this.props.grid){var _=_B(y,this.props.grid[0]),k=_B(v,this.props.grid[1]),E=this.props.snapGap||0;y=0===E||Math.abs(_-y)<=E?_:y,v=0===E||Math.abs(k-v)<=E?k:v}var C={width:y-p.width,height:v-p.height};if(d&&"string"==typeof d)if(d.endsWith("%"))y=y/f.width*100+"%";else if(d.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(d.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))v=v/f.height*100+"%";else if(h.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var M={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?M.flexBasis=M.width:"column"===this.flexDir&&(M.flexBasis=M.height),m((function(){t.setState(M)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,C)}},n.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,i=t.direction,r=t.original;if(n&&this.resizable){var o={width:this.size.width-r.width,height:this.size.height-r.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:yB(yB({},this.state.backgroundStyle),{cursor:"auto"})})}},n.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},n.prototype.renderResizer=function(){var t=this,n=this.props,i=n.enable,r=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,a=n.handleWrapperClass,l=n.handleComponent;if(!i)return null;var c=Object.keys(i).map((function(n){return!1!==i[n]?e.createElement(bB,{key:n,direction:n,onResizeStart:t.onResizeStart,replaceStyles:r&&r[n],className:o&&o[n]},l&&l[n]?l[n]:null):null}));return e.createElement("div",{className:a,style:s},c)},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce((function(e,n){return-1!==DB.indexOf(n)||(e[n]=t.props[n]),e}),{}),i=yB(yB(yB({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&&(i.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return e.createElement(r,yB({ref:this.ref,style:i,className:this.props.className},n),this.state.isResizing&&e.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}(e.PureComponent);const NB=e=>{let{node:n,editor:i,getPos:r}=e;const{alt:o,src:s,float:a,align:l,height:c,width:u}=n.attrs,p=o||"",{view:d}=i;return t.createElement(Oc,null,t.createElement(SB,{lockAspectRatio:!0,className:`neeto-editor__image neeto-editor__image--${a} neeto-editor__image--${l} neeto-editor__image-defaults`,size:{height:c,width:u},onResizeStop:(e,t,o)=>{d.dispatch(d.state.tr.setNodeMarkup(r(),void 0,{...n.attrs,height:o.offsetHeight,width:o.offsetWidth})),i.commands.focus()}},t.createElement("figure",null,t.createElement("img",T({alt:p,src:s},n.attrs)),t.createElement("figcaption",null,p))))},AB=cB.extend({name:"image",addAttributes:()=>({...cB.config.addAttributes(),height:{default:"auto",rendered:!1},width:{default:"fit-content",rendered:!1},float:{default:"none",rendered:!1},align:{default:"center",rendered:!1}}),addCommands(){return{setImage:e=>t=>{var n,i,r;let{tr:o,commands:s}=t;return"image"===(null===(n=o.selection)||void 0===n||null===(i=n.node)||void 0===i||null===(r=i.type)||void 0===r?void 0:r.name)?s.updateAttributes("image",e):s.insertContent({type:this.name,attrs:e})},setImageAttributes:e=>t=>{let{tr:n}=t;const{selection:i}=n,r={...i.node.attrs,...e},o=this.type.create(r);n.replaceRangeWith(i.from,i.to,o)}}},parseHTML:()=>[{tag:"img"}],renderHTML(e){let{node:t}=e;const{alt:n,src:i,float:r,align:o,height:s,width:a}=t.attrs,l=n||"";return["a",{class:`neeto-editor__image neeto-editor__image--${r} neeto-editor__image--${o} neeto-editor__image-defaults`,style:`height:${isNaN(s)?s:`${s}px`};width:${isNaN(a)?a:`${a}px`};`,href:i,target:"_blank",rel:"noopener noreferrer"},["figure",{},["img",Ho(t.attrs,{src:i,caption:l})],["figcaption",l]]]},addNodeView:()=>Sc(NB)}),jB=async(e,t)=>{const n=new OT({file:e,url:t}),{blob_url:i}=await n.create();return i};var LB=e=>{let{uploadEndpoint:t}=e;return AB.extend({addProseMirrorPlugins:()=>[new Zt({props:{handleDOMEvents:{paste(e,n){var i,r;const{schema:o,selection:{$anchor:{pos:s}}}=e.state;if(!(null===(i=n.clipboardData)||void 0===i||null===(r=i.files)||void 0===r?void 0:r.length))return;const a=Array.from(n.clipboardData.files).filter((e=>/image/i.test(e.type)));Pu(a)||(n.preventDefault(),a.forEach((async n=>{const i=o.nodes.image.create({src:await jB(n,t)}),r=e.state.tr.insert(s,i);e.dispatch(r)})))}}}})]})},zB=Xs.create({name:"figcaption",selectable:!1,draggable:!1,parseHTML:()=>[{tag:"figcaption"}]});const IB=e=>{let{onSubmit:t,shortcuts:n}=e;return as.create({name:"keyboard-shortcuts",addKeyboardShortcuts(){return{"Mod-Enter":()=>(null==t||t(this.editor.getHTML()),this.editor.commands.blur(),!0),...n}}})};var RB=e=>{let{onSubmit:t,shortcuts:n}=e;return IB({onSubmit:t,shortcuts:n})};const FB=new en("mention"),BB=Xs.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:FB,command:({editor:e,range:t,props:n})=>{var i,r;const o=e.view.state.selection.$to.nodeAfter;(null===(i=null==o?void 0:o.text)||void 0===i?void 0:i.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),null===(r=window.getSelection())||void 0===r||r.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),i=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(i)}}}},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",Ho({"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:i}=t,{empty:r,anchor:o}=i;return!!r&&(t.doc.nodesBetween(o-1,o,((t,i)=>{if(t.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",i,i+t.nodeSize),!1})),n)}))}},addProseMirrorPlugins(){return[eR({editor:this.editor,...this.options.suggestion})]}}),PB=e=>{let{size:n="medium",user:i={},isSquare:o=!1,status:s=null,onClick:a=(()=>{}),className:l="",...c}=e;const[u,p]=r(!1),{name:d="",imageUrl:h}=i,f="medium"===n,m="large"===n,g="extraLarge"===n,b=(e=>{if(e&&"string"==typeof e){const t=e.trim().split(" "),n=t.reduce(((e,n,i)=>(0!==i&&i!==t.length-1||(e=`${e}${n.charAt(0).toUpperCase()}`),e)),"");return n}return""})(d),v={height:Rf[n],width:Rf[n]},y=Rc("ne-avatar ",{"ne-avatar--medium":f,"ne-avatar--large":m,"ne-avatar--xlarge":g,"ne-avatar--round":!o,hidden:u}),x=Rc("ne-avatar__text",{"ne-avatar__text-medium":f,"ne-avatar__text-large":m,"ne-avatar__text-xlarge":g}),w=Rc("ne-avatar__status",s,{"ne-avatar__status-medium":f,"ne-avatar__status-large":m,"ne-avatar__status-xlarge":g,"ne-avatar__status-square":o}),_=()=>Hu(s)?t.Fragment:t.createElement("span",{className:w,"data-testid":"indicator"}),k=()=>t.createElement("span",{className:x,"data-testid":"initials"},b),E=b&&!(h&&!u);return t.createElement("span",T({style:v,className:Rc("ne-avatar--container ne-select-none",{"ne-avatar--container-round":!o},l,(()=>{const e=(b.charCodeAt(0)||0)+(b.charCodeAt(1)||0);return Ff[e%65%Ff.length]||Ff[0]})()),onClick:a},c),t.createElement(_,null),E?t.createElement(k,null):t.createElement("img",{alt:`avatar-${b}`,className:y,"data-chromatic":"ignore",src:h||Bf,onError:()=>p(!0)}))};PB.propTypes={size:wh.exports.oneOf(Object.keys(Rf)),user:wh.exports.shape({imageUrl:wh.exports.string,name:wh.exports.string}),isSquare:wh.exports.bool,onClick:wh.exports.func,status:wh.exports.oneOf(Object.keys({online:"online",idle:"idle",offline:"offline"})),className:wh.exports.string};const UB=e=>{let{wrapperRef:t,index:n}=e;if(!t.current||n>=t.current.children.length)return;const i=8,r=t.current,o=r.children[n],s=o.clientHeight+i;let a=r.scrollTop;o.offsetTop+s>a+r.clientHeight?a=o.offsetTop-r.clientHeight+s:a>o.offsetTop&&(a=o.offsetTop-i),t.current.scrollTop=a};class HB extends t.Component{constructor(e){super(e),bE(this,"selectItem",(e=>{const{items:t,command:n}=this.props,i=t[e];i&&n({label:i.name,id:i.key})})),bE(this,"upHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+e.length-1)%e.length}}))})),bE(this,"downHandler",(()=>{const{items:e}=this.props;this.setState((t=>{const{selectedIndex:n}=t;return{selectedIndex:(n+1)%e.length}}))})),bE(this,"enterHandler",(()=>{const{selectedIndex:e}=this.state;this.selectItem(e)})),bE(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=t.createRef()}componentDidUpdate(e){const{items:t}=this.props;t!==e.items&&this.setState({selectedIndex:0}),UB({wrapperRef:this.mentionRef,index:this.state.selectedIndex})}render(){const{selectedIndex:e}=this.state,{items:n}=this.props;return Pu(n)?t.createElement("div",{className:"neeto-editor-mentions__wrapper"},t.createElement("p",{className:"neeto-editor-mentions__item"},"No Results")):t.createElement("div",{className:"neeto-editor-mentions__wrapper","data-cy":"neeto-editor-mention-list",ref:this.mentionRef},n.map(((n,i)=>{let{key:r,name:o,imageUrl:s}=n;return t.createElement("button",{"data-cy":`neeto-editor-mention-list-${o}`,key:r,type:"button",className:Rc("neeto-editor-mentions__item",{active:i===e}),onClick:()=>this.selectItem(i)},t.createElement(PB,{user:{name:o,imageUrl:s}}),t.createElement("p",null,o))})))}}const $B=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.sort(((e,t)=>e.name.localeCompare(t.name)))},WB=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=$B(e);return e=>{let{query:n}=e;return t.filter((e=>{let{name:t}=e;return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}))}},qB={render:()=>{let e,t;return{onStart:n=>{e=new Dc(HB,{props:n,editor:n.editor}),t=pc("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 i;return"Escape"===n.event.key?(t[0].hide(),!0):null===(i=e.ref)||void 0===i?void 0:i.onKeyDown(n)},onExit(){t[0].destroy(),e.destroy()}}}},VB=BB.extend({addCommands(){return{setMention:e=>{let{id:t,label:n}=e;return e=>{let{chain:i}=e;i().focus().insertContent([{type:this.name,attrs:{id:t,label:n}},{type:"text",text:" "}]).run()}}}}});var KB=e=>{let{suggestion:t={},...n}=e;return VB.configure({...n,suggestion:{...qB,...t}})};const GB=as.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 Zt({props:{decorations:e=>{let{doc:t,selection:n}=e;const i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=n,o=[];return i?(t.descendants(((e,t)=>{const n=r>=t&&r<=t+e.nodeSize,i=!e.isLeaf&&!e.childCount,s=this.options.excludeNodeTypes.includes(e.type.name);if((n||!this.options.showOnlyCurrent)&&!s&&i){const n=[this.options.emptyNodeClass];this.editor.isEmpty&&n.push(this.options.emptyEditorClass);const i=Ir.node(t,t+e.nodeSize,{class:n.join(" "),"data-placeholder":this.options.placeholder});o.push(i)}return this.options.includeChildren})),Br.create(t,o)):null}}})]}});var YB={exports:{}};
61
61
  /**
62
62
  * @license
63
63
  * Lodash <https://lodash.com/>