-
Notifications
You must be signed in to change notification settings - Fork 3
/
short-crypt.min.js
1 lines (1 loc) · 28.6 KB
/
short-crypt.min.js
1
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,(()=>(()=>{"use strict";var e={356:(e,n)=>{function t(e,n,t){var r;if(void 0===t&&(t={}),!n.codes){n.codes={};for(var i=0;i<n.chars.length;++i)n.codes[n.chars[i]]=i}if(!t.loose&&e.length*n.bits&7)throw new SyntaxError("Invalid padding");for(var o=e.length;"="===e[o-1];)if(--o,!(t.loose||(e.length-o)*n.bits&7))throw new SyntaxError("Invalid padding");for(var s=new(null!=(r=t.out)?r:Uint8Array)(o*n.bits/8|0),h=0,u=0,a=0,w=0;w<o;++w){var f=n.codes[e[w]];if(void 0===f)throw new SyntaxError("Invalid character "+e[w]);u=u<<n.bits|f,(h+=n.bits)>=8&&(h-=8,s[a++]=255&u>>h)}if(h>=n.bits||255&u<<8-h)throw new SyntaxError("Unexpected end of data");return s}function r(e,n,t){void 0===t&&(t={});for(var r=t.pad,i=void 0===r||r,o=(1<<n.bits)-1,s="",h=0,u=0,a=0;a<e.length;++a)for(u=u<<8|255&e[a],h+=8;h>n.bits;)h-=n.bits,s+=n.chars[o&u>>h];if(h&&(s+=n.chars[o&u<<n.bits-h]),i)for(;s.length*n.bits&7;)s+="=";return s}var i={chars:"0123456789ABCDEF",bits:4},o={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits:5},s={chars:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bits:5},h={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bits:6},u={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bits:6},a={parse:function(e,n){return t(e.toUpperCase(),i,n)},stringify:function(e,n){return r(e,i,n)}},w={parse:function(e,n){return void 0===n&&(n={}),t(n.loose?e.toUpperCase().replace(/0/g,"O").replace(/1/g,"L").replace(/8/g,"B"):e,o,n)},stringify:function(e,n){return r(e,o,n)}},f={parse:function(e,n){return t(e,s,n)},stringify:function(e,n){return r(e,s,n)}},c={parse:function(e,n){return t(e,h,n)},stringify:function(e,n){return r(e,h,n)}},g={parse:function(e,n){return t(e,u,n)},stringify:function(e,n){return r(e,u,n)}},l={parse:t,stringify:r};n.YU=a,n.pJ=w,n.eV=f,n.US=c,n.tH=g,n.Y2=l}},n={};function t(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return e[r](o,o.exports,t),o.exports}t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{t.r(r),t.d(r,{ShortCrypt:()=>X});var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function i(e){return!0===(e&&e.__isLong__)}function o(e){var n=Math.clz32(e&-e);return e?31-n:n}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=i;var s={},h={};function u(e,n){var t,r,i;return n?(i=0<=(e>>>=0)&&e<256)&&(r=h[e])?r:(t=w(e,0,!0),i&&(h[e]=t),t):(i=-128<=(e|=0)&&e<128)&&(r=s[e])?r:(t=w(e,e<0?-1:0,!1),i&&(s[e]=t),t)}function a(e,n){if(isNaN(e))return n?b:m;if(n){if(e<0)return b;if(e>=d)return N}else{if(e<=-y)return C;if(e+1>=y)return S}return e<0?a(-e,n).neg():w(e%l|0,e/l|0,n)}function w(e,t,r){return new n(e,t,r)}n.fromInt=u,n.fromNumber=a,n.fromBits=w;var f=Math.pow;function c(e,n,t){if(0===e.length)throw Error("empty string");if("number"==typeof n?(t=n,n=!1):n=!!n,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return n?b:m;if((t=t||10)<2||36<t)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return c(e.substring(1),n,t).neg();for(var i=a(f(t,8)),o=m,s=0;s<e.length;s+=8){var h=Math.min(8,e.length-s),u=parseInt(e.substring(s,s+h),t);if(h<8){var w=a(f(t,h));o=o.mul(w).add(a(u))}else o=(o=o.mul(i)).add(a(u))}return o.unsigned=n,o}function g(e,n){return"number"==typeof e?a(e,n):"string"==typeof e?c(e,n):w(e.low,e.high,"boolean"==typeof n?n:e.unsigned)}n.fromString=c,n.fromValue=g;var l=4294967296,d=l*l,y=d/2,v=u(1<<24),m=u(0);n.ZERO=m;var b=u(0,!0);n.UZERO=b;var p=u(1);n.ONE=p;var E=u(1,!0);n.UONE=E;var A=u(-1);n.NEG_ONE=A;var S=w(-1,2147483647,!1);n.MAX_VALUE=S;var N=w(-1,-1,!0);n.MAX_UNSIGNED_VALUE=N;var C=w(0,-2147483648,!1);n.MIN_VALUE=C;var O=n.prototype;O.toInt=function(){return this.unsigned?this.low>>>0:this.low},O.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},O.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(C)){var n=a(e),t=this.div(n),r=t.mul(n).sub(this);return t.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=a(f(e,6),this.unsigned),o=this,s="";;){var h=o.div(i),u=(o.sub(h.mul(i)).toInt()>>>0).toString(e);if((o=h).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},O.getHighBits=function(){return this.high},O.getHighBitsUnsigned=function(){return this.high>>>0},O.getLowBits=function(){return this.low},O.getLowBitsUnsigned=function(){return this.low>>>0},O.getNumBitsAbs=function(){if(this.isNegative())return this.eq(C)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,n=31;n>0&&0==(e&1<<n);n--);return 0!=this.high?n+33:n+1},O.isZero=function(){return 0===this.high&&0===this.low},O.eqz=O.isZero,O.isNegative=function(){return!this.unsigned&&this.high<0},O.isPositive=function(){return this.unsigned||this.high>=0},O.isOdd=function(){return 1==(1&this.low)},O.isEven=function(){return 0==(1&this.low)},O.equals=function(e){return i(e)||(e=g(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},O.eq=O.equals,O.notEquals=function(e){return!this.eq(e)},O.neq=O.notEquals,O.ne=O.notEquals,O.lessThan=function(e){return this.comp(e)<0},O.lt=O.lessThan,O.lessThanOrEqual=function(e){return this.comp(e)<=0},O.lte=O.lessThanOrEqual,O.le=O.lessThanOrEqual,O.greaterThan=function(e){return this.comp(e)>0},O.gt=O.greaterThan,O.greaterThanOrEqual=function(e){return this.comp(e)>=0},O.gte=O.greaterThanOrEqual,O.ge=O.greaterThanOrEqual,O.compare=function(e){if(i(e)||(e=g(e)),this.eq(e))return 0;var n=this.isNegative(),t=e.isNegative();return n&&!t?-1:!n&&t?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},O.comp=O.compare,O.negate=function(){return!this.unsigned&&this.eq(C)?C:this.not().add(p)},O.neg=O.negate,O.add=function(e){i(e)||(e=g(e));var n=this.high>>>16,t=65535&this.high,r=this.low>>>16,o=65535&this.low,s=e.high>>>16,h=65535&e.high,u=e.low>>>16,a=0,f=0,c=0,l=0;return c+=(l+=o+(65535&e.low))>>>16,f+=(c+=r+u)>>>16,a+=(f+=t+h)>>>16,a+=n+s,w((c&=65535)<<16|(l&=65535),(a&=65535)<<16|(f&=65535),this.unsigned)},O.subtract=function(e){return i(e)||(e=g(e)),this.add(e.neg())},O.sub=O.subtract,O.multiply=function(n){if(this.isZero())return this;if(i(n)||(n=g(n)),e)return w(e.mul(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned);if(n.isZero())return this.unsigned?b:m;if(this.eq(C))return n.isOdd()?C:m;if(n.eq(C))return this.isOdd()?C:m;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(v)&&n.lt(v))return a(this.toNumber()*n.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,s=65535&this.low,h=n.high>>>16,u=65535&n.high,f=n.low>>>16,c=65535&n.low,l=0,d=0,y=0,p=0;return y+=(p+=s*c)>>>16,d+=(y+=o*c)>>>16,y&=65535,d+=(y+=s*f)>>>16,l+=(d+=r*c)>>>16,d&=65535,l+=(d+=o*f)>>>16,d&=65535,l+=(d+=s*u)>>>16,l+=t*c+r*f+o*u+s*h,w((y&=65535)<<16|(p&=65535),(l&=65535)<<16|(d&=65535),this.unsigned)},O.mul=O.multiply,O.divide=function(n){if(i(n)||(n=g(n)),n.isZero())throw Error("division by zero");var t,r,o;if(e)return this.unsigned||-2147483648!==this.high||-1!==n.low||-1!==n.high?w((this.unsigned?e.div_u:e.div_s)(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?b:m;if(this.unsigned){if(n.unsigned||(n=n.toUnsigned()),n.gt(this))return b;if(n.gt(this.shru(1)))return E;o=b}else{if(this.eq(C))return n.eq(p)||n.eq(A)?C:n.eq(C)?p:(t=this.shr(1).div(n).shl(1)).eq(m)?n.isNegative()?p:A:(r=this.sub(n.mul(t)),o=t.add(r.div(n)));if(n.eq(C))return this.unsigned?b:m;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg();o=m}for(r=this;r.gte(n);){t=Math.max(1,Math.floor(r.toNumber()/n.toNumber()));for(var s=Math.ceil(Math.log(t)/Math.LN2),h=s<=48?1:f(2,s-48),u=a(t),c=u.mul(n);c.isNegative()||c.gt(r);)c=(u=a(t-=h,this.unsigned)).mul(n);u.isZero()&&(u=p),o=o.add(u),r=r.sub(c)}return o},O.div=O.divide,O.modulo=function(n){return i(n)||(n=g(n)),e?w((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned):this.sub(this.div(n).mul(n))},O.mod=O.modulo,O.rem=O.modulo,O.not=function(){return w(~this.low,~this.high,this.unsigned)},O.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},O.clz=O.countLeadingZeros,O.countTrailingZeros=function(){return this.low?o(this.low):o(this.high)+32},O.ctz=O.countTrailingZeros,O.and=function(e){return i(e)||(e=g(e)),w(this.low&e.low,this.high&e.high,this.unsigned)},O.or=function(e){return i(e)||(e=g(e)),w(this.low|e.low,this.high|e.high,this.unsigned)},O.xor=function(e){return i(e)||(e=g(e)),w(this.low^e.low,this.high^e.high,this.unsigned)},O.shiftLeft=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?w(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):w(0,this.low<<e-32,this.unsigned)},O.shl=O.shiftLeft,O.shiftRight=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?w(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):w(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},O.shr=O.shiftRight,O.shiftRightUnsigned=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?w(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):w(32===e?this.high:this.high>>>e-32,0,this.unsigned)},O.shru=O.shiftRightUnsigned,O.shr_u=O.shiftRightUnsigned,O.rotateLeft=function(e){var n;return i(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?w(this.high,this.low,this.unsigned):e<32?(n=32-e,w(this.low<<e|this.high>>>n,this.high<<e|this.low>>>n,this.unsigned)):(n=32-(e-=32),w(this.high<<e|this.low>>>n,this.low<<e|this.high>>>n,this.unsigned))},O.rotl=O.rotateLeft,O.rotateRight=function(e){var n;return i(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?w(this.high,this.low,this.unsigned):e<32?(n=32-e,w(this.high<<n|this.low>>>e,this.low<<n|this.high>>>e,this.unsigned)):(n=32-(e-=32),w(this.low<<n|this.high>>>e,this.high<<n|this.low>>>e,this.unsigned))},O.rotr=O.rotateRight,O.toSigned=function(){return this.unsigned?w(this.low,this.high,!1):this},O.toUnsigned=function(){return this.unsigned?this:w(this.low,this.high,!0)},O.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},O.toBytesLE=function(){var e=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},O.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,n>>>24,n>>>16&255,n>>>8&255,255&n]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};const T=n;var U=t(356);U.YU;const x=U.pJ,B=(U.eV,U.US,U.tH);U.Y2;function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function R(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_(r.key),r)}}function q(e,n,t){return(n=_(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function _(e){var n=function(e,n){if("object"!==L(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===L(n)?n:String(n)}var j=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),q(this,"lookupTable",[new T(0,0),new T(2850698899,1123082731),new T(1406430502,2246165463),new T(4198390709,3339788860),new T(239267039,1228105285),new T(2812861004,197363630),new T(1570144761,3436357010),new T(4101814122,2384610425),new T(478534078,2456210570),new T(3044011821,3499502945),new T(1330754712,394727261),new T(3871048203,1433923254),new T(315045217,3679824591),new T(3140289522,2577746724),new T(1091786823,1588881688),new T(3908660948,474253555),new T(2430698991,1715304703),new T(957068156,617453844),new T(3275090121,3822893864),new T(1793056346,2704038595),new T(2661509424,789454522),new T(927555491,1845428049),new T(3447129110,2867846509),new T(1688023685,3894361222),new T(2355387473,4099650677),new T(630090434,3064681886),new T(3752866167,1908045730),new T(1985611748,860526153),new T(2183573646,3177763376),new T(734823965,4288164827),new T(3522354600,948507111),new T(2014899003,2054811660),new T(566430686,3430609407),new T(2284404045,2391412756),new T(1914136312,1234907688),new T(3690811499,191615939),new T(797042433,2236192698),new T(2255212946,3350820433),new T(2085980711,11031661),new T(3586112692,1113109894),new T(1028051552,1578909045),new T(2494358771,485285022),new T(1855110982,3690856098),new T(3346565589,2567774025),new T(855916223,388979504),new T(2599290924,1440725723),new T(1624265625,2463013095),new T(3376047370,3493755148),new T(2971831857,2856814848),new T(415807650,3904334059),new T(3807830807,799427287),new T(1260180868,1834396476),new T(3210765038,3816091461),new T(378164349,2709786286),new T(3971223496,1721052306),new T(1163802971,610651513),new T(2913425295,941704586),new T(72179996,2060559457),new T(4268964521,3183511133),new T(1469647930,4281362358),new T(2749741904,1897014223),new T(168791491,870498852),new T(4029798006,4109623320),new T(1507582181,3053650419),new T(3932954927,3657761301),new T(1132861372,2566251518),new T(3115863049,1608827330),new T(273840794,487858217),new T(3828272624,2469815376),new T(1304755043,3519448507),new T(3086655702,383231879),new T(504403525,1411860076),new T(4142528657,1214500511),new T(1594084866,177418100),new T(2772276663,3447852360),new T(215458596,2406673571),new T(4171961422,22063322),new T(1363223261,1134577969),new T(2877258088,2226219789),new T(43339771,3326184166),new T(2056103104,3157818090),new T(3546780243,4274559745),new T(693750246,970570045),new T(2159279989,2066307286),new T(1959741471,4111146159),new T(3710221964,3086744900),new T(656090425,1894440824),new T(2398163882,840580755),new T(1711832446,777959008),new T(3487714285,1823365003),new T(903614552,2881451447),new T(2620794571,3914306652),new T(1749717409,1735249957),new T(3248531250,631058894),new T(1000275079,3800830962),new T(2457127444,2692543001),new T(3417254641,377484266),new T(1648696418,1418662401),new T(2558216151,2476617789),new T(831615300,3513700822),new T(3320694318,1598854575),new T(1812459709,498889796),new T(2520361736,3668792952),new T(1070833051,2556278675),new T(3609916239,2216247136),new T(2126562780,3337215627),new T(2231279209,33094839),new T(756328698,1124605276),new T(3647479696,3442104613),new T(1887578371,2413476046),new T(2327605942,1221303026),new T(592856101,171670297),new T(1531883294,1883409173),new T(4070873485,850553598),new T(144359992,4121118914),new T(2708534443,3075713321),new T(1426867137,963767632),new T(4242961746,2072054971),new T(114831079,3163565703),new T(2939295860,4267757420),new T(1204516512,3794028447),new T(3995156531,2698290804),new T(337582982,1740997704),new T(3186961685,624256419),new T(1233754751,2870419930),new T(3764628716,3924279345),new T(442365785,787931661),new T(3015164362,1812333542),new T(2100458701,4143637952),new T(3570942558,3020555307),new T(786831851,1931159063),new T(2265722744,837535740),new T(1936758802,3217654661),new T(3667570305,4248396398),new T(547681588,975716434),new T(2303640487,2027463097),new T(1639427443,1687955786),new T(3361577952,644663457),new T(845398101,3783125661),new T(2609510086,2743929718),new T(1878344108,766463759),new T(3323950911,1868541668),new T(1008807050,2823720152),new T(2513115673,3938348339),new T(3990090018,2429001023),new T(1144637361,3526851796),new T(3188169732,354836200),new T(401451671,1473691395),new T(3817938429,3656711034),new T(1249586030,2600737425),new T(2957340891,1544894637),new T(430917192,518379846),new T(4048955548,44126645),new T(1488723471,1079095390),new T(2726446522,2269155938),new T(191394601,3316675465),new T(4279551043,1267873776),new T(1459548880,157472283),new T(2898307429,3463705639),new T(86679542,2357401036),new T(1559330579,981472319),new T(4112206208,2020668884),new T(254087733,3210860520),new T(2798593190,4254152195),new T(1387500492,1941140090),new T(4216956255,826512273),new T(23592682,4132614573),new T(2827864185,3030536262),new T(1081386669,2833701045),new T(3919482942,3927325022),new T(329304971,755440482),new T(3125476632,1878522505),new T(1312180850,3788881648),new T(3889986785,2737135387),new T(501360468,1681161511),new T(3020427719,650419404),new T(3423664892,1555918016),new T(1710935151,508398891),new T(2680461274,3646730007),new T(909025609,2611760892),new T(3260159523,361630341),new T(1807229104,1467935598),new T(2441509637,2423245138),new T(946621846,3533646009),new T(3499434818,3470499914),new T(2038371793,2351645089),new T(2202095204,1262117789),new T(715880695,164266614),new T(3738685341,2280179215),new T(2000550158,3306694628),new T(2365825723,34145752),new T(619287592,1090118707),new T(2539541986,754968533),new T(1052009329,1846478398),new T(3297392836,2837324802),new T(1835011671,3958293993),new T(2568796477,1707901328),new T(821465006,658268283),new T(3402159131,3761062471),new T(1663230600,2732434348),new T(2346421340,3197709151),new T(573684431,4234791604),new T(3624919418,997779592),new T(1910888425,2038958435),new T(2241421443,4155133210),new T(745756176,3042618609),new T(3595373989,1917554381),new T(2141666102,817590054),new T(130011149,1254268714),new T(2924865182,137526977),new T(1416346923,3475201277),new T(4253125560,2379463958),new T(167591122,66189679),new T(2685864513,1090590852),new T(1512657396,2249210552),new T(4089669479,3303070547),new T(456788403,3634647968),new T(2999992096,2589241931),new T(1223582869,1564840055),new T(3775156742,531984796),new T(360244588,2442606053),new T(3163739135,3546797070),new T(1185712202,343340594),new T(4014391001,1451628505),new T(3063766588,3766818346),new T(527919279,2725640129),new T(3846779674,1701107197),new T(1285752201,664024086),new T(3101668067,2847305839),new T(288719984,3947270532),new T(3943423941,743945144),new T(1122101590,1856459347),new T(2853734274,1927535264),new T(66236689,806566731),new T(4190956196,4144109943),new T(1344724023,3052599452),new T(2757389149,1003535589),new T(229662158,2032164110),new T(4153280123,3190914866),new T(1583624424,4240547545),new T(645716947,2260233941),new T(2409033024,3293089598),new T(1973991157,56208642),new T(3695345766,1101614313),new T(675165964,3481995408),new T(2178154911,2373708155),new T(2078956074,1248512839),new T(3523243193,144321196),new T(989397613,350134879),new T(2467509502,1445872564),new T(1764585291,2436850056),new T(3234290136,3553591395),new T(884731570,1575863322),new T(2639386657,522003953),new T(1735361428,3624667085),new T(3464869127,2600265254)]),q(this,"sum",new T(4294967295,4294967295)),q(this,"finalXOR",new T(4294967295,4294967295))}var n,t,r;return n=e,(t=[{key:"digest",value:function(e){var n=this;"string"==typeof e&&(e=(new TextEncoder).encode(e)),e.forEach((function(e){var t=n.sum.shiftRightUnsigned(56).xor(e).toNumber();n.sum=n.sum.shiftLeft(8).xor(n.lookupTable[t])}))}},{key:"getNumber",value:function(){return this.sum}},{key:"getLong",value:function(){return this.sum.xor(this.finalXOR)}},{key:"getByteArray",value:function(){return this.getLong().toBytesBE()}}])&&R(n.prototype,t),r&&R(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function I(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function P(e,n,t){return(n=Z(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Z(e){var n=function(e,n){if("object"!==k(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===k(n)?n:String(n)}var M=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),P(this,"lookupTable",[0,155,173,54,193,90,108,247,25,130,180,47,216,67,117,238,50,169,159,4,243,104,94,197,43,176,134,29,234,113,71,220,100,255,201,82,165,62,8,147,125,230,208,75,188,39,17,138,86,205,251,96,151,12,58,161,79,212,226,121,142,21,35,184,200,83,101,254,9,146,164,63,209,74,124,231,16,139,189,38,250,97,87,204,59,160,150,13,227,120,78,213,34,185,143,20,172,55,1,154,109,246,192,91,181,46,24,131,116,239,217,66,158,5,51,168,95,196,242,105,135,28,42,177,70,221,235,112,11,144,166,61,202,81,103,252,18,137,191,36,211,72,126,229,57,162,148,15,248,99,85,206,32,187,141,22,225,122,76,215,111,244,194,89,174,53,3,152,118,237,219,64,183,44,26,129,93,198,240,107,156,7,49,170,68,223,233,114,133,30,40,179,195,88,110,245,2,153,175,52,218,65,119,236,27,128,182,45,241,106,92,199,48,171,157,6,232,115,69,222,41,178,132,31,167,60,10,145,102,253,203,80,190,37,19,136,127,228,210,73,149,14,56,163,84,207,249,98,140,23,33,186,77,214,224,123]),P(this,"sum",255)}var n,t,r;return n=e,(t=[{key:"digest",value:function(e){var n=this;"string"==typeof e&&(e=(new TextEncoder).encode(e)),e.forEach((function(e){var t=n.sum^e;n.sum=n.sum<<8&255^n.lookupTable[t]}))}},{key:"getNumber",value:function(){return this.sum}}])&&I(n.prototype,t),r&&I(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function V(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return K(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return K(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function H(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(i=r.key,o=void 0,o=function(e,n){if("object"!==z(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(i,"string"),"symbol"===z(o)?o:String(o)),r)}var i,o}var X=function(){function e(n){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e);var t=(new TextEncoder).encode(n),r=new j;r.digest(t),this.hashedKey=r.getByteArray();var i,o=T.UZERO;t.forEach((function(e){o=o.add(e)})),this.keySumRev=(i=(i=(i=(i=(i=(i=o).shiftRight(1).and(new T(1431655765,1431655765)).or(i.and(new T(1431655765,1431655765)).shiftLeft(1))).shiftRight(2).and(new T(858993459,858993459)).or(i.and(new T(858993459,858993459)).shiftLeft(2))).shiftRight(4).and(new T(252645135,252645135)).or(i.and(new T(252645135,252645135)).shiftLeft(4))).shiftRight(8).and(new T(16711935,16711935)).or(i.and(new T(16711935,16711935)).shiftLeft(8))).shiftRight(16).and(new T(65535,65535)).or(i.and(new T(65535,65535)).shiftLeft(16))).shiftRight(32).or(i.shiftLeft(32))}var n,t,r;return n=e,(t=[{key:"encrypt",value:function(e){var n=this;"string"==typeof e&&(e=(new TextEncoder).encode(e));var t=e.length,r=new M;r.digest(e);var i=r.getNumber()%32,o=new Uint8Array(t),s=i,h=T.fromNumber(i,!0);e.forEach((function(e,t){var r=e^n.hashedKey[t%8]^i;o[t]=r,s^=r,h=h.add(T.fromNumber(r,!0))}));var u=new j;u.digest(new Uint8Array([s].concat(V(h.toBytesBE()))));for(var a=u.getByteArray(),w=[],f=0;f<t;++f){var c=f%8;w.push((a[c]^this.hashedKey[c])%t)}return w.forEach((function(e,n){if(e!==n){var t=o[n];o[n]=o[e],o[e]=t}})),{base:i,body:o}}},{key:"decrypt",value:function(e,n){var t,r=this;if("object"===z(e)?(n=e.body,t=e.base):t=e,t<0||t>31)return!1;var i=n,o=i.length,s=new Uint8Array(o),h=t,u=T.fromNumber(t,!0);i.forEach((function(e){h^=e,u=u.add(T.fromNumber(e,!0))}));var a=new j;a.digest(new Uint8Array([h].concat(V(u.toBytesBE()))));for(var w=a.getByteArray(),f=[],c=0;c<o;++c){var g=c%8;f.push((w[g]^this.hashedKey[g])%o)}var l=f.length-1;return f.reverse().forEach((function(e,n){if(e!==(n=l-n)){var t=i[n];i[n]=i[e],i[e]=t}})),i.forEach((function(e,n){var i=r.hashedKey[n%8]^t;s[n]=e^i})),s}},{key:"encryptToURLComponent",value:function(e){"string"==typeof e&&(e=(new TextEncoder).encode(e));var n,t=this.encrypt(e),r=(n=t.base)<10?n+"0".charCodeAt(0):n>=10&&n<36?n-10+"A".charCodeAt(0):n>=36&&n<62?n-36+"a".charCodeAt(0):62===n?"-".charCodeAt(0):"_".charCodeAt(0),i=t.body,o=String.fromCharCode(r),s=B.stringify(i,{pad:!1}),h=(new TextEncoder).encode(s),u=h.length,a=T.fromNumber(r);h.forEach((function(e){a=a.add(T.fromNumber(e,!0))}));var w=this.keySumRev.xor(a).mod(u+1).toNumber();return s.substring(0,w)+o+s.substring(w,u)}},{key:"decryptURLComponent",value:function(e){var n=(new TextEncoder).encode(e),t=n.length;if(t<1)return!1;var r=T.UZERO;n.forEach((function(e){r=r.add(T.fromNumber(e,!0))}));var i,o=this.keySumRev.xor(r).mod(t).toNumber(),s=(i=n[o])>="0".charCodeAt(0)&&i<="9".charCodeAt(0)?i-"0".charCodeAt(0):i>="A".charCodeAt(0)&&i<="Z".charCodeAt(0)?i+10-"A".charCodeAt(0):i>="a".charCodeAt(0)&&i<="z".charCodeAt(0)?i+36-"a".charCodeAt(0):i==="-".charCodeAt(0)?62:63;if(s<0||s>31)return!1;var h=e.slice(0,o)+e.slice(o+1,t);try{var u=B.parse(h,{out:Uint8Array,loose:!0});return this.decrypt(s,u)}catch(e){return!1}}},{key:"encryptToQRCodeAlphanumeric",value:function(e){"string"==typeof e&&(e=(new TextEncoder).encode(e));var n,t=this.encrypt(e),r=(n=t.base)<10?n+"0".charCodeAt(0):n-10+"A".charCodeAt(0),i=t.body,o=String.fromCharCode(r),s=x.stringify(i,{pad:!1}),h=(new TextEncoder).encode(s),u=h.length,a=T.fromNumber(r,!0);h.forEach((function(e){a=a.add(T.fromNumber(e,!0))}));var w=this.keySumRev.xor(a).mod(u+1).toNumber();return s.substring(0,w)+o+s.substring(w,u)}},{key:"decryptQRCodeAlphanumeric",value:function(e){var n=(new TextEncoder).encode(e),t=n.length;if(t<1)return!1;var r=T.UZERO;n.forEach((function(e){r=r.add(T.fromNumber(e,!0))}));var i,o=this.keySumRev.xor(r).mod(t).toNumber(),s=(i=n[o])>="0".charCodeAt(0)&&i<="9".charCodeAt(0)?i-"0".charCodeAt(0):i+10-"A".charCodeAt(0);if(s<0||s>31)return!1;var h=e.slice(0,o)+e.slice(o+1,t);try{var u=x.parse(h,{out:Uint8Array,loose:!0});return this.decrypt(s,u)}catch(e){return!1}}}])&&H(n.prototype,t),r&&H(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}()})(),r})()));