-
Notifications
You must be signed in to change notification settings - Fork 754
/
Copy path2786.8822cfc420377e0acc77.js
2 lines (2 loc) · 29.5 KB
/
2786.8822cfc420377e0acc77.js
1
2
(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[2786],{7692:(t,e,r)=>{"use strict";r.d(e,{Ay:()=>d,gj:()=>g});var n=new Uint8Array(256),i=new Uint8Array(256),o=new Uint32Array(256),u=new Uint32Array(256),s=new Uint32Array(256),a=new Uint32Array(256),p=new Uint32Array(256),h=new Uint32Array(256),l=new Uint32Array(256),f=new Uint32Array(256);function c(t){if(t instanceof Uint32Array)return t;if("string"==typeof t){if(t.length%4!=0)for(var e=t.length%4;e<=4;e++)t+="\0x00";var r=new Uint32Array(t.length/4);for(e=0;e<t.length;e+=4)r[e/4]=(i=e,(n=t).charCodeAt(i)<<24^n.charCodeAt(i+1)<<16^n.charCodeAt(i+2)<<8^n.charCodeAt(i+3));return r}var n,i;if(t instanceof Uint8Array){for(r=new Uint32Array(t.length/4),e=0;e<t.length;e+=4)r[e/4]=t[e]<<24^t[e+1]<<16^t[e+2]<<8^t[e+3];return r}throw new Error("Unable to create 32-bit words")}function y(t,e,r){void 0===r&&(r=t);for(var n=0;n<t.length;n++)r[n]=t[n]^e[n]}!function(){for(var t,e,r,c,y,v=new Uint8Array(256),g=new Uint8Array(256),d=0,m=0,w=0;w<256;w++)v[w]=w<<1^283*(w>>7),g[v[w]^w]=w;for(;!n[d];d^=t||1)r=(r=m^m<<1^m<<2^m<<3^m<<4)>>8^255&r^99,n[d]=r,i[r]=d,y=16843009*v[e=v[t=v[d]]]^65537*e^257*t^16843008*d,c=257*v[r]^16843008*r,o[d]=c=c<<24^c>>>8,u[d]=c=c<<24^c>>>8,s[d]=c=c<<24^c>>>8,a[d]=c=c<<24^c>>>8,p[r]=y=y<<24^y>>>8,h[r]=y=y<<24^y>>>8,l[r]=y=y<<24^y>>>8,f[r]=y=y<<24^y>>>8,m=g[m]||1}();var v=function(){function t(t){var e=c(t);if(4!==e.length&&6!==e.length&&8!==e.length)throw new Error("Invalid key size");this.encKey=new Uint32Array(4*e.length+28),this.decKey=new Uint32Array(4*e.length+28),this.encKey.set(e);for(var r,i=1,o=e.length;o<4*e.length+28;o++)r=this.encKey[o-1],(o%e.length==0||8===e.length&&o%e.length==4)&&(r=n[r>>>24]<<24^n[r>>16&255]<<16^n[r>>8&255]<<8^n[255&r],o%e.length==0&&(r=r<<8^r>>>24^i<<24,i=i<<1^283*(i>>7))),this.encKey[o]=this.encKey[o-e.length]^r;for(var u=0;o;u++,o--)r=this.encKey[3&u?o:o-4],this.decKey[u]=o<=4||u<4?r:p[n[r>>>24]]^h[n[r>>16&255]]^l[n[r>>8&255]]^f[n[255&r]]}return t.prototype.encrypt=function(t){for(var e,r,i,p=c(t),h=new Uint32Array(4),l=p[0]^this.encKey[0],f=p[1]^this.encKey[1],y=p[2]^this.encKey[2],v=p[3]^this.encKey[3],g=this.encKey.length/4-2,d=4,m=0;m<g;m++)e=o[l>>>24]^u[f>>16&255]^s[y>>8&255]^a[255&v]^this.encKey[d],r=o[f>>>24]^u[y>>16&255]^s[v>>8&255]^a[255&l]^this.encKey[d+1],i=o[y>>>24]^u[v>>16&255]^s[l>>8&255]^a[255&f]^this.encKey[d+2],v=o[v>>>24]^u[l>>16&255]^s[f>>8&255]^a[255&y]^this.encKey[d+3],l=e,f=r,y=i,d+=4;for(m=0;m<4;m++)h[m]=n[l>>>24]<<24^n[f>>16&255]<<16^n[y>>8&255]<<8^n[255&v]^this.encKey[d++],e=l,l=f,f=y,y=v,v=e;return h},t.prototype.decrypt=function(t){for(var e,r,n,o=c(t),u=new Uint32Array(4),s=o[0]^this.decKey[0],a=o[3]^this.decKey[1],y=o[2]^this.decKey[2],v=o[1]^this.decKey[3],g=this.decKey.length/4-2,d=4,m=0;m<g;m++)e=p[s>>>24]^h[a>>16&255]^l[y>>8&255]^f[255&v]^this.decKey[d],r=p[a>>>24]^h[y>>16&255]^l[v>>8&255]^f[255&s]^this.decKey[d+1],n=p[y>>>24]^h[v>>16&255]^l[s>>8&255]^f[255&a]^this.decKey[d+2],v=p[v>>>24]^h[s>>16&255]^l[a>>8&255]^f[255&y]^this.decKey[d+3],s=e,a=r,y=n,d+=4;for(m=0;m<4;m++)u[3&-m]=i[s>>>24]<<24^i[a>>16&255]<<16^i[y>>8&255]<<8^i[255&v]^this.decKey[d++],e=s,s=a,a=y,y=v,v=e;return u},t}(),g=function(){function t(t,e,r){void 0===r&&(r=16),this.key=c(t),this.iv=c(e),this.cipher=new v(t),this.blockSize=r/4}return t.prototype.encrypt=function(t,e){for(var r=c(t),n=e||new Uint32Array(r.length),i=this.iv.subarray(this.blockSize,this.iv.length),o=this.iv.subarray(0,this.blockSize),u=new Uint32Array(this.blockSize),s=0;s<r.length;s+=this.blockSize){var a=r.subarray(s,s+this.blockSize);y(a,o,u);var p=this.cipher.encrypt(u);y(p,i),i=a,o=p;for(var h=s,l=0;h<r.length&&l<4;h++,l++)n[h]=p[l]}return n},t.prototype.decrypt=function(t,e){for(var r=c(t),n=e||new Uint32Array(r.length),i=this.iv.subarray(this.blockSize,this.iv.length),o=this.iv.subarray(0,this.blockSize),u=new Uint32Array(this.blockSize),s=0;s<n.length;s+=this.blockSize){var a=r.subarray(s,s+this.blockSize);y(a,i,u);var p=this.cipher.decrypt(u);y(p,o),o=a,i=p;for(var h=s,l=0;h<n.length&&l<4;h++,l++)n[h]=p[l]}return n},t}();!function(){function t(t,e,r){if(void 0===r&&(r=16),this.offset=0,this.key=c(t),this.counter=c(e),this.cipher=new v(t),this.blockSize=r/4,4!==this.counter.length)throw new Error("AES-CTR mode counter must be 16 bytes length")}t.prototype.encrypt=function(t,e){for(var r=c(t),n=e||new Uint32Array(r.length),i=this.offset,o=0;o<r.length;o+=this.blockSize){for(var u=this.cipher.encrypt(this.counter),s=o,a=i;s<r.length&&a<this.blockSize;s++,a++)n[s]=u[a]^r[s];r.length-o>=this.blockSize&&this.incrementCounter(),i&&(o-=i,i=0)}return this.offset=(this.offset+r.length%4)%4,n},t.prototype.decrypt=function(t,e){return this.encrypt(t,e)},t.prototype.incrementCounter=function(){for(var t=this.counter.length-1;t>=0&&!(++this.counter[t]<4294967295);t--);}}();const d=v},92096:(t,e,r)=>{var n;t=r.nmd(t);var i=function(t){"use strict";var e=1e7,r=7,n=9007199254740992,o=c(n),u="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function a(t,e,r,n){return void 0===t?a[0]:void 0===e||10==+e&&!r?G(t):V(t,e,r,n)}function p(t,e){this.value=t,this.sign=e,this.isSmall=!1}function h(t){this.value=t,this.sign=t<0,this.isSmall=!0}function l(t){this.value=t}function f(t){return-n<t&&t<n}function c(t){return t<1e7?[t]:t<1e14?[t%1e7,Math.floor(t/1e7)]:[t%1e7,Math.floor(t/1e7)%1e7,Math.floor(t/1e14)]}function y(t){v(t);var r=t.length;if(r<4&&O(t,o)<0)switch(r){case 0:return 0;case 1:return t[0];case 2:return t[0]+t[1]*e;default:return t[0]+(t[1]+t[2]*e)*e}return t}function v(t){for(var e=t.length;0===t[--e];);t.length=e+1}function g(t){for(var e=new Array(t),r=-1;++r<t;)e[r]=0;return e}function d(t){return t>0?Math.floor(t):Math.ceil(t)}function m(t,r){var n,i,o=t.length,u=r.length,s=new Array(o),a=0,p=e;for(i=0;i<u;i++)a=(n=t[i]+r[i]+a)>=p?1:0,s[i]=n-a*p;for(;i<o;)a=(n=t[i]+a)===p?1:0,s[i++]=n-a*p;return a>0&&s.push(a),s}function w(t,e){return t.length>=e.length?m(t,e):m(e,t)}function b(t,r){var n,i,o=t.length,u=new Array(o),s=e;for(i=0;i<o;i++)n=t[i]-s+r,r=Math.floor(n/s),u[i]=n-r*s,r+=1;for(;r>0;)u[i++]=r%s,r=Math.floor(r/s);return u}function S(t,r){var n,i,o=t.length,u=r.length,s=new Array(o),a=0,p=e;for(n=0;n<u;n++)(i=t[n]-a-r[n])<0?(i+=p,a=1):a=0,s[n]=i;for(n=u;n<o;n++){if(!((i=t[n]-a)<0)){s[n++]=i;break}i+=p,s[n]=i}for(;n<o;n++)s[n]=t[n];return v(s),s}function q(t,r,n){var i,o,u=t.length,s=new Array(u),a=-r,l=e;for(i=0;i<u;i++)o=t[i]+a,a=Math.floor(o/l),o%=l,s[i]=o<0?o+l:o;return"number"==typeof(s=y(s))?(n&&(s=-s),new h(s)):new p(s,n)}function E(t,r){var n,i,o,u,s=t.length,a=r.length,p=g(s+a),h=e;for(o=0;o<s;++o){u=t[o];for(var l=0;l<a;++l)n=u*r[l]+p[o+l],i=Math.floor(n/h),p[o+l]=n-i*h,p[o+l+1]+=i}return v(p),p}function _(t,r){var n,i,o=t.length,u=new Array(o),s=e,a=0;for(i=0;i<o;i++)n=t[i]*r+a,a=Math.floor(n/s),u[i]=n-a*s;for(;a>0;)u[i++]=a%s,a=Math.floor(a/s);return u}function A(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function U(t,e){var r=Math.max(t.length,e.length);if(r<=30)return E(t,e);r=Math.ceil(r/2);var n=t.slice(r),i=t.slice(0,r),o=e.slice(r),u=e.slice(0,r),s=U(i,u),a=U(n,o),p=U(w(i,n),w(u,o)),h=w(w(s,A(S(S(p,s),a),r)),A(a,2*r));return v(h),h}function N(t,r,n){return new p(t<e?_(r,t):E(r,c(t)),n)}function M(t){var r,n,i,o,u=t.length,s=g(u+u),a=e;for(i=0;i<u;i++){n=0-(o=t[i])*o;for(var p=i;p<u;p++)r=o*t[p]*2+s[i+p]+n,n=Math.floor(r/a),s[i+p]=r-n*a;s[i+u]=n}return v(s),s}function k(t,r){var n,i,o,u,s=t.length,a=g(s),p=e;for(o=0,n=s-1;n>=0;--n)o=(u=o*p+t[n])-(i=d(u/r))*r,a[n]=0|i;return[a,0|o]}function I(t,r){var n,i=G(r);if(s)return[new l(t.value/i.value),new l(t.value%i.value)];var o,u=t.value,f=i.value;if(0===f)throw new Error("Cannot divide by zero");if(t.isSmall)return i.isSmall?[new h(d(u/f)),new h(u%f)]:[a[0],t];if(i.isSmall){if(1===f)return[t,a[0]];if(-1==f)return[t.negate(),a[0]];var m=Math.abs(f);if(m<e){o=y((n=k(u,m))[0]);var w=n[1];return t.sign&&(w=-w),"number"==typeof o?(t.sign!==i.sign&&(o=-o),[new h(o),new h(w)]):[new p(o,t.sign!==i.sign),new h(w)]}f=c(m)}var b=O(u,f);if(-1===b)return[a[0],t];if(0===b)return[a[t.sign===i.sign?1:-1],a[0]];n=u.length+f.length<=200?function(t,r){var n,i,o,u,s,a,p,h=t.length,l=r.length,f=e,c=g(r.length),v=r[l-1],d=Math.ceil(f/(2*v)),m=_(t,d),w=_(r,d);for(m.length<=h&&m.push(0),w.push(0),v=w[l-1],i=h-l;i>=0;i--){for(n=f-1,m[i+l]!==v&&(n=Math.floor((m[i+l]*f+m[i+l-1])/v)),o=0,u=0,a=w.length,s=0;s<a;s++)o+=n*w[s],p=Math.floor(o/f),u+=m[i+s]-(o-p*f),o=p,u<0?(m[i+s]=u+f,u=-1):(m[i+s]=u,u=0);for(;0!==u;){for(n-=1,o=0,s=0;s<a;s++)(o+=m[i+s]-f+w[s])<0?(m[i+s]=o+f,o=0):(m[i+s]=o,o=1);u+=o}c[i]=n}return m=k(m,d)[0],[y(c),y(m)]}(u,f):function(t,r){for(var n,i,o,u,s,a=t.length,p=r.length,h=[],l=[],f=e;a;)if(l.unshift(t[--a]),v(l),O(l,r)<0)h.push(0);else{o=l[(i=l.length)-1]*f+l[i-2],u=r[p-1]*f+r[p-2],i>p&&(o=(o+1)*f),n=Math.ceil(o/u);do{if(O(s=_(r,n),l)<=0)break;n--}while(n);h.push(n),l=S(l,s)}return h.reverse(),[y(h),y(l)]}(u,f),o=n[0];var q=t.sign!==i.sign,E=n[1],A=t.sign;return"number"==typeof o?(q&&(o=-o),o=new h(o)):o=new p(o,q),"number"==typeof E?(A&&(E=-E),E=new h(E)):E=new p(E,A),[o,E]}function O(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function P(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function x(t,e){for(var r,n,o,u=t.prev(),s=u,a=0;s.isEven();)s=s.divide(2),a++;t:for(n=0;n<e.length;n++)if(!t.lesser(e[n])&&!(o=i(e[n]).modPow(s,t)).isUnit()&&!o.equals(u)){for(r=a-1;0!=r;r--){if((o=o.square().mod(t)).isUnit())return!1;if(o.equals(u))continue t}return!1}return!0}p.prototype=Object.create(a.prototype),h.prototype=Object.create(a.prototype),l.prototype=Object.create(a.prototype),p.prototype.add=function(t){var e=G(t);if(this.sign!==e.sign)return this.subtract(e.negate());var r=this.value,n=e.value;return e.isSmall?new p(b(r,Math.abs(n)),this.sign):new p(w(r,n),this.sign)},p.prototype.plus=p.prototype.add,h.prototype.add=function(t){var e=G(t),r=this.value;if(r<0!==e.sign)return this.subtract(e.negate());var n=e.value;if(e.isSmall){if(f(r+n))return new h(r+n);n=c(Math.abs(n))}return new p(b(n,Math.abs(r)),r<0)},h.prototype.plus=h.prototype.add,l.prototype.add=function(t){return new l(this.value+G(t).value)},l.prototype.plus=l.prototype.add,p.prototype.subtract=function(t){var e=G(t);if(this.sign!==e.sign)return this.add(e.negate());var r=this.value,n=e.value;return e.isSmall?q(r,Math.abs(n),this.sign):function(t,e,r){var n;return O(t,e)>=0?n=S(t,e):(n=S(e,t),r=!r),"number"==typeof(n=y(n))?(r&&(n=-n),new h(n)):new p(n,r)}(r,n,this.sign)},p.prototype.minus=p.prototype.subtract,h.prototype.subtract=function(t){var e=G(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var n=e.value;return e.isSmall?new h(r-n):q(n,Math.abs(r),r>=0)},h.prototype.minus=h.prototype.subtract,l.prototype.subtract=function(t){return new l(this.value-G(t).value)},l.prototype.minus=l.prototype.subtract,p.prototype.negate=function(){return new p(this.value,!this.sign)},h.prototype.negate=function(){var t=this.sign,e=new h(-this.value);return e.sign=!t,e},l.prototype.negate=function(){return new l(-this.value)},p.prototype.abs=function(){return new p(this.value,!1)},h.prototype.abs=function(){return new h(Math.abs(this.value))},l.prototype.abs=function(){return new l(this.value>=0?this.value:-this.value)},p.prototype.multiply=function(t){var r,n,i,o=G(t),u=this.value,s=o.value,h=this.sign!==o.sign;if(o.isSmall){if(0===s)return a[0];if(1===s)return this;if(-1===s)return this.negate();if((r=Math.abs(s))<e)return new p(_(u,r),h);s=c(r)}return new p(-.012*(n=u.length)-.012*(i=s.length)+15e-6*n*i>0?U(u,s):E(u,s),h)},p.prototype.times=p.prototype.multiply,h.prototype._multiplyBySmall=function(t){return f(t.value*this.value)?new h(t.value*this.value):N(Math.abs(t.value),c(Math.abs(this.value)),this.sign!==t.sign)},p.prototype._multiplyBySmall=function(t){return 0===t.value?a[0]:1===t.value?this:-1===t.value?this.negate():N(Math.abs(t.value),this.value,this.sign!==t.sign)},h.prototype.multiply=function(t){return G(t)._multiplyBySmall(this)},h.prototype.times=h.prototype.multiply,l.prototype.multiply=function(t){return new l(this.value*G(t).value)},l.prototype.times=l.prototype.multiply,p.prototype.square=function(){return new p(M(this.value),!1)},h.prototype.square=function(){var t=this.value*this.value;return f(t)?new h(t):new p(M(c(Math.abs(this.value))),!1)},l.prototype.square=function(t){return new l(this.value*this.value)},p.prototype.divmod=function(t){var e=I(this,t);return{quotient:e[0],remainder:e[1]}},l.prototype.divmod=h.prototype.divmod=p.prototype.divmod,p.prototype.divide=function(t){return I(this,t)[0]},l.prototype.over=l.prototype.divide=function(t){return new l(this.value/G(t).value)},h.prototype.over=h.prototype.divide=p.prototype.over=p.prototype.divide,p.prototype.mod=function(t){return I(this,t)[1]},l.prototype.mod=l.prototype.remainder=function(t){return new l(this.value%G(t).value)},h.prototype.remainder=h.prototype.mod=p.prototype.remainder=p.prototype.mod,p.prototype.pow=function(t){var e,r,n,i=G(t),o=this.value,u=i.value;if(0===u)return a[1];if(0===o)return a[0];if(1===o)return a[1];if(-1===o)return i.isEven()?a[1]:a[-1];if(i.sign)return a[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&f(e=Math.pow(o,u)))return new h(d(e));for(r=this,n=a[1];!0&u&&(n=n.times(r),--u),0!==u;)u/=2,r=r.square();return n},h.prototype.pow=p.prototype.pow,l.prototype.pow=function(t){var e=G(t),r=this.value,n=e.value,i=BigInt(0),o=BigInt(1),u=BigInt(2);if(n===i)return a[1];if(r===i)return a[0];if(r===o)return a[1];if(r===BigInt(-1))return e.isEven()?a[1]:a[-1];if(e.isNegative())return new l(i);for(var s=this,p=a[1];(n&o)===o&&(p=p.times(s),--n),n!==i;)n/=u,s=s.square();return p},p.prototype.modPow=function(t,e){if(t=G(t),(e=G(e)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=a[1],n=this.mod(e);for(t.isNegative()&&(t=t.multiply(a[-1]),n=n.modInv(e));t.isPositive();){if(n.isZero())return a[0];t.isOdd()&&(r=r.multiply(n).mod(e)),t=t.divide(2),n=n.square().mod(e)}return r},l.prototype.modPow=h.prototype.modPow=p.prototype.modPow,p.prototype.compareAbs=function(t){var e=G(t),r=this.value,n=e.value;return e.isSmall?1:O(r,n)},h.prototype.compareAbs=function(t){var e=G(t),r=Math.abs(this.value),n=e.value;return e.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},l.prototype.compareAbs=function(t){var e=this.value,r=G(t).value;return(e=e>=0?e:-e)===(r=r>=0?r:-r)?0:e>r?1:-1},p.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=G(t),r=this.value,n=e.value;return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:O(r,n)*(this.sign?-1:1)},p.prototype.compareTo=p.prototype.compare,h.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=G(t),r=this.value,n=e.value;return e.isSmall?r==n?0:r>n?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},h.prototype.compareTo=h.prototype.compare,l.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=this.value,r=G(t).value;return e===r?0:e>r?1:-1},l.prototype.compareTo=l.prototype.compare,p.prototype.equals=function(t){return 0===this.compare(t)},l.prototype.eq=l.prototype.equals=h.prototype.eq=h.prototype.equals=p.prototype.eq=p.prototype.equals,p.prototype.notEquals=function(t){return 0!==this.compare(t)},l.prototype.neq=l.prototype.notEquals=h.prototype.neq=h.prototype.notEquals=p.prototype.neq=p.prototype.notEquals,p.prototype.greater=function(t){return this.compare(t)>0},l.prototype.gt=l.prototype.greater=h.prototype.gt=h.prototype.greater=p.prototype.gt=p.prototype.greater,p.prototype.lesser=function(t){return this.compare(t)<0},l.prototype.lt=l.prototype.lesser=h.prototype.lt=h.prototype.lesser=p.prototype.lt=p.prototype.lesser,p.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},l.prototype.geq=l.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals=p.prototype.geq=p.prototype.greaterOrEquals,p.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},l.prototype.leq=l.prototype.lesserOrEquals=h.prototype.leq=h.prototype.lesserOrEquals=p.prototype.leq=p.prototype.lesserOrEquals,p.prototype.isEven=function(){return!(1&this.value[0])},h.prototype.isEven=function(){return!(1&this.value)},l.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},p.prototype.isOdd=function(){return!(1&~this.value[0])},h.prototype.isOdd=function(){return!(1&~this.value)},l.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},p.prototype.isPositive=function(){return!this.sign},h.prototype.isPositive=function(){return this.value>0},l.prototype.isPositive=h.prototype.isPositive,p.prototype.isNegative=function(){return this.sign},h.prototype.isNegative=function(){return this.value<0},l.prototype.isNegative=h.prototype.isNegative,p.prototype.isUnit=function(){return!1},h.prototype.isUnit=function(){return 1===Math.abs(this.value)},l.prototype.isUnit=function(){return this.abs().value===BigInt(1)},p.prototype.isZero=function(){return!1},h.prototype.isZero=function(){return 0===this.value},l.prototype.isZero=function(){return this.value===BigInt(0)},p.prototype.isDivisibleBy=function(t){var e=G(t);return!e.isZero()&&(!!e.isUnit()||(0===e.compareAbs(2)?this.isEven():this.mod(e).isZero()))},l.prototype.isDivisibleBy=h.prototype.isDivisibleBy=p.prototype.isDivisibleBy,p.prototype.isPrime=function(e){var r=P(this);if(r!==t)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return x(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var u=Math.log(2)*o.toJSNumber(),s=Math.ceil(!0===e?2*Math.pow(u,2):u),a=[],p=0;p<s;p++)a.push(i(p+2));return x(n,a)},l.prototype.isPrime=h.prototype.isPrime=p.prototype.isPrime,p.prototype.isProbablePrime=function(e,r){var n=P(this);if(n!==t)return n;for(var o=this.abs(),u=e===t?5:e,s=[],a=0;a<u;a++)s.push(i.randBetween(2,o.minus(2),r));return x(o,s)},l.prototype.isProbablePrime=h.prototype.isProbablePrime=p.prototype.isProbablePrime,p.prototype.modInv=function(t){for(var e,r,n,o=i.zero,u=i.one,s=G(t),a=this.abs();!a.isZero();)e=s.divide(a),r=o,n=s,o=u,s=a,u=r.subtract(e.multiply(u)),a=n.subtract(e.multiply(a));if(!s.isUnit())throw new Error(this.toString()+" and "+t.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(t)),this.isNegative()?o.negate():o},l.prototype.modInv=h.prototype.modInv=p.prototype.modInv,p.prototype.next=function(){var t=this.value;return this.sign?q(t,1,this.sign):new p(b(t,1),this.sign)},h.prototype.next=function(){var t=this.value;return t+1<n?new h(t+1):new p(o,!1)},l.prototype.next=function(){return new l(this.value+BigInt(1))},p.prototype.prev=function(){var t=this.value;return this.sign?new p(b(t,1),!0):q(t,1,this.sign)},h.prototype.prev=function(){var t=this.value;return t-1>-n?new h(t-1):new p(o,!0)},l.prototype.prev=function(){return new l(this.value-BigInt(1))};for(var B=[1];2*B[B.length-1]<=e;)B.push(2*B[B.length-1]);var K=B.length,L=B[K-1];function z(t){return Math.abs(t)<=e}function Z(t,e,r){e=G(e);for(var n=t.isNegative(),o=e.isNegative(),u=n?t.not():t,s=o?e.not():e,a=0,p=0,h=null,l=null,f=[];!u.isZero()||!s.isZero();)a=(h=I(u,L))[1].toJSNumber(),n&&(a=L-1-a),p=(l=I(s,L))[1].toJSNumber(),o&&(p=L-1-p),u=h[0],s=l[0],f.push(r(a,p));for(var c=0!==r(n?1:0,o?1:0)?i(-1):i(0),y=f.length-1;y>=0;y-=1)c=c.multiply(L).add(i(f[y]));return c}p.prototype.shiftLeft=function(t){var e=G(t).toJSNumber();if(!z(e))throw new Error(String(e)+" is too large for shifting.");if(e<0)return this.shiftRight(-e);var r=this;if(r.isZero())return r;for(;e>=K;)r=r.multiply(L),e-=K-1;return r.multiply(B[e])},l.prototype.shiftLeft=function(t){return t=G(t),new l(this.value<<t.value)},h.prototype.shiftLeft=p.prototype.shiftLeft,p.prototype.shiftRight=function(t){var e,r=G(t).toJSNumber();if(!z(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=K;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(e=I(n,L))[1].isNegative()?e[0].prev():e[0],r-=K-1}return(e=I(n,B[r]))[1].isNegative()?e[0].prev():e[0]},l.prototype.shiftRight=function(t){return t=G(t),new l(this.value>>t.value)},h.prototype.shiftRight=p.prototype.shiftRight,p.prototype.not=function(){return this.negate().prev()},l.prototype.not=h.prototype.not=p.prototype.not,p.prototype.and=function(t){return Z(this,t,(function(t,e){return t&e}))},l.prototype.and=h.prototype.and=p.prototype.and,p.prototype.or=function(t){return Z(this,t,(function(t,e){return t|e}))},l.prototype.or=h.prototype.or=p.prototype.or,p.prototype.xor=function(t){return Z(this,t,(function(t,e){return t^e}))},l.prototype.xor=h.prototype.xor=p.prototype.xor;var J=1<<30,C=(e&-e)*(e&-e)|J;function j(t){var r=t.value,n="number"==typeof r?r|J:"bigint"==typeof r?r|BigInt(J):r[0]+r[1]*e|C;return n&-n}function W(t,e){if(e.compareTo(t)<=0){var r=W(t,e.square(e)),n=r.p,o=r.e,u=n.multiply(e);return u.compareTo(t)<=0?{p:u,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function T(t,e){return t=G(t),e=G(e),t.greater(e)?t:e}function R(t,e){return t=G(t),e=G(e),t.lesser(e)?t:e}function D(t,e){if(t=G(t).abs(),e=G(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,n,i=a[1];t.isEven()&&e.isEven();)r=R(j(t),j(e)),t=t.divide(r),e=e.divide(r),i=i.multiply(r);for(;t.isEven();)t=t.divide(j(t));do{for(;e.isEven();)e=e.divide(j(e));t.greater(e)&&(n=e,e=t,t=n),e=e.subtract(t)}while(!e.isZero());return i.isUnit()?t:t.multiply(i)}p.prototype.bitLength=function(){var t=this;return t.compareTo(i(0))<0&&(t=t.negate().subtract(i(1))),0===t.compareTo(i(0))?i(0):i(W(t,i(2)).e).add(i(1))},l.prototype.bitLength=h.prototype.bitLength=p.prototype.bitLength;var V=function(t,e,r,n){r=r||u,t=String(t),n||(t=t.toLowerCase(),r=r.toLowerCase());var i,o=t.length,s=Math.abs(e),a={};for(i=0;i<r.length;i++)a[r[i]]=i;for(i=0;i<o;i++)if("-"!==(l=t[i])&&l in a&&a[l]>=s){if("1"===l&&1===s)continue;throw new Error(l+" is not a valid digit in base "+e+".")}e=G(e);var p=[],h="-"===t[0];for(i=h?1:0;i<t.length;i++){var l;if((l=t[i])in a)p.push(G(a[l]));else{if("<"!==l)throw new Error(l+" is not a valid character");var f=i;do{i++}while(">"!==t[i]&&i<t.length);p.push(G(t.slice(f+1,i)))}}return $(p,e,h)};function $(t,e,r){var n,i=a[0],o=a[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(e);return r?i.negate():i}function F(t,e){if((e=i(e)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(t.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(t.isNegative()&&e.isPositive()&&(n=!0,t=t.abs()),e.isUnit())return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(t.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var o,u=[],s=t;s.isNegative()||s.compareAbs(e)>=0;){o=s.divmod(e),s=o.quotient;var a=o.remainder;a.isNegative()&&(a=e.minus(a).abs(),s=s.next()),u.push(a.toJSNumber())}return u.push(s.toJSNumber()),{value:u.reverse(),isNegative:n}}function Q(t,e,r){var n=F(t,e);return(n.isNegative?"-":"")+n.value.map((function(t){return function(t,e){return t<(e=e||u).length?e[t]:"<"+t+">"}(t,r)})).join("")}function X(t){if(f(+t)){var e=+t;if(e===d(e))return s?new l(BigInt(e)):new h(e);throw new Error("Invalid integer: "+t)}var n="-"===t[0];n&&(t=t.slice(1));var i=t.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(2===i.length){var o=i[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==d(o)||!f(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var u=i[0],a=u.indexOf(".");if(a>=0&&(o-=u.length-a-1,u=u.slice(0,a)+u.slice(a+1)),o<0)throw new Error("Cannot include negative exponent part for integers");t=u+=new Array(o+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);if(s)return new l(BigInt(n?"-"+t:t));for(var c=[],y=t.length,g=r,m=y-g;y>0;)c.push(+t.slice(m,y)),(m-=g)<0&&(m=0),y-=g;return v(c),new p(c,n)}function G(t){return"number"==typeof t?function(t){if(s)return new l(BigInt(t));if(f(t)){if(t!==d(t))throw new Error(t+" is not an integer.");return new h(t)}return X(t.toString())}(t):"string"==typeof t?X(t):"bigint"==typeof t?new l(t):t}p.prototype.toArray=function(t){return F(this,t)},h.prototype.toArray=function(t){return F(this,t)},l.prototype.toArray=function(t){return F(this,t)},p.prototype.toString=function(e,r){if(e===t&&(e=10),10!==e)return Q(this,e,r);for(var n,i=this.value,o=i.length,u=String(i[--o]);--o>=0;)n=String(i[o]),u+="0000000".slice(n.length)+n;return(this.sign?"-":"")+u},h.prototype.toString=function(e,r){return e===t&&(e=10),10!=e?Q(this,e,r):String(this.value)},l.prototype.toString=h.prototype.toString,l.prototype.toJSON=p.prototype.toJSON=h.prototype.toJSON=function(){return this.toString()},p.prototype.valueOf=function(){return parseInt(this.toString(),10)},p.prototype.toJSNumber=p.prototype.valueOf,h.prototype.valueOf=function(){return this.value},h.prototype.toJSNumber=h.prototype.valueOf,l.prototype.valueOf=l.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var H=0;H<1e3;H++)a[H]=G(H),H>0&&(a[-H]=G(-H));return a.one=a[1],a.zero=a[0],a.minusOne=a[-1],a.max=T,a.min=R,a.gcd=D,a.lcm=function(t,e){return t=G(t).abs(),e=G(e).abs(),t.divide(D(t,e)).multiply(e)},a.isInstance=function(t){return t instanceof p||t instanceof h||t instanceof l},a.randBetween=function(t,r,n){t=G(t),r=G(r);var i=n||Math.random,o=R(t,r),u=T(t,r).subtract(o).add(1);if(u.isSmall)return o.add(Math.floor(i()*u));for(var s=F(u,e).value,p=[],h=!0,l=0;l<s.length;l++){var f=h?s[l]:e,c=d(i()*f);p.push(c),c<f&&(h=!1)}return o.add(a.fromArray(p,e,!1))},a.fromArray=function(t,e,r){return $(t.map(G),G(e||10),r)},a}();t.hasOwnProperty("exports")&&(t.exports=i),void 0===(n=function(){return i}.call(e,r,e,t))||(t.exports=n)},51072:(t,e)=>{e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}},80129:(t,e,r)=>{"use strict";r.d(e,{eu:()=>u}),new Error("timeout while waiting for mutex to become available"),new Error("mutex already locked");const n=new Error("request for lock canceled");class i{constructor(t,e=n){this._value=t,this._cancelError=e,this._queue=[],this._weightedWaiters=[]}acquire(t=1,e=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise(((r,n)=>{const i={resolve:r,reject:n,weight:t,priority:e},u=o(this._queue,(t=>e<=t.priority));-1===u&&t<=this._value?this._dispatchItem(i):this._queue.splice(u+1,0,i)}))}runExclusive(t){return e=this,r=arguments,i=function*(t,e=1,r=0){const[n,i]=yield this.acquire(e,r);try{return yield t(n)}finally{i()}},new((n=void 0)||(n=Promise))((function(t,o){function u(t){try{a(i.next(t))}catch(t){o(t)}}function s(t){try{a(i.throw(t))}catch(t){o(t)}}function a(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(t){t(r)}))).then(u,s)}a((i=i.apply(e,r||[])).next())}));var e,r,n,i}waitForUnlock(t=1,e=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,e)?Promise.resolve():new Promise((r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),function(t,e){const r=o(t,(t=>e.priority<=t.priority));t.splice(r+1,0,e)}(this._weightedWaiters[t-1],{resolve:r,priority:e})}))}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach((t=>t.reject(this._cancelError))),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(t){const e=this._value;this._value-=t.weight,t.resolve([e,this._newReleaser(t.weight)])}_newReleaser(t){let e=!1;return()=>{e||(e=!0,this.release(t))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let t=this._value;t>0;t--){const e=this._weightedWaiters[t-1];e&&(e.forEach((t=>t.resolve())),this._weightedWaiters[t-1]=[])}else{const t=this._queue[0].priority;for(let e=this._value;e>0;e--){const r=this._weightedWaiters[e-1];if(!r)continue;const n=r.findIndex((e=>e.priority<=t));(-1===n?r:r.splice(0,n)).forEach((t=>t.resolve()))}}}_couldLockImmediately(t,e){return(0===this._queue.length||this._queue[0].priority<e)&&t<=this._value}}function o(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}class u{constructor(t){this._semaphore=new i(1,t)}acquire(){return t=this,e=arguments,n=function*(t=0){const[,e]=yield this._semaphore.acquire(1,t);return e},new((r=void 0)||(r=Promise))((function(i,o){function u(t){try{a(n.next(t))}catch(t){o(t)}}function s(t){try{a(n.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(u,s)}a((n=n.apply(t,e||[])).next())}));var t,e,r,n}runExclusive(t,e=0){return this._semaphore.runExclusive((()=>t()),1,e)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}}}]);
//# sourceMappingURL=2786.8822cfc420377e0acc77.js.map