From 6008c94949a6497a0c36e2bcb01df44aa358c522 Mon Sep 17 00:00:00 2001 From: ZiRo Date: Wed, 18 May 2016 13:41:20 +0200 Subject: [PATCH] use native js function for siphash --- contrib/static/miner-js.js | 3 +- contrib/static/mineworker.js | 1 + contrib/static/siphash-lib.js | 88 +++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 contrib/static/siphash-lib.js diff --git a/contrib/static/miner-js.js b/contrib/static/miner-js.js index d3a1890..d90158f 100644 --- a/contrib/static/miner-js.js +++ b/contrib/static/miner-js.js @@ -39,8 +39,7 @@ $packages["runtime/trace"]=(function(){var $pkg={},$init,A,B;A=$packages["io"];B $packages["testing"]=(function(){var $pkg={},$init,H,B,C,E,I,D,A,K,L,M,N,J,F,G,P,Q,R,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;H=$packages["bytes"];B=$packages["flag"];C=$packages["fmt"];E=$packages["github.com/gopherjs/gopherjs/nosync"];I=$packages["io"];D=$packages["os"];A=$packages["runtime"];K=$packages["runtime/debug"];L=$packages["runtime/pprof"];M=$packages["runtime/trace"];N=$packages["strconv"];J=$packages["strings"];F=$packages["sync/atomic"];G=$packages["time"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=H.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=M.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=N.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a=B.String("test.bench","","regular expression to select benchmarks to run");$s=15;case 15:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}P=a;b=B.Duration("test.benchtime",new G.Duration(0,1000000000),"approximate run time for each benchmark");$s=16;case 16:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}Q=b;c=B.Bool("test.benchmem",false,"print memory allocations for benchmarks");$s=17;case 17:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}R=c;d=B.Bool("test.short",false,"run smaller test suite to save time");$s=18;case 18:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}AP=d;e=B.String("test.outputdir","","directory in which to write profiles");$s=19;case 19:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}AQ=e;f=B.Bool("test.v",false,"verbose: print additional output");$s=20;case 20:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}AR=f;g=B.Uint("test.count",1,"run tests and benchmarks `n` times");$s=21;case 21:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}AS=g;h=B.String("test.coverprofile","","write a coverage profile to the named file after execution");$s=22;case 22:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}AT=h;i=B.String("test.run","","regular expression to select tests and examples to run");$s=23;case 23:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}AU=i;j=B.String("test.memprofile","","write a memory profile to the named file after execution");$s=24;case 24:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}AV=j;k=B.Int("test.memprofilerate",0,"if >=0, sets runtime.MemProfileRate");$s=25;case 25:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}AW=k;l=B.String("test.cpuprofile","","write a cpu profile to the named file during execution");$s=26;case 26:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}AX=l;m=B.String("test.blockprofile","","write a goroutine blocking profile to the named file after execution");$s=27;case 27:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}AY=m;n=B.Int("test.blockprofilerate",1,"if >= 0, calls runtime.SetBlockProfileRate()");$s=28;case 28:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}AZ=n;o=B.String("test.trace","","write an execution trace to the named file after execution");$s=29;case 29:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}BA=o;p=B.Duration("test.timeout",new G.Duration(0,0),"if positive, sets an aggregate time limit for all tests");$s=30;case 30:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}BB=p;q=B.String("test.cpu","","comma-separated list of number of CPUs to use for each test");$s=31;case 31:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}BC=q;r=B.Int("test.parallel",A.GOMAXPROCS(0),"maximum test parallelism");$s=32;case 32:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}BD=r;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $packages["unicode/utf16"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $packages["encoding/json"]=(function(){var $pkg={},$init,B,C,D,E,F,P,Q,M,G,H,N,I,O,A,J,K,L,X,AK,AL,AM,AO,AQ,AU,BJ,BP,BR,BU,BW,BY,CA,CF,CG,CI,CJ,CY,CZ,ER,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC,FD,FG,FH,FI,FJ,FN,FS,FT,FV,FW,FX,FY,FZ,GA,GB,GC,GD,GE,AA,AD,AP,AV,AY,AZ,BK,BL,CM,a,b,Y,AH,AT,AW,AX,BA,BB,BC,BD,BE,BF,BG,BH,BI,BM,BN,BO,BQ,BS,BT,BV,BX,BZ,CB,CC,CD,CE,CH,CK,CL,CN,CO,CP,CQ,CR,CT,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,DS,DT,DU,DV,DW,DX,DY,DZ,EA,EB,EC,ED,EE,EF,EG,ES;B=$packages["bytes"];C=$packages["encoding"];D=$packages["encoding/base64"];E=$packages["errors"];F=$packages["fmt"];P=$packages["github.com/gopherjs/gopherjs/nosync"];Q=$packages["io"];M=$packages["math"];G=$packages["reflect"];H=$packages["runtime"];N=$packages["sort"];I=$packages["strconv"];O=$packages["strings"];A=$packages["testing"];J=$packages["unicode"];K=$packages["unicode/utf16"];L=$packages["unicode/utf8"];X=$pkg.Number=$newType(8,$kindString,"json.Number","Number","encoding/json",null);AK=$pkg.Marshaler=$newType(8,$kindInterface,"json.Marshaler","Marshaler","encoding/json",null);AL=$pkg.UnsupportedTypeError=$newType(0,$kindStruct,"json.UnsupportedTypeError","UnsupportedTypeError","encoding/json",function(Type_){this.$val=this;if(arguments.length===0){this.Type=$ifaceNil;return;}this.Type=Type_;});AM=$pkg.UnsupportedValueError=$newType(0,$kindStruct,"json.UnsupportedValueError","UnsupportedValueError","encoding/json",function(Value_,Str_){this.$val=this;if(arguments.length===0){this.Value=new G.Value.ptr(FD.nil,0,0);this.Str="";return;}this.Value=Value_;this.Str=Str_;});AO=$pkg.MarshalerError=$newType(0,$kindStruct,"json.MarshalerError","MarshalerError","encoding/json",function(Type_,Err_){this.$val=this;if(arguments.length===0){this.Type=$ifaceNil;this.Err=$ifaceNil;return;}this.Type=Type_;this.Err=Err_;});AQ=$pkg.encodeState=$newType(0,$kindStruct,"json.encodeState","encodeState","encoding/json",function(Buffer_,scratch_){this.$val=this;if(arguments.length===0){this.Buffer=new B.Buffer.ptr(EZ.nil,0,FG.zero(),FH.zero(),0);this.scratch=FH.zero();return;}this.Buffer=Buffer_;this.scratch=scratch_;});AU=$pkg.encoderFunc=$newType(4,$kindFunc,"json.encoderFunc","encoderFunc","encoding/json",null);BJ=$pkg.floatEncoder=$newType(4,$kindInt,"json.floatEncoder","floatEncoder","encoding/json",null);BP=$pkg.structEncoder=$newType(0,$kindStruct,"json.structEncoder","structEncoder","encoding/json",function(fields_,fieldEncs_){this.$val=this;if(arguments.length===0){this.fields=EW.nil;this.fieldEncs=FJ.nil;return;}this.fields=fields_;this.fieldEncs=fieldEncs_;});BR=$pkg.mapEncoder=$newType(0,$kindStruct,"json.mapEncoder","mapEncoder","encoding/json",function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});BU=$pkg.sliceEncoder=$newType(0,$kindStruct,"json.sliceEncoder","sliceEncoder","encoding/json",function(arrayEnc_){this.$val=this;if(arguments.length===0){this.arrayEnc=$throwNilPointerError;return;}this.arrayEnc=arrayEnc_;});BW=$pkg.arrayEncoder=$newType(0,$kindStruct,"json.arrayEncoder","arrayEncoder","encoding/json",function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});BY=$pkg.ptrEncoder=$newType(0,$kindStruct,"json.ptrEncoder","ptrEncoder","encoding/json",function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});CA=$pkg.condAddrEncoder=$newType(0,$kindStruct,"json.condAddrEncoder","condAddrEncoder","encoding/json",function(canAddrEnc_,elseEnc_){this.$val=this;if(arguments.length===0){this.canAddrEnc=$throwNilPointerError;this.elseEnc=$throwNilPointerError;return;}this.canAddrEnc=canAddrEnc_;this.elseEnc=elseEnc_;});CF=$pkg.stringValues=$newType(12,$kindSlice,"json.stringValues","stringValues","encoding/json",null);CG=$pkg.field=$newType(0,$kindStruct,"json.field","field","encoding/json",function(name_,nameBytes_,equalFold_,tag_,index_,typ_,omitEmpty_,quoted_){this.$val=this;if(arguments.length===0){this.name="";this.nameBytes=EZ.nil;this.equalFold=$throwNilPointerError;this.tag=false;this.index=FC.nil;this.typ=$ifaceNil;this.omitEmpty=false;this.quoted=false;return;}this.name=name_;this.nameBytes=nameBytes_;this.equalFold=equalFold_;this.tag=tag_;this.index=index_;this.typ=typ_;this.omitEmpty=omitEmpty_;this.quoted=quoted_;});CI=$pkg.byName=$newType(12,$kindSlice,"json.byName","byName","encoding/json",null);CJ=$pkg.byIndex=$newType(12,$kindSlice,"json.byIndex","byIndex","encoding/json",null);CY=$pkg.SyntaxError=$newType(0,$kindStruct,"json.SyntaxError","SyntaxError","encoding/json",function(msg_,Offset_){this.$val=this;if(arguments.length===0){this.msg="";this.Offset=new $Int64(0,0);return;}this.msg=msg_;this.Offset=Offset_;});CZ=$pkg.scanner=$newType(0,$kindStruct,"json.scanner","scanner","encoding/json",function(step_,endTop_,parseState_,err_,redo_,redoCode_,redoState_,bytes_){this.$val=this;if(arguments.length===0){this.step=$throwNilPointerError;this.endTop=false;this.parseState=FC.nil;this.err=$ifaceNil;this.redo=false;this.redoCode=0;this.redoState=$throwNilPointerError;this.bytes=new $Int64(0,0);return;}this.step=step_;this.endTop=endTop_;this.parseState=parseState_;this.err=err_;this.redo=redo_;this.redoCode=redoCode_;this.redoState=redoState_;this.bytes=bytes_;});ER=$pkg.tagOptions=$newType(8,$kindString,"json.tagOptions","tagOptions","encoding/json",null);ET=$sliceType($emptyInterface);EU=$mapType(G.Type,AU);EV=$structType([{prop:"RWMutex",name:"",pkg:"",typ:P.RWMutex,tag:""},{prop:"m",name:"m",pkg:"encoding/json",typ:EU,tag:""}]);EW=$sliceType(CG);EX=$mapType(G.Type,EW);EY=$structType([{prop:"RWMutex",name:"",pkg:"",typ:P.RWMutex,tag:""},{prop:"m",name:"m",pkg:"encoding/json",typ:EX,tag:""}]);EZ=$sliceType($Uint8);FA=$ptrType(AK);FB=$ptrType(C.TextMarshaler);FC=$sliceType($Int);FD=$ptrType(G.rtype);FG=$arrayType($Uint8,4);FH=$arrayType($Uint8,64);FI=$ptrType(AQ);FJ=$sliceType(AU);FN=$ptrType(CY);FS=$ptrType(AL);FT=$ptrType(AM);FV=$ptrType(AO);FW=$ptrType(BP);FX=$ptrType(BR);FY=$ptrType(BU);FZ=$ptrType(BW);GA=$ptrType(BY);GB=$ptrType(CA);GC=$funcType([EZ,EZ],[$Bool],false);GD=$ptrType(CZ);GE=$funcType([GD,$Uint8],[$Int],false);X.prototype.String=function(){var $ptr,c;c=this.$val;return c;};$ptrType(X).prototype.String=function(){return new X(this.$get()).String();};X.prototype.Float64=function(){var $ptr,c;c=this.$val;return I.ParseFloat(c,64);};$ptrType(X).prototype.Float64=function(){return new X(this.$get()).Float64();};X.prototype.Int64=function(){var $ptr,c;c=this.$val;return I.ParseInt(c,10,64);};$ptrType(X).prototype.Int64=function(){return new X(this.$get()).Int64();};Y=function(c){var $ptr,c;if(c===""){return false;}if(c.charCodeAt(0)===45){c=c.substring(1);if(c===""){return false;}}if((c.charCodeAt(0)===48)){c=c.substring(1);}else if(49<=c.charCodeAt(0)&&c.charCodeAt(0)<=57){c=c.substring(1);while(true){if(!(c.length>0&&48<=c.charCodeAt(0)&&c.charCodeAt(0)<=57)){break;}c=c.substring(1);}}else{return false;}if(c.length>=2&&(c.charCodeAt(0)===46)&&48<=c.charCodeAt(1)&&c.charCodeAt(1)<=57){c=c.substring(2);while(true){if(!(c.length>0&&48<=c.charCodeAt(0)&&c.charCodeAt(0)<=57)){break;}c=c.substring(1);}}if(c.length>=2&&((c.charCodeAt(0)===101)||(c.charCodeAt(0)===69))){c=c.substring(1);if((c.charCodeAt(0)===43)||(c.charCodeAt(0)===45)){c=c.substring(1);if(c===""){return false;}}while(true){if(!(c.length>0&&48<=c.charCodeAt(0)&&c.charCodeAt(0)<=57)){break;}c=c.substring(1);}}return c==="";};AH=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=new AQ.ptr(new B.Buffer.ptr(EZ.nil,0,FG.zero(),FH.zero(),0),FH.zero());e=d.marshal(c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){return[EZ.nil,f];}return[d.Buffer.Bytes(),$ifaceNil];}return;}if($f===undefined){$f={$blk:AH};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Marshal=AH;AL.ptr.prototype.Error=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Type.String();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$s=2;case 2:return"json: unsupported type: "+d;}return;}if($f===undefined){$f={$blk:AL.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AL.prototype.Error=function(){return this.$val.Error();};AM.ptr.prototype.Error=function(){var $ptr,c;c=this;return"json: unsupported value: "+c.Str;};AM.prototype.Error=function(){return this.$val.Error();};AO.ptr.prototype.Error=function(){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Type.String();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=c.Err.Error();$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}$s=3;case 3:return"json: error calling MarshalJSON for type "+d+": "+e;}return;}if($f===undefined){$f={$blk:AO.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AO.prototype.Error=function(){return this.$val.Error();};AQ.ptr.prototype.marshal=function(c){var $ptr,c,d,e,f,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);d=[d];d[0]=$ifaceNil;e=this;$deferred.push([(function(d){return function(){var $ptr,f,g,h,i,j,k;f=$recover();if(!($interfaceIsEqual(f,$ifaceNil))){g=$assertType(f,H.Error,true);h=g[1];if(h){$panic(f);}i=$assertType(f,$String,true);j=i[0];k=i[1];if(k){$panic(new $String(j));}d[0]=$assertType(f,$error);}};})(d),[]]);f=G.ValueOf(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$r=e.reflectValue(f);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d[0]=$ifaceNil;return d[0];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return d[0];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:AQ.ptr.prototype.marshal};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};AQ.prototype.marshal=function(c){return this.$val.marshal(c);};AQ.ptr.prototype.error=function(c){var $ptr,c,d;d=this;$panic(c);};AQ.prototype.error=function(c){return this.$val.error(c);};AT=function(c){var $ptr,c,d,e,f;c=c;d=c.Kind();if((d===(17))||(d===(21))||(d===(23))||(d===(24))){return c.Len()===0;}else if(d===(1)){return!c.Bool();}else if((d===(2))||(d===(3))||(d===(4))||(d===(5))||(d===(6))){return(e=c.Int(),(e.$high===0&&e.$low===0));}else if((d===(7))||(d===(8))||(d===(9))||(d===(10))||(d===(11))||(d===(12))){return(f=c.Uint(),(f.$high===0&&f.$low===0));}else if((d===(13))||(d===(14))){return c.Float()===0;}else if((d===(20))||(d===(22))){return c.IsNil();}return false;};AQ.ptr.prototype.reflectValue=function(c){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;d=this;e=AW(c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}$r=e(d,c,false);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.reflectValue};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.reflectValue=function(c){return this.$val.reflectValue(c);};AW=function(c){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;if(!c.IsValid()){return BB;}d=AX(c.Type());$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$s=2;case 2:return d;}return;}if($f===undefined){$f={$blk:AW};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AX=function(c){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=[d];e=[e];AV.RWMutex.RLock();e[0]=(f=AV.m[G.Type.keyFor(c)],f!==undefined?f.v:$throwNilPointerError);AV.RWMutex.RUnlock();if(!(e[0]===$throwNilPointerError)){return e[0];}AV.RWMutex.Lock();if(AV.m===false){AV.m={};}d[0]=new P.WaitGroup.ptr(0);d[0].Add(1);g=c;(AV.m||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(g)]={k:g,v:(function(d,e){return function $b(h,i,j){var $ptr,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=i;d[0].Wait();$r=e[0](h,i,j);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};})(d,e)};AV.RWMutex.Unlock();h=BA(c,true);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}e[0]=h;d[0].Done();AV.RWMutex.Lock();i=c;(AV.m||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(i)]={k:i,v:e[0]};AV.RWMutex.Unlock();return e[0];}return;}if($f===undefined){$f={$blk:AX};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};BA=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=c.Implements(AY);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e){$s=1;continue;}$s=2;continue;case 1:return BC;case 2:f=c.Kind();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(!((f===22))&&d){$s=4;continue;}$s=5;continue;case 4:g=G.PtrTo(c).Implements(AY);$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(g){$s=7;continue;}$s=8;continue;case 7:h=BD;i=BA(c,false);$s=10;case 10:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;k=CB(h,j);$s=11;case 11:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}$s=12;case 12:return k;case 8:case 5:l=c.Implements(AZ);$s=15;case 15:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l){$s=13;continue;}$s=14;continue;case 13:return BE;case 14:m=c.Kind();$s=18;case 18:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}if(!((m===22))&&d){$s=16;continue;}$s=17;continue;case 16:n=G.PtrTo(c).Implements(AZ);$s=21;case 21:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}if(n){$s=19;continue;}$s=20;continue;case 19:o=BF;p=BA(c,false);$s=22;case 22:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;r=CB(o,q);$s=23;case 23:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}$s=24;case 24:return r;case 20:case 17:s=c.Kind();$s=26;case 26:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=s;if(t===(1)){$s=27;continue;}if((t===(2))||(t===(3))||(t===(4))||(t===(5))||(t===(6))){$s=28;continue;}if((t===(7))||(t===(8))||(t===(9))||(t===(10))||(t===(11))||(t===(12))){$s=29;continue;}if(t===(13)){$s=30;continue;}if(t===(14)){$s=31;continue;}if(t===(24)){$s=32;continue;}if(t===(20)){$s=33;continue;}if(t===(25)){$s=34;continue;}if(t===(21)){$s=35;continue;}if(t===(23)){$s=36;continue;}if(t===(17)){$s=37;continue;}if(t===(22)){$s=38;continue;}$s=39;continue;case 27:return BG;case 28:return BH;case 29:return BI;case 30:return BK;case 31:return BL;case 32:return BM;case 33:return BN;case 34:u=BQ(c);$s=41;case 41:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}$s=42;case 42:return u;case 35:v=BS(c);$s=43;case 43:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}$s=44;case 44:return v;case 36:w=BV(c);$s=45;case 45:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}$s=46;case 46:return w;case 37:x=BX(c);$s=47;case 47:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}$s=48;case 48:return x;case 38:y=BZ(c);$s=49;case 49:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}$s=50;case 50:return y;case 39:return BO;case 40:case 25:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BA};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.$s=$s;$f.$r=$r;return $f;};BB=function(c,d,e){var $ptr,c,d,e;d=d;c.Buffer.WriteString("null");};BC=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if((d.Kind()===22)&&d.IsNil()){c.Buffer.WriteString("null");return;}f=d.Interface();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=$assertType(f,AK);i=g.MarshalJSON();$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;j=h[0];k=h[1];if($interfaceIsEqual(k,$ifaceNil)){$s=3;continue;}$s=4;continue;case 3:l=CT(c.Buffer,j,true);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;case 4:if(!($interfaceIsEqual(k,$ifaceNil))){c.error(new AO.ptr(d.Type(),k));}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BC};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BD=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=d.Addr();if(f.IsNil()){c.Buffer.WriteString("null");return;}g=f.Interface();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=$assertType(g,AK);j=h.MarshalJSON();$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];if($interfaceIsEqual(l,$ifaceNil)){$s=3;continue;}$s=4;continue;case 3:m=CT(c.Buffer,k,true);$s=5;case 5:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;case 4:if(!($interfaceIsEqual(l,$ifaceNil))){c.error(new AO.ptr(d.Type(),l));}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BD};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BE=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if((d.Kind()===22)&&d.IsNil()){c.Buffer.WriteString("null");return;}f=d.Interface();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=$assertType(f,C.TextMarshaler);i=g.MarshalText();$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;j=h[0];k=h[1];if(!($interfaceIsEqual(k,$ifaceNil))){c.error(new AO.ptr(d.Type(),k));}c.stringBytes(j);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BE};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BF=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=d.Addr();if(f.IsNil()){c.Buffer.WriteString("null");return;}g=f.Interface();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=$assertType(g,C.TextMarshaler);j=h.MarshalText();$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];if(!($interfaceIsEqual(l,$ifaceNil))){c.error(new AO.ptr(d.Type(),l));}c.stringBytes(k);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BF};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BG=function(c,d,e){var $ptr,c,d,e;d=d;if(e){c.Buffer.WriteByte(34);}if(d.Bool()){c.Buffer.WriteString("true");}else{c.Buffer.WriteString("false");}if(e){c.Buffer.WriteByte(34);}};BH=function(c,d,e){var $ptr,c,d,e,f;d=d;f=I.AppendInt($subslice(new EZ(c.scratch),0,0),d.Int(),10);if(e){c.Buffer.WriteByte(34);}c.Buffer.Write(f);if(e){c.Buffer.WriteByte(34);}};BI=function(c,d,e){var $ptr,c,d,e,f;d=d;f=I.AppendUint($subslice(new EZ(c.scratch),0,0),d.Uint(),10);if(e){c.Buffer.WriteByte(34);}c.Buffer.Write(f);if(e){c.Buffer.WriteByte(34);}};BJ.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h;d=d;f=this.$val;g=d.Float();if(M.IsInf(g,0)||M.IsNaN(g)){c.error(new AM.ptr($clone(d,G.Value),I.FormatFloat(g,103,-1,(f>>0))));}h=I.AppendFloat($subslice(new EZ(c.scratch),0,0),g,103,-1,(f>>0));if(e){c.Buffer.WriteByte(34);}c.Buffer.Write(h);if(e){c.Buffer.WriteByte(34);}};$ptrType(BJ).prototype.encode=function(c,d,e){return new BJ(this.$get()).encode(c,d,e);};BM=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if($interfaceIsEqual(d.Type(),AD)){$s=1;continue;}$s=2;continue;case 1:f=d.String();$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g===""){g="0";}if(!Y(g)){$s=4;continue;}$s=5;continue;case 4:h=F.Errorf("json: invalid number literal %q",new ET([new $String(g)]));$s=6;case 6:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}$r=c.error(h);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:c.Buffer.WriteString(g);return;case 2:if(e){$s=8;continue;}$s=9;continue;case 8:j=d.String();$s=11;case 11:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=AH(new $String(j));$s=12;case 12:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}i=k;l=i[0];m=i[1];if(!($interfaceIsEqual(m,$ifaceNil))){c.error(m);}c.string($bytesToString(l));$s=10;continue;case 9:n=d.String();$s=13;case 13:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=c.string(n);$s=14;case 14:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}o;case 10:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BM};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};BN=function(c,d,e){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if(d.IsNil()){c.Buffer.WriteString("null");return;}f=d.Elem();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$r=c.reflectValue(f);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BN};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BO=function(c,d,e){var $ptr,c,d,e;d=d;c.error(new AL.ptr(d.Type()));};BP.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;c.Buffer.WriteByte(123);g=true;h=f.fields;i=0;case 1:if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]),CG);l=CD(d,k.index);$s=3;case 3:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;if(!m.IsValid()||k.omitEmpty&&AT(m)){$s=4;continue;}$s=5;continue;case 4:i++;$s=1;continue;case 5:if(g){g=false;}else{c.Buffer.WriteByte(44);}c.string(k.name);c.Buffer.WriteByte(58);$r=(n=f.fieldEncs,((j<0||j>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+j]))(c,m,k.quoted);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i++;$s=1;continue;case 2:c.Buffer.WriteByte(125);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BP.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};BP.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BQ=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=CN(c);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=new BP.ptr(e,$makeSlice(FJ,e.$length));g=e;h=0;case 2:if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]),CG);k=CE(c,j.index);$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=AX(k);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}(m=f.fieldEncs,((i<0||i>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+i]=l));h++;$s=2;continue;case 3:return $methodVal(f,"encode");}return;}if($f===undefined){$f={$blk:BQ};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BR.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(d.IsNil()){c.Buffer.WriteString("null");return;}c.Buffer.WriteByte(123);h=d.MapKeys();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=(g=h,$subslice(new CF(g.$array),g.$offset,g.$offset+g.$length));$r=N.Sort(i);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=i;k=0;case 3:if(!(k=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]);if(l>0){c.Buffer.WriteByte(44);}n=m.String();$s=5;case 5:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=c.string(n);$s=6;case 6:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}o;c.Buffer.WriteByte(58);p=c;q=d.MapIndex(m);$s=7;case 7:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=q;$r=f.elemEnc(p,r,false);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k++;$s=3;continue;case 4:c.Buffer.WriteByte(125);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BR.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};BR.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BS=function(c){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Key();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d.Kind();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(!((e===24))){$s=1;continue;}$s=2;continue;case 1:return BO;case 2:f=c.Elem();$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=AX(f);$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=new BR.ptr(g);return $methodVal(h,"encode");}return;}if($f===undefined){$f={$blk:BS};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};BT=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if(d.IsNil()){c.Buffer.WriteString("null");return;}f=d.Bytes();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;c.Buffer.WriteByte(34);if(g.$length<1024){$s=2;continue;}$s=3;continue;case 2:h=$makeSlice(EZ,D.StdEncoding.EncodedLen(g.$length));D.StdEncoding.Encode(h,g);c.Buffer.Write(h);$s=4;continue;case 3:i=D.NewEncoder(D.StdEncoding,c);j=i.Write(g);$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;k=i.Close();$s=6;case 6:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;case 4:c.Buffer.WriteByte(34);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BT};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BU.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(d.IsNil()){c.Buffer.WriteString("null");return;}$r=f.arrayEnc(c,d,false);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BU.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BU.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BV=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Elem();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d.Kind();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e===8){$s=1;continue;}$s=2;continue;case 1:return BT;case 2:f=BX(c);$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=new BU.ptr(f);return $methodVal(g,"encode");}return;}if($f===undefined){$f={$blk:BV};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BW.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;c.Buffer.WriteByte(91);g=d.Len();h=0;case 1:if(!(h0){c.Buffer.WriteByte(44);}i=c;j=d.Index(h);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$r=f.elemEnc(i,k,false);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h=h+(1)>>0;$s=1;continue;case 2:c.Buffer.WriteByte(93);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BW.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BW.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BX=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Elem();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=AX(d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=new BW.ptr(e);return $methodVal(f,"encode");}return;}if($f===undefined){$f={$blk:BX};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BY.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(d.IsNil()){c.Buffer.WriteString("null");return;}g=c;h=d.Elem();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=e;$r=f.elemEnc(g,i,j);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BY.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BY.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BZ=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Elem();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=AX(d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=new BY.ptr(e);return $methodVal(f,"encode");}return;}if($f===undefined){$f={$blk:BZ};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};CA.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(d.CanAddr()){$s=1;continue;}$s=2;continue;case 1:$r=f.canAddrEnc(c,d,e);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=3;continue;case 2:$r=f.elseEnc(c,d,e);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:CA.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};CA.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};CB=function(c,d){var $ptr,c,d,e;e=new CA.ptr(c,d);return $methodVal(e,"encode");};CC=function(c){var $ptr,c,d,e,f,g;if(c===""){return false;}d=c;e=0;while(true){if(!(e?@[]^_{|}~ ",g)){}else if(!J.IsLetter(g)&&!J.IsDigit(g)){return false;}e+=f[1];}return true;};CD=function(c,d){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;e=d;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(c.Kind()===22){$s=3;continue;}$s=4;continue;case 3:if(c.IsNil()){return new G.Value.ptr(FD.nil,0,0);}h=c.Elem();$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}c=h;case 4:i=c.Field(g);$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}c=i;f++;$s=1;continue;case 2:return c;}return;}if($f===undefined){$f={$blk:CD};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};CE=function(c,d){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=d;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);h=c.Kind();$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if(h===22){$s=3;continue;}$s=4;continue;case 3:i=c.Elem();$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}c=i;case 4:j=c.Field(g);$s=7;case 7:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}c=j.Type;f++;$s=1;continue;case 2:return c;}return;}if($f===undefined){$f={$blk:CE};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};CF.prototype.Len=function(){var $ptr,c;c=this;return c.$length;};$ptrType(CF).prototype.Len=function(){return this.$get().Len();};CF.prototype.Swap=function(c,d){var $ptr,c,d,e,f,g;e=this;f=((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]);g=((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]);((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]=f);((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]=g);};$ptrType(CF).prototype.Swap=function(c,d){return this.$get().Swap(c,d);};CF.prototype.Less=function(c,d){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.get(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=e.get(d);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}$s=3;case 3:return f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+c]).String();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}$s=2;case 2:return e;}return;}if($f===undefined){$f={$blk:CF.prototype.get};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(CF).prototype.get=function(c){return this.$get().get(c);};AQ.ptr.prototype.string=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l;d=this;e=d.Buffer.Len();d.Buffer.WriteByte(34);f=0;g=0;while(true){if(!(g>0;continue;}if(f>>4<<24>>>24)));d.Buffer.WriteByte(AP.charCodeAt(((h&15)>>>0)));}g=g+(1)>>0;f=g;continue;}j=L.DecodeRuneInString(c.substring(g));k=j[0];l=j[1];if((k===65533)&&(l===1)){if(f>0;f=g;continue;}if((k===8232)||(k===8233)){if(f>0;f=g;continue;}g=g+(l)>>0;}if(f>0;};AQ.prototype.string=function(c){return this.$val.string(c);};AQ.ptr.prototype.stringBytes=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l;d=this;e=d.Buffer.Len();d.Buffer.WriteByte(34);f=0;g=0;while(true){if(!(g=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]);if(h<128){if(32<=h&&!((h===92))&&!((h===34))&&!((h===60))&&!((h===62))&&!((h===38))){g=g+(1)>>0;continue;}if(f>>4<<24>>>24)));d.Buffer.WriteByte(AP.charCodeAt(((h&15)>>>0)));}g=g+(1)>>0;f=g;continue;}j=L.DecodeRune($subslice(c,g));k=j[0];l=j[1];if((k===65533)&&(l===1)){if(f>0;f=g;continue;}if((k===8232)||(k===8233)){if(f>0;f=g;continue;}g=g+(l)>>0;}if(f>0;};AQ.prototype.stringBytes=function(c){return this.$val.stringBytes(c);};CH=function(c){var $ptr,c;c=$clone(c,CG);c.nameBytes=new EZ($stringToBytes(c.name));c.equalFold=CO(c.nameBytes);return c;};CI.prototype.Len=function(){var $ptr,c;c=this;return c.$length;};$ptrType(CI).prototype.Len=function(){return this.$get().Len();};CI.prototype.Swap=function(c,d){var $ptr,c,d,e,f,g;e=this;f=$clone(((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]),CG);g=$clone(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]),CG);CG.copy(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]),f);CG.copy(((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]),g);};$ptrType(CI).prototype.Swap=function(c,d){return this.$get().Swap(c,d);};CI.prototype.Less=function(c,d){var $ptr,c,d,e;e=this;if(!(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).name===((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).name)){return((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).name<((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).name;}if(!((((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).index.$length===((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index.$length))){return((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).index.$length<((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index.$length;}if(!(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).tag===((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).tag)){return((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).tag;}return $subslice(new CJ(e.$array),e.$offset,e.$offset+e.$length).Less(c,d);};$ptrType(CI).prototype.Less=function(c,d){return this.$get().Less(c,d);};CJ.prototype.Len=function(){var $ptr,c;c=this;return c.$length;};$ptrType(CJ).prototype.Len=function(){return this.$get().Len();};CJ.prototype.Swap=function(c,d){var $ptr,c,d,e,f,g;e=this;f=$clone(((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]),CG);g=$clone(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]),CG);CG.copy(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]),f);CG.copy(((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]),g);};$ptrType(CJ).prototype.Swap=function(c,d){return this.$get().Swap(c,d);};CJ.prototype.Less=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k;e=this;f=((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).index;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(h>=((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index.$length){return false;}if(!((i===(j=((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index,((h<0||h>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+h]))))){return i<(k=((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index,((h<0||h>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+h]));}g++;}return((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).index.$length<((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index.$length;};$ptrType(CJ).prototype.Less=function(c,d){return this.$get().Less(c,d);};CK=function(c){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=new EW([]);e=new EW([new CG.ptr("",EZ.nil,$throwNilPointerError,false,FC.nil,c,false,false)]);f=$makeMap(G.Type.keyFor,[]);g=$makeMap(G.Type.keyFor,[]);h=$makeMap(G.Type.keyFor,[]);i=EW.nil;case 1:if(!(e.$length>0)){$s=2;continue;}j=e;k=$subslice(d,0,0);d=j;e=k;l=g;m=$makeMap(G.Type.keyFor,[]);f=l;g=m;n=d;o=0;case 3:if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]),CG);if((q=h[G.Type.keyFor(p.typ)],q!==undefined?q.v:false)){$s=5;continue;}$s=6;continue;case 5:o++;$s=3;continue;case 6:r=p.typ;(h||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(r)]={k:r,v:true};s=0;case 7:t=p.typ.NumField();$s=9;case 9:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}if(!(s>0;$s=7;continue;case 12:w=new G.StructTag(v.Tag).Get("json");if(w==="-"){$s=13;continue;}$s=14;continue;case 13:s=s+(1)>>0;$s=7;continue;case 14:x=ES(w);y=x[0];z=x[1];if(!CC(y)){y="";}aa=$makeSlice(FC,(p.index.$length+1>>0));$copySlice(aa,p.index);(ab=p.index.$length,((ab<0||ab>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+ab]=s));ac=v.Type;ae=ac.Name();$s=18;case 18:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}if(!(ae==="")){ad=false;$s=17;continue s;}af=ac.Kind();$s=19;case 19:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ad=af===22;case 17:if(ad){$s=15;continue;}$s=16;continue;case 15:ag=ac.Elem();$s=20;case 20:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}ac=ag;case 16:ah=false;if(new ER(z).Contains("string")){$s=21;continue;}$s=22;continue;case 21:ai=ac.Kind();$s=24;case 24:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}aj=ai;if((aj===(1))||(aj===(2))||(aj===(3))||(aj===(4))||(aj===(5))||(aj===(6))||(aj===(7))||(aj===(8))||(aj===(9))||(aj===(10))||(aj===(11))||(aj===(13))||(aj===(14))||(aj===(24))){ah=true;}case 23:case 22:if(!(y==="")||!v.Anonymous){ak=true;$s=27;continue s;}al=ac.Kind();$s=28;case 28:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}ak=!((al===25));case 27:if(ak){$s=25;continue;}$s=26;continue;case 25:am=!(y==="");if(y===""){y=v.Name;}i=$append(i,CH(new CG.ptr(y,EZ.nil,$throwNilPointerError,am,aa,ac,new ER(z).Contains("omitempty"),ah)));if((an=f[G.Type.keyFor(p.typ)],an!==undefined?an.v:0)>1){i=$append(i,(ao=i.$length-1>>0,((ao<0||ao>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+ao])));}s=s+(1)>>0;$s=7;continue;case 26:ap=ac;(g||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(ap)]={k:ap,v:(aq=g[G.Type.keyFor(ac)],aq!==undefined?aq.v:0)+(1)>>0};if((ar=g[G.Type.keyFor(ac)],ar!==undefined?ar.v:0)===1){$s=29;continue;}$s=30;continue;case 29:as=ac.Name();$s=31;case 31:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}at=CH(new CG.ptr(as,EZ.nil,$throwNilPointerError,false,aa,ac,false,false));$s=32;case 32:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}e=$append(e,at);case 30:s=s+(1)>>0;$s=7;continue;case 8:o++;$s=3;continue;case 4:$s=1;continue;case 2:$r=N.Sort($subslice(new CI(i.$array),i.$offset,i.$offset+i.$length));$s=33;case 33:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}au=$subslice(i,0,0);av=0;aw=0;ax=av;ay=aw;case 34:if(!(ay=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+ay]),CG);ba=az.name;ax=1;while(true){if(!((ay+ax>>0)>0,((bb<0||bb>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+bb])),CG);if(!(bc.name===ba)){break;}ax=ax+(1)>>0;}if(ax===1){au=$append(au,az);ay=ay+(ax)>>0;$s=34;continue;}bd=CL($subslice(i,ay,(ay+ax>>0)));be=$clone(bd[0],CG);bf=bd[1];if(bf){au=$append(au,be);}ay=ay+(ax)>>0;$s=34;continue;case 35:i=au;$r=N.Sort($subslice(new CJ(i.$array),i.$offset,i.$offset+i.$length));$s=36;case 36:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return i;}return;}if($f===undefined){$f={$blk:CK};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};CL=function(c){var $ptr,c,d,e,f,g,h,i;d=(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]).index.$length;e=-1;f=c;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]),CG);if(i.index.$length>d){c=$subslice(c,0,h);break;}if(i.tag){if(e>=0){return[new CG.ptr("",EZ.nil,$throwNilPointerError,false,FC.nil,$ifaceNil,false,false),false];}e=h;}g++;}if(e>=0){return[((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e]),true];}if(c.$length>1){return[new CG.ptr("",EZ.nil,$throwNilPointerError,false,FC.nil,$ifaceNil,false,false),false];}return[(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]),true];};CN=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:CM.RWMutex.RLock();e=(d=CM.m[G.Type.keyFor(c)],d!==undefined?d.v:EW.nil);CM.RWMutex.RUnlock();if(!(e===EW.nil)){return e;}f=CK(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;if(e===EW.nil){e=new EW([]);}CM.RWMutex.Lock();if(CM.m===false){CM.m=$makeMap(G.Type.keyFor,[]);}g=c;(CM.m||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(g)]={k:g,v:e};CM.RWMutex.Unlock();return e;}return;}if($f===undefined){$f={$blk:CN};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};CO=function(c){var $ptr,c,d,e,f,g,h,i;d=false;e=false;f=c;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(h>=128){return B.EqualFold;}i=(h&223)>>>0;if(i<65||i>90){d=true;}else if((i===75)||(i===83)){e=true;}g++;}if(e){return CP;}if(d){return CQ;}return CR;};CP=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m;e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(d.$length===0){return false;}h=(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]);if(h<128){if(!((g===h))){i=(g&223)>>>0;if(65<=i&&i<=90){if(!((i===((h&223)>>>0)))){return false;}}else{return false;}}d=$subslice(d,1);f++;continue;}j=L.DecodeRune(d);k=j[0];l=j[1];m=g;if((m===(115))||(m===(83))){if(!((k===383))){return false;}}else if((m===(107))||(m===(75))){if(!((k===8490))){return false;}}else{return false;}d=$subslice(d,l);f++;}if(d.$length>0){return false;}return true;};CQ=function(c,d){var $ptr,c,d,e,f,g,h,i;if(!((c.$length===d.$length))){return false;}e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);i=((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]);if(h===i){f++;continue;}if((97<=h&&h<=122)||(65<=h&&h<=90)){if(!((((h&223)>>>0)===((i&223)>>>0)))){return false;}}else{return false;}f++;}return true;};CR=function(c,d){var $ptr,c,d,e,f,g,h;if(!((c.$length===d.$length))){return false;}e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(!((((h&223)>>>0)===((((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])&223)>>>0)))){return false;}f++;}return true;};CT=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=[f];g=c.Len();f[0]=new CZ.ptr($throwNilPointerError,false,FC.nil,$ifaceNil,false,0,$throwNilPointerError,new $Int64(0,0));f[0].reset();h=0;i=d;j=0;case 1:if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(e&&((l===60)||(l===62)||(l===38))){if(h>>4<<24>>>24)));c.WriteByte(AP.charCodeAt(((l&15)>>>0)));h=k+1>>0;}if((l===226)&&(k+2>>0)>0,((m<0||m>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+m]))===128)&&((((n=k+2>>0,((n<0||n>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+n]))&~1)<<24>>>24)===168)){if(h>0,((o<0||o>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+o]))&15)>>>0)));h=k+3>>0;}p=f[0].step(f[0],l);$s=3;case 3:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;if(q>=9){if(q===11){$s=2;continue;}if(h>0;}j++;$s=1;continue;case 2:r=f[0].eof();$s=6;case 6:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(r===11){$s=4;continue;}$s=5;continue;case 4:c.Truncate(g);return f[0].err;case 5:if(h>0;c.parseState=$subslice(c.parseState,0,d);c.redo=false;if(d===0){c.step=DG;c.endTop=true;}else{c.step=DF;}};CZ.prototype.popParseState=function(){return this.$val.popParseState();};DA=function(c){var $ptr,c;return(c===32)||(c===9)||(c===13)||(c===10);};DB=function(c,d){var $ptr,c,d;if(d<=32&&DA(d)){return 9;}if(d===93){return DF(c,d);}return DC(c,d);};DC=function(c,d){var $ptr,c,d,e;if(d<=32&&DA(d)){return 9;}e=d;if(e===(123)){c.step=DD;c.pushParseState(0);return 2;}else if(e===(91)){c.step=DB;c.pushParseState(2);return 6;}else if(e===(34)){c.step=DH;return 1;}else if(e===(45)){c.step=DN;return 1;}else if(e===(48)){c.step=DP;return 1;}else if(e===(116)){c.step=DV;return 1;}else if(e===(102)){c.step=DY;return 1;}else if(e===(110)){c.step=EC;return 1;}if(49<=d&&d<=57){c.step=DO;return 1;}return c.error(d,"looking for beginning of value");};DD=function(c,d){var $ptr,c,d,e,f,g;if(d<=32&&DA(d)){return 9;}if(d===125){e=c.parseState.$length;(f=c.parseState,g=e-1>>0,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=1));return DF(c,d);}return DE(c,d);};DE=function(c,d){var $ptr,c,d;if(d<=32&&DA(d)){return 9;}if(d===34){c.step=DH;return 1;}return c.error(d,"looking for beginning of object key string");};DF=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m;e=c.parseState.$length;if(e===0){c.step=DG;c.endTop=true;return DG(c,d);}if(d<=32&&DA(d)){c.step=DF;return 9;}h=(f=c.parseState,g=e-1>>0,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]));i=h;if(i===(0)){if(d===58){(j=c.parseState,k=e-1>>0,((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]=1));c.step=DC;return 3;}return c.error(d,"after object key");}else if(i===(1)){if(d===44){(l=c.parseState,m=e-1>>0,((m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]=0));c.step=DE;return 4;}if(d===125){c.popParseState();return 5;}return c.error(d,"after object key:value pair");}else if(i===(2)){if(d===44){c.step=DC;return 7;}if(d===93){c.popParseState();return 8;}return c.error(d,"after array element");}return c.error(d,"");};DG=function(c,d){var $ptr,c,d;if(!((d===32))&&!((d===9))&&!((d===13))&&!((d===10))){c.error(d,"after top-level value");}return 10;};DH=function(c,d){var $ptr,c,d;if(d===34){c.step=DF;return 0;}if(d===92){c.step=DI;return 0;}if(d<32){return c.error(d,"in string literal");}return 0;};DI=function(c,d){var $ptr,c,d,e;e=d;if((e===(98))||(e===(102))||(e===(110))||(e===(114))||(e===(116))||(e===(92))||(e===(47))||(e===(34))){c.step=DH;return 0;}else if(e===(117)){c.step=DJ;return 0;}return c.error(d,"in string escape code");};DJ=function(c,d){var $ptr,c,d;if(48<=d&&d<=57||97<=d&&d<=102||65<=d&&d<=70){c.step=DK;return 0;}return c.error(d,"in \\u hexadecimal character escape");};DK=function(c,d){var $ptr,c,d;if(48<=d&&d<=57||97<=d&&d<=102||65<=d&&d<=70){c.step=DL;return 0;}return c.error(d,"in \\u hexadecimal character escape");};DL=function(c,d){var $ptr,c,d;if(48<=d&&d<=57||97<=d&&d<=102||65<=d&&d<=70){c.step=DM;return 0;}return c.error(d,"in \\u hexadecimal character escape");};DM=function(c,d){var $ptr,c,d;if(48<=d&&d<=57||97<=d&&d<=102||65<=d&&d<=70){c.step=DH;return 0;}return c.error(d,"in \\u hexadecimal character escape");};DN=function(c,d){var $ptr,c,d;if(d===48){c.step=DP;return 0;}if(49<=d&&d<=57){c.step=DO;return 0;}return c.error(d,"in numeric literal");};DO=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){c.step=DO;return 0;}return DP(c,d);};DP=function(c,d){var $ptr,c,d;if(d===46){c.step=DQ;return 0;}if((d===101)||(d===69)){c.step=DS;return 0;}return DF(c,d);};DQ=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){c.step=DR;return 0;}return c.error(d,"after decimal point in numeric literal");};DR=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){return 0;}if((d===101)||(d===69)){c.step=DS;return 0;}return DF(c,d);};DS=function(c,d){var $ptr,c,d;if((d===43)||(d===45)){c.step=DT;return 0;}return DT(c,d);};DT=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){c.step=DU;return 0;}return c.error(d,"in exponent of numeric literal");};DU=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){return 0;}return DF(c,d);};DV=function(c,d){var $ptr,c,d;if(d===114){c.step=DW;return 0;}return c.error(d,"in literal true (expecting 'r')");};DW=function(c,d){var $ptr,c,d;if(d===117){c.step=DX;return 0;}return c.error(d,"in literal true (expecting 'u')");};DX=function(c,d){var $ptr,c,d;if(d===101){c.step=DF;return 0;}return c.error(d,"in literal true (expecting 'e')");};DY=function(c,d){var $ptr,c,d;if(d===97){c.step=DZ;return 0;}return c.error(d,"in literal false (expecting 'a')");};DZ=function(c,d){var $ptr,c,d;if(d===108){c.step=EA;return 0;}return c.error(d,"in literal false (expecting 'l')");};EA=function(c,d){var $ptr,c,d;if(d===115){c.step=EB;return 0;}return c.error(d,"in literal false (expecting 's')");};EB=function(c,d){var $ptr,c,d;if(d===101){c.step=DF;return 0;}return c.error(d,"in literal false (expecting 'e')");};EC=function(c,d){var $ptr,c,d;if(d===117){c.step=ED;return 0;}return c.error(d,"in literal null (expecting 'u')");};ED=function(c,d){var $ptr,c,d;if(d===108){c.step=EE;return 0;}return c.error(d,"in literal null (expecting 'l')");};EE=function(c,d){var $ptr,c,d;if(d===108){c.step=DF;return 0;}return c.error(d,"in literal null (expecting 'l')");};EF=function(c,d){var $ptr,c,d;return 11;};CZ.ptr.prototype.error=function(c,d){var $ptr,c,d,e;e=this;e.step=EF;e.err=new CY.ptr("invalid character "+EG(c)+" "+d,e.bytes);return 11;};CZ.prototype.error=function(c,d){return this.$val.error(c,d);};EG=function(c){var $ptr,c,d;if(c===39){return"'\\''";}if(c===34){return"'\"'";}d=I.Quote($encodeRune(c));return"'"+d.substring(1,(d.length-1>>0))+"'";};ES=function(c){var $ptr,c,d;d=O.Index(c,",");if(!((d===-1))){return[c.substring(0,d),c.substring((d+1>>0))];}return[c,""];};ER.prototype.Contains=function(c){var $ptr,c,d,e,f,g,h,i;d=this.$val;if(d.length===0){return false;}e=d;while(true){if(!(!(e===""))){break;}f="";g=O.Index(e,",");if(g>=0){h=e.substring(0,g);i=e.substring((g+1>>0));e=h;f=i;}if(e===c){return true;}e=f;}return false;};$ptrType(ER).prototype.Contains=function(c){return new ER(this.$get()).Contains(c);};X.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Float64",name:"Float64",pkg:"",typ:$funcType([],[$Float64,$error],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64,$error],false)}];FS.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];FT.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];FV.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];FI.methods=[{prop:"marshal",name:"marshal",pkg:"encoding/json",typ:$funcType([$emptyInterface],[$error],false)},{prop:"error",name:"error",pkg:"encoding/json",typ:$funcType([$error],[],false)},{prop:"reflectValue",name:"reflectValue",pkg:"encoding/json",typ:$funcType([G.Value],[],false)},{prop:"string",name:"string",pkg:"encoding/json",typ:$funcType([$String],[$Int],false)},{prop:"stringBytes",name:"stringBytes",pkg:"encoding/json",typ:$funcType([EZ],[$Int],false)}];BJ.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FI,G.Value,$Bool],[],false)}];FW.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FI,G.Value,$Bool],[],false)}];FX.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FI,G.Value,$Bool],[],false)}];FY.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FI,G.Value,$Bool],[],false)}];FZ.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FI,G.Value,$Bool],[],false)}];GA.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FI,G.Value,$Bool],[],false)}];GB.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FI,G.Value,$Bool],[],false)}];CF.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"get",name:"get",pkg:"encoding/json",typ:$funcType([$Int],[$String],false)}];CI.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)}];CJ.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)}];FN.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];GD.methods=[{prop:"reset",name:"reset",pkg:"encoding/json",typ:$funcType([],[],false)},{prop:"eof",name:"eof",pkg:"encoding/json",typ:$funcType([],[$Int],false)},{prop:"pushParseState",name:"pushParseState",pkg:"encoding/json",typ:$funcType([$Int],[],false)},{prop:"popParseState",name:"popParseState",pkg:"encoding/json",typ:$funcType([],[],false)},{prop:"error",name:"error",pkg:"encoding/json",typ:$funcType([$Uint8,$String],[$Int],false)},{prop:"undo",name:"undo",pkg:"encoding/json",typ:$funcType([$Int],[],false)}];ER.methods=[{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([$String],[$Bool],false)}];AK.init([{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[EZ,$error],false)}]);AL.init([{prop:"Type",name:"Type",pkg:"",typ:G.Type,tag:""}]);AM.init([{prop:"Value",name:"Value",pkg:"",typ:G.Value,tag:""},{prop:"Str",name:"Str",pkg:"",typ:$String,tag:""}]);AO.init([{prop:"Type",name:"Type",pkg:"",typ:G.Type,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);AQ.init([{prop:"Buffer",name:"",pkg:"",typ:B.Buffer,tag:""},{prop:"scratch",name:"scratch",pkg:"encoding/json",typ:FH,tag:""}]);AU.init([FI,G.Value,$Bool],[],false);BP.init([{prop:"fields",name:"fields",pkg:"encoding/json",typ:EW,tag:""},{prop:"fieldEncs",name:"fieldEncs",pkg:"encoding/json",typ:FJ,tag:""}]);BR.init([{prop:"elemEnc",name:"elemEnc",pkg:"encoding/json",typ:AU,tag:""}]);BU.init([{prop:"arrayEnc",name:"arrayEnc",pkg:"encoding/json",typ:AU,tag:""}]);BW.init([{prop:"elemEnc",name:"elemEnc",pkg:"encoding/json",typ:AU,tag:""}]);BY.init([{prop:"elemEnc",name:"elemEnc",pkg:"encoding/json",typ:AU,tag:""}]);CA.init([{prop:"canAddrEnc",name:"canAddrEnc",pkg:"encoding/json",typ:AU,tag:""},{prop:"elseEnc",name:"elseEnc",pkg:"encoding/json",typ:AU,tag:""}]);CF.init(G.Value);CG.init([{prop:"name",name:"name",pkg:"encoding/json",typ:$String,tag:""},{prop:"nameBytes",name:"nameBytes",pkg:"encoding/json",typ:EZ,tag:""},{prop:"equalFold",name:"equalFold",pkg:"encoding/json",typ:GC,tag:""},{prop:"tag",name:"tag",pkg:"encoding/json",typ:$Bool,tag:""},{prop:"index",name:"index",pkg:"encoding/json",typ:FC,tag:""},{prop:"typ",name:"typ",pkg:"encoding/json",typ:G.Type,tag:""},{prop:"omitEmpty",name:"omitEmpty",pkg:"encoding/json",typ:$Bool,tag:""},{prop:"quoted",name:"quoted",pkg:"encoding/json",typ:$Bool,tag:""}]);CI.init(CG);CJ.init(CG);CY.init([{prop:"msg",name:"msg",pkg:"encoding/json",typ:$String,tag:""},{prop:"Offset",name:"Offset",pkg:"",typ:$Int64,tag:""}]);CZ.init([{prop:"step",name:"step",pkg:"encoding/json",typ:GE,tag:""},{prop:"endTop",name:"endTop",pkg:"encoding/json",typ:$Bool,tag:""},{prop:"parseState",name:"parseState",pkg:"encoding/json",typ:FC,tag:""},{prop:"err",name:"err",pkg:"encoding/json",typ:$error,tag:""},{prop:"redo",name:"redo",pkg:"encoding/json",typ:$Bool,tag:""},{prop:"redoCode",name:"redoCode",pkg:"encoding/json",typ:$Int,tag:""},{prop:"redoState",name:"redoState",pkg:"encoding/json",typ:GE,tag:""},{prop:"bytes",name:"bytes",pkg:"encoding/json",typ:$Int64,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=P.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=Q.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=M.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=N.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=O.$init();$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AV=new EV.ptr(new P.RWMutex.ptr(false,0),false);CM=new EY.ptr(new P.RWMutex.ptr(false,0),false);AA=E.New("JSON decoder out of sync - data changing underfoot?");AD=G.TypeOf(new X(""));AP="0123456789abcdef";a=G.TypeOf($newDataPointer($ifaceNil,FA)).Elem();$s=18;case 18:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}AY=a;b=G.TypeOf($newDataPointer($ifaceNil,FB)).Elem();$s=19;case 19:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}AZ=b;BK=$methodVal(new BJ(32),"encode");BL=$methodVal(new BJ(64),"encode");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/ZiRo-/cuckgo/cuckoo"]=(function(){var $pkg={},$init,A,B,C,H,I,M,N,O,P,R,S,T,D,E,F,G,K;A=$packages["crypto/sha256"];B=$packages["encoding/json"];C=$pkg.Cuckoo=$newType(0,$kindStruct,"cuckoo.Cuckoo","Cuckoo","github.com/ZiRo-/cuckgo/cuckoo",function(v_){this.$val=this;if(arguments.length===0){this.v=N.zero();return;}this.v=v_;});H=$pkg.Edge=$newType(0,$kindStruct,"cuckoo.Edge","Edge","github.com/ZiRo-/cuckgo/cuckoo",function(U_,V_){this.$val=this;if(arguments.length===0){this.U=new $Uint64(0,0);this.V=new $Uint64(0,0);return;}this.U=U_;this.V=V_;});I=$pkg.CuckooJSON=$newType(0,$kindStruct,"cuckoo.CuckooJSON","CuckooJSON","github.com/ZiRo-/cuckgo/cuckoo",function(Parameter_,InputData_,Cycle_){this.$val=this;if(arguments.length===0){this.Parameter=false;this.InputData=P.nil;this.Cycle=O.nil;return;}this.Parameter=Parameter_;this.InputData=InputData_;this.Cycle=Cycle_;});M=$arrayType($Uint8,32);N=$arrayType($Uint64,4);O=$sliceType($Uint64);P=$sliceType($Uint8);R=$ptrType(H);S=$ptrType(C);T=$mapType($String,$Uint64);D=function(a){var $ptr,a,b;return(b=new $Uint64(0,a),new $Uint64(b.$high&0,(b.$low&255)>>>0));};E=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;a=$clone(a,M);return(c=(d=(e=(f=(g=(h=(i=D(((b<0||b>=a.length)?$throwRuntimeError("index out of range"):a[b])),j=$shiftLeft64(D((k=b+1>>0,((k<0||k>=a.length)?$throwRuntimeError("index out of range"):a[k]))),8),new $Uint64(i.$high|j.$high,(i.$low|j.$low)>>>0)),l=$shiftLeft64(D((m=b+2>>0,((m<0||m>=a.length)?$throwRuntimeError("index out of range"):a[m]))),16),new $Uint64(h.$high|l.$high,(h.$low|l.$low)>>>0)),n=$shiftLeft64(D((o=b+3>>0,((o<0||o>=a.length)?$throwRuntimeError("index out of range"):a[o]))),24),new $Uint64(g.$high|n.$high,(g.$low|n.$low)>>>0)),p=$shiftLeft64(D((q=b+4>>0,((q<0||q>=a.length)?$throwRuntimeError("index out of range"):a[q]))),32),new $Uint64(f.$high|p.$high,(f.$low|p.$low)>>>0)),r=$shiftLeft64(D((s=b+5>>0,((s<0||s>=a.length)?$throwRuntimeError("index out of range"):a[s]))),40),new $Uint64(e.$high|r.$high,(e.$low|r.$low)>>>0)),t=$shiftLeft64(D((u=b+6>>0,((u<0||u>=a.length)?$throwRuntimeError("index out of range"):a[u]))),48),new $Uint64(d.$high|t.$high,(d.$low|t.$low)>>>0)),v=$shiftLeft64(D((w=b+7>>0,((w<0||w>=a.length)?$throwRuntimeError("index out of range"):a[w]))),56),new $Uint64(c.$high|v.$high,(c.$low|v.$low)>>>0));};F=function(a){var $ptr,a,b;b=$clone(A.Sum256(a),M);return G(b);};$pkg.NewCuckoo=F;G=function(a){var $ptr,a,b,c,d;a=$clone(a,M);b=new C.ptr(N.zero());c=E(a,0);d=E(a,8);b.v[0]=new $Uint64(c.$high^1936682341,(c.$low^1886610805)>>>0);b.v[1]=new $Uint64(d.$high^1685025377,(d.$low^1852075885)>>>0);b.v[2]=new $Uint64(c.$high^1819895653,(c.$low^1852142177)>>>0);b.v[3]=new $Uint64(d.$high^1952801890,(d.$low^2037671283)>>>0);return b;};$pkg.NewCuckooSHA=G;H.ptr.prototype.HashCode=function(){var $ptr,a;a=this;return((a.U.$low>>0)^(a.V.$low>>0))>>0;};H.prototype.HashCode=function(){return this.$val.HashCode();};C.ptr.prototype.Sipedge=function(a){var $ptr,a,b;b=this;return new H.ptr(b.Sipnode(a,0),b.Sipnode(a,1));};C.prototype.Sipedge=function(a){return this.$val.Sipedge(a);};C.ptr.prototype.siphash24=function(a){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,e,ea,eb,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=this;c=b.v[0];d=b.v[1];e=b.v[2];g=(f=b.v[3],new $Uint64(f.$high^a.$high,(f.$low^a.$low)>>>0));c=(h=d,new $Uint64(c.$high+h.$high,c.$low+h.$low));e=(i=g,new $Uint64(e.$high+i.$high,e.$low+i.$low));d=(j=$shiftLeft64(d,13),k=$shiftRightUint64(d,51),new $Uint64(j.$high|k.$high,(j.$low|k.$low)>>>0));g=(l=$shiftLeft64(g,16),m=$shiftRightUint64(g,48),new $Uint64(l.$high|m.$high,(l.$low|m.$low)>>>0));d=(n=c,new $Uint64(d.$high^n.$high,(d.$low^n.$low)>>>0));g=(o=e,new $Uint64(g.$high^o.$high,(g.$low^o.$low)>>>0));c=(p=$shiftLeft64(c,32),q=$shiftRightUint64(c,32),new $Uint64(p.$high|q.$high,(p.$low|q.$low)>>>0));e=(r=d,new $Uint64(e.$high+r.$high,e.$low+r.$low));c=(s=g,new $Uint64(c.$high+s.$high,c.$low+s.$low));d=(t=$shiftLeft64(d,17),u=$shiftRightUint64(d,47),new $Uint64(t.$high|u.$high,(t.$low|u.$low)>>>0));g=(v=$shiftLeft64(g,21),w=$shiftRightUint64(g,43),new $Uint64(v.$high|w.$high,(v.$low|w.$low)>>>0));d=(x=e,new $Uint64(d.$high^x.$high,(d.$low^x.$low)>>>0));g=(y=c,new $Uint64(g.$high^y.$high,(g.$low^y.$low)>>>0));e=(z=$shiftLeft64(e,32),aa=$shiftRightUint64(e,32),new $Uint64(z.$high|aa.$high,(z.$low|aa.$low)>>>0));c=(ab=d,new $Uint64(c.$high+ab.$high,c.$low+ab.$low));e=(ac=g,new $Uint64(e.$high+ac.$high,e.$low+ac.$low));d=(ad=$shiftLeft64(d,13),ae=$shiftRightUint64(d,51),new $Uint64(ad.$high|ae.$high,(ad.$low|ae.$low)>>>0));g=(af=$shiftLeft64(g,16),ag=$shiftRightUint64(g,48),new $Uint64(af.$high|ag.$high,(af.$low|ag.$low)>>>0));d=(ah=c,new $Uint64(d.$high^ah.$high,(d.$low^ah.$low)>>>0));g=(ai=e,new $Uint64(g.$high^ai.$high,(g.$low^ai.$low)>>>0));c=(aj=$shiftLeft64(c,32),ak=$shiftRightUint64(c,32),new $Uint64(aj.$high|ak.$high,(aj.$low|ak.$low)>>>0));e=(al=d,new $Uint64(e.$high+al.$high,e.$low+al.$low));c=(am=g,new $Uint64(c.$high+am.$high,c.$low+am.$low));d=(an=$shiftLeft64(d,17),ao=$shiftRightUint64(d,47),new $Uint64(an.$high|ao.$high,(an.$low|ao.$low)>>>0));g=(ap=$shiftLeft64(g,21),aq=$shiftRightUint64(g,43),new $Uint64(ap.$high|aq.$high,(ap.$low|aq.$low)>>>0));d=(ar=e,new $Uint64(d.$high^ar.$high,(d.$low^ar.$low)>>>0));g=(as=c,new $Uint64(g.$high^as.$high,(g.$low^as.$low)>>>0));e=(at=$shiftLeft64(e,32),au=$shiftRightUint64(e,32),new $Uint64(at.$high|au.$high,(at.$low|au.$low)>>>0));c=(av=a,new $Uint64(c.$high^av.$high,(c.$low^av.$low)>>>0));e=(aw=new $Uint64(0,255),new $Uint64(e.$high^aw.$high,(e.$low^aw.$low)>>>0));c=(ax=d,new $Uint64(c.$high+ax.$high,c.$low+ax.$low));e=(ay=g,new $Uint64(e.$high+ay.$high,e.$low+ay.$low));d=(az=$shiftLeft64(d,13),ba=$shiftRightUint64(d,51),new $Uint64(az.$high|ba.$high,(az.$low|ba.$low)>>>0));g=(bb=$shiftLeft64(g,16),bc=$shiftRightUint64(g,48),new $Uint64(bb.$high|bc.$high,(bb.$low|bc.$low)>>>0));d=(bd=c,new $Uint64(d.$high^bd.$high,(d.$low^bd.$low)>>>0));g=(be=e,new $Uint64(g.$high^be.$high,(g.$low^be.$low)>>>0));c=(bf=$shiftLeft64(c,32),bg=$shiftRightUint64(c,32),new $Uint64(bf.$high|bg.$high,(bf.$low|bg.$low)>>>0));e=(bh=d,new $Uint64(e.$high+bh.$high,e.$low+bh.$low));c=(bi=g,new $Uint64(c.$high+bi.$high,c.$low+bi.$low));d=(bj=$shiftLeft64(d,17),bk=$shiftRightUint64(d,47),new $Uint64(bj.$high|bk.$high,(bj.$low|bk.$low)>>>0));g=(bl=$shiftLeft64(g,21),bm=$shiftRightUint64(g,43),new $Uint64(bl.$high|bm.$high,(bl.$low|bm.$low)>>>0));d=(bn=e,new $Uint64(d.$high^bn.$high,(d.$low^bn.$low)>>>0));g=(bo=c,new $Uint64(g.$high^bo.$high,(g.$low^bo.$low)>>>0));e=(bp=$shiftLeft64(e,32),bq=$shiftRightUint64(e,32),new $Uint64(bp.$high|bq.$high,(bp.$low|bq.$low)>>>0));c=(br=d,new $Uint64(c.$high+br.$high,c.$low+br.$low));e=(bs=g,new $Uint64(e.$high+bs.$high,e.$low+bs.$low));d=(bt=$shiftLeft64(d,13),bu=$shiftRightUint64(d,51),new $Uint64(bt.$high|bu.$high,(bt.$low|bu.$low)>>>0));g=(bv=$shiftLeft64(g,16),bw=$shiftRightUint64(g,48),new $Uint64(bv.$high|bw.$high,(bv.$low|bw.$low)>>>0));d=(bx=c,new $Uint64(d.$high^bx.$high,(d.$low^bx.$low)>>>0));g=(by=e,new $Uint64(g.$high^by.$high,(g.$low^by.$low)>>>0));c=(bz=$shiftLeft64(c,32),ca=$shiftRightUint64(c,32),new $Uint64(bz.$high|ca.$high,(bz.$low|ca.$low)>>>0));e=(cb=d,new $Uint64(e.$high+cb.$high,e.$low+cb.$low));c=(cc=g,new $Uint64(c.$high+cc.$high,c.$low+cc.$low));d=(cd=$shiftLeft64(d,17),ce=$shiftRightUint64(d,47),new $Uint64(cd.$high|ce.$high,(cd.$low|ce.$low)>>>0));g=(cf=$shiftLeft64(g,21),cg=$shiftRightUint64(g,43),new $Uint64(cf.$high|cg.$high,(cf.$low|cg.$low)>>>0));d=(ch=e,new $Uint64(d.$high^ch.$high,(d.$low^ch.$low)>>>0));g=(ci=c,new $Uint64(g.$high^ci.$high,(g.$low^ci.$low)>>>0));e=(cj=$shiftLeft64(e,32),ck=$shiftRightUint64(e,32),new $Uint64(cj.$high|ck.$high,(cj.$low|ck.$low)>>>0));c=(cl=d,new $Uint64(c.$high+cl.$high,c.$low+cl.$low));e=(cm=g,new $Uint64(e.$high+cm.$high,e.$low+cm.$low));d=(cn=$shiftLeft64(d,13),co=$shiftRightUint64(d,51),new $Uint64(cn.$high|co.$high,(cn.$low|co.$low)>>>0));g=(cp=$shiftLeft64(g,16),cq=$shiftRightUint64(g,48),new $Uint64(cp.$high|cq.$high,(cp.$low|cq.$low)>>>0));d=(cr=c,new $Uint64(d.$high^cr.$high,(d.$low^cr.$low)>>>0));g=(cs=e,new $Uint64(g.$high^cs.$high,(g.$low^cs.$low)>>>0));c=(ct=$shiftLeft64(c,32),cu=$shiftRightUint64(c,32),new $Uint64(ct.$high|cu.$high,(ct.$low|cu.$low)>>>0));e=(cv=d,new $Uint64(e.$high+cv.$high,e.$low+cv.$low));c=(cw=g,new $Uint64(c.$high+cw.$high,c.$low+cw.$low));d=(cx=$shiftLeft64(d,17),cy=$shiftRightUint64(d,47),new $Uint64(cx.$high|cy.$high,(cx.$low|cy.$low)>>>0));g=(cz=$shiftLeft64(g,21),da=$shiftRightUint64(g,43),new $Uint64(cz.$high|da.$high,(cz.$low|da.$low)>>>0));d=(db=e,new $Uint64(d.$high^db.$high,(d.$low^db.$low)>>>0));g=(dc=c,new $Uint64(g.$high^dc.$high,(g.$low^dc.$low)>>>0));e=(dd=$shiftLeft64(e,32),de=$shiftRightUint64(e,32),new $Uint64(dd.$high|de.$high,(dd.$low|de.$low)>>>0));c=(df=d,new $Uint64(c.$high+df.$high,c.$low+df.$low));e=(dg=g,new $Uint64(e.$high+dg.$high,e.$low+dg.$low));d=(dh=$shiftLeft64(d,13),di=$shiftRightUint64(d,51),new $Uint64(dh.$high|di.$high,(dh.$low|di.$low)>>>0));g=(dj=$shiftLeft64(g,16),dk=$shiftRightUint64(g,48),new $Uint64(dj.$high|dk.$high,(dj.$low|dk.$low)>>>0));d=(dl=c,new $Uint64(d.$high^dl.$high,(d.$low^dl.$low)>>>0));g=(dm=e,new $Uint64(g.$high^dm.$high,(g.$low^dm.$low)>>>0));c=(dn=$shiftLeft64(c,32),dp=$shiftRightUint64(c,32),new $Uint64(dn.$high|dp.$high,(dn.$low|dp.$low)>>>0));e=(dq=d,new $Uint64(e.$high+dq.$high,e.$low+dq.$low));c=(dr=g,new $Uint64(c.$high+dr.$high,c.$low+dr.$low));d=(ds=$shiftLeft64(d,17),dt=$shiftRightUint64(d,47),new $Uint64(ds.$high|dt.$high,(ds.$low|dt.$low)>>>0));g=(du=$shiftLeft64(g,21),dv=$shiftRightUint64(g,43),new $Uint64(du.$high|dv.$high,(du.$low|dv.$low)>>>0));d=(dw=e,new $Uint64(d.$high^dw.$high,(d.$low^dw.$low)>>>0));g=(dx=c,new $Uint64(g.$high^dx.$high,(g.$low^dx.$low)>>>0));e=(dy=$shiftLeft64(e,32),dz=$shiftRightUint64(e,32),new $Uint64(dy.$high|dz.$high,(dy.$low|dz.$low)>>>0));return(ea=(eb=new $Uint64(c.$high^d.$high,(c.$low^d.$low)>>>0),new $Uint64(eb.$high^e.$high,(eb.$low^e.$low)>>>0)),new $Uint64(ea.$high^g.$high,(ea.$low^g.$low)>>>0));};C.prototype.siphash24=function(a){return this.$val.siphash24(a);};C.ptr.prototype.Sipnode=function(a,b){var $ptr,a,b,c,d,e,f;c=this;return(d=c.siphash24((e=$mul64(new $Uint64(0,2),a),f=new $Uint64(0,b),new $Uint64(e.$high+f.$high,e.$low+f.$low))),new $Uint64(d.$high&0,(d.$low&524287)>>>0));};C.prototype.Sipnode=function(a,b){return this.$val.Sipnode(a,b);};C.ptr.prototype.Verify=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;c=this;d=$makeSlice(O,42);e=$makeSlice(O,42);f=0;g=new $Uint64(0,0);g=new $Uint64(0,0);while(true){if(!((g.$high<0||(g.$high===0&&g.$low<42)))){break;}if((h=(($flatten64(g)<0||$flatten64(g)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(g)]),(h.$high>b.$high||(h.$high===b.$high&&h.$low>=b.$low)))||(!((g.$high===0&&g.$low===0))&&(i=(($flatten64(g)<0||$flatten64(g)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(g)]),j=(k=new $Uint64(g.$high-0,g.$low-1),(($flatten64(k)<0||$flatten64(k)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(k)])),(i.$high=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+$flatten64(g)]=c.Sipnode((($flatten64(g)<0||$flatten64(g)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(g)]),0));(($flatten64(g)<0||$flatten64(g)>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+$flatten64(g)]=c.Sipnode((($flatten64(g)<0||$flatten64(g)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(g)]),1));g=(l=new $Uint64(0,1),new $Uint64(g.$high+l.$high,g.$low+l.$low));}m=true;while(true){if(!(m)){break;}n=f;o=0;while(true){if(!((p=new $Uint64(0,o),(p.$high<0||(p.$high===0&&p.$low<42))))){break;}if(!((o===f))&&(q=((o<0||o>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+o]),r=((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]),(q.$high===r.$high&&q.$low===r.$low))){if(!((n===f))){return false;}n=o;}o=o+(1)>>0;}if(n===f){return false;}f=n;s=0;while(true){if(!((t=new $Uint64(0,s),(t.$high<0||(t.$high===0&&t.$low<42))))){break;}if(!((s===n))&&(u=((s<0||s>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+s]),v=((n<0||n>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+n]),(u.$high===v.$high&&u.$low===v.$low))){if(!((f===n))){return false;}f=s;}s=s+(1)>>0;}if(f===n){return false;}g=(w=new $Uint64(0,2),new $Uint64(g.$high-w.$high,g.$low-w.$low));m=!((f===0));}return(g.$high===0&&g.$low===0);};C.prototype.Verify=function(a,b){return this.$val.Verify(a,b);};K=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=$clone(a,I);b=B.Marshal(new a.constructor.elem(a));$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}$s=2;case 2:return b;}return;}if($f===undefined){$f={$blk:K};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};$pkg.EncodeCuckooJSON=K;S.methods=[{prop:"Sipedge",name:"Sipedge",pkg:"",typ:$funcType([$Uint64],[R],false)},{prop:"siphash24",name:"siphash24",pkg:"github.com/ZiRo-/cuckgo/cuckoo",typ:$funcType([$Uint64],[$Uint64],false)},{prop:"Sipnode",name:"Sipnode",pkg:"",typ:$funcType([$Uint64,$Uint32],[$Uint64],false)},{prop:"Verify",name:"Verify",pkg:"",typ:$funcType([O,$Uint64],[$Bool],false)}];R.methods=[{prop:"HashCode",name:"HashCode",pkg:"",typ:$funcType([],[$Int],false)}];C.init([{prop:"v",name:"v",pkg:"github.com/ZiRo-/cuckgo/cuckoo",typ:N,tag:""}]);H.init([{prop:"U",name:"U",pkg:"",typ:$Uint64,tag:""},{prop:"V",name:"V",pkg:"",typ:$Uint64,tag:""}]);I.init([{prop:"Parameter",name:"Parameter",pkg:"",typ:T,tag:"json:\"parameters\""},{prop:"InputData",name:"InputData",pkg:"",typ:P,tag:"json:\"header\""},{prop:"Cycle",name:"Cycle",pkg:"",typ:O,tag:"json:\"cycle\""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/ZiRo-/cuckgo/miner_js"]=(function(){var $pkg={},$init,A,B,C,D,E,F,M,N,O,P,Q,R,S,T,U,V,G,H,I,J,K,L;A=$packages["crypto/rand"];B=$packages["crypto/sha256"];C=$packages["encoding/base64"];D=$packages["github.com/ZiRo-/cuckgo/cuckoo"];E=$packages["github.com/gopherjs/gopherjs/js"];F=$pkg.CuckooSolve=$newType(0,$kindStruct,"main.CuckooSolve","CuckooSolve","github.com/ZiRo-/cuckgo/miner_js",function(graph_,easiness_,cuckoo_,sols_,nsols_,nthreads_){this.$val=this;if(arguments.length===0){this.graph=M.nil;this.easiness=0;this.cuckoo=N.nil;this.sols=O.nil;this.nsols=0;this.nthreads=0;return;}this.graph=graph_;this.easiness=easiness_;this.cuckoo=cuckoo_;this.sols=sols_;this.nsols=nsols_;this.nthreads=nthreads_;});M=$ptrType(D.Cuckoo);N=$sliceType($Int);O=$sliceType(N);P=$ptrType(D.Edge);Q=$sliceType($Uint8);R=$arrayType($Uint8,32);S=$sliceType($Uint64);T=$funcType([$Float64],[$String],false);U=$mapType($String,$emptyInterface);V=$ptrType(F);G=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i;e=new F.ptr(D.NewCuckoo(a),b,$makeSlice(N,1048577),$makeSlice(O,($imul(2,c))),0,1);f=e.sols;g=0;while(true){if(!(g=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+h]=$makeSlice(N,42)));g++;}return e;};$pkg.NewCuckooSolve=G;F.ptr.prototype.path=function(a,b){var $ptr,a,b,c,d,e,f;c=this;d=0;d=0;while(true){if(!(!((a===0)))){break;}d=d+(1)>>0;if(d>=4096){while(true){if(!(!((d===0))&&!(((e=d-1>>0,((e<0||e>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+e]))===a)))){break;}d=d-(1)>>0;}if(d<0){}else{}return-1;}((d<0||d>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d]=a);a=(f=c.cuckoo,((a<0||a>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+a]));}return d;};F.prototype.path=function(a,b){return this.$val.path(a,b);};F.ptr.prototype.solution=function(a,b,c,d){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=this;f={};g=0;i=new D.Edge.ptr(new $Uint64(0,(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])),(h=new $Uint64(0,(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])),new $Uint64(h.$high-0,h.$low-524288)));j=i.HashCode();(f||$throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(j)]={k:j,v:i};while(true){if(!(!((b===0)))){break;}b=b-(1)>>0;n=new D.Edge.ptr(new $Uint64(0,(k=(((b+1>>0))&~1)>>0,((k<0||k>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+k]))),(l=new $Uint64(0,(m=b|1,((m<0||m>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+m]))),new $Uint64(l.$high-0,l.$low-524288)));o=(p=f[$Int.keyFor(n.HashCode())],p!==undefined?[p.v,true]:[P.nil,false]);q=o[1];if(!q){r=n.HashCode();(f||$throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(r)]={k:r,v:n};}}while(true){if(!(!((d===0)))){break;}d=d-(1)>>0;v=new D.Edge.ptr(new $Uint64(0,(s=d|1,((s<0||s>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+s]))),(t=new $Uint64(0,(u=(((d+1>>0))&~1)>>0,((u<0||u>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+u]))),new $Uint64(t.$high-0,t.$low-524288)));w=(x=f[$Int.keyFor(v.HashCode())],x!==undefined?[x.v,true]:[P.nil,false]);y=w[1];if(!y){z=v.HashCode();(f||$throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(z)]={k:z,v:v};}}g=0;aa=0;while(true){if(!(aa=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah])),((g<0||g>=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+g]=aa));g=g+(1)>>0;delete f[$Int.keyFor(ae)];}aa=aa+(1)>>0;}if((ai=new $Uint64(0,g),(ai.$high===0&&ai.$low===42))){e.nsols=e.nsols+(1)>>0;}else{}};F.prototype.solution=function(a,b,c,d){return this.$val.solution(a,b,c,d);};H=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m;c=b.HashCode();d=a;e=0;f=$keys(d);while(true){if(!(e=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]=(b.graph.Sipnode(new $Uint64(0,f),0).$low>>0));h=(g=(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]),((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]));(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]=((i=b.graph.Sipnode(new $Uint64(0,f),1),new $Uint64(0+i.$high,524288+i.$low)).$low>>0));k=(j=(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),((j<0||j>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+j]));if((h===(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]))||(k===(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]))){f=f+(b.nthreads)>>0;continue;}l=b.path(h,d);m=b.path(k,e);if((l===-1)||(m===-1)){return;}if(((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])===((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])){n=0;if(l>0;m=m-(n)>>0;while(true){if(!(!((((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])===((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]))))){break;}l=l+(1)>>0;m=m+(1)>>0;}o=(l+m>>0)+1>>0;if((p=new $Uint64(0,o),(p.$high===0&&p.$low===42))&&b.nsols>0;continue;}if(l>0;(q=(r=l+1>>0,((r<0||r>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+r])),((q<0||q>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+q]=((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])));}(s=(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]),((s<0||s>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+s]=(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])));}else{while(true){if(!(!((m===0)))){break;}m=m-(1)>>0;(t=(u=m+1>>0,((u<0||u>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+u])),((t<0||t>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+t]=((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])));}(v=(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),((v<0||v>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+v]=(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])));}f=f+(b.nthreads)>>0;}};J=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=8;c=$makeSlice(Q,64);e=A.Read(c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[1];if(!($interfaceIsEqual(f,$ifaceNil))){$panic(f);}g=(a*1.048576e+06/100>>0);h=G(c,g,b,1);i=0;case 2:if(!(i<960)){$s=3;continue;}c=$append(c,0);j=0;case 4:if(!(j<256)){$s=5;continue;}(k=64+i>>0,((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k]=(j<<24>>>24)));h=G(c,g,b,1);I(j,h);if(h.nsols>0){$s=6;continue;}$s=7;continue;case 6:$s=8;continue;case 7:j=j+(1)>>0;$s=4;continue;case 5:i=i+(1)>>0;$s=2;continue;case 3:case 8:if(h.sols.$length>0){$s=9;continue;}$s=10;continue;case 9:l=$clone(K(h,c),D.CuckooJSON);n=D.EncodeCuckooJSON(l);$s=12;case 12:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=m[0];p=C.StdEncoding.EncodeToString(o);return p;case 10:return"No Solution found.";case 11:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};K=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m;c=$clone(B.Sum256(b),R);d=new $Uint64(0,a.easiness);f=$makeSlice(S,(e=a.sols,(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])).$length);g={};h="easiness";(g||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(h)]={k:h,v:d};i=(j=a.sols,(0>=j.$length?$throwRuntimeError("index out of range"):j.$array[j.$offset+0]));k=0;while(true){if(!(k=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+k]);((l<0||l>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+l]=new $Uint64(0,m));k++;}return new D.CuckooJSON.ptr(g,new Q(c),f);};L=function(){var $ptr;$global.cuckoo=$externalize($makeMap($String.keyFor,[{k:"mine_cuckoo",v:new T(J)}]),U);};V.methods=[{prop:"path",name:"path",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$funcType([$Int,N],[$Int],false)},{prop:"solution",name:"solution",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$funcType([N,$Int,N,$Int],[],false)}];F.init([{prop:"graph",name:"graph",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:M,tag:""},{prop:"easiness",name:"easiness",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$Int,tag:""},{prop:"cuckoo",name:"cuckoo",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:N,tag:""},{prop:"sols",name:"sols",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:O,tag:""},{prop:"nsols",name:"nsols",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$Int,tag:""},{prop:"nthreads",name:"nthreads",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$Int,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){L();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["github.com/ZiRo-/cuckgo/miner_js"]=(function(){var $pkg={},$init,C,A,D,E,B,F,K,N,U,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AJ,AK,L,G,H,I,J,M,O,P,Q,R,S,T,W;C=$packages["crypto/rand"];A=$packages["crypto/sha256"];D=$packages["encoding/base64"];E=$packages["encoding/json"];B=$packages["github.com/gopherjs/gopherjs/js"];F=$pkg.Cuckoo=$newType(0,$kindStruct,"main.Cuckoo","Cuckoo","github.com/ZiRo-/cuckgo/miner_js",function(v_,key_){this.$val=this;if(arguments.length===0){this.v=Z.zero();this.key=AA.nil;return;}this.v=v_;this.key=key_;});K=$pkg.Edge=$newType(0,$kindStruct,"main.Edge","Edge","github.com/ZiRo-/cuckgo/miner_js",function(U_,V_){this.$val=this;if(arguments.length===0){this.U=new $Uint64(0,0);this.V=new $Uint64(0,0);return;}this.U=U_;this.V=V_;});N=$pkg.CuckooSolve=$newType(0,$kindStruct,"main.CuckooSolve","CuckooSolve","github.com/ZiRo-/cuckgo/miner_js",function(graph_,easiness_,cuckoo_,sols_,nsols_,nthreads_){this.$val=this;if(arguments.length===0){this.graph=AC.nil;this.easiness=0;this.cuckoo=AD.nil;this.sols=AE.nil;this.nsols=0;this.nthreads=0;return;}this.graph=graph_;this.easiness=easiness_;this.cuckoo=cuckoo_;this.sols=sols_;this.nsols=nsols_;this.nthreads=nthreads_;});U=$pkg.CuckooJSON=$newType(0,$kindStruct,"main.CuckooJSON","CuckooJSON","github.com/ZiRo-/cuckgo/miner_js",function(Parameter_,InputData_,Cycle_){this.$val=this;if(arguments.length===0){this.Parameter=false;this.InputData=AA.nil;this.Cycle=AB.nil;return;}this.Parameter=Parameter_;this.InputData=InputData_;this.Cycle=Cycle_;});Y=$arrayType($Uint8,32);Z=$arrayType($Uint64,4);AA=$sliceType($Uint8);AB=$sliceType($Uint64);AC=$ptrType(F);AD=$sliceType($Int);AE=$sliceType(AD);AF=$ptrType(K);AG=$funcType([$Float64],[$String],false);AH=$mapType($String,$emptyInterface);AJ=$ptrType(N);AK=$mapType($String,$Uint64);G=function(a){var $ptr,a,b;return(b=new $Uint64(0,a),new $Uint64(b.$high&0,(b.$low&255)>>>0));};H=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;a=$clone(a,Y);return(c=(d=(e=(f=(g=(h=(i=G(((b<0||b>=a.length)?$throwRuntimeError("index out of range"):a[b])),j=$shiftLeft64(G((k=b+1>>0,((k<0||k>=a.length)?$throwRuntimeError("index out of range"):a[k]))),8),new $Uint64(i.$high|j.$high,(i.$low|j.$low)>>>0)),l=$shiftLeft64(G((m=b+2>>0,((m<0||m>=a.length)?$throwRuntimeError("index out of range"):a[m]))),16),new $Uint64(h.$high|l.$high,(h.$low|l.$low)>>>0)),n=$shiftLeft64(G((o=b+3>>0,((o<0||o>=a.length)?$throwRuntimeError("index out of range"):a[o]))),24),new $Uint64(g.$high|n.$high,(g.$low|n.$low)>>>0)),p=$shiftLeft64(G((q=b+4>>0,((q<0||q>=a.length)?$throwRuntimeError("index out of range"):a[q]))),32),new $Uint64(f.$high|p.$high,(f.$low|p.$low)>>>0)),r=$shiftLeft64(G((s=b+5>>0,((s<0||s>=a.length)?$throwRuntimeError("index out of range"):a[s]))),40),new $Uint64(e.$high|r.$high,(e.$low|r.$low)>>>0)),t=$shiftLeft64(G((u=b+6>>0,((u<0||u>=a.length)?$throwRuntimeError("index out of range"):a[u]))),48),new $Uint64(d.$high|t.$high,(d.$low|t.$low)>>>0)),v=$shiftLeft64(G((w=b+7>>0,((w<0||w>=a.length)?$throwRuntimeError("index out of range"):a[w]))),56),new $Uint64(c.$high|v.$high,(c.$low|v.$low)>>>0));};I=function(a){var $ptr,a,b;b=$clone(A.Sum256(a),Y);return J(b);};$pkg.NewCuckoo=I;J=function(a){var $ptr,a,b,c,d;a=$clone(a,Y);b=new F.ptr(Z.zero(),AA.nil);c=H(a,0);d=H(a,8);b.v[0]=new $Uint64(c.$high^1936682341,(c.$low^1886610805)>>>0);b.v[1]=new $Uint64(d.$high^1685025377,(d.$low^1852075885)>>>0);b.v[2]=new $Uint64(c.$high^1819895653,(c.$low^1852142177)>>>0);b.v[3]=new $Uint64(d.$high^1952801890,(d.$low^2037671283)>>>0);b.key=new AA(a);return b;};$pkg.NewCuckooSHA=J;K.ptr.prototype.HashCode=function(){var $ptr,a;a=this;return((a.U.$low>>0)^(a.V.$low>>0))>>0;};K.prototype.HashCode=function(){return this.$val.HashCode();};F.ptr.prototype.Sipedge=function(a){var $ptr,a,b;b=this;return new K.ptr(b.Sipnode(a,0),b.Sipnode(a,1));};F.prototype.Sipedge=function(a){return this.$val.Sipedge(a);};F.ptr.prototype.siphash24=function(a){var $ptr,a,b;b=this;return M(b.key,a);};F.prototype.siphash24=function(a){return this.$val.siphash24(a);};M=function(a,b){var $ptr,a,b,c,d,e,f;c=L.hash($externalize(a,AA),0,$externalize(b,$Uint64));d=$internalize(c[0],$Uint64);e=$internalize(c[1],$Uint64);return(f=$shiftLeft64(d,32),new $Uint64(f.$high|e.$high,(f.$low|e.$low)>>>0));};F.ptr.prototype.Sipnode=function(a,b){var $ptr,a,b,c,d,e,f;c=this;return(d=c.siphash24((e=$mul64(new $Uint64(0,2),a),f=new $Uint64(0,b),new $Uint64(e.$high+f.$high,e.$low+f.$low))),new $Uint64(d.$high&0,(d.$low&524287)>>>0));};F.prototype.Sipnode=function(a,b){return this.$val.Sipnode(a,b);};F.ptr.prototype.Verify=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;c=this;d=$makeSlice(AB,42);e=$makeSlice(AB,42);f=0;g=new $Uint64(0,0);g=new $Uint64(0,0);while(true){if(!((g.$high<0||(g.$high===0&&g.$low<42)))){break;}if((h=(($flatten64(g)<0||$flatten64(g)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(g)]),(h.$high>b.$high||(h.$high===b.$high&&h.$low>=b.$low)))||(!((g.$high===0&&g.$low===0))&&(i=(($flatten64(g)<0||$flatten64(g)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(g)]),j=(k=new $Uint64(g.$high-0,g.$low-1),(($flatten64(k)<0||$flatten64(k)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(k)])),(i.$high=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+$flatten64(g)]=c.Sipnode((($flatten64(g)<0||$flatten64(g)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(g)]),0));(($flatten64(g)<0||$flatten64(g)>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+$flatten64(g)]=c.Sipnode((($flatten64(g)<0||$flatten64(g)>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+$flatten64(g)]),1));g=(l=new $Uint64(0,1),new $Uint64(g.$high+l.$high,g.$low+l.$low));}m=true;while(true){if(!(m)){break;}n=f;o=0;while(true){if(!((p=new $Uint64(0,o),(p.$high<0||(p.$high===0&&p.$low<42))))){break;}if(!((o===f))&&(q=((o<0||o>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+o]),r=((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]),(q.$high===r.$high&&q.$low===r.$low))){if(!((n===f))){return false;}n=o;}o=o+(1)>>0;}if(n===f){return false;}f=n;s=0;while(true){if(!((t=new $Uint64(0,s),(t.$high<0||(t.$high===0&&t.$low<42))))){break;}if(!((s===n))&&(u=((s<0||s>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+s]),v=((n<0||n>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+n]),(u.$high===v.$high&&u.$low===v.$low))){if(!((f===n))){return false;}f=s;}s=s+(1)>>0;}if(f===n){return false;}g=(w=new $Uint64(0,2),new $Uint64(g.$high-w.$high,g.$low-w.$low));m=!((f===0));}return(g.$high===0&&g.$low===0);};F.prototype.Verify=function(a,b){return this.$val.Verify(a,b);};O=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i;e=new N.ptr(I(a),b,$makeSlice(AD,1048577),$makeSlice(AE,($imul(2,c))),0,1);f=e.sols;g=0;while(true){if(!(g=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+h]=$makeSlice(AD,42)));g++;}return e;};$pkg.NewCuckooSolve=O;N.ptr.prototype.path=function(a,b){var $ptr,a,b,c,d,e,f;c=this;d=0;d=0;while(true){if(!(!((a===0)))){break;}d=d+(1)>>0;if(d>=4096){while(true){if(!(!((d===0))&&!(((e=d-1>>0,((e<0||e>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+e]))===a)))){break;}d=d-(1)>>0;}if(d<0){}else{}return-1;}((d<0||d>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d]=a);a=(f=c.cuckoo,((a<0||a>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+a]));}return d;};N.prototype.path=function(a,b){return this.$val.path(a,b);};N.ptr.prototype.solution=function(a,b,c,d){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=this;f={};g=0;i=new K.ptr(new $Uint64(0,(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])),(h=new $Uint64(0,(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])),new $Uint64(h.$high-0,h.$low-524288)));j=i.HashCode();(f||$throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(j)]={k:j,v:i};while(true){if(!(!((b===0)))){break;}b=b-(1)>>0;n=new K.ptr(new $Uint64(0,(k=(((b+1>>0))&~1)>>0,((k<0||k>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+k]))),(l=new $Uint64(0,(m=b|1,((m<0||m>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+m]))),new $Uint64(l.$high-0,l.$low-524288)));o=(p=f[$Int.keyFor(n.HashCode())],p!==undefined?[p.v,true]:[AF.nil,false]);q=o[1];if(!q){r=n.HashCode();(f||$throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(r)]={k:r,v:n};}}while(true){if(!(!((d===0)))){break;}d=d-(1)>>0;v=new K.ptr(new $Uint64(0,(s=d|1,((s<0||s>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+s]))),(t=new $Uint64(0,(u=(((d+1>>0))&~1)>>0,((u<0||u>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+u]))),new $Uint64(t.$high-0,t.$low-524288)));w=(x=f[$Int.keyFor(v.HashCode())],x!==undefined?[x.v,true]:[AF.nil,false]);y=w[1];if(!y){z=v.HashCode();(f||$throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(z)]={k:z,v:v};}}g=0;aa=0;while(true){if(!(aa=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah])),((g<0||g>=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+g]=aa));g=g+(1)>>0;delete f[$Int.keyFor(ae)];}aa=aa+(1)>>0;}if((ai=new $Uint64(0,g),(ai.$high===0&&ai.$low===42))){e.nsols=e.nsols+(1)>>0;}else{}};N.prototype.solution=function(a,b,c,d){return this.$val.solution(a,b,c,d);};P=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m;c=b.HashCode();d=a;e=0;f=$keys(d);while(true){if(!(e=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]=(b.graph.Sipnode(new $Uint64(0,f),0).$low>>0));h=(g=(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]),((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]));(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]=((i=b.graph.Sipnode(new $Uint64(0,f),1),new $Uint64(0+i.$high,524288+i.$low)).$low>>0));k=(j=(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),((j<0||j>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+j]));if((h===(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]))||(k===(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]))){f=f+(b.nthreads)>>0;continue;}l=b.path(h,d);m=b.path(k,e);if((l===-1)||(m===-1)){return;}if(((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])===((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])){n=0;if(l>0;m=m-(n)>>0;while(true){if(!(!((((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])===((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]))))){break;}l=l+(1)>>0;m=m+(1)>>0;}o=(l+m>>0)+1>>0;if((p=new $Uint64(0,o),(p.$high===0&&p.$low===42))&&b.nsols>0;continue;}if(l>0;(q=(r=l+1>>0,((r<0||r>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+r])),((q<0||q>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+q]=((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])));}(s=(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]),((s<0||s>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+s]=(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])));}else{while(true){if(!(!((m===0)))){break;}m=m-(1)>>0;(t=(u=m+1>>0,((u<0||u>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+u])),((t<0||t>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+t]=((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])));}(v=(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),((v<0||v>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+v]=(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])));}f=f+(b.nthreads)>>0;}};R=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=8;c=$makeSlice(AA,64);e=C.Read(c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[1];if(!($interfaceIsEqual(f,$ifaceNil))){$panic(f);}g=(a*1.048576e+06/100>>0);h=O(c,g,b,1);i=0;case 2:if(!(i<960)){$s=3;continue;}c=$append(c,0);j=0;case 4:if(!(j<256)){$s=5;continue;}(k=64+i>>0,((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k]=(j<<24>>>24)));h=O(c,g,b,1);Q(j,h);if(h.nsols>0){$s=6;continue;}$s=7;continue;case 6:$s=8;continue;case 7:j=j+(1)>>0;$s=4;continue;case 5:i=i+(1)>>0;$s=2;continue;case 3:case 8:if(h.sols.$length>0){$s=9;continue;}$s=10;continue;case 9:l=$clone(S(h,c),U);n=W(l);$s=12;case 12:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=m[0];p=D.StdEncoding.EncodeToString(o);return p;case 10:return"No Solution found.";case 11:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:R};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};S=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m;c=$clone(A.Sum256(b),Y);d=new $Uint64(0,a.easiness);f=$makeSlice(AB,(e=a.sols,(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])).$length);g={};h="easiness";(g||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(h)]={k:h,v:d};i=(j=a.sols,(0>=j.$length?$throwRuntimeError("index out of range"):j.$array[j.$offset+0]));k=0;while(true){if(!(k=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+k]);((l<0||l>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+l]=new $Uint64(0,m));k++;}return new U.ptr(g,new AA(c),f);};T=function(){var $ptr;$global.cuckoo=$externalize($makeMap($String.keyFor,[{k:"mine_cuckoo",v:new AG(R)}]),AH);};W=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=$clone(a,U);b=E.Marshal(new a.constructor.elem(a));$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}$s=2;case 2:return b;}return;}if($f===undefined){$f={$blk:W};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};$pkg.EncodeCuckooJSON=W;AC.methods=[{prop:"Sipedge",name:"Sipedge",pkg:"",typ:$funcType([$Uint64],[AF],false)},{prop:"siphash24",name:"siphash24",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$funcType([$Uint64],[$Uint64],false)},{prop:"Sipnode",name:"Sipnode",pkg:"",typ:$funcType([$Uint64,$Uint32],[$Uint64],false)},{prop:"Verify",name:"Verify",pkg:"",typ:$funcType([AB,$Uint64],[$Bool],false)}];AF.methods=[{prop:"HashCode",name:"HashCode",pkg:"",typ:$funcType([],[$Int],false)}];AJ.methods=[{prop:"path",name:"path",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$funcType([$Int,AD],[$Int],false)},{prop:"solution",name:"solution",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$funcType([AD,$Int,AD,$Int],[],false)}];F.init([{prop:"v",name:"v",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:Z,tag:""},{prop:"key",name:"key",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:AA,tag:""}]);K.init([{prop:"U",name:"U",pkg:"",typ:$Uint64,tag:""},{prop:"V",name:"V",pkg:"",typ:$Uint64,tag:""}]);N.init([{prop:"graph",name:"graph",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:AC,tag:""},{prop:"easiness",name:"easiness",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$Int,tag:""},{prop:"cuckoo",name:"cuckoo",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:AD,tag:""},{prop:"sols",name:"sols",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:AE,tag:""},{prop:"nsols",name:"nsols",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$Int,tag:""},{prop:"nthreads",name:"nthreads",pkg:"github.com/ZiRo-/cuckgo/miner_js",typ:$Int,tag:""}]);U.init([{prop:"Parameter",name:"Parameter",pkg:"",typ:AK,tag:"json:\"parameters\""},{prop:"InputData",name:"InputData",pkg:"",typ:AA,tag:"json:\"header\""},{prop:"Cycle",name:"Cycle",pkg:"",typ:AB,tag:"json:\"cycle\""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=C.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}L=$global.SipHash;if($pkg===$mainPkg){T();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $synthesizeMethods(); var $mainPkg = $packages["github.com/ZiRo-/cuckgo/miner_js"]; $packages["runtime"].$init(); diff --git a/contrib/static/mineworker.js b/contrib/static/mineworker.js index e9b3efb..f401dc2 100644 --- a/contrib/static/mineworker.js +++ b/contrib/static/mineworker.js @@ -1,3 +1,4 @@ +importScripts('./siphash-lib.js'); importScripts('./miner-js.js'); onmessage = function(e) { diff --git a/contrib/static/siphash-lib.js b/contrib/static/siphash-lib.js new file mode 100644 index 0000000..61a1fa7 --- /dev/null +++ b/contrib/static/siphash-lib.js @@ -0,0 +1,88 @@ +var SipHash = (function() { + function u8to64(p , i) { + return { l: (p[i] | p[i+1]<<8 | p[i+2]<<16 | p[i+3]<<24) , h: (p[i+4] | p[i+5]<<8 | p[i+6]<<16 | p[i+7]<<24) }; + } + + + function _add(a, b) { + var rl = a.l + b.l, + a2 = { h: a.h + b.h + (rl / 2 >>> 31) >>> 0, + l: rl >>> 0 }; + a.h = a2.h; a.l = a2.l; + } + + function _xor(a, b) { + a.h ^= b.h; a.h >>>= 0; + a.l ^= b.l; a.l >>>= 0; + } + + function _rotl(a, n) { + var a2 = { + h: a.h << n | a.l >>> (32 - n), + l: a.l << n | a.h >>> (32 - n) + }; + a.h = a2.h; a.l = a2.l; + } + + function _rotl32(a) { + var al = a.l; + a.l = a.h; a.h = al; + } + + function _compress(v0, v1, v2, v3) { + _add(v0, v1); + _add(v2, v3); + _rotl(v1, 13); + _rotl(v3, 16); + _xor(v1, v0); + _xor(v3, v2); + _rotl32(v0); + _add(v2, v1); + _add(v0, v3); + _rotl(v1, 17); + _rotl(v3, 21); + _xor(v1, v2); + _xor(v3, v0); + _rotl32(v2); + } + + + function hash(key, mh, ml) { + var mi = { h: mh, l: ml } + var k0 = u8to64(key, 0); + var k1 = u8to64(key, 8); + + var v0 = { h: k0.h, l: k0.l }, v2 = k0; + var v1 = { h: k1.h, l: k1.l }, v3 = k1; + + _xor(v0, { h: 0x736f6d65, l: 0x70736575 }); + _xor(v1, { h: 0x646f7261, l: 0x6e646f6d }); + _xor(v2, { h: 0x6c796765, l: 0x6e657261 }); + _xor(v3, { h: 0x74656462, l: 0x79746573 }); + + _xor(v3, mi); + _compress(v0, v1, v2, v3); + _compress(v0, v1, v2, v3); + _xor(v0, mi); + _xor(v2, { h: 0, l: 0xff }); + _compress(v0, v1, v2, v3); + _compress(v0, v1, v2, v3); + _compress(v0, v1, v2, v3); + _compress(v0, v1, v2, v3); + + var h = v0; + _xor(h, v1); + _xor(h, v2); + _xor(h, v3); + + var res = new Uint32Array(2); + res[0]=h.h; res[1]=h.l; + return res; + }; + + return { + hash: hash, + }; +})(); + +var module = module || { }, exports = module.exports = SipHash;