@redocly/replay 0.14.0-next.3 → 0.14.0-next.4

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.
@@ -152,7 +152,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
152
152
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
153
153
  * derived from CryptoJS.mode.CTR
154
154
  * Jan Hruby jhruby.web@gmail.com
155
- */return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function i(a){if((a>>24&255)===255){var l=a>>16&255,c=a>>8&255,u=a&255;l===255?(l=0,c===255?(c=0,u===255?u=0:++u):++c):++l,a=0,a+=l<<16,a+=c<<8,a+=u}else a+=1<<24;return a}function o(a){return(a[0]=i(a[0]))===0&&(a[1]=i(a[1])),a}var s=r.Encryptor=r.extend({processBlock:function(a,l){var c=this._cipher,u=c.blockSize,f=this._iv,d=this._counter;f&&(d=this._counter=f.slice(0),this._iv=void 0),o(d);var h=d.slice(0);c.encryptBlock(h,0);for(var g=0;g<u;g++)a[l+g]^=h[g]}});return r.Decryptor=s,r}(),n.mode.CTRGladman})}(n0)),n0.exports}var r0={exports:{}},fw;function BM(){return fw||(fw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(o,s){var a=this._cipher,l=a.blockSize,c=this._iv,u=this._keystream;c&&(u=this._keystream=c.slice(0),this._iv=void 0),a.encryptBlock(u,0);for(var f=0;f<l;f++)o[s+f]^=u[f]}});return r.Decryptor=i,r}(),n.mode.OFB})}(r0)),r0.exports}var i0={exports:{}},dw;function QM(){return dw||(dw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,o){this._cipher.encryptBlock(i,o)}}),r.Decryptor=r.extend({processBlock:function(i,o){this._cipher.decryptBlock(i,o)}}),r}(),n.mode.ECB})}(i0)),i0.exports}var o0={exports:{}},hw;function FM(){return hw||(hw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.AnsiX923={pad:function(r,i){var o=r.sigBytes,s=i*4,a=s-o%s,l=o+a-1;r.clamp(),r.words[l>>>2]|=a<<24-l%4*8,r.sigBytes+=a},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Ansix923})}(o0)),o0.exports}var s0={exports:{}},pw;function zM(){return pw||(pw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.Iso10126={pad:function(r,i){var o=i*4,s=o-r.sigBytes%o;r.concat(n.lib.WordArray.random(s-1)).concat(n.lib.WordArray.create([s<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Iso10126})}(s0)),s0.exports}var a0={exports:{}},gw;function LM(){return gw||(gw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.Iso97971={pad:function(r,i){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,i)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(a0)),a0.exports}var l0={exports:{}},mw;function VM(){return mw||(mw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.ZeroPadding={pad:function(r,i){var o=i*4;r.clamp(),r.sigBytes+=o-(r.sigBytes%o||o)},unpad:function(r){for(var i=r.words,o=r.sigBytes-1,o=r.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){r.sigBytes=o+1;break}}},n.pad.ZeroPadding})}(l0)),l0.exports}var c0={exports:{}},vw;function ZM(){return vw||(vw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(c0)),c0.exports}var u0={exports:{}},xw;function WM(){return xw||(xw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return function(r){var i=n,o=i.lib,s=o.CipherParams,a=i.enc,l=a.Hex,c=i.format;c.Hex={stringify:function(u){return u.ciphertext.toString(l)},parse:function(u){var f=l.parse(u);return s.create({ciphertext:f})}}}(),n.format.Hex})}(u0)),u0.exports}var f0={exports:{}},Ow;function XM(){return Ow||(Ow=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],l=[],c=[],u=[],f=[],d=[],h=[],g=[],p=[],v=[];(function(){for(var y=[],w=0;w<256;w++)w<128?y[w]=w<<1:y[w]=w<<1^283;for(var b=0,S=0,w=0;w<256;w++){var C=S^S<<1^S<<2^S<<3^S<<4;C=C>>>8^C&255^99,a[b]=C,l[C]=b;var I=y[b],A=y[I],T=y[A],_=y[C]*257^C*16843008;c[b]=_<<24|_>>>8,u[b]=_<<16|_>>>16,f[b]=_<<8|_>>>24,d[b]=_;var _=T*16843009^A*65537^I*257^b*16843008;h[C]=_<<24|_>>>8,g[C]=_<<16|_>>>16,p[C]=_<<8|_>>>24,v[C]=_,b?(b=I^y[y[y[T^I]]],S^=y[y[S]]):b=S=1}})();var x=[0,1,2,4,8,16,32,64,128,27,54],O=s.AES=o.extend({_doReset:function(){var y;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var w=this._keyPriorReset=this._key,b=w.words,S=w.sigBytes/4,C=this._nRounds=S+6,I=(C+1)*4,A=this._keySchedule=[],T=0;T<I;T++)T<S?A[T]=b[T]:(y=A[T-1],T%S?S>6&&T%S==4&&(y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255]):(y=y<<8|y>>>24,y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255],y^=x[T/S|0]<<24),A[T]=A[T-S]^y);for(var _=this._invKeySchedule=[],P=0;P<I;P++){var T=I-P;if(P%4)var y=A[T];else var y=A[T-4];P<4||T<=4?_[P]=y:_[P]=h[a[y>>>24]]^g[a[y>>>16&255]]^p[a[y>>>8&255]]^v[a[y&255]]}}},encryptBlock:function(y,w){this._doCryptBlock(y,w,this._keySchedule,c,u,f,d,a)},decryptBlock:function(y,w){var b=y[w+1];y[w+1]=y[w+3],y[w+3]=b,this._doCryptBlock(y,w,this._invKeySchedule,h,g,p,v,l);var b=y[w+1];y[w+1]=y[w+3],y[w+3]=b},_doCryptBlock:function(y,w,b,S,C,I,A,T){for(var _=this._nRounds,P=y[w]^b[0],R=y[w+1]^b[1],k=y[w+2]^b[2],F=y[w+3]^b[3],W=4,X=1;X<_;X++){var q=S[P>>>24]^C[R>>>16&255]^I[k>>>8&255]^A[F&255]^b[W++],Y=S[R>>>24]^C[k>>>16&255]^I[F>>>8&255]^A[P&255]^b[W++],L=S[k>>>24]^C[F>>>16&255]^I[P>>>8&255]^A[R&255]^b[W++],M=S[F>>>24]^C[P>>>16&255]^I[R>>>8&255]^A[k&255]^b[W++];P=q,R=Y,k=L,F=M}var q=(T[P>>>24]<<24|T[R>>>16&255]<<16|T[k>>>8&255]<<8|T[F&255])^b[W++],Y=(T[R>>>24]<<24|T[k>>>16&255]<<16|T[F>>>8&255]<<8|T[P&255])^b[W++],L=(T[k>>>24]<<24|T[F>>>16&255]<<16|T[P>>>8&255]<<8|T[R&255])^b[W++],M=(T[F>>>24]<<24|T[P>>>16&255]<<16|T[R>>>8&255]<<8|T[k&255])^b[W++];y[w]=q,y[w+1]=Y,y[w+2]=L,y[w+3]=M},keySize:256/32});r.AES=o._createHelper(O)}(),n.AES})}(f0)),f0.exports}var d0={exports:{}},yw;function UM(){return yw||(yw=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=i.BlockCipher,a=r.algo,l=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=a.DES=s.extend({_doReset:function(){for(var x=this._key,O=x.words,y=[],w=0;w<56;w++){var b=l[w]-1;y[w]=O[b>>>5]>>>31-b%32&1}for(var S=this._subKeys=[],C=0;C<16;C++){for(var I=S[C]=[],A=u[C],w=0;w<24;w++)I[w/6|0]|=y[(c[w]-1+A)%28]<<31-w%6,I[4+(w/6|0)]|=y[28+(c[w+24]-1+A)%28]<<31-w%6;I[0]=I[0]<<1|I[0]>>>31;for(var w=1;w<7;w++)I[w]=I[w]>>>(w-1)*4+3;I[7]=I[7]<<5|I[7]>>>27}for(var T=this._invSubKeys=[],w=0;w<16;w++)T[w]=S[15-w]},encryptBlock:function(x,O){this._doCryptBlock(x,O,this._subKeys)},decryptBlock:function(x,O){this._doCryptBlock(x,O,this._invSubKeys)},_doCryptBlock:function(x,O,y){this._lBlock=x[O],this._rBlock=x[O+1],g.call(this,4,252645135),g.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),g.call(this,1,1431655765);for(var w=0;w<16;w++){for(var b=y[w],S=this._lBlock,C=this._rBlock,I=0,A=0;A<8;A++)I|=f[A][((C^b[A])&d[A])>>>0];this._lBlock=C,this._rBlock=S^I}var T=this._lBlock;this._lBlock=this._rBlock,this._rBlock=T,g.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),x[O]=this._lBlock,x[O+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(x,O){var y=(this._lBlock>>>x^this._rBlock)&O;this._rBlock^=y,this._lBlock^=y<<x}function p(x,O){var y=(this._rBlock>>>x^this._lBlock)&O;this._lBlock^=y,this._rBlock^=y<<x}r.DES=s._createHelper(h);var v=a.TripleDES=s.extend({_doReset:function(){var x=this._key,O=x.words;if(O.length!==2&&O.length!==4&&O.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var y=O.slice(0,2),w=O.length<4?O.slice(0,2):O.slice(2,4),b=O.length<6?O.slice(0,2):O.slice(4,6);this._des1=h.createEncryptor(o.create(y)),this._des2=h.createEncryptor(o.create(w)),this._des3=h.createEncryptor(o.create(b))},encryptBlock:function(x,O){this._des1.encryptBlock(x,O),this._des2.decryptBlock(x,O),this._des3.encryptBlock(x,O)},decryptBlock:function(x,O){this._des3.decryptBlock(x,O),this._des2.encryptBlock(x,O),this._des1.decryptBlock(x,O)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=s._createHelper(v)}(),n.TripleDES})}(d0)),d0.exports}var h0={exports:{}},bw;function GM(){return bw||(bw=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=s.RC4=o.extend({_doReset:function(){for(var u=this._key,f=u.words,d=u.sigBytes,h=this._S=[],g=0;g<256;g++)h[g]=g;for(var g=0,p=0;g<256;g++){var v=g%d,x=f[v>>>2]>>>24-v%4*8&255;p=(p+h[g]+x)%256;var O=h[g];h[g]=h[p],h[p]=O}this._i=this._j=0},_doProcessBlock:function(u,f){u[f]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var u=this._S,f=this._i,d=this._j,h=0,g=0;g<4;g++){f=(f+1)%256,d=(d+u[f])%256;var p=u[f];u[f]=u[d],u[d]=p,h|=u[(u[f]+u[d])%256]<<24-g*8}return this._i=f,this._j=d,h}r.RC4=o._createHelper(a);var c=s.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var u=this.cfg.drop;u>0;u--)l.call(this)}});r.RC4Drop=o._createHelper(c)}(),n.RC4})}(h0)),h0.exports}var p0={exports:{}},ww;function YM(){return ww||(ww=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],l=[],c=[],u=s.Rabbit=o.extend({_doReset:function(){for(var d=this._key.words,h=this.cfg.iv,g=0;g<4;g++)d[g]=(d[g]<<8|d[g]>>>24)&16711935|(d[g]<<24|d[g]>>>8)&4278255360;var p=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],v=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var g=0;g<4;g++)f.call(this);for(var g=0;g<8;g++)v[g]^=p[g+4&7];if(h){var x=h.words,O=x[0],y=x[1],w=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,b=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,S=w>>>16|b&4294901760,C=b<<16|w&65535;v[0]^=w,v[1]^=S,v[2]^=b,v[3]^=C,v[4]^=w,v[5]^=S,v[6]^=b,v[7]^=C;for(var g=0;g<4;g++)f.call(this)}},_doProcessBlock:function(d,h){var g=this._X;f.call(this),a[0]=g[0]^g[5]>>>16^g[3]<<16,a[1]=g[2]^g[7]>>>16^g[5]<<16,a[2]=g[4]^g[1]>>>16^g[7]<<16,a[3]=g[6]^g[3]>>>16^g[1]<<16;for(var p=0;p<4;p++)a[p]=(a[p]<<8|a[p]>>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360,d[h+p]^=a[p]},blockSize:128/32,ivSize:64/32});function f(){for(var d=this._X,h=this._C,g=0;g<8;g++)l[g]=h[g];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<l[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<l[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<l[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<l[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<l[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<l[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<l[6]>>>0?1:0)|0,this._b=h[7]>>>0<l[7]>>>0?1:0;for(var g=0;g<8;g++){var p=d[g]+h[g],v=p&65535,x=p>>>16,O=((v*v>>>17)+v*x>>>15)+x*x,y=((p&4294901760)*p|0)+((p&65535)*p|0);c[g]=O^y}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.Rabbit=o._createHelper(u)}(),n.Rabbit})}(p0)),p0.exports}var g0={exports:{}},Sw;function HM(){return Sw||(Sw=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],l=[],c=[],u=s.RabbitLegacy=o.extend({_doReset:function(){var d=this._key.words,h=this.cfg.iv,g=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],p=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var v=0;v<4;v++)f.call(this);for(var v=0;v<8;v++)p[v]^=g[v+4&7];if(h){var x=h.words,O=x[0],y=x[1],w=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,b=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,S=w>>>16|b&4294901760,C=b<<16|w&65535;p[0]^=w,p[1]^=S,p[2]^=b,p[3]^=C,p[4]^=w,p[5]^=S,p[6]^=b,p[7]^=C;for(var v=0;v<4;v++)f.call(this)}},_doProcessBlock:function(d,h){var g=this._X;f.call(this),a[0]=g[0]^g[5]>>>16^g[3]<<16,a[1]=g[2]^g[7]>>>16^g[5]<<16,a[2]=g[4]^g[1]>>>16^g[7]<<16,a[3]=g[6]^g[3]>>>16^g[1]<<16;for(var p=0;p<4;p++)a[p]=(a[p]<<8|a[p]>>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360,d[h+p]^=a[p]},blockSize:128/32,ivSize:64/32});function f(){for(var d=this._X,h=this._C,g=0;g<8;g++)l[g]=h[g];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<l[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<l[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<l[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<l[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<l[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<l[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<l[6]>>>0?1:0)|0,this._b=h[7]>>>0<l[7]>>>0?1:0;for(var g=0;g<8;g++){var p=d[g]+h[g],v=p&65535,x=p>>>16,O=((v*v>>>17)+v*x>>>15)+x*x,y=((p&4294901760)*p|0)+((p&65535)*p|0);c[g]=O^y}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.RabbitLegacy=o._createHelper(u)}(),n.RabbitLegacy})}(g0)),g0.exports}var m0={exports:{}},Cw;function qM(){return Cw||(Cw=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo;const a=16,l=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function f(v,x){let O=x>>24&255,y=x>>16&255,w=x>>8&255,b=x&255,S=v.sbox[0][O]+v.sbox[1][y];return S=S^v.sbox[2][w],S=S+v.sbox[3][b],S}function d(v,x,O){let y=x,w=O,b;for(let S=0;S<a;++S)y=y^v.pbox[S],w=f(v,y)^w,b=y,y=w,w=b;return b=y,y=w,w=b,w=w^v.pbox[a],y=y^v.pbox[a+1],{left:y,right:w}}function h(v,x,O){let y=x,w=O,b;for(let S=a+1;S>1;--S)y=y^v.pbox[S],w=f(v,y)^w,b=y,y=w,w=b;return b=y,y=w,w=b,w=w^v.pbox[1],y=y^v.pbox[0],{left:y,right:w}}function g(v,x,O){for(let C=0;C<4;C++){v.sbox[C]=[];for(let I=0;I<256;I++)v.sbox[C][I]=c[C][I]}let y=0;for(let C=0;C<a+2;C++)v.pbox[C]=l[C]^x[y],y++,y>=O&&(y=0);let w=0,b=0,S=0;for(let C=0;C<a+2;C+=2)S=d(v,w,b),w=S.left,b=S.right,v.pbox[C]=w,v.pbox[C+1]=b;for(let C=0;C<4;C++)for(let I=0;I<256;I+=2)S=d(v,w,b),w=S.left,b=S.right,v.sbox[C][I]=w,v.sbox[C][I+1]=b;return!0}var p=s.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var v=this._keyPriorReset=this._key,x=v.words,O=v.sigBytes/4;g(u,x,O)}},encryptBlock:function(v,x){var O=d(u,v[x],v[x+1]);v[x]=O.left,v[x+1]=O.right},decryptBlock:function(v,x){var O=h(u,v[x],v[x+1]);v[x]=O.left,v[x+1]=O.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=o._createHelper(p)}(),n.Blowfish})}(m0)),m0.exports}(function(t,e){(function(n,r,i){t.exports=r(et(),up(),PM(),EM(),Vs(),IM(),Zs(),XE(),Vx(),TM(),UE(),_M(),jM(),$M(),Zx(),DM(),Jo(),dn(),RM(),MM(),NM(),BM(),QM(),FM(),zM(),LM(),VM(),ZM(),WM(),XM(),UM(),GM(),YM(),HM(),qM())})(_e,function(n){return n})})(WE);var rv=WE.exports;function ui(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function kw(t,e){for(var n="",r=0,i=-1,o=0,s,a=0;a<=t.length;++a){if(a<t.length)s=t.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){l===-1?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=a,o=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o!==-1?++o:o=-1}return n}function JM(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var Ra={resolve:function(){for(var e="",n=!1,r,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(r===void 0&&(r=process.cwd()),o=r),ui(o),o.length!==0&&(e=o+"/"+e,n=o.charCodeAt(0)===47)}return e=kw(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(ui(e),e.length===0)return".";var n=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=kw(e,!n),e.length===0&&!n&&(e="."),e.length>0&&r&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return ui(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,n=0;n<arguments.length;++n){var r=arguments[n];ui(r),r.length>0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":Ra.normalize(e)},relative:function(e,n){if(ui(e),ui(n),e===n||(e=Ra.resolve(e),n=Ra.resolve(n),e===n))return"";for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var i=e.length,o=i-r,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var a=n.length,l=a-s,c=o<l?o:l,u=-1,f=0;f<=c;++f){if(f===c){if(l>c){if(n.charCodeAt(s+f)===47)return n.slice(s+f+1);if(f===0)return n.slice(s+f)}else o>c&&(e.charCodeAt(r+f)===47?u=f:f===0&&(u=0));break}var d=e.charCodeAt(r+f),h=n.charCodeAt(s+f);if(d!==h)break;d===47&&(u=f)}var g="";for(f=r+u+1;f<=i;++f)(f===i||e.charCodeAt(f)===47)&&(g.length===0?g+="..":g+="/..");return g.length>0?g+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(ui(e),e.length===0)return".";for(var n=e.charCodeAt(0),r=n===47,i=-1,o=!0,s=e.length-1;s>=1;--s)if(n=e.charCodeAt(s),n===47){if(!o){i=s;break}}else o=!1;return i===-1?r?"/":".":r&&i===1?"//":e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ui(e);var r=0,i=-1,o=!0,s;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c===47){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),a>=0&&(c===n.charCodeAt(a)?--a===-1&&(i=s):(a=-1,i=l))}return r===i?i=l:i===-1&&(i=e.length),e.slice(r,i)}else{for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===47){if(!o){r=s+1;break}}else i===-1&&(o=!1,i=s+1);return i===-1?"":e.slice(r,i)}},extname:function(e){ui(e);for(var n=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(l===47){if(!o){r=a+1;break}continue}i===-1&&(o=!1,i=a+1),l===46?n===-1?n=a:s!==1&&(s=1):n!==-1&&(s=-1)}return n===-1||i===-1||s===0||s===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return JM("/",e)},parse:function(e){ui(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return n;var r=e.charCodeAt(0),i=r===47,o;i?(n.root="/",o=1):o=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,f=0;u>=o;--u){if(r=e.charCodeAt(u),r===47){if(!c){a=u+1;break}continue}l===-1&&(c=!1,l=u+1),r===46?s===-1?s=u:f!==1&&(f=1):s!==-1&&(f=-1)}return s===-1||l===-1||f===0||f===1&&s===l-1&&s===a+1?l!==-1&&(a===0&&i?n.base=n.name=e.slice(1,l):n.base=n.name=e.slice(a,l)):(a===0&&i?(n.name=e.slice(1,s),n.base=e.slice(1,l)):(n.name=e.slice(a,s),n.base=e.slice(a,l)),n.ext=e.slice(s,l)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};Ra.posix=Ra;var GE=Ra;const iv=Qi(GE),KM=k7({__proto__:null,default:iv},[GE]);class Aw{constructor(e){this.baseDir=e}async ls(e=""){const n=this.makeKey(e);return Object.keys(localStorage).filter(r=>r.startsWith(n)).map(r=>r.replace(n,""))}async get(e){const n=this.makeKey(e);return localStorage.getItem(n)??null}async set(e,n){const r=this.makeKey(e);localStorage.setItem(r,n)}async remove(e){const n=this.makeKey(e);localStorage.removeItem(n)}makeKey(e){return`replay:fs:${this.baseDir}/${e}`}}async function Kr(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var nl;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(nl||(nl={}));async function eN(){return Kr("plugin:path|resolve_directory",{directory:nl.AppData})}async function tN(){return Kr("plugin:path|resolve_directory",{directory:nl.Desktop})}function YE(){return window.__TAURI_INTERNALS__.plugins.path.sep}async function nN(...t){return Kr("plugin:path|resolve",{paths:t})}async function kc(...t){return Kr("plugin:path|join",{paths:t})}async function rN(t){return Kr("plugin:path|is_absolute",{path:t})}var Pw;(function(t){t[t.Start=0]="Start",t[t.Current=1]="Current",t[t.End=2]="End"})(Pw||(Pw={}));async function Ew(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Kr("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})}async function iN(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Kr("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})}async function oN(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Kr("plugin:fs|read_text_file",{path:t instanceof URL?t.toString():t,options:e})}async function sN(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Kr("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})}async function aN(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Kr("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:n})}function fp(){return!!(window!=null&&window.__TAURI__)}const Oi=class Oi{static async getUtils(){return Oi.utils||(Oi.utils=fp()?await Promise.resolve().then(()=>require("./replay-tauri-path-fo2rfs-U.js")):await Promise.resolve().then(()=>KM)),Oi.utils}static async join(...e){return(await Oi.getUtils()).join(...e)}static async resolve(e){return(await Oi.getUtils()).resolve(e)}static async isAbsolute(e){return(await Oi.getUtils()).isAbsolute(e)}static async relative(e,n){return(await Oi.getUtils()).relative(e,n)}};nn(Oi,"utils",null);let Ji=Oi;class Iw{constructor(e,n){this.baseDir=e,this.baseDirOption=n,this.initializeDirectory()}async initializeDirectory(e){try{await Ew(e??"/",{baseDir:this.baseDirOption,recursive:!0})}catch(n){if(n instanceof Error&&n.message.includes("already exists"))return;throw n}}async ls(e){const n=await this.getFullPath(e);return this.getDirEntryFilesRecursively(n)}async getDirEntryFilesRecursively(e){try{const n=[],r=await iN(e,{baseDir:this.baseDirOption});for(const i of r)if(i.isDirectory){const o=await kc(e,i.name),s=await this.getDirEntryFilesRecursively(o);n.push(...s)}else{const o=await kc(e,i.name),s=await Ji.relative(this.baseDir,o);n.push(s)}return n}catch(n){return n.includes("forbidden path")||console.error(n),[]}}async get(e){const n=await this.getFullPath(e);try{return await oN(n,{baseDir:this.baseDirOption})}catch(r){return!r.includes("No such file or directory")&&!r.includes("forbidden path")&&console.error(r),null}}async set(e,n){const r=await this.getFullPath(e),i=YE(),o=r.split(i).slice(0,-1).join(i);await Ew(o,{baseDir:this.baseDirOption,recursive:!0}),await aN(r,n,{baseDir:this.baseDirOption})}async remove(e){const n=await this.getFullPath(e);try{await sN(n,{baseDir:this.baseDirOption})}catch(r){if(r instanceof Error&&r.message.includes("not found"))return;throw r}}async getFullPath(e){return await kc(this.baseDir,e??"")}}class lN{constructor(){nn(this,"baseDir","")}async ls(e=""){return[]}async get(e){return null}async set(e,n){}async remove(e){}}class cN{constructor(e,n){nn(this,"default",nE);this.storage=e,this.localStorageSecretsProvider=n}async read(){const e=await this.storage.get("replay-environments.yaml"),n=await this.localStorageSecretsProvider.get();let r=null,i=null;if(!e)return this.default;try{r=tl.load(e),i=n?JSON.parse(n):null}catch(a){return console.error("Failed to parse environments file",a),this.default}return r?Object.keys(r).filter(a=>a!=="version").map(a=>({name:a,inputs:Object.entries(r[a].inputs).map(([l,c])=>{var f;if(typeof c=="string")return{name:l,value:c,isSecret:!1};const u=((f=i==null?void 0:i[a])==null?void 0:f[l])??"";return{name:l,value:u,isSecret:!0}}),servers:Object.entries(r[a].servers).map(([l,c])=>({apiId:l,value:c.value,variables:Object.entries(c.variables||{}).map(([u,f])=>({name:u,value:f}))})),state:qe.Normal})):this.default}async write(e){const n=await this.localStorageSecretsProvider.get(),r=n?JSON.parse(n):{},i=e.reduce((o,s)=>(s.name&&(o[s.name]={inputs:s.inputs.reduce((a,l)=>(l.isSecret&&r?(r[s.name]||(r[s.name]={}),r[s.name][l.name]=l.value,a[l.name]={provider:"local"}):a[l.name]=l.value,a),{}),servers:s.servers.reduce((a,l)=>(a[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},a),{})}),o),{});this.localStorageSecretsProvider.set(JSON.stringify(r)),i&&this.storage.set("replay-environments.yaml",tl.dump(i))}}var uN=Object.prototype.hasOwnProperty,fN=Object.prototype.toString,dN=function(e,n,r){if(fN.call(n)!=="[object Function]")throw new TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var o=0;o<i;o++)n.call(r,e[o],o,e);else for(var s in e)uN.call(e,s)&&n.call(r,e[s],s,e)},hN=dN,pN=wt;function wt(t,e,n){if(arguments.length===3)return wt.set(t,e,n);if(arguments.length===2)return wt.get(t,e);var r=wt.bind(wt,t);for(var i in wt)wt.hasOwnProperty(i)&&(r[i]=wt[i].bind(r,t));return r}wt.get=function(e,n){for(var r=Array.isArray(n)?n:wt.parse(n),i=0;i<r.length;++i){var o=r[i];if(!(typeof e=="object"&&o in e))throw new Error("Invalid reference token: "+o);e=e[o]}return e};wt.set=function(e,n,r){var i=Array.isArray(n)?n:wt.parse(n),o=i[0];if(i.length===0)throw Error("Can not set the root object");for(var s=0;s<i.length-1;++s){var a=i[s];typeof a!="string"&&typeof a!="number"&&(a=String(a)),!(a==="__proto__"||a==="constructor"||a==="prototype")&&(a==="-"&&Array.isArray(e)&&(a=e.length),o=i[s+1],a in e||(o.match(/^(\d+|-)$/)?e[a]=[]:e[a]={}),e=e[a])}return o==="-"&&Array.isArray(e)&&(o=e.length),e[o]=r,this};wt.remove=function(t,e){var n=Array.isArray(e)?e:wt.parse(e),r=n[n.length-1];if(r===void 0)throw new Error('Invalid JSON pointer for remove: "'+e+'"');var i=wt.get(t,n.slice(0,-1));if(Array.isArray(i)){var o=+r;if(r===""&&isNaN(o))throw new Error('Invalid array index: "'+r+'"');Array.prototype.splice.call(i,o,1)}else delete i[r]};wt.dict=function(e,n){var r={};return wt.walk(e,function(i,o){r[o]=i},n),r};wt.walk=function(e,n,r){var i=[];r=r||function(o){var s=Object.prototype.toString.call(o);return s==="[object Object]"||s==="[object Array]"},function o(s){hN(s,function(a,l){i.push(String(l)),r(a)?o(a):n(a,wt.compile(i)),i.pop()})}(e)};wt.has=function(e,n){try{wt.get(e,n)}catch{return!1}return!0};wt.escape=function(e){return e.toString().replace(/~/g,"~0").replace(/\//g,"~1")};wt.unescape=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")};wt.parse=function(e){if(e==="")return[];if(e.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+e);return e.substring(1).split(/\//).map(wt.unescape)};wt.compile=function(e){return e.length===0?"":"/"+e.map(wt.escape).join("/")};const HE=Qi(pN);var gr=(t=>(t.Query="Query",t.Header="Header",t.Cookie="Cookie",t))(gr||{}),le=(t=>(t.NoAuth="No Auth",t.BasicAuth="Basic Auth",t.DigestAuth="Digest Auth",t.JWT="JWT",t.APIKey="API key",t.OAuth2="OAuth 2.0",t.OpenIDConnect="OpenID Connect",t))(le||{}),fe=(t=>(t.ClientCredentials="Client Credentials",t.ClientCredentialsWithJwtAssertion="Client Credentials with JWT Assertion",t.AuthorizationCode="Authorization Code",t.AuthorizationCodeWithPkce="Authorization Code with PKCE",t.Implicit="Implicit",t.Password="Password",t))(fe||{}),$n=(t=>(t.Body="Body",t.Header="Header",t.URL="URL",t))($n||{}),Bn=(t=>(t.SIMPLE="simple",t.REGEX="regex",t.JSONPATH="jsonpath",t.XPATH="xpath",t))(Bn||{});const Wx={active:!0,key:"",value:""},qE="{",Xx="}",Cl="^\\$inputs\\.([^}\\s]+)$|\\{\\$inputs\\.([^}\\s]+)\\}";function gN({content:t}){return m.jsx(mN,{"data-testid":"arazzo-expression",children:t})}const mN=$.span`
155
+ */return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function i(a){if((a>>24&255)===255){var l=a>>16&255,c=a>>8&255,u=a&255;l===255?(l=0,c===255?(c=0,u===255?u=0:++u):++c):++l,a=0,a+=l<<16,a+=c<<8,a+=u}else a+=1<<24;return a}function o(a){return(a[0]=i(a[0]))===0&&(a[1]=i(a[1])),a}var s=r.Encryptor=r.extend({processBlock:function(a,l){var c=this._cipher,u=c.blockSize,f=this._iv,d=this._counter;f&&(d=this._counter=f.slice(0),this._iv=void 0),o(d);var h=d.slice(0);c.encryptBlock(h,0);for(var g=0;g<u;g++)a[l+g]^=h[g]}});return r.Decryptor=s,r}(),n.mode.CTRGladman})}(n0)),n0.exports}var r0={exports:{}},fw;function BM(){return fw||(fw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(o,s){var a=this._cipher,l=a.blockSize,c=this._iv,u=this._keystream;c&&(u=this._keystream=c.slice(0),this._iv=void 0),a.encryptBlock(u,0);for(var f=0;f<l;f++)o[s+f]^=u[f]}});return r.Decryptor=i,r}(),n.mode.OFB})}(r0)),r0.exports}var i0={exports:{}},dw;function QM(){return dw||(dw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,o){this._cipher.encryptBlock(i,o)}}),r.Decryptor=r.extend({processBlock:function(i,o){this._cipher.decryptBlock(i,o)}}),r}(),n.mode.ECB})}(i0)),i0.exports}var o0={exports:{}},hw;function FM(){return hw||(hw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.AnsiX923={pad:function(r,i){var o=r.sigBytes,s=i*4,a=s-o%s,l=o+a-1;r.clamp(),r.words[l>>>2]|=a<<24-l%4*8,r.sigBytes+=a},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Ansix923})}(o0)),o0.exports}var s0={exports:{}},pw;function zM(){return pw||(pw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.Iso10126={pad:function(r,i){var o=i*4,s=o-r.sigBytes%o;r.concat(n.lib.WordArray.random(s-1)).concat(n.lib.WordArray.create([s<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Iso10126})}(s0)),s0.exports}var a0={exports:{}},gw;function LM(){return gw||(gw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.Iso97971={pad:function(r,i){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,i)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(a0)),a0.exports}var l0={exports:{}},mw;function VM(){return mw||(mw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.ZeroPadding={pad:function(r,i){var o=i*4;r.clamp(),r.sigBytes+=o-(r.sigBytes%o||o)},unpad:function(r){for(var i=r.words,o=r.sigBytes-1,o=r.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){r.sigBytes=o+1;break}}},n.pad.ZeroPadding})}(l0)),l0.exports}var c0={exports:{}},vw;function ZM(){return vw||(vw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(c0)),c0.exports}var u0={exports:{}},xw;function WM(){return xw||(xw=1,function(t,e){(function(n,r,i){t.exports=r(et(),dn())})(_e,function(n){return function(r){var i=n,o=i.lib,s=o.CipherParams,a=i.enc,l=a.Hex,c=i.format;c.Hex={stringify:function(u){return u.ciphertext.toString(l)},parse:function(u){var f=l.parse(u);return s.create({ciphertext:f})}}}(),n.format.Hex})}(u0)),u0.exports}var f0={exports:{}},Ow;function XM(){return Ow||(Ow=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],l=[],c=[],u=[],f=[],d=[],h=[],g=[],p=[],v=[];(function(){for(var y=[],w=0;w<256;w++)w<128?y[w]=w<<1:y[w]=w<<1^283;for(var b=0,S=0,w=0;w<256;w++){var C=S^S<<1^S<<2^S<<3^S<<4;C=C>>>8^C&255^99,a[b]=C,l[C]=b;var I=y[b],A=y[I],T=y[A],_=y[C]*257^C*16843008;c[b]=_<<24|_>>>8,u[b]=_<<16|_>>>16,f[b]=_<<8|_>>>24,d[b]=_;var _=T*16843009^A*65537^I*257^b*16843008;h[C]=_<<24|_>>>8,g[C]=_<<16|_>>>16,p[C]=_<<8|_>>>24,v[C]=_,b?(b=I^y[y[y[T^I]]],S^=y[y[S]]):b=S=1}})();var x=[0,1,2,4,8,16,32,64,128,27,54],O=s.AES=o.extend({_doReset:function(){var y;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var w=this._keyPriorReset=this._key,b=w.words,S=w.sigBytes/4,C=this._nRounds=S+6,I=(C+1)*4,A=this._keySchedule=[],T=0;T<I;T++)T<S?A[T]=b[T]:(y=A[T-1],T%S?S>6&&T%S==4&&(y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255]):(y=y<<8|y>>>24,y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255],y^=x[T/S|0]<<24),A[T]=A[T-S]^y);for(var _=this._invKeySchedule=[],P=0;P<I;P++){var T=I-P;if(P%4)var y=A[T];else var y=A[T-4];P<4||T<=4?_[P]=y:_[P]=h[a[y>>>24]]^g[a[y>>>16&255]]^p[a[y>>>8&255]]^v[a[y&255]]}}},encryptBlock:function(y,w){this._doCryptBlock(y,w,this._keySchedule,c,u,f,d,a)},decryptBlock:function(y,w){var b=y[w+1];y[w+1]=y[w+3],y[w+3]=b,this._doCryptBlock(y,w,this._invKeySchedule,h,g,p,v,l);var b=y[w+1];y[w+1]=y[w+3],y[w+3]=b},_doCryptBlock:function(y,w,b,S,C,I,A,T){for(var _=this._nRounds,P=y[w]^b[0],R=y[w+1]^b[1],k=y[w+2]^b[2],F=y[w+3]^b[3],W=4,X=1;X<_;X++){var q=S[P>>>24]^C[R>>>16&255]^I[k>>>8&255]^A[F&255]^b[W++],Y=S[R>>>24]^C[k>>>16&255]^I[F>>>8&255]^A[P&255]^b[W++],L=S[k>>>24]^C[F>>>16&255]^I[P>>>8&255]^A[R&255]^b[W++],M=S[F>>>24]^C[P>>>16&255]^I[R>>>8&255]^A[k&255]^b[W++];P=q,R=Y,k=L,F=M}var q=(T[P>>>24]<<24|T[R>>>16&255]<<16|T[k>>>8&255]<<8|T[F&255])^b[W++],Y=(T[R>>>24]<<24|T[k>>>16&255]<<16|T[F>>>8&255]<<8|T[P&255])^b[W++],L=(T[k>>>24]<<24|T[F>>>16&255]<<16|T[P>>>8&255]<<8|T[R&255])^b[W++],M=(T[F>>>24]<<24|T[P>>>16&255]<<16|T[R>>>8&255]<<8|T[k&255])^b[W++];y[w]=q,y[w+1]=Y,y[w+2]=L,y[w+3]=M},keySize:256/32});r.AES=o._createHelper(O)}(),n.AES})}(f0)),f0.exports}var d0={exports:{}},yw;function UM(){return yw||(yw=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=i.BlockCipher,a=r.algo,l=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=a.DES=s.extend({_doReset:function(){for(var x=this._key,O=x.words,y=[],w=0;w<56;w++){var b=l[w]-1;y[w]=O[b>>>5]>>>31-b%32&1}for(var S=this._subKeys=[],C=0;C<16;C++){for(var I=S[C]=[],A=u[C],w=0;w<24;w++)I[w/6|0]|=y[(c[w]-1+A)%28]<<31-w%6,I[4+(w/6|0)]|=y[28+(c[w+24]-1+A)%28]<<31-w%6;I[0]=I[0]<<1|I[0]>>>31;for(var w=1;w<7;w++)I[w]=I[w]>>>(w-1)*4+3;I[7]=I[7]<<5|I[7]>>>27}for(var T=this._invSubKeys=[],w=0;w<16;w++)T[w]=S[15-w]},encryptBlock:function(x,O){this._doCryptBlock(x,O,this._subKeys)},decryptBlock:function(x,O){this._doCryptBlock(x,O,this._invSubKeys)},_doCryptBlock:function(x,O,y){this._lBlock=x[O],this._rBlock=x[O+1],g.call(this,4,252645135),g.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),g.call(this,1,1431655765);for(var w=0;w<16;w++){for(var b=y[w],S=this._lBlock,C=this._rBlock,I=0,A=0;A<8;A++)I|=f[A][((C^b[A])&d[A])>>>0];this._lBlock=C,this._rBlock=S^I}var T=this._lBlock;this._lBlock=this._rBlock,this._rBlock=T,g.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),x[O]=this._lBlock,x[O+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(x,O){var y=(this._lBlock>>>x^this._rBlock)&O;this._rBlock^=y,this._lBlock^=y<<x}function p(x,O){var y=(this._rBlock>>>x^this._lBlock)&O;this._lBlock^=y,this._rBlock^=y<<x}r.DES=s._createHelper(h);var v=a.TripleDES=s.extend({_doReset:function(){var x=this._key,O=x.words;if(O.length!==2&&O.length!==4&&O.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var y=O.slice(0,2),w=O.length<4?O.slice(0,2):O.slice(2,4),b=O.length<6?O.slice(0,2):O.slice(4,6);this._des1=h.createEncryptor(o.create(y)),this._des2=h.createEncryptor(o.create(w)),this._des3=h.createEncryptor(o.create(b))},encryptBlock:function(x,O){this._des1.encryptBlock(x,O),this._des2.decryptBlock(x,O),this._des3.encryptBlock(x,O)},decryptBlock:function(x,O){this._des3.decryptBlock(x,O),this._des2.encryptBlock(x,O),this._des1.decryptBlock(x,O)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=s._createHelper(v)}(),n.TripleDES})}(d0)),d0.exports}var h0={exports:{}},bw;function GM(){return bw||(bw=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=s.RC4=o.extend({_doReset:function(){for(var u=this._key,f=u.words,d=u.sigBytes,h=this._S=[],g=0;g<256;g++)h[g]=g;for(var g=0,p=0;g<256;g++){var v=g%d,x=f[v>>>2]>>>24-v%4*8&255;p=(p+h[g]+x)%256;var O=h[g];h[g]=h[p],h[p]=O}this._i=this._j=0},_doProcessBlock:function(u,f){u[f]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var u=this._S,f=this._i,d=this._j,h=0,g=0;g<4;g++){f=(f+1)%256,d=(d+u[f])%256;var p=u[f];u[f]=u[d],u[d]=p,h|=u[(u[f]+u[d])%256]<<24-g*8}return this._i=f,this._j=d,h}r.RC4=o._createHelper(a);var c=s.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var u=this.cfg.drop;u>0;u--)l.call(this)}});r.RC4Drop=o._createHelper(c)}(),n.RC4})}(h0)),h0.exports}var p0={exports:{}},ww;function YM(){return ww||(ww=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],l=[],c=[],u=s.Rabbit=o.extend({_doReset:function(){for(var d=this._key.words,h=this.cfg.iv,g=0;g<4;g++)d[g]=(d[g]<<8|d[g]>>>24)&16711935|(d[g]<<24|d[g]>>>8)&4278255360;var p=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],v=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var g=0;g<4;g++)f.call(this);for(var g=0;g<8;g++)v[g]^=p[g+4&7];if(h){var x=h.words,O=x[0],y=x[1],w=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,b=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,S=w>>>16|b&4294901760,C=b<<16|w&65535;v[0]^=w,v[1]^=S,v[2]^=b,v[3]^=C,v[4]^=w,v[5]^=S,v[6]^=b,v[7]^=C;for(var g=0;g<4;g++)f.call(this)}},_doProcessBlock:function(d,h){var g=this._X;f.call(this),a[0]=g[0]^g[5]>>>16^g[3]<<16,a[1]=g[2]^g[7]>>>16^g[5]<<16,a[2]=g[4]^g[1]>>>16^g[7]<<16,a[3]=g[6]^g[3]>>>16^g[1]<<16;for(var p=0;p<4;p++)a[p]=(a[p]<<8|a[p]>>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360,d[h+p]^=a[p]},blockSize:128/32,ivSize:64/32});function f(){for(var d=this._X,h=this._C,g=0;g<8;g++)l[g]=h[g];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<l[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<l[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<l[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<l[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<l[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<l[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<l[6]>>>0?1:0)|0,this._b=h[7]>>>0<l[7]>>>0?1:0;for(var g=0;g<8;g++){var p=d[g]+h[g],v=p&65535,x=p>>>16,O=((v*v>>>17)+v*x>>>15)+x*x,y=((p&4294901760)*p|0)+((p&65535)*p|0);c[g]=O^y}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.Rabbit=o._createHelper(u)}(),n.Rabbit})}(p0)),p0.exports}var g0={exports:{}},Sw;function HM(){return Sw||(Sw=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],l=[],c=[],u=s.RabbitLegacy=o.extend({_doReset:function(){var d=this._key.words,h=this.cfg.iv,g=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],p=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var v=0;v<4;v++)f.call(this);for(var v=0;v<8;v++)p[v]^=g[v+4&7];if(h){var x=h.words,O=x[0],y=x[1],w=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,b=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,S=w>>>16|b&4294901760,C=b<<16|w&65535;p[0]^=w,p[1]^=S,p[2]^=b,p[3]^=C,p[4]^=w,p[5]^=S,p[6]^=b,p[7]^=C;for(var v=0;v<4;v++)f.call(this)}},_doProcessBlock:function(d,h){var g=this._X;f.call(this),a[0]=g[0]^g[5]>>>16^g[3]<<16,a[1]=g[2]^g[7]>>>16^g[5]<<16,a[2]=g[4]^g[1]>>>16^g[7]<<16,a[3]=g[6]^g[3]>>>16^g[1]<<16;for(var p=0;p<4;p++)a[p]=(a[p]<<8|a[p]>>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360,d[h+p]^=a[p]},blockSize:128/32,ivSize:64/32});function f(){for(var d=this._X,h=this._C,g=0;g<8;g++)l[g]=h[g];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<l[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<l[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<l[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<l[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<l[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<l[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<l[6]>>>0?1:0)|0,this._b=h[7]>>>0<l[7]>>>0?1:0;for(var g=0;g<8;g++){var p=d[g]+h[g],v=p&65535,x=p>>>16,O=((v*v>>>17)+v*x>>>15)+x*x,y=((p&4294901760)*p|0)+((p&65535)*p|0);c[g]=O^y}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.RabbitLegacy=o._createHelper(u)}(),n.RabbitLegacy})}(g0)),g0.exports}var m0={exports:{}},Cw;function qM(){return Cw||(Cw=1,function(t,e){(function(n,r,i){t.exports=r(et(),Vs(),Zs(),Jo(),dn())})(_e,function(n){return function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo;const a=16,l=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var u={pbox:[],sbox:[]};function f(v,x){let O=x>>24&255,y=x>>16&255,w=x>>8&255,b=x&255,S=v.sbox[0][O]+v.sbox[1][y];return S=S^v.sbox[2][w],S=S+v.sbox[3][b],S}function d(v,x,O){let y=x,w=O,b;for(let S=0;S<a;++S)y=y^v.pbox[S],w=f(v,y)^w,b=y,y=w,w=b;return b=y,y=w,w=b,w=w^v.pbox[a],y=y^v.pbox[a+1],{left:y,right:w}}function h(v,x,O){let y=x,w=O,b;for(let S=a+1;S>1;--S)y=y^v.pbox[S],w=f(v,y)^w,b=y,y=w,w=b;return b=y,y=w,w=b,w=w^v.pbox[1],y=y^v.pbox[0],{left:y,right:w}}function g(v,x,O){for(let C=0;C<4;C++){v.sbox[C]=[];for(let I=0;I<256;I++)v.sbox[C][I]=c[C][I]}let y=0;for(let C=0;C<a+2;C++)v.pbox[C]=l[C]^x[y],y++,y>=O&&(y=0);let w=0,b=0,S=0;for(let C=0;C<a+2;C+=2)S=d(v,w,b),w=S.left,b=S.right,v.pbox[C]=w,v.pbox[C+1]=b;for(let C=0;C<4;C++)for(let I=0;I<256;I+=2)S=d(v,w,b),w=S.left,b=S.right,v.sbox[C][I]=w,v.sbox[C][I+1]=b;return!0}var p=s.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var v=this._keyPriorReset=this._key,x=v.words,O=v.sigBytes/4;g(u,x,O)}},encryptBlock:function(v,x){var O=d(u,v[x],v[x+1]);v[x]=O.left,v[x+1]=O.right},decryptBlock:function(v,x){var O=h(u,v[x],v[x+1]);v[x]=O.left,v[x+1]=O.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=o._createHelper(p)}(),n.Blowfish})}(m0)),m0.exports}(function(t,e){(function(n,r,i){t.exports=r(et(),up(),PM(),EM(),Vs(),IM(),Zs(),XE(),Vx(),TM(),UE(),_M(),jM(),$M(),Zx(),DM(),Jo(),dn(),RM(),MM(),NM(),BM(),QM(),FM(),zM(),LM(),VM(),ZM(),WM(),XM(),UM(),GM(),YM(),HM(),qM())})(_e,function(n){return n})})(WE);var rv=WE.exports;function ui(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function kw(t,e){for(var n="",r=0,i=-1,o=0,s,a=0;a<=t.length;++a){if(a<t.length)s=t.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){l===-1?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=a,o=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o!==-1?++o:o=-1}return n}function JM(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var Ra={resolve:function(){for(var e="",n=!1,r,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(r===void 0&&(r=process.cwd()),o=r),ui(o),o.length!==0&&(e=o+"/"+e,n=o.charCodeAt(0)===47)}return e=kw(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(ui(e),e.length===0)return".";var n=e.charCodeAt(0)===47,r=e.charCodeAt(e.length-1)===47;return e=kw(e,!n),e.length===0&&!n&&(e="."),e.length>0&&r&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return ui(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,n=0;n<arguments.length;++n){var r=arguments[n];ui(r),r.length>0&&(e===void 0?e=r:e+="/"+r)}return e===void 0?".":Ra.normalize(e)},relative:function(e,n){if(ui(e),ui(n),e===n||(e=Ra.resolve(e),n=Ra.resolve(n),e===n))return"";for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var i=e.length,o=i-r,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var a=n.length,l=a-s,c=o<l?o:l,u=-1,f=0;f<=c;++f){if(f===c){if(l>c){if(n.charCodeAt(s+f)===47)return n.slice(s+f+1);if(f===0)return n.slice(s+f)}else o>c&&(e.charCodeAt(r+f)===47?u=f:f===0&&(u=0));break}var d=e.charCodeAt(r+f),h=n.charCodeAt(s+f);if(d!==h)break;d===47&&(u=f)}var g="";for(f=r+u+1;f<=i;++f)(f===i||e.charCodeAt(f)===47)&&(g.length===0?g+="..":g+="/..");return g.length>0?g+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(ui(e),e.length===0)return".";for(var n=e.charCodeAt(0),r=n===47,i=-1,o=!0,s=e.length-1;s>=1;--s)if(n=e.charCodeAt(s),n===47){if(!o){i=s;break}}else o=!1;return i===-1?r?"/":".":r&&i===1?"//":e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ui(e);var r=0,i=-1,o=!0,s;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c===47){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),a>=0&&(c===n.charCodeAt(a)?--a===-1&&(i=s):(a=-1,i=l))}return r===i?i=l:i===-1&&(i=e.length),e.slice(r,i)}else{for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===47){if(!o){r=s+1;break}}else i===-1&&(o=!1,i=s+1);return i===-1?"":e.slice(r,i)}},extname:function(e){ui(e);for(var n=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(l===47){if(!o){r=a+1;break}continue}i===-1&&(o=!1,i=a+1),l===46?n===-1?n=a:s!==1&&(s=1):n!==-1&&(s=-1)}return n===-1||i===-1||s===0||s===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return JM("/",e)},parse:function(e){ui(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return n;var r=e.charCodeAt(0),i=r===47,o;i?(n.root="/",o=1):o=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,f=0;u>=o;--u){if(r=e.charCodeAt(u),r===47){if(!c){a=u+1;break}continue}l===-1&&(c=!1,l=u+1),r===46?s===-1?s=u:f!==1&&(f=1):s!==-1&&(f=-1)}return s===-1||l===-1||f===0||f===1&&s===l-1&&s===a+1?l!==-1&&(a===0&&i?n.base=n.name=e.slice(1,l):n.base=n.name=e.slice(a,l)):(a===0&&i?(n.name=e.slice(1,s),n.base=e.slice(1,l)):(n.name=e.slice(a,s),n.base=e.slice(a,l)),n.ext=e.slice(s,l)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};Ra.posix=Ra;var GE=Ra;const iv=Qi(GE),KM=k7({__proto__:null,default:iv},[GE]);class Aw{constructor(e){this.baseDir=e}async ls(e=""){const n=this.makeKey(e);return Object.keys(localStorage).filter(r=>r.startsWith(n)).map(r=>r.replace(n,""))}async get(e){const n=this.makeKey(e);return localStorage.getItem(n)??null}async set(e,n){const r=this.makeKey(e);localStorage.setItem(r,n)}async remove(e){const n=this.makeKey(e);localStorage.removeItem(n)}makeKey(e){return`replay:fs:${this.baseDir}/${e}`}}async function Kr(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var nl;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(nl||(nl={}));async function eN(){return Kr("plugin:path|resolve_directory",{directory:nl.AppData})}async function tN(){return Kr("plugin:path|resolve_directory",{directory:nl.Desktop})}function YE(){return window.__TAURI_INTERNALS__.plugins.path.sep}async function nN(...t){return Kr("plugin:path|resolve",{paths:t})}async function kc(...t){return Kr("plugin:path|join",{paths:t})}async function rN(t){return Kr("plugin:path|is_absolute",{path:t})}var Pw;(function(t){t[t.Start=0]="Start",t[t.Current=1]="Current",t[t.End=2]="End"})(Pw||(Pw={}));async function Ew(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Kr("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})}async function iN(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Kr("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})}async function oN(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Kr("plugin:fs|read_text_file",{path:t instanceof URL?t.toString():t,options:e})}async function sN(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Kr("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})}async function aN(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Kr("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:n})}function fp(){return!!(window!=null&&window.__TAURI__)}const Oi=class Oi{static async getUtils(){return Oi.utils||(Oi.utils=fp()?await Promise.resolve().then(()=>require("./replay-tauri-path-COrqIjzG.js")):await Promise.resolve().then(()=>KM)),Oi.utils}static async join(...e){return(await Oi.getUtils()).join(...e)}static async resolve(e){return(await Oi.getUtils()).resolve(e)}static async isAbsolute(e){return(await Oi.getUtils()).isAbsolute(e)}static async relative(e,n){return(await Oi.getUtils()).relative(e,n)}};nn(Oi,"utils",null);let Ji=Oi;class Iw{constructor(e,n){this.baseDir=e,this.baseDirOption=n,this.initializeDirectory()}async initializeDirectory(e){try{await Ew(e??"/",{baseDir:this.baseDirOption,recursive:!0})}catch(n){if(n instanceof Error&&n.message.includes("already exists"))return;throw n}}async ls(e){const n=await this.getFullPath(e);return this.getDirEntryFilesRecursively(n)}async getDirEntryFilesRecursively(e){try{const n=[],r=await iN(e,{baseDir:this.baseDirOption});for(const i of r)if(i.isDirectory){const o=await kc(e,i.name),s=await this.getDirEntryFilesRecursively(o);n.push(...s)}else{const o=await kc(e,i.name),s=await Ji.relative(this.baseDir,o);n.push(s)}return n}catch(n){return n.includes("forbidden path")||console.error(n),[]}}async get(e){const n=await this.getFullPath(e);try{return await oN(n,{baseDir:this.baseDirOption})}catch(r){return!r.includes("No such file or directory")&&!r.includes("forbidden path")&&console.error(r),null}}async set(e,n){const r=await this.getFullPath(e),i=YE(),o=r.split(i).slice(0,-1).join(i);await Ew(o,{baseDir:this.baseDirOption,recursive:!0}),await aN(r,n,{baseDir:this.baseDirOption})}async remove(e){const n=await this.getFullPath(e);try{await sN(n,{baseDir:this.baseDirOption})}catch(r){if(r instanceof Error&&r.message.includes("not found"))return;throw r}}async getFullPath(e){return await kc(this.baseDir,e??"")}}class lN{constructor(){nn(this,"baseDir","")}async ls(e=""){return[]}async get(e){return null}async set(e,n){}async remove(e){}}class cN{constructor(e,n){nn(this,"default",nE);this.storage=e,this.localStorageSecretsProvider=n}async read(){const e=await this.storage.get("replay-environments.yaml"),n=await this.localStorageSecretsProvider.get();let r=null,i=null;if(!e)return this.default;try{r=tl.load(e),i=n?JSON.parse(n):null}catch(a){return console.error("Failed to parse environments file",a),this.default}return r?Object.keys(r).filter(a=>a!=="version").map(a=>({name:a,inputs:Object.entries(r[a].inputs).map(([l,c])=>{var f;if(typeof c=="string")return{name:l,value:c,isSecret:!1};const u=((f=i==null?void 0:i[a])==null?void 0:f[l])??"";return{name:l,value:u,isSecret:!0}}),servers:Object.entries(r[a].servers).map(([l,c])=>({apiId:l,value:c.value,variables:Object.entries(c.variables||{}).map(([u,f])=>({name:u,value:f}))})),state:qe.Normal})):this.default}async write(e){const n=await this.localStorageSecretsProvider.get(),r=n?JSON.parse(n):{},i=e.reduce((o,s)=>(s.name&&(o[s.name]={inputs:s.inputs.reduce((a,l)=>(l.isSecret&&r?(r[s.name]||(r[s.name]={}),r[s.name][l.name]=l.value,a[l.name]={provider:"local"}):a[l.name]=l.value,a),{}),servers:s.servers.reduce((a,l)=>(a[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},a),{})}),o),{});this.localStorageSecretsProvider.set(JSON.stringify(r)),i&&this.storage.set("replay-environments.yaml",tl.dump(i))}}var uN=Object.prototype.hasOwnProperty,fN=Object.prototype.toString,dN=function(e,n,r){if(fN.call(n)!=="[object Function]")throw new TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var o=0;o<i;o++)n.call(r,e[o],o,e);else for(var s in e)uN.call(e,s)&&n.call(r,e[s],s,e)},hN=dN,pN=wt;function wt(t,e,n){if(arguments.length===3)return wt.set(t,e,n);if(arguments.length===2)return wt.get(t,e);var r=wt.bind(wt,t);for(var i in wt)wt.hasOwnProperty(i)&&(r[i]=wt[i].bind(r,t));return r}wt.get=function(e,n){for(var r=Array.isArray(n)?n:wt.parse(n),i=0;i<r.length;++i){var o=r[i];if(!(typeof e=="object"&&o in e))throw new Error("Invalid reference token: "+o);e=e[o]}return e};wt.set=function(e,n,r){var i=Array.isArray(n)?n:wt.parse(n),o=i[0];if(i.length===0)throw Error("Can not set the root object");for(var s=0;s<i.length-1;++s){var a=i[s];typeof a!="string"&&typeof a!="number"&&(a=String(a)),!(a==="__proto__"||a==="constructor"||a==="prototype")&&(a==="-"&&Array.isArray(e)&&(a=e.length),o=i[s+1],a in e||(o.match(/^(\d+|-)$/)?e[a]=[]:e[a]={}),e=e[a])}return o==="-"&&Array.isArray(e)&&(o=e.length),e[o]=r,this};wt.remove=function(t,e){var n=Array.isArray(e)?e:wt.parse(e),r=n[n.length-1];if(r===void 0)throw new Error('Invalid JSON pointer for remove: "'+e+'"');var i=wt.get(t,n.slice(0,-1));if(Array.isArray(i)){var o=+r;if(r===""&&isNaN(o))throw new Error('Invalid array index: "'+r+'"');Array.prototype.splice.call(i,o,1)}else delete i[r]};wt.dict=function(e,n){var r={};return wt.walk(e,function(i,o){r[o]=i},n),r};wt.walk=function(e,n,r){var i=[];r=r||function(o){var s=Object.prototype.toString.call(o);return s==="[object Object]"||s==="[object Array]"},function o(s){hN(s,function(a,l){i.push(String(l)),r(a)?o(a):n(a,wt.compile(i)),i.pop()})}(e)};wt.has=function(e,n){try{wt.get(e,n)}catch{return!1}return!0};wt.escape=function(e){return e.toString().replace(/~/g,"~0").replace(/\//g,"~1")};wt.unescape=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")};wt.parse=function(e){if(e==="")return[];if(e.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+e);return e.substring(1).split(/\//).map(wt.unescape)};wt.compile=function(e){return e.length===0?"":"/"+e.map(wt.escape).join("/")};const HE=Qi(pN);var gr=(t=>(t.Query="Query",t.Header="Header",t.Cookie="Cookie",t))(gr||{}),le=(t=>(t.NoAuth="No Auth",t.BasicAuth="Basic Auth",t.DigestAuth="Digest Auth",t.JWT="JWT",t.APIKey="API key",t.OAuth2="OAuth 2.0",t.OpenIDConnect="OpenID Connect",t))(le||{}),fe=(t=>(t.ClientCredentials="Client Credentials",t.ClientCredentialsWithJwtAssertion="Client Credentials with JWT Assertion",t.AuthorizationCode="Authorization Code",t.AuthorizationCodeWithPkce="Authorization Code with PKCE",t.Implicit="Implicit",t.Password="Password",t))(fe||{}),$n=(t=>(t.Body="Body",t.Header="Header",t.URL="URL",t))($n||{}),Bn=(t=>(t.SIMPLE="simple",t.REGEX="regex",t.JSONPATH="jsonpath",t.XPATH="xpath",t))(Bn||{});const Wx={active:!0,key:"",value:""},qE="{",Xx="}",Cl="^\\$inputs\\.([^}\\s]+)$|\\{\\$inputs\\.([^}\\s]+)\\}";function gN({content:t}){return m.jsx(mN,{"data-testid":"arazzo-expression",children:t})}const mN=$.span`
156
156
  display: inline-flex;
157
157
  align-items: center;
158
158
  width: fit-content;
@@ -167,10 +167,10 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
167
167
  border-radius: var(--border-radius);
168
168
  border: 1px solid var(--border-color-primary);
169
169
  padding: 0 calc(var(--spacing-xxs) / 2);
170
- `,Tw="null",pt=(t,e,n=new Set)=>{const r=Ux(t);if(!r.length)return t;let i=0;const o=r.flatMap(({start:s,end:a,name:l})=>{if(n.has(l))return null;const c=e.findLast(f=>f.name===l),u=t.slice(i,c?s:a);if(i=a,c){n.add(l);const f=pt(c.value,e,n);return n.delete(l),[u.length?u:null,f||t.slice(s,a)]}return[u.length?u:null]});return t.slice(i).length&&o.push(t.slice(i)),o.join("")},ON=(t,e)=>{const n=new Set,r=Ux(t),i=[...t.matchAll(KE)],o=[];if(!r.length&&!i.length)return{content:t,sourceMap:[]};let s=t;for(const c of i)if(c.index!==void 0){const u=c[0].length;o.push({pos:c.index,offset:Tw.length-u}),s=s.slice(0,c.index)+Tw+s.slice(c.index+u)}let a=0;const l=r.flatMap(({start:c,end:u,name:f})=>{const d=u-c;if(n.has(f))return null;const h=e.findLast(p=>p.name===f),g=t.slice(a,h?c:u);if(a=u,h){n.add(f);const p=pt(h.value,e,n);n.delete(f);const v=p||t.slice(c,u);return o.push({pos:c,offset:v.length-d}),[g.length?g:null,v]}return[g.length?g:null]});return s.slice(a).length&&l.push(s.slice(a)),{content:l.join(""),sourceMap:o}},Gx=(t,e)=>{const n=Ux(t);if(!n.length)return[t];let r=0;const i=n.flatMap(({start:o,end:s},a)=>{const l=t.slice(r,o),c=pt(t.slice(o,s),e),u=m.jsx(Wd,{children:c},a);return r=s,[l.length?l:null,u]});return t.slice(r).length&&i.push(t.slice(r)),i};function yN(t,e){var n;return((n=e.find(r=>r.name===t.slice(1,-1)))==null?void 0:n.value)||t}function bN(t,e){const n=xN(t);if(!n.length)return m.jsx(Wd,{children:t});let r=0;const i=n.flatMap(({start:o,end:s})=>{const a=t.slice(r,o),l=yN(t.slice(o,s),e);return r=s,[a.length?a:null,l]});return t.slice(r).length&&i.push(t.slice(r)),m.jsx(Wd,{children:i.join("")})}function To(t,e={}){return[...t.map(r=>({id:crypto.randomUUID(),key:r.name,value:e.initializeWithInputs?`$inputs.${r.name}`:r.example?String(r.example):"",active:e.initializeWithInputs?!0:!!r.example})),...e._noExtraEmptyParam?[]:[Ve()]]}function dp(t,e){const[n]=t.split("?"),r=e.slice(0,-1).filter(i=>i.active).map(i=>`${i.key}=${i.value}`).join("&");return`${n}${r?`?${r}`:""}`}function Ve(){return{id:crypto.randomUUID(),...Wx}}function Ps(){return{id:crypto.randomUUID(),...Wx,type:"text",files:null}}function Yx(){return{id:crypto.randomUUID(),...Wx,sendIn:$n.URL}}function Ma(t){return t.map(e=>({id:crypto.randomUUID(),key:"",value:e,active:!0}))}function hp(t,e){return t.filter(n=>n.active&&n.value).map(({value:n})=>(e?pt(n,e):n).trim())}const _r={JSON:"application/json",XML:"application/xml",HTML:"text/html",Text:"text/plain",Image:"image/png"},wN={FormData:"multipart/form-data","application/x-www-form-urlencoded":"application/x-www-form-urlencoded"},SN={Binary:"application/octet-stream"},CN={Image:"image/png"},zn={..._r,...wN,...SN,...CN},kN=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],AN="https://cors.redocly.com/",Hx={id:"default-security-scheme",schemes:["default-security-scheme"]},_w={documentedOAuth2Types:[],grantType:fe.ClientCredentials,authRequestExtraParams:[Ve()],tokenRequestExtraParams:[Yx()],[fe.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ve()],accessToken:""},[fe.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ve()],accessToken:""},[fe.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ve()],codeVerifier:"",codeChallenge:"",accessToken:""},[fe.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ve()],codeVerifier:"",codeChallenge:"",accessToken:""},[fe.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ve()],accessToken:""},[fe.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:""}},PN={securityType:le.NoAuth,securitySchemeId:Hx.id,[le.BasicAuth]:{username:"",password:""},[le.JWT]:{token:""},[le.DigestAuth]:{username:"",password:"",nc:"00000001",realm:"",nonce:"",opaque:"",qop:"",algorithm:"",cnonce:""},[le.APIKey]:{location:gr.Header,name:"",key:""},[le.OAuth2]:_w,[le.OpenIDConnect]:{..._w,openIdConnectUrl:"",userInfoUrl:""}},ov="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",EN={[Bn.SIMPLE]:{condition:"",type:Bn.SIMPLE},[Bn.REGEX]:{condition:"",type:Bn.REGEX,context:""},[Bn.JSONPATH]:{condition:"",type:Bn.JSONPATH,context:""},[Bn.XPATH]:{condition:"",type:Bn.XPATH,context:""}};function Xd(){return structuredClone({type:_r.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[Ps()],"application/x-www-form-urlencoded":[Ps()]},binary:null})}const IN={method:"GET",url:"",security:{securitySchemeVariants:[],selectedSecuritySchemeId:"",securities:[Ko()]},body:Xd(),queryParameters:[Ve()],headers:[Ve()],cookies:[Ve()],pathParameters:[Ve()]};function t5(){return structuredClone(IN)}function Ko(){return Ti(PN)}function TN(t){return Ti({id:crypto.randomUUID(),...EN[t]})}async function _N(t,e,n,r){const i=await Promise.all(t.sourceDescriptions.map(async o=>({name:o.name,url:o.url,type:o.type,apiId:await $N({projectPath:n,apiUrl:o.url,collectionId:e})})));return{...t,id:e,state:qe.Normal,sourceDescriptions:i,workflows:t.workflows.map(o=>({...o,state:qe.Normal,parameters:Nw(o.parameters,o["x-replay-disabled-parameters"]),outputs:Rw(o.outputs),steps:o.steps.map(s=>{var c;const a=s["x-operation"]??null,l=DN(s,i,r);return delete s.operationId,delete s["x-operation"],{...s,state:qe.Normal,parameters:Nw(s.parameters,s["x-replay-disabled-parameters"]),outputs:Rw(s.outputs),successCriteria:((c=s.successCriteria)==null?void 0:c.map(u=>({...u,type:u.type??Bn.SIMPLE})))||[],requestBody:VN(s.requestBody),xOperation:a,security:LN(s),operation:l}})}))}}function jN(t){return/^https?:\/\//i.test(t)}async function $N({projectPath:t,apiUrl:e,collectionId:n}){if(jN(e))return"";if(await Ji.isAbsolute(e))return await Ji.relative(t,e);const r=await Ji.resolve(await Ji.join(t,n,"..",e));return await Ji.relative(t,r)}function DN(t,e,n){if(t["x-operation"])return null;const{path:r,method:i}=MN(t.operationPath),{operationId:o,apiId:s}=RN({operationId:t.operationId,parsedSourceDescriptions:e}),a=n==null?void 0:n.find(l=>l.id===s);if(o&&a&&!r&&!i){const l=WN(o,a);return{apiId:s,path:(l==null?void 0:l.path)??"",method:(l==null?void 0:l.method)??"",operationId:o}}return{apiId:s,path:r??"",method:i??"",operationId:o}}function RN({operationId:t,parsedSourceDescriptions:e}){var s,a;if(!t)return{operationId:"",apiId:((s=e[0])==null?void 0:s.apiId)??""};const n=t.split(".");if(n.length===1)return{operationId:t,apiId:((a=e[0])==null?void 0:a.apiId)??""};const[,r,i=""]=n,o=e.find(({name:l})=>l===r);return{operationId:i,apiId:(o==null?void 0:o.apiId)??""}}function MN(t){if(!t)return{path:"",method:""};const e=HE.unescape(t);try{const[,n]=e.split("#");if(!n)return{path:"",method:""};const r=n.split("/"),i=r.pop()||"";return{path:r.filter(s=>s!=="paths").join("/"),method:i.toLowerCase()}}catch{return{path:"",method:""}}}function NN(t){switch(t.type){case"apiKey":return le.APIKey;case"oauth2":return le.OAuth2;case"openIdConnect":return le.OpenIDConnect;case"http":return t.scheme==="basic"?le.BasicAuth:t.scheme==="digest"?le.DigestAuth:t.scheme==="bearer"?le.JWT:le.NoAuth;default:return le.NoAuth}}function n5(t){return{clientCredentials:fe.ClientCredentials,authorizationCode:fe.AuthorizationCode,implicit:fe.Implicit,password:fe.Password,clientCredentialsWithJwtAssertion:fe.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:fe.AuthorizationCodeWithPkce}[t]??null}function BN(t){return{query:gr.Query,header:gr.Header,cookie:gr.Cookie}[t.toLowerCase()]||gr.Header}function QN(t){return{body:$n.Body,header:$n.Header,url:$n.URL}[t.toLowerCase()]||$n.URL}function jw(t,e){return Object.keys(t).reduce((n,r)=>{const i=n5(r);if(!i)return n;switch(i){case fe.ClientCredentials:n[i]={...e[i],clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",clientAssertion:t[r].clientAssertion??"",tokenUrl:t[r].tokenUrl??"",scopes:ps(t[r].scopes),accessToken:t[r].accessToken??""};break;case fe.AuthorizationCode:n[i]={...e[i],clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",tokenUrl:t[r].tokenUrl??"",authorizationUrl:t[r].authorizationUrl??"",callbackUrl:t[r].callbackUrl??"",availableScopes:t[r].availableScopes??[],scopes:ps(t[r].scopes),accessToken:t[r].accessToken??""};break;case fe.Implicit:n[i]={...e[i],clientId:t[r].clientId??"",authorizationUrl:t[r].authorizationUrl??"",callbackUrl:t[r].callbackUrl??"",availableScopes:ps(t[r].availableScopes),scopes:ps(t[r].scopes),accessToken:t[r].accessToken??""};break;case fe.Password:n[i]={...e[i],username:t[r].username??"",password:t[r].password??"",clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",tokenUrl:t[r].tokenUrl??"",accessToken:t[r].accessToken??""};break;case fe.ClientCredentialsWithJwtAssertion:n[i]={...e[i],clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",clientAssertion:t[r].clientAssertion??"",tokenUrl:t[r].tokenUrl??"",scopes:ps(t[r].scopes),accessToken:t[r].accessToken??""};break;case fe.AuthorizationCodeWithPkce:n[i]={...e[i],clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",tokenUrl:t[r].tokenUrl??"",authorizationUrl:t[r].authorizationUrl??"",callbackUrl:t[r].callbackUrl??"",availableScopes:ps(t[r].availableScopes),scopes:ps(t[r].scopes),codeVerifier:t[r].codeVerifier??"",codeChallenge:t[r].codeChallenge??"",accessToken:t[r].accessToken??""};break}return n},e)}function FN(t,e){const r={...Ko(),securityType:t},i=n5(Object.keys(e.flows||{})[0])??fe.ClientCredentials;switch(t){case le.BasicAuth:return{...r,[le.BasicAuth]:{username:e.username,password:e.password}};case le.JWT:return{...r,[le.JWT]:{token:e.token}};case le.DigestAuth:return{...r,[le.DigestAuth]:{...r[le.DigestAuth],username:e.username,password:e.password}};case le.APIKey:return{...r,[le.APIKey]:{location:BN(e.in),name:e.name,key:e.value}};case le.OAuth2:return{...r,[le.OAuth2]:{...r[le.OAuth2],...jw(e.flows||{},r[le.OAuth2]),authRequestExtraParams:$w(e.authRequestExtraParams),tokenRequestExtraParams:Dw(e.tokenRequestExtraParams),grantType:i}};case le.OpenIDConnect:return{...r,[le.OpenIDConnect]:{...r[le.OpenIDConnect],...jw(e.flows||{},r[le.OpenIDConnect]),openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:$w(e.authRequestExtraParams),tokenRequestExtraParams:Dw(e.tokenRequestExtraParams),grantType:i}};default:return r}}function zN(t){return t.map(e=>{const n=NN(e.scheme);return FN(n,e.values)})}function LN(t){const e=t["x-security"]||[],n=e.length?zN(e):[Ko()];return{securitySchemeVariants:[],selectedSecuritySchemeId:"",securities:n}}function ps(t){return(t||[]).map(e=>{const[n,r]=Object.entries(e)[0];return{id:crypto.randomUUID(),key:"",value:n,active:r}}).concat(Ve())}function $w(t){return(t||[]).map(e=>({id:crypto.randomUUID(),key:e.key??"",value:e.value??"",active:e.active??!0})).concat(Ve())}function Dw(t){return(t||[]).map(e=>({id:crypto.randomUUID(),key:e.key??"",value:e.value??"",active:e.active??!0,sendIn:QN(e.in)})).concat(Yx())}function Rw(t){if(!t)return[Ve()];const e=[];for(const n in t)e.push({id:crypto.randomUUID(),key:n,value:t[n],active:!0});return e.push(Ve()),e}const Mw={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function Nw(t,e){if(!t)return{pathParameters:[],queryParameters:[Ve()],headers:[Ve()],cookies:[Ve()]};const n={pathParameters:[],queryParameters:[],headers:[],cookies:[]};for(const r of t)n[Mw[r.in]].push({id:crypto.randomUUID(),key:r.name,value:r.value,active:!0});if(e)for(const r of e)n[Mw[r.in]].push({id:crypto.randomUUID(),key:r.name,value:r.value,active:!1});return n.queryParameters.push(Ve()),n.headers.push(Ve()),n.cookies.push(Ve()),n}function VN(t){const e=t5().body;if(!t)return e;switch(t.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...e,type:t.contentType,formData:ZN(t)};case"application/octet-stream":return{...e,type:t.contentType,content:""};case"application/json":case"application/ld+json":return{...e,type:t.contentType,content:Bw(t.payload)};default:{const n=typeof t.payload=="string",r=t.contentType||(n?"text/plain":"application/json");return{...e,type:r,content:n?t.payload:Bw(t.payload)}}}}function ZN(t){const e=t5().body.formData,n=t.contentType,r=t.payload.map(s=>({id:crypto.randomUUID(),key:s.name,value:s.value??"",type:s.files===null?"file":"text",active:!0})),i=t["x-replay-disabled-payload"].map(s=>({id:crypto.randomUUID(),key:s.name,value:s.value??"",type:s.files===null?"file":"text",active:!1}));return{...e,[n]:[...r,...i,Ps()]}}function Bw(t){return t?JSON.stringify(t,null,2):""}function WN(t,e){for(const n of Object.keys(e.paths)){const r=e.paths[n];for(const i of Object.keys(r)){const o=i.toLowerCase();if(["get","put","post","delete","options","head","patch","trace"].includes(o)){const s=r[o];if((s==null?void 0:s.operationId)===t)return{method:o,path:n}}}}return null}function Qw(t){const e=Object.assign({},...(t||[]).filter(({key:n,active:r})=>n&&r).map(n=>({[n.key]:n.value})));if(Object.keys(e).length!==0)return e}function Fw(t){if(!t)return{};const e={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},n=[],r=[];return Object.keys(e).forEach(i=>{const o=i;t[o].forEach(s=>{if(!s.key)return;const a={name:s.key,in:e[o],value:s.value};s.active?n.push(a):r.push(a)})}),{parameters:n.length>0?n:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function XN(t){const e=t==null?void 0:t.map(n=>({condition:n.condition,context:n.context,type:n.type==Bn.SIMPLE?void 0:n.type}));if((e==null?void 0:e.length)!==0)return e}function UN(t){if(!(!t||t.length===0))return[...t]}function GN(t){const e=t.type,n=t.formData[e],r=[],i=[];return n.forEach(({key:o,active:s,type:a,value:l})=>{if(!o)return;const c={name:o};switch(a){case"text":c.value=l;break;case"file":c.files=null;break}s?r.push(c):i.push(c)}),{payload:r.length>0?r:void 0,"x-replay-disabled-payload":i.length>0?i:void 0}}function YN(t){if(!t)return t;try{const e=JSON.parse(t);return typeof e=="object"?e:t}catch{return t}}function HN(t){if(t)switch(t.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:t.type,...GN(t)};case"application/octet-stream":return{contentType:t.type,payload:null};case"application/json":case"application/ld+json":return t.content?{contentType:t.type,payload:YN(t.content)}:void 0;default:return t.content?{contentType:t.type,payload:t.content}:void 0}}function qN(t){return{scheme:{type:"http",scheme:"basic"},values:{username:t.username,password:t.password}}}function JN(t){return{scheme:{type:"apiKey"},values:{name:t.name,value:t.key,in:t.location.toLowerCase()}}}function KN(t){return{scheme:{type:"http",scheme:"bearer"},values:{token:t.token}}}function eB(t){return{scheme:{type:"http",scheme:"digest"},values:{username:t.username,password:t.password}}}function tB(t){return{scheme:{type:"openIdConnect"},values:{openIdConnectUrl:t.openIdConnectUrl,userInfoUrl:t.userInfoUrl,authRequestExtraParams:r5(t.authRequestExtraParams),tokenRequestExtraParams:i5(t.tokenRequestExtraParams),flows:o5(t)}}}function nB(t){return{scheme:{type:"oauth2"},values:{authRequestExtraParams:r5(t.authRequestExtraParams),tokenRequestExtraParams:i5(t.tokenRequestExtraParams),flows:o5(t)}}}function Xl(t){return t.filter(e=>e.value).map(e=>({[e.value]:e.active}))}function r5(t){return t.filter(e=>e.value||e.key).map(e=>({key:e.key,value:e.value,active:e.active}))}function i5(t){return t.filter(e=>e.value||e.key).map(e=>({key:e.key,value:e.value,active:e.active,in:e.sendIn.toLowerCase()}))}function o5(t){let e;switch(t.grantType){case fe.ClientCredentials:return e=t[fe.ClientCredentials],{clientCredentials:{tokenUrl:e.tokenUrl,clientId:e.clientId,clientSecret:e.clientSecret,accessToken:e.accessToken,scopes:Xl(e.scopes)}};case fe.Implicit:return e=t[fe.Implicit],{implicit:{authorizationUrl:e.authorizationUrl,clientId:e.clientId,callbackUrl:e.callbackUrl,scopes:Xl(e.scopes),accessToken:e.accessToken}};case fe.Password:return e=t[fe.Password],{password:{tokenUrl:e.tokenUrl,username:e.username,password:e.password,clientId:e.clientId,clientSecret:e.clientSecret,accessToken:e.accessToken}};case fe.AuthorizationCode:return e=t[fe.AuthorizationCode],{authorizationCode:{tokenUrl:e.tokenUrl,authorizationUrl:e.authorizationUrl,clientId:e.clientId,clientSecret:e.clientSecret,callbackUrl:e.callbackUrl,scopes:Xl(e.scopes),accessToken:e.accessToken}};case fe.ClientCredentialsWithJwtAssertion:return e=t[fe.ClientCredentialsWithJwtAssertion],{clientCredentialsWithJwtAssertion:{tokenUrl:e.tokenUrl,clientId:e.clientId,clientAssertion:e.clientAssertion,accessToken:e.accessToken,scopes:Xl(e.scopes)}};case fe.AuthorizationCodeWithPkce:return e=t[fe.AuthorizationCodeWithPkce],{authorizationCodeWithPkce:{tokenUrl:e.tokenUrl,authorizationUrl:e.authorizationUrl,clientId:e.clientId,clientSecret:e.clientSecret,callbackUrl:e.callbackUrl,scopes:Xl(e.scopes),accessToken:e.accessToken,codeVerifier:e.codeVerifier,codeChallenge:e.codeChallenge}}}}function rB(t){const{securities:e}=t,n=e.filter(r=>r.securityType!==le.NoAuth);return n.length?{"x-security":n.map(r=>{switch(r.securityType){case le.OpenIDConnect:{const o=r[le.OpenIDConnect];return tB(o)}case le.OAuth2:{const o=r[le.OAuth2];return nB(o)}case le.APIKey:{const o=r[le.APIKey];return JN(o)}case le.BasicAuth:{const o=r[le.BasicAuth];return qN(o)}case le.DigestAuth:{const o=r[le.DigestAuth];return eB(o)}case le.JWT:{const o=r[le.JWT];return KN(o)}default:return null}}).filter(r=>r!==null)}:null}function iB(t){const{id:e,state:n,sourceDescriptions:r,workflows:i,...o}=t;return{arazzoObject:{...o,sourceDescriptions:r.map(s=>({name:s.name,url:s.url,type:s.type||"openapi"})),workflows:i.map(({parameters:s,dependsOn:a,outputs:l,state:c,steps:u,...f})=>({...f,dependsOn:UN(a),outputs:Qw(l),...Fw(s),steps:u.map(({parameters:d,security:h,operation:g,requestBody:p,successCriteria:v,outputs:x,state:O,xOperation:y,...w})=>{const b=h.securities.filter(C=>C.securityType!==le.NoAuth).length,S={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(g){const C=t.sourceDescriptions.find(({apiId:I})=>I===g.apiId)||t.sourceDescriptions[0];if(g.operationId){const I=t.sourceDescriptions.length<=1;S.operationId=I?g.operationId:`$sourceDescriptions.${C.name}.${g.operationId}`}else S.operationPath=`{$sourceDescriptions.${C.name}.url}#/paths/${HE.escape(g.path)}/${g.method}`}else y&&(S["x-operation"]=y);return{...w,...S,...b?rB(h):{},...Fw(d),requestBody:HN(p),successCriteria:XN(v),outputs:Qw(x)}})}))}}}class s5{constructor(e){nn(this,"itemIds",[]);this.storage=e}async parseMany(e,n){const i=(await Promise.all(e.map(async o=>{try{return await this.parse(o,n)}catch(s){return console.error(`Error parsing file ${o.filePath}:`,s),null}}))).filter(o=>o!==null);return this.itemIds=i.map(o=>o.id),i}async write(e){e.state!==qe.Draft&&await this.storage.set(e.id,this.stringify(e))}async remove(e){await this.storage.remove(e)}async updateRoot(e,n){const r=e.actions;if(r){for(const o in r){const s=parseInt(o);switch(r[o]){case"D":await this.remove(this.itemIds[s]);break;case"I":case"U":await this.write(n[s]);break}}return}const i=this.itemIds.filter(o=>!n.some(s=>s.id===o));await Promise.all([...n.map(o=>this.write(o)),...i.map(o=>this.remove(o))])}async update(e,n){const i={path:e.path.slice(3),actions:e.actions};if(i.path.length===0&&await this.updateRoot(i,n),i.path.length>0){const o=i.path[0];i.path.length===1&&i.actions&&i.actions.id==="U"&&await this.remove(this.itemIds[o]),i.path[1]&&i.path[1]==="id"&&await this.remove(this.itemIds[o]),await this.write(n[o])}this.itemIds=n.map(o=>o.id)}}class oB extends s5{parse(e,n){const r=e.filePath;return _N(e.content,r,this.storage.baseDir,n)}stringify(e){const{arazzoObject:n}=iB(e);return tl.dump(n)}}class sB extends s5{parse(e){return{...e.content,id:e.filePath}}stringify(e){const{id:n,...r}=e;return tl.dump(r)}}const a5=process.env.NODE_ENV==="development";function aB(){return a5?nl.Desktop:nl.AppData}function lB(){return a5?tN():eN()}async function l5(t){const e=await lB();return kc(e,t)}class cB{constructor(e){this.projectId=e}async get(){const e=this.getKey();return localStorage.getItem(e)??null}async set(e){const n=this.getKey();localStorage.setItem(n,e)}async remove(){const e=this.getKey();localStorage.removeItem(e)}getKey(){return`replay:secrets:${this.projectId}`}}class uB{constructor(e,n,r){this.storage=e,this.filePath=n,this.defaultValue=r}parse(e){return JSON.parse(e)}stringify(e){return JSON.stringify(e)}async read(){const e=await this.storage.get(this.filePath);return e?this.parse(e):this.defaultValue}async write(e){return this.storage.set(this.filePath,this.stringify(e))}}const fB=(t,e)=>({data:t,version:e});class sv extends uB{constructor(e,n,r,i){super(e,n,r),this.version=i}parse(e){const n=JSON.parse(e);return n.version!==this.version?this.defaultValue:n.data}stringify(e){return JSON.stringify(fB(e,this.version))}}var at=(t=>(t.Workflow="workflow",t.Collection="collection",t.Step="step",t))(at||{});const dB=1,hB="tabs.json";class pB extends sv{constructor(e){super(e,hB,Ti(rE),dB)}stringify(e){return super.stringify({...e,tabs:e.tabs.map(n=>n.data.type===at.Step?{...n,data:{...n.data,response:null}}:n)})}}const gB=1,mB=1;class vB{constructor(e){nn(this,"historyStorage");nn(this,"activeEnvironmentIdStorage");nn(this,"tabsStateStorage");nn(this,"environmentsStorage");nn(this,"collectionsStorage");nn(this,"apisStorage");nn(this,"project");nn(this,"isTauriApp",fp());nn(this,"systemFilesStorage");nn(this,"localStorageSecretsProvider");nn(this,"userFilesStorage");this.project={dir:e,id:rv.MD5(e).toString()},this.localStorageSecretsProvider=new cB(this.project.id),this.systemFilesStorage=this.isTauriApp?new Iw(`replay/${this.project.id}`,aB()):new Aw(iv.join("/replay",this.project.dir)),this.userFilesStorage=this.isTauriApp?new Iw(this.project.dir):new Aw(iv.join("/projects",this.project.dir));const n=new lN;this.historyStorage=new sv(this.systemFilesStorage,"history.json",[],gB),this.activeEnvironmentIdStorage=new sv(this.systemFilesStorage,"active_environment_id.json",lp,mB),this.tabsStateStorage=new pB(this.systemFilesStorage),this.environmentsStorage=new cN(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new oB(this.userFilesStorage),this.apisStorage=new sB(this.isTauriApp?this.userFilesStorage:n)}async detectProjectFiles(){const n=(await this.userFilesStorage.ls()).filter(o=>/\.(ya?ml)$/.test(o)),r=[],i=[];return await Promise.all(n.map(async o=>{const s=await this.userFilesStorage.get(o);if(s)try{const a=tl.load(s);typeof a=="object"&&a!==null&&("openapi"in a?r.push({filePath:o,content:a}):"arazzo"in a&&i.push({filePath:o,content:a}))}catch(a){console.error(`Error parsing YAML file ${o}:`,a)}})),{apiFiles:r,collectionFiles:i}}async read(){const[e,n,r,i]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:o,collectionFiles:s}=await this.detectProjectFiles(),a=await this.apisStorage.parseMany(o),l=await this.collectionsStorage.parseMany(s,a);return{project:this.project,history:e,activeEnvironmentId:n,tabsState:r,environments:i,apis:a,collections:l}}async update(e,n){switch(e.path[0]){case"history":this.historyStorage.write(n.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(n.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(n.tabsState.get());break;case"environments":this.environmentsStorage.write(n.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(e,n.apis.get());break;case"collections":await this.collectionsStorage.update(e,n.collections.get());break}}}function c5(t=!1){let e,n=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async i=>{if(!(n||r.path.length>0)){if(n=!0,!t){e=new vB(i);const o=await e.read();r.merge(o)}n=!1}}}),onSet(r,i,o){n||t||e.update(i,o)}})}function u5(){return structuredClone({project:{dir:"default",id:"default"},history:[],tabsState:Ti(rE),activeEnvironmentId:lp,environments:nE,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:mi.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const xB=Dx(u5(),qP(iD({key:"replay-root-store"}),c5())),qx=D.createContext(xB),OB=qx.Provider;function lt(){const t=D.useContext(qx);return JP(t)}function yB(t){const e=t.substring(7).split(", "),n={};for(const r of e){const[i,o]=r.split("=");n[i]=o.replace(/"/g,"")}return n}function bB(t,e){const{xOperation:n,requestBody:{content:r},security:{securities:i,selectedSecuritySchemeId:o}}=t;if(!n)return"";const{url:s,method:a}=n,l=i.filter(C=>C.securitySchemeId===o||!o).findLast(C=>C.securityType===le.DigestAuth);if(!l)return"";const{username:c,password:u,realm:f,nonce:d,cnonce:h,algorithm:g,qop:p,nc:v,opaque:x}=l[le.DigestAuth],O=pt(c,e),{pathname:y,search:w}=new URL(pt(s,e)),b=w?`${y}${w}`:y,S=wB({username:O,password:pt(u,e),uri:b,realm:f,nonce:d,cnonce:h,algorithm:g,qop:p,nc:v,opaque:x,method:a,bodyContent:r});return`Digest username="${O}", realm="${f}", nonce="${d}", uri="${b}", qop=${p}, nc=${v}, cnonce="${h}", response="${S}", algorithm=${g}${x?`, opaque="${x}"`:""}`}function wB(t){const{username:e,password:n,realm:r,nonce:i,cnonce:o,algorithm:s,qop:a,nc:l,uri:c,method:u,bodyContent:f}=t,d=SB(s),h=s!=null&&s.endsWith("-sess")?d(`${d(`${e}:${r}:${n}`)}:${i}:${o}`):d(`${e}:${r}:${n}`),g=a!=null&&a.includes("auth-int")?d(`${u}:${c}:${d(f)}`):d(`${u}:${c}`);return d(`${h}:${i}:${l}:${o}:${a}:${g}`).toString()}function SB(t){switch(t==null?void 0:t.replace("-sess","")){case"SHA-256":return rv.SHA256;default:return rv.MD5}}var BP;const Es=((BP=window.__TAURI__)==null?void 0:BP.http.fetch)??globalThis.fetch;function zw(t){try{const e=new URL(t);return(e.protocol==="http:"&&e.port==="80"||e.protocol==="https:"&&e.port==="443")&&(e.port=""),e.hostname=e.hostname.toLowerCase(),e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")}catch(e){return console.error("Invalid URL",e),null}}function kl(t){var n;const e=t.activeEnvironmentId.get();return((n=t.environments.find(r=>r.name.get()===e))==null?void 0:n.get())||t.environments[0].get()}function CB(t){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(t)}function av(t){return t.endsWith("/")?t.substring(0,t.length-1):t}function kB(t){try{const e=new URL(t);return e.search="",e.hash="",e.toString()}catch{return t}}function AB(t){try{const n=new URL(t).hostname;return n==="localhost"||n==="127.0.0.1"}catch{return!1}}function lv(t,e=window.location.origin){try{const n=new URL(t);return e===n.origin}catch{return!1}}function PB(t){return t?t.split(";").map(r=>r.trim()).map(r=>{const i=r.indexOf("="),o=r.slice(0,i).trim(),s=r.slice(i+1).trim();return[o,s]}):[]}async function EB(t,e){const r=await t.clone().arrayBuffer(),i=new TextDecoder().decode(r),o=new Uint8Array(r).length,s=PB(document.cookie);return{bodyUsed:t.bodyUsed,status:t.status,headers:Array.from(new Headers(t.headers||[])),arrayBuffer:r,body:i,duration:e,cookies:s,size:o}}function f5(t,e,n){for(const r of n){const i=Lw(t,r),o=Lw(e,r);if(typeof i=="object"&&typeof o=="object"){if(!f5(i,o,n))return!1}else if(i!==o)return!1}return!0}function Lw(t,e){const n=e.split("/");let r=t;for(const i of n)if(r&&typeof r=="object"&&i in r)r=r[i];else return;return r}const d5=1024;let IB=0,jr=class{constructor(e,n){this.from=e,this.to=n}};class Xe{constructor(e={}){this.id=IB++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Wn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Xe.closedBy=new Xe({deserialize:t=>t.split(" ")});Xe.openedBy=new Xe({deserialize:t=>t.split(" ")});Xe.group=new Xe({deserialize:t=>t.split(" ")});Xe.isolate=new Xe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Xe.contextHash=new Xe({perNode:!0});Xe.lookAhead=new Xe({perNode:!0});Xe.mounted=new Xe({perNode:!0});class Lc{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Xe.mounted.id]}}const TB=Object.create(null);class Wn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):TB,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Wn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Xe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Xe.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}Wn.none=new Wn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new Wn(r.name,i,r.id,r.flags):r)}return new Jx(n)}}const of=new WeakMap,Vw=new WeakMap;var At;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(At||(At={}));let Gt=class cv{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Lc.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Ud(this.topNode,e)}cursorAt(e,n=0,r=0){let i=of.get(this)||this.topNode,o=new Ud(i);return o.moveTo(e,n),of.set(this,o._tree),o}get topNode(){return new Mr(this,0,0,null)}resolve(e,n=0){let r=Vc(of.get(this)||this.topNode,e,n,!1);return of.set(this,r),r}resolveInner(e,n=0){let r=Vc(Vw.get(this)||this.topNode,e,n,!0);return Vw.set(this,r),r}resolveStack(e,n=0){return $B(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&At.IncludeAnonymous)>0;for(let l=this.cursor(s|At.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:tO(Wn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new cv(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new cv(Wn.none,n,r,i)))}static build(e){return DB(e)}};Gt.empty=new Gt(Wn.none,[],[],0);class Kx{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Kx(this.buffer,this.index)}}class Fo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return Wn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let l=e;l!=n&&!(h5(o,i,s[l+1],s[l+2])&&(a=l,r>0));l=s[l+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a<n;){o[l++]=i[a++],o[l++]=i[a++]-r;let c=o[l++]=i[a++]-r;o[l++]=i[a++]-e,s=Math.max(s,c)}return new Fo(o,s,this.set)}}function h5(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Vc(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Mr&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:At.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Mr&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class p5{cursor(e=0){return new Ud(this,e)}getChild(e,n=null,r=null){let i=Zw(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Zw(this,e,n,r)}resolve(e,n=0){return Vc(this,e,n,!1)}resolveInner(e,n=0){return Vc(this,e,n,!0)}matchContext(e){return uv(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}let Mr=class td extends p5{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],f=l[e]+s.from;if(h5(i,r,f,f+u.length)){if(u instanceof Fo){if(o&At.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,n,r-f,i);if(d>-1)return new ki(new _B(s,u,e,f),null,d)}else if(o&At.IncludeAnonymous||!u.type.isAnonymous||eO(u)){let d;if(!(o&At.IgnoreMounts)&&(d=Lc.get(u))&&!d.overlay)return new td(d.tree,f,e,s);let h=new td(u,f,e,s);return o&At.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&At.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&At.IgnoreOverlays)&&(i=Lc.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new td(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Zw(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function uv(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class _B{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class ki extends p5{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new ki(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&At.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new ki(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ki(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new ki(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Gt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function g5(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Mr&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new jB(i,n)}class jB{constructor(e,n){this.heads=e,this.node=n}get next(){return g5(this.heads)}}function $B(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Mr?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=Lc.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Mr(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Vc(a,e,n,!1))}}return i?g5(i):r}class Ud{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Mr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Mr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&At.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&At.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&At.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&At.IncludeAnonymous||a instanceof Fo||!a.type.isAnonymous||eO(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new ki(this.buffer,n,this.stack[i]);return this.bufferNode=new ki(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return uv(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return uv(this._tree,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function eO(t){return t.children.some(e=>e instanceof Fo||!e.type.isAnonymous||eO(e))}function DB(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=d5,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new Kx(n,n.length):n,l=r.types,c=0,u=0;function f(b,S,C,I,A,T){let{id:_,start:P,end:R,size:k}=a,F=u,W=c;for(;k<0;)if(a.next(),k==-1){let M=o[_];C.push(M),I.push(P-b);return}else if(k==-3){c=_;return}else if(k==-4){u=_;return}else throw new RangeError(`Unrecognized record size: ${k}`);let X=l[_],q,Y,L=P-b;if(R-P<=i&&(Y=v(a.pos-S,A))){let M=new Uint16Array(Y.size-Y.skip),j=a.pos-Y.size,Q=M.length;for(;a.pos>j;)Q=x(Y.start,M,Q);q=new Fo(M,R-Y.start,r),L=Y.start-b}else{let M=a.pos-k;a.next();let j=[],Q=[],N=_>=s?_:-1,G=0,U=R;for(;a.pos>M;)N>=0&&a.id==N&&a.size>=0?(a.end<=U-i&&(g(j,Q,P,G,a.end,U,N,F,W),G=j.length,U=a.end),a.next()):T>2500?d(P,M,j,Q):f(P,M,j,Q,N,T+1);if(N>=0&&G>0&&G<j.length&&g(j,Q,P,G,P,U,N,F,W),j.reverse(),Q.reverse(),N>-1&&G>0){let ue=h(X,W);q=tO(X,j,Q,0,j.length,0,R-P,ue,ue)}else q=p(X,j,Q,R-P,F-R,W)}C.push(q),I.push(L)}function d(b,S,C,I){let A=[],T=0,_=-1;for(;a.pos>S;){let{id:P,start:R,end:k,size:F}=a;if(F>4)a.next();else{if(_>-1&&R<_)break;_<0&&(_=k-i),A.push(P,R,k),T++,a.next()}}if(T){let P=new Uint16Array(T*4),R=A[A.length-2];for(let k=A.length-3,F=0;k>=0;k-=3)P[F++]=A[k],P[F++]=A[k+1]-R,P[F++]=A[k+2]-R,P[F++]=F;C.push(new Fo(P,A[2]-R,r)),I.push(R-b)}}function h(b,S){return(C,I,A)=>{let T=0,_=C.length-1,P,R;if(_>=0&&(P=C[_])instanceof Gt){if(!_&&P.type==b&&P.length==A)return P;(R=P.prop(Xe.lookAhead))&&(T=I[_]+P.length+R)}return p(b,C,I,A,T,S)}}function g(b,S,C,I,A,T,_,P,R){let k=[],F=[];for(;b.length>I;)k.push(b.pop()),F.push(S.pop()+C-A);b.push(p(r.types[_],k,F,T-A,P-T,R)),S.push(A-C)}function p(b,S,C,I,A,T,_){if(T){let P=[Xe.contextHash,T];_=_?[P].concat(_):[P]}if(A>25){let P=[Xe.lookAhead,A];_=_?[P].concat(_):[P]}return new Gt(b,S,C,I,_)}function v(b,S){let C=a.fork(),I=0,A=0,T=0,_=C.end-i,P={size:0,start:0,skip:0};e:for(let R=C.pos-b;C.pos>R;){let k=C.size;if(C.id==S&&k>=0){P.size=I,P.start=A,P.skip=T,T+=4,I+=4,C.next();continue}let F=C.pos-k;if(k<0||F<R||C.start<_)break;let W=C.id>=s?4:0,X=C.start;for(C.next();C.pos>F;){if(C.size<0)if(C.size==-3)W+=4;else break e;else C.id>=s&&(W+=4);C.next()}A=X,I+=k,T+=W}return(S<0||I==b)&&(P.size=I,P.start=A,P.skip=T),P.size>4?P:void 0}function x(b,S,C){let{id:I,start:A,end:T,size:_}=a;if(a.next(),_>=0&&I<s){let P=C;if(_>4){let R=a.pos-(_-4);for(;a.pos>R;)C=x(b,S,C)}S[--C]=P,S[--C]=T-b,S[--C]=A-b,S[--C]=I}else _==-3?c=I:_==-4&&(u=I);return C}let O=[],y=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,O,y,-1,0);let w=(e=t.length)!==null&&e!==void 0?e:O.length?y[0]+O[0].length:0;return new Gt(l[t.topID],O.reverse(),y.reverse(),w)}const Ww=new WeakMap;function nd(t,e){if(!t.isAnonymous||e instanceof Fo||e.type!=t)return 1;let n=Ww.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Gt)){n=1;break}n+=nd(t,r)}Ww.set(e,n)}return n}function tO(t,e,n,r,i,o,s,a,l){let c=0;for(let g=r;g<i;g++)c+=nd(t,e[g]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(g,p,v,x,O){for(let y=v;y<x;){let w=y,b=p[y],S=nd(t,g[y]);for(y++;y<x;y++){let C=nd(t,g[y]);if(S+C>=u)break;S+=C}if(y==w+1){if(S>u){let C=g[w];h(C.children,C.positions,0,C.children.length,p[w]+O);continue}f.push(g[w])}else{let C=p[y-1]+g[y-1].length-b;f.push(tO(t,g,p,w,y,b,C,null,l))}d.push(b+O-o)}}return h(e,n,r,i,0),(a||l)(f,d,s)}class m5{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof ki?this.setBuffer(e.context.buffer,e.index,n):e instanceof Mr&&this.map.set(e.tree,n)}get(e){return e instanceof ki?this.getBuffer(e.context.buffer,e.index):e instanceof Mr?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ro{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new ro(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;s&&s.from<f;){let d=s;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,g=Math.min(d.to,f)-c;d=h>=g?null:new ro(h,g,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),s.to>f)break;s=o<e.length?e[o++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}let v5=class{startParse(e,n,r){return typeof e=="string"&&(e=new RB(e)),r=r?r.length?r.map(i=>new jr(i.from,i.to)):[new jr(0,0)]:[new jr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}};class RB{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function MB(t){return(e,n,r,i)=>new BB(e,t,n,r,i)}class Xw{constructor(e,n,r,i,o){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.from=o}}function Uw(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class NB{constructor(e,n,r,i,o,s,a){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=o,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}const fv=new Xe({perNode:!0});class BB{constructor(e,n,r,i,o){this.nest=n,this.input=r,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Gt(r.type,r.children,r.positions,r.length,r.propValues.concat([[fv,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Xe.mounted.id]=new Lc(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new zB(this.fragments),n=null,r=null,i=new Ud(new Mr(this.baseTree,this.ranges[0].from,0,null),At.IncludeAnonymous|At.IgnoreMounts);e:for(let o,s;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!n.ranges.some(h=>h.from<d&&h.to>f)&&n.ranges.push({from:f,to:d})}}a=!1}else if(r&&(s=QB(r.ranges,i.from,i.to)))a=s!=2;else if(!i.type.isAnonymous&&(o=this.nest(i,this.input))&&(i.from<i.to||!o.overlay)){i.tree||FB(i);let c=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")n=new NB(o.parser,o.overlay,c,this.inner.length,i.from,i.tree,n);else{let u=Hw(this.ranges,o.overlay||(i.from<i.to?[new jr(i.from,i.to)]:[]));u.length&&Uw(u),(u.length||!o.overlay)&&this.inner.push(new Xw(o.parser,u.length?o.parser.startParse(this.input,qw(c,u),u):o.parser.startParse(""),o.overlay?o.overlay.map(f=>new jr(f.from-i.from,f.to-i.from)):null,i.tree,u.length?u[0].from:i.from)),o.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else if(n&&(l=n.predicate(i))&&(l===!0&&(l=new jr(i.from,i.to)),l.from<l.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=Hw(this.ranges,n.ranges);c.length&&(Uw(c),this.inner.splice(n.index,0,new Xw(n.parser,n.parser.startParse(this.input,qw(n.mounts,c),c),n.ranges.map(u=>new jr(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function QB(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function Gw(t,e,n,r,i,o){if(e<n){let s=t.buffer[e+1];r.push(t.slice(e,n,s)),i.push(s-o)}}function FB(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,o=i.children.indexOf(r),s=i.children[o],a=s.buffer,l=[o];function c(u,f,d,h,g,p){let v=n[p],x=[],O=[];Gw(s,u,v,x,O,h);let y=a[v+1],w=a[v+2];l.push(x.length);let b=p?c(v+4,a[v+3],s.set.types[a[v]],y,w-y,p-1):e.toTree();return x.push(b),O.push(y-h),Gw(s,a[v+3],f,x,O,h),new Gt(d,x,O,g)}i.children[o]=c(0,a.length,Wn.none,0,s.length,n.length-1);for(let u of l){let f=t.tree.children[u],d=t.tree.positions[u];t.yield(new Mr(f,d+t.from,u,t._tree))}}class Yw{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(At.IncludeAnonymous|At.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,At.IgnoreOverlays|At.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Gt)n=n.children[0];else break}return!1}}let zB=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(fv))!==null&&n!==void 0?n:r.to,this.inner=new Yw(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(fv))!==null&&e!==void 0?e:n.to,this.inner=new Yw(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(r=o.tree)===null||r===void 0?void 0:r.prop(Xe.mounted);if(s&&s.parser==n)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=o.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:o.from-l.offset,mount:s})}}}return i}};function Hw(t,e){let n=null,r=e;for(let i=1,o=0;i<t.length;i++){let s=t[i-1].to,a=t[i].from;for(;o<r.length;o++){let l=r[o];if(l.from>=a)break;l.to<=s||(n||(r=n=e.slice()),l.from<s?(n[o]=new jr(l.from,s),l.to>a&&n.splice(o+1,0,new jr(a,l.to))):l.to>a?n[o--]=new jr(a,l.to):n.splice(o--,1))}}return r}function LB(t,e,n,r){let i=0,o=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:s?t[i].to:t[i].from,f=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let d=Math.max(l,n),h=Math.min(u,f,r);d<h&&c.push(new jr(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(s?(s=!1,i++):s=!0),f==l&&(a?(a=!1,o++):a=!0)}return c}function qw(t,e){let n=[];for(let{pos:r,mount:i,frag:o}of t){let s=r+(i.overlay?i.overlay[0].from:0),a=s+i.tree.length,l=Math.max(o.from,s),c=Math.min(o.to,a);if(i.overlay){let u=i.overlay.map(d=>new jr(d.from+r,d.to+r)),f=LB(e,u,l,c);for(let d=0,h=l;;d++){let g=d==f.length,p=g?c:f[d].from;if(p>h&&n.push(new ro(h,p,i.tree,-s,o.from>=h||o.openStart,o.to<=p||o.openEnd)),g)break;h=f[d].to}}else n.push(new ro(l,c,i.tree,-s,o.from>=s||o.openStart,o.to<=a||o.openEnd))}return n}class Gd{constructor(e,n,r,i,o,s,a,l,c,u=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new Gd(e,[],n,r,r,0,[],0,i?new Jw(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=this.reducePos<this.pos-25;s&&this.setLookAhead(this.pos);let a=o.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<o.minRepeatTerm||e&131072){let h=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=o.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0){let a=!1;for(let l=s;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let o=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new Gd(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new VB(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((a,l)=>l&1&&a==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let l=s&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(s,o+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new Jw(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Jw{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class VB{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Yd{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Yd(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Yd(this.stack,this.pos,this.index)}}function hc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class rd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Kw=new rd;class ZB{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Kw,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Kw,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Na{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;x5(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Na.prototype.contextual=Na.prototype.fallback=Na.prototype.extend=!1;class Hd{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?hc(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,s=e.resolveOffset(1,1);if(x5(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,s==null)break;e.reset(s,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Hd.prototype.contextual=Na.prototype.fallback=Na.prototype.extend=!1;class yr{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function x5(t,e,n,r,i,o){let s=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;(a&t[s])!=0;){let c=t[s+1];for(let h=s+3;h<c;h+=2)if((t[h+1]&a)>0){let g=t[h];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||WB(g,e.token.value,i,o))){e.acceptToken(g);break}}let u=e.next,f=0,d=t[s+2];if(e.next<0&&d>f&&t[c+d*3-3]==65535){s=t[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,g=c+h+(h<<1),p=t[g],v=t[g+1]||65536;if(u<p)d=h;else if(u>=v)f=h+1;else{s=t[g+2],e.advance();continue e}}break}}function eS(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function WB(t,e,n,r){let i=eS(n,r,e);return i<0||eS(n,r,t)<i}const ar=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let v0=null;function tS(t,e,n){let r=t.cursor(At.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class XB{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?tS(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?tS(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof Gt){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let l=o.prop(Xe.lookAhead);if(!l||a+l<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}}class UB{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new rd)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<o.length;c++){if((1<<c&s)==0)continue;let u=o[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=s||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=s,f.context=a),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(r=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new rd,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new rd,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let l=0;l<2;l++)for(let c=s.stateSlot(o,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=Hi(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(Hi(a,c+2),n,r,i));break}a[c]==n&&(i=this.putAction(Hi(a,c+1),n,r,i))}return i}}class GB{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new ZB(n,i),this.tokens=new UB(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[Gd.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new XB(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],o=[]),i.push(a);let l=this.tokens.getMainToken(a);o.push(l.value,l.end)}}break}}if(!r.length){let s=i&&HB(i);if(s)return ar&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw ar&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return ar&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,l)=>l.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let a=r[s];for(let l=s+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=ar?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?o.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(Xe.contextHash)||0)==u))return e.useNode(f,d),ar&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(f.type.id)})`),!0;if(!(f instanceof Gt)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof Gt&&f.positions[0]==0)f=h;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),ar&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],d=l[c++],h=c==l.length||!r,g=h?e:e.split(),p=this.tokens.mainToken;if(g.apply(u,f,p?p.start:g.pos,d),ar&&console.log(s+this.stackID(g)+` (via ${(u&65536)==0?"shift":`reduce of ${o.getName(u&65535)}`} for ${o.getName(f)} @ ${i}${g==e?"":", split"})`),h)return!0;g.pos>i?n.push(g):r.push(g)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return nS(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],l=n[s<<1],c=n[(s<<1)+1],u=ar?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),ar&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let f=a.split(),d=u;for(let h=0;f.forceReduce()&&h<10&&(ar&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)ar&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))ar&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),ar&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),nS(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),Gt.build({buffer:Yd.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(v0||(v0=new WeakMap)).get(e);return n||v0.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function nS(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class YB{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const x0=t=>t;class nO{constructor(e){this.start=e.start,this.shift=e.shift||x0,this.reduce=e.reduce||x0,this.reuse=e.reuse||x0,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class zo extends v5{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function o(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Xe[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)o(u,l,a[c++]);else{let f=a[c+-u];for(let d=-u;d>0;d--)o(a[c++],l,f);c++}}}this.nodeSet=new Jx(n.map((a,l)=>Wn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=d5;let s=hc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(rS),this.states=hc(e.states,Uint32Array),this.data=hc(e.stateData),this.goto=hc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Na(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new GB(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],a=s&1,l=i[o++];if(a&&r)return l;for(let c=o+(s>>1);o<c;o++)if(i[o]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=Hi(r,o+2)];else{if(r[o+1]==2)return Hi(r,o+2);break}if(s==n||s==0)return Hi(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Hi(this.data,o+2);else break;i=n(Hi(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Hi(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(zo.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(a=>a.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=rS(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new YB(e,r,i)}static deserialize(e){return new zo(e)}}function Hi(t,e){return t[e]|t[e+1]<<16}function HB(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function rS(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let qB=0,qi=class dv{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=qB++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof dv&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new dv(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new qd(e);return r=>r.modified.indexOf(n)>-1?r:qd.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},JB=0;class qd{constructor(e){this.name=e,this.instances=[],this.id=JB++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&KB(n,a.modified));if(r)return r;let i=[],o=new qi(e.name,i,e,n);for(let a of n)a.instances.push(o);let s=eQ(n);for(let a of e.set)if(!a.modified.length)for(let l of s)i.push(qd.get(a,l));return o}}function KB(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function eQ(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Al(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){s=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(o.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){s=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Jd(r,s,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return O5.add(e)}const O5=new Xe;class Jd{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Jd.empty=new Jd([],2,null);function y5(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let l of a.set){let c=n[l.id];if(c){s=s?s+" "+c:c;break}}return s},scope:r}}function tQ(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function nQ(t,e,n,r=0,i=t.length){let o=new rQ(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class rQ{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:a,to:l}=e;if(a>=r||l<=n)return;s.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(s)));let c=i,u=iQ(e)||Jd.empty,f=tQ(o,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(Xe.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),g=this.highlighters.filter(v=>!v.scope||v.scope(d.tree.type)),p=e.firstChild();for(let v=0,x=a;;v++){let O=v<d.overlay.length?d.overlay[v]:null,y=O?O.from+a:l,w=Math.max(n,x),b=Math.min(r,y);if(w<b&&p)for(;e.from<b&&(this.highlightRange(e,w,b,i,o),this.startSpan(Math.min(b,e.to),c),!(e.to>=y||!e.nextSibling())););if(!O||y>r)break;x=O.to+a,x>n&&(this.highlightRange(h.cursor(),Math.max(n,O.from+a),Math.min(r,x),"",g),this.startSpan(Math.min(r,x),c))}p&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function iQ(t){let e=t.type.prop(O5);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const be=qi.define,sf=be(),Ao=be(),iS=be(Ao),oS=be(Ao),Po=be(),af=be(Po),O0=be(Po),gi=be(),gs=be(gi),fi=be(),di=be(),hv=be(),Ul=be(hv),lf=be(),B={comment:sf,lineComment:be(sf),blockComment:be(sf),docComment:be(sf),name:Ao,variableName:be(Ao),typeName:iS,tagName:be(iS),propertyName:oS,attributeName:be(oS),className:be(Ao),labelName:be(Ao),namespace:be(Ao),macroName:be(Ao),literal:Po,string:af,docString:be(af),character:be(af),attributeValue:be(af),number:O0,integer:be(O0),float:be(O0),bool:be(Po),regexp:be(Po),escape:be(Po),color:be(Po),url:be(Po),keyword:fi,self:be(fi),null:be(fi),atom:be(fi),unit:be(fi),modifier:be(fi),operatorKeyword:be(fi),controlKeyword:be(fi),definitionKeyword:be(fi),moduleKeyword:be(fi),operator:di,derefOperator:be(di),arithmeticOperator:be(di),logicOperator:be(di),bitwiseOperator:be(di),compareOperator:be(di),updateOperator:be(di),definitionOperator:be(di),typeOperator:be(di),controlOperator:be(di),punctuation:hv,separator:be(hv),bracket:Ul,angleBracket:be(Ul),squareBracket:be(Ul),paren:be(Ul),brace:be(Ul),content:gi,heading:gs,heading1:be(gs),heading2:be(gs),heading3:be(gs),heading4:be(gs),heading5:be(gs),heading6:be(gs),contentSeparator:be(gi),list:be(gi),quote:be(gi),emphasis:be(gi),strong:be(gi),link:be(gi),monospace:be(gi),strikethrough:be(gi),inserted:be(),deleted:be(),changed:be(),invalid:be(),meta:lf,documentMeta:be(lf),annotation:be(lf),processingInstruction:be(lf),definition:qi.defineModifier("definition"),constant:qi.defineModifier("constant"),function:qi.defineModifier("function"),standard:qi.defineModifier("standard"),local:qi.defineModifier("local"),special:qi.defineModifier("special")};for(let t in B){let e=B[t];e instanceof qi&&(e.name=t)}y5([{tag:B.link,class:"tok-link"},{tag:B.heading,class:"tok-heading"},{tag:B.emphasis,class:"tok-emphasis"},{tag:B.strong,class:"tok-strong"},{tag:B.keyword,class:"tok-keyword"},{tag:B.atom,class:"tok-atom"},{tag:B.bool,class:"tok-bool"},{tag:B.url,class:"tok-url"},{tag:B.labelName,class:"tok-labelName"},{tag:B.inserted,class:"tok-inserted"},{tag:B.deleted,class:"tok-deleted"},{tag:B.literal,class:"tok-literal"},{tag:B.string,class:"tok-string"},{tag:B.number,class:"tok-number"},{tag:[B.regexp,B.escape,B.special(B.string)],class:"tok-string2"},{tag:B.variableName,class:"tok-variableName"},{tag:B.local(B.variableName),class:"tok-variableName tok-local"},{tag:B.definition(B.variableName),class:"tok-variableName tok-definition"},{tag:B.special(B.variableName),class:"tok-variableName2"},{tag:B.definition(B.propertyName),class:"tok-propertyName tok-definition"},{tag:B.typeName,class:"tok-typeName"},{tag:B.namespace,class:"tok-namespace"},{tag:B.className,class:"tok-className"},{tag:B.macroName,class:"tok-macroName"},{tag:B.propertyName,class:"tok-propertyName"},{tag:B.operator,class:"tok-operator"},{tag:B.comment,class:"tok-comment"},{tag:B.meta,class:"tok-meta"},{tag:B.invalid,class:"tok-invalid"},{tag:B.punctuation,class:"tok-punctuation"}]);const oQ=Al({String:B.string,Number:B.number,"True False":B.bool,PropertyName:B.propertyName,Null:B.null,",":B.separator,"[ ]":B.squareBracket,"{ }":B.brace}),sQ=zo.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[oQ],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let pv=[],b5=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?b5:pv).push(n=n+t[e])})();function aQ(t){if(t<768)return!1;for(let e=0,n=pv.length;;){let r=e+n>>1;if(t<pv[r])n=r;else if(t>=b5[r])e=r+1;else return!0;if(e==n)return!1}}function sS(t){return t>=127462&&t<=127487}const aS=8205;function lQ(t,e,n=!0,r=!0){return(n?w5:cQ)(t,e,r)}function w5(t,e,n){if(e==t.length)return e;e&&S5(t.charCodeAt(e))&&C5(t.charCodeAt(e-1))&&e--;let r=y0(t,e);for(e+=lS(r);e<t.length;){let i=y0(t,e);if(r==aS||i==aS||n&&aQ(i))e+=lS(i),r=i;else if(sS(i)){let o=0,s=e-2;for(;s>=0&&sS(y0(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function cQ(t,e,n){for(;e>0;){let r=w5(t,e-2,n);if(r<e)return r;e--}return 0}function y0(t,e){let n=t.charCodeAt(e);if(!C5(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return S5(r)?(n-55296<<10)+(r-56320)+65536:n}function S5(t){return t>=56320&&t<57344}function C5(t){return t>=55296&&t<56320}function lS(t){return t<65536?1:2}class rt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=rl(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),wi.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=rl(this,e,n);let r=[];return this.decompose(e,n,r,0),wi.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Ac(this),o=new Ac(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Ac(this,e)}iterRange(e,n=this.length){return new k5(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new A5(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?rt.empty:e.length<=32?new Lt(e):wi.from(Lt.split(e,[]))}}class Lt extends rt{constructor(e,n=uQ(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new fQ(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Lt(cS(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=id(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new Lt(a,s.length+o.length));else{let l=a.length>>1;r.push(new Lt(a.slice(0,l)),new Lt(a.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Lt))return super.replace(e,n,r);[e,n]=rl(this,e,n);let i=id(this.text,id(r.text,cS(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Lt(i,o):wi.from(Lt.split(i,[]),o)}sliceString(e,n=this.length,r=`
170
+ `,Tw="null",pt=(t,e,n=new Set)=>{const r=Ux(t);if(!r.length)return t;let i=0;const o=r.flatMap(({start:s,end:a,name:l})=>{if(n.has(l))return null;const c=e.findLast(f=>f.name===l),u=t.slice(i,c?s:a);if(i=a,c){n.add(l);const f=pt(c.value,e,n);return n.delete(l),[u.length?u:null,f||t.slice(s,a)]}return[u.length?u:null]});return t.slice(i).length&&o.push(t.slice(i)),o.join("")},ON=(t,e)=>{const n=new Set,r=Ux(t),i=[...t.matchAll(KE)],o=[];if(!r.length&&!i.length)return{content:t,sourceMap:[]};let s=t;for(const c of i)if(c.index!==void 0){const u=c[0].length;o.push({pos:c.index,offset:Tw.length-u}),s=s.slice(0,c.index)+Tw+s.slice(c.index+u)}let a=0;const l=r.flatMap(({start:c,end:u,name:f})=>{const d=u-c;if(n.has(f))return null;const h=e.findLast(p=>p.name===f),g=t.slice(a,h?c:u);if(a=u,h){n.add(f);const p=pt(h.value,e,n);n.delete(f);const v=p||t.slice(c,u);return o.push({pos:c,offset:v.length-d}),[g.length?g:null,v]}return[g.length?g:null]});return s.slice(a).length&&l.push(s.slice(a)),{content:l.join(""),sourceMap:o}},Gx=(t,e)=>{const n=Ux(t);if(!n.length)return[t];let r=0;const i=n.flatMap(({start:o,end:s},a)=>{const l=t.slice(r,o),c=pt(t.slice(o,s),e),u=m.jsx(Wd,{children:c},a);return r=s,[l.length?l:null,u]});return t.slice(r).length&&i.push(t.slice(r)),i};function yN(t,e){var n;return((n=e.find(r=>r.name===t.slice(1,-1)))==null?void 0:n.value)||t}function bN(t,e){const n=xN(t);if(!n.length)return m.jsx(Wd,{children:t});let r=0;const i=n.flatMap(({start:o,end:s})=>{const a=t.slice(r,o),l=yN(t.slice(o,s),e);return r=s,[a.length?a:null,l]});return t.slice(r).length&&i.push(t.slice(r)),m.jsx(Wd,{children:i.join("")})}function To(t,e={}){return[...t.map(r=>({id:crypto.randomUUID(),key:r.name,value:e.initializeWithInputs?`$inputs.${r.name}`:r.example?String(r.example):"",active:e.initializeWithInputs?!0:!!r.example})),...e._noExtraEmptyParam?[]:[Ve()]]}function dp(t,e){const[n]=t.split("?"),r=e.slice(0,-1).filter(i=>i.active).map(i=>`${i.key}=${i.value}`).join("&");return`${n}${r?`?${r}`:""}`}function Ve(){return{id:crypto.randomUUID(),...Wx}}function Ps(){return{id:crypto.randomUUID(),...Wx,type:"text",files:null}}function Yx(){return{id:crypto.randomUUID(),...Wx,sendIn:$n.URL}}function Ma(t){return t.map(e=>({id:crypto.randomUUID(),key:"",value:e,active:!0}))}function hp(t,e){return t.filter(n=>n.active&&n.value).map(({value:n})=>(e?pt(n,e):n).trim())}const _r={JSON:"application/json",XML:"application/xml",HTML:"text/html",Text:"text/plain",Image:"image/png"},wN={FormData:"multipart/form-data","application/x-www-form-urlencoded":"application/x-www-form-urlencoded"},SN={Binary:"application/octet-stream"},CN={Image:"image/png"},zn={..._r,...wN,...SN,...CN},kN=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],AN="https://cors.redocly.com/",Hx={id:"default-security-scheme",schemes:["default-security-scheme"]},_w={documentedOAuth2Types:[],grantType:fe.ClientCredentials,authRequestExtraParams:[Ve()],tokenRequestExtraParams:[Yx()],[fe.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ve()],accessToken:""},[fe.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ve()],accessToken:""},[fe.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ve()],codeVerifier:"",codeChallenge:"",accessToken:""},[fe.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ve()],codeVerifier:"",codeChallenge:"",accessToken:""},[fe.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ve()],accessToken:""},[fe.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:""}},PN={securityType:le.NoAuth,securitySchemeId:Hx.id,[le.BasicAuth]:{username:"",password:""},[le.JWT]:{token:""},[le.DigestAuth]:{username:"",password:"",nc:"00000001",realm:"",nonce:"",opaque:"",qop:"",algorithm:"",cnonce:""},[le.APIKey]:{location:gr.Header,name:"",key:""},[le.OAuth2]:_w,[le.OpenIDConnect]:{..._w,openIdConnectUrl:"",userInfoUrl:""}},ov="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",EN={[Bn.SIMPLE]:{condition:"",type:Bn.SIMPLE},[Bn.REGEX]:{condition:"",type:Bn.REGEX,context:""},[Bn.JSONPATH]:{condition:"",type:Bn.JSONPATH,context:""},[Bn.XPATH]:{condition:"",type:Bn.XPATH,context:""}};function Xd(){return structuredClone({type:_r.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[Ps()],"application/x-www-form-urlencoded":[Ps()]},binary:null})}const IN={method:"GET",url:"",security:{securitySchemeVariants:[],selectedSecuritySchemeId:"",securities:[Ko()]},body:Xd(),queryParameters:[Ve()],headers:[Ve()],cookies:[Ve()],pathParameters:[Ve()]};function t5(){return structuredClone(IN)}function Ko(){return Ti(PN)}function TN(t){return Ti({id:crypto.randomUUID(),...EN[t]})}async function _N(t,e,n,r){const i=await Promise.all(t.sourceDescriptions.map(async o=>({name:o.name,url:o.url,type:o.type,apiId:await $N({projectPath:n,apiUrl:o.url,collectionId:e})})));return{...t,id:e,state:qe.Normal,sourceDescriptions:i,workflows:t.workflows.map(o=>({...o,state:qe.Normal,parameters:Nw(o.parameters,o["x-replay-disabled-parameters"]),outputs:Rw(o.outputs),steps:o.steps.map(s=>{var c;const a=s["x-operation"]??null,l=DN(s,i,r);return delete s.operationId,delete s["x-operation"],{...s,state:qe.Normal,parameters:Nw(s.parameters,s["x-replay-disabled-parameters"]),outputs:Rw(s.outputs),successCriteria:((c=s.successCriteria)==null?void 0:c.map(u=>({...u,type:u.type??Bn.SIMPLE})))||[],requestBody:VN(s.requestBody),xOperation:a,security:LN(s),operation:l}})}))}}function jN(t){return/^https?:\/\//i.test(t)}async function $N({projectPath:t,apiUrl:e,collectionId:n}){if(jN(e))return"";if(await Ji.isAbsolute(e))return await Ji.relative(t,e);const r=await Ji.resolve(await Ji.join(t,n,"..",e));return await Ji.relative(t,r)}function DN(t,e,n){if(t["x-operation"])return null;const{path:r,method:i}=MN(t.operationPath),{operationId:o,apiId:s}=RN({operationId:t.operationId,parsedSourceDescriptions:e}),a=n==null?void 0:n.find(l=>l.id===s);if(o&&a&&!r&&!i){const l=WN(o,a);return{apiId:s,path:(l==null?void 0:l.path)??"",method:(l==null?void 0:l.method)??"",operationId:o}}return{apiId:s,path:r??"",method:i??"",operationId:o}}function RN({operationId:t,parsedSourceDescriptions:e}){var s,a;if(!t)return{operationId:"",apiId:((s=e[0])==null?void 0:s.apiId)??""};const n=t.split(".");if(n.length===1)return{operationId:t,apiId:((a=e[0])==null?void 0:a.apiId)??""};const[,r,i=""]=n,o=e.find(({name:l})=>l===r);return{operationId:i,apiId:(o==null?void 0:o.apiId)??""}}function MN(t){if(!t)return{path:"",method:""};const e=HE.unescape(t);try{const[,n]=e.split("#");if(!n)return{path:"",method:""};const r=n.split("/"),i=r.pop()||"";return{path:r.filter(s=>s!=="paths").join("/"),method:i.toLowerCase()}}catch{return{path:"",method:""}}}function NN(t){switch(t.type){case"apiKey":return le.APIKey;case"oauth2":return le.OAuth2;case"openIdConnect":return le.OpenIDConnect;case"http":return t.scheme==="basic"?le.BasicAuth:t.scheme==="digest"?le.DigestAuth:t.scheme==="bearer"?le.JWT:le.NoAuth;default:return le.NoAuth}}function n5(t){return{clientCredentials:fe.ClientCredentials,authorizationCode:fe.AuthorizationCode,implicit:fe.Implicit,password:fe.Password,clientCredentialsWithJwtAssertion:fe.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:fe.AuthorizationCodeWithPkce}[t]??null}function BN(t){return{query:gr.Query,header:gr.Header,cookie:gr.Cookie}[t.toLowerCase()]||gr.Header}function QN(t){return{body:$n.Body,header:$n.Header,url:$n.URL}[t.toLowerCase()]||$n.URL}function jw(t,e){return Object.keys(t).reduce((n,r)=>{const i=n5(r);if(!i)return n;switch(i){case fe.ClientCredentials:n[i]={...e[i],clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",clientAssertion:t[r].clientAssertion??"",tokenUrl:t[r].tokenUrl??"",scopes:ps(t[r].scopes),accessToken:t[r].accessToken??""};break;case fe.AuthorizationCode:n[i]={...e[i],clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",tokenUrl:t[r].tokenUrl??"",authorizationUrl:t[r].authorizationUrl??"",callbackUrl:t[r].callbackUrl??"",availableScopes:t[r].availableScopes??[],scopes:ps(t[r].scopes),accessToken:t[r].accessToken??""};break;case fe.Implicit:n[i]={...e[i],clientId:t[r].clientId??"",authorizationUrl:t[r].authorizationUrl??"",callbackUrl:t[r].callbackUrl??"",availableScopes:ps(t[r].availableScopes),scopes:ps(t[r].scopes),accessToken:t[r].accessToken??""};break;case fe.Password:n[i]={...e[i],username:t[r].username??"",password:t[r].password??"",clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",tokenUrl:t[r].tokenUrl??"",accessToken:t[r].accessToken??""};break;case fe.ClientCredentialsWithJwtAssertion:n[i]={...e[i],clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",clientAssertion:t[r].clientAssertion??"",tokenUrl:t[r].tokenUrl??"",scopes:ps(t[r].scopes),accessToken:t[r].accessToken??""};break;case fe.AuthorizationCodeWithPkce:n[i]={...e[i],clientId:t[r].clientId??"",clientSecret:t[r].clientSecret??"",tokenUrl:t[r].tokenUrl??"",authorizationUrl:t[r].authorizationUrl??"",callbackUrl:t[r].callbackUrl??"",availableScopes:ps(t[r].availableScopes),scopes:ps(t[r].scopes),codeVerifier:t[r].codeVerifier??"",codeChallenge:t[r].codeChallenge??"",accessToken:t[r].accessToken??""};break}return n},e)}function FN(t,e){const r={...Ko(),securityType:t},i=n5(Object.keys(e.flows||{})[0])??fe.ClientCredentials;switch(t){case le.BasicAuth:return{...r,[le.BasicAuth]:{username:e.username,password:e.password}};case le.JWT:return{...r,[le.JWT]:{token:e.token}};case le.DigestAuth:return{...r,[le.DigestAuth]:{...r[le.DigestAuth],username:e.username,password:e.password}};case le.APIKey:return{...r,[le.APIKey]:{location:BN(e.in),name:e.name,key:e.value}};case le.OAuth2:return{...r,[le.OAuth2]:{...r[le.OAuth2],...jw(e.flows||{},r[le.OAuth2]),authRequestExtraParams:$w(e.authRequestExtraParams),tokenRequestExtraParams:Dw(e.tokenRequestExtraParams),grantType:i}};case le.OpenIDConnect:return{...r,[le.OpenIDConnect]:{...r[le.OpenIDConnect],...jw(e.flows||{},r[le.OpenIDConnect]),openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:$w(e.authRequestExtraParams),tokenRequestExtraParams:Dw(e.tokenRequestExtraParams),grantType:i}};default:return r}}function zN(t){return t.map(e=>{const n=NN(e.scheme);return FN(n,e.values)})}function LN(t){const e=t["x-security"]||[],n=e.length?zN(e):[Ko()];return{securitySchemeVariants:[],selectedSecuritySchemeId:"",securities:n}}function ps(t){return(t||[]).map(e=>{const[n,r]=Object.entries(e)[0];return{id:crypto.randomUUID(),key:"",value:n,active:r}}).concat(Ve())}function $w(t){return(t||[]).map(e=>({id:crypto.randomUUID(),key:e.key??"",value:e.value??"",active:e.active??!0})).concat(Ve())}function Dw(t){return(t||[]).map(e=>({id:crypto.randomUUID(),key:e.key??"",value:e.value??"",active:e.active??!0,sendIn:QN(e.in)})).concat(Yx())}function Rw(t){if(!t)return[Ve()];const e=[];for(const n in t)e.push({id:crypto.randomUUID(),key:n,value:t[n],active:!0});return e.push(Ve()),e}const Mw={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function Nw(t,e){if(!t)return{pathParameters:[],queryParameters:[Ve()],headers:[Ve()],cookies:[Ve()]};const n={pathParameters:[],queryParameters:[],headers:[],cookies:[]};for(const r of t)n[Mw[r.in]].push({id:crypto.randomUUID(),key:r.name,value:r.value,active:!0});if(e)for(const r of e)n[Mw[r.in]].push({id:crypto.randomUUID(),key:r.name,value:r.value,active:!1});return n.queryParameters.push(Ve()),n.headers.push(Ve()),n.cookies.push(Ve()),n}function VN(t){const e=t5().body;if(!t)return e;switch(t.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...e,type:t.contentType,formData:ZN(t)};case"application/octet-stream":return{...e,type:t.contentType,content:""};case"application/json":case"application/ld+json":return{...e,type:t.contentType,content:Bw(t.payload)};default:{const n=typeof t.payload=="string",r=t.contentType||(n?"text/plain":"application/json");return{...e,type:r,content:n?t.payload:Bw(t.payload)}}}}function ZN(t){const e=t5().body.formData,n=t.contentType,r=t.payload.map(s=>({id:crypto.randomUUID(),key:s.name,value:s.value??"",type:s.files===null?"file":"text",active:!0})),i=t["x-replay-disabled-payload"].map(s=>({id:crypto.randomUUID(),key:s.name,value:s.value??"",type:s.files===null?"file":"text",active:!1}));return{...e,[n]:[...r,...i,Ps()]}}function Bw(t){return t?JSON.stringify(t,null,2):""}function WN(t,e){for(const n of Object.keys(e.paths)){const r=e.paths[n];for(const i of Object.keys(r)){const o=i.toLowerCase();if(["get","put","post","delete","options","head","patch","trace"].includes(o)){const s=r[o];if((s==null?void 0:s.operationId)===t)return{method:o,path:n}}}}return null}function Qw(t){const e=Object.assign({},...(t||[]).filter(({key:n,active:r})=>n&&r).map(n=>({[n.key]:n.value})));if(Object.keys(e).length!==0)return e}function Fw(t){if(!t)return{};const e={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},n=[],r=[];return Object.keys(e).forEach(i=>{const o=i;t[o].forEach(s=>{if(!s.key)return;const a={name:s.key,in:e[o],value:s.value};s.active?n.push(a):r.push(a)})}),{parameters:n.length>0?n:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function XN(t){const e=t==null?void 0:t.map(n=>({condition:n.condition,context:n.context,type:n.type==Bn.SIMPLE?void 0:n.type}));if((e==null?void 0:e.length)!==0)return e}function UN(t){if(!(!t||t.length===0))return[...t]}function GN(t){const e=t.type,n=t.formData[e],r=[],i=[];return n.forEach(({key:o,active:s,type:a,value:l})=>{if(!o)return;const c={name:o};switch(a){case"text":c.value=l;break;case"file":c.files=null;break}s?r.push(c):i.push(c)}),{payload:r.length>0?r:void 0,"x-replay-disabled-payload":i.length>0?i:void 0}}function YN(t){if(!t)return t;try{const e=JSON.parse(t);return typeof e=="object"?e:t}catch{return t}}function HN(t){if(t)switch(t.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:t.type,...GN(t)};case"application/octet-stream":return{contentType:t.type,payload:null};case"application/json":case"application/ld+json":return t.content?{contentType:t.type,payload:YN(t.content)}:void 0;default:return t.content?{contentType:t.type,payload:t.content}:void 0}}function qN(t){return{scheme:{type:"http",scheme:"basic"},values:{username:t.username,password:t.password}}}function JN(t){return{scheme:{type:"apiKey"},values:{name:t.name,value:t.key,in:t.location.toLowerCase()}}}function KN(t){return{scheme:{type:"http",scheme:"bearer"},values:{token:t.token}}}function eB(t){return{scheme:{type:"http",scheme:"digest"},values:{username:t.username,password:t.password}}}function tB(t){return{scheme:{type:"openIdConnect"},values:{openIdConnectUrl:t.openIdConnectUrl,userInfoUrl:t.userInfoUrl,authRequestExtraParams:r5(t.authRequestExtraParams),tokenRequestExtraParams:i5(t.tokenRequestExtraParams),flows:o5(t)}}}function nB(t){return{scheme:{type:"oauth2"},values:{authRequestExtraParams:r5(t.authRequestExtraParams),tokenRequestExtraParams:i5(t.tokenRequestExtraParams),flows:o5(t)}}}function Xl(t){return t.filter(e=>e.value).map(e=>({[e.value]:e.active}))}function r5(t){return t.filter(e=>e.value||e.key).map(e=>({key:e.key,value:e.value,active:e.active}))}function i5(t){return t.filter(e=>e.value||e.key).map(e=>({key:e.key,value:e.value,active:e.active,in:e.sendIn.toLowerCase()}))}function o5(t){let e;switch(t.grantType){case fe.ClientCredentials:return e=t[fe.ClientCredentials],{clientCredentials:{tokenUrl:e.tokenUrl,clientId:e.clientId,clientSecret:e.clientSecret,accessToken:e.accessToken,scopes:Xl(e.scopes)}};case fe.Implicit:return e=t[fe.Implicit],{implicit:{authorizationUrl:e.authorizationUrl,clientId:e.clientId,callbackUrl:e.callbackUrl,scopes:Xl(e.scopes),accessToken:e.accessToken}};case fe.Password:return e=t[fe.Password],{password:{tokenUrl:e.tokenUrl,username:e.username,password:e.password,clientId:e.clientId,clientSecret:e.clientSecret,accessToken:e.accessToken}};case fe.AuthorizationCode:return e=t[fe.AuthorizationCode],{authorizationCode:{tokenUrl:e.tokenUrl,authorizationUrl:e.authorizationUrl,clientId:e.clientId,clientSecret:e.clientSecret,callbackUrl:e.callbackUrl,scopes:Xl(e.scopes),accessToken:e.accessToken}};case fe.ClientCredentialsWithJwtAssertion:return e=t[fe.ClientCredentialsWithJwtAssertion],{clientCredentialsWithJwtAssertion:{tokenUrl:e.tokenUrl,clientId:e.clientId,clientAssertion:e.clientAssertion,accessToken:e.accessToken,scopes:Xl(e.scopes)}};case fe.AuthorizationCodeWithPkce:return e=t[fe.AuthorizationCodeWithPkce],{authorizationCodeWithPkce:{tokenUrl:e.tokenUrl,authorizationUrl:e.authorizationUrl,clientId:e.clientId,clientSecret:e.clientSecret,callbackUrl:e.callbackUrl,scopes:Xl(e.scopes),accessToken:e.accessToken,codeVerifier:e.codeVerifier,codeChallenge:e.codeChallenge}}}}function rB(t){const{securities:e}=t,n=e.filter(r=>r.securityType!==le.NoAuth);return n.length?{"x-security":n.map(r=>{switch(r.securityType){case le.OpenIDConnect:{const o=r[le.OpenIDConnect];return tB(o)}case le.OAuth2:{const o=r[le.OAuth2];return nB(o)}case le.APIKey:{const o=r[le.APIKey];return JN(o)}case le.BasicAuth:{const o=r[le.BasicAuth];return qN(o)}case le.DigestAuth:{const o=r[le.DigestAuth];return eB(o)}case le.JWT:{const o=r[le.JWT];return KN(o)}default:return null}}).filter(r=>r!==null)}:null}function iB(t){const{id:e,state:n,sourceDescriptions:r,workflows:i,...o}=t;return{arazzoObject:{...o,sourceDescriptions:r.map(s=>({name:s.name,url:s.url,type:s.type||"openapi"})),workflows:i.map(({parameters:s,dependsOn:a,outputs:l,state:c,steps:u,...f})=>({...f,dependsOn:UN(a),outputs:Qw(l),...Fw(s),steps:u.map(({parameters:d,security:h,operation:g,requestBody:p,successCriteria:v,outputs:x,state:O,xOperation:y,...w})=>{const b=h.securities.filter(C=>C.securityType!==le.NoAuth).length,S={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(g){const C=t.sourceDescriptions.find(({apiId:I})=>I===g.apiId)||t.sourceDescriptions[0];if(g.operationId){const I=t.sourceDescriptions.length<=1;S.operationId=I?g.operationId:`$sourceDescriptions.${C.name}.${g.operationId}`}else S.operationPath=`{$sourceDescriptions.${C.name}.url}#/paths/${HE.escape(g.path)}/${g.method}`}else y&&(S["x-operation"]=y);return{...w,...S,...b?rB(h):{},...Fw(d),requestBody:HN(p),successCriteria:XN(v),outputs:Qw(x)}})}))}}}class s5{constructor(e){nn(this,"itemIds",[]);this.storage=e}async parseMany(e,n){const i=(await Promise.all(e.map(async o=>{try{return await this.parse(o,n)}catch(s){return console.error(`Error parsing file ${o.filePath}:`,s),null}}))).filter(o=>o!==null);return this.itemIds=i.map(o=>o.id),i}async write(e){e.state!==qe.Draft&&await this.storage.set(e.id,this.stringify(e))}async remove(e){await this.storage.remove(e)}async updateRoot(e,n){const r=e.actions;if(r){for(const o in r){const s=parseInt(o);switch(r[o]){case"D":await this.remove(this.itemIds[s]);break;case"I":case"U":await this.write(n[s]);break}}return}const i=this.itemIds.filter(o=>!n.some(s=>s.id===o));await Promise.all([...n.map(o=>this.write(o)),...i.map(o=>this.remove(o))])}async update(e,n){const i={path:e.path.slice(3),actions:e.actions};if(i.path.length===0&&await this.updateRoot(i,n),i.path.length>0){const o=i.path[0];i.path.length===1&&i.actions&&i.actions.id==="U"&&await this.remove(this.itemIds[o]),i.path[1]&&i.path[1]==="id"&&await this.remove(this.itemIds[o]),await this.write(n[o])}this.itemIds=n.map(o=>o.id)}}class oB extends s5{parse(e,n){const r=e.filePath;return _N(e.content,r,this.storage.baseDir,n)}stringify(e){const{arazzoObject:n}=iB(e);return tl.dump(n)}}class sB extends s5{parse(e){return{...e.content,id:e.filePath}}stringify(e){const{id:n,...r}=e;return tl.dump(r)}}const a5=process.env.NODE_ENV==="development";function aB(){return a5?nl.Desktop:nl.AppData}function lB(){return a5?tN():eN()}async function l5(t){const e=await lB();return kc(e,t)}class cB{constructor(e){this.projectId=e}async get(){const e=this.getKey();return localStorage.getItem(e)??null}async set(e){const n=this.getKey();localStorage.setItem(n,e)}async remove(){const e=this.getKey();localStorage.removeItem(e)}getKey(){return`replay:secrets:${this.projectId}`}}class uB{constructor(e,n,r){this.storage=e,this.filePath=n,this.defaultValue=r}parse(e){return JSON.parse(e)}stringify(e){return JSON.stringify(e)}async read(){const e=await this.storage.get(this.filePath);return e?this.parse(e):this.defaultValue}async write(e){return this.storage.set(this.filePath,this.stringify(e))}}const fB=(t,e)=>({data:t,version:e});class sv extends uB{constructor(e,n,r,i){super(e,n,r),this.version=i}parse(e){const n=JSON.parse(e);return n.version!==this.version?this.defaultValue:n.data}stringify(e){return JSON.stringify(fB(e,this.version))}}var at=(t=>(t.Workflow="workflow",t.Collection="collection",t.Step="step",t))(at||{});const dB=1,hB="tabs.json";class pB extends sv{constructor(e){super(e,hB,Ti(rE),dB)}stringify(e){return super.stringify({...e,tabs:e.tabs.map(n=>n.data.type===at.Step?{...n,data:{...n.data,response:null}}:n)})}}const gB=1,mB=1;class vB{constructor(e){nn(this,"historyStorage");nn(this,"activeEnvironmentIdStorage");nn(this,"tabsStateStorage");nn(this,"environmentsStorage");nn(this,"collectionsStorage");nn(this,"apisStorage");nn(this,"project");nn(this,"isTauriApp",fp());nn(this,"systemFilesStorage");nn(this,"localStorageSecretsProvider");nn(this,"userFilesStorage");this.project={dir:e,id:rv.MD5(e).toString()},this.localStorageSecretsProvider=new cB(this.project.id),this.systemFilesStorage=this.isTauriApp?new Iw(`replay/${this.project.id}`,aB()):new Aw(iv.join("/replay",this.project.dir)),this.userFilesStorage=this.isTauriApp?new Iw(this.project.dir):new Aw(iv.join("/projects",this.project.dir));const n=new lN;this.historyStorage=new sv(this.systemFilesStorage,"history.json",[],gB),this.activeEnvironmentIdStorage=new sv(this.systemFilesStorage,"active_environment_id.json",lp,mB),this.tabsStateStorage=new pB(this.systemFilesStorage),this.environmentsStorage=new cN(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new oB(this.userFilesStorage),this.apisStorage=new sB(this.isTauriApp?this.userFilesStorage:n)}async detectProjectFiles(){const n=(await this.userFilesStorage.ls()).filter(o=>/\.(ya?ml)$/.test(o)),r=[],i=[];return await Promise.all(n.map(async o=>{const s=await this.userFilesStorage.get(o);if(s)try{const a=tl.load(s);typeof a=="object"&&a!==null&&("openapi"in a?r.push({filePath:o,content:a}):"arazzo"in a&&i.push({filePath:o,content:a}))}catch(a){console.error(`Error parsing YAML file ${o}:`,a)}})),{apiFiles:r,collectionFiles:i}}async read(){const[e,n,r,i]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:o,collectionFiles:s}=await this.detectProjectFiles(),a=await this.apisStorage.parseMany(o),l=await this.collectionsStorage.parseMany(s,a);return{project:this.project,history:e,activeEnvironmentId:n,tabsState:r,environments:i,apis:a,collections:l}}async update(e,n){switch(e.path[0]){case"history":this.historyStorage.write(n.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(n.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(n.tabsState.get());break;case"environments":this.environmentsStorage.write(n.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(e,n.apis.get());break;case"collections":await this.collectionsStorage.update(e,n.collections.get());break}}}function c5(t=!1){let e,n=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async i=>{if(!(n||r.path.length>0)){if(n=!0,!t){e=new vB(i);const o=await e.read();r.merge(o)}n=!1}}}),onSet(r,i,o){n||t||e.update(i,o)}})}function u5(){return structuredClone({project:{dir:"default",id:"default"},history:[],tabsState:Ti(rE),activeEnvironmentId:lp,environments:nE,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:mi.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const xB=Dx(u5(),qP(iD({key:"replay-root-store"}),c5())),qx=D.createContext(xB),OB=qx.Provider;function lt(){const t=D.useContext(qx);return JP(t)}function yB(t){const e=t.substring(7).split(", "),n={};for(const r of e){const[i,o]=r.split("=");n[i]=o.replace(/"/g,"")}return n}function bB(t,e){const{xOperation:n,requestBody:{content:r},security:{securities:i,selectedSecuritySchemeId:o}}=t;if(!n)return"";const{url:s,method:a}=n,l=i.filter(C=>C.securitySchemeId===o||!o).findLast(C=>C.securityType===le.DigestAuth);if(!l)return"";const{username:c,password:u,realm:f,nonce:d,cnonce:h,algorithm:g,qop:p,nc:v,opaque:x}=l[le.DigestAuth],O=pt(c,e),{pathname:y,search:w}=new URL(pt(s,e)),b=w?`${y}${w}`:y,S=wB({username:O,password:pt(u,e),uri:b,realm:f,nonce:d,cnonce:h,algorithm:g,qop:p,nc:v,opaque:x,method:a,bodyContent:r});return`Digest username="${O}", realm="${f}", nonce="${d}", uri="${b}", qop=${p}, nc=${v}, cnonce="${h}", response="${S}", algorithm=${g}${x?`, opaque="${x}"`:""}`}function wB(t){const{username:e,password:n,realm:r,nonce:i,cnonce:o,algorithm:s,qop:a,nc:l,uri:c,method:u,bodyContent:f}=t,d=SB(s),h=s!=null&&s.endsWith("-sess")?d(`${d(`${e}:${r}:${n}`)}:${i}:${o}`):d(`${e}:${r}:${n}`),g=a!=null&&a.includes("auth-int")?d(`${u}:${c}:${d(f)}`):d(`${u}:${c}`);return d(`${h}:${i}:${l}:${o}:${a}:${g}`).toString()}function SB(t){switch(t==null?void 0:t.replace("-sess","")){case"SHA-256":return rv.SHA256;default:return rv.MD5}}var BP;const Es=((BP=window.__TAURI__)==null?void 0:BP.http.fetch)??globalThis.fetch;function zw(t){try{const e=new URL(t);return(e.protocol==="http:"&&e.port==="80"||e.protocol==="https:"&&e.port==="443")&&(e.port=""),e.hostname=e.hostname.toLowerCase(),e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")}catch(e){return console.error("Invalid URL",e),null}}function kl(t){var n;const e=t.activeEnvironmentId.get();return((n=t.environments.find(r=>r.name.get()===e))==null?void 0:n.get())||t.environments[0].get()}function CB(t){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(t)}function av(t){return t.endsWith("/")?t.substring(0,t.length-1):t}function kB(t){try{const e=new URL(t);return e.search="",e.hash="",e.toString()}catch{return t}}function AB(t){try{const n=new URL(t).hostname;return n==="localhost"||n==="127.0.0.1"}catch{return!1}}function lv(t,e=window.location.origin){try{const n=new URL(t);return e===n.origin}catch{return!1}}function PB(t){return t?t.split(";").map(r=>r.trim()).map(r=>{const i=r.indexOf("="),o=r.slice(0,i).trim(),s=r.slice(i+1).trim();return[o,s]}):[]}async function EB(t,e){const r=await t.clone().arrayBuffer(),i=new TextDecoder().decode(r),o=new Uint8Array(r).length,s=PB(document.cookie);return{bodyUsed:t.bodyUsed,status:t.status,headers:Array.from(new Headers(t.headers||[])),arrayBuffer:r,body:i,duration:e,cookies:s,size:o}}function f5(t,e,n){for(const r of n){const i=Lw(t,r),o=Lw(e,r);if(typeof i=="object"&&typeof o=="object"){if(!f5(i,o,n))return!1}else if(i!==o)return!1}return!0}function Lw(t,e){const n=e.split("/");let r=t;for(const i of n)if(r&&typeof r=="object"&&i in r)r=r[i];else return;return r}const d5=1024;let IB=0,jr=class{constructor(e,n){this.from=e,this.to=n}};class Xe{constructor(e={}){this.id=IB++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Wn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Xe.closedBy=new Xe({deserialize:t=>t.split(" ")});Xe.openedBy=new Xe({deserialize:t=>t.split(" ")});Xe.group=new Xe({deserialize:t=>t.split(" ")});Xe.isolate=new Xe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Xe.contextHash=new Xe({perNode:!0});Xe.lookAhead=new Xe({perNode:!0});Xe.mounted=new Xe({perNode:!0});class Lc{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Xe.mounted.id]}}const TB=Object.create(null);class Wn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):TB,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Wn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Xe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Xe.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}Wn.none=new Wn("",Object.create(null),0,8);class Jx{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new Wn(r.name,i,r.id,r.flags):r)}return new Jx(n)}}const of=new WeakMap,Vw=new WeakMap;var At;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(At||(At={}));let Gt=class cv{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Lc.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Ud(this.topNode,e)}cursorAt(e,n=0,r=0){let i=of.get(this)||this.topNode,o=new Ud(i);return o.moveTo(e,n),of.set(this,o._tree),o}get topNode(){return new Mr(this,0,0,null)}resolve(e,n=0){let r=Vc(of.get(this)||this.topNode,e,n,!1);return of.set(this,r),r}resolveInner(e,n=0){let r=Vc(Vw.get(this)||this.topNode,e,n,!0);return Vw.set(this,r),r}resolveStack(e,n=0){return $B(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&At.IncludeAnonymous)>0;for(let l=this.cursor(s|At.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:tO(Wn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new cv(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new cv(Wn.none,n,r,i)))}static build(e){return DB(e)}};Gt.empty=new Gt(Wn.none,[],[],0);class Kx{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Kx(this.buffer,this.index)}}class Fo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return Wn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let l=e;l!=n&&!(h5(o,i,s[l+1],s[l+2])&&(a=l,r>0));l=s[l+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a<n;){o[l++]=i[a++],o[l++]=i[a++]-r;let c=o[l++]=i[a++]-r;o[l++]=i[a++]-e,s=Math.max(s,c)}return new Fo(o,s,this.set)}}function h5(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Vc(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Mr&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:At.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Mr&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class p5{cursor(e=0){return new Ud(this,e)}getChild(e,n=null,r=null){let i=Zw(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Zw(this,e,n,r)}resolve(e,n=0){return Vc(this,e,n,!1)}resolveInner(e,n=0){return Vc(this,e,n,!0)}matchContext(e){return uv(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}let Mr=class td extends p5{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],f=l[e]+s.from;if(h5(i,r,f,f+u.length)){if(u instanceof Fo){if(o&At.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,n,r-f,i);if(d>-1)return new ki(new _B(s,u,e,f),null,d)}else if(o&At.IncludeAnonymous||!u.type.isAnonymous||eO(u)){let d;if(!(o&At.IgnoreMounts)&&(d=Lc.get(u))&&!d.overlay)return new td(d.tree,f,e,s);let h=new td(u,f,e,s);return o&At.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&At.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&At.IgnoreOverlays)&&(i=Lc.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new td(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Zw(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function uv(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class _B{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class ki extends p5{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new ki(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&At.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new ki(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ki(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new ki(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Gt(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function g5(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Mr&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new jB(i,n)}class jB{constructor(e,n){this.heads=e,this.node=n}get next(){return g5(this.heads)}}function $B(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Mr?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=Lc.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Mr(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Vc(a,e,n,!1))}}return i?g5(i):r}class Ud{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Mr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Mr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&At.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&At.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&At.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&At.IncludeAnonymous||a instanceof Fo||!a.type.isAnonymous||eO(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new ki(this.buffer,n,this.stack[i]);return this.bufferNode=new ki(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return uv(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return uv(this._tree,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function eO(t){return t.children.some(e=>e instanceof Fo||!e.type.isAnonymous||eO(e))}function DB(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=d5,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new Kx(n,n.length):n,l=r.types,c=0,u=0;function f(b,S,C,I,A,T){let{id:_,start:P,end:R,size:k}=a,F=u,W=c;for(;k<0;)if(a.next(),k==-1){let M=o[_];C.push(M),I.push(P-b);return}else if(k==-3){c=_;return}else if(k==-4){u=_;return}else throw new RangeError(`Unrecognized record size: ${k}`);let X=l[_],q,Y,L=P-b;if(R-P<=i&&(Y=v(a.pos-S,A))){let M=new Uint16Array(Y.size-Y.skip),j=a.pos-Y.size,Q=M.length;for(;a.pos>j;)Q=x(Y.start,M,Q);q=new Fo(M,R-Y.start,r),L=Y.start-b}else{let M=a.pos-k;a.next();let j=[],Q=[],N=_>=s?_:-1,G=0,U=R;for(;a.pos>M;)N>=0&&a.id==N&&a.size>=0?(a.end<=U-i&&(g(j,Q,P,G,a.end,U,N,F,W),G=j.length,U=a.end),a.next()):T>2500?d(P,M,j,Q):f(P,M,j,Q,N,T+1);if(N>=0&&G>0&&G<j.length&&g(j,Q,P,G,P,U,N,F,W),j.reverse(),Q.reverse(),N>-1&&G>0){let ue=h(X,W);q=tO(X,j,Q,0,j.length,0,R-P,ue,ue)}else q=p(X,j,Q,R-P,F-R,W)}C.push(q),I.push(L)}function d(b,S,C,I){let A=[],T=0,_=-1;for(;a.pos>S;){let{id:P,start:R,end:k,size:F}=a;if(F>4)a.next();else{if(_>-1&&R<_)break;_<0&&(_=k-i),A.push(P,R,k),T++,a.next()}}if(T){let P=new Uint16Array(T*4),R=A[A.length-2];for(let k=A.length-3,F=0;k>=0;k-=3)P[F++]=A[k],P[F++]=A[k+1]-R,P[F++]=A[k+2]-R,P[F++]=F;C.push(new Fo(P,A[2]-R,r)),I.push(R-b)}}function h(b,S){return(C,I,A)=>{let T=0,_=C.length-1,P,R;if(_>=0&&(P=C[_])instanceof Gt){if(!_&&P.type==b&&P.length==A)return P;(R=P.prop(Xe.lookAhead))&&(T=I[_]+P.length+R)}return p(b,C,I,A,T,S)}}function g(b,S,C,I,A,T,_,P,R){let k=[],F=[];for(;b.length>I;)k.push(b.pop()),F.push(S.pop()+C-A);b.push(p(r.types[_],k,F,T-A,P-T,R)),S.push(A-C)}function p(b,S,C,I,A,T,_){if(T){let P=[Xe.contextHash,T];_=_?[P].concat(_):[P]}if(A>25){let P=[Xe.lookAhead,A];_=_?[P].concat(_):[P]}return new Gt(b,S,C,I,_)}function v(b,S){let C=a.fork(),I=0,A=0,T=0,_=C.end-i,P={size:0,start:0,skip:0};e:for(let R=C.pos-b;C.pos>R;){let k=C.size;if(C.id==S&&k>=0){P.size=I,P.start=A,P.skip=T,T+=4,I+=4,C.next();continue}let F=C.pos-k;if(k<0||F<R||C.start<_)break;let W=C.id>=s?4:0,X=C.start;for(C.next();C.pos>F;){if(C.size<0)if(C.size==-3)W+=4;else break e;else C.id>=s&&(W+=4);C.next()}A=X,I+=k,T+=W}return(S<0||I==b)&&(P.size=I,P.start=A,P.skip=T),P.size>4?P:void 0}function x(b,S,C){let{id:I,start:A,end:T,size:_}=a;if(a.next(),_>=0&&I<s){let P=C;if(_>4){let R=a.pos-(_-4);for(;a.pos>R;)C=x(b,S,C)}S[--C]=P,S[--C]=T-b,S[--C]=A-b,S[--C]=I}else _==-3?c=I:_==-4&&(u=I);return C}let O=[],y=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,O,y,-1,0);let w=(e=t.length)!==null&&e!==void 0?e:O.length?y[0]+O[0].length:0;return new Gt(l[t.topID],O.reverse(),y.reverse(),w)}const Ww=new WeakMap;function nd(t,e){if(!t.isAnonymous||e instanceof Fo||e.type!=t)return 1;let n=Ww.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Gt)){n=1;break}n+=nd(t,r)}Ww.set(e,n)}return n}function tO(t,e,n,r,i,o,s,a,l){let c=0;for(let g=r;g<i;g++)c+=nd(t,e[g]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(g,p,v,x,O){for(let y=v;y<x;){let w=y,b=p[y],S=nd(t,g[y]);for(y++;y<x;y++){let C=nd(t,g[y]);if(S+C>=u)break;S+=C}if(y==w+1){if(S>u){let C=g[w];h(C.children,C.positions,0,C.children.length,p[w]+O);continue}f.push(g[w])}else{let C=p[y-1]+g[y-1].length-b;f.push(tO(t,g,p,w,y,b,C,null,l))}d.push(b+O-o)}}return h(e,n,r,i,0),(a||l)(f,d,s)}class m5{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof ki?this.setBuffer(e.context.buffer,e.index,n):e instanceof Mr&&this.map.set(e.tree,n)}get(e){return e instanceof ki?this.getBuffer(e.context.buffer,e.index):e instanceof Mr?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ro{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new ro(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;s&&s.from<f;){let d=s;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,g=Math.min(d.to,f)-c;d=h>=g?null:new ro(h,g,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),s.to>f)break;s=o<e.length?e[o++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}let v5=class{startParse(e,n,r){return typeof e=="string"&&(e=new RB(e)),r=r?r.length?r.map(i=>new jr(i.from,i.to)):[new jr(0,0)]:[new jr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}};class RB{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function MB(t){return(e,n,r,i)=>new BB(e,t,n,r,i)}class Xw{constructor(e,n,r,i,o){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.from=o}}function Uw(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class NB{constructor(e,n,r,i,o,s,a){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=o,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}const fv=new Xe({perNode:!0});class BB{constructor(e,n,r,i,o){this.nest=n,this.input=r,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Gt(r.type,r.children,r.positions,r.length,r.propValues.concat([[fv,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Xe.mounted.id]=new Lc(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new zB(this.fragments),n=null,r=null,i=new Ud(new Mr(this.baseTree,this.ranges[0].from,0,null),At.IncludeAnonymous|At.IgnoreMounts);e:for(let o,s;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!n.ranges.some(h=>h.from<d&&h.to>f)&&n.ranges.push({from:f,to:d})}}a=!1}else if(r&&(s=QB(r.ranges,i.from,i.to)))a=s!=2;else if(!i.type.isAnonymous&&(o=this.nest(i,this.input))&&(i.from<i.to||!o.overlay)){i.tree||FB(i);let c=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")n=new NB(o.parser,o.overlay,c,this.inner.length,i.from,i.tree,n);else{let u=Hw(this.ranges,o.overlay||(i.from<i.to?[new jr(i.from,i.to)]:[]));u.length&&Uw(u),(u.length||!o.overlay)&&this.inner.push(new Xw(o.parser,u.length?o.parser.startParse(this.input,qw(c,u),u):o.parser.startParse(""),o.overlay?o.overlay.map(f=>new jr(f.from-i.from,f.to-i.from)):null,i.tree,u.length?u[0].from:i.from)),o.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else if(n&&(l=n.predicate(i))&&(l===!0&&(l=new jr(i.from,i.to)),l.from<l.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=Hw(this.ranges,n.ranges);c.length&&(Uw(c),this.inner.splice(n.index,0,new Xw(n.parser,n.parser.startParse(this.input,qw(n.mounts,c),c),n.ranges.map(u=>new jr(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function QB(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function Gw(t,e,n,r,i,o){if(e<n){let s=t.buffer[e+1];r.push(t.slice(e,n,s)),i.push(s-o)}}function FB(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,o=i.children.indexOf(r),s=i.children[o],a=s.buffer,l=[o];function c(u,f,d,h,g,p){let v=n[p],x=[],O=[];Gw(s,u,v,x,O,h);let y=a[v+1],w=a[v+2];l.push(x.length);let b=p?c(v+4,a[v+3],s.set.types[a[v]],y,w-y,p-1):e.toTree();return x.push(b),O.push(y-h),Gw(s,a[v+3],f,x,O,h),new Gt(d,x,O,g)}i.children[o]=c(0,a.length,Wn.none,0,s.length,n.length-1);for(let u of l){let f=t.tree.children[u],d=t.tree.positions[u];t.yield(new Mr(f,d+t.from,u,t._tree))}}class Yw{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(At.IncludeAnonymous|At.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,At.IgnoreOverlays|At.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Gt)n=n.children[0];else break}return!1}}let zB=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(fv))!==null&&n!==void 0?n:r.to,this.inner=new Yw(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(fv))!==null&&e!==void 0?e:n.to,this.inner=new Yw(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(r=o.tree)===null||r===void 0?void 0:r.prop(Xe.mounted);if(s&&s.parser==n)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=o.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:o.from-l.offset,mount:s})}}}return i}};function Hw(t,e){let n=null,r=e;for(let i=1,o=0;i<t.length;i++){let s=t[i-1].to,a=t[i].from;for(;o<r.length;o++){let l=r[o];if(l.from>=a)break;l.to<=s||(n||(r=n=e.slice()),l.from<s?(n[o]=new jr(l.from,s),l.to>a&&n.splice(o+1,0,new jr(a,l.to))):l.to>a?n[o--]=new jr(a,l.to):n.splice(o--,1))}}return r}function LB(t,e,n,r){let i=0,o=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:s?t[i].to:t[i].from,f=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let d=Math.max(l,n),h=Math.min(u,f,r);d<h&&c.push(new jr(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(s?(s=!1,i++):s=!0),f==l&&(a?(a=!1,o++):a=!0)}return c}function qw(t,e){let n=[];for(let{pos:r,mount:i,frag:o}of t){let s=r+(i.overlay?i.overlay[0].from:0),a=s+i.tree.length,l=Math.max(o.from,s),c=Math.min(o.to,a);if(i.overlay){let u=i.overlay.map(d=>new jr(d.from+r,d.to+r)),f=LB(e,u,l,c);for(let d=0,h=l;;d++){let g=d==f.length,p=g?c:f[d].from;if(p>h&&n.push(new ro(h,p,i.tree,-s,o.from>=h||o.openStart,o.to<=p||o.openEnd)),g)break;h=f[d].to}}else n.push(new ro(l,c,i.tree,-s,o.from>=s||o.openStart,o.to<=a||o.openEnd))}return n}class Gd{constructor(e,n,r,i,o,s,a,l,c,u=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new Gd(e,[],n,r,r,0,[],0,i?new Jw(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=this.reducePos<this.pos-25;s&&this.setLookAhead(this.pos);let a=o.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<o.minRepeatTerm||e&131072){let h=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=o.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0){let a=!1;for(let l=s;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new Gd(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new VB(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((a,l)=>l&1&&a==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let l=s&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(s,o+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new Jw(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Jw{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class VB{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Yd{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Yd(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Yd(this.stack,this.pos,this.index)}}function hc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class rd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Kw=new rd;class ZB{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Kw,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Kw,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Na{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;x5(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Na.prototype.contextual=Na.prototype.fallback=Na.prototype.extend=!1;class Hd{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?hc(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,s=e.resolveOffset(1,1);if(x5(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,s==null)break;e.reset(s,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Hd.prototype.contextual=Na.prototype.fallback=Na.prototype.extend=!1;class yr{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function x5(t,e,n,r,i,o){let s=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;a&t[s];){let c=t[s+1];for(let h=s+3;h<c;h+=2)if((t[h+1]&a)>0){let g=t[h];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||WB(g,e.token.value,i,o))){e.acceptToken(g);break}}let u=e.next,f=0,d=t[s+2];if(e.next<0&&d>f&&t[c+d*3-3]==65535){s=t[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,g=c+h+(h<<1),p=t[g],v=t[g+1]||65536;if(u<p)d=h;else if(u>=v)f=h+1;else{s=t[g+2],e.advance();continue e}}break}}function eS(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function WB(t,e,n,r){let i=eS(n,r,e);return i<0||eS(n,r,t)<i}const ar=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let v0=null;function tS(t,e,n){let r=t.cursor(At.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class XB{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?tS(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?tS(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof Gt){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let l=o.prop(Xe.lookAhead);if(!l||a+l<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}}class UB{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new rd)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<o.length;c++){if(!(1<<c&s))continue;let u=o[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=s||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=s,f.context=a),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(r=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new rd,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new rd,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let l=0;l<2;l++)for(let c=s.stateSlot(o,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=Hi(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(Hi(a,c+2),n,r,i));break}a[c]==n&&(i=this.putAction(Hi(a,c+1),n,r,i))}return i}}class GB{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new ZB(n,i),this.tokens=new UB(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[Gd.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new XB(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],o=[]),i.push(a);let l=this.tokens.getMainToken(a);o.push(l.value,l.end)}}break}}if(!r.length){let s=i&&HB(i);if(s)return ar&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw ar&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return ar&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,l)=>l.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let a=r[s];for(let l=s+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=ar?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?o.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(Xe.contextHash)||0)==u))return e.useNode(f,d),ar&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(f.type.id)})`),!0;if(!(f instanceof Gt)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof Gt&&f.positions[0]==0)f=h;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),ar&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],d=l[c++],h=c==l.length||!r,g=h?e:e.split(),p=this.tokens.mainToken;if(g.apply(u,f,p?p.start:g.pos,d),ar&&console.log(s+this.stackID(g)+` (via ${u&65536?`reduce of ${o.getName(u&65535)}`:"shift"} for ${o.getName(f)} @ ${i}${g==e?"":", split"})`),h)return!0;g.pos>i?n.push(g):r.push(g)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return nS(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],l=n[s<<1],c=n[(s<<1)+1],u=ar?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),ar&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let f=a.split(),d=u;for(let h=0;f.forceReduce()&&h<10&&(ar&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)ar&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))ar&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),ar&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),nS(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),Gt.build({buffer:Yd.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(v0||(v0=new WeakMap)).get(e);return n||v0.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function nS(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class YB{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const x0=t=>t;class nO{constructor(e){this.start=e.start,this.shift=e.shift||x0,this.reduce=e.reduce||x0,this.reuse=e.reuse||x0,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class zo extends v5{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function o(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Xe[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)o(u,l,a[c++]);else{let f=a[c+-u];for(let d=-u;d>0;d--)o(a[c++],l,f);c++}}}this.nodeSet=new Jx(n.map((a,l)=>Wn.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=d5;let s=hc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(rS),this.states=hc(e.states,Uint32Array),this.data=hc(e.stateData),this.goto=hc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Na(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new GB(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],a=s&1,l=i[o++];if(a&&r)return l;for(let c=o+(s>>1);o<c;o++)if(i[o]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=Hi(r,o+2)];else{if(r[o+1]==2)return Hi(r,o+2);break}if(s==n||s==0)return Hi(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Hi(this.data,o+2);else break;i=n(Hi(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Hi(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(zo.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(a=>a.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=rS(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new YB(e,r,i)}static deserialize(e){return new zo(e)}}function Hi(t,e){return t[e]|t[e+1]<<16}function HB(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function rS(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let qB=0,qi=class dv{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=qB++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof dv&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new dv(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new qd(e);return r=>r.modified.indexOf(n)>-1?r:qd.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},JB=0;class qd{constructor(e){this.name=e,this.instances=[],this.id=JB++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&KB(n,a.modified));if(r)return r;let i=[],o=new qi(e.name,i,e,n);for(let a of n)a.instances.push(o);let s=eQ(n);for(let a of e.set)if(!a.modified.length)for(let l of s)i.push(qd.get(a,l));return o}}function KB(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function eQ(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Al(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){s=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(o.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){s=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Jd(r,s,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return O5.add(e)}const O5=new Xe;class Jd{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Jd.empty=new Jd([],2,null);function y5(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let l of a.set){let c=n[l.id];if(c){s=s?s+" "+c:c;break}}return s},scope:r}}function tQ(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function nQ(t,e,n,r=0,i=t.length){let o=new rQ(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class rQ{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:a,to:l}=e;if(a>=r||l<=n)return;s.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(s)));let c=i,u=iQ(e)||Jd.empty,f=tQ(o,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(Xe.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),g=this.highlighters.filter(v=>!v.scope||v.scope(d.tree.type)),p=e.firstChild();for(let v=0,x=a;;v++){let O=v<d.overlay.length?d.overlay[v]:null,y=O?O.from+a:l,w=Math.max(n,x),b=Math.min(r,y);if(w<b&&p)for(;e.from<b&&(this.highlightRange(e,w,b,i,o),this.startSpan(Math.min(b,e.to),c),!(e.to>=y||!e.nextSibling())););if(!O||y>r)break;x=O.to+a,x>n&&(this.highlightRange(h.cursor(),Math.max(n,O.from+a),Math.min(r,x),"",g),this.startSpan(Math.min(r,x),c))}p&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function iQ(t){let e=t.type.prop(O5);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const be=qi.define,sf=be(),Ao=be(),iS=be(Ao),oS=be(Ao),Po=be(),af=be(Po),O0=be(Po),gi=be(),gs=be(gi),fi=be(),di=be(),hv=be(),Ul=be(hv),lf=be(),B={comment:sf,lineComment:be(sf),blockComment:be(sf),docComment:be(sf),name:Ao,variableName:be(Ao),typeName:iS,tagName:be(iS),propertyName:oS,attributeName:be(oS),className:be(Ao),labelName:be(Ao),namespace:be(Ao),macroName:be(Ao),literal:Po,string:af,docString:be(af),character:be(af),attributeValue:be(af),number:O0,integer:be(O0),float:be(O0),bool:be(Po),regexp:be(Po),escape:be(Po),color:be(Po),url:be(Po),keyword:fi,self:be(fi),null:be(fi),atom:be(fi),unit:be(fi),modifier:be(fi),operatorKeyword:be(fi),controlKeyword:be(fi),definitionKeyword:be(fi),moduleKeyword:be(fi),operator:di,derefOperator:be(di),arithmeticOperator:be(di),logicOperator:be(di),bitwiseOperator:be(di),compareOperator:be(di),updateOperator:be(di),definitionOperator:be(di),typeOperator:be(di),controlOperator:be(di),punctuation:hv,separator:be(hv),bracket:Ul,angleBracket:be(Ul),squareBracket:be(Ul),paren:be(Ul),brace:be(Ul),content:gi,heading:gs,heading1:be(gs),heading2:be(gs),heading3:be(gs),heading4:be(gs),heading5:be(gs),heading6:be(gs),contentSeparator:be(gi),list:be(gi),quote:be(gi),emphasis:be(gi),strong:be(gi),link:be(gi),monospace:be(gi),strikethrough:be(gi),inserted:be(),deleted:be(),changed:be(),invalid:be(),meta:lf,documentMeta:be(lf),annotation:be(lf),processingInstruction:be(lf),definition:qi.defineModifier("definition"),constant:qi.defineModifier("constant"),function:qi.defineModifier("function"),standard:qi.defineModifier("standard"),local:qi.defineModifier("local"),special:qi.defineModifier("special")};for(let t in B){let e=B[t];e instanceof qi&&(e.name=t)}y5([{tag:B.link,class:"tok-link"},{tag:B.heading,class:"tok-heading"},{tag:B.emphasis,class:"tok-emphasis"},{tag:B.strong,class:"tok-strong"},{tag:B.keyword,class:"tok-keyword"},{tag:B.atom,class:"tok-atom"},{tag:B.bool,class:"tok-bool"},{tag:B.url,class:"tok-url"},{tag:B.labelName,class:"tok-labelName"},{tag:B.inserted,class:"tok-inserted"},{tag:B.deleted,class:"tok-deleted"},{tag:B.literal,class:"tok-literal"},{tag:B.string,class:"tok-string"},{tag:B.number,class:"tok-number"},{tag:[B.regexp,B.escape,B.special(B.string)],class:"tok-string2"},{tag:B.variableName,class:"tok-variableName"},{tag:B.local(B.variableName),class:"tok-variableName tok-local"},{tag:B.definition(B.variableName),class:"tok-variableName tok-definition"},{tag:B.special(B.variableName),class:"tok-variableName2"},{tag:B.definition(B.propertyName),class:"tok-propertyName tok-definition"},{tag:B.typeName,class:"tok-typeName"},{tag:B.namespace,class:"tok-namespace"},{tag:B.className,class:"tok-className"},{tag:B.macroName,class:"tok-macroName"},{tag:B.propertyName,class:"tok-propertyName"},{tag:B.operator,class:"tok-operator"},{tag:B.comment,class:"tok-comment"},{tag:B.meta,class:"tok-meta"},{tag:B.invalid,class:"tok-invalid"},{tag:B.punctuation,class:"tok-punctuation"}]);const oQ=Al({String:B.string,Number:B.number,"True False":B.bool,PropertyName:B.propertyName,Null:B.null,",":B.separator,"[ ]":B.squareBracket,"{ }":B.brace}),sQ=zo.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[oQ],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let pv=[],b5=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?b5:pv).push(n=n+t[e])})();function aQ(t){if(t<768)return!1;for(let e=0,n=pv.length;;){let r=e+n>>1;if(t<pv[r])n=r;else if(t>=b5[r])e=r+1;else return!0;if(e==n)return!1}}function sS(t){return t>=127462&&t<=127487}const aS=8205;function lQ(t,e,n=!0,r=!0){return(n?w5:cQ)(t,e,r)}function w5(t,e,n){if(e==t.length)return e;e&&S5(t.charCodeAt(e))&&C5(t.charCodeAt(e-1))&&e--;let r=y0(t,e);for(e+=lS(r);e<t.length;){let i=y0(t,e);if(r==aS||i==aS||n&&aQ(i))e+=lS(i),r=i;else if(sS(i)){let o=0,s=e-2;for(;s>=0&&sS(y0(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function cQ(t,e,n){for(;e>0;){let r=w5(t,e-2,n);if(r<e)return r;e--}return 0}function y0(t,e){let n=t.charCodeAt(e);if(!C5(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return S5(r)?(n-55296<<10)+(r-56320)+65536:n}function S5(t){return t>=56320&&t<57344}function C5(t){return t>=55296&&t<56320}function lS(t){return t<65536?1:2}class rt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=rl(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),wi.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=rl(this,e,n);let r=[];return this.decompose(e,n,r,0),wi.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Ac(this),o=new Ac(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Ac(this,e)}iterRange(e,n=this.length){return new k5(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new A5(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?rt.empty:e.length<=32?new Lt(e):wi.from(Lt.split(e,[]))}}class Lt extends rt{constructor(e,n=uQ(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new fQ(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Lt(cS(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=id(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new Lt(a,s.length+o.length));else{let l=a.length>>1;r.push(new Lt(a.slice(0,l)),new Lt(a.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Lt))return super.replace(e,n,r);[e,n]=rl(this,e,n);let i=id(this.text,id(r.text,cS(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Lt(i,o):wi.from(Lt.split(i,[]),o)}sliceString(e,n=this.length,r=`
171
171
  `){[e,n]=rl(this,e,n);let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let a=this.text[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new Lt(r,i)),r=[],i=-1);return i>-1&&n.push(new Lt(r,i)),n}}class wi extends rt{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.children[o],a=i+s.length,l=r+s.lines-1;if((n?l:a)>=e)return s.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let a=this.children[o],l=s+a.length;if(e<=l&&n>=s){let c=i&((s<=e?1:0)|(l>=n?2:0));s>=e&&l<=n&&!c?r.push(a):a.decompose(e-s,n-s,r,c)}s=l+1}}replace(e,n,r){if([e,n]=rl(this,e,n),r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e>=o&&n<=a){let l=s.replace(e-o,n-o,r),c=this.lines-s.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new wi(u,this.length-(n-e)+r.length)}return super.replace(o,a,l)}o=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
172
172
  `){[e,n]=rl(this,e,n);let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let a=this.children[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.sliceString(e-s,n-s,r)),s=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof wi))return 0;let r=0,[i,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==a)return r;let l=this.children[i],c=e.children[o];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let g of e)g.flatten(h);return new Lt(h,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,a=[],l=0,c=-1,u=[];function f(h){let g;if(h.lines>o&&h instanceof wi)for(let p of h.children)f(p);else h.lines>s&&(l>s||!l)?(d(),a.push(h)):h instanceof Lt&&l&&(g=u[u.length-1])instanceof Lt&&h.lines+g.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new Lt(g.text.concat(h.text),g.length+1+h.length)):(l+h.lines>i&&d(),l+=h.lines,c+=h.length+1,u.push(h))}function d(){l!=0&&(a.push(u.length==1?u[0]:wi.from(u,c)),c=-1,l=u.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new wi(a,n)}}rt.empty=new Lt([""],0);function uQ(t){let e=-1;for(let n of t)e+=n.length+1;return e}function id(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let a=t[o],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(e[e.length-1]+=a,s=!1):e.push(a)),i=l+1}return e}function cS(t,e,n){return id(t,[""],e,n)}class Ac{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Lt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],s=o>>1,a=i instanceof Lt?i.text.length:i.children.length;if(s==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
173
- `,this;e--}else if(i instanceof Lt){let l=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Lt?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class k5{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Ac(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class A5{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(rt.prototype[Symbol.iterator]=function(){return this.iter()},Ac.prototype[Symbol.iterator]=k5.prototype[Symbol.iterator]=A5.prototype[Symbol.iterator]=function(){return this});let fQ=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}};function rl(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Sn(t,e,n=!0,r=!0){return lQ(t,e,n,r)}function dQ(t){return t>=56320&&t<57344}function hQ(t){return t>=55296&&t<56320}function Jn(t,e){let n=t.charCodeAt(e);if(!hQ(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return dQ(r)?(n-55296<<10)+(r-56320)+65536:n}function rO(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Si(t){return t<65536?1:2}const gv=/\r\n?|\n/;var wn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(wn||(wn={}));class ji{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){mv(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new ji(e)}composeDesc(e){return this.empty?e:e.empty?this:P5(this,e)}mapDesc(e,n=!1){return e.empty?this:vv(this,e,n)}mapPos(e,n=-1,r=wn.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],l=this.sections[s++],c=i+a;if(l<0){if(c>e)return o+(e-i);o+=a}else{if(r!=wn.Simple&&c>=e&&(r==wn.TrackDel&&i<e&&c>e||r==wn.TrackBefore&&i<e||r==wn.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==i||n<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ji(e)}static create(e){return new ji(e)}}class an extends ji{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return mv(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return vv(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let l=i>>1;for(;r.length<l;)r.push(rt.empty);r.push(s?e.slice(o,o+s):rt.empty)}o+=s}return new an(n,r)}compose(e){return this.empty?e:e.empty?this:P5(this,e,!0)}map(e,n=!1){return e.empty?this:vv(this,e,n,!0)}iterChanges(e,n=!1){mv(this,e,n)}get desc(){return ji.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new Zc(this);e:for(let s=0,a=0;;){let l=s==e.length?1e9:e[s++];for(;a<l||a==l&&o.len==0;){if(o.done)break e;let u=Math.min(o.len,l-a);_n(i,u,-1);let f=o.ins==-1?-1:o.off==0?o.ins:0;_n(n,u,f),f>0&&_o(r,n,o.text),o.forward(u),a+=u}let c=e[s++];for(;a<c;){if(o.done)break e;let u=Math.min(o.len,c-a);_n(n,u,-1),_n(i,u,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(u),a+=u}}return{changes:new an(n,r),filtered:ji.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function l(u=!1){if(!u&&!i.length)return;s<n&&_n(i,n-s,-1);let f=new an(i,o);a=a?a.compose(f.map(a)):f,i=[],o=[],s=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof an){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:h}=u;if(f>d||f<0||d>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let g=h?typeof h=="string"?rt.of(h.split(r||gv)):h:rt.empty,p=g.length;if(f==d&&p==0)return;f<s&&l(),f>s&&_n(i,f-s,-1),_n(i,d-f,p),_o(o,i,g),s=d}}return c(e),l(!a),a}static empty(e){return new an(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(rt.empty);r[i]=rt.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new an(n,r)}static createSet(e,n){return new an(e,n)}}function _n(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function _o(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(rt.empty);t.push(n)}}function mv(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)i+=a,o+=a;else{let c=i,u=o,f=rt.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(i,c,o,u,f),i=c,o=u}}}function vv(t,e,n,r=!1){let i=[],o=r?[]:null,s=new Zc(t),a=new Zc(e);for(let l=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&a.ins==-1){let c=Math.min(s.len,a.len);_n(i,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let c=a.len;for(_n(i,a.ins,-1);c;){let u=Math.min(s.len,c);s.ins>=0&&l<s.i&&s.len<=u&&(_n(i,0,s.ins),o&&_o(o,i,s.text),l=s.i),s.forward(u),c-=u}a.next()}else if(s.ins>=0){let c=0,u=s.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;_n(i,c,l<s.i?s.ins:0),o&&l<s.i&&_o(o,i,s.text),l=s.i,s.forward(s.len-u)}else{if(s.done&&a.done)return o?an.createSet(i,o):ji.create(i);throw new Error("Mismatched change set lengths")}}}function P5(t,e,n=!1){let r=[],i=n?[]:null,o=new Zc(t),s=new Zc(e);for(let a=!1;;){if(o.done&&s.done)return i?an.createSet(r,i):ji.create(r);if(o.ins==0)_n(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)_n(r,0,s.ins,a),i&&_o(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,s.len),c=r.length;if(o.ins==-1){let u=s.ins==-1?-1:s.off?0:s.ins;_n(r,l,u,a),i&&u&&_o(i,r,s.text)}else s.ins==-1?(_n(r,o.off?0:o.len,l,a),i&&_o(i,r,o.textBit(l))):(_n(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&_o(i,r,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||r.length>c),o.forward2(l),s.forward(l)}}}}class Zc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?rt.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?rt.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}let cf=class xv{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new xv(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ge.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ge.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ge.range(e.anchor,e.head)}static create(e,n,r){return new xv(e,n,r)}};class ge{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ge.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ge([this.main],0)}addRange(e,n=!0){return ge.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,ge.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ge(e.ranges.map(n=>cf.fromJSON(n)),e.main)}static single(e,n=e){return new ge([ge.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return ge.normalized(e.slice(),n);r=o.to}return new ge(e,n)}static cursor(e,n=0,r,i){return cf.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?cf.create(n,e,48|o):cf.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,l=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?ge.range(l,a):ge.range(a,l))}}return new ge(e,n)}}function E5(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let iO=0;class we{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=iO++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new we(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:oO),!!e.static,e.enables)}of(e){return new od([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new od(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new od(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function oO(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class od{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=iO++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:(((n=e[f.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[f.id]);return{create(f){return f.values[s]=r(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||Ov(f,u)){let h=r(f);if(a?!uS(h,f.values[s],i):!i(h,f.values[s]))return f.values[s]=h,1}return 0},reconfigure:(f,d)=>{let h,g=d.config.address[o];if(g!=null){let p=eh(d,g);if(this.dependencies.every(v=>v instanceof we?d.facet(v)===f.facet(v):v instanceof cn?d.field(v,!1)==f.field(v,!1):!0)||(a?uS(h=r(f),p,i):i(h=r(f),p)))return f.values[s]=p,0}else h=r(f);return f.values[s]=h,1}}}}function uS(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function Ov(t,e){let n=!1;for(let r of e)Pc(t,r)&1&&(n=!0);return n}function pQ(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=eh(l,r[u]);if(i[u]==2)for(let d of f)c.push(d);else c.push(f)}return e.combine(c)}return{create(l){for(let c of r)Pc(l,c);return l.values[s]=a(l),1},update(l,c){if(!Ov(l,o))return 0;let u=a(l);return e.compare(u,l.values[s])?0:(l.values[s]=u,1)},reconfigure(l,c){let u=Ov(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&oO(n,f))return l.values[s]=d,0;let h=a(l);return e.compare(h,d)?(l.values[s]=d,0):(l.values[s]=h,1)}}}const uf=we.define({static:!0});class cn{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new cn(iO++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(uf).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>{let o=r.facet(uf),s=i.facet(uf),a;return(a=o.find(l=>l.field==this))&&a!=s.find(l=>l.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,uf.of({field:this,create:e})]}get extension(){return this}}const Os={lowest:4,low:3,default:2,high:1,highest:0};function Gl(t){return e=>new I5(e,t)}const Fi={highest:Gl(Os.highest),high:Gl(Os.high),default:Gl(Os.default),low:Gl(Os.low),lowest:Gl(Os.lowest)};class I5{constructor(e,n){this.inner=e,this.prec=n}}class pp{of(e){return new yv(this,e)}reconfigure(e){return pp.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class yv{constructor(e,n){this.compartment=e,this.inner=n}}class Kd{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let d of gQ(e,n,s))d instanceof cn?i.push(d):(o[d.facet.id]||(o[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=r==null?void 0:r.config.facets;for(let d in o){let h=o[d],g=h[0].facet,p=u&&u[d]||[];if(h.every(v=>v.type==0))if(a[g.id]=l.length<<1|1,oO(p,h))l.push(r.facet(g));else{let v=g.combine(h.map(x=>x.value));l.push(r&&g.compare(v,r.facet(g))?r.facet(g):v)}else{for(let v of h)v.type==0?(a[v.id]=l.length<<1|1,l.push(v.value)):(a[v.id]=c.length<<1,c.push(x=>v.dynamicSlot(x)));a[g.id]=c.length<<1,c.push(v=>pQ(v,g,h))}}let f=c.map(d=>d(a));return new Kd(e,s,f,a,l,o)}}function gQ(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let l=i.get(s);if(l!=null){if(l<=a)return;let c=r[l].indexOf(s);c>-1&&r[l].splice(c,1),s instanceof yv&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let c of s)o(c,a);else if(s instanceof yv){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(s.compartment)||s.inner;n.set(s.compartment,c),o(c,a)}else if(s instanceof I5)o(s.inner,s.prec);else if(s instanceof cn)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof od)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,Os.default);else{let c=s.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,a)}}return o(t,Os.default),r.reduce((s,a)=>s.concat(a))}function Pc(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function eh(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const T5=we.define(),bv=we.define({combine:t=>t.some(e=>e),static:!0}),_5=we.define({combine:t=>t.length?t[0]:void 0,static:!0}),j5=we.define(),$5=we.define(),D5=we.define(),R5=we.define({combine:t=>t.length?t[0]:!1});class zi{constructor(e,n){this.type=e,this.value=n}static define(){return new mQ}}class mQ{of(e){return new zi(this,e)}}class vQ{constructor(e){this.map=e}of(e){return new Ne(this,e)}}class Ne{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ne(this.type,n)}is(e){return this.type==e}static define(e={}){return new vQ(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}Ne.reconfigure=Ne.define();Ne.appendConfig=Ne.define();class Yt{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&E5(r,n.newLength),o.some(a=>a.type==Yt.time)||(this.annotations=o.concat(Yt.time.of(Date.now())))}static create(e,n,r,i,o,s){return new Yt(e,n,r,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Yt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Yt.time=zi.define();Yt.userEvent=zi.define();Yt.addToHistory=zi.define();Yt.remote=zi.define();function xQ(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function M5(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=an.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Ne.mapEffects(t.effects,i).concat(Ne.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function wv(t,e,n){let r=e.selection,i=Ba(e.annotations);return e.userEvent&&(i=i.concat(Yt.userEvent.of(e.userEvent))),{changes:e.changes instanceof an?e.changes:an.of(e.changes||[],n,t.facet(_5)),selection:r&&(r instanceof ge?r:ge.single(r.anchor,r.head)),effects:Ba(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function N5(t,e,n){let r=wv(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=M5(r,wv(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=Yt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return yQ(n?OQ(i):i)}function OQ(t){let e=t.startState,n=!0;for(let i of e.facet(j5)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:xQ(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=an.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=Yt.create(e,i,t.selection&&t.selection.map(o),Ne.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet($5);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof Yt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Yt?t=o[0]:t=N5(e,Ba(o),!1)}return t}function yQ(t){let e=t.startState,n=e.facet(D5),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=M5(r,wv(e,o,t.changes.newLength),!0))}return r==t?t:Yt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const bQ=[];function Ba(t){return t==null?bQ:Array.isArray(t)?t:[t]}var jt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(jt||(jt={}));const wQ=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Sv;try{Sv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function SQ(t){if(Sv)return Sv.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||wQ.test(n)))return!0}return!1}function CQ(t){return e=>{if(!/\S/.test(e))return jt.Space;if(SQ(e))return jt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return jt.Word;return jt.Other}}class He{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Pc(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Pc(this,r),eh(this,r)}update(...e){return N5(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(pp.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,c)=>i.set(c,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(Ne.reconfigure)?(n=null,r=a.value):a.is(Ne.appendConfig)&&(n=null,r=Ba(r).concat(a.value));let o;n?o=e.startState.values.slice():(n=Kd.resolve(r,i,this),o=new He(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let s=e.startState.facet(bv)?e.newSelection:e.newSelection.asSingle();new He(n,e.newDoc,s,o,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ge.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=Ba(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)o[d]=o[d].map(u);let f=i.mapDesc(c,!0);o.push(l.range.map(f)),i=i.compose(u),s=Ne.mapEffects(s,u).concat(Ne.mapEffects(Ba(l.effects),f))}return{changes:i,selection:ge.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof an?e:an.of(e,this.doc.length,this.facet(He.lineSeparator))}toText(e){return rt.of(e.split(this.facet(He.lineSeparator)||gv))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Pc(this,n),eh(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof cn&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(l=>s.spec.fromJSON(a,l)))}}return He.create({doc:e.doc,selection:ge.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Kd.resolve(e.extensions||[],new Map),r=e.doc instanceof rt?e.doc:rt.of((e.doc||"").split(n.staticFacet(He.lineSeparator)||gv)),i=e.selection?e.selection instanceof ge?e.selection:ge.single(e.selection.anchor,e.selection.head):ge.single(0);return E5(i,r.length),n.staticFacet(bv)||(i=i.asSingle()),new He(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(He.tabSize)}get lineBreak(){return this.facet(He.lineSeparator)||`
173
+ `,this;e--}else if(i instanceof Lt){let l=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Lt?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class k5{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Ac(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class A5{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(rt.prototype[Symbol.iterator]=function(){return this.iter()},Ac.prototype[Symbol.iterator]=k5.prototype[Symbol.iterator]=A5.prototype[Symbol.iterator]=function(){return this});let fQ=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}};function rl(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Sn(t,e,n=!0,r=!0){return lQ(t,e,n,r)}function dQ(t){return t>=56320&&t<57344}function hQ(t){return t>=55296&&t<56320}function Jn(t,e){let n=t.charCodeAt(e);if(!hQ(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return dQ(r)?(n-55296<<10)+(r-56320)+65536:n}function rO(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Si(t){return t<65536?1:2}const gv=/\r\n?|\n/;var wn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(wn||(wn={}));class ji{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){mv(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new ji(e)}composeDesc(e){return this.empty?e:e.empty?this:P5(this,e)}mapDesc(e,n=!1){return e.empty?this:vv(this,e,n)}mapPos(e,n=-1,r=wn.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],l=this.sections[s++],c=i+a;if(l<0){if(c>e)return o+(e-i);o+=a}else{if(r!=wn.Simple&&c>=e&&(r==wn.TrackDel&&i<e&&c>e||r==wn.TrackBefore&&i<e||r==wn.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==i||n<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ji(e)}static create(e){return new ji(e)}}class an extends ji{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return mv(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return vv(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let l=i>>1;for(;r.length<l;)r.push(rt.empty);r.push(s?e.slice(o,o+s):rt.empty)}o+=s}return new an(n,r)}compose(e){return this.empty?e:e.empty?this:P5(this,e,!0)}map(e,n=!1){return e.empty?this:vv(this,e,n,!0)}iterChanges(e,n=!1){mv(this,e,n)}get desc(){return ji.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new Zc(this);e:for(let s=0,a=0;;){let l=s==e.length?1e9:e[s++];for(;a<l||a==l&&o.len==0;){if(o.done)break e;let u=Math.min(o.len,l-a);_n(i,u,-1);let f=o.ins==-1?-1:o.off==0?o.ins:0;_n(n,u,f),f>0&&_o(r,n,o.text),o.forward(u),a+=u}let c=e[s++];for(;a<c;){if(o.done)break e;let u=Math.min(o.len,c-a);_n(n,u,-1),_n(i,u,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(u),a+=u}}return{changes:new an(n,r),filtered:ji.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function l(u=!1){if(!u&&!i.length)return;s<n&&_n(i,n-s,-1);let f=new an(i,o);a=a?a.compose(f.map(a)):f,i=[],o=[],s=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof an){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:h}=u;if(f>d||f<0||d>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let g=h?typeof h=="string"?rt.of(h.split(r||gv)):h:rt.empty,p=g.length;if(f==d&&p==0)return;f<s&&l(),f>s&&_n(i,f-s,-1),_n(i,d-f,p),_o(o,i,g),s=d}}return c(e),l(!a),a}static empty(e){return new an(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(rt.empty);r[i]=rt.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new an(n,r)}static createSet(e,n){return new an(e,n)}}function _n(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function _o(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(rt.empty);t.push(n)}}function mv(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)i+=a,o+=a;else{let c=i,u=o,f=rt.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(i,c,o,u,f),i=c,o=u}}}function vv(t,e,n,r=!1){let i=[],o=r?[]:null,s=new Zc(t),a=new Zc(e);for(let l=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&a.ins==-1){let c=Math.min(s.len,a.len);_n(i,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let c=a.len;for(_n(i,a.ins,-1);c;){let u=Math.min(s.len,c);s.ins>=0&&l<s.i&&s.len<=u&&(_n(i,0,s.ins),o&&_o(o,i,s.text),l=s.i),s.forward(u),c-=u}a.next()}else if(s.ins>=0){let c=0,u=s.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;_n(i,c,l<s.i?s.ins:0),o&&l<s.i&&_o(o,i,s.text),l=s.i,s.forward(s.len-u)}else{if(s.done&&a.done)return o?an.createSet(i,o):ji.create(i);throw new Error("Mismatched change set lengths")}}}function P5(t,e,n=!1){let r=[],i=n?[]:null,o=new Zc(t),s=new Zc(e);for(let a=!1;;){if(o.done&&s.done)return i?an.createSet(r,i):ji.create(r);if(o.ins==0)_n(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)_n(r,0,s.ins,a),i&&_o(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let l=Math.min(o.len2,s.len),c=r.length;if(o.ins==-1){let u=s.ins==-1?-1:s.off?0:s.ins;_n(r,l,u,a),i&&u&&_o(i,r,s.text)}else s.ins==-1?(_n(r,o.off?0:o.len,l,a),i&&_o(i,r,o.textBit(l))):(_n(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&_o(i,r,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||r.length>c),o.forward2(l),s.forward(l)}}}}class Zc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?rt.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?rt.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}let cf=class xv{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new xv(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ge.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ge.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ge.range(e.anchor,e.head)}static create(e,n,r){return new xv(e,n,r)}};class ge{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ge.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ge([this.main],0)}addRange(e,n=!0){return ge.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,ge.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ge(e.ranges.map(n=>cf.fromJSON(n)),e.main)}static single(e,n=e){return new ge([ge.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return ge.normalized(e.slice(),n);r=o.to}return new ge(e,n)}static cursor(e,n=0,r,i){return cf.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?cf.create(n,e,48|o):cf.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,l=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?ge.range(l,a):ge.range(a,l))}}return new ge(e,n)}}function E5(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let iO=0;class we{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=iO++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new we(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:oO),!!e.static,e.enables)}of(e){return new od([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new od(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new od(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function oO(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class od{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=iO++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:((n=e[f.id])!==null&&n!==void 0?n:1)&1||u.push(e[f.id]);return{create(f){return f.values[s]=r(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||Ov(f,u)){let h=r(f);if(a?!uS(h,f.values[s],i):!i(h,f.values[s]))return f.values[s]=h,1}return 0},reconfigure:(f,d)=>{let h,g=d.config.address[o];if(g!=null){let p=eh(d,g);if(this.dependencies.every(v=>v instanceof we?d.facet(v)===f.facet(v):v instanceof cn?d.field(v,!1)==f.field(v,!1):!0)||(a?uS(h=r(f),p,i):i(h=r(f),p)))return f.values[s]=p,0}else h=r(f);return f.values[s]=h,1}}}}function uS(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function Ov(t,e){let n=!1;for(let r of e)Pc(t,r)&1&&(n=!0);return n}function pQ(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=eh(l,r[u]);if(i[u]==2)for(let d of f)c.push(d);else c.push(f)}return e.combine(c)}return{create(l){for(let c of r)Pc(l,c);return l.values[s]=a(l),1},update(l,c){if(!Ov(l,o))return 0;let u=a(l);return e.compare(u,l.values[s])?0:(l.values[s]=u,1)},reconfigure(l,c){let u=Ov(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&oO(n,f))return l.values[s]=d,0;let h=a(l);return e.compare(h,d)?(l.values[s]=d,0):(l.values[s]=h,1)}}}const uf=we.define({static:!0});class cn{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new cn(iO++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(uf).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>{let o=r.facet(uf),s=i.facet(uf),a;return(a=o.find(l=>l.field==this))&&a!=s.find(l=>l.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,uf.of({field:this,create:e})]}get extension(){return this}}const Os={lowest:4,low:3,default:2,high:1,highest:0};function Gl(t){return e=>new I5(e,t)}const Fi={highest:Gl(Os.highest),high:Gl(Os.high),default:Gl(Os.default),low:Gl(Os.low),lowest:Gl(Os.lowest)};class I5{constructor(e,n){this.inner=e,this.prec=n}}class pp{of(e){return new yv(this,e)}reconfigure(e){return pp.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class yv{constructor(e,n){this.compartment=e,this.inner=n}}class Kd{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let d of gQ(e,n,s))d instanceof cn?i.push(d):(o[d.facet.id]||(o[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=r==null?void 0:r.config.facets;for(let d in o){let h=o[d],g=h[0].facet,p=u&&u[d]||[];if(h.every(v=>v.type==0))if(a[g.id]=l.length<<1|1,oO(p,h))l.push(r.facet(g));else{let v=g.combine(h.map(x=>x.value));l.push(r&&g.compare(v,r.facet(g))?r.facet(g):v)}else{for(let v of h)v.type==0?(a[v.id]=l.length<<1|1,l.push(v.value)):(a[v.id]=c.length<<1,c.push(x=>v.dynamicSlot(x)));a[g.id]=c.length<<1,c.push(v=>pQ(v,g,h))}}let f=c.map(d=>d(a));return new Kd(e,s,f,a,l,o)}}function gQ(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let l=i.get(s);if(l!=null){if(l<=a)return;let c=r[l].indexOf(s);c>-1&&r[l].splice(c,1),s instanceof yv&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let c of s)o(c,a);else if(s instanceof yv){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(s.compartment)||s.inner;n.set(s.compartment,c),o(c,a)}else if(s instanceof I5)o(s.inner,s.prec);else if(s instanceof cn)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof od)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,Os.default);else{let c=s.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,a)}}return o(t,Os.default),r.reduce((s,a)=>s.concat(a))}function Pc(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function eh(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const T5=we.define(),bv=we.define({combine:t=>t.some(e=>e),static:!0}),_5=we.define({combine:t=>t.length?t[0]:void 0,static:!0}),j5=we.define(),$5=we.define(),D5=we.define(),R5=we.define({combine:t=>t.length?t[0]:!1});class zi{constructor(e,n){this.type=e,this.value=n}static define(){return new mQ}}class mQ{of(e){return new zi(this,e)}}class vQ{constructor(e){this.map=e}of(e){return new Ne(this,e)}}class Ne{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ne(this.type,n)}is(e){return this.type==e}static define(e={}){return new vQ(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}Ne.reconfigure=Ne.define();Ne.appendConfig=Ne.define();class Yt{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&E5(r,n.newLength),o.some(a=>a.type==Yt.time)||(this.annotations=o.concat(Yt.time.of(Date.now())))}static create(e,n,r,i,o,s){return new Yt(e,n,r,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Yt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Yt.time=zi.define();Yt.userEvent=zi.define();Yt.addToHistory=zi.define();Yt.remote=zi.define();function xQ(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function M5(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=an.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Ne.mapEffects(t.effects,i).concat(Ne.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function wv(t,e,n){let r=e.selection,i=Ba(e.annotations);return e.userEvent&&(i=i.concat(Yt.userEvent.of(e.userEvent))),{changes:e.changes instanceof an?e.changes:an.of(e.changes||[],n,t.facet(_5)),selection:r&&(r instanceof ge?r:ge.single(r.anchor,r.head)),effects:Ba(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function N5(t,e,n){let r=wv(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=M5(r,wv(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=Yt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return yQ(n?OQ(i):i)}function OQ(t){let e=t.startState,n=!0;for(let i of e.facet(j5)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:xQ(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=an.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=Yt.create(e,i,t.selection&&t.selection.map(o),Ne.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet($5);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof Yt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Yt?t=o[0]:t=N5(e,Ba(o),!1)}return t}function yQ(t){let e=t.startState,n=e.facet(D5),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=M5(r,wv(e,o,t.changes.newLength),!0))}return r==t?t:Yt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const bQ=[];function Ba(t){return t==null?bQ:Array.isArray(t)?t:[t]}var jt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(jt||(jt={}));const wQ=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Sv;try{Sv=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function SQ(t){if(Sv)return Sv.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||wQ.test(n)))return!0}return!1}function CQ(t){return e=>{if(!/\S/.test(e))return jt.Space;if(SQ(e))return jt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return jt.Word;return jt.Other}}class He{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Pc(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Pc(this,r),eh(this,r)}update(...e){return N5(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(pp.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,c)=>i.set(c,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(Ne.reconfigure)?(n=null,r=a.value):a.is(Ne.appendConfig)&&(n=null,r=Ba(r).concat(a.value));let o;n?o=e.startState.values.slice():(n=Kd.resolve(r,i,this),o=new He(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let s=e.startState.facet(bv)?e.newSelection:e.newSelection.asSingle();new He(n,e.newDoc,s,o,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ge.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=Ba(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)o[d]=o[d].map(u);let f=i.mapDesc(c,!0);o.push(l.range.map(f)),i=i.compose(u),s=Ne.mapEffects(s,u).concat(Ne.mapEffects(Ba(l.effects),f))}return{changes:i,selection:ge.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof an?e:an.of(e,this.doc.length,this.facet(He.lineSeparator))}toText(e){return rt.of(e.split(this.facet(He.lineSeparator)||gv))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Pc(this,n),eh(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof cn&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(l=>s.spec.fromJSON(a,l)))}}return He.create({doc:e.doc,selection:ge.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Kd.resolve(e.extensions||[],new Map),r=e.doc instanceof rt?e.doc:rt.of((e.doc||"").split(n.staticFacet(He.lineSeparator)||gv)),i=e.selection?e.selection instanceof ge?e.selection:ge.single(e.selection.anchor,e.selection.head):ge.single(0);return E5(i,r.length),n.staticFacet(bv)||(i=i.asSingle()),new He(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(He.tabSize)}get lineBreak(){return this.facet(He.lineSeparator)||`
174
174
  `}get readOnly(){return this.facet(R5)}phrase(e,...n){for(let r of this.facet(He.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(T5))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return CQ(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let l=Sn(n,s,!1);if(o(n.slice(l,s))!=jt.Word)break;s=l}for(;a<i;){let l=Sn(n,a);if(o(n.slice(a,l))!=jt.Word)break;a=l}return s==a?null:ge.range(s+r,a+r)}}He.allowMultipleSelections=bv;He.tabSize=we.define({combine:t=>t.length?t[0]:4});He.lineSeparator=_5;He.readOnly=R5;He.phrases=we.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});He.languageData=T5;He.changeFilter=j5;He.transactionFilter=$5;He.transactionExtender=D5;pp.reconfigure=Ne.define();function Li(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=r[o];if(a===void 0)r[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class $s{eq(e){return this==e}range(e,n=e){return Cv.create(e,n,this)}}$s.prototype.startSide=$s.prototype.endSide=0;$s.prototype.point=!1;$s.prototype.mapMode=wn.TrackDel;let Cv=class B5{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new B5(e,n,r)}};function kv(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class sO{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let l=s+a>>1,c=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,f=this.to[l]+e,d,h;if(u==f){let g=n.mapPos(u,c.startSide,c.mapMode);if(g==null||(d=h=g,c.startSide!=c.endSide&&(h=n.mapPos(u,c.endSide),h<d)))continue}else if(d=n.mapPos(u,c.startSide),h=n.mapPos(f,c.endSide),d>h||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(s<0&&(s=d),c.point&&(a=Math.max(a,h-d)),r.push(c),i.push(d-s),o.push(h-s))}return{mapped:r.length?new sO(i,o,r,a):null,pos:s}}}class it{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new it(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(kv)),this.isEmpty)return n.length?it.of(n):this;let a=new Q5(this,null,-1).goto(0),l=0,c=[],u=new co;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let f=n[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(Cv.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?it.empty:this.nextLayer.update({add:c,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],l=this.chunk[s],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:f}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),n.push(u),r.push(f))}}let o=this.nextLayer.map(e);return n.length==0?o:new it(r,n,o||it.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Wc.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Wc.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),a=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o),l=fS(s,a,r),c=new Yl(s,l,o),u=new Yl(a,l,o);r.iterGaps((f,d,h)=>dS(c,f,u,d,h,i)),r.empty&&r.length==0&&dS(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),s=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=fS(o,s),l=new Yl(o,a,0).goto(r),c=new Yl(s,a,0).goto(r);for(;;){if(l.to!=c.to||!Av(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,o=-1){let s=new Yl(e,null,o).goto(n),a=n,l=s.openStart;for(;;){let c=Math.min(s.to,r);if(s.point){let u=s.activeForPoint(s.to),f=s.pointFrom<n?u.length+1:s.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,s.point,u,f,s.pointRank),l=Math.min(s.openEnd(c),u.length)}else c>a&&(i.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>r)return l+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new co;for(let i of e instanceof Cv?[e]:n?kQ(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return it.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=it.empty;i=i.nextLayer)n=new it(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}it.empty=new it([],[],null,-1);function kQ(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(kv(e,r)>0)return t.slice().sort(kv);e=r}return t}it.empty.nextLayer=it.empty;class co{finishChunk(e){this.chunks.push(new sO(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new co)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(it.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=it.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function fS(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=r.get(o.chunk[s]);a!=null&&(n?n.mapPos(a):a)==o.chunkPos[s]&&!(n!=null&&n.touchesRange(a,a+o.chunk[s].length))&&i.add(o.chunk[s])}return i}class Q5{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Wc{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new Q5(s,n,r,o));return i.length==1?i[0]:new Wc(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)b0(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)b0(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),b0(this.heap,0)}}}function b0(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Yl{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Wc.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){ff(this.active,e),ff(this.activeTo,e),ff(this.activeRank,e),this.minActive=hS(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&(o-this.activeRank[n]||i-this.activeTo[n])>0;)n++;df(this.active,n,r),df(this.activeTo,n,i),df(this.activeRank,n,o),e&&df(e,n,this.cursor.from),this.minActive=hS(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&ff(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function dS(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,a=r,l=r-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,f=u<0?t.to+l:n.to,d=Math.min(f,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Av(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,d,t.point,n.point):d>a&&!Av(t.active,n.active)&&o.compareRange(a,d,t.active,n.active),f>s)break;(c||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(f),a=f,u<=0&&t.next(),u>=0&&n.next()}}function Av(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function ff(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function df(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function hS(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Pl(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Sn(t,i));return r}function Pv(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Sn(t,i)}return r===!0?-1:t.length}const Ev="ͼ",pS=typeof Symbol>"u"?"__"+Ev:Symbol.for(Ev),Iv=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),gS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Lo{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,l,c){let u=[],f=/^@(\w+)\b/.exec(s[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(s[0]+";");for(let h in a){let g=a[h];if(/&/.test(h))o(h.split(/,\s*/).map(p=>s.map(v=>p.replace(/&/,v))).reduce((p,v)=>p.concat(v)),g,l);else if(g&&typeof g=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),g,u,d)}else g!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,p=>"-"+p.toLowerCase())+": "+g+";")}(u.length||d)&&l.push((r&&!f&&!c?s.map(r):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
175
175
  `)}static newName(){let e=gS[pS]||1;return gS[pS]=e+1,Ev+e.toString(36)}static mount(e,n,r){let i=e[Iv],o=r&&r.nonce;i?o&&i.setNonce(o):i=new AQ(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let mS=new Map;class AQ{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=mS.get(r);if(o)return e[Iv]=o;this.sheet=new i.CSSStyleSheet,mS.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Iv]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],l=this.modules.indexOf(a);if(l<o&&l>-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,a),r)for(let c=0;c<a.rules.length;c++)r.insertRule(a.rules[c],i++)}else{for(;o<l;)i+=this.modules[o++].rules.length;i+=a.rules.length,o++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let s="";for(let l=0;l<this.modules.length;l++)s+=this.modules[l].getRules()+`
176
176
  `;this.styleTag.textContent=s;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Vo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Xc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},PQ=typeof navigator<"u"&&/Mac/.test(navigator.platform),EQ=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var bn=0;bn<10;bn++)Vo[48+bn]=Vo[96+bn]=String(bn);for(var bn=1;bn<=24;bn++)Vo[bn+111]="F"+bn;for(var bn=65;bn<=90;bn++)Vo[bn]=String.fromCharCode(bn+32),Xc[bn]=String.fromCharCode(bn);for(var w0 in Vo)Xc.hasOwnProperty(w0)||(Xc[w0]=Vo[w0]);function IQ(t){var e=PQ&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||EQ&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Xc:Vo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Uc(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Tv(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function sd(t,e){if(!e.anchorNode)return!1;try{return Tv(t,e.anchorNode)}catch{return!1}}function il(t){return t.nodeType==3?Rs(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Ec(t,e,n,r){return n?vS(t,e,n,r,-1)||vS(t,e,n,r,1):!1}function Ds(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function th(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function vS(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Ni(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=Ds(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Ni(t):0}else return!1}}function Ni(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function xu(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function TQ(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function F5(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function _Q(t,e,n,r,i,o,s,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,g=1,p=1;if(h)d=TQ(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:g,scaleY:p}=F5(u,O)),d={left:O.left,right:O.left+u.clientWidth*g,top:O.top,bottom:O.top+u.clientHeight*p}}let v=0,x=0;if(i=="nearest")e.top<d.top?(x=e.top-(d.top+s),n>0&&e.bottom>d.bottom+x&&(x=e.bottom-d.bottom+s)):e.bottom>d.bottom&&(x=e.bottom-d.bottom+s,n<0&&e.top-x<d.top&&(x=e.top-(d.top+s)));else{let O=e.bottom-e.top,y=d.bottom-d.top;x=(i=="center"&&O<=y?e.top+O/2-y/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-y+s)-d.top}if(r=="nearest"?e.left<d.left?(v=e.left-(d.left+o),n>0&&e.right>d.right+v&&(v=e.right-d.right+o)):e.right>d.right&&(v=e.right-d.right+o,n<0&&e.left<d.left+v&&(v=e.left-(d.left+o))):v=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-o:e.right-(d.right-d.left)+o)-d.left,v||x)if(h)c.scrollBy(v,x);else{let O=0,y=0;if(x){let w=u.scrollTop;u.scrollTop+=x/p,y=(u.scrollTop-w)*p}if(v){let w=u.scrollLeft;u.scrollLeft+=v/g,O=(u.scrollLeft-w)*g}e={left:e.left-O,top:e.top-y,right:e.right-O,bottom:e.bottom-y},O&&Math.abs(O-v)<1&&(r="nearest"),y&&Math.abs(y-x)<1&&(i="nearest")}if(h)break;(e.top<d.top||e.bottom>d.bottom||e.left<d.left||e.right>d.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function jQ(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class $Q{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Ni(n):0),r,Math.min(e.focusOffset,r?Ni(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let oa=null;function z5(t){if(t.setActive)return t.setActive();if(oa)return t.focus(oa);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(oa==null?{get preventScroll(){return oa={preventScroll:!0},!0}}:void 0),!oa){oa=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let xS;function Rs(t,e,n=e){let r=xS||(xS=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Qa(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function DQ(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function L5(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function RQ(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Ni(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Ni(n))}else{if(n==t)return!0;r=Ds(n),n=n.parentNode}}function V5(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function Z5(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ni(n)}else if(n.parentNode&&!th(n))r=Ds(n),n=n.parentNode;else return null}}function W5(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!th(n))r=Ds(n)+1,n=n.parentNode;else return null}}class jn{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new jn(e.parentNode,Ds(e),n)}static after(e,n){return new jn(e.parentNode,Ds(e)+1,n)}}const aO=[];class Ct{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let a=Ct.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=OS(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=OS(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=Ni(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!Ct.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,a=-1;for(let l=0,c=r,u=r;l<this.children.length;l++){let f=this.children[l],d=c+f.length;if(c<e&&d>n)return f.domBoundsAround(e,n,c);if(d>=e&&i==-1&&(i=l,o=c),c>n&&f.dom.parentNode==this.dom){s=l,a=u;break}u=d,c=d+f.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=aO){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&r.indexOf(o)<0&&o.destroy()}r.length<250?this.children.splice(e,n-e,...r):this.children=[].concat(this.children.slice(0,e),r,this.children.slice(n));for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new X5(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Ct.prototype.breakAfter=0;function OS(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class X5{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function U5(t,e,n,r,i,o,s,a,l){let{children:c}=t,u=c.length?c[e]:null,f=o.length?o[o.length-1]:null,d=f?f.breakAfter:s;if(!(e==r&&u&&!s&&!d&&o.length<2&&u.merge(n,i,o.length?f:null,n==0,a,l))){if(r<c.length){let h=c[r];h&&(i<h.length||h.breakAfter&&(f!=null&&f.breakAfter))?(e==r&&(h=h.split(i),i=0),!d&&f&&h.merge(0,i,f,!0,0,l)?o[o.length-1]=h:((i||h.children.length&&!h.children[0].length)&&h.merge(0,i,null,!1,0,l),o.push(h))):h!=null&&h.breakAfter&&(f?f.breakAfter=1:s=1),r++}for(u&&(u.breakAfter=s,n>0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&u.children[u.children.length-1].length==0)&&u.merge(n,u.length,null,!1,a,0),e++));e<r&&o.length;)if(c[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else if(c[e].become(o[0]))e++,o.shift(),a=o.length?0:l;else break;!o.length&&e&&r<c.length&&!c[e-1].breakAfter&&c[r].merge(0,0,c[e-1],!1,a,l)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function G5(t,e,n,r,i,o){let s=t.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:u}=s.findPos(e,-1),f=e-n;for(let d of r)f+=d.length;t.length+=f,U5(t,c,u,a,l,r,0,i,o)}let Kn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},_v=typeof document<"u"?document:{documentElement:{style:{}}};const jv=/Edge\/(\d+)/.exec(Kn.userAgent),Y5=/MSIE \d/.test(Kn.userAgent),$v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Kn.userAgent),gp=!!(Y5||$v||jv),yS=!gp&&/gecko\/(\d+)/i.test(Kn.userAgent),S0=!gp&&/Chrome\/(\d+)/.exec(Kn.userAgent),bS="webkitFontSmoothing"in _v.documentElement.style,H5=!gp&&/Apple Computer/.test(Kn.vendor),wS=H5&&(/Mobile\/\w+/.test(Kn.userAgent)||Kn.maxTouchPoints>2);var Se={mac:wS||/Mac/.test(Kn.platform),windows:/Win/.test(Kn.platform),linux:/Linux|X11/.test(Kn.platform),ie:gp,ie_version:Y5?_v.documentMode||6:$v?+$v[1]:jv?+jv[1]:0,gecko:yS,gecko_version:yS?+(/Firefox\/(\d+)/.exec(Kn.userAgent)||[0,0])[1]:0,chrome:!!S0,chrome_version:S0?+S0[1]:0,ios:wS,android:/Android\b/.test(Kn.userAgent),webkit:bS,safari:H5,webkit_version:bS?+(/\bAppleWebKit\/(\d+)/.exec(Kn.userAgent)||[0,0])[1]:0,tabSize:_v.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const MQ=256;class qr extends Ct{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof qr)||this.length-(n-e)+r.length>MQ||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new qr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new jn(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return NQ(this.dom,e,n)}}class uo extends Ct{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(L5(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,s){return r&&(!(r instanceof uo&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(G5(this,e,n,r?r.children.slice():[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let a of this.children){let l=r+a.length;l>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=o),r=l,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new uo(this.mark,n,s)}domAtPos(e){return q5(this,e)}coordsAt(e,n){return K5(this,e,n)}}function NQ(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?Se.chrome||Se.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=Rs(t,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];return Se.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),s?xu(l,s<0):l||null}class jo extends Ct{static create(e,n,r){return new jo(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=jo.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,s){return r&&(!(r instanceof jo)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof jo&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return rt.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):rt.empty}domAtPos(e){return(this.length?e==0:this.side>0)?jn.before(this.dom):jn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return xu(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ol extends Ct{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof ol&&e.side==this.side}split(){return new ol(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?jn.before(this.dom):jn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return rt.empty}get isHidden(){return!0}}qr.prototype.children=jo.prototype.children=ol.prototype.children=aO;function q5(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new jn(n,0)}function J5(t,e,n){let r,{children:i}=t;n>0&&e instanceof uo&&i.length&&(r=i[i.length-1])instanceof uo&&r.mark.eq(e.mark)?J5(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function K5(t,e,n){let r=null,i=-1,o=null,s=-1;function a(c,u){for(let f=0,d=0;f<c.children.length&&d<=u;f++){let h=c.children[f],g=d+h.length;g>=u&&(h.children.length?a(h,u-d):(!o||o.isHidden&&(n>0||QQ(o,h)))&&(g>u||d==g&&h.getSide()>0)?(o=h,s=u-d):(d<u||d==g&&h.getSide()<0&&!h.isHidden)&&(r=h,i=u-d)),d=g}}a(t,e);let l=(n<0?r:o)||r||o;return l?l.coordsAt(Math.max(0,l==r?i:s),n):BQ(t)}function BQ(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=il(e);return n[n.length-1]||null}function QQ(t,e){let n=t.coordsAt(0,1),r=e.coordsAt(0,1);return n&&r&&r.top<n.bottom}function Dv(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const SS=Object.create(null);function nh(t,e,n){if(t==e)return!0;t||(t=SS),e||(e=SS);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function Rv(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function FQ(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class Vi{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Ln=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Ln||(Ln={}));class Ae extends $s{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Ou(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Zo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=e4(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new Zo(e,r,i,n,e.widget||null,!0)}static line(e){return new yu(e)}static set(e,n=!1){return it.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ae.none=it.empty;class Ou extends Ae{constructor(e){let{start:n,end:r}=e4(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Ou&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&nh(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Ou.prototype.point=!1;class yu extends Ae{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof yu&&this.spec.class==e.spec.class&&nh(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}yu.prototype.mapMode=wn.TrackBefore;yu.prototype.point=!0;class Zo extends Ae{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?wn.TrackBefore:wn.TrackAfter:wn.TrackDel}get type(){return this.startSide!=this.endSide?Ln.WidgetRange:this.startSide<=0?Ln.WidgetBefore:Ln.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Zo&&zQ(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Zo.prototype.point=!0;function e4(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function zQ(t,e){return t==e||!!(t&&e&&t.compare(e))}function ad(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Wt extends Ct{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof Wt))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),G5(this,e,n,r?r.children.slice():[],o,s),!0}split(e){let n=new Wt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){nh(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){J5(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=Dv(n,this.attrs||{})),r&&(this.attrs=Dv({class:r},this.attrs||{}))}domAtPos(e){return q5(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(L5(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Rv(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&Ct.get(i)instanceof uo;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=Ct.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Se.ios||!this.children.some(o=>o instanceof qr))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof qr)||/[^ -~]/.test(r.text))return null;let i=il(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=K5(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return e instanceof Wt&&this.children.length==0&&e.children.length==0&&nh(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof Wt)return o;if(s>n)break}i=s+o.breakAfter}return null}}class io extends Ct{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof io)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?jn.before(this.dom):jn.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new io(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return aO}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):rt.empty}domBoundsAround(){return null}become(e){return e instanceof io&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);return r||(this.widget instanceof Mv?null:xu(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class Mv extends Vi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Ic{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof io&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Wt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(hf(new ol(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof io)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(hf(new qr(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Zo){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof Zo)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new io(r.widget||sl.block,a,r));else{let l=jo.create(r.widget||sl.inline,a,a?0:r.startSide),c=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e<n||r.startSide>0),u=!l.isEditable&&(e<n||o>i.length||r.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(f.append(hf(new ol(1),i),o),o=i.length+Math.max(0,o-i.length)),f.append(hf(l,i),o),this.atCursorPos=u,this.pendingBuffer=u?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let s=new Ic(e,n,r,o);return s.openEnd=it.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function hf(t,e){for(let n of e)t=new uo(n,[t],t.length);return t}class sl extends Vi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}sl.inline=new sl("span");sl.block=new sl("div");var It=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(It||(It={}));const Ms=It.LTR,lO=It.RTL;function t4(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const LQ=t4("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),VQ=t4("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Nv=Object.create(null),hi=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);Nv[e]=n,Nv[n]=-e}function n4(t){return t<=247?LQ[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?VQ[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const ZQ=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class $o{get dir(){return this.level%2?lO:Ms}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==r)return s;(o<0||(i!=0?i<0?a.from<n:a.to>n:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function r4(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!r4(r.inner,i.inner))return!1}return!0}const bt=[];function WQ(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:n,l=o?256:i;for(let c=s,u=l,f=l;c<a;c++){let d=n4(t.charCodeAt(c));d==512?d=u:d==8&&f==4&&(d=16),bt[c]=d==4?2:d,d&7&&(f=d),u=d}for(let c=s,u=l,f=l;c<a;c++){let d=bt[c];if(d==128)c<a-1&&u==bt[c+1]&&u&24?d=bt[c]=u:bt[c]=256;else if(d==64){let h=c+1;for(;h<a&&bt[h]==64;)h++;let g=c&&u==8||h<n&&bt[h]==8?f==1?1:8:256;for(let p=c;p<h;p++)bt[p]=g;c=h-1}else d==8&&f==1&&(bt[c]=1);u=d,d&7&&(f=d)}}}function XQ(t,e,n,r,i){let o=i==1?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let c=s?r[s-1].to:e,u=s<r.length?r[s].from:n;for(let f=c,d,h,g;f<u;f++)if(h=Nv[d=t.charCodeAt(f)])if(h<0){for(let p=a-3;p>=0;p-=3)if(hi[p+1]==-h){let v=hi[p+2],x=v&2?i:v&4?v&1?o:i:0;x&&(bt[f]=bt[hi[p]]=x),a=p;break}}else{if(hi.length==189)break;hi[a++]=f,hi[a++]=d,hi[a++]=l}else if((g=bt[f])==2||g==1){let p=g==i;l=p?0:1;for(let v=a-3;v>=0;v-=3){let x=hi[v+2];if(x&2)break;if(p)hi[v+2]|=2;else{if(x&4)break;hi[v+2]|=4}}}}}function UQ(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=s;l<a;){let c=bt[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==n.length)break;u=n[i++].to,a=i<n.length?n[i].from:e}else if(bt[u]==256)u++;else break;let f=o==1,d=(u<e?bt[u]:r)==1,h=f==d?f?1:2:r;for(let g=u,p=i,v=p?n[p-1].to:t;g>l;)g==v&&(g=n[--p].from,v=p?n[p-1].to:t),bt[--g]=h;l=u}else o=c,l++}}}function Bv(t,e,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<n;){let u=!0,f=!1;if(c==o.length||l<o[c].from){let p=bt[l];p!=a&&(u=!1,f=p==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,g=l;e:for(;;)if(c<o.length&&g==o[c].from){if(f)break e;let p=o[c];if(!u)for(let v=p.to,x=c+1;;){if(v==n)break e;if(x<o.length&&o[x].from==v)v=o[x++].to;else{if(bt[v]==a)break e;break}}if(c++,d)d.push(p);else{p.from>l&&s.push(new $o(l,p.from,h));let v=p.direction==Ms!=!(h%2);Qv(t,v?r+1:r,i,p.inner,p.from,p.to,s),l=p.to}g=p.to}else{if(g==n||(u?bt[g]!=a:bt[g]==a))break;g++}d?Bv(t,l,g,r+1,i,d,s):l<g&&s.push(new $o(l,g,h)),l=g}else for(let l=n,c=o.length;l>e;){let u=!0,f=!1;if(!c||l>o[c-1].to){let p=bt[l-1];p!=a&&(u=!1,f=p==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,g=l;e:for(;;)if(c&&g==o[c-1].to){if(f)break e;let p=o[--c];if(!u)for(let v=p.from,x=c;;){if(v==e)break e;if(x&&o[x-1].to==v)v=o[--x].from;else{if(bt[v-1]==a)break e;break}}if(d)d.push(p);else{p.to<l&&s.push(new $o(p.to,l,h));let v=p.direction==Ms!=!(h%2);Qv(t,v?r+1:r,i,p.inner,p.from,p.to,s),l=p.from}g=p.from}else{if(g==e||(u?bt[g-1]!=a:bt[g-1]==a))break;g--}d?Bv(t,g,l,r+1,i,d,s):g<l&&s.push(new $o(g,l,h)),l=g}}function Qv(t,e,n,r,i,o,s){let a=e%2?2:1;WQ(t,i,o,r,a),XQ(t,i,o,r,a),UQ(i,o,r,a),Bv(t,i,o,e,n,r,s)}function GQ(t,e,n){if(!t)return[new $o(0,0,e==lO?1:0)];if(e==Ms&&!n.length&&!ZQ.test(t))return i4(t.length);if(n.length)for(;t.length>bt.length;)bt[bt.length]=256;let r=[],i=e==Ms?0:1;return Qv(t,i,i,n,0,t.length,r),r}function i4(t){return[new $o(0,t,0)]}let o4="";function YQ(t,e,n,r,i){var o;let s=r.head-t.from,a=$o.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[a],c=l.side(i,n);if(s==c){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],s=l.side(!i,n),c=l.side(i,n)}let u=Sn(t.text,s,l.forward(i,n));(u<l.from||u>l.to)&&(u=c),o4=t.text.slice(Math.min(s,u),Math.max(s,u));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<l.level?ge.cursor(f.side(!i,n)+t.from,f.forward(i,n)?1:-1,f.level):ge.cursor(u+t.from,l.forward(i,n)?-1:1,l.level)}function HQ(t,e,n){for(let r=e;r<n;r++){let i=n4(t.charCodeAt(r));if(i==1)return Ms;if(i==2||i==4)return lO}return Ms}const s4=we.define(),a4=we.define(),l4=we.define(),c4=we.define(),Fv=we.define(),u4=we.define(),f4=we.define(),cO=we.define(),uO=we.define(),d4=we.define({combine:t=>t.some(e=>e)}),h4=we.define({combine:t=>t.some(e=>e)}),p4=we.define();class Fa{constructor(e,n="nearest",r="nearest",i=5,o=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new Fa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Fa(ge.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const pf=Ne.define({map:(t,e)=>t.map(e)}),g4=Ne.define();function Fn(t,e,n){let r=t.facet(c4);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Ki=we.define({combine:t=>t.length?t[0]:!0});let qQ=0;const pc=we.define();class $t{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:s}=n||{};return new $t(qQ++,e,r,i,a=>{let l=[pc.of(a)];return s&&l.push(Gc.of(c=>{let u=c.plugin(a);return u?s(u):Ae.none})),o&&l.push(o(a)),l})}static fromClass(e,n){return $t.define(r=>new e(r),n)}}class C0{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Fn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Fn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Fn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const m4=we.define(),fO=we.define(),Gc=we.define(),v4=we.define(),dO=we.define(),x4=we.define();function CS(t,e){let n=t.state.facet(x4);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return it.spans(r,e.from,e.to,{point(){},span(o,s,a,l){let c=o-e.from,u=s-e.from,f=i;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,g;if(h==null&&(h=HQ(e.text,c,u)),l>0&&f.length&&(g=f[f.length-1]).to==c&&g.direction==h)g.to=u,f=g.inner;else{let p={from:c,to:u,direction:h,inner:[]};f.push(p),f=p.inner}}}}),i}const O4=we.define();function hO(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(O4)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const gc=we.define();class Rr{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Rr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,a=0;;i++){let l=i==e.length?null:e[i],c=s-a,u=l?l.fromB:1e9;for(;o<n.length&&n[o]<u;){let f=n[o],d=n[o+1],h=Math.max(a,f),g=Math.min(u,d);if(h<=g&&new Rr(h+c,g+c,h,g).addToSet(r),d>u)break;o+=2}if(!l)return r;new Rr(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),s=l.toA,a=l.toB}}}class rh{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=an.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,l)=>i.push(new Rr(o,s,a,l))),this.changedRanges=i}static create(e,n,r){return new rh(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class kS extends Ct{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ae.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Wt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Rr(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:c,toA:u})=>u<this.minWidthFrom||c>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!iF(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?KQ(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;r=new Rr(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Se.ie||Se.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=nF(s,a,e.changes);return r=Rr.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Se.chrome||Se.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof io&&s.widget instanceof Mv&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:l,toA:c,fromB:u,toB:f}=a,d,h,g,p;if(r&&r.range.fromB<f&&r.range.toB>u){let w=Ic.build(this.view.state.doc,u,r.range.fromB,this.decorations,this.dynamicDecorationMap),b=Ic.build(this.view.state.doc,r.range.toB,f,this.decorations,this.dynamicDecorationMap);h=w.breakAtStart,g=w.openStart,p=b.openEnd;let S=this.compositionView(r);b.breakAtStart?S.breakAfter=1:b.content.length&&S.merge(S.length,S.length,b.content[0],!1,b.openStart,0)&&(S.breakAfter=b.content[0].breakAfter,b.content.shift()),w.content.length&&S.merge(0,0,w.content[w.content.length-1],!0,0,w.openEnd)&&w.content.pop(),d=w.content.concat(S).concat(b.content)}else({content:d,breakAtStart:h,openStart:g,openEnd:p}=Ic.build(this.view.state.doc,u,f,this.decorations,this.dynamicDecorationMap));let{i:v,off:x}=o.findPos(c,1),{i:O,off:y}=o.findPos(l,-1);U5(this,O,y,v,x,d,h,g,p)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(g4)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new qr(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new uo(i,[n],n.length);let r=new Wt;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=Ct.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(Ki)||this.dom.tabIndex>-1)&&sd(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),c=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(Se.gecko&&a.empty&&!this.hasComposition&&JQ(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=c=new jn(f,0),s=!0}let u=this.view.observer.selectionRange;(s||!u.focusNode||(!Ec(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Ec(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))&&(this.view.observer.ignore(()=>{Se.android&&Se.chrome&&this.dom.contains(u.focusNode)&&rF(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Uc(this.view.root);if(f)if(a.empty){if(Se.gecko){let d=eF(l.node,l.offset);if(d&&d!=3){let h=(d==1?Z5:W5)(l.node,l.offset);h&&(l=new jn(h.node,h.offset))}}f.collapse(l.node,l.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(c.node,c.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([l,c]=[c,l]),d.setEnd(c.node,c.offset),d.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(d)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new jn(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new jn(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Ec(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Uc(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=Wt.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=Ct.get(n.childNodes[i]);o instanceof Wt&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=Ct.get(n.childNodes[i]);o instanceof Wt&&(r=o.domAtPos(o.length))}return r?new jn(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=Ct.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof Wt)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],l=o-a.breakAfter,c=l-a.length;if(l<e)break;if(c<=e&&(c<e||a.covers(-1))&&(l>e||a.covers(1))&&(!r||a instanceof Wt&&!(r instanceof Wt&&n>=0)))r=a,i=c;else if(r&&c==e&&l==e&&a instanceof io&&Math.abs(n)<2){if(a.deco.startSide<0)break;s&&(r=null)}o=c}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof Wt))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=l}if(!(i instanceof qr))return null;let o=Sn(i.text,r);if(o==r)return null;let s=Rs(i.dom,r,o).getClientRects();for(let a=0;a<s.length;a++){let l=s[a];if(a==s.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==It.LTR;for(let c=0,u=0;u<this.children.length;u++){let f=this.children[u],d=c+f.length;if(d>i)break;if(c>=r){let h=f.dom.getBoundingClientRect();if(n.push(h.height),s){let g=f.dom.lastChild,p=g?il(g):[];if(p.length){let v=p[p.length-1],x=l?v.right-h.left:h.right-v.left;x>a&&(a=x,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=d)}}}c=d+f.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?It.RTL:It.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Wt){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=il(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new X5(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(Ae.replace({widget:new Mv(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return Ae.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Gc).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(v4).map((o,s)=>{let a=typeof o=="function";return a&&(r=!0),a?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(it.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(p4))try{if(c(this.view,e.range,e))return!0}catch(u){Fn(this.view.state,u,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=hO(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;_Q(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==It.LTR)}}function JQ(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function y4(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=Z5(n.focusNode,n.focusOffset),i=W5(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let a=Ct.get(i.node);if(!a||a instanceof qr&&a.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let l=Ct.get(r.node);!l||l instanceof qr&&l.text!=r.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}function KQ(t,e,n){let r=y4(t,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,c=new Rr(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let f=i.parentNode;;f=f.parentNode){let d=Ct.get(f);if(d instanceof uo)u.push({node:f,deco:d.mark});else{if(d instanceof Wt||f.nodeName=="DIV"&&f.parentNode==t.contentDOM)return{range:c,text:i,marks:u,line:f};if(f!=t.contentDOM)u.push({node:f,deco:new Ou({inclusive:!0,attributes:FQ(f),tagName:f.tagName.toLowerCase()})});else return null}}}function eF(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let tF=class{constructor(){this.changes=[]}compareRange(e,n){ad(e,n,this.changes)}comparePoint(e,n){ad(e,n,this.changes)}boundChange(e){ad(e,e,this.changes)}};function nF(t,e,n){let r=new tF;return it.compare(t,e,n,r),r.changes}function rF(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function iF(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function oF(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return ge.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Sn(i.text,o,!1):a=Sn(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let c=Sn(i.text,s,!1);if(r(i.text.slice(c,s))!=l)break;s=c}for(;a<i.length;){let c=Sn(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return ge.range(s+i.from,a+i.from)}function sF(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function aF(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function k0(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function AS(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function PS(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function zv(t,e,n){let r,i,o,s,a=!1,l,c,u,f;for(let g=t.firstChild;g;g=g.nextSibling){let p=il(g);for(let v=0;v<p.length;v++){let x=p[v];i&&k0(i,x)&&(x=AS(PS(x,i.bottom),i.top));let O=sF(e,x),y=aF(n,x);if(O==0&&y==0)return g.nodeType==3?ES(g,e,n):zv(g,e,n);if(!r||s>y||s==y&&o>O){r=g,i=x,o=O,s=y;let w=y?n<x.top?-1:1:O?e<x.left?-1:1:0;a=!w||(w>0?v<p.length-1:v>0)}O==0?n>x.bottom&&(!u||u.bottom<x.bottom)?(l=g,u=x):n<x.top&&(!f||f.top>x.top)&&(c=g,f=x):u&&k0(u,x)?u=PS(u,x.bottom):f&&k0(f,x)&&(f=AS(f,x.top))}}if(u&&u.bottom>=n?(r=l,i=u):f&&f.top<=n&&(r=c,i=f),!r)return{node:t,offset:0};let d=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return ES(r,d,n);if(a&&r.contentEditable!="false")return zv(r,d,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function ES(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let l=Rs(t,a,a+1).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(u.top==u.bottom)continue;s||(s=e-u.left);let f=(u.top>n?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&f<o){let d=e>=(u.left+u.right)/2,h=d;if((Se.chrome||Se.gecko)&&Rs(t,a).getBoundingClientRect().left==u.right&&(h=!d),f<=0)return{node:t,offset:a+(h?1:0)};i=a+(h?1:0),o=f}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function b4(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:f}=e,d=f-a;if(d<0)return 0;if(d>c)return t.state.doc.length;for(let w=t.viewState.heightOracle.textHeight/2,b=!1;l=t.elementAtHeight(d),l.type!=Ln.Text;)for(;d=r>0?l.bottom+w:l.top-w,!(d>=0&&d<=c);){if(b)return n?null:0;b=!0,r=-r}f=a+d;let h=l.from;if(h<t.viewport.from)return t.viewport.from==0?0:n?null:IS(t,s,l,u,f);if(h>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:IS(t,s,l,u,f);let g=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:g,v=p.elementFromPoint(u,f);v&&!t.contentDOM.contains(v)&&(v=null),v||(u=Math.max(s.left+1,Math.min(s.right-1,u)),v=p.elementFromPoint(u,f),v&&!t.contentDOM.contains(v)&&(v=null));let x,O=-1;if(v&&((i=t.docView.nearest(v))===null||i===void 0?void 0:i.isEditable)!=!1){if(g.caretPositionFromPoint){let w=g.caretPositionFromPoint(u,f);w&&({offsetNode:x,offset:O}=w)}else if(g.caretRangeFromPoint){let w=g.caretRangeFromPoint(u,f);w&&({startContainer:x,startOffset:O}=w,(!t.contentDOM.contains(x)||Se.safari&&lF(x,O,u)||Se.chrome&&cF(x,O,u))&&(x=void 0))}x&&(O=Math.min(Ni(x),O))}if(!x||!t.docView.dom.contains(x)){let w=Wt.find(t.docView,h);if(!w)return d>l.top+l.height/2?l.to:l.from;({node:x,offset:O}=zv(w.dom,u,f))}let y=t.docView.nearest(x);if(!y)return null;if(y.isWidget&&((o=y.dom)===null||o===void 0?void 0:o.nodeType)==1){let w=y.dom.getBoundingClientRect();return e.y<w.top||e.y<=w.bottom&&e.x<=(w.left+w.right)/2?y.posAtStart:y.posAtEnd}else return y.localPosFromDOM(x,O)+y.posAtStart}function IS(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);o+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+Pv(s,o,t.state.tabSize)}function lF(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return Rs(t,r-1,r).getBoundingClientRect().left>n}function cF(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():Rs(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function Lv(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==Ln.Text))return r}return n}function uF(t,e,n,r){let i=Lv(t,e.head),o=!r||i.type!=Ln.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(a==It.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(l!=null)return ge.cursor(l,n?-1:1)}return ge.cursor(n?i.to:i.from,n?-1:1)}function TS(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,l=null;;){let c=YQ(i,o,s,a,n),u=o4;if(!c){if(i.number==(n?t.state.doc.lines:1))return a;u=`
@@ -495,7 +495,7 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js
495
495
  JSZip uses the library pako released under the MIT license :
496
496
  https://github.com/nodeca/pako/blob/main/LICENSE
497
497
  */(function(t,e){(function(n){t.exports=n()})(function(){return function n(r,i,o){function s(c,u){if(!i[c]){if(!r[c]){var f=typeof dc=="function"&&dc;if(!u&&f)return f(c,!0);if(a)return a(c,!0);var d=new Error("Cannot find module '"+c+"'");throw d.code="MODULE_NOT_FOUND",d}var h=i[c]={exports:{}};r[c][0].call(h.exports,function(g){var p=r[c][1][g];return s(p||g)},h,h.exports,n,r,i,o)}return i[c].exports}for(var a=typeof dc=="function"&&dc,l=0;l<o.length;l++)s(o[l]);return s}({1:[function(n,r,i){var o=n("./utils"),s=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var c,u,f,d,h,g,p,v=[],x=0,O=l.length,y=O,w=o.getTypeOf(l)!=="string";x<l.length;)y=O-x,f=w?(c=l[x++],u=x<O?l[x++]:0,x<O?l[x++]:0):(c=l.charCodeAt(x++),u=x<O?l.charCodeAt(x++):0,x<O?l.charCodeAt(x++):0),d=c>>2,h=(3&c)<<4|u>>4,g=1<y?(15&u)<<2|f>>6:64,p=2<y?63&f:64,v.push(a.charAt(d)+a.charAt(h)+a.charAt(g)+a.charAt(p));return v.join("")},i.decode=function(l){var c,u,f,d,h,g,p=0,v=0,x="data:";if(l.substr(0,x.length)===x)throw new Error("Invalid base64 input, it looks like a data url.");var O,y=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&y--,l.charAt(l.length-2)===a.charAt(64)&&y--,y%1!=0)throw new Error("Invalid base64 input, bad content length.");for(O=s.uint8array?new Uint8Array(0|y):new Array(0|y);p<l.length;)c=a.indexOf(l.charAt(p++))<<2|(d=a.indexOf(l.charAt(p++)))>>4,u=(15&d)<<4|(h=a.indexOf(l.charAt(p++)))>>2,f=(3&h)<<6|(g=a.indexOf(l.charAt(p++))),O[v++]=c,h!==64&&(O[v++]=u),g!==64&&(O[v++]=f);return O}},{"./support":30,"./utils":32}],2:[function(n,r,i){var o=n("./external"),s=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),l=n("./stream/DataLengthProbe");function c(u,f,d,h,g){this.compressedSize=u,this.uncompressedSize=f,this.crc32=d,this.compression=h,this.compressedContent=g}c.prototype={getContentWorker:function(){var u=new s(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),f=this;return u.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new s(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,f,d){return u.pipe(new a).pipe(new l("uncompressedSize")).pipe(f.compressWorker(d)).pipe(new l("compressedSize")).withStreamInfo("compression",f)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,i){var o=n("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},i.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,i){var o=n("./utils"),s=function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var u=0;u<8;u++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l}();r.exports=function(a,l){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(c,u,f,d){var h=s,g=d+f;c^=-1;for(var p=d;p<g;p++)c=c>>>8^h[255&(c^u[p])];return-1^c}(0|l,a,a.length,0):function(c,u,f,d){var h=s,g=d+f;c^=-1;for(var p=d;p<g;p++)c=c>>>8^h[255&(c^u.charCodeAt(p))];return-1^c}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(n,r,i){var o=null;o=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:o}},{lie:37}],7:[function(n,r,i){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=n("pako"),a=n("./utils"),l=n("./stream/GenericWorker"),c=o?"uint8array":"array";function u(f,d){l.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=d,this.meta={}}i.magic="\b\0",a.inherits(u,l),u.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,f.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(d){f.push({data:d,meta:f.meta})}},i.compressWorker=function(f){return new u("Deflate",f)},i.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,i){function o(h,g){var p,v="";for(p=0;p<g;p++)v+=String.fromCharCode(255&h),h>>>=8;return v}function s(h,g,p,v,x,O){var y,w,b=h.file,S=h.compression,C=O!==c.utf8encode,I=a.transformTo("string",O(b.name)),A=a.transformTo("string",c.utf8encode(b.name)),T=b.comment,_=a.transformTo("string",O(T)),P=a.transformTo("string",c.utf8encode(T)),R=A.length!==b.name.length,k=P.length!==T.length,F="",W="",X="",q=b.dir,Y=b.date,L={crc32:0,compressedSize:0,uncompressedSize:0};g&&!p||(L.crc32=h.crc32,L.compressedSize=h.compressedSize,L.uncompressedSize=h.uncompressedSize);var M=0;g&&(M|=8),C||!R&&!k||(M|=2048);var j=0,Q=0;q&&(j|=16),x==="UNIX"?(Q=798,j|=function(G,U){var ue=G;return G||(ue=U?16893:33204),(65535&ue)<<16}(b.unixPermissions,q)):(Q=20,j|=function(G){return 63&(G||0)}(b.dosPermissions)),y=Y.getUTCHours(),y<<=6,y|=Y.getUTCMinutes(),y<<=5,y|=Y.getUTCSeconds()/2,w=Y.getUTCFullYear()-1980,w<<=4,w|=Y.getUTCMonth()+1,w<<=5,w|=Y.getUTCDate(),R&&(W=o(1,1)+o(u(I),4)+A,F+="up"+o(W.length,2)+W),k&&(X=o(1,1)+o(u(_),4)+P,F+="uc"+o(X.length,2)+X);var N="";return N+=`
498
- \0`,N+=o(M,2),N+=S.magic,N+=o(y,2),N+=o(w,2),N+=o(L.crc32,4),N+=o(L.compressedSize,4),N+=o(L.uncompressedSize,4),N+=o(I.length,2),N+=o(F.length,2),{fileRecord:f.LOCAL_FILE_HEADER+N+I+F,dirRecord:f.CENTRAL_FILE_HEADER+o(Q,2)+N+o(_.length,2)+"\0\0\0\0"+o(j,4)+o(v,4)+I+F+_}}var a=n("../utils"),l=n("../stream/GenericWorker"),c=n("../utf8"),u=n("../crc32"),f=n("../signature");function d(h,g,p,v){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=p,this.encodeFileName=v,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(d,l),d.prototype.push=function(h){var g=h.meta.percent||0,p=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,l.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:p?(g+100*(p-v-1))/p:100}}))},d.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var g=this.streamFiles&&!h.file.dir;if(g){var p=s(h,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(h){this.accumulate=!1;var g=this.streamFiles&&!h.file.dir,p=s(h,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),g)this.push({data:function(v){return f.DATA_DESCRIPTOR+o(v.crc32,4)+o(v.compressedSize,4)+o(v.uncompressedSize,4)}(h),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var h=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var p=this.bytesWritten-h,v=function(x,O,y,w,b){var S=a.transformTo("string",b(w));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(x,2)+o(x,2)+o(O,4)+o(y,4)+o(S.length,2)+S}(this.dirRecords.length,p,h,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(h){this._sources.push(h);var g=this;return h.on("data",function(p){g.processChunk(p)}),h.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),h.on("error",function(p){g.error(p)}),this},d.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(h){var g=this._sources;if(!l.prototype.error.call(this,h))return!1;for(var p=0;p<g.length;p++)try{g[p].error(h)}catch{}return!0},d.prototype.lock=function(){l.prototype.lock.call(this);for(var h=this._sources,g=0;g<h.length;g++)h[g].lock()},r.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,i){var o=n("../compressions"),s=n("./ZipFileWorker");i.generateWorker=function(a,l,c){var u=new s(l.streamFiles,c,l.platform,l.encodeFileName),f=0;try{a.forEach(function(d,h){f++;var g=function(O,y){var w=O||y,b=o[w];if(!b)throw new Error(w+" is not a valid compression method !");return b}(h.options.compression,l.compression),p=h.options.compressionOptions||l.compressionOptions||{},v=h.dir,x=h.date;h._compressWorker(g,p).withStreamInfo("file",{name:d,dir:v,date:x,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(u)}),u.entriesCount=f}catch(d){u.error(d)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,i){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new o;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(o.prototype=n("./object")).loadAsync=n("./load"),o.support=n("./support"),o.defaults=n("./defaults"),o.version="3.10.1",o.loadAsync=function(s,a){return new o().loadAsync(s,a)},o.external=n("./external"),r.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,i){var o=n("./utils"),s=n("./external"),a=n("./utf8"),l=n("./zipEntries"),c=n("./stream/Crc32Probe"),u=n("./nodejsUtils");function f(d){return new s.Promise(function(h,g){var p=d.decompressed.getContentWorker().pipe(new c);p.on("error",function(v){g(v)}).on("end",function(){p.streamInfo.crc32!==d.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}r.exports=function(d,h){var g=this;return h=o.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),u.isNode&&u.isStream(d)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",d,!0,h.optimizedBinaryString,h.base64).then(function(p){var v=new l(h);return v.load(p),v}).then(function(p){var v=[s.Promise.resolve(p)],x=p.files;if(h.checkCRC32)for(var O=0;O<x.length;O++)v.push(f(x[O]));return s.Promise.all(v)}).then(function(p){for(var v=p.shift(),x=v.files,O=0;O<x.length;O++){var y=x[O],w=y.fileNameStr,b=o.resolve(y.fileNameStr);g.file(b,y.decompressed,{binary:!0,optimizedBinaryString:!0,date:y.date,dir:y.dir,comment:y.fileCommentStr.length?y.fileCommentStr:null,unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions,createFolders:h.createFolders}),y.dir||(g.file(b).unsafeOriginalName=w)}return v.zipComment.length&&(g.comment=v.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,i){var o=n("../utils"),s=n("../stream/GenericWorker");function a(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}o.inherits(a,s),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(u){c.push({data:u,meta:{percent:0}})}).on("error",function(u){c.isPaused?this.generatedError=u:c.error(u)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,i){var o=n("readable-stream").Readable;function s(a,l,c){o.call(this,l),this._helper=a;var u=this;a.on("data",function(f,d){u.push(f)||u._helper.pause(),c&&c(d)}).on("error",function(f){u.emit("error",f)}).on("end",function(){u.push(null)})}n("../utils").inherits(s,o),s.prototype._read=function(){this._helper.resume()},r.exports=s},{"../utils":32,"readable-stream":16}],14:[function(n,r,i){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,s);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,s)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var s=new Buffer(o);return s.fill(0),s},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(n,r,i){function o(b,S,C){var I,A=a.getTypeOf(S),T=a.extend(C||{},u);T.date=T.date||new Date,T.compression!==null&&(T.compression=T.compression.toUpperCase()),typeof T.unixPermissions=="string"&&(T.unixPermissions=parseInt(T.unixPermissions,8)),T.unixPermissions&&16384&T.unixPermissions&&(T.dir=!0),T.dosPermissions&&16&T.dosPermissions&&(T.dir=!0),T.dir&&(b=x(b)),T.createFolders&&(I=v(b))&&O.call(this,I,!0);var _=A==="string"&&T.binary===!1&&T.base64===!1;C&&C.binary!==void 0||(T.binary=!_),(S instanceof f&&S.uncompressedSize===0||T.dir||!S||S.length===0)&&(T.base64=!1,T.binary=!0,S="",T.compression="STORE",A="string");var P=null;P=S instanceof f||S instanceof l?S:g.isNode&&g.isStream(S)?new p(b,S):a.prepareContent(b,S,T.binary,T.optimizedBinaryString,T.base64);var R=new d(b,P,T);this.files[b]=R}var s=n("./utf8"),a=n("./utils"),l=n("./stream/GenericWorker"),c=n("./stream/StreamHelper"),u=n("./defaults"),f=n("./compressedObject"),d=n("./zipObject"),h=n("./generate"),g=n("./nodejsUtils"),p=n("./nodejs/NodejsStreamInputAdapter"),v=function(b){b.slice(-1)==="/"&&(b=b.substring(0,b.length-1));var S=b.lastIndexOf("/");return 0<S?b.substring(0,S):""},x=function(b){return b.slice(-1)!=="/"&&(b+="/"),b},O=function(b,S){return S=S!==void 0?S:u.createFolders,b=x(b),this.files[b]||o.call(this,b,null,{dir:!0,createFolders:S}),this.files[b]};function y(b){return Object.prototype.toString.call(b)==="[object RegExp]"}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(b){var S,C,I;for(S in this.files)I=this.files[S],(C=S.slice(this.root.length,S.length))&&S.slice(0,this.root.length)===this.root&&b(C,I)},filter:function(b){var S=[];return this.forEach(function(C,I){b(C,I)&&S.push(I)}),S},file:function(b,S,C){if(arguments.length!==1)return b=this.root+b,o.call(this,b,S,C),this;if(y(b)){var I=b;return this.filter(function(T,_){return!_.dir&&I.test(T)})}var A=this.files[this.root+b];return A&&!A.dir?A:null},folder:function(b){if(!b)return this;if(y(b))return this.filter(function(A,T){return T.dir&&b.test(A)});var S=this.root+b,C=O.call(this,S),I=this.clone();return I.root=C.name,I},remove:function(b){b=this.root+b;var S=this.files[b];if(S||(b.slice(-1)!=="/"&&(b+="/"),S=this.files[b]),S&&!S.dir)delete this.files[b];else for(var C=this.filter(function(A,T){return T.name.slice(0,b.length)===b}),I=0;I<C.length;I++)delete this.files[C[I].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(b){var S,C={};try{if((C=a.extend(b||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");a.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var I=C.comment||this.comment||"";S=h.generateWorker(this,C,I)}catch(A){(S=new l("error")).error(A)}return new c(S,C.type||"string",C.mimeType)},generateAsync:function(b,S){return this.generateInternalStream(b).accumulate(S)},generateNodeStream:function(b,S){return(b=b||{}).type||(b.type="nodebuffer"),this.generateInternalStream(b).toNodejsStream(S)}};r.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,i){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,i){var o=n("./DataReader");function s(a){o.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}n("../utils").inherits(s,o),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),u=a.charCodeAt(2),f=a.charCodeAt(3),d=this.length-4;0<=d;--d)if(this.data[d]===l&&this.data[d+1]===c&&this.data[d+2]===u&&this.data[d+3]===f)return d-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),u=a.charCodeAt(2),f=a.charCodeAt(3),d=this.readData(4);return l===d[0]&&c===d[1]&&u===d[2]&&f===d[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=s},{"../utils":32,"./DataReader":18}],18:[function(n,r,i){var o=n("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=s},{"../utils":32}],19:[function(n,r,i){var o=n("./Uint8ArrayReader");function s(a){o.call(this,a)}n("../utils").inherits(s,o),s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,i){var o=n("./DataReader");function s(a){o.call(this,a)}n("../utils").inherits(s,o),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=s},{"../utils":32,"./DataReader":18}],21:[function(n,r,i){var o=n("./ArrayReader");function s(a){o.call(this,a)}n("../utils").inherits(s,o),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,i){var o=n("../utils"),s=n("../support"),a=n("./ArrayReader"),l=n("./StringReader"),c=n("./NodeBufferReader"),u=n("./Uint8ArrayReader");r.exports=function(f){var d=o.getTypeOf(f);return o.checkSupport(d),d!=="string"||s.uint8array?d==="nodebuffer"?new c(f):s.uint8array?new u(o.transformTo("uint8array",f)):new a(o.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,i){var o=n("./GenericWorker"),s=n("../utils");function a(l){o.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(a,o),a.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,i){var o=n("./GenericWorker"),s=n("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,o),a.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,i){var o=n("../utils"),s=n("./GenericWorker");function a(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(a,s),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,i){var o=n("../utils"),s=n("./GenericWorker");function a(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=o.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}o.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,i){function o(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(l){a.processChunk(l)}),s.on("end",function(){a.end()}),s.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},r.exports=o},{}],29:[function(n,r,i){var o=n("../utils"),s=n("./ConvertWorker"),a=n("./GenericWorker"),l=n("../base64"),c=n("../support"),u=n("../external"),f=null;if(c.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(g,p){return new u.Promise(function(v,x){var O=[],y=g._internalType,w=g._outputType,b=g._mimeType;g.on("data",function(S,C){O.push(S),p&&p(C)}).on("error",function(S){O=[],x(S)}).on("end",function(){try{var S=function(C,I,A){switch(C){case"blob":return o.newBlob(o.transformTo("arraybuffer",I),A);case"base64":return l.encode(I);default:return o.transformTo(C,I)}}(w,function(C,I){var A,T=0,_=null,P=0;for(A=0;A<I.length;A++)P+=I[A].length;switch(C){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(_=new Uint8Array(P),A=0;A<I.length;A++)_.set(I[A],T),T+=I[A].length;return _;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+C+"'")}}(y,O),b);v(S)}catch(C){x(C)}O=[]}).resume()})}function h(g,p,v){var x=p;switch(p){case"blob":case"arraybuffer":x="uint8array";break;case"base64":x="string"}try{this._internalType=x,this._outputType=p,this._mimeType=v,o.checkSupport(x),this._worker=g.pipe(new s(x)),g.lock()}catch(O){this._worker=new a("error"),this._worker.error(O)}}h.prototype={accumulate:function(g){return d(this,g)},on:function(g,p){var v=this;return g==="data"?this._worker.on(g,function(x){p.call(v,x.data,x.meta)}):this._worker.on(g,function(){o.delay(p,arguments,v)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},g)}},r.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var o=new ArrayBuffer(0);try{i.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(o),i.blob=s.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!n("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,i){for(var o=n("./utils"),s=n("./support"),a=n("./nodejsUtils"),l=n("./stream/GenericWorker"),c=new Array(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;c[254]=c[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function d(){l.call(this,"utf-8 encode")}i.utf8encode=function(h){return s.nodebuffer?a.newBufferFrom(h,"utf-8"):function(g){var p,v,x,O,y,w=g.length,b=0;for(O=0;O<w;O++)(64512&(v=g.charCodeAt(O)))==55296&&O+1<w&&(64512&(x=g.charCodeAt(O+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),O++),b+=v<128?1:v<2048?2:v<65536?3:4;for(p=s.uint8array?new Uint8Array(b):new Array(b),O=y=0;y<b;O++)(64512&(v=g.charCodeAt(O)))==55296&&O+1<w&&(64512&(x=g.charCodeAt(O+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),O++),v<128?p[y++]=v:(v<2048?p[y++]=192|v>>>6:(v<65536?p[y++]=224|v>>>12:(p[y++]=240|v>>>18,p[y++]=128|v>>>12&63),p[y++]=128|v>>>6&63),p[y++]=128|63&v);return p}(h)},i.utf8decode=function(h){return s.nodebuffer?o.transformTo("nodebuffer",h).toString("utf-8"):function(g){var p,v,x,O,y=g.length,w=new Array(2*y);for(p=v=0;p<y;)if((x=g[p++])<128)w[v++]=x;else if(4<(O=c[x]))w[v++]=65533,p+=O-1;else{for(x&=O===2?31:O===3?15:7;1<O&&p<y;)x=x<<6|63&g[p++],O--;1<O?w[v++]=65533:x<65536?w[v++]=x:(x-=65536,w[v++]=55296|x>>10&1023,w[v++]=56320|1023&x)}return w.length!==v&&(w.subarray?w=w.subarray(0,v):w.length=v),o.applyFromCharCode(w)}(h=o.transformTo(s.uint8array?"uint8array":"array",h))},o.inherits(f,l),f.prototype.processChunk=function(h){var g=o.transformTo(s.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var p=g;(g=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),g.set(p,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var v=function(O,y){var w;for((y=y||O.length)>O.length&&(y=O.length),w=y-1;0<=w&&(192&O[w])==128;)w--;return w<0||w===0?y:w+c[O[w]]>y?w:y}(g),x=g;v!==g.length&&(s.uint8array?(x=g.subarray(0,v),this.leftOver=g.subarray(v,g.length)):(x=g.slice(0,v),this.leftOver=g.slice(v,g.length))),this.push({data:i.utf8decode(x),meta:h.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=f,o.inherits(d,l),d.prototype.processChunk=function(h){this.push({data:i.utf8encode(h.data),meta:h.meta})},i.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,i){var o=n("./support"),s=n("./base64"),a=n("./nodejsUtils"),l=n("./external");function c(p){return p}function u(p,v){for(var x=0;x<p.length;++x)v[x]=255&p.charCodeAt(x);return v}n("setimmediate"),i.newBlob=function(p,v){i.checkSupport("blob");try{return new Blob([p],{type:v})}catch{try{var x=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return x.append(p),x.getBlob(v)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(p,v,x){var O=[],y=0,w=p.length;if(w<=x)return String.fromCharCode.apply(null,p);for(;y<w;)v==="array"||v==="nodebuffer"?O.push(String.fromCharCode.apply(null,p.slice(y,Math.min(y+x,w)))):O.push(String.fromCharCode.apply(null,p.subarray(y,Math.min(y+x,w)))),y+=x;return O.join("")},stringifyByChar:function(p){for(var v="",x=0;x<p.length;x++)v+=String.fromCharCode(p[x]);return v},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function d(p){var v=65536,x=i.getTypeOf(p),O=!0;if(x==="uint8array"?O=f.applyCanBeUsed.uint8array:x==="nodebuffer"&&(O=f.applyCanBeUsed.nodebuffer),O)for(;1<v;)try{return f.stringifyByChunk(p,x,v)}catch{v=Math.floor(v/2)}return f.stringifyByChar(p)}function h(p,v){for(var x=0;x<p.length;x++)v[x]=p[x];return v}i.applyFromCharCode=d;var g={};g.string={string:c,array:function(p){return u(p,new Array(p.length))},arraybuffer:function(p){return g.string.uint8array(p).buffer},uint8array:function(p){return u(p,new Uint8Array(p.length))},nodebuffer:function(p){return u(p,a.allocBuffer(p.length))}},g.array={string:d,array:c,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(p)}},g.arraybuffer={string:function(p){return d(new Uint8Array(p))},array:function(p){return h(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:c,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(new Uint8Array(p))}},g.uint8array={string:d,array:function(p){return h(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:c,nodebuffer:function(p){return a.newBufferFrom(p)}},g.nodebuffer={string:d,array:function(p){return h(p,new Array(p.length))},arraybuffer:function(p){return g.nodebuffer.uint8array(p).buffer},uint8array:function(p){return h(p,new Uint8Array(p.length))},nodebuffer:c},i.transformTo=function(p,v){if(v=v||"",!p)return v;i.checkSupport(p);var x=i.getTypeOf(v);return g[x][p](v)},i.resolve=function(p){for(var v=p.split("/"),x=[],O=0;O<v.length;O++){var y=v[O];y==="."||y===""&&O!==0&&O!==v.length-1||(y===".."?x.pop():x.push(y))}return x.join("/")},i.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(p)?"nodebuffer":o.uint8array&&p instanceof Uint8Array?"uint8array":o.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(p){if(!o[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(p){var v,x,O="";for(x=0;x<(p||"").length;x++)O+="\\x"+((v=p.charCodeAt(x))<16?"0":"")+v.toString(16).toUpperCase();return O},i.delay=function(p,v,x){setImmediate(function(){p.apply(x||null,v||[])})},i.inherits=function(p,v){function x(){}x.prototype=v.prototype,p.prototype=new x},i.extend=function(){var p,v,x={};for(p=0;p<arguments.length;p++)for(v in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],v)&&x[v]===void 0&&(x[v]=arguments[p][v]);return x},i.prepareContent=function(p,v,x,O,y){return l.Promise.resolve(v).then(function(w){return o.blob&&(w instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(w))!==-1)&&typeof FileReader<"u"?new l.Promise(function(b,S){var C=new FileReader;C.onload=function(I){b(I.target.result)},C.onerror=function(I){S(I.target.error)},C.readAsArrayBuffer(w)}):w}).then(function(w){var b=i.getTypeOf(w);return b?(b==="arraybuffer"?w=i.transformTo("uint8array",w):b==="string"&&(y?w=s.decode(w):x&&O!==!0&&(w=function(S){return u(S,o.uint8array?new Uint8Array(S.length):new Array(S.length))}(w))),w):l.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,i){var o=n("./reader/readerFor"),s=n("./utils"),a=n("./signature"),l=n("./zipEntry"),c=n("./support");function u(f){this.files=[],this.loadOptions=f}u.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var d=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(d)+", expected "+s.pretty(f)+")")}},isSignature:function(f,d){var h=this.reader.index;this.reader.setIndex(f);var g=this.reader.readString(4)===d;return this.reader.setIndex(h),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),d=c.uint8array?"uint8array":"array",h=s.transformTo(d,f);this.zipComment=this.loadOptions.decodeFileName(h)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,d,h,g=this.zip64EndOfCentralSize-44;0<g;)f=this.reader.readInt(2),d=this.reader.readInt(4),h=this.reader.readData(d),this.zip64ExtensibleData[f]={id:f,length:d,value:h}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,d;for(f=0;f<this.files.length;f++)d=this.files[f],this.reader.setIndex(d.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),d.readLocalPart(this.reader),d.handleUTF8(),d.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var d=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var g=d-h;if(0<g)this.isSignature(d,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,i){var o=n("./reader/readerFor"),s=n("./utils"),a=n("./compressedObject"),l=n("./crc32"),c=n("./utf8"),u=n("./compressions"),f=n("./support");function d(h,g){this.options=h,this.loadOptions=g}d.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var g,p;if(h.skip(22),this.fileNameLength=h.readInt(2),p=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=function(v){for(var x in u)if(Object.prototype.hasOwnProperty.call(u,x)&&u[x].magic===v)return u[x];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var g=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(g),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=o(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var g,p,v,x=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<x;)g=h.readInt(2),p=h.readInt(2),v=h.readData(p),this.extraFields[g]={id:g,length:p,value:v};h.setIndex(x)},handleUTF8:function(){var h=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var p=s.transformTo(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var x=s.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(x)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var g=o(h.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:c.utf8decode(g.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var g=o(h.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:c.utf8decode(g.readData(h.length-5))}return null}},r.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,i){function o(g,p,v){this.name=g,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=p,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var s=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),l=n("./utf8"),c=n("./compressedObject"),u=n("./stream/GenericWorker");o.prototype={internalStream:function(g){var p=null,v="string";try{if(!g)throw new Error("No output type specified.");var x=(v=g.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),p=this._decompressWorker();var O=!this._dataBinary;O&&!x&&(p=p.pipe(new l.Utf8EncodeWorker)),!O&&x&&(p=p.pipe(new l.Utf8DecodeWorker))}catch(y){(p=new u("error")).error(y)}return new s(p,v,"")},async:function(g,p){return this.internalStream(g).accumulate(p)},nodeStream:function(g,p){return this.internalStream(g||"nodebuffer").toNodejsStream(p)},_compressWorker:function(g,p){if(this._data instanceof c&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(v,g,p)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof u?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<f.length;h++)o.prototype[f[h]]=d;r.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,i){(function(o){var s,a,l=o.MutationObserver||o.WebKitMutationObserver;if(l){var c=0,u=new l(g),f=o.document.createTextNode("");u.observe(f,{characterData:!0}),s=function(){f.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)s="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var p=o.document.createElement("script");p.onreadystatechange=function(){g(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},o.document.documentElement.appendChild(p)}:function(){setTimeout(g,0)};else{var d=new o.MessageChannel;d.port1.onmessage=g,s=function(){d.port2.postMessage(0)}}var h=[];function g(){var p,v;a=!0;for(var x=h.length;x;){for(v=h,h=[],p=-1;++p<x;)v[p]();x=h.length}a=!1}r.exports=function(p){h.push(p)!==1||a||s()}}).call(this,typeof _e<"u"?_e:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,i){var o=n("immediate");function s(){}var a={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];function f(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,x!==s&&p(this,x)}function d(x,O,y){this.promise=x,typeof O=="function"&&(this.onFulfilled=O,this.callFulfilled=this.otherCallFulfilled),typeof y=="function"&&(this.onRejected=y,this.callRejected=this.otherCallRejected)}function h(x,O,y){o(function(){var w;try{w=O(y)}catch(b){return a.reject(x,b)}w===x?a.reject(x,new TypeError("Cannot resolve promise with itself")):a.resolve(x,w)})}function g(x){var O=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof O=="function")return function(){O.apply(x,arguments)}}function p(x,O){var y=!1;function w(C){y||(y=!0,a.reject(x,C))}function b(C){y||(y=!0,a.resolve(x,C))}var S=v(function(){O(b,w)});S.status==="error"&&w(S.value)}function v(x,O){var y={};try{y.value=x(O),y.status="success"}catch(w){y.status="error",y.value=w}return y}(r.exports=f).prototype.finally=function(x){if(typeof x!="function")return this;var O=this.constructor;return this.then(function(y){return O.resolve(x()).then(function(){return y})},function(y){return O.resolve(x()).then(function(){throw y})})},f.prototype.catch=function(x){return this.then(null,x)},f.prototype.then=function(x,O){if(typeof x!="function"&&this.state===c||typeof O!="function"&&this.state===l)return this;var y=new this.constructor(s);return this.state!==u?h(y,this.state===c?x:O,this.outcome):this.queue.push(new d(y,x,O)),y},d.prototype.callFulfilled=function(x){a.resolve(this.promise,x)},d.prototype.otherCallFulfilled=function(x){h(this.promise,this.onFulfilled,x)},d.prototype.callRejected=function(x){a.reject(this.promise,x)},d.prototype.otherCallRejected=function(x){h(this.promise,this.onRejected,x)},a.resolve=function(x,O){var y=v(g,O);if(y.status==="error")return a.reject(x,y.value);var w=y.value;if(w)p(x,w);else{x.state=c,x.outcome=O;for(var b=-1,S=x.queue.length;++b<S;)x.queue[b].callFulfilled(O)}return x},a.reject=function(x,O){x.state=l,x.outcome=O;for(var y=-1,w=x.queue.length;++y<w;)x.queue[y].callRejected(O);return x},f.resolve=function(x){return x instanceof this?x:a.resolve(new this(s),x)},f.reject=function(x){var O=new this(s);return a.reject(O,x)},f.all=function(x){var O=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var y=x.length,w=!1;if(!y)return this.resolve([]);for(var b=new Array(y),S=0,C=-1,I=new this(s);++C<y;)A(x[C],C);return I;function A(T,_){O.resolve(T).then(function(P){b[_]=P,++S!==y||w||(w=!0,a.resolve(I,b))},function(P){w||(w=!0,a.reject(I,P))})}},f.race=function(x){var O=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var y=x.length,w=!1;if(!y)return this.resolve([]);for(var b=-1,S=new this(s);++b<y;)C=x[b],O.resolve(C).then(function(I){w||(w=!0,a.resolve(S,I))},function(I){w||(w=!0,a.reject(S,I))});var C;return S}},{immediate:36}],38:[function(n,r,i){var o={};(0,n("./lib/utils/common").assign)(o,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,i){var o=n("./zlib/deflate"),s=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/messages"),c=n("./zlib/zstream"),u=Object.prototype.toString,f=0,d=-1,h=0,g=8;function p(x){if(!(this instanceof p))return new p(x);this.options=s.assign({level:d,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},x||{});var O=this.options;O.raw&&0<O.windowBits?O.windowBits=-O.windowBits:O.gzip&&0<O.windowBits&&O.windowBits<16&&(O.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var y=o.deflateInit2(this.strm,O.level,O.method,O.windowBits,O.memLevel,O.strategy);if(y!==f)throw new Error(l[y]);if(O.header&&o.deflateSetHeader(this.strm,O.header),O.dictionary){var w;if(w=typeof O.dictionary=="string"?a.string2buf(O.dictionary):u.call(O.dictionary)==="[object ArrayBuffer]"?new Uint8Array(O.dictionary):O.dictionary,(y=o.deflateSetDictionary(this.strm,w))!==f)throw new Error(l[y]);this._dict_set=!0}}function v(x,O){var y=new p(O);if(y.push(x,!0),y.err)throw y.msg||l[y.err];return y.result}p.prototype.push=function(x,O){var y,w,b=this.strm,S=this.options.chunkSize;if(this.ended)return!1;w=O===~~O?O:O===!0?4:0,typeof x=="string"?b.input=a.string2buf(x):u.call(x)==="[object ArrayBuffer]"?b.input=new Uint8Array(x):b.input=x,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new s.Buf8(S),b.next_out=0,b.avail_out=S),(y=o.deflate(b,w))!==1&&y!==f)return this.onEnd(y),!(this.ended=!0);b.avail_out!==0&&(b.avail_in!==0||w!==4&&w!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(b.output,b.next_out))):this.onData(s.shrinkBuf(b.output,b.next_out)))}while((0<b.avail_in||b.avail_out===0)&&y!==1);return w===4?(y=o.deflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===f):w!==2||(this.onEnd(f),!(b.avail_out=0))},p.prototype.onData=function(x){this.chunks.push(x)},p.prototype.onEnd=function(x){x===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=x,this.msg=this.strm.msg},i.Deflate=p,i.deflate=v,i.deflateRaw=function(x,O){return(O=O||{}).raw=!0,v(x,O)},i.gzip=function(x,O){return(O=O||{}).gzip=!0,v(x,O)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,i){var o=n("./zlib/inflate"),s=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/constants"),c=n("./zlib/messages"),u=n("./zlib/zstream"),f=n("./zlib/gzheader"),d=Object.prototype.toString;function h(p){if(!(this instanceof h))return new h(p);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},p||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||p&&p.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&(15&v.windowBits)==0&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var x=o.inflateInit2(this.strm,v.windowBits);if(x!==l.Z_OK)throw new Error(c[x]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function g(p,v){var x=new h(v);if(x.push(p,!0),x.err)throw x.msg||c[x.err];return x.result}h.prototype.push=function(p,v){var x,O,y,w,b,S,C=this.strm,I=this.options.chunkSize,A=this.options.dictionary,T=!1;if(this.ended)return!1;O=v===~~v?v:v===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof p=="string"?C.input=a.binstring2buf(p):d.call(p)==="[object ArrayBuffer]"?C.input=new Uint8Array(p):C.input=p,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new s.Buf8(I),C.next_out=0,C.avail_out=I),(x=o.inflate(C,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&A&&(S=typeof A=="string"?a.string2buf(A):d.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,x=o.inflateSetDictionary(this.strm,S)),x===l.Z_BUF_ERROR&&T===!0&&(x=l.Z_OK,T=!1),x!==l.Z_STREAM_END&&x!==l.Z_OK)return this.onEnd(x),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&x!==l.Z_STREAM_END&&(C.avail_in!==0||O!==l.Z_FINISH&&O!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(y=a.utf8border(C.output,C.next_out),w=C.next_out-y,b=a.buf2string(C.output,y),C.next_out=w,C.avail_out=I-w,w&&s.arraySet(C.output,C.output,y,w,0),this.onData(b)):this.onData(s.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(T=!0)}while((0<C.avail_in||C.avail_out===0)&&x!==l.Z_STREAM_END);return x===l.Z_STREAM_END&&(O=l.Z_FINISH),O===l.Z_FINISH?(x=o.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===l.Z_OK):O!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(C.avail_out=0))},h.prototype.onData=function(p){this.chunks.push(p)},h.prototype.onEnd=function(p){p===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},i.Inflate=h,i.inflate=g,i.inflateRaw=function(p,v){return(v=v||{}).raw=!0,g(p,v)},i.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,i){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var f in u)u.hasOwnProperty(f)&&(l[f]=u[f])}}return l},i.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,u,f,d){if(c.subarray&&l.subarray)l.set(c.subarray(u,u+f),d);else for(var h=0;h<f;h++)l[d+h]=c[u+h]},flattenChunks:function(l){var c,u,f,d,h,g;for(c=f=0,u=l.length;c<u;c++)f+=l[c].length;for(g=new Uint8Array(f),c=d=0,u=l.length;c<u;c++)h=l[c],g.set(h,d),d+=h.length;return g}},a={arraySet:function(l,c,u,f,d){for(var h=0;h<f;h++)l[d+h]=c[u+h]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,s)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(o)},{}],42:[function(n,r,i){var o=n("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new o.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function u(f,d){if(d<65537&&(f.subarray&&a||!f.subarray&&s))return String.fromCharCode.apply(null,o.shrinkBuf(f,d));for(var h="",g=0;g<d;g++)h+=String.fromCharCode(f[g]);return h}l[254]=l[254]=1,i.string2buf=function(f){var d,h,g,p,v,x=f.length,O=0;for(p=0;p<x;p++)(64512&(h=f.charCodeAt(p)))==55296&&p+1<x&&(64512&(g=f.charCodeAt(p+1)))==56320&&(h=65536+(h-55296<<10)+(g-56320),p++),O+=h<128?1:h<2048?2:h<65536?3:4;for(d=new o.Buf8(O),p=v=0;v<O;p++)(64512&(h=f.charCodeAt(p)))==55296&&p+1<x&&(64512&(g=f.charCodeAt(p+1)))==56320&&(h=65536+(h-55296<<10)+(g-56320),p++),h<128?d[v++]=h:(h<2048?d[v++]=192|h>>>6:(h<65536?d[v++]=224|h>>>12:(d[v++]=240|h>>>18,d[v++]=128|h>>>12&63),d[v++]=128|h>>>6&63),d[v++]=128|63&h);return d},i.buf2binstring=function(f){return u(f,f.length)},i.binstring2buf=function(f){for(var d=new o.Buf8(f.length),h=0,g=d.length;h<g;h++)d[h]=f.charCodeAt(h);return d},i.buf2string=function(f,d){var h,g,p,v,x=d||f.length,O=new Array(2*x);for(h=g=0;h<x;)if((p=f[h++])<128)O[g++]=p;else if(4<(v=l[p]))O[g++]=65533,h+=v-1;else{for(p&=v===2?31:v===3?15:7;1<v&&h<x;)p=p<<6|63&f[h++],v--;1<v?O[g++]=65533:p<65536?O[g++]=p:(p-=65536,O[g++]=55296|p>>10&1023,O[g++]=56320|1023&p)}return u(O,g)},i.utf8border=function(f,d){var h;for((d=d||f.length)>f.length&&(d=f.length),h=d-1;0<=h&&(192&f[h])==128;)h--;return h<0||h===0?d:h+l[f[h]]>d?h:d}},{"./common":41}],43:[function(n,r,i){r.exports=function(o,s,a,l){for(var c=65535&o|0,u=o>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;u=u+(c=c+s[l++]|0)|0,--f;);c%=65521,u%=65521}return c|u<<16|0}},{}],44:[function(n,r,i){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,i){var o=function(){for(var s,a=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;a[l]=s}return a}();r.exports=function(s,a,l,c){var u=o,f=c+l;s^=-1;for(var d=c;d<f;d++)s=s>>>8^u[255&(s^a[d])];return-1^s}},{}],46:[function(n,r,i){var o,s=n("../utils/common"),a=n("./trees"),l=n("./adler32"),c=n("./crc32"),u=n("./messages"),f=0,d=4,h=0,g=-2,p=-1,v=4,x=2,O=8,y=9,w=286,b=30,S=19,C=2*w+1,I=15,A=3,T=258,_=T+A+1,P=42,R=113,k=1,F=2,W=3,X=4;function q(E,re){return E.msg=u[re],re}function Y(E){return(E<<1)-(4<E?9:0)}function L(E){for(var re=E.length;0<=--re;)E[re]=0}function M(E){var re=E.state,ie=re.pending;ie>E.avail_out&&(ie=E.avail_out),ie!==0&&(s.arraySet(E.output,re.pending_buf,re.pending_out,ie,E.next_out),E.next_out+=ie,re.pending_out+=ie,E.total_out+=ie,E.avail_out-=ie,re.pending-=ie,re.pending===0&&(re.pending_out=0))}function j(E,re){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,re),E.block_start=E.strstart,M(E.strm)}function Q(E,re){E.pending_buf[E.pending++]=re}function N(E,re){E.pending_buf[E.pending++]=re>>>8&255,E.pending_buf[E.pending++]=255&re}function G(E,re){var ie,Z,V=E.max_chain_length,ee=E.strstart,de=E.prev_length,se=E.nice_match,ne=E.strstart>E.w_size-_?E.strstart-(E.w_size-_):0,K=E.window,J=E.w_mask,oe=E.prev,Oe=E.strstart+T,Be=K[ee+de-1],Te=K[ee+de];E.prev_length>=E.good_match&&(V>>=2),se>E.lookahead&&(se=E.lookahead);do if(K[(ie=re)+de]===Te&&K[ie+de-1]===Be&&K[ie]===K[ee]&&K[++ie]===K[ee+1]){ee+=2,ie++;do;while(K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&ee<Oe);if(Z=T-(Oe-ee),ee=Oe-T,de<Z){if(E.match_start=re,se<=(de=Z))break;Be=K[ee+de-1],Te=K[ee+de]}}while((re=oe[re&J])>ne&&--V!=0);return de<=E.lookahead?de:E.lookahead}function U(E){var re,ie,Z,V,ee,de,se,ne,K,J,oe=E.w_size;do{if(V=E.window_size-E.lookahead-E.strstart,E.strstart>=oe+(oe-_)){for(s.arraySet(E.window,E.window,oe,oe,0),E.match_start-=oe,E.strstart-=oe,E.block_start-=oe,re=ie=E.hash_size;Z=E.head[--re],E.head[re]=oe<=Z?Z-oe:0,--ie;);for(re=ie=oe;Z=E.prev[--re],E.prev[re]=oe<=Z?Z-oe:0,--ie;);V+=oe}if(E.strm.avail_in===0)break;if(de=E.strm,se=E.window,ne=E.strstart+E.lookahead,K=V,J=void 0,J=de.avail_in,K<J&&(J=K),ie=J===0?0:(de.avail_in-=J,s.arraySet(se,de.input,de.next_in,J,ne),de.state.wrap===1?de.adler=l(de.adler,se,J,ne):de.state.wrap===2&&(de.adler=c(de.adler,se,J,ne)),de.next_in+=J,de.total_in+=J,J),E.lookahead+=ie,E.lookahead+E.insert>=A)for(ee=E.strstart-E.insert,E.ins_h=E.window[ee],E.ins_h=(E.ins_h<<E.hash_shift^E.window[ee+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[ee+A-1])&E.hash_mask,E.prev[ee&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=ee,ee++,E.insert--,!(E.lookahead+E.insert<A)););}while(E.lookahead<_&&E.strm.avail_in!==0)}function ue(E,re){for(var ie,Z;;){if(E.lookahead<_){if(U(E),E.lookahead<_&&re===f)return k;if(E.lookahead===0)break}if(ie=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),ie!==0&&E.strstart-ie<=E.w_size-_&&(E.match_length=G(E,ie)),E.match_length>=A)if(Z=a._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else Z=a._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(Z&&(j(E,!1),E.strm.avail_out===0))return k}return E.insert=E.strstart<A-1?E.strstart:A-1,re===d?(j(E,!0),E.strm.avail_out===0?W:X):E.last_lit&&(j(E,!1),E.strm.avail_out===0)?k:F}function H(E,re){for(var ie,Z,V;;){if(E.lookahead<_){if(U(E),E.lookahead<_&&re===f)return k;if(E.lookahead===0)break}if(ie=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=A-1,ie!==0&&E.prev_length<E.max_lazy_match&&E.strstart-ie<=E.w_size-_&&(E.match_length=G(E,ie),E.match_length<=5&&(E.strategy===1||E.match_length===A&&4096<E.strstart-E.match_start)&&(E.match_length=A-1)),E.prev_length>=A&&E.match_length<=E.prev_length){for(V=E.strstart+E.lookahead-A,Z=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=V&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=A-1,E.strstart++,Z&&(j(E,!1),E.strm.avail_out===0))return k}else if(E.match_available){if((Z=a._tr_tally(E,0,E.window[E.strstart-1]))&&j(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return k}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(Z=a._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<A-1?E.strstart:A-1,re===d?(j(E,!0),E.strm.avail_out===0?W:X):E.last_lit&&(j(E,!1),E.strm.avail_out===0)?k:F}function he(E,re,ie,Z,V){this.good_length=E,this.max_lazy=re,this.nice_length=ie,this.max_chain=Z,this.func=V}function pe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=O,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(2*C),this.dyn_dtree=new s.Buf16(2*(2*b+1)),this.bl_tree=new s.Buf16(2*(2*S+1)),L(this.dyn_ltree),L(this.dyn_dtree),L(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(I+1),this.heap=new s.Buf16(2*w+1),L(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*w+1),L(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function me(E){var re;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=x,(re=E.state).pending=0,re.pending_out=0,re.wrap<0&&(re.wrap=-re.wrap),re.status=re.wrap?P:R,E.adler=re.wrap===2?0:1,re.last_flush=f,a._tr_init(re),h):q(E,g)}function ae(E){var re=me(E);return re===h&&function(ie){ie.window_size=2*ie.w_size,L(ie.head),ie.max_lazy_match=o[ie.level].max_lazy,ie.good_match=o[ie.level].good_length,ie.nice_match=o[ie.level].nice_length,ie.max_chain_length=o[ie.level].max_chain,ie.strstart=0,ie.block_start=0,ie.lookahead=0,ie.insert=0,ie.match_length=ie.prev_length=A-1,ie.match_available=0,ie.ins_h=0}(E.state),re}function xe(E,re,ie,Z,V,ee){if(!E)return g;var de=1;if(re===p&&(re=6),Z<0?(de=0,Z=-Z):15<Z&&(de=2,Z-=16),V<1||y<V||ie!==O||Z<8||15<Z||re<0||9<re||ee<0||v<ee)return q(E,g);Z===8&&(Z=9);var se=new pe;return(E.state=se).strm=E,se.wrap=de,se.gzhead=null,se.w_bits=Z,se.w_size=1<<se.w_bits,se.w_mask=se.w_size-1,se.hash_bits=V+7,se.hash_size=1<<se.hash_bits,se.hash_mask=se.hash_size-1,se.hash_shift=~~((se.hash_bits+A-1)/A),se.window=new s.Buf8(2*se.w_size),se.head=new s.Buf16(se.hash_size),se.prev=new s.Buf16(se.w_size),se.lit_bufsize=1<<V+6,se.pending_buf_size=4*se.lit_bufsize,se.pending_buf=new s.Buf8(se.pending_buf_size),se.d_buf=1*se.lit_bufsize,se.l_buf=3*se.lit_bufsize,se.level=re,se.strategy=ee,se.method=ie,ae(E)}o=[new he(0,0,0,0,function(E,re){var ie=65535;for(ie>E.pending_buf_size-5&&(ie=E.pending_buf_size-5);;){if(E.lookahead<=1){if(U(E),E.lookahead===0&&re===f)return k;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var Z=E.block_start+ie;if((E.strstart===0||E.strstart>=Z)&&(E.lookahead=E.strstart-Z,E.strstart=Z,j(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-_&&(j(E,!1),E.strm.avail_out===0))return k}return E.insert=0,re===d?(j(E,!0),E.strm.avail_out===0?W:X):(E.strstart>E.block_start&&(j(E,!1),E.strm.avail_out),k)}),new he(4,4,8,4,ue),new he(4,5,16,8,ue),new he(4,6,32,32,ue),new he(4,4,16,16,H),new he(8,16,32,32,H),new he(8,16,128,128,H),new he(8,32,128,256,H),new he(32,128,258,1024,H),new he(32,258,258,4096,H)],i.deflateInit=function(E,re){return xe(E,re,O,15,8,0)},i.deflateInit2=xe,i.deflateReset=ae,i.deflateResetKeep=me,i.deflateSetHeader=function(E,re){return E&&E.state?E.state.wrap!==2?g:(E.state.gzhead=re,h):g},i.deflate=function(E,re){var ie,Z,V,ee;if(!E||!E.state||5<re||re<0)return E?q(E,g):g;if(Z=E.state,!E.output||!E.input&&E.avail_in!==0||Z.status===666&&re!==d)return q(E,E.avail_out===0?-5:g);if(Z.strm=E,ie=Z.last_flush,Z.last_flush=re,Z.status===P)if(Z.wrap===2)E.adler=0,Q(Z,31),Q(Z,139),Q(Z,8),Z.gzhead?(Q(Z,(Z.gzhead.text?1:0)+(Z.gzhead.hcrc?2:0)+(Z.gzhead.extra?4:0)+(Z.gzhead.name?8:0)+(Z.gzhead.comment?16:0)),Q(Z,255&Z.gzhead.time),Q(Z,Z.gzhead.time>>8&255),Q(Z,Z.gzhead.time>>16&255),Q(Z,Z.gzhead.time>>24&255),Q(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),Q(Z,255&Z.gzhead.os),Z.gzhead.extra&&Z.gzhead.extra.length&&(Q(Z,255&Z.gzhead.extra.length),Q(Z,Z.gzhead.extra.length>>8&255)),Z.gzhead.hcrc&&(E.adler=c(E.adler,Z.pending_buf,Z.pending,0)),Z.gzindex=0,Z.status=69):(Q(Z,0),Q(Z,0),Q(Z,0),Q(Z,0),Q(Z,0),Q(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),Q(Z,3),Z.status=R);else{var de=O+(Z.w_bits-8<<4)<<8;de|=(2<=Z.strategy||Z.level<2?0:Z.level<6?1:Z.level===6?2:3)<<6,Z.strstart!==0&&(de|=32),de+=31-de%31,Z.status=R,N(Z,de),Z.strstart!==0&&(N(Z,E.adler>>>16),N(Z,65535&E.adler)),E.adler=1}if(Z.status===69)if(Z.gzhead.extra){for(V=Z.pending;Z.gzindex<(65535&Z.gzhead.extra.length)&&(Z.pending!==Z.pending_buf_size||(Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),M(E),V=Z.pending,Z.pending!==Z.pending_buf_size));)Q(Z,255&Z.gzhead.extra[Z.gzindex]),Z.gzindex++;Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),Z.gzindex===Z.gzhead.extra.length&&(Z.gzindex=0,Z.status=73)}else Z.status=73;if(Z.status===73)if(Z.gzhead.name){V=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),M(E),V=Z.pending,Z.pending===Z.pending_buf_size)){ee=1;break}ee=Z.gzindex<Z.gzhead.name.length?255&Z.gzhead.name.charCodeAt(Z.gzindex++):0,Q(Z,ee)}while(ee!==0);Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),ee===0&&(Z.gzindex=0,Z.status=91)}else Z.status=91;if(Z.status===91)if(Z.gzhead.comment){V=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),M(E),V=Z.pending,Z.pending===Z.pending_buf_size)){ee=1;break}ee=Z.gzindex<Z.gzhead.comment.length?255&Z.gzhead.comment.charCodeAt(Z.gzindex++):0,Q(Z,ee)}while(ee!==0);Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),ee===0&&(Z.status=103)}else Z.status=103;if(Z.status===103&&(Z.gzhead.hcrc?(Z.pending+2>Z.pending_buf_size&&M(E),Z.pending+2<=Z.pending_buf_size&&(Q(Z,255&E.adler),Q(Z,E.adler>>8&255),E.adler=0,Z.status=R)):Z.status=R),Z.pending!==0){if(M(E),E.avail_out===0)return Z.last_flush=-1,h}else if(E.avail_in===0&&Y(re)<=Y(ie)&&re!==d)return q(E,-5);if(Z.status===666&&E.avail_in!==0)return q(E,-5);if(E.avail_in!==0||Z.lookahead!==0||re!==f&&Z.status!==666){var se=Z.strategy===2?function(ne,K){for(var J;;){if(ne.lookahead===0&&(U(ne),ne.lookahead===0)){if(K===f)return k;break}if(ne.match_length=0,J=a._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++,J&&(j(ne,!1),ne.strm.avail_out===0))return k}return ne.insert=0,K===d?(j(ne,!0),ne.strm.avail_out===0?W:X):ne.last_lit&&(j(ne,!1),ne.strm.avail_out===0)?k:F}(Z,re):Z.strategy===3?function(ne,K){for(var J,oe,Oe,Be,Te=ne.window;;){if(ne.lookahead<=T){if(U(ne),ne.lookahead<=T&&K===f)return k;if(ne.lookahead===0)break}if(ne.match_length=0,ne.lookahead>=A&&0<ne.strstart&&(oe=Te[Oe=ne.strstart-1])===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]){Be=ne.strstart+T;do;while(oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&Oe<Be);ne.match_length=T-(Be-Oe),ne.match_length>ne.lookahead&&(ne.match_length=ne.lookahead)}if(ne.match_length>=A?(J=a._tr_tally(ne,1,ne.match_length-A),ne.lookahead-=ne.match_length,ne.strstart+=ne.match_length,ne.match_length=0):(J=a._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++),J&&(j(ne,!1),ne.strm.avail_out===0))return k}return ne.insert=0,K===d?(j(ne,!0),ne.strm.avail_out===0?W:X):ne.last_lit&&(j(ne,!1),ne.strm.avail_out===0)?k:F}(Z,re):o[Z.level].func(Z,re);if(se!==W&&se!==X||(Z.status=666),se===k||se===W)return E.avail_out===0&&(Z.last_flush=-1),h;if(se===F&&(re===1?a._tr_align(Z):re!==5&&(a._tr_stored_block(Z,0,0,!1),re===3&&(L(Z.head),Z.lookahead===0&&(Z.strstart=0,Z.block_start=0,Z.insert=0))),M(E),E.avail_out===0))return Z.last_flush=-1,h}return re!==d?h:Z.wrap<=0?1:(Z.wrap===2?(Q(Z,255&E.adler),Q(Z,E.adler>>8&255),Q(Z,E.adler>>16&255),Q(Z,E.adler>>24&255),Q(Z,255&E.total_in),Q(Z,E.total_in>>8&255),Q(Z,E.total_in>>16&255),Q(Z,E.total_in>>24&255)):(N(Z,E.adler>>>16),N(Z,65535&E.adler)),M(E),0<Z.wrap&&(Z.wrap=-Z.wrap),Z.pending!==0?h:1)},i.deflateEnd=function(E){var re;return E&&E.state?(re=E.state.status)!==P&&re!==69&&re!==73&&re!==91&&re!==103&&re!==R&&re!==666?q(E,g):(E.state=null,re===R?q(E,-3):h):g},i.deflateSetDictionary=function(E,re){var ie,Z,V,ee,de,se,ne,K,J=re.length;if(!E||!E.state||(ee=(ie=E.state).wrap)===2||ee===1&&ie.status!==P||ie.lookahead)return g;for(ee===1&&(E.adler=l(E.adler,re,J,0)),ie.wrap=0,J>=ie.w_size&&(ee===0&&(L(ie.head),ie.strstart=0,ie.block_start=0,ie.insert=0),K=new s.Buf8(ie.w_size),s.arraySet(K,re,J-ie.w_size,ie.w_size,0),re=K,J=ie.w_size),de=E.avail_in,se=E.next_in,ne=E.input,E.avail_in=J,E.next_in=0,E.input=re,U(ie);ie.lookahead>=A;){for(Z=ie.strstart,V=ie.lookahead-(A-1);ie.ins_h=(ie.ins_h<<ie.hash_shift^ie.window[Z+A-1])&ie.hash_mask,ie.prev[Z&ie.w_mask]=ie.head[ie.ins_h],ie.head[ie.ins_h]=Z,Z++,--V;);ie.strstart=Z,ie.lookahead=A-1,U(ie)}return ie.strstart+=ie.lookahead,ie.block_start=ie.strstart,ie.insert=ie.lookahead,ie.lookahead=0,ie.match_length=ie.prev_length=A-1,ie.match_available=0,E.next_in=se,E.input=ne,E.avail_in=de,ie.wrap=ee,h},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,i){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,i){r.exports=function(o,s){var a,l,c,u,f,d,h,g,p,v,x,O,y,w,b,S,C,I,A,T,_,P,R,k,F;a=o.state,l=o.next_in,k=o.input,c=l+(o.avail_in-5),u=o.next_out,F=o.output,f=u-(s-o.avail_out),d=u+(o.avail_out-257),h=a.dmax,g=a.wsize,p=a.whave,v=a.wnext,x=a.window,O=a.hold,y=a.bits,w=a.lencode,b=a.distcode,S=(1<<a.lenbits)-1,C=(1<<a.distbits)-1;e:do{y<15&&(O+=k[l++]<<y,y+=8,O+=k[l++]<<y,y+=8),I=w[O&S];t:for(;;){if(O>>>=A=I>>>24,y-=A,(A=I>>>16&255)===0)F[u++]=65535&I;else{if(!(16&A)){if((64&A)==0){I=w[(65535&I)+(O&(1<<A)-1)];continue t}if(32&A){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}T=65535&I,(A&=15)&&(y<A&&(O+=k[l++]<<y,y+=8),T+=O&(1<<A)-1,O>>>=A,y-=A),y<15&&(O+=k[l++]<<y,y+=8,O+=k[l++]<<y,y+=8),I=b[O&C];n:for(;;){if(O>>>=A=I>>>24,y-=A,!(16&(A=I>>>16&255))){if((64&A)==0){I=b[(65535&I)+(O&(1<<A)-1)];continue n}o.msg="invalid distance code",a.mode=30;break e}if(_=65535&I,y<(A&=15)&&(O+=k[l++]<<y,(y+=8)<A&&(O+=k[l++]<<y,y+=8)),h<(_+=O&(1<<A)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(O>>>=A,y-=A,(A=u-f)<_){if(p<(A=_-A)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(R=x,(P=0)===v){if(P+=g-A,A<T){for(T-=A;F[u++]=x[P++],--A;);P=u-_,R=F}}else if(v<A){if(P+=g+v-A,(A-=v)<T){for(T-=A;F[u++]=x[P++],--A;);if(P=0,v<T){for(T-=A=v;F[u++]=x[P++],--A;);P=u-_,R=F}}}else if(P+=v-A,A<T){for(T-=A;F[u++]=x[P++],--A;);P=u-_,R=F}for(;2<T;)F[u++]=R[P++],F[u++]=R[P++],F[u++]=R[P++],T-=3;T&&(F[u++]=R[P++],1<T&&(F[u++]=R[P++]))}else{for(P=u-_;F[u++]=F[P++],F[u++]=F[P++],F[u++]=F[P++],2<(T-=3););T&&(F[u++]=F[P++],1<T&&(F[u++]=F[P++]))}break}}break}}while(l<c&&u<d);l-=T=y>>3,O&=(1<<(y-=T<<3))-1,o.next_in=l,o.next_out=u,o.avail_in=l<c?c-l+5:5-(l-c),o.avail_out=u<d?d-u+257:257-(u-d),a.hold=O,a.bits=y}},{}],49:[function(n,r,i){var o=n("../utils/common"),s=n("./adler32"),a=n("./crc32"),l=n("./inffast"),c=n("./inftrees"),u=1,f=2,d=0,h=-2,g=1,p=852,v=592;function x(P){return(P>>>24&255)+(P>>>8&65280)+((65280&P)<<8)+((255&P)<<24)}function O(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(P){var R;return P&&P.state?(R=P.state,P.total_in=P.total_out=R.total=0,P.msg="",R.wrap&&(P.adler=1&R.wrap),R.mode=g,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new o.Buf32(p),R.distcode=R.distdyn=new o.Buf32(v),R.sane=1,R.back=-1,d):h}function w(P){var R;return P&&P.state?((R=P.state).wsize=0,R.whave=0,R.wnext=0,y(P)):h}function b(P,R){var k,F;return P&&P.state?(F=P.state,R<0?(k=0,R=-R):(k=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15<R)?h:(F.window!==null&&F.wbits!==R&&(F.window=null),F.wrap=k,F.wbits=R,w(P))):h}function S(P,R){var k,F;return P?(F=new O,(P.state=F).window=null,(k=b(P,R))!==d&&(P.state=null),k):h}var C,I,A=!0;function T(P){if(A){var R;for(C=new o.Buf32(512),I=new o.Buf32(32),R=0;R<144;)P.lens[R++]=8;for(;R<256;)P.lens[R++]=9;for(;R<280;)P.lens[R++]=7;for(;R<288;)P.lens[R++]=8;for(c(u,P.lens,0,288,C,0,P.work,{bits:9}),R=0;R<32;)P.lens[R++]=5;c(f,P.lens,0,32,I,0,P.work,{bits:5}),A=!1}P.lencode=C,P.lenbits=9,P.distcode=I,P.distbits=5}function _(P,R,k,F){var W,X=P.state;return X.window===null&&(X.wsize=1<<X.wbits,X.wnext=0,X.whave=0,X.window=new o.Buf8(X.wsize)),F>=X.wsize?(o.arraySet(X.window,R,k-X.wsize,X.wsize,0),X.wnext=0,X.whave=X.wsize):(F<(W=X.wsize-X.wnext)&&(W=F),o.arraySet(X.window,R,k-F,W,X.wnext),(F-=W)?(o.arraySet(X.window,R,k-F,F,0),X.wnext=F,X.whave=X.wsize):(X.wnext+=W,X.wnext===X.wsize&&(X.wnext=0),X.whave<X.wsize&&(X.whave+=W))),0}i.inflateReset=w,i.inflateReset2=b,i.inflateResetKeep=y,i.inflateInit=function(P){return S(P,15)},i.inflateInit2=S,i.inflate=function(P,R){var k,F,W,X,q,Y,L,M,j,Q,N,G,U,ue,H,he,pe,me,ae,xe,E,re,ie,Z,V=0,ee=new o.Buf8(4),de=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!P||!P.state||!P.output||!P.input&&P.avail_in!==0)return h;(k=P.state).mode===12&&(k.mode=13),q=P.next_out,W=P.output,L=P.avail_out,X=P.next_in,F=P.input,Y=P.avail_in,M=k.hold,j=k.bits,Q=Y,N=L,re=d;e:for(;;)switch(k.mode){case g:if(k.wrap===0){k.mode=13;break}for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(2&k.wrap&&M===35615){ee[k.check=0]=255&M,ee[1]=M>>>8&255,k.check=a(k.check,ee,2,0),j=M=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&M)<<8)+(M>>8))%31){P.msg="incorrect header check",k.mode=30;break}if((15&M)!=8){P.msg="unknown compression method",k.mode=30;break}if(j-=4,E=8+(15&(M>>>=4)),k.wbits===0)k.wbits=E;else if(E>k.wbits){P.msg="invalid window size",k.mode=30;break}k.dmax=1<<E,P.adler=k.check=1,k.mode=512&M?10:12,j=M=0;break;case 2:for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(k.flags=M,(255&k.flags)!=8){P.msg="unknown compression method",k.mode=30;break}if(57344&k.flags){P.msg="unknown header flags set",k.mode=30;break}k.head&&(k.head.text=M>>8&1),512&k.flags&&(ee[0]=255&M,ee[1]=M>>>8&255,k.check=a(k.check,ee,2,0)),j=M=0,k.mode=3;case 3:for(;j<32;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.head&&(k.head.time=M),512&k.flags&&(ee[0]=255&M,ee[1]=M>>>8&255,ee[2]=M>>>16&255,ee[3]=M>>>24&255,k.check=a(k.check,ee,4,0)),j=M=0,k.mode=4;case 4:for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.head&&(k.head.xflags=255&M,k.head.os=M>>8),512&k.flags&&(ee[0]=255&M,ee[1]=M>>>8&255,k.check=a(k.check,ee,2,0)),j=M=0,k.mode=5;case 5:if(1024&k.flags){for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.length=M,k.head&&(k.head.extra_len=M),512&k.flags&&(ee[0]=255&M,ee[1]=M>>>8&255,k.check=a(k.check,ee,2,0)),j=M=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&(Y<(G=k.length)&&(G=Y),G&&(k.head&&(E=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),o.arraySet(k.head.extra,F,X,G,E)),512&k.flags&&(k.check=a(k.check,F,G,X)),Y-=G,X+=G,k.length-=G),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(Y===0)break e;for(G=0;E=F[X+G++],k.head&&E&&k.length<65536&&(k.head.name+=String.fromCharCode(E)),E&&G<Y;);if(512&k.flags&&(k.check=a(k.check,F,G,X)),Y-=G,X+=G,E)break e}else k.head&&(k.head.name=null);k.length=0,k.mode=8;case 8:if(4096&k.flags){if(Y===0)break e;for(G=0;E=F[X+G++],k.head&&E&&k.length<65536&&(k.head.comment+=String.fromCharCode(E)),E&&G<Y;);if(512&k.flags&&(k.check=a(k.check,F,G,X)),Y-=G,X+=G,E)break e}else k.head&&(k.head.comment=null);k.mode=9;case 9:if(512&k.flags){for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(M!==(65535&k.check)){P.msg="header crc mismatch",k.mode=30;break}j=M=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),P.adler=k.check=0,k.mode=12;break;case 10:for(;j<32;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}P.adler=k.check=x(M),j=M=0,k.mode=11;case 11:if(k.havedict===0)return P.next_out=q,P.avail_out=L,P.next_in=X,P.avail_in=Y,k.hold=M,k.bits=j,2;P.adler=k.check=1,k.mode=12;case 12:if(R===5||R===6)break e;case 13:if(k.last){M>>>=7&j,j-=7&j,k.mode=27;break}for(;j<3;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}switch(k.last=1&M,j-=1,3&(M>>>=1)){case 0:k.mode=14;break;case 1:if(T(k),k.mode=20,R!==6)break;M>>>=2,j-=2;break e;case 2:k.mode=17;break;case 3:P.msg="invalid block type",k.mode=30}M>>>=2,j-=2;break;case 14:for(M>>>=7&j,j-=7&j;j<32;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if((65535&M)!=(M>>>16^65535)){P.msg="invalid stored block lengths",k.mode=30;break}if(k.length=65535&M,j=M=0,k.mode=15,R===6)break e;case 15:k.mode=16;case 16:if(G=k.length){if(Y<G&&(G=Y),L<G&&(G=L),G===0)break e;o.arraySet(W,F,X,G,q),Y-=G,X+=G,L-=G,q+=G,k.length-=G;break}k.mode=12;break;case 17:for(;j<14;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(k.nlen=257+(31&M),M>>>=5,j-=5,k.ndist=1+(31&M),M>>>=5,j-=5,k.ncode=4+(15&M),M>>>=4,j-=4,286<k.nlen||30<k.ndist){P.msg="too many length or distance symbols",k.mode=30;break}k.have=0,k.mode=18;case 18:for(;k.have<k.ncode;){for(;j<3;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.lens[de[k.have++]]=7&M,M>>>=3,j-=3}for(;k.have<19;)k.lens[de[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,ie={bits:k.lenbits},re=c(0,k.lens,0,19,k.lencode,0,k.work,ie),k.lenbits=ie.bits,re){P.msg="invalid code lengths set",k.mode=30;break}k.have=0,k.mode=19;case 19:for(;k.have<k.nlen+k.ndist;){for(;he=(V=k.lencode[M&(1<<k.lenbits)-1])>>>16&255,pe=65535&V,!((H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(pe<16)M>>>=H,j-=H,k.lens[k.have++]=pe;else{if(pe===16){for(Z=H+2;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(M>>>=H,j-=H,k.have===0){P.msg="invalid bit length repeat",k.mode=30;break}E=k.lens[k.have-1],G=3+(3&M),M>>>=2,j-=2}else if(pe===17){for(Z=H+3;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}j-=H,E=0,G=3+(7&(M>>>=H)),M>>>=3,j-=3}else{for(Z=H+7;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}j-=H,E=0,G=11+(127&(M>>>=H)),M>>>=7,j-=7}if(k.have+G>k.nlen+k.ndist){P.msg="invalid bit length repeat",k.mode=30;break}for(;G--;)k.lens[k.have++]=E}}if(k.mode===30)break;if(k.lens[256]===0){P.msg="invalid code -- missing end-of-block",k.mode=30;break}if(k.lenbits=9,ie={bits:k.lenbits},re=c(u,k.lens,0,k.nlen,k.lencode,0,k.work,ie),k.lenbits=ie.bits,re){P.msg="invalid literal/lengths set",k.mode=30;break}if(k.distbits=6,k.distcode=k.distdyn,ie={bits:k.distbits},re=c(f,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,ie),k.distbits=ie.bits,re){P.msg="invalid distances set",k.mode=30;break}if(k.mode=20,R===6)break e;case 20:k.mode=21;case 21:if(6<=Y&&258<=L){P.next_out=q,P.avail_out=L,P.next_in=X,P.avail_in=Y,k.hold=M,k.bits=j,l(P,N),q=P.next_out,W=P.output,L=P.avail_out,X=P.next_in,F=P.input,Y=P.avail_in,M=k.hold,j=k.bits,k.mode===12&&(k.back=-1);break}for(k.back=0;he=(V=k.lencode[M&(1<<k.lenbits)-1])>>>16&255,pe=65535&V,!((H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(he&&(240&he)==0){for(me=H,ae=he,xe=pe;he=(V=k.lencode[xe+((M&(1<<me+ae)-1)>>me)])>>>16&255,pe=65535&V,!(me+(H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}M>>>=me,j-=me,k.back+=me}if(M>>>=H,j-=H,k.back+=H,k.length=pe,he===0){k.mode=26;break}if(32&he){k.back=-1,k.mode=12;break}if(64&he){P.msg="invalid literal/length code",k.mode=30;break}k.extra=15&he,k.mode=22;case 22:if(k.extra){for(Z=k.extra;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.length+=M&(1<<k.extra)-1,M>>>=k.extra,j-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;he=(V=k.distcode[M&(1<<k.distbits)-1])>>>16&255,pe=65535&V,!((H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if((240&he)==0){for(me=H,ae=he,xe=pe;he=(V=k.distcode[xe+((M&(1<<me+ae)-1)>>me)])>>>16&255,pe=65535&V,!(me+(H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}M>>>=me,j-=me,k.back+=me}if(M>>>=H,j-=H,k.back+=H,64&he){P.msg="invalid distance code",k.mode=30;break}k.offset=pe,k.extra=15&he,k.mode=24;case 24:if(k.extra){for(Z=k.extra;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.offset+=M&(1<<k.extra)-1,M>>>=k.extra,j-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){P.msg="invalid distance too far back",k.mode=30;break}k.mode=25;case 25:if(L===0)break e;if(G=N-L,k.offset>G){if((G=k.offset-G)>k.whave&&k.sane){P.msg="invalid distance too far back",k.mode=30;break}U=G>k.wnext?(G-=k.wnext,k.wsize-G):k.wnext-G,G>k.length&&(G=k.length),ue=k.window}else ue=W,U=q-k.offset,G=k.length;for(L<G&&(G=L),L-=G,k.length-=G;W[q++]=ue[U++],--G;);k.length===0&&(k.mode=21);break;case 26:if(L===0)break e;W[q++]=k.length,L--,k.mode=21;break;case 27:if(k.wrap){for(;j<32;){if(Y===0)break e;Y--,M|=F[X++]<<j,j+=8}if(N-=L,P.total_out+=N,k.total+=N,N&&(P.adler=k.check=k.flags?a(k.check,W,N,q-N):s(k.check,W,N,q-N)),N=L,(k.flags?M:x(M))!==k.check){P.msg="incorrect data check",k.mode=30;break}j=M=0}k.mode=28;case 28:if(k.wrap&&k.flags){for(;j<32;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(M!==(4294967295&k.total)){P.msg="incorrect length check",k.mode=30;break}j=M=0}k.mode=29;case 29:re=1;break e;case 30:re=-3;break e;case 31:return-4;case 32:default:return h}return P.next_out=q,P.avail_out=L,P.next_in=X,P.avail_in=Y,k.hold=M,k.bits=j,(k.wsize||N!==P.avail_out&&k.mode<30&&(k.mode<27||R!==4))&&_(P,P.output,P.next_out,N-P.avail_out)?(k.mode=31,-4):(Q-=P.avail_in,N-=P.avail_out,P.total_in+=Q,P.total_out+=N,k.total+=N,k.wrap&&N&&(P.adler=k.check=k.flags?a(k.check,W,N,P.next_out-N):s(k.check,W,N,P.next_out-N)),P.data_type=k.bits+(k.last?64:0)+(k.mode===12?128:0)+(k.mode===20||k.mode===15?256:0),(Q==0&&N===0||R===4)&&re===d&&(re=-5),re)},i.inflateEnd=function(P){if(!P||!P.state)return h;var R=P.state;return R.window&&(R.window=null),P.state=null,d},i.inflateGetHeader=function(P,R){var k;return P&&P.state?(2&(k=P.state).wrap)==0?h:((k.head=R).done=!1,d):h},i.inflateSetDictionary=function(P,R){var k,F=R.length;return P&&P.state?(k=P.state).wrap!==0&&k.mode!==11?h:k.mode===11&&s(1,R,F,0)!==k.check?-3:_(P,R,F,F)?(k.mode=31,-4):(k.havedict=1,d):h},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,i){var o=n("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(u,f,d,h,g,p,v,x){var O,y,w,b,S,C,I,A,T,_=x.bits,P=0,R=0,k=0,F=0,W=0,X=0,q=0,Y=0,L=0,M=0,j=null,Q=0,N=new o.Buf16(16),G=new o.Buf16(16),U=null,ue=0;for(P=0;P<=15;P++)N[P]=0;for(R=0;R<h;R++)N[f[d+R]]++;for(W=_,F=15;1<=F&&N[F]===0;F--);if(F<W&&(W=F),F===0)return g[p++]=20971520,g[p++]=20971520,x.bits=1,0;for(k=1;k<F&&N[k]===0;k++);for(W<k&&(W=k),P=Y=1;P<=15;P++)if(Y<<=1,(Y-=N[P])<0)return-1;if(0<Y&&(u===0||F!==1))return-1;for(G[1]=0,P=1;P<15;P++)G[P+1]=G[P]+N[P];for(R=0;R<h;R++)f[d+R]!==0&&(v[G[f[d+R]]++]=R);if(C=u===0?(j=U=v,19):u===1?(j=s,Q-=257,U=a,ue-=257,256):(j=l,U=c,-1),P=k,S=p,q=R=M=0,w=-1,b=(L=1<<(X=W))-1,u===1&&852<L||u===2&&592<L)return 1;for(;;){for(I=P-q,T=v[R]<C?(A=0,v[R]):v[R]>C?(A=U[ue+v[R]],j[Q+v[R]]):(A=96,0),O=1<<P-q,k=y=1<<X;g[S+(M>>q)+(y-=O)]=I<<24|A<<16|T|0,y!==0;);for(O=1<<P-1;M&O;)O>>=1;if(O!==0?(M&=O-1,M+=O):M=0,R++,--N[P]==0){if(P===F)break;P=f[d+v[R]]}if(W<P&&(M&b)!==w){for(q===0&&(q=W),S+=k,Y=1<<(X=P-q);X+q<F&&!((Y-=N[X+q])<=0);)X++,Y<<=1;if(L+=1<<X,u===1&&852<L||u===2&&592<L)return 1;g[w=M&b]=W<<24|X<<16|S-p|0}}return M!==0&&(g[S+M]=P-q<<24|64<<16|0),x.bits=W,0}},{"../utils/common":41}],51:[function(n,r,i){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,i){var o=n("../utils/common"),s=0,a=1;function l(V){for(var ee=V.length;0<=--ee;)V[ee]=0}var c=0,u=29,f=256,d=f+1+u,h=30,g=19,p=2*d+1,v=15,x=16,O=7,y=256,w=16,b=17,S=18,C=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],_=new Array(2*(d+2));l(_);var P=new Array(2*h);l(P);var R=new Array(512);l(R);var k=new Array(256);l(k);var F=new Array(u);l(F);var W,X,q,Y=new Array(h);function L(V,ee,de,se,ne){this.static_tree=V,this.extra_bits=ee,this.extra_base=de,this.elems=se,this.max_length=ne,this.has_stree=V&&V.length}function M(V,ee){this.dyn_tree=V,this.max_code=0,this.stat_desc=ee}function j(V){return V<256?R[V]:R[256+(V>>>7)]}function Q(V,ee){V.pending_buf[V.pending++]=255&ee,V.pending_buf[V.pending++]=ee>>>8&255}function N(V,ee,de){V.bi_valid>x-de?(V.bi_buf|=ee<<V.bi_valid&65535,Q(V,V.bi_buf),V.bi_buf=ee>>x-V.bi_valid,V.bi_valid+=de-x):(V.bi_buf|=ee<<V.bi_valid&65535,V.bi_valid+=de)}function G(V,ee,de){N(V,de[2*ee],de[2*ee+1])}function U(V,ee){for(var de=0;de|=1&V,V>>>=1,de<<=1,0<--ee;);return de>>>1}function ue(V,ee,de){var se,ne,K=new Array(v+1),J=0;for(se=1;se<=v;se++)K[se]=J=J+de[se-1]<<1;for(ne=0;ne<=ee;ne++){var oe=V[2*ne+1];oe!==0&&(V[2*ne]=U(K[oe]++,oe))}}function H(V){var ee;for(ee=0;ee<d;ee++)V.dyn_ltree[2*ee]=0;for(ee=0;ee<h;ee++)V.dyn_dtree[2*ee]=0;for(ee=0;ee<g;ee++)V.bl_tree[2*ee]=0;V.dyn_ltree[2*y]=1,V.opt_len=V.static_len=0,V.last_lit=V.matches=0}function he(V){8<V.bi_valid?Q(V,V.bi_buf):0<V.bi_valid&&(V.pending_buf[V.pending++]=V.bi_buf),V.bi_buf=0,V.bi_valid=0}function pe(V,ee,de,se){var ne=2*ee,K=2*de;return V[ne]<V[K]||V[ne]===V[K]&&se[ee]<=se[de]}function me(V,ee,de){for(var se=V.heap[de],ne=de<<1;ne<=V.heap_len&&(ne<V.heap_len&&pe(ee,V.heap[ne+1],V.heap[ne],V.depth)&&ne++,!pe(ee,se,V.heap[ne],V.depth));)V.heap[de]=V.heap[ne],de=ne,ne<<=1;V.heap[de]=se}function ae(V,ee,de){var se,ne,K,J,oe=0;if(V.last_lit!==0)for(;se=V.pending_buf[V.d_buf+2*oe]<<8|V.pending_buf[V.d_buf+2*oe+1],ne=V.pending_buf[V.l_buf+oe],oe++,se===0?G(V,ne,ee):(G(V,(K=k[ne])+f+1,ee),(J=C[K])!==0&&N(V,ne-=F[K],J),G(V,K=j(--se),de),(J=I[K])!==0&&N(V,se-=Y[K],J)),oe<V.last_lit;);G(V,y,ee)}function xe(V,ee){var de,se,ne,K=ee.dyn_tree,J=ee.stat_desc.static_tree,oe=ee.stat_desc.has_stree,Oe=ee.stat_desc.elems,Be=-1;for(V.heap_len=0,V.heap_max=p,de=0;de<Oe;de++)K[2*de]!==0?(V.heap[++V.heap_len]=Be=de,V.depth[de]=0):K[2*de+1]=0;for(;V.heap_len<2;)K[2*(ne=V.heap[++V.heap_len]=Be<2?++Be:0)]=1,V.depth[ne]=0,V.opt_len--,oe&&(V.static_len-=J[2*ne+1]);for(ee.max_code=Be,de=V.heap_len>>1;1<=de;de--)me(V,K,de);for(ne=Oe;de=V.heap[1],V.heap[1]=V.heap[V.heap_len--],me(V,K,1),se=V.heap[1],V.heap[--V.heap_max]=de,V.heap[--V.heap_max]=se,K[2*ne]=K[2*de]+K[2*se],V.depth[ne]=(V.depth[de]>=V.depth[se]?V.depth[de]:V.depth[se])+1,K[2*de+1]=K[2*se+1]=ne,V.heap[1]=ne++,me(V,K,1),2<=V.heap_len;);V.heap[--V.heap_max]=V.heap[1],function(Te,Jt){var wr,Mt,Rt,Ye,Zt,ii,Kt=Jt.dyn_tree,hn=Jt.max_code,or=Jt.stat_desc.static_tree,is=Jt.stat_desc.has_stree,Wi=Jt.stat_desc.extra_bits,mo=Jt.stat_desc.extra_base,Sr=Jt.stat_desc.max_length,pn=0;for(Ye=0;Ye<=v;Ye++)Te.bl_count[Ye]=0;for(Kt[2*Te.heap[Te.heap_max]+1]=0,wr=Te.heap_max+1;wr<p;wr++)Sr<(Ye=Kt[2*Kt[2*(Mt=Te.heap[wr])+1]+1]+1)&&(Ye=Sr,pn++),Kt[2*Mt+1]=Ye,hn<Mt||(Te.bl_count[Ye]++,Zt=0,mo<=Mt&&(Zt=Wi[Mt-mo]),ii=Kt[2*Mt],Te.opt_len+=ii*(Ye+Zt),is&&(Te.static_len+=ii*(or[2*Mt+1]+Zt)));if(pn!==0){do{for(Ye=Sr-1;Te.bl_count[Ye]===0;)Ye--;Te.bl_count[Ye]--,Te.bl_count[Ye+1]+=2,Te.bl_count[Sr]--,pn-=2}while(0<pn);for(Ye=Sr;Ye!==0;Ye--)for(Mt=Te.bl_count[Ye];Mt!==0;)hn<(Rt=Te.heap[--wr])||(Kt[2*Rt+1]!==Ye&&(Te.opt_len+=(Ye-Kt[2*Rt+1])*Kt[2*Rt],Kt[2*Rt+1]=Ye),Mt--)}}(V,ee),ue(K,Be,V.bl_count)}function E(V,ee,de){var se,ne,K=-1,J=ee[1],oe=0,Oe=7,Be=4;for(J===0&&(Oe=138,Be=3),ee[2*(de+1)+1]=65535,se=0;se<=de;se++)ne=J,J=ee[2*(se+1)+1],++oe<Oe&&ne===J||(oe<Be?V.bl_tree[2*ne]+=oe:ne!==0?(ne!==K&&V.bl_tree[2*ne]++,V.bl_tree[2*w]++):oe<=10?V.bl_tree[2*b]++:V.bl_tree[2*S]++,K=ne,Be=(oe=0)===J?(Oe=138,3):ne===J?(Oe=6,3):(Oe=7,4))}function re(V,ee,de){var se,ne,K=-1,J=ee[1],oe=0,Oe=7,Be=4;for(J===0&&(Oe=138,Be=3),se=0;se<=de;se++)if(ne=J,J=ee[2*(se+1)+1],!(++oe<Oe&&ne===J)){if(oe<Be)for(;G(V,ne,V.bl_tree),--oe!=0;);else ne!==0?(ne!==K&&(G(V,ne,V.bl_tree),oe--),G(V,w,V.bl_tree),N(V,oe-3,2)):oe<=10?(G(V,b,V.bl_tree),N(V,oe-3,3)):(G(V,S,V.bl_tree),N(V,oe-11,7));K=ne,Be=(oe=0)===J?(Oe=138,3):ne===J?(Oe=6,3):(Oe=7,4)}}l(Y);var ie=!1;function Z(V,ee,de,se){N(V,(c<<1)+(se?1:0),3),function(ne,K,J,oe){he(ne),Q(ne,J),Q(ne,~J),o.arraySet(ne.pending_buf,ne.window,K,J,ne.pending),ne.pending+=J}(V,ee,de)}i._tr_init=function(V){ie||(function(){var ee,de,se,ne,K,J=new Array(v+1);for(ne=se=0;ne<u-1;ne++)for(F[ne]=se,ee=0;ee<1<<C[ne];ee++)k[se++]=ne;for(k[se-1]=ne,ne=K=0;ne<16;ne++)for(Y[ne]=K,ee=0;ee<1<<I[ne];ee++)R[K++]=ne;for(K>>=7;ne<h;ne++)for(Y[ne]=K<<7,ee=0;ee<1<<I[ne]-7;ee++)R[256+K++]=ne;for(de=0;de<=v;de++)J[de]=0;for(ee=0;ee<=143;)_[2*ee+1]=8,ee++,J[8]++;for(;ee<=255;)_[2*ee+1]=9,ee++,J[9]++;for(;ee<=279;)_[2*ee+1]=7,ee++,J[7]++;for(;ee<=287;)_[2*ee+1]=8,ee++,J[8]++;for(ue(_,d+1,J),ee=0;ee<h;ee++)P[2*ee+1]=5,P[2*ee]=U(ee,5);W=new L(_,C,f+1,d,v),X=new L(P,I,0,h,v),q=new L(new Array(0),A,0,g,O)}(),ie=!0),V.l_desc=new M(V.dyn_ltree,W),V.d_desc=new M(V.dyn_dtree,X),V.bl_desc=new M(V.bl_tree,q),V.bi_buf=0,V.bi_valid=0,H(V)},i._tr_stored_block=Z,i._tr_flush_block=function(V,ee,de,se){var ne,K,J=0;0<V.level?(V.strm.data_type===2&&(V.strm.data_type=function(oe){var Oe,Be=4093624447;for(Oe=0;Oe<=31;Oe++,Be>>>=1)if(1&Be&&oe.dyn_ltree[2*Oe]!==0)return s;if(oe.dyn_ltree[18]!==0||oe.dyn_ltree[20]!==0||oe.dyn_ltree[26]!==0)return a;for(Oe=32;Oe<f;Oe++)if(oe.dyn_ltree[2*Oe]!==0)return a;return s}(V)),xe(V,V.l_desc),xe(V,V.d_desc),J=function(oe){var Oe;for(E(oe,oe.dyn_ltree,oe.l_desc.max_code),E(oe,oe.dyn_dtree,oe.d_desc.max_code),xe(oe,oe.bl_desc),Oe=g-1;3<=Oe&&oe.bl_tree[2*T[Oe]+1]===0;Oe--);return oe.opt_len+=3*(Oe+1)+5+5+4,Oe}(V),ne=V.opt_len+3+7>>>3,(K=V.static_len+3+7>>>3)<=ne&&(ne=K)):ne=K=de+5,de+4<=ne&&ee!==-1?Z(V,ee,de,se):V.strategy===4||K===ne?(N(V,2+(se?1:0),3),ae(V,_,P)):(N(V,4+(se?1:0),3),function(oe,Oe,Be,Te){var Jt;for(N(oe,Oe-257,5),N(oe,Be-1,5),N(oe,Te-4,4),Jt=0;Jt<Te;Jt++)N(oe,oe.bl_tree[2*T[Jt]+1],3);re(oe,oe.dyn_ltree,Oe-1),re(oe,oe.dyn_dtree,Be-1)}(V,V.l_desc.max_code+1,V.d_desc.max_code+1,J+1),ae(V,V.dyn_ltree,V.dyn_dtree)),H(V),se&&he(V)},i._tr_tally=function(V,ee,de){return V.pending_buf[V.d_buf+2*V.last_lit]=ee>>>8&255,V.pending_buf[V.d_buf+2*V.last_lit+1]=255&ee,V.pending_buf[V.l_buf+V.last_lit]=255&de,V.last_lit++,ee===0?V.dyn_ltree[2*de]++:(V.matches++,ee--,V.dyn_ltree[2*(k[de]+f+1)]++,V.dyn_dtree[2*j(ee)]++),V.last_lit===V.lit_bufsize-1},i._tr_align=function(V){N(V,2,3),G(V,y,_),function(ee){ee.bi_valid===16?(Q(ee,ee.bi_buf),ee.bi_buf=0,ee.bi_valid=0):8<=ee.bi_valid&&(ee.pending_buf[ee.pending++]=255&ee.bi_buf,ee.bi_buf>>=8,ee.bi_valid-=8)}(V)}},{"../utils/common":41}],53:[function(n,r,i){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,i){(function(o){(function(s,a){if(!s.setImmediate){var l,c,u,f,d=1,h={},g=!1,p=s.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(s);v=v&&v.setTimeout?v:s,l={}.toString.call(s.process)==="[object process]"?function(w){process.nextTick(function(){O(w)})}:function(){if(s.postMessage&&!s.importScripts){var w=!0,b=s.onmessage;return s.onmessage=function(){w=!1},s.postMessage("","*"),s.onmessage=b,w}}()?(f="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",y,!1):s.attachEvent("onmessage",y),function(w){s.postMessage(f+w,"*")}):s.MessageChannel?((u=new MessageChannel).port1.onmessage=function(w){O(w.data)},function(w){u.port2.postMessage(w)}):p&&"onreadystatechange"in p.createElement("script")?(c=p.documentElement,function(w){var b=p.createElement("script");b.onreadystatechange=function(){O(w),b.onreadystatechange=null,c.removeChild(b),b=null},c.appendChild(b)}):function(w){setTimeout(O,0,w)},v.setImmediate=function(w){typeof w!="function"&&(w=new Function(""+w));for(var b=new Array(arguments.length-1),S=0;S<b.length;S++)b[S]=arguments[S+1];var C={callback:w,args:b};return h[d]=C,l(d),d++},v.clearImmediate=x}function x(w){delete h[w]}function O(w){if(g)setTimeout(O,0,w);else{var b=h[w];if(b){g=!0;try{(function(S){var C=S.callback,I=S.args;switch(I.length){case 0:C();break;case 1:C(I[0]);break;case 2:C(I[0],I[1]);break;case 3:C(I[0],I[1],I[2]);break;default:C.apply(a,I)}})(b)}finally{x(w),g=!1}}}}function y(w){w.source===s&&typeof w.data=="string"&&w.data.indexOf(f)===0&&O(+w.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof _e<"u"?_e:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(x8);var Tre=x8.exports;const _re=Qi(Tre);_re.support.nodebuffer=!1;const jre=t=>m.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:m.jsx("path",{d:"M12.85 4.64993L9.35 1.14993C9.30601 1.10107 9.25192 1.06236 9.19149 1.03646C9.13106 1.01056 9.06572 0.998095 9 0.999933H4C3.73502 1.00071 3.48112 1.10632 3.29375 1.29369C3.10638 1.48105 3.00078 1.73496 3 1.99993V13.9999C3.00078 14.2649 3.10638 14.5188 3.29375 14.7062C3.48112 14.8935 3.73502 14.9992 4 14.9999H12C12.265 14.9992 12.5189 14.8935 12.7062 14.7062C12.8936 14.5188 12.9992 14.2649 13 13.9999V4.99993C13.0018 4.93421 12.9894 4.86887 12.9635 4.80844C12.9376 4.74801 12.8989 4.69393 12.85 4.64993ZM9 2.19993L11.8 4.99993H9V2.19993ZM12 13.9999H4V1.99993H8V4.99993C8.00078 5.26491 8.10638 5.51881 8.29375 5.70618C8.48112 5.89355 8.73502 5.99916 9 5.99993H12V13.9999Z"})});$(jre).attrs(()=>({"data-component-name":"icons/DocumentBlankIcon/DocumentBlankIcon"}))`
498
+ \0`,N+=o(M,2),N+=S.magic,N+=o(y,2),N+=o(w,2),N+=o(L.crc32,4),N+=o(L.compressedSize,4),N+=o(L.uncompressedSize,4),N+=o(I.length,2),N+=o(F.length,2),{fileRecord:f.LOCAL_FILE_HEADER+N+I+F,dirRecord:f.CENTRAL_FILE_HEADER+o(Q,2)+N+o(_.length,2)+"\0\0\0\0"+o(j,4)+o(v,4)+I+F+_}}var a=n("../utils"),l=n("../stream/GenericWorker"),c=n("../utf8"),u=n("../crc32"),f=n("../signature");function d(h,g,p,v){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=p,this.encodeFileName=v,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(d,l),d.prototype.push=function(h){var g=h.meta.percent||0,p=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,l.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:p?(g+100*(p-v-1))/p:100}}))},d.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var g=this.streamFiles&&!h.file.dir;if(g){var p=s(h,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(h){this.accumulate=!1;var g=this.streamFiles&&!h.file.dir,p=s(h,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),g)this.push({data:function(v){return f.DATA_DESCRIPTOR+o(v.crc32,4)+o(v.compressedSize,4)+o(v.uncompressedSize,4)}(h),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var h=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var p=this.bytesWritten-h,v=function(x,O,y,w,b){var S=a.transformTo("string",b(w));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(x,2)+o(x,2)+o(O,4)+o(y,4)+o(S.length,2)+S}(this.dirRecords.length,p,h,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(h){this._sources.push(h);var g=this;return h.on("data",function(p){g.processChunk(p)}),h.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),h.on("error",function(p){g.error(p)}),this},d.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(h){var g=this._sources;if(!l.prototype.error.call(this,h))return!1;for(var p=0;p<g.length;p++)try{g[p].error(h)}catch{}return!0},d.prototype.lock=function(){l.prototype.lock.call(this);for(var h=this._sources,g=0;g<h.length;g++)h[g].lock()},r.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,i){var o=n("../compressions"),s=n("./ZipFileWorker");i.generateWorker=function(a,l,c){var u=new s(l.streamFiles,c,l.platform,l.encodeFileName),f=0;try{a.forEach(function(d,h){f++;var g=function(O,y){var w=O||y,b=o[w];if(!b)throw new Error(w+" is not a valid compression method !");return b}(h.options.compression,l.compression),p=h.options.compressionOptions||l.compressionOptions||{},v=h.dir,x=h.date;h._compressWorker(g,p).withStreamInfo("file",{name:d,dir:v,date:x,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(u)}),u.entriesCount=f}catch(d){u.error(d)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,i){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new o;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(o.prototype=n("./object")).loadAsync=n("./load"),o.support=n("./support"),o.defaults=n("./defaults"),o.version="3.10.1",o.loadAsync=function(s,a){return new o().loadAsync(s,a)},o.external=n("./external"),r.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,i){var o=n("./utils"),s=n("./external"),a=n("./utf8"),l=n("./zipEntries"),c=n("./stream/Crc32Probe"),u=n("./nodejsUtils");function f(d){return new s.Promise(function(h,g){var p=d.decompressed.getContentWorker().pipe(new c);p.on("error",function(v){g(v)}).on("end",function(){p.streamInfo.crc32!==d.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}r.exports=function(d,h){var g=this;return h=o.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),u.isNode&&u.isStream(d)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",d,!0,h.optimizedBinaryString,h.base64).then(function(p){var v=new l(h);return v.load(p),v}).then(function(p){var v=[s.Promise.resolve(p)],x=p.files;if(h.checkCRC32)for(var O=0;O<x.length;O++)v.push(f(x[O]));return s.Promise.all(v)}).then(function(p){for(var v=p.shift(),x=v.files,O=0;O<x.length;O++){var y=x[O],w=y.fileNameStr,b=o.resolve(y.fileNameStr);g.file(b,y.decompressed,{binary:!0,optimizedBinaryString:!0,date:y.date,dir:y.dir,comment:y.fileCommentStr.length?y.fileCommentStr:null,unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions,createFolders:h.createFolders}),y.dir||(g.file(b).unsafeOriginalName=w)}return v.zipComment.length&&(g.comment=v.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,i){var o=n("../utils"),s=n("../stream/GenericWorker");function a(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}o.inherits(a,s),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(u){c.push({data:u,meta:{percent:0}})}).on("error",function(u){c.isPaused?this.generatedError=u:c.error(u)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,i){var o=n("readable-stream").Readable;function s(a,l,c){o.call(this,l),this._helper=a;var u=this;a.on("data",function(f,d){u.push(f)||u._helper.pause(),c&&c(d)}).on("error",function(f){u.emit("error",f)}).on("end",function(){u.push(null)})}n("../utils").inherits(s,o),s.prototype._read=function(){this._helper.resume()},r.exports=s},{"../utils":32,"readable-stream":16}],14:[function(n,r,i){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,s);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,s)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var s=new Buffer(o);return s.fill(0),s},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(n,r,i){function o(b,S,C){var I,A=a.getTypeOf(S),T=a.extend(C||{},u);T.date=T.date||new Date,T.compression!==null&&(T.compression=T.compression.toUpperCase()),typeof T.unixPermissions=="string"&&(T.unixPermissions=parseInt(T.unixPermissions,8)),T.unixPermissions&&16384&T.unixPermissions&&(T.dir=!0),T.dosPermissions&&16&T.dosPermissions&&(T.dir=!0),T.dir&&(b=x(b)),T.createFolders&&(I=v(b))&&O.call(this,I,!0);var _=A==="string"&&T.binary===!1&&T.base64===!1;C&&C.binary!==void 0||(T.binary=!_),(S instanceof f&&S.uncompressedSize===0||T.dir||!S||S.length===0)&&(T.base64=!1,T.binary=!0,S="",T.compression="STORE",A="string");var P=null;P=S instanceof f||S instanceof l?S:g.isNode&&g.isStream(S)?new p(b,S):a.prepareContent(b,S,T.binary,T.optimizedBinaryString,T.base64);var R=new d(b,P,T);this.files[b]=R}var s=n("./utf8"),a=n("./utils"),l=n("./stream/GenericWorker"),c=n("./stream/StreamHelper"),u=n("./defaults"),f=n("./compressedObject"),d=n("./zipObject"),h=n("./generate"),g=n("./nodejsUtils"),p=n("./nodejs/NodejsStreamInputAdapter"),v=function(b){b.slice(-1)==="/"&&(b=b.substring(0,b.length-1));var S=b.lastIndexOf("/");return 0<S?b.substring(0,S):""},x=function(b){return b.slice(-1)!=="/"&&(b+="/"),b},O=function(b,S){return S=S!==void 0?S:u.createFolders,b=x(b),this.files[b]||o.call(this,b,null,{dir:!0,createFolders:S}),this.files[b]};function y(b){return Object.prototype.toString.call(b)==="[object RegExp]"}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(b){var S,C,I;for(S in this.files)I=this.files[S],(C=S.slice(this.root.length,S.length))&&S.slice(0,this.root.length)===this.root&&b(C,I)},filter:function(b){var S=[];return this.forEach(function(C,I){b(C,I)&&S.push(I)}),S},file:function(b,S,C){if(arguments.length!==1)return b=this.root+b,o.call(this,b,S,C),this;if(y(b)){var I=b;return this.filter(function(T,_){return!_.dir&&I.test(T)})}var A=this.files[this.root+b];return A&&!A.dir?A:null},folder:function(b){if(!b)return this;if(y(b))return this.filter(function(A,T){return T.dir&&b.test(A)});var S=this.root+b,C=O.call(this,S),I=this.clone();return I.root=C.name,I},remove:function(b){b=this.root+b;var S=this.files[b];if(S||(b.slice(-1)!=="/"&&(b+="/"),S=this.files[b]),S&&!S.dir)delete this.files[b];else for(var C=this.filter(function(A,T){return T.name.slice(0,b.length)===b}),I=0;I<C.length;I++)delete this.files[C[I].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(b){var S,C={};try{if((C=a.extend(b||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");a.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var I=C.comment||this.comment||"";S=h.generateWorker(this,C,I)}catch(A){(S=new l("error")).error(A)}return new c(S,C.type||"string",C.mimeType)},generateAsync:function(b,S){return this.generateInternalStream(b).accumulate(S)},generateNodeStream:function(b,S){return(b=b||{}).type||(b.type="nodebuffer"),this.generateInternalStream(b).toNodejsStream(S)}};r.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,i){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,i){var o=n("./DataReader");function s(a){o.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}n("../utils").inherits(s,o),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),u=a.charCodeAt(2),f=a.charCodeAt(3),d=this.length-4;0<=d;--d)if(this.data[d]===l&&this.data[d+1]===c&&this.data[d+2]===u&&this.data[d+3]===f)return d-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),u=a.charCodeAt(2),f=a.charCodeAt(3),d=this.readData(4);return l===d[0]&&c===d[1]&&u===d[2]&&f===d[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=s},{"../utils":32,"./DataReader":18}],18:[function(n,r,i){var o=n("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=s},{"../utils":32}],19:[function(n,r,i){var o=n("./Uint8ArrayReader");function s(a){o.call(this,a)}n("../utils").inherits(s,o),s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,i){var o=n("./DataReader");function s(a){o.call(this,a)}n("../utils").inherits(s,o),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=s},{"../utils":32,"./DataReader":18}],21:[function(n,r,i){var o=n("./ArrayReader");function s(a){o.call(this,a)}n("../utils").inherits(s,o),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,i){var o=n("../utils"),s=n("../support"),a=n("./ArrayReader"),l=n("./StringReader"),c=n("./NodeBufferReader"),u=n("./Uint8ArrayReader");r.exports=function(f){var d=o.getTypeOf(f);return o.checkSupport(d),d!=="string"||s.uint8array?d==="nodebuffer"?new c(f):s.uint8array?new u(o.transformTo("uint8array",f)):new a(o.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,i){var o=n("./GenericWorker"),s=n("../utils");function a(l){o.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(a,o),a.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,i){var o=n("./GenericWorker"),s=n("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,o),a.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,i){var o=n("../utils"),s=n("./GenericWorker");function a(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(a,s),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,i){var o=n("../utils"),s=n("./GenericWorker");function a(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=o.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}o.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,i){function o(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(l){a.processChunk(l)}),s.on("end",function(){a.end()}),s.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},r.exports=o},{}],29:[function(n,r,i){var o=n("../utils"),s=n("./ConvertWorker"),a=n("./GenericWorker"),l=n("../base64"),c=n("../support"),u=n("../external"),f=null;if(c.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(g,p){return new u.Promise(function(v,x){var O=[],y=g._internalType,w=g._outputType,b=g._mimeType;g.on("data",function(S,C){O.push(S),p&&p(C)}).on("error",function(S){O=[],x(S)}).on("end",function(){try{var S=function(C,I,A){switch(C){case"blob":return o.newBlob(o.transformTo("arraybuffer",I),A);case"base64":return l.encode(I);default:return o.transformTo(C,I)}}(w,function(C,I){var A,T=0,_=null,P=0;for(A=0;A<I.length;A++)P+=I[A].length;switch(C){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(_=new Uint8Array(P),A=0;A<I.length;A++)_.set(I[A],T),T+=I[A].length;return _;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+C+"'")}}(y,O),b);v(S)}catch(C){x(C)}O=[]}).resume()})}function h(g,p,v){var x=p;switch(p){case"blob":case"arraybuffer":x="uint8array";break;case"base64":x="string"}try{this._internalType=x,this._outputType=p,this._mimeType=v,o.checkSupport(x),this._worker=g.pipe(new s(x)),g.lock()}catch(O){this._worker=new a("error"),this._worker.error(O)}}h.prototype={accumulate:function(g){return d(this,g)},on:function(g,p){var v=this;return g==="data"?this._worker.on(g,function(x){p.call(v,x.data,x.meta)}):this._worker.on(g,function(){o.delay(p,arguments,v)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},g)}},r.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var o=new ArrayBuffer(0);try{i.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(o),i.blob=s.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!n("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,i){for(var o=n("./utils"),s=n("./support"),a=n("./nodejsUtils"),l=n("./stream/GenericWorker"),c=new Array(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;c[254]=c[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function d(){l.call(this,"utf-8 encode")}i.utf8encode=function(h){return s.nodebuffer?a.newBufferFrom(h,"utf-8"):function(g){var p,v,x,O,y,w=g.length,b=0;for(O=0;O<w;O++)(64512&(v=g.charCodeAt(O)))==55296&&O+1<w&&(64512&(x=g.charCodeAt(O+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),O++),b+=v<128?1:v<2048?2:v<65536?3:4;for(p=s.uint8array?new Uint8Array(b):new Array(b),O=y=0;y<b;O++)(64512&(v=g.charCodeAt(O)))==55296&&O+1<w&&(64512&(x=g.charCodeAt(O+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),O++),v<128?p[y++]=v:(v<2048?p[y++]=192|v>>>6:(v<65536?p[y++]=224|v>>>12:(p[y++]=240|v>>>18,p[y++]=128|v>>>12&63),p[y++]=128|v>>>6&63),p[y++]=128|63&v);return p}(h)},i.utf8decode=function(h){return s.nodebuffer?o.transformTo("nodebuffer",h).toString("utf-8"):function(g){var p,v,x,O,y=g.length,w=new Array(2*y);for(p=v=0;p<y;)if((x=g[p++])<128)w[v++]=x;else if(4<(O=c[x]))w[v++]=65533,p+=O-1;else{for(x&=O===2?31:O===3?15:7;1<O&&p<y;)x=x<<6|63&g[p++],O--;1<O?w[v++]=65533:x<65536?w[v++]=x:(x-=65536,w[v++]=55296|x>>10&1023,w[v++]=56320|1023&x)}return w.length!==v&&(w.subarray?w=w.subarray(0,v):w.length=v),o.applyFromCharCode(w)}(h=o.transformTo(s.uint8array?"uint8array":"array",h))},o.inherits(f,l),f.prototype.processChunk=function(h){var g=o.transformTo(s.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var p=g;(g=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),g.set(p,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var v=function(O,y){var w;for((y=y||O.length)>O.length&&(y=O.length),w=y-1;0<=w&&(192&O[w])==128;)w--;return w<0||w===0?y:w+c[O[w]]>y?w:y}(g),x=g;v!==g.length&&(s.uint8array?(x=g.subarray(0,v),this.leftOver=g.subarray(v,g.length)):(x=g.slice(0,v),this.leftOver=g.slice(v,g.length))),this.push({data:i.utf8decode(x),meta:h.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=f,o.inherits(d,l),d.prototype.processChunk=function(h){this.push({data:i.utf8encode(h.data),meta:h.meta})},i.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,i){var o=n("./support"),s=n("./base64"),a=n("./nodejsUtils"),l=n("./external");function c(p){return p}function u(p,v){for(var x=0;x<p.length;++x)v[x]=255&p.charCodeAt(x);return v}n("setimmediate"),i.newBlob=function(p,v){i.checkSupport("blob");try{return new Blob([p],{type:v})}catch{try{var x=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return x.append(p),x.getBlob(v)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(p,v,x){var O=[],y=0,w=p.length;if(w<=x)return String.fromCharCode.apply(null,p);for(;y<w;)v==="array"||v==="nodebuffer"?O.push(String.fromCharCode.apply(null,p.slice(y,Math.min(y+x,w)))):O.push(String.fromCharCode.apply(null,p.subarray(y,Math.min(y+x,w)))),y+=x;return O.join("")},stringifyByChar:function(p){for(var v="",x=0;x<p.length;x++)v+=String.fromCharCode(p[x]);return v},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function d(p){var v=65536,x=i.getTypeOf(p),O=!0;if(x==="uint8array"?O=f.applyCanBeUsed.uint8array:x==="nodebuffer"&&(O=f.applyCanBeUsed.nodebuffer),O)for(;1<v;)try{return f.stringifyByChunk(p,x,v)}catch{v=Math.floor(v/2)}return f.stringifyByChar(p)}function h(p,v){for(var x=0;x<p.length;x++)v[x]=p[x];return v}i.applyFromCharCode=d;var g={};g.string={string:c,array:function(p){return u(p,new Array(p.length))},arraybuffer:function(p){return g.string.uint8array(p).buffer},uint8array:function(p){return u(p,new Uint8Array(p.length))},nodebuffer:function(p){return u(p,a.allocBuffer(p.length))}},g.array={string:d,array:c,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(p)}},g.arraybuffer={string:function(p){return d(new Uint8Array(p))},array:function(p){return h(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:c,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(new Uint8Array(p))}},g.uint8array={string:d,array:function(p){return h(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:c,nodebuffer:function(p){return a.newBufferFrom(p)}},g.nodebuffer={string:d,array:function(p){return h(p,new Array(p.length))},arraybuffer:function(p){return g.nodebuffer.uint8array(p).buffer},uint8array:function(p){return h(p,new Uint8Array(p.length))},nodebuffer:c},i.transformTo=function(p,v){if(v=v||"",!p)return v;i.checkSupport(p);var x=i.getTypeOf(v);return g[x][p](v)},i.resolve=function(p){for(var v=p.split("/"),x=[],O=0;O<v.length;O++){var y=v[O];y==="."||y===""&&O!==0&&O!==v.length-1||(y===".."?x.pop():x.push(y))}return x.join("/")},i.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(p)?"nodebuffer":o.uint8array&&p instanceof Uint8Array?"uint8array":o.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(p){if(!o[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(p){var v,x,O="";for(x=0;x<(p||"").length;x++)O+="\\x"+((v=p.charCodeAt(x))<16?"0":"")+v.toString(16).toUpperCase();return O},i.delay=function(p,v,x){setImmediate(function(){p.apply(x||null,v||[])})},i.inherits=function(p,v){function x(){}x.prototype=v.prototype,p.prototype=new x},i.extend=function(){var p,v,x={};for(p=0;p<arguments.length;p++)for(v in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],v)&&x[v]===void 0&&(x[v]=arguments[p][v]);return x},i.prepareContent=function(p,v,x,O,y){return l.Promise.resolve(v).then(function(w){return o.blob&&(w instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(w))!==-1)&&typeof FileReader<"u"?new l.Promise(function(b,S){var C=new FileReader;C.onload=function(I){b(I.target.result)},C.onerror=function(I){S(I.target.error)},C.readAsArrayBuffer(w)}):w}).then(function(w){var b=i.getTypeOf(w);return b?(b==="arraybuffer"?w=i.transformTo("uint8array",w):b==="string"&&(y?w=s.decode(w):x&&O!==!0&&(w=function(S){return u(S,o.uint8array?new Uint8Array(S.length):new Array(S.length))}(w))),w):l.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,i){var o=n("./reader/readerFor"),s=n("./utils"),a=n("./signature"),l=n("./zipEntry"),c=n("./support");function u(f){this.files=[],this.loadOptions=f}u.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var d=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(d)+", expected "+s.pretty(f)+")")}},isSignature:function(f,d){var h=this.reader.index;this.reader.setIndex(f);var g=this.reader.readString(4)===d;return this.reader.setIndex(h),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),d=c.uint8array?"uint8array":"array",h=s.transformTo(d,f);this.zipComment=this.loadOptions.decodeFileName(h)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,d,h,g=this.zip64EndOfCentralSize-44;0<g;)f=this.reader.readInt(2),d=this.reader.readInt(4),h=this.reader.readData(d),this.zip64ExtensibleData[f]={id:f,length:d,value:h}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,d;for(f=0;f<this.files.length;f++)d=this.files[f],this.reader.setIndex(d.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),d.readLocalPart(this.reader),d.handleUTF8(),d.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var d=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var g=d-h;if(0<g)this.isSignature(d,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,i){var o=n("./reader/readerFor"),s=n("./utils"),a=n("./compressedObject"),l=n("./crc32"),c=n("./utf8"),u=n("./compressions"),f=n("./support");function d(h,g){this.options=h,this.loadOptions=g}d.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var g,p;if(h.skip(22),this.fileNameLength=h.readInt(2),p=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=function(v){for(var x in u)if(Object.prototype.hasOwnProperty.call(u,x)&&u[x].magic===v)return u[x];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var g=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(g),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=o(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var g,p,v,x=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<x;)g=h.readInt(2),p=h.readInt(2),v=h.readData(p),this.extraFields[g]={id:g,length:p,value:v};h.setIndex(x)},handleUTF8:function(){var h=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var p=s.transformTo(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var x=s.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(x)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var g=o(h.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:c.utf8decode(g.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var g=o(h.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:c.utf8decode(g.readData(h.length-5))}return null}},r.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,i){function o(g,p,v){this.name=g,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=p,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var s=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),l=n("./utf8"),c=n("./compressedObject"),u=n("./stream/GenericWorker");o.prototype={internalStream:function(g){var p=null,v="string";try{if(!g)throw new Error("No output type specified.");var x=(v=g.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),p=this._decompressWorker();var O=!this._dataBinary;O&&!x&&(p=p.pipe(new l.Utf8EncodeWorker)),!O&&x&&(p=p.pipe(new l.Utf8DecodeWorker))}catch(y){(p=new u("error")).error(y)}return new s(p,v,"")},async:function(g,p){return this.internalStream(g).accumulate(p)},nodeStream:function(g,p){return this.internalStream(g||"nodebuffer").toNodejsStream(p)},_compressWorker:function(g,p){if(this._data instanceof c&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(v,g,p)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof u?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<f.length;h++)o.prototype[f[h]]=d;r.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,i){(function(o){var s,a,l=o.MutationObserver||o.WebKitMutationObserver;if(l){var c=0,u=new l(g),f=o.document.createTextNode("");u.observe(f,{characterData:!0}),s=function(){f.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)s="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var p=o.document.createElement("script");p.onreadystatechange=function(){g(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},o.document.documentElement.appendChild(p)}:function(){setTimeout(g,0)};else{var d=new o.MessageChannel;d.port1.onmessage=g,s=function(){d.port2.postMessage(0)}}var h=[];function g(){var p,v;a=!0;for(var x=h.length;x;){for(v=h,h=[],p=-1;++p<x;)v[p]();x=h.length}a=!1}r.exports=function(p){h.push(p)!==1||a||s()}}).call(this,typeof _e<"u"?_e:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,i){var o=n("immediate");function s(){}var a={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];function f(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,x!==s&&p(this,x)}function d(x,O,y){this.promise=x,typeof O=="function"&&(this.onFulfilled=O,this.callFulfilled=this.otherCallFulfilled),typeof y=="function"&&(this.onRejected=y,this.callRejected=this.otherCallRejected)}function h(x,O,y){o(function(){var w;try{w=O(y)}catch(b){return a.reject(x,b)}w===x?a.reject(x,new TypeError("Cannot resolve promise with itself")):a.resolve(x,w)})}function g(x){var O=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof O=="function")return function(){O.apply(x,arguments)}}function p(x,O){var y=!1;function w(C){y||(y=!0,a.reject(x,C))}function b(C){y||(y=!0,a.resolve(x,C))}var S=v(function(){O(b,w)});S.status==="error"&&w(S.value)}function v(x,O){var y={};try{y.value=x(O),y.status="success"}catch(w){y.status="error",y.value=w}return y}(r.exports=f).prototype.finally=function(x){if(typeof x!="function")return this;var O=this.constructor;return this.then(function(y){return O.resolve(x()).then(function(){return y})},function(y){return O.resolve(x()).then(function(){throw y})})},f.prototype.catch=function(x){return this.then(null,x)},f.prototype.then=function(x,O){if(typeof x!="function"&&this.state===c||typeof O!="function"&&this.state===l)return this;var y=new this.constructor(s);return this.state!==u?h(y,this.state===c?x:O,this.outcome):this.queue.push(new d(y,x,O)),y},d.prototype.callFulfilled=function(x){a.resolve(this.promise,x)},d.prototype.otherCallFulfilled=function(x){h(this.promise,this.onFulfilled,x)},d.prototype.callRejected=function(x){a.reject(this.promise,x)},d.prototype.otherCallRejected=function(x){h(this.promise,this.onRejected,x)},a.resolve=function(x,O){var y=v(g,O);if(y.status==="error")return a.reject(x,y.value);var w=y.value;if(w)p(x,w);else{x.state=c,x.outcome=O;for(var b=-1,S=x.queue.length;++b<S;)x.queue[b].callFulfilled(O)}return x},a.reject=function(x,O){x.state=l,x.outcome=O;for(var y=-1,w=x.queue.length;++y<w;)x.queue[y].callRejected(O);return x},f.resolve=function(x){return x instanceof this?x:a.resolve(new this(s),x)},f.reject=function(x){var O=new this(s);return a.reject(O,x)},f.all=function(x){var O=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var y=x.length,w=!1;if(!y)return this.resolve([]);for(var b=new Array(y),S=0,C=-1,I=new this(s);++C<y;)A(x[C],C);return I;function A(T,_){O.resolve(T).then(function(P){b[_]=P,++S!==y||w||(w=!0,a.resolve(I,b))},function(P){w||(w=!0,a.reject(I,P))})}},f.race=function(x){var O=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var y=x.length,w=!1;if(!y)return this.resolve([]);for(var b=-1,S=new this(s);++b<y;)C=x[b],O.resolve(C).then(function(I){w||(w=!0,a.resolve(S,I))},function(I){w||(w=!0,a.reject(S,I))});var C;return S}},{immediate:36}],38:[function(n,r,i){var o={};(0,n("./lib/utils/common").assign)(o,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,i){var o=n("./zlib/deflate"),s=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/messages"),c=n("./zlib/zstream"),u=Object.prototype.toString,f=0,d=-1,h=0,g=8;function p(x){if(!(this instanceof p))return new p(x);this.options=s.assign({level:d,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},x||{});var O=this.options;O.raw&&0<O.windowBits?O.windowBits=-O.windowBits:O.gzip&&0<O.windowBits&&O.windowBits<16&&(O.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var y=o.deflateInit2(this.strm,O.level,O.method,O.windowBits,O.memLevel,O.strategy);if(y!==f)throw new Error(l[y]);if(O.header&&o.deflateSetHeader(this.strm,O.header),O.dictionary){var w;if(w=typeof O.dictionary=="string"?a.string2buf(O.dictionary):u.call(O.dictionary)==="[object ArrayBuffer]"?new Uint8Array(O.dictionary):O.dictionary,(y=o.deflateSetDictionary(this.strm,w))!==f)throw new Error(l[y]);this._dict_set=!0}}function v(x,O){var y=new p(O);if(y.push(x,!0),y.err)throw y.msg||l[y.err];return y.result}p.prototype.push=function(x,O){var y,w,b=this.strm,S=this.options.chunkSize;if(this.ended)return!1;w=O===~~O?O:O===!0?4:0,typeof x=="string"?b.input=a.string2buf(x):u.call(x)==="[object ArrayBuffer]"?b.input=new Uint8Array(x):b.input=x,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new s.Buf8(S),b.next_out=0,b.avail_out=S),(y=o.deflate(b,w))!==1&&y!==f)return this.onEnd(y),!(this.ended=!0);b.avail_out!==0&&(b.avail_in!==0||w!==4&&w!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(b.output,b.next_out))):this.onData(s.shrinkBuf(b.output,b.next_out)))}while((0<b.avail_in||b.avail_out===0)&&y!==1);return w===4?(y=o.deflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===f):w!==2||(this.onEnd(f),!(b.avail_out=0))},p.prototype.onData=function(x){this.chunks.push(x)},p.prototype.onEnd=function(x){x===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=x,this.msg=this.strm.msg},i.Deflate=p,i.deflate=v,i.deflateRaw=function(x,O){return(O=O||{}).raw=!0,v(x,O)},i.gzip=function(x,O){return(O=O||{}).gzip=!0,v(x,O)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,i){var o=n("./zlib/inflate"),s=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/constants"),c=n("./zlib/messages"),u=n("./zlib/zstream"),f=n("./zlib/gzheader"),d=Object.prototype.toString;function h(p){if(!(this instanceof h))return new h(p);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},p||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||p&&p.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&!(15&v.windowBits)&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var x=o.inflateInit2(this.strm,v.windowBits);if(x!==l.Z_OK)throw new Error(c[x]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function g(p,v){var x=new h(v);if(x.push(p,!0),x.err)throw x.msg||c[x.err];return x.result}h.prototype.push=function(p,v){var x,O,y,w,b,S,C=this.strm,I=this.options.chunkSize,A=this.options.dictionary,T=!1;if(this.ended)return!1;O=v===~~v?v:v===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof p=="string"?C.input=a.binstring2buf(p):d.call(p)==="[object ArrayBuffer]"?C.input=new Uint8Array(p):C.input=p,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new s.Buf8(I),C.next_out=0,C.avail_out=I),(x=o.inflate(C,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&A&&(S=typeof A=="string"?a.string2buf(A):d.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,x=o.inflateSetDictionary(this.strm,S)),x===l.Z_BUF_ERROR&&T===!0&&(x=l.Z_OK,T=!1),x!==l.Z_STREAM_END&&x!==l.Z_OK)return this.onEnd(x),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&x!==l.Z_STREAM_END&&(C.avail_in!==0||O!==l.Z_FINISH&&O!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(y=a.utf8border(C.output,C.next_out),w=C.next_out-y,b=a.buf2string(C.output,y),C.next_out=w,C.avail_out=I-w,w&&s.arraySet(C.output,C.output,y,w,0),this.onData(b)):this.onData(s.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(T=!0)}while((0<C.avail_in||C.avail_out===0)&&x!==l.Z_STREAM_END);return x===l.Z_STREAM_END&&(O=l.Z_FINISH),O===l.Z_FINISH?(x=o.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===l.Z_OK):O!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(C.avail_out=0))},h.prototype.onData=function(p){this.chunks.push(p)},h.prototype.onEnd=function(p){p===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},i.Inflate=h,i.inflate=g,i.inflateRaw=function(p,v){return(v=v||{}).raw=!0,g(p,v)},i.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,i){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var f in u)u.hasOwnProperty(f)&&(l[f]=u[f])}}return l},i.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,u,f,d){if(c.subarray&&l.subarray)l.set(c.subarray(u,u+f),d);else for(var h=0;h<f;h++)l[d+h]=c[u+h]},flattenChunks:function(l){var c,u,f,d,h,g;for(c=f=0,u=l.length;c<u;c++)f+=l[c].length;for(g=new Uint8Array(f),c=d=0,u=l.length;c<u;c++)h=l[c],g.set(h,d),d+=h.length;return g}},a={arraySet:function(l,c,u,f,d){for(var h=0;h<f;h++)l[d+h]=c[u+h]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,s)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(o)},{}],42:[function(n,r,i){var o=n("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new o.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function u(f,d){if(d<65537&&(f.subarray&&a||!f.subarray&&s))return String.fromCharCode.apply(null,o.shrinkBuf(f,d));for(var h="",g=0;g<d;g++)h+=String.fromCharCode(f[g]);return h}l[254]=l[254]=1,i.string2buf=function(f){var d,h,g,p,v,x=f.length,O=0;for(p=0;p<x;p++)(64512&(h=f.charCodeAt(p)))==55296&&p+1<x&&(64512&(g=f.charCodeAt(p+1)))==56320&&(h=65536+(h-55296<<10)+(g-56320),p++),O+=h<128?1:h<2048?2:h<65536?3:4;for(d=new o.Buf8(O),p=v=0;v<O;p++)(64512&(h=f.charCodeAt(p)))==55296&&p+1<x&&(64512&(g=f.charCodeAt(p+1)))==56320&&(h=65536+(h-55296<<10)+(g-56320),p++),h<128?d[v++]=h:(h<2048?d[v++]=192|h>>>6:(h<65536?d[v++]=224|h>>>12:(d[v++]=240|h>>>18,d[v++]=128|h>>>12&63),d[v++]=128|h>>>6&63),d[v++]=128|63&h);return d},i.buf2binstring=function(f){return u(f,f.length)},i.binstring2buf=function(f){for(var d=new o.Buf8(f.length),h=0,g=d.length;h<g;h++)d[h]=f.charCodeAt(h);return d},i.buf2string=function(f,d){var h,g,p,v,x=d||f.length,O=new Array(2*x);for(h=g=0;h<x;)if((p=f[h++])<128)O[g++]=p;else if(4<(v=l[p]))O[g++]=65533,h+=v-1;else{for(p&=v===2?31:v===3?15:7;1<v&&h<x;)p=p<<6|63&f[h++],v--;1<v?O[g++]=65533:p<65536?O[g++]=p:(p-=65536,O[g++]=55296|p>>10&1023,O[g++]=56320|1023&p)}return u(O,g)},i.utf8border=function(f,d){var h;for((d=d||f.length)>f.length&&(d=f.length),h=d-1;0<=h&&(192&f[h])==128;)h--;return h<0||h===0?d:h+l[f[h]]>d?h:d}},{"./common":41}],43:[function(n,r,i){r.exports=function(o,s,a,l){for(var c=65535&o|0,u=o>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;u=u+(c=c+s[l++]|0)|0,--f;);c%=65521,u%=65521}return c|u<<16|0}},{}],44:[function(n,r,i){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,i){var o=function(){for(var s,a=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;a[l]=s}return a}();r.exports=function(s,a,l,c){var u=o,f=c+l;s^=-1;for(var d=c;d<f;d++)s=s>>>8^u[255&(s^a[d])];return-1^s}},{}],46:[function(n,r,i){var o,s=n("../utils/common"),a=n("./trees"),l=n("./adler32"),c=n("./crc32"),u=n("./messages"),f=0,d=4,h=0,g=-2,p=-1,v=4,x=2,O=8,y=9,w=286,b=30,S=19,C=2*w+1,I=15,A=3,T=258,_=T+A+1,P=42,R=113,k=1,F=2,W=3,X=4;function q(E,re){return E.msg=u[re],re}function Y(E){return(E<<1)-(4<E?9:0)}function L(E){for(var re=E.length;0<=--re;)E[re]=0}function M(E){var re=E.state,ie=re.pending;ie>E.avail_out&&(ie=E.avail_out),ie!==0&&(s.arraySet(E.output,re.pending_buf,re.pending_out,ie,E.next_out),E.next_out+=ie,re.pending_out+=ie,E.total_out+=ie,E.avail_out-=ie,re.pending-=ie,re.pending===0&&(re.pending_out=0))}function j(E,re){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,re),E.block_start=E.strstart,M(E.strm)}function Q(E,re){E.pending_buf[E.pending++]=re}function N(E,re){E.pending_buf[E.pending++]=re>>>8&255,E.pending_buf[E.pending++]=255&re}function G(E,re){var ie,Z,V=E.max_chain_length,ee=E.strstart,de=E.prev_length,se=E.nice_match,ne=E.strstart>E.w_size-_?E.strstart-(E.w_size-_):0,K=E.window,J=E.w_mask,oe=E.prev,Oe=E.strstart+T,Be=K[ee+de-1],Te=K[ee+de];E.prev_length>=E.good_match&&(V>>=2),se>E.lookahead&&(se=E.lookahead);do if(K[(ie=re)+de]===Te&&K[ie+de-1]===Be&&K[ie]===K[ee]&&K[++ie]===K[ee+1]){ee+=2,ie++;do;while(K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&K[++ee]===K[++ie]&&ee<Oe);if(Z=T-(Oe-ee),ee=Oe-T,de<Z){if(E.match_start=re,se<=(de=Z))break;Be=K[ee+de-1],Te=K[ee+de]}}while((re=oe[re&J])>ne&&--V!=0);return de<=E.lookahead?de:E.lookahead}function U(E){var re,ie,Z,V,ee,de,se,ne,K,J,oe=E.w_size;do{if(V=E.window_size-E.lookahead-E.strstart,E.strstart>=oe+(oe-_)){for(s.arraySet(E.window,E.window,oe,oe,0),E.match_start-=oe,E.strstart-=oe,E.block_start-=oe,re=ie=E.hash_size;Z=E.head[--re],E.head[re]=oe<=Z?Z-oe:0,--ie;);for(re=ie=oe;Z=E.prev[--re],E.prev[re]=oe<=Z?Z-oe:0,--ie;);V+=oe}if(E.strm.avail_in===0)break;if(de=E.strm,se=E.window,ne=E.strstart+E.lookahead,K=V,J=void 0,J=de.avail_in,K<J&&(J=K),ie=J===0?0:(de.avail_in-=J,s.arraySet(se,de.input,de.next_in,J,ne),de.state.wrap===1?de.adler=l(de.adler,se,J,ne):de.state.wrap===2&&(de.adler=c(de.adler,se,J,ne)),de.next_in+=J,de.total_in+=J,J),E.lookahead+=ie,E.lookahead+E.insert>=A)for(ee=E.strstart-E.insert,E.ins_h=E.window[ee],E.ins_h=(E.ins_h<<E.hash_shift^E.window[ee+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[ee+A-1])&E.hash_mask,E.prev[ee&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=ee,ee++,E.insert--,!(E.lookahead+E.insert<A)););}while(E.lookahead<_&&E.strm.avail_in!==0)}function ue(E,re){for(var ie,Z;;){if(E.lookahead<_){if(U(E),E.lookahead<_&&re===f)return k;if(E.lookahead===0)break}if(ie=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),ie!==0&&E.strstart-ie<=E.w_size-_&&(E.match_length=G(E,ie)),E.match_length>=A)if(Z=a._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else Z=a._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(Z&&(j(E,!1),E.strm.avail_out===0))return k}return E.insert=E.strstart<A-1?E.strstart:A-1,re===d?(j(E,!0),E.strm.avail_out===0?W:X):E.last_lit&&(j(E,!1),E.strm.avail_out===0)?k:F}function H(E,re){for(var ie,Z,V;;){if(E.lookahead<_){if(U(E),E.lookahead<_&&re===f)return k;if(E.lookahead===0)break}if(ie=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=A-1,ie!==0&&E.prev_length<E.max_lazy_match&&E.strstart-ie<=E.w_size-_&&(E.match_length=G(E,ie),E.match_length<=5&&(E.strategy===1||E.match_length===A&&4096<E.strstart-E.match_start)&&(E.match_length=A-1)),E.prev_length>=A&&E.match_length<=E.prev_length){for(V=E.strstart+E.lookahead-A,Z=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=V&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,ie=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=A-1,E.strstart++,Z&&(j(E,!1),E.strm.avail_out===0))return k}else if(E.match_available){if((Z=a._tr_tally(E,0,E.window[E.strstart-1]))&&j(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return k}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(Z=a._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<A-1?E.strstart:A-1,re===d?(j(E,!0),E.strm.avail_out===0?W:X):E.last_lit&&(j(E,!1),E.strm.avail_out===0)?k:F}function he(E,re,ie,Z,V){this.good_length=E,this.max_lazy=re,this.nice_length=ie,this.max_chain=Z,this.func=V}function pe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=O,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(2*C),this.dyn_dtree=new s.Buf16(2*(2*b+1)),this.bl_tree=new s.Buf16(2*(2*S+1)),L(this.dyn_ltree),L(this.dyn_dtree),L(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(I+1),this.heap=new s.Buf16(2*w+1),L(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*w+1),L(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function me(E){var re;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=x,(re=E.state).pending=0,re.pending_out=0,re.wrap<0&&(re.wrap=-re.wrap),re.status=re.wrap?P:R,E.adler=re.wrap===2?0:1,re.last_flush=f,a._tr_init(re),h):q(E,g)}function ae(E){var re=me(E);return re===h&&function(ie){ie.window_size=2*ie.w_size,L(ie.head),ie.max_lazy_match=o[ie.level].max_lazy,ie.good_match=o[ie.level].good_length,ie.nice_match=o[ie.level].nice_length,ie.max_chain_length=o[ie.level].max_chain,ie.strstart=0,ie.block_start=0,ie.lookahead=0,ie.insert=0,ie.match_length=ie.prev_length=A-1,ie.match_available=0,ie.ins_h=0}(E.state),re}function xe(E,re,ie,Z,V,ee){if(!E)return g;var de=1;if(re===p&&(re=6),Z<0?(de=0,Z=-Z):15<Z&&(de=2,Z-=16),V<1||y<V||ie!==O||Z<8||15<Z||re<0||9<re||ee<0||v<ee)return q(E,g);Z===8&&(Z=9);var se=new pe;return(E.state=se).strm=E,se.wrap=de,se.gzhead=null,se.w_bits=Z,se.w_size=1<<se.w_bits,se.w_mask=se.w_size-1,se.hash_bits=V+7,se.hash_size=1<<se.hash_bits,se.hash_mask=se.hash_size-1,se.hash_shift=~~((se.hash_bits+A-1)/A),se.window=new s.Buf8(2*se.w_size),se.head=new s.Buf16(se.hash_size),se.prev=new s.Buf16(se.w_size),se.lit_bufsize=1<<V+6,se.pending_buf_size=4*se.lit_bufsize,se.pending_buf=new s.Buf8(se.pending_buf_size),se.d_buf=1*se.lit_bufsize,se.l_buf=3*se.lit_bufsize,se.level=re,se.strategy=ee,se.method=ie,ae(E)}o=[new he(0,0,0,0,function(E,re){var ie=65535;for(ie>E.pending_buf_size-5&&(ie=E.pending_buf_size-5);;){if(E.lookahead<=1){if(U(E),E.lookahead===0&&re===f)return k;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var Z=E.block_start+ie;if((E.strstart===0||E.strstart>=Z)&&(E.lookahead=E.strstart-Z,E.strstart=Z,j(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-_&&(j(E,!1),E.strm.avail_out===0))return k}return E.insert=0,re===d?(j(E,!0),E.strm.avail_out===0?W:X):(E.strstart>E.block_start&&(j(E,!1),E.strm.avail_out),k)}),new he(4,4,8,4,ue),new he(4,5,16,8,ue),new he(4,6,32,32,ue),new he(4,4,16,16,H),new he(8,16,32,32,H),new he(8,16,128,128,H),new he(8,32,128,256,H),new he(32,128,258,1024,H),new he(32,258,258,4096,H)],i.deflateInit=function(E,re){return xe(E,re,O,15,8,0)},i.deflateInit2=xe,i.deflateReset=ae,i.deflateResetKeep=me,i.deflateSetHeader=function(E,re){return E&&E.state?E.state.wrap!==2?g:(E.state.gzhead=re,h):g},i.deflate=function(E,re){var ie,Z,V,ee;if(!E||!E.state||5<re||re<0)return E?q(E,g):g;if(Z=E.state,!E.output||!E.input&&E.avail_in!==0||Z.status===666&&re!==d)return q(E,E.avail_out===0?-5:g);if(Z.strm=E,ie=Z.last_flush,Z.last_flush=re,Z.status===P)if(Z.wrap===2)E.adler=0,Q(Z,31),Q(Z,139),Q(Z,8),Z.gzhead?(Q(Z,(Z.gzhead.text?1:0)+(Z.gzhead.hcrc?2:0)+(Z.gzhead.extra?4:0)+(Z.gzhead.name?8:0)+(Z.gzhead.comment?16:0)),Q(Z,255&Z.gzhead.time),Q(Z,Z.gzhead.time>>8&255),Q(Z,Z.gzhead.time>>16&255),Q(Z,Z.gzhead.time>>24&255),Q(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),Q(Z,255&Z.gzhead.os),Z.gzhead.extra&&Z.gzhead.extra.length&&(Q(Z,255&Z.gzhead.extra.length),Q(Z,Z.gzhead.extra.length>>8&255)),Z.gzhead.hcrc&&(E.adler=c(E.adler,Z.pending_buf,Z.pending,0)),Z.gzindex=0,Z.status=69):(Q(Z,0),Q(Z,0),Q(Z,0),Q(Z,0),Q(Z,0),Q(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),Q(Z,3),Z.status=R);else{var de=O+(Z.w_bits-8<<4)<<8;de|=(2<=Z.strategy||Z.level<2?0:Z.level<6?1:Z.level===6?2:3)<<6,Z.strstart!==0&&(de|=32),de+=31-de%31,Z.status=R,N(Z,de),Z.strstart!==0&&(N(Z,E.adler>>>16),N(Z,65535&E.adler)),E.adler=1}if(Z.status===69)if(Z.gzhead.extra){for(V=Z.pending;Z.gzindex<(65535&Z.gzhead.extra.length)&&(Z.pending!==Z.pending_buf_size||(Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),M(E),V=Z.pending,Z.pending!==Z.pending_buf_size));)Q(Z,255&Z.gzhead.extra[Z.gzindex]),Z.gzindex++;Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),Z.gzindex===Z.gzhead.extra.length&&(Z.gzindex=0,Z.status=73)}else Z.status=73;if(Z.status===73)if(Z.gzhead.name){V=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),M(E),V=Z.pending,Z.pending===Z.pending_buf_size)){ee=1;break}ee=Z.gzindex<Z.gzhead.name.length?255&Z.gzhead.name.charCodeAt(Z.gzindex++):0,Q(Z,ee)}while(ee!==0);Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),ee===0&&(Z.gzindex=0,Z.status=91)}else Z.status=91;if(Z.status===91)if(Z.gzhead.comment){V=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),M(E),V=Z.pending,Z.pending===Z.pending_buf_size)){ee=1;break}ee=Z.gzindex<Z.gzhead.comment.length?255&Z.gzhead.comment.charCodeAt(Z.gzindex++):0,Q(Z,ee)}while(ee!==0);Z.gzhead.hcrc&&Z.pending>V&&(E.adler=c(E.adler,Z.pending_buf,Z.pending-V,V)),ee===0&&(Z.status=103)}else Z.status=103;if(Z.status===103&&(Z.gzhead.hcrc?(Z.pending+2>Z.pending_buf_size&&M(E),Z.pending+2<=Z.pending_buf_size&&(Q(Z,255&E.adler),Q(Z,E.adler>>8&255),E.adler=0,Z.status=R)):Z.status=R),Z.pending!==0){if(M(E),E.avail_out===0)return Z.last_flush=-1,h}else if(E.avail_in===0&&Y(re)<=Y(ie)&&re!==d)return q(E,-5);if(Z.status===666&&E.avail_in!==0)return q(E,-5);if(E.avail_in!==0||Z.lookahead!==0||re!==f&&Z.status!==666){var se=Z.strategy===2?function(ne,K){for(var J;;){if(ne.lookahead===0&&(U(ne),ne.lookahead===0)){if(K===f)return k;break}if(ne.match_length=0,J=a._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++,J&&(j(ne,!1),ne.strm.avail_out===0))return k}return ne.insert=0,K===d?(j(ne,!0),ne.strm.avail_out===0?W:X):ne.last_lit&&(j(ne,!1),ne.strm.avail_out===0)?k:F}(Z,re):Z.strategy===3?function(ne,K){for(var J,oe,Oe,Be,Te=ne.window;;){if(ne.lookahead<=T){if(U(ne),ne.lookahead<=T&&K===f)return k;if(ne.lookahead===0)break}if(ne.match_length=0,ne.lookahead>=A&&0<ne.strstart&&(oe=Te[Oe=ne.strstart-1])===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]){Be=ne.strstart+T;do;while(oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&oe===Te[++Oe]&&Oe<Be);ne.match_length=T-(Be-Oe),ne.match_length>ne.lookahead&&(ne.match_length=ne.lookahead)}if(ne.match_length>=A?(J=a._tr_tally(ne,1,ne.match_length-A),ne.lookahead-=ne.match_length,ne.strstart+=ne.match_length,ne.match_length=0):(J=a._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++),J&&(j(ne,!1),ne.strm.avail_out===0))return k}return ne.insert=0,K===d?(j(ne,!0),ne.strm.avail_out===0?W:X):ne.last_lit&&(j(ne,!1),ne.strm.avail_out===0)?k:F}(Z,re):o[Z.level].func(Z,re);if(se!==W&&se!==X||(Z.status=666),se===k||se===W)return E.avail_out===0&&(Z.last_flush=-1),h;if(se===F&&(re===1?a._tr_align(Z):re!==5&&(a._tr_stored_block(Z,0,0,!1),re===3&&(L(Z.head),Z.lookahead===0&&(Z.strstart=0,Z.block_start=0,Z.insert=0))),M(E),E.avail_out===0))return Z.last_flush=-1,h}return re!==d?h:Z.wrap<=0?1:(Z.wrap===2?(Q(Z,255&E.adler),Q(Z,E.adler>>8&255),Q(Z,E.adler>>16&255),Q(Z,E.adler>>24&255),Q(Z,255&E.total_in),Q(Z,E.total_in>>8&255),Q(Z,E.total_in>>16&255),Q(Z,E.total_in>>24&255)):(N(Z,E.adler>>>16),N(Z,65535&E.adler)),M(E),0<Z.wrap&&(Z.wrap=-Z.wrap),Z.pending!==0?h:1)},i.deflateEnd=function(E){var re;return E&&E.state?(re=E.state.status)!==P&&re!==69&&re!==73&&re!==91&&re!==103&&re!==R&&re!==666?q(E,g):(E.state=null,re===R?q(E,-3):h):g},i.deflateSetDictionary=function(E,re){var ie,Z,V,ee,de,se,ne,K,J=re.length;if(!E||!E.state||(ee=(ie=E.state).wrap)===2||ee===1&&ie.status!==P||ie.lookahead)return g;for(ee===1&&(E.adler=l(E.adler,re,J,0)),ie.wrap=0,J>=ie.w_size&&(ee===0&&(L(ie.head),ie.strstart=0,ie.block_start=0,ie.insert=0),K=new s.Buf8(ie.w_size),s.arraySet(K,re,J-ie.w_size,ie.w_size,0),re=K,J=ie.w_size),de=E.avail_in,se=E.next_in,ne=E.input,E.avail_in=J,E.next_in=0,E.input=re,U(ie);ie.lookahead>=A;){for(Z=ie.strstart,V=ie.lookahead-(A-1);ie.ins_h=(ie.ins_h<<ie.hash_shift^ie.window[Z+A-1])&ie.hash_mask,ie.prev[Z&ie.w_mask]=ie.head[ie.ins_h],ie.head[ie.ins_h]=Z,Z++,--V;);ie.strstart=Z,ie.lookahead=A-1,U(ie)}return ie.strstart+=ie.lookahead,ie.block_start=ie.strstart,ie.insert=ie.lookahead,ie.lookahead=0,ie.match_length=ie.prev_length=A-1,ie.match_available=0,E.next_in=se,E.input=ne,E.avail_in=de,ie.wrap=ee,h},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,i){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,i){r.exports=function(o,s){var a,l,c,u,f,d,h,g,p,v,x,O,y,w,b,S,C,I,A,T,_,P,R,k,F;a=o.state,l=o.next_in,k=o.input,c=l+(o.avail_in-5),u=o.next_out,F=o.output,f=u-(s-o.avail_out),d=u+(o.avail_out-257),h=a.dmax,g=a.wsize,p=a.whave,v=a.wnext,x=a.window,O=a.hold,y=a.bits,w=a.lencode,b=a.distcode,S=(1<<a.lenbits)-1,C=(1<<a.distbits)-1;e:do{y<15&&(O+=k[l++]<<y,y+=8,O+=k[l++]<<y,y+=8),I=w[O&S];t:for(;;){if(O>>>=A=I>>>24,y-=A,(A=I>>>16&255)===0)F[u++]=65535&I;else{if(!(16&A)){if(!(64&A)){I=w[(65535&I)+(O&(1<<A)-1)];continue t}if(32&A){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}T=65535&I,(A&=15)&&(y<A&&(O+=k[l++]<<y,y+=8),T+=O&(1<<A)-1,O>>>=A,y-=A),y<15&&(O+=k[l++]<<y,y+=8,O+=k[l++]<<y,y+=8),I=b[O&C];n:for(;;){if(O>>>=A=I>>>24,y-=A,!(16&(A=I>>>16&255))){if(!(64&A)){I=b[(65535&I)+(O&(1<<A)-1)];continue n}o.msg="invalid distance code",a.mode=30;break e}if(_=65535&I,y<(A&=15)&&(O+=k[l++]<<y,(y+=8)<A&&(O+=k[l++]<<y,y+=8)),h<(_+=O&(1<<A)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(O>>>=A,y-=A,(A=u-f)<_){if(p<(A=_-A)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(R=x,(P=0)===v){if(P+=g-A,A<T){for(T-=A;F[u++]=x[P++],--A;);P=u-_,R=F}}else if(v<A){if(P+=g+v-A,(A-=v)<T){for(T-=A;F[u++]=x[P++],--A;);if(P=0,v<T){for(T-=A=v;F[u++]=x[P++],--A;);P=u-_,R=F}}}else if(P+=v-A,A<T){for(T-=A;F[u++]=x[P++],--A;);P=u-_,R=F}for(;2<T;)F[u++]=R[P++],F[u++]=R[P++],F[u++]=R[P++],T-=3;T&&(F[u++]=R[P++],1<T&&(F[u++]=R[P++]))}else{for(P=u-_;F[u++]=F[P++],F[u++]=F[P++],F[u++]=F[P++],2<(T-=3););T&&(F[u++]=F[P++],1<T&&(F[u++]=F[P++]))}break}}break}}while(l<c&&u<d);l-=T=y>>3,O&=(1<<(y-=T<<3))-1,o.next_in=l,o.next_out=u,o.avail_in=l<c?c-l+5:5-(l-c),o.avail_out=u<d?d-u+257:257-(u-d),a.hold=O,a.bits=y}},{}],49:[function(n,r,i){var o=n("../utils/common"),s=n("./adler32"),a=n("./crc32"),l=n("./inffast"),c=n("./inftrees"),u=1,f=2,d=0,h=-2,g=1,p=852,v=592;function x(P){return(P>>>24&255)+(P>>>8&65280)+((65280&P)<<8)+((255&P)<<24)}function O(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function y(P){var R;return P&&P.state?(R=P.state,P.total_in=P.total_out=R.total=0,P.msg="",R.wrap&&(P.adler=1&R.wrap),R.mode=g,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new o.Buf32(p),R.distcode=R.distdyn=new o.Buf32(v),R.sane=1,R.back=-1,d):h}function w(P){var R;return P&&P.state?((R=P.state).wsize=0,R.whave=0,R.wnext=0,y(P)):h}function b(P,R){var k,F;return P&&P.state?(F=P.state,R<0?(k=0,R=-R):(k=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15<R)?h:(F.window!==null&&F.wbits!==R&&(F.window=null),F.wrap=k,F.wbits=R,w(P))):h}function S(P,R){var k,F;return P?(F=new O,(P.state=F).window=null,(k=b(P,R))!==d&&(P.state=null),k):h}var C,I,A=!0;function T(P){if(A){var R;for(C=new o.Buf32(512),I=new o.Buf32(32),R=0;R<144;)P.lens[R++]=8;for(;R<256;)P.lens[R++]=9;for(;R<280;)P.lens[R++]=7;for(;R<288;)P.lens[R++]=8;for(c(u,P.lens,0,288,C,0,P.work,{bits:9}),R=0;R<32;)P.lens[R++]=5;c(f,P.lens,0,32,I,0,P.work,{bits:5}),A=!1}P.lencode=C,P.lenbits=9,P.distcode=I,P.distbits=5}function _(P,R,k,F){var W,X=P.state;return X.window===null&&(X.wsize=1<<X.wbits,X.wnext=0,X.whave=0,X.window=new o.Buf8(X.wsize)),F>=X.wsize?(o.arraySet(X.window,R,k-X.wsize,X.wsize,0),X.wnext=0,X.whave=X.wsize):(F<(W=X.wsize-X.wnext)&&(W=F),o.arraySet(X.window,R,k-F,W,X.wnext),(F-=W)?(o.arraySet(X.window,R,k-F,F,0),X.wnext=F,X.whave=X.wsize):(X.wnext+=W,X.wnext===X.wsize&&(X.wnext=0),X.whave<X.wsize&&(X.whave+=W))),0}i.inflateReset=w,i.inflateReset2=b,i.inflateResetKeep=y,i.inflateInit=function(P){return S(P,15)},i.inflateInit2=S,i.inflate=function(P,R){var k,F,W,X,q,Y,L,M,j,Q,N,G,U,ue,H,he,pe,me,ae,xe,E,re,ie,Z,V=0,ee=new o.Buf8(4),de=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!P||!P.state||!P.output||!P.input&&P.avail_in!==0)return h;(k=P.state).mode===12&&(k.mode=13),q=P.next_out,W=P.output,L=P.avail_out,X=P.next_in,F=P.input,Y=P.avail_in,M=k.hold,j=k.bits,Q=Y,N=L,re=d;e:for(;;)switch(k.mode){case g:if(k.wrap===0){k.mode=13;break}for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(2&k.wrap&&M===35615){ee[k.check=0]=255&M,ee[1]=M>>>8&255,k.check=a(k.check,ee,2,0),j=M=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&M)<<8)+(M>>8))%31){P.msg="incorrect header check",k.mode=30;break}if((15&M)!=8){P.msg="unknown compression method",k.mode=30;break}if(j-=4,E=8+(15&(M>>>=4)),k.wbits===0)k.wbits=E;else if(E>k.wbits){P.msg="invalid window size",k.mode=30;break}k.dmax=1<<E,P.adler=k.check=1,k.mode=512&M?10:12,j=M=0;break;case 2:for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(k.flags=M,(255&k.flags)!=8){P.msg="unknown compression method",k.mode=30;break}if(57344&k.flags){P.msg="unknown header flags set",k.mode=30;break}k.head&&(k.head.text=M>>8&1),512&k.flags&&(ee[0]=255&M,ee[1]=M>>>8&255,k.check=a(k.check,ee,2,0)),j=M=0,k.mode=3;case 3:for(;j<32;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.head&&(k.head.time=M),512&k.flags&&(ee[0]=255&M,ee[1]=M>>>8&255,ee[2]=M>>>16&255,ee[3]=M>>>24&255,k.check=a(k.check,ee,4,0)),j=M=0,k.mode=4;case 4:for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.head&&(k.head.xflags=255&M,k.head.os=M>>8),512&k.flags&&(ee[0]=255&M,ee[1]=M>>>8&255,k.check=a(k.check,ee,2,0)),j=M=0,k.mode=5;case 5:if(1024&k.flags){for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.length=M,k.head&&(k.head.extra_len=M),512&k.flags&&(ee[0]=255&M,ee[1]=M>>>8&255,k.check=a(k.check,ee,2,0)),j=M=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&(Y<(G=k.length)&&(G=Y),G&&(k.head&&(E=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),o.arraySet(k.head.extra,F,X,G,E)),512&k.flags&&(k.check=a(k.check,F,G,X)),Y-=G,X+=G,k.length-=G),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(Y===0)break e;for(G=0;E=F[X+G++],k.head&&E&&k.length<65536&&(k.head.name+=String.fromCharCode(E)),E&&G<Y;);if(512&k.flags&&(k.check=a(k.check,F,G,X)),Y-=G,X+=G,E)break e}else k.head&&(k.head.name=null);k.length=0,k.mode=8;case 8:if(4096&k.flags){if(Y===0)break e;for(G=0;E=F[X+G++],k.head&&E&&k.length<65536&&(k.head.comment+=String.fromCharCode(E)),E&&G<Y;);if(512&k.flags&&(k.check=a(k.check,F,G,X)),Y-=G,X+=G,E)break e}else k.head&&(k.head.comment=null);k.mode=9;case 9:if(512&k.flags){for(;j<16;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(M!==(65535&k.check)){P.msg="header crc mismatch",k.mode=30;break}j=M=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),P.adler=k.check=0,k.mode=12;break;case 10:for(;j<32;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}P.adler=k.check=x(M),j=M=0,k.mode=11;case 11:if(k.havedict===0)return P.next_out=q,P.avail_out=L,P.next_in=X,P.avail_in=Y,k.hold=M,k.bits=j,2;P.adler=k.check=1,k.mode=12;case 12:if(R===5||R===6)break e;case 13:if(k.last){M>>>=7&j,j-=7&j,k.mode=27;break}for(;j<3;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}switch(k.last=1&M,j-=1,3&(M>>>=1)){case 0:k.mode=14;break;case 1:if(T(k),k.mode=20,R!==6)break;M>>>=2,j-=2;break e;case 2:k.mode=17;break;case 3:P.msg="invalid block type",k.mode=30}M>>>=2,j-=2;break;case 14:for(M>>>=7&j,j-=7&j;j<32;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if((65535&M)!=(M>>>16^65535)){P.msg="invalid stored block lengths",k.mode=30;break}if(k.length=65535&M,j=M=0,k.mode=15,R===6)break e;case 15:k.mode=16;case 16:if(G=k.length){if(Y<G&&(G=Y),L<G&&(G=L),G===0)break e;o.arraySet(W,F,X,G,q),Y-=G,X+=G,L-=G,q+=G,k.length-=G;break}k.mode=12;break;case 17:for(;j<14;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(k.nlen=257+(31&M),M>>>=5,j-=5,k.ndist=1+(31&M),M>>>=5,j-=5,k.ncode=4+(15&M),M>>>=4,j-=4,286<k.nlen||30<k.ndist){P.msg="too many length or distance symbols",k.mode=30;break}k.have=0,k.mode=18;case 18:for(;k.have<k.ncode;){for(;j<3;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.lens[de[k.have++]]=7&M,M>>>=3,j-=3}for(;k.have<19;)k.lens[de[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,ie={bits:k.lenbits},re=c(0,k.lens,0,19,k.lencode,0,k.work,ie),k.lenbits=ie.bits,re){P.msg="invalid code lengths set",k.mode=30;break}k.have=0,k.mode=19;case 19:for(;k.have<k.nlen+k.ndist;){for(;he=(V=k.lencode[M&(1<<k.lenbits)-1])>>>16&255,pe=65535&V,!((H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(pe<16)M>>>=H,j-=H,k.lens[k.have++]=pe;else{if(pe===16){for(Z=H+2;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(M>>>=H,j-=H,k.have===0){P.msg="invalid bit length repeat",k.mode=30;break}E=k.lens[k.have-1],G=3+(3&M),M>>>=2,j-=2}else if(pe===17){for(Z=H+3;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}j-=H,E=0,G=3+(7&(M>>>=H)),M>>>=3,j-=3}else{for(Z=H+7;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}j-=H,E=0,G=11+(127&(M>>>=H)),M>>>=7,j-=7}if(k.have+G>k.nlen+k.ndist){P.msg="invalid bit length repeat",k.mode=30;break}for(;G--;)k.lens[k.have++]=E}}if(k.mode===30)break;if(k.lens[256]===0){P.msg="invalid code -- missing end-of-block",k.mode=30;break}if(k.lenbits=9,ie={bits:k.lenbits},re=c(u,k.lens,0,k.nlen,k.lencode,0,k.work,ie),k.lenbits=ie.bits,re){P.msg="invalid literal/lengths set",k.mode=30;break}if(k.distbits=6,k.distcode=k.distdyn,ie={bits:k.distbits},re=c(f,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,ie),k.distbits=ie.bits,re){P.msg="invalid distances set",k.mode=30;break}if(k.mode=20,R===6)break e;case 20:k.mode=21;case 21:if(6<=Y&&258<=L){P.next_out=q,P.avail_out=L,P.next_in=X,P.avail_in=Y,k.hold=M,k.bits=j,l(P,N),q=P.next_out,W=P.output,L=P.avail_out,X=P.next_in,F=P.input,Y=P.avail_in,M=k.hold,j=k.bits,k.mode===12&&(k.back=-1);break}for(k.back=0;he=(V=k.lencode[M&(1<<k.lenbits)-1])>>>16&255,pe=65535&V,!((H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(he&&!(240&he)){for(me=H,ae=he,xe=pe;he=(V=k.lencode[xe+((M&(1<<me+ae)-1)>>me)])>>>16&255,pe=65535&V,!(me+(H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}M>>>=me,j-=me,k.back+=me}if(M>>>=H,j-=H,k.back+=H,k.length=pe,he===0){k.mode=26;break}if(32&he){k.back=-1,k.mode=12;break}if(64&he){P.msg="invalid literal/length code",k.mode=30;break}k.extra=15&he,k.mode=22;case 22:if(k.extra){for(Z=k.extra;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.length+=M&(1<<k.extra)-1,M>>>=k.extra,j-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;he=(V=k.distcode[M&(1<<k.distbits)-1])>>>16&255,pe=65535&V,!((H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(!(240&he)){for(me=H,ae=he,xe=pe;he=(V=k.distcode[xe+((M&(1<<me+ae)-1)>>me)])>>>16&255,pe=65535&V,!(me+(H=V>>>24)<=j);){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}M>>>=me,j-=me,k.back+=me}if(M>>>=H,j-=H,k.back+=H,64&he){P.msg="invalid distance code",k.mode=30;break}k.offset=pe,k.extra=15&he,k.mode=24;case 24:if(k.extra){for(Z=k.extra;j<Z;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}k.offset+=M&(1<<k.extra)-1,M>>>=k.extra,j-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){P.msg="invalid distance too far back",k.mode=30;break}k.mode=25;case 25:if(L===0)break e;if(G=N-L,k.offset>G){if((G=k.offset-G)>k.whave&&k.sane){P.msg="invalid distance too far back",k.mode=30;break}U=G>k.wnext?(G-=k.wnext,k.wsize-G):k.wnext-G,G>k.length&&(G=k.length),ue=k.window}else ue=W,U=q-k.offset,G=k.length;for(L<G&&(G=L),L-=G,k.length-=G;W[q++]=ue[U++],--G;);k.length===0&&(k.mode=21);break;case 26:if(L===0)break e;W[q++]=k.length,L--,k.mode=21;break;case 27:if(k.wrap){for(;j<32;){if(Y===0)break e;Y--,M|=F[X++]<<j,j+=8}if(N-=L,P.total_out+=N,k.total+=N,N&&(P.adler=k.check=k.flags?a(k.check,W,N,q-N):s(k.check,W,N,q-N)),N=L,(k.flags?M:x(M))!==k.check){P.msg="incorrect data check",k.mode=30;break}j=M=0}k.mode=28;case 28:if(k.wrap&&k.flags){for(;j<32;){if(Y===0)break e;Y--,M+=F[X++]<<j,j+=8}if(M!==(4294967295&k.total)){P.msg="incorrect length check",k.mode=30;break}j=M=0}k.mode=29;case 29:re=1;break e;case 30:re=-3;break e;case 31:return-4;case 32:default:return h}return P.next_out=q,P.avail_out=L,P.next_in=X,P.avail_in=Y,k.hold=M,k.bits=j,(k.wsize||N!==P.avail_out&&k.mode<30&&(k.mode<27||R!==4))&&_(P,P.output,P.next_out,N-P.avail_out)?(k.mode=31,-4):(Q-=P.avail_in,N-=P.avail_out,P.total_in+=Q,P.total_out+=N,k.total+=N,k.wrap&&N&&(P.adler=k.check=k.flags?a(k.check,W,N,P.next_out-N):s(k.check,W,N,P.next_out-N)),P.data_type=k.bits+(k.last?64:0)+(k.mode===12?128:0)+(k.mode===20||k.mode===15?256:0),(Q==0&&N===0||R===4)&&re===d&&(re=-5),re)},i.inflateEnd=function(P){if(!P||!P.state)return h;var R=P.state;return R.window&&(R.window=null),P.state=null,d},i.inflateGetHeader=function(P,R){var k;return P&&P.state&&2&(k=P.state).wrap?((k.head=R).done=!1,d):h},i.inflateSetDictionary=function(P,R){var k,F=R.length;return P&&P.state?(k=P.state).wrap!==0&&k.mode!==11?h:k.mode===11&&s(1,R,F,0)!==k.check?-3:_(P,R,F,F)?(k.mode=31,-4):(k.havedict=1,d):h},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,i){var o=n("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(u,f,d,h,g,p,v,x){var O,y,w,b,S,C,I,A,T,_=x.bits,P=0,R=0,k=0,F=0,W=0,X=0,q=0,Y=0,L=0,M=0,j=null,Q=0,N=new o.Buf16(16),G=new o.Buf16(16),U=null,ue=0;for(P=0;P<=15;P++)N[P]=0;for(R=0;R<h;R++)N[f[d+R]]++;for(W=_,F=15;1<=F&&N[F]===0;F--);if(F<W&&(W=F),F===0)return g[p++]=20971520,g[p++]=20971520,x.bits=1,0;for(k=1;k<F&&N[k]===0;k++);for(W<k&&(W=k),P=Y=1;P<=15;P++)if(Y<<=1,(Y-=N[P])<0)return-1;if(0<Y&&(u===0||F!==1))return-1;for(G[1]=0,P=1;P<15;P++)G[P+1]=G[P]+N[P];for(R=0;R<h;R++)f[d+R]!==0&&(v[G[f[d+R]]++]=R);if(C=u===0?(j=U=v,19):u===1?(j=s,Q-=257,U=a,ue-=257,256):(j=l,U=c,-1),P=k,S=p,q=R=M=0,w=-1,b=(L=1<<(X=W))-1,u===1&&852<L||u===2&&592<L)return 1;for(;;){for(I=P-q,T=v[R]<C?(A=0,v[R]):v[R]>C?(A=U[ue+v[R]],j[Q+v[R]]):(A=96,0),O=1<<P-q,k=y=1<<X;g[S+(M>>q)+(y-=O)]=I<<24|A<<16|T|0,y!==0;);for(O=1<<P-1;M&O;)O>>=1;if(O!==0?(M&=O-1,M+=O):M=0,R++,--N[P]==0){if(P===F)break;P=f[d+v[R]]}if(W<P&&(M&b)!==w){for(q===0&&(q=W),S+=k,Y=1<<(X=P-q);X+q<F&&!((Y-=N[X+q])<=0);)X++,Y<<=1;if(L+=1<<X,u===1&&852<L||u===2&&592<L)return 1;g[w=M&b]=W<<24|X<<16|S-p|0}}return M!==0&&(g[S+M]=P-q<<24|64<<16|0),x.bits=W,0}},{"../utils/common":41}],51:[function(n,r,i){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,i){var o=n("../utils/common"),s=0,a=1;function l(V){for(var ee=V.length;0<=--ee;)V[ee]=0}var c=0,u=29,f=256,d=f+1+u,h=30,g=19,p=2*d+1,v=15,x=16,O=7,y=256,w=16,b=17,S=18,C=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],_=new Array(2*(d+2));l(_);var P=new Array(2*h);l(P);var R=new Array(512);l(R);var k=new Array(256);l(k);var F=new Array(u);l(F);var W,X,q,Y=new Array(h);function L(V,ee,de,se,ne){this.static_tree=V,this.extra_bits=ee,this.extra_base=de,this.elems=se,this.max_length=ne,this.has_stree=V&&V.length}function M(V,ee){this.dyn_tree=V,this.max_code=0,this.stat_desc=ee}function j(V){return V<256?R[V]:R[256+(V>>>7)]}function Q(V,ee){V.pending_buf[V.pending++]=255&ee,V.pending_buf[V.pending++]=ee>>>8&255}function N(V,ee,de){V.bi_valid>x-de?(V.bi_buf|=ee<<V.bi_valid&65535,Q(V,V.bi_buf),V.bi_buf=ee>>x-V.bi_valid,V.bi_valid+=de-x):(V.bi_buf|=ee<<V.bi_valid&65535,V.bi_valid+=de)}function G(V,ee,de){N(V,de[2*ee],de[2*ee+1])}function U(V,ee){for(var de=0;de|=1&V,V>>>=1,de<<=1,0<--ee;);return de>>>1}function ue(V,ee,de){var se,ne,K=new Array(v+1),J=0;for(se=1;se<=v;se++)K[se]=J=J+de[se-1]<<1;for(ne=0;ne<=ee;ne++){var oe=V[2*ne+1];oe!==0&&(V[2*ne]=U(K[oe]++,oe))}}function H(V){var ee;for(ee=0;ee<d;ee++)V.dyn_ltree[2*ee]=0;for(ee=0;ee<h;ee++)V.dyn_dtree[2*ee]=0;for(ee=0;ee<g;ee++)V.bl_tree[2*ee]=0;V.dyn_ltree[2*y]=1,V.opt_len=V.static_len=0,V.last_lit=V.matches=0}function he(V){8<V.bi_valid?Q(V,V.bi_buf):0<V.bi_valid&&(V.pending_buf[V.pending++]=V.bi_buf),V.bi_buf=0,V.bi_valid=0}function pe(V,ee,de,se){var ne=2*ee,K=2*de;return V[ne]<V[K]||V[ne]===V[K]&&se[ee]<=se[de]}function me(V,ee,de){for(var se=V.heap[de],ne=de<<1;ne<=V.heap_len&&(ne<V.heap_len&&pe(ee,V.heap[ne+1],V.heap[ne],V.depth)&&ne++,!pe(ee,se,V.heap[ne],V.depth));)V.heap[de]=V.heap[ne],de=ne,ne<<=1;V.heap[de]=se}function ae(V,ee,de){var se,ne,K,J,oe=0;if(V.last_lit!==0)for(;se=V.pending_buf[V.d_buf+2*oe]<<8|V.pending_buf[V.d_buf+2*oe+1],ne=V.pending_buf[V.l_buf+oe],oe++,se===0?G(V,ne,ee):(G(V,(K=k[ne])+f+1,ee),(J=C[K])!==0&&N(V,ne-=F[K],J),G(V,K=j(--se),de),(J=I[K])!==0&&N(V,se-=Y[K],J)),oe<V.last_lit;);G(V,y,ee)}function xe(V,ee){var de,se,ne,K=ee.dyn_tree,J=ee.stat_desc.static_tree,oe=ee.stat_desc.has_stree,Oe=ee.stat_desc.elems,Be=-1;for(V.heap_len=0,V.heap_max=p,de=0;de<Oe;de++)K[2*de]!==0?(V.heap[++V.heap_len]=Be=de,V.depth[de]=0):K[2*de+1]=0;for(;V.heap_len<2;)K[2*(ne=V.heap[++V.heap_len]=Be<2?++Be:0)]=1,V.depth[ne]=0,V.opt_len--,oe&&(V.static_len-=J[2*ne+1]);for(ee.max_code=Be,de=V.heap_len>>1;1<=de;de--)me(V,K,de);for(ne=Oe;de=V.heap[1],V.heap[1]=V.heap[V.heap_len--],me(V,K,1),se=V.heap[1],V.heap[--V.heap_max]=de,V.heap[--V.heap_max]=se,K[2*ne]=K[2*de]+K[2*se],V.depth[ne]=(V.depth[de]>=V.depth[se]?V.depth[de]:V.depth[se])+1,K[2*de+1]=K[2*se+1]=ne,V.heap[1]=ne++,me(V,K,1),2<=V.heap_len;);V.heap[--V.heap_max]=V.heap[1],function(Te,Jt){var wr,Mt,Rt,Ye,Zt,ii,Kt=Jt.dyn_tree,hn=Jt.max_code,or=Jt.stat_desc.static_tree,is=Jt.stat_desc.has_stree,Wi=Jt.stat_desc.extra_bits,mo=Jt.stat_desc.extra_base,Sr=Jt.stat_desc.max_length,pn=0;for(Ye=0;Ye<=v;Ye++)Te.bl_count[Ye]=0;for(Kt[2*Te.heap[Te.heap_max]+1]=0,wr=Te.heap_max+1;wr<p;wr++)Sr<(Ye=Kt[2*Kt[2*(Mt=Te.heap[wr])+1]+1]+1)&&(Ye=Sr,pn++),Kt[2*Mt+1]=Ye,hn<Mt||(Te.bl_count[Ye]++,Zt=0,mo<=Mt&&(Zt=Wi[Mt-mo]),ii=Kt[2*Mt],Te.opt_len+=ii*(Ye+Zt),is&&(Te.static_len+=ii*(or[2*Mt+1]+Zt)));if(pn!==0){do{for(Ye=Sr-1;Te.bl_count[Ye]===0;)Ye--;Te.bl_count[Ye]--,Te.bl_count[Ye+1]+=2,Te.bl_count[Sr]--,pn-=2}while(0<pn);for(Ye=Sr;Ye!==0;Ye--)for(Mt=Te.bl_count[Ye];Mt!==0;)hn<(Rt=Te.heap[--wr])||(Kt[2*Rt+1]!==Ye&&(Te.opt_len+=(Ye-Kt[2*Rt+1])*Kt[2*Rt],Kt[2*Rt+1]=Ye),Mt--)}}(V,ee),ue(K,Be,V.bl_count)}function E(V,ee,de){var se,ne,K=-1,J=ee[1],oe=0,Oe=7,Be=4;for(J===0&&(Oe=138,Be=3),ee[2*(de+1)+1]=65535,se=0;se<=de;se++)ne=J,J=ee[2*(se+1)+1],++oe<Oe&&ne===J||(oe<Be?V.bl_tree[2*ne]+=oe:ne!==0?(ne!==K&&V.bl_tree[2*ne]++,V.bl_tree[2*w]++):oe<=10?V.bl_tree[2*b]++:V.bl_tree[2*S]++,K=ne,Be=(oe=0)===J?(Oe=138,3):ne===J?(Oe=6,3):(Oe=7,4))}function re(V,ee,de){var se,ne,K=-1,J=ee[1],oe=0,Oe=7,Be=4;for(J===0&&(Oe=138,Be=3),se=0;se<=de;se++)if(ne=J,J=ee[2*(se+1)+1],!(++oe<Oe&&ne===J)){if(oe<Be)for(;G(V,ne,V.bl_tree),--oe!=0;);else ne!==0?(ne!==K&&(G(V,ne,V.bl_tree),oe--),G(V,w,V.bl_tree),N(V,oe-3,2)):oe<=10?(G(V,b,V.bl_tree),N(V,oe-3,3)):(G(V,S,V.bl_tree),N(V,oe-11,7));K=ne,Be=(oe=0)===J?(Oe=138,3):ne===J?(Oe=6,3):(Oe=7,4)}}l(Y);var ie=!1;function Z(V,ee,de,se){N(V,(c<<1)+(se?1:0),3),function(ne,K,J,oe){he(ne),Q(ne,J),Q(ne,~J),o.arraySet(ne.pending_buf,ne.window,K,J,ne.pending),ne.pending+=J}(V,ee,de)}i._tr_init=function(V){ie||(function(){var ee,de,se,ne,K,J=new Array(v+1);for(ne=se=0;ne<u-1;ne++)for(F[ne]=se,ee=0;ee<1<<C[ne];ee++)k[se++]=ne;for(k[se-1]=ne,ne=K=0;ne<16;ne++)for(Y[ne]=K,ee=0;ee<1<<I[ne];ee++)R[K++]=ne;for(K>>=7;ne<h;ne++)for(Y[ne]=K<<7,ee=0;ee<1<<I[ne]-7;ee++)R[256+K++]=ne;for(de=0;de<=v;de++)J[de]=0;for(ee=0;ee<=143;)_[2*ee+1]=8,ee++,J[8]++;for(;ee<=255;)_[2*ee+1]=9,ee++,J[9]++;for(;ee<=279;)_[2*ee+1]=7,ee++,J[7]++;for(;ee<=287;)_[2*ee+1]=8,ee++,J[8]++;for(ue(_,d+1,J),ee=0;ee<h;ee++)P[2*ee+1]=5,P[2*ee]=U(ee,5);W=new L(_,C,f+1,d,v),X=new L(P,I,0,h,v),q=new L(new Array(0),A,0,g,O)}(),ie=!0),V.l_desc=new M(V.dyn_ltree,W),V.d_desc=new M(V.dyn_dtree,X),V.bl_desc=new M(V.bl_tree,q),V.bi_buf=0,V.bi_valid=0,H(V)},i._tr_stored_block=Z,i._tr_flush_block=function(V,ee,de,se){var ne,K,J=0;0<V.level?(V.strm.data_type===2&&(V.strm.data_type=function(oe){var Oe,Be=4093624447;for(Oe=0;Oe<=31;Oe++,Be>>>=1)if(1&Be&&oe.dyn_ltree[2*Oe]!==0)return s;if(oe.dyn_ltree[18]!==0||oe.dyn_ltree[20]!==0||oe.dyn_ltree[26]!==0)return a;for(Oe=32;Oe<f;Oe++)if(oe.dyn_ltree[2*Oe]!==0)return a;return s}(V)),xe(V,V.l_desc),xe(V,V.d_desc),J=function(oe){var Oe;for(E(oe,oe.dyn_ltree,oe.l_desc.max_code),E(oe,oe.dyn_dtree,oe.d_desc.max_code),xe(oe,oe.bl_desc),Oe=g-1;3<=Oe&&oe.bl_tree[2*T[Oe]+1]===0;Oe--);return oe.opt_len+=3*(Oe+1)+5+5+4,Oe}(V),ne=V.opt_len+3+7>>>3,(K=V.static_len+3+7>>>3)<=ne&&(ne=K)):ne=K=de+5,de+4<=ne&&ee!==-1?Z(V,ee,de,se):V.strategy===4||K===ne?(N(V,2+(se?1:0),3),ae(V,_,P)):(N(V,4+(se?1:0),3),function(oe,Oe,Be,Te){var Jt;for(N(oe,Oe-257,5),N(oe,Be-1,5),N(oe,Te-4,4),Jt=0;Jt<Te;Jt++)N(oe,oe.bl_tree[2*T[Jt]+1],3);re(oe,oe.dyn_ltree,Oe-1),re(oe,oe.dyn_dtree,Be-1)}(V,V.l_desc.max_code+1,V.d_desc.max_code+1,J+1),ae(V,V.dyn_ltree,V.dyn_dtree)),H(V),se&&he(V)},i._tr_tally=function(V,ee,de){return V.pending_buf[V.d_buf+2*V.last_lit]=ee>>>8&255,V.pending_buf[V.d_buf+2*V.last_lit+1]=255&ee,V.pending_buf[V.l_buf+V.last_lit]=255&de,V.last_lit++,ee===0?V.dyn_ltree[2*de]++:(V.matches++,ee--,V.dyn_ltree[2*(k[de]+f+1)]++,V.dyn_dtree[2*j(ee)]++),V.last_lit===V.lit_bufsize-1},i._tr_align=function(V){N(V,2,3),G(V,y,_),function(ee){ee.bi_valid===16?(Q(ee,ee.bi_buf),ee.bi_buf=0,ee.bi_valid=0):8<=ee.bi_valid&&(ee.pending_buf[ee.pending++]=255&ee.bi_buf,ee.bi_buf>>=8,ee.bi_valid-=8)}(V)}},{"../utils/common":41}],53:[function(n,r,i){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,i){(function(o){(function(s,a){if(!s.setImmediate){var l,c,u,f,d=1,h={},g=!1,p=s.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(s);v=v&&v.setTimeout?v:s,l={}.toString.call(s.process)==="[object process]"?function(w){process.nextTick(function(){O(w)})}:function(){if(s.postMessage&&!s.importScripts){var w=!0,b=s.onmessage;return s.onmessage=function(){w=!1},s.postMessage("","*"),s.onmessage=b,w}}()?(f="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",y,!1):s.attachEvent("onmessage",y),function(w){s.postMessage(f+w,"*")}):s.MessageChannel?((u=new MessageChannel).port1.onmessage=function(w){O(w.data)},function(w){u.port2.postMessage(w)}):p&&"onreadystatechange"in p.createElement("script")?(c=p.documentElement,function(w){var b=p.createElement("script");b.onreadystatechange=function(){O(w),b.onreadystatechange=null,c.removeChild(b),b=null},c.appendChild(b)}):function(w){setTimeout(O,0,w)},v.setImmediate=function(w){typeof w!="function"&&(w=new Function(""+w));for(var b=new Array(arguments.length-1),S=0;S<b.length;S++)b[S]=arguments[S+1];var C={callback:w,args:b};return h[d]=C,l(d),d++},v.clearImmediate=x}function x(w){delete h[w]}function O(w){if(g)setTimeout(O,0,w);else{var b=h[w];if(b){g=!0;try{(function(S){var C=S.callback,I=S.args;switch(I.length){case 0:C();break;case 1:C(I[0]);break;case 2:C(I[0],I[1]);break;case 3:C(I[0],I[1],I[2]);break;default:C.apply(a,I)}})(b)}finally{x(w),g=!1}}}}function y(w){w.source===s&&typeof w.data=="string"&&w.data.indexOf(f)===0&&O(+w.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof _e<"u"?_e:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(x8);var Tre=x8.exports;const _re=Qi(Tre);_re.support.nodebuffer=!1;const jre=t=>m.jsx("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:m.jsx("path",{d:"M12.85 4.64993L9.35 1.14993C9.30601 1.10107 9.25192 1.06236 9.19149 1.03646C9.13106 1.01056 9.06572 0.998095 9 0.999933H4C3.73502 1.00071 3.48112 1.10632 3.29375 1.29369C3.10638 1.48105 3.00078 1.73496 3 1.99993V13.9999C3.00078 14.2649 3.10638 14.5188 3.29375 14.7062C3.48112 14.8935 3.73502 14.9992 4 14.9999H12C12.265 14.9992 12.5189 14.8935 12.7062 14.7062C12.8936 14.5188 12.9992 14.2649 13 13.9999V4.99993C13.0018 4.93421 12.9894 4.86887 12.9635 4.80844C12.9376 4.74801 12.8989 4.69393 12.85 4.64993ZM9 2.19993L11.8 4.99993H9V2.19993ZM12 13.9999H4V1.99993H8V4.99993C8.00078 5.26491 8.10638 5.51881 8.29375 5.70618C8.48112 5.89355 8.73502 5.99916 9 5.99993H12V13.9999Z"})});$(jre).attrs(()=>({"data-component-name":"icons/DocumentBlankIcon/DocumentBlankIcon"}))`
499
499
  path {
500
500
  fill: ${({color:t})=>Xn(t)};
501
501
  }