5 lines
30 KiB
JavaScript
5 lines
30 KiB
JavaScript
|
|
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.ProtonsRuntime = factory()}(typeof self !== 'undefined' ? self : this, function () {
|
||
|
|
"use strict";var ProtonsRuntime=(()=>{var ct=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var ze=Object.prototype.hasOwnProperty;var p=(r,t)=>{for(var e in t)ct(r,e,{get:t[e],enumerable:!0})},Te=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Re(t))!ze.call(r,i)&&i!==e&&ct(r,i,{get:()=>t[i],enumerable:!(n=Le(t,i))||n.enumerable});return r};var Ve=r=>Te(ct({},"__esModule",{value:!0}),r);var rn={};p(rn,{CodeError:()=>Ot,MaxLengthError:()=>$t,MaxSizeError:()=>vt,NoMessagesFoundError:()=>Pt,ParseError:()=>Gt,decodeMessage:()=>ie,encodeMessage:()=>Ce,enumeration:()=>Ue,message:()=>De,reader:()=>tt,writer:()=>it});function C(r=0){return new Uint8Array(r)}var ke=Math.pow(2,7),_e=Math.pow(2,14),Oe=Math.pow(2,21),jt=Math.pow(2,28),Xt=Math.pow(2,35),qt=Math.pow(2,42),Jt=Math.pow(2,49),u=128,U=127;function P(r){if(r<ke)return 1;if(r<_e)return 2;if(r<Oe)return 3;if(r<jt)return 4;if(r<Xt)return 5;if(r<qt)return 6;if(r<Jt)return 7;if(Number.MAX_SAFE_INTEGER!=null&&r>Number.MAX_SAFE_INTEGER)throw new RangeError("Could not encode varint");return 8}function Wt(r,t,e=0){switch(P(r)){case 8:t[e++]=r&255|u,r/=128;case 7:t[e++]=r&255|u,r/=128;case 6:t[e++]=r&255|u,r/=128;case 5:t[e++]=r&255|u,r/=128;case 4:t[e++]=r&255|u,r>>>=7;case 3:t[e++]=r&255|u,r>>>=7;case 2:t[e++]=r&255|u,r>>>=7;case 1:{t[e++]=r&255,r>>>=7;break}default:throw new Error("unreachable")}return t}function Ht(r,t){let e=r[t],n=0;if(n+=e&U,e<u||(e=r[t+1],n+=(e&U)<<7,e<u)||(e=r[t+2],n+=(e&U)<<14,e<u)||(e=r[t+3],n+=(e&U)<<21,e<u)||(e=r[t+4],n+=(e&U)*jt,e<u)||(e=r[t+5],n+=(e&U)*Xt,e<u)||(e=r[t+6],n+=(e&U)*qt,e<u)||(e=r[t+7],n+=(e&U)*Jt,e<u))return n;throw new RangeError("Could not decode varint")}var ht=new Float32Array([-0]),D=new Uint8Array(ht.buffer);function Qt(r,t,e){ht[0]=r,t[e]=D[0],t[e+1]=D[1],t[e+2]=D[2],t[e+3]=D[3]}function Kt(r,t){return D[0]=r[t],D[1]=r[t+1],D[2]=r[t+2],D[3]=r[t+3],ht[0]}var at=new Float64Array([-0]),d=new Uint8Array(at.buffer);function Zt(r,t,e){at[0]=r,t[e]=d[0],t[e+1]=d[1],t[e+2]=d[2],t[e+3]=d[3],t[e+4]=d[4],t[e+5]=d[5],t[e+6]=d[6],t[e+7]=d[7]}function Yt(r,t){return d[0]=r[t],d[1]=r[t+1],d[2]=r[t+2],d[3]=r[t+3],d[4]=r[t+4],d[5]=r[t+5],d[6]=r[t+6],d[7]=r[t+7],at[0]}var $e=BigInt(Number.MAX_SAFE_INTEGER),ve=BigInt(Number.MIN_SAFE_INTEGER),l=class r{lo;hi;constructor(t,e){this.lo=t|0,this.hi=e|0}toNumber(t=!1){if(!t&&this.hi>>>31>0){let e=~this.lo+1>>>0,n=~this.hi>>>0;return e===0&&(n=n+1>>>0),-(e+n*4294967296)}return this.lo+this.hi*4294967296}toBigInt(t=!1){if(t)return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n);if(this.hi>>>31){let e=~this.lo+1>>>0,n=~this.hi>>>0;return e===0&&(n=n+1>>>0),-(BigInt(e)+(BigInt(n)<<32n))}return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n)}toString(t=!1){return this.toBigInt(t).toString()}zzEncode(){let t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this}zzDecode(){let t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this}length(){let t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?e===0?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}static fromBigInt(t){if(t===0n)return R;if(t<$e&&t>ve)return this.fromNumber(Number(t));let e=t<0n;e&&(t=-t);let n=t>>32n,i=t-(n<<32n);return e&&(n=~n|0n,i=~i|0n,++i>te&&(i=0n,++n>te&&(n=0n))),new r(Number(i),Number(n))}static fromNumber(t){if(t===0)return R;let e=t<0;e&&(t=-t);let n=t>>>0,i=(t-n)/4294967296>>>0;return e&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)}static from(t){return typeof t=="number"?r.fromNumber(t):typeof t=="bigint"?r.fromBigInt(t):typeof t=="string"?r.fromBigInt(BigInt(t)):t.low!=null||t.high!=null?new r(t.low>>>0,t.high>>>0):R}},R=new l(0,0);R.toBigInt=function(){return 0n};R.zzEncode=R.zzDecode=function(){return this};R.length=function(){return 1};var te=4294967296n;function ee(r){let t=0,e=0;for(let n=0;n<r.length;++n)e=r.charCodeAt(n),e<128?t+=1:e<2048?t+=2:(e&64512)===55296&&(r.charCodeAt(n+1)&64512)===56320?(++n,t
|
||
|
|
return ProtonsRuntime}));
|
||
|
|
//# sourceMappingURL=index.min.js.map
|