commit 4de94b22d7f18a4acc947cf0a5d7e08c10fb087a Author: Benjamin Bouvier Date: Thu Jul 4 13:10:59 2019 +0200 Initial commit; diff --git a/Build/04cfd823429f9d23bbb0a65451607432.js b/Build/04cfd823429f9d23bbb0a65451607432.js new file mode 100644 index 0000000..b79f95d --- /dev/null +++ b/Build/04cfd823429f9d23bbb0a65451607432.js @@ -0,0 +1,4 @@ +var UnityLoader=UnityLoader||{Compression:{identity:{require:function(){return{}},decompress:function(e){return e}},gzip:{require:function(e){var t={"inflate.js":function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,t.windowBits);if(r!==l.Z_OK)throw new Error(u[r]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function o(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg||u[r.err];return r.result}function a(e,t){return t=t||{},t.raw=!0,o(e,t)}var i=e("./zlib/inflate"),s=e("./utils/common"),d=e("./utils/strings"),l=e("./zlib/constants"),u=e("./zlib/messages"),c=e("./zlib/zstream"),f=e("./zlib/gzheader"),h=Object.prototype.toString;n.prototype.push=function(e,t){var r,n,o,a,u,c,f=this.strm,p=this.options.chunkSize,m=this.options.dictionary,w=!1;if(this.ended)return!1;n=t===~~t?t:t===!0?l.Z_FINISH:l.Z_NO_FLUSH,"string"==typeof e?f.input=d.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new s.Buf8(p),f.next_out=0,f.avail_out=p),r=i.inflate(f,l.Z_NO_FLUSH),r===l.Z_NEED_DICT&&m&&(c="string"==typeof m?d.string2buf(m):"[object ArrayBuffer]"===h.call(m)?new Uint8Array(m):m,r=i.inflateSetDictionary(this.strm,c)),r===l.Z_BUF_ERROR&&w===!0&&(r=l.Z_OK,w=!1),r!==l.Z_STREAM_END&&r!==l.Z_OK)return this.onEnd(r),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&r!==l.Z_STREAM_END&&(0!==f.avail_in||n!==l.Z_FINISH&&n!==l.Z_SYNC_FLUSH)||("string"===this.options.to?(o=d.utf8border(f.output,f.next_out),a=f.next_out-o,u=d.buf2string(f.output,o),f.next_out=a,f.avail_out=p-a,a&&s.arraySet(f.output,f.output,o,a,0),this.onData(u)):this.onData(s.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(w=!0)}while((f.avail_in>0||0===f.avail_out)&&r!==l.Z_STREAM_END);return r===l.Z_STREAM_END&&(n=l.Z_FINISH),n===l.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l.Z_OK):n!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),f.avail_out=0,!0)},n.prototype.onData=function(e){this.chunks.push(e)},n.prototype.onEnd=function(e){e===l.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=n,r.inflate=o,r.inflateRaw=a,r.ungzip=o},"utils/common.js":function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)return void e.set(t.subarray(r,r+n),o);for(var a=0;a=252?6:d>=248?5:d>=240?4:d>=224?3:d>=192?2:1;s[254]=s[254]=1,r.string2buf=function(e){var t,r,n,a,i,s=e.length,d=0;for(a=0;a>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},r.buf2binstring=function(e){return n(e,e.length)},r.binstring2buf=function(e){for(var t=new o.Buf8(e.length),r=0,n=t.length;r4)l[o++]=65533,r+=i-1;else{for(a&=2===i?31:3===i?15:7;i>1&&r1?l[o++]=65533:a<65536?l[o++]=a:(a-=65536,l[o++]=55296|a>>10&1023,l[o++]=56320|1023&a)}return n(l,o)},r.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&128===(192&e[r]);)r--;return r<0?t:0===r?t:r+s[e[r]]>t?r:t}},"zlib/inflate.js":function(e,t,r){"use strict";function n(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function o(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new y.Buf16(320),this.work=new y.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=T,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new y.Buf32(me),t.distcode=t.distdyn=new y.Buf32(we),t.sane=1,t.back=-1,O):N}function i(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,a(e)):N}function s(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?N:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,i(e))):N}function d(e,t){var r,n;return e?(n=new o,e.state=n,n.window=null,r=s(e,t),r!==O&&(e.state=null),r):N}function l(e){return d(e,ye)}function u(e){if(ge){var t;for(w=new y.Buf32(512),b=new y.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(U(E,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;U(k,e.lens,0,32,b,0,e.work,{bits:5}),ge=!1}e.lencode=w,e.lenbits=9,e.distcode=b,e.distbits=5}function c(e,t,r,n){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(y.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>n&&(o=n),y.arraySet(a.window,t,r-n,o,a.wnext),n-=o,n?(y.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=v(r.check,Le,2,0),f=0,h=0,r.mode=P;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=fe;break}if((15&f)!==I){e.msg="unknown compression method",r.mode=fe;break}if(f>>>=4,h-=4,Ue=(15&f)+8,0===r.wbits)r.wbits=Ue;else if(Ue>r.wbits){e.msg="invalid window size",r.mode=fe;break}r.dmax=1<>8&1),512&r.flags&&(Le[0]=255&f,Le[1]=f>>>8&255,r.check=v(r.check,Le,2,0)),f=0,h=0,r.mode=D;case D:for(;h<32;){if(0===d)break e;d--,f+=o[i++]<>>8&255,Le[2]=f>>>16&255,Le[3]=f>>>24&255,r.check=v(r.check,Le,4,0)),f=0,h=0,r.mode=q;case q:for(;h<16;){if(0===d)break e;d--,f+=o[i++]<>8),512&r.flags&&(Le[0]=255&f,Le[1]=f>>>8&255,r.check=v(r.check,Le,2,0)),f=0,h=0,r.mode=F;case F:if(1024&r.flags){for(;h<16;){if(0===d)break e;d--,f+=o[i++]<>>8&255,r.check=v(r.check,Le,2,0)),f=0,h=0}else r.head&&(r.head.extra=null);r.mode=V;case V:if(1024&r.flags&&(w=r.length,w>d&&(w=d),w&&(r.head&&(Ue=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),y.arraySet(r.head.extra,o,i,w,Ue)),512&r.flags&&(r.check=v(r.check,o,w,i)),d-=w,i+=w,r.length-=w),r.length))break e;r.length=0,r.mode=Z;case Z:if(2048&r.flags){if(0===d)break e;w=0;do Ue=o[i+w++],r.head&&Ue&&r.length<65536&&(r.head.name+=String.fromCharCode(Ue));while(Ue&&w>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=j;break;case G:for(;h<32;){if(0===d)break e;d--,f+=o[i++]<>>=7&h,h-=7&h,r.mode=le;break}for(;h<3;){if(0===d)break e;d--,f+=o[i++]<>>=1,h-=1,3&f){case 0:r.mode=K;break;case 1:if(u(r),r.mode=re,t===W){f>>>=2,h-=2;break e}break;case 2:r.mode=$;break;case 3:e.msg="invalid block type",r.mode=fe}f>>>=2,h-=2;break;case K:for(f>>>=7&h,h-=7&h;h<32;){if(0===d)break e;d--,f+=o[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=fe;break}if(r.length=65535&f,f=0,h=0,r.mode=Q,t===W)break e;case Q:r.mode=_;case _:if(w=r.length){if(w>d&&(w=d),w>l&&(w=l),0===w)break e;y.arraySet(a,o,i,w,s),d-=w,i+=w,l-=w,s+=w,r.length-=w;break}r.mode=j;break;case $:for(;h<14;){if(0===d)break e;d--,f+=o[i++]<>>=5,h-=5,r.ndist=(31&f)+1,f>>>=5,h-=5,r.ncode=(15&f)+4,f>>>=4,h-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=fe;break}r.have=0,r.mode=ee;case ee:for(;r.have>>=3,h-=3}for(;r.have<19;)r.lens[We[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Ee={bits:r.lenbits},xe=U(x,r.lens,0,19,r.lencode,0,r.work,Ee),r.lenbits=Ee.bits,xe){e.msg="invalid code lengths set",r.mode=fe;break}r.have=0,r.mode=te;case te:for(;r.have>>24,be=Be>>>16&255,ye=65535&Be,!(we<=h);){if(0===d)break e;d--,f+=o[i++]<>>=we,h-=we,r.lens[r.have++]=ye;else{if(16===ye){for(ke=we+2;h>>=we,h-=we,0===r.have){e.msg="invalid bit length repeat",r.mode=fe;break}Ue=r.lens[r.have-1],w=3+(3&f),f>>>=2,h-=2}else if(17===ye){for(ke=we+3;h>>=we,h-=we,Ue=0,w=3+(7&f),f>>>=3,h-=3}else{for(ke=we+7;h>>=we,h-=we,Ue=0,w=11+(127&f),f>>>=7,h-=7}if(r.have+w>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=fe;break}for(;w--;)r.lens[r.have++]=Ue}}if(r.mode===fe)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=fe;break}if(r.lenbits=9,Ee={bits:r.lenbits},xe=U(E,r.lens,0,r.nlen,r.lencode,0,r.work,Ee),r.lenbits=Ee.bits,xe){e.msg="invalid literal/lengths set",r.mode=fe;break}if(r.distbits=6,r.distcode=r.distdyn,Ee={bits:r.distbits},xe=U(k,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Ee),r.distbits=Ee.bits,xe){e.msg="invalid distances set",r.mode=fe;break}if(r.mode=re,t===W)break e;case re:r.mode=ne;case ne:if(d>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=i,e.avail_in=d,r.hold=f,r.bits=h,A(e,m),s=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,o=e.input,d=e.avail_in,f=r.hold,h=r.bits,r.mode===j&&(r.back=-1);break}for(r.back=0;Be=r.lencode[f&(1<>>24,be=Be>>>16&255,ye=65535&Be,!(we<=h);){if(0===d)break e;d--,f+=o[i++]<>ge)],we=Be>>>24,be=Be>>>16&255,ye=65535&Be,!(ge+we<=h);){if(0===d)break e;d--,f+=o[i++]<>>=ge,h-=ge,r.back+=ge}if(f>>>=we,h-=we,r.back+=we,r.length=ye,0===be){r.mode=de;break}if(32&be){r.back=-1,r.mode=j;break}if(64&be){e.msg="invalid literal/length code",r.mode=fe;break}r.extra=15&be,r.mode=oe;case oe:if(r.extra){for(ke=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=ae;case ae:for(;Be=r.distcode[f&(1<>>24,be=Be>>>16&255,ye=65535&Be,!(we<=h);){if(0===d)break e;d--,f+=o[i++]<>ge)],we=Be>>>24,be=Be>>>16&255,ye=65535&Be,!(ge+we<=h);){if(0===d)break e;d--,f+=o[i++]<>>=ge,h-=ge,r.back+=ge}if(f>>>=we,h-=we,r.back+=we,64&be){e.msg="invalid distance code",r.mode=fe;break}r.offset=ye,r.extra=15&be,r.mode=ie;case ie:if(r.extra){for(ke=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=fe;break}r.mode=se;case se:if(0===l)break e;if(w=m-l,r.offset>w){if(w=r.offset-w,w>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=fe;break}w>r.wnext?(w-=r.wnext,b=r.wsize-w):b=r.wnext-w,w>r.length&&(w=r.length),me=r.window}else me=a,b=s-r.offset,w=r.length;w>l&&(w=l),l-=w,r.length-=w;do a[s++]=me[b++];while(--w);0===r.length&&(r.mode=ne);break;case de:if(0===l)break e;a[s++]=r.length,l--,r.mode=ne;break;case le:if(r.wrap){for(;h<32;){if(0===d)break e;d--,f|=o[i++]<>>16&65535|0,i=0;0!==r;){i=r>2e3?2e3:r,r-=i;do o=o+t[n++]|0,a=a+o|0;while(--i);o%=65521,a%=65521}return o|a<<16|0}t.exports=n},"zlib/crc32.js":function(e,t,r){"use strict";function n(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}function o(e,t,r,n){var o=a,i=n+r;e^=-1;for(var s=n;s>>8^o[255&(e^t[s])];return e^-1}var a=n();t.exports=o},"zlib/inffast.js":function(e,t,r){"use strict";var n=30,o=12;t.exports=function(e,t){var r,a,i,s,d,l,u,c,f,h,p,m,w,b,y,g,v,A,U,x,E,k,B,L,W;r=e.state,a=e.next_in,L=e.input,i=a+(e.avail_in-5),s=e.next_out,W=e.output,d=s-(t-e.avail_out),l=s+(e.avail_out-257),u=r.dmax,c=r.wsize,f=r.whave,h=r.wnext,p=r.window,m=r.hold,w=r.bits,b=r.lencode,y=r.distcode,g=(1<>>24,m>>>=U,w-=U,U=A>>>16&255,0===U)W[s++]=65535&A;else{if(!(16&U)){if(0===(64&U)){A=b[(65535&A)+(m&(1<>>=U,w-=U),w<15&&(m+=L[a++]<>>24,m>>>=U,w-=U,U=A>>>16&255,!(16&U)){if(0===(64&U)){A=y[(65535&A)+(m&(1<u){e.msg="invalid distance too far back",r.mode=n;break e}if(m>>>=U,w-=U,U=s-d,E>U){if(U=E-U,U>f&&r.sane){e.msg="invalid distance too far back",r.mode=n;break e}if(k=0,B=p,0===h){if(k+=c-U,U2;)W[s++]=B[k++],W[s++]=B[k++],W[s++]=B[k++],x-=3;x&&(W[s++]=B[k++],x>1&&(W[s++]=B[k++]))}else{k=s-E;do W[s++]=W[k++],W[s++]=W[k++],W[s++]=W[k++],x-=3;while(x>2);x&&(W[s++]=W[k++],x>1&&(W[s++]=W[k++]))}break}}break}}while(a>3,a-=x,w-=x<<3,m&=(1<=1&&0===F[N];N--);if(R>N&&(R=N),0===N)return m[w++]=20971520,m[w++]=20971520,y.bits=1,0;for(M=1;M0&&(e===s||1!==N))return-1;for(V[1]=0,O=1;Oa||e===l&&T>i)return 1;for(;;){k=O-S,b[C]E?(B=Z[Y+b[C]],L=D[q+b[C]]):(B=96,L=0),g=1<>S)+v]=k<<24|B<<16|L|0;while(0!==v);for(g=1<>=1;if(0!==g?(P&=g-1,P+=g):P=0,C++,0===--F[O]){if(O===N)break;O=t[r+b[C]]}if(O>R&&(P&U)!==A){for(0===S&&(S=R),x+=M,H=O-S,I=1<a||e===l&&T>i)return 1;A=P&U,m[A]=R<<24|H<<16|x-w|0}}return 0!==P&&(m[x+P]=O-S<<24|64<<16|0),y.bits=R,0}}};for(var r in t)t[r].folder=r.substring(0,r.lastIndexOf("/")+1);var n=function(e){var r=[];return e=e.split("/").every(function(e){return".."==e?r.pop():"."==e||""==e||r.push(e)})?r.join("/"):null,e?t[e]||t[e+".js"]||t[e+"/index.js"]:null},o=function(e,t){return e?n(e.folder+"node_modules/"+t)||o(e.parent,t):null},a=function(e,t){var r=t.match(/^\//)?null:e?t.match(/^\.\.?\//)?n(e.folder+t):o(e,t):n(t);if(!r)throw"module not found: "+t;return r.exports||(r.parent=e,r(a.bind(null,r),r,r.exports={})),r.exports};return a(null,e)},decompress:function(e){this.exports||(this.exports=this.require("inflate.js"));try{return this.exports.inflate(e)}catch(e){}},hasUnityMarker:function(e){var t=10,r="UnityWeb Compressed Content (gzip)";if(t>e.length||31!=e[0]||139!=e[1])return!1;var n=e[3];if(4&n){if(t+2>e.length)return!1;if(t+=2+e[t]+(e[t+1]<<8),t>e.length)return!1}if(8&n){for(;te.length)return!1;t++}return 16&n&&String.fromCharCode.apply(null,e.subarray(t,t+r.length+1))==r+"\0"}},brotli:{require:function(e){var t={"decompress.js":function(e,t,r){t.exports=e("./dec/decode").BrotliDecompressBuffer},"dec/bit_reader.js":function(e,t,r){function n(e){this.buf_=new Uint8Array(a),this.input_=e,this.reset()}const o=4096,a=8224,i=8191,s=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);n.READ_SIZE=o,n.IBUF_MASK=i,n.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},n.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,t=this.input_.read(this.buf_,e,o);if(t<0)throw new Error("Unexpected end of input");if(t=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&i]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},n.prototype.readBits=function(e){32-this.bit_pos_>>this.bit_pos_&s[e];return this.bit_pos_+=e,t},t.exports=n},"dec/context.js":function(e,t,r){r.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),r.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},"dec/decode.js":function(e,t,r){function n(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3),t>0?17+t:(t=e.readBits(3),t>0?8+t:17))}function o(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<1&&0===i)throw new Error("Invalid size byte");o.meta_block_length|=i<<8*n}}else for(n=0;n4&&0===s)throw new Error("Invalid size nibble");o.meta_block_length|=s<<4*n}return++o.meta_block_length,o.input_end||o.is_metadata||(o.is_uncompressed=e.readBits(1)),o}function s(e,t,r){var n;return r.fillBitWindow(),t+=r.val_>>>r.bit_pos_&D,n=e[t].bits-P,n>0&&(r.bit_pos_+=P,t+=e[t].value,t+=r.val_>>>r.bit_pos_&(1<0;){var c,f=0;if(n.readMoreInput(),n.fillBitWindow(),f+=n.val_>>>n.bit_pos_&31,n.bit_pos_+=l[f].bits,c=255&l[f].value,c>c);else{var h,p,m=c-14,w=0;if(c===N&&(w=a),s!==w&&(i=0,s=w),h=i,i>0&&(i-=2,i<<=m),i+=n.readBits(m)+3,p=i-h,o+p>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var b=0;b0;++s){var b,y=V[s],g=0;n.fillBitWindow(),g+=n.val_>>>n.bit_pos_&15, +n.bit_pos_+=w[g].bits,b=w[g].value,h[y]=b,0!==b&&(p-=32>>b,++m)}if(1!==m&&0!==p)throw new Error("[ReadHuffmanCode] invalid num_codes or space");d(h,e,i,n)}if(a=L(t,r,P,i,e),0===a)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return a}function u(e,t,r){var n,o;return n=s(e,t,r),o=O.kBlockLengthPrefixCode[n].nbits,O.kBlockLengthPrefixCode[n].offset+r.readBits(o)}function c(e,t,r){var n;return e>>5]),this.htrees=new Uint32Array(t)}function m(e,t){var r,n,a,i={num_htrees:null,context_map:null},d=0;t.readMoreInput();var u=i.num_htrees=o(t)+1,c=i.context_map=new Uint8Array(e);if(u<=1)return i;for(r=t.readBits(1),r&&(d=t.readBits(4)+1),n=[],a=0;a=e)throw new Error("[DecodeContextMap] i >= context_map_size");c[a]=0,++a}else c[a]=f-d,++a}return t.readBits(1)&&h(c,e),i}function w(e,t,r,n,o,a,i){var d,l=2*r,u=r,c=s(t,r*q,i);d=0===c?o[l+(1&a[u])]:1===c?o[l+(a[u]-1&1)]+1:c-2,d>=e&&(d-=e),n[r]=d,o[l+(1&a[u])]=d,++a[u]}function b(e,t,r,n,o,a){var i,s=o+1,d=r&o,l=a.pos_&E.IBUF_MASK;if(t<8||a.bit_pos_+(t<<3)0;)a.readMoreInput(),n[d++]=a.readBits(8),d===s&&(e.write(n,s),d=0);else{if(a.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;a.bit_pos_<32;)n[d]=a.val_>>>a.bit_pos_,a.bit_pos_+=8,++d,--t;if(i=a.bit_end_pos_-a.bit_pos_>>3,l+i>E.IBUF_MASK){for(var u=E.IBUF_MASK+1-l,c=0;c=s){e.write(n,s),d-=s;for(var c=0;c=s;){if(i=s-d,a.input_.read(n,d,i)t.buffer.length){var ve=new Uint8Array(x+re);ve.set(t.buffer),t.buffer=ve}if(L=ge.input_end,J=ge.is_uncompressed,ge.is_metadata)for(y(U);re>0;--re)U.readMoreInput(),U.readBits(8);else if(0!==re)if(J)U.bit_pos_=U.bit_pos_+7&-8,b(t,re,x,h,f,U),x+=re;else{for(r=0;r<3;++r)ae[r]=o(U)+1,ae[r]>=2&&(l(ae[r]+2,v,r*q,U),l(S,A,r*q,U),ne[r]=u(A,r*q,U),se[r]=1);for(U.readMoreInput(),j=U.readBits(2),X=Z+(U.readBits(4)<0;){var xe,Ee,ke,Be,Le,We,Oe,Ce,Me,Ne,Re;for(U.readMoreInput(),0===ne[1]&&(w(ae[1],v,1,oe,ie,se,U),ne[1]=u(A,q,U),te=Y[1].htrees[oe[1]]),--ne[1],xe=s(Y[1].codes,te,U),Ee=xe>>6,Ee>=2?(Ee-=2,Oe=-1):Oe=0,ke=O.kInsertRangeLut[Ee]+(xe>>3&7),Be=O.kCopyRangeLut[Ee]+(7&xe),Le=O.kInsertLengthPrefixCode[ke].offset+U.readBits(O.kInsertLengthPrefixCode[ke].nbits),We=O.kCopyLengthPrefixCode[Be].offset+U.readBits(O.kCopyLengthPrefixCode[Be].nbits),F=h[x-1&f],V=h[x-2&f],Ne=0;Ne4?3:We-2),we=ue[me+Me],Oe=s(Y[2].codes,Y[2].htrees[we],U),Oe>=X){var He,Se,Ie;Oe-=X,Se=Oe&K,Oe>>=j,He=(Oe>>1)+1,Ie=(2+(1&Oe)<N){if(!(We>=k.minDictionaryWordLength&&We<=k.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+x+" distance: "+Ce+" len: "+We+" bytes left: "+re);var Ie=k.offsetsByLength[We],Te=Ce-N-1,Pe=k.sizeBitsByLength[We],De=(1<>Pe;if(Ie+=qe*We,!(Fe=g){t.write(h,d);for(var Ze=0;Ze0&&(P[3&D]=Ce,++D),We>re)throw new Error("Invalid backward reference. pos: "+x+" distance: "+Ce+" len: "+We+" bytes left: "+re);for(Ne=0;Ne>=1;return(e&r-1)+r}function a(e,t,r,o,a){do o-=r,e[t+o]=new n(a.bits,a.value);while(o>0)}function i(e,t,r){for(var n=1<0;--U[c])u=new n(255&c,65535&v[f++]),a(e,t+h,p,y,u),h=o(h,c);for(w=g-1,m=-1,c=r+1,p=2;c<=s;++c,p<<=1)for(;U[c]>0;--U[c])(h&w)!==m&&(t+=y,b=i(U,c,r),y=1<>r),p,y,u),h=o(h,c);return g}},"dec/prefix.js":function(e,t,r){function n(e,t){this.offset=e,this.nbits=t}r.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],r.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],r.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],r.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],r.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},"dec/streams.js":function(e,t,r){function n(e){this.buffer=e,this.pos=0}function o(e){this.buffer=e,this.pos=0}n.prototype.read=function(e,t,r){this.pos+r>this.buffer.length&&(r=this.buffer.length-this.pos);for(var n=0;nthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},r.BrotliOutput=o},"dec/transform.js":function(e,t,r){function n(e,t,r){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(r.length);for(var n=0;n=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}var a=e("./dictionary");const i=0,s=1,d=2,l=3,u=4,c=5,f=6,h=7,p=8,m=9,w=10,b=11,y=12,g=13,v=14,A=15,U=16,x=17,E=18,k=20;var B=[new n("",i,""),new n("",i," "),new n(" ",i," "),new n("",y,""),new n("",w," "),new n("",i," the "),new n(" ",i,""),new n("s ",i," "),new n("",i," of "),new n("",w,""),new n("",i," and "),new n("",g,""),new n("",s,""),new n(", ",i," "),new n("",i,", "),new n(" ",w," "),new n("",i," in "),new n("",i," to "),new n("e ",i," "),new n("",i,'"'),new n("",i,"."),new n("",i,'">'),new n("",i,"\n"),new n("",l,""),new n("",i,"]"),new n("",i," for "),new n("",v,""),new n("",d,""),new n("",i," a "),new n("",i," that "),new n(" ",w,""),new n("",i,". "),new n(".",i,""),new n(" ",i,", "),new n("",A,""),new n("",i," with "),new n("",i,"'"),new n("",i," from "),new n("",i," by "),new n("",U,""),new n("",x,""),new n(" the ",i,""),new n("",u,""),new n("",i,". The "),new n("",b,""),new n("",i," on "),new n("",i," as "),new n("",i," is "),new n("",h,""),new n("",s,"ing "),new n("",i,"\n\t"),new n("",i,":"),new n(" ",i,". "),new n("",i,"ed "),new n("",k,""),new n("",E,""),new n("",f,""),new n("",i,"("),new n("",w,", "),new n("",p,""),new n("",i," at "),new n("",i,"ly "),new n(" the ",i," of "),new n("",c,""),new n("",m,""),new n(" ",w,", "),new n("",w,'"'),new n(".",i,"("),new n("",b," "),new n("",w,'">'),new n("",i,'="'),new n(" ",i,"."),new n(".com/",i,""),new n(" the ",i," of the "),new n("",w,"'"),new n("",i,". This "),new n("",i,","),new n(".",i," "),new n("",w,"("),new n("",w,"."),new n("",i," not "),new n(" ",i,'="'),new n("",i,"er "),new n(" ",b," "),new n("",i,"al "),new n(" ",b,""),new n("",i,"='"),new n("",b,'"'),new n("",w,". "),new n(" ",i,"("),new n("",i,"ful "),new n(" ",w,". "),new n("",i,"ive "),new n("",i,"less "),new n("",b,"'"),new n("",i,"est "),new n(" ",w,"."),new n("",b,'">'),new n(" ",i,"='"),new n("",w,","),new n("",i,"ize "),new n("",b,"."),new n("\xc2\xa0",i,""),new n(" ",i,","),new n("",w,'="'),new n("",b,'="'),new n("",i,"ous "),new n("",b,", "),new n("",w,"='"),new n(" ",w,","),new n(" ",b,'="'),new n(" ",b,", "),new n("",b,","),new n("",b,"("),new n("",b,". "),new n(" ",b,"."),new n("",b,"='"),new n(" ",b,". "),new n(" ",w,'="'),new n(" ",b,"='"),new n(" ",w,"='")];r.kTransforms=B,r.kNumTransforms=B.length,r.transformDictionaryWord=function(e,t,r,n,i){var s,d=B[i].prefix,l=B[i].suffix,u=B[i].transform,c=un&&(c=n);for(var p=0;p0;){var g=o(e,s);s+=g,n-=g}for(var v=0;v0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function o(e){return 3*e.length/4-n(e)}function a(e){var t,r,o,a,i,s,d=e.length;i=n(e),s=new c(3*d/4-i),o=i>0?d-4:d;var l=0;for(t=0,r=0;t>16&255,s[l++]=a>>8&255,s[l++]=255&a;return 2===i?(a=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,s[l++]=255&a):1===i&&(a=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,s[l++]=a>>8&255,s[l++]=255&a),s}function i(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function s(e,t,r){for(var n,o=[],a=t;au?u:d+i));return 1===n?(t=e[r-1],o+=l[t>>2],o+=l[t<<4&63],o+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],o+=l[t>>10],o+=l[t>>4&63],o+=l[t<<2&63],o+="="),a.push(o),a.join("")}r.byteLength=o,r.toByteArray=a,r.fromByteArray=d;for(var l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,p=f.length;h>3);if(commentOffset=r+1+2+1+2+(o<<3)+7>>3,17==n||commentOffset>e.length)return!1;for(var a=n+(6+(o<<4)+(t.length-1<<6)<>>=8)if(e[i]!=(255&a))return!1;return String.fromCharCode.apply(null,e.subarray(commentOffset,commentOffset+t.length))==t}},decompress:function(e,t){var r=this.gzip.hasUnityMarker(e)?this.gzip:this.brotli.hasUnityMarker(e)?this.brotli:this.identity;if(this.serverSetupWarningEnabled&&r!=this.identity&&(console.log("You can reduce your startup time if you configure your web server to host .unityweb files using "+(r==this.gzip?"gzip":"brotli")+" compression."),this.serverSetupWarningEnabled=!1),"function"!=typeof t)return r.decompress(e);if(!r.worker){var n=URL.createObjectURL(new Blob(["this.require = ",r.require.toString(),"; this.decompress = ",r.decompress.toString(),"; this.onmessage = ",function(e){var t={id:e.data.id,decompressed:this.decompress(e.data.compressed)};postMessage(t,t.decompressed?[t.decompressed.buffer]:[])}.toString(),"; postMessage({ ready: true });"],{type:"text/javascript"}));r.worker=new Worker(n),r.worker.onmessage=function(e){return e.data.ready?void URL.revokeObjectURL(n):(this.callbacks[e.data.id](e.data.decompressed),void delete this.callbacks[e.data.id])},r.worker.callbacks={},r.worker.nextCallbackId=0}var o=r.worker.nextCallbackId++;r.worker.callbacks[o]=t,r.worker.postMessage({id:o,compressed:e},[e.buffer])},serverSetupWarningEnabled:!0},Cryptography:{crc32:function(e){var t=UnityLoader.Cryptography.crc32.module;if(!t){var r=new ArrayBuffer(16777216),n=function(e,t,r){"use asm";var n=new e.Uint8Array(r);var o=new e.Uint32Array(r);function a(e,t){e=e|0;t=t|0;var r=0;for(r=o[1024>>2]|0;t;e=e+1|0,t=t-1|0)r=o[(r&255^n[e])<<2>>2]^r>>>8^4278190080;o[1024>>2]=r}return{process:a}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},null,r);t=UnityLoader.Cryptography.crc32.module={buffer:r,HEAPU8:new Uint8Array(r),HEAPU32:new Uint32Array(r),process:n.process,crc32:1024,data:1028};for(var o=0;o<256;o++){for(var a=255^o,i=0;i<8;i++)a=a>>>1^(1&a?3988292384:0);t.HEAPU32[o]=a}}t.HEAPU32[t.crc32>>2]=0;for(var s=0;s>2];return new Uint8Array([l>>24,l>>16,l>>8,l])},md5:function(e){var t=UnityLoader.Cryptography.md5.module;if(!t){var r=new ArrayBuffer(16777216),n=function(e,t,r){"use asm";var n=new e.Uint32Array(r);function o(e,t){e=e|0;t=t|0;var r=0,o=0,a=0,i=0,s=0,d=0,l=0,u=0,c=0,f=0,h=0,p=0;r=n[128]|0,o=n[129]|0,a=n[130]|0,i=n[131]|0;for(;t;e=e+64|0,t=t-1|0){s=r;d=o;l=a;u=i;for(f=0;(f|0)<512;f=f+8|0){p=n[f>>2]|0;r=r+(n[f+4>>2]|0)+(n[e+(p>>>14)>>2]|0)+((f|0)<128?i^o&(a^i):(f|0)<256?a^i&(o^a):(f|0)<384?o^a^i:a^(o|~i))|0;h=(r<<(p&31)|r>>>32-(p&31))+o|0;r=i;i=a;a=o;o=h}r=r+s|0;o=o+d|0;a=a+l|0;i=i+u|0}n[128]=r;n[129]=o;n[130]=a;n[131]=i}return{process:o}}({Uint32Array:Uint32Array},null,r);t=UnityLoader.Cryptography.md5.module={buffer:r,HEAPU8:new Uint8Array(r),HEAPU32:new Uint32Array(r),process:n.process,md5:512,data:576},t.HEAPU32.set(new Uint32Array([7,3614090360,65548,3905402710,131089,606105819,196630,3250441966,262151,4118548399,327692,1200080426,393233,2821735955,458774,4249261313,524295,1770035416,589836,2336552879,655377,4294925233,720918,2304563134,786439,1804603682,851980,4254626195,917521,2792965006,983062,1236535329,65541,4129170786,393225,3225465664,720910,643717713,20,3921069994,327685,3593408605,655369,38016083,983054,3634488961,262164,3889429448,589829,568446438,917513,3275163606,196622,4107603335,524308,1163531501,851973,2850285829,131081,4243563512,458766,1735328473,786452,2368359562,327684,4294588738,524299,2272392833,720912,1839030562,917527,4259657740,65540,2763975236,262155,1272893353,458768,4139469664,655383,3200236656,851972,681279174,11,3936430074,196624,3572445317,393239,76029189,589828,3654602809,786443,3873151461,983056,530742520,131095,3299628645,6,4096336452,458762,1126891415,917519,2878612391,327701,4237533241,786438,1700485571,196618,2399980690,655375,4293915773,65557,2240044497,524294,1873313359,983050,4264355552,393231,2734768916,851989,1309151649,262150,4149444226,720906,3174756917,131087,718787259,589845,3951481745]))}t.HEAPU32.set(new Uint32Array([1732584193,4023233417,2562383102,271733878]),t.md5>>2);for(var o=0;o>6),e.length-o<64){if(a=e.length-o,t.HEAPU8.set(e.subarray(e.length-a,e.length),t.data),o+=a,t.HEAPU8[t.data+a++]=128,a>56){for(var i=a;i<64;i++)t.HEAPU8[t.data+i]=0;t.process(t.data,1),a=0}for(var i=a;i<64;i++)t.HEAPU8[t.data+i]=0;for(var s=e.length,d=0,i=56;i<64;i++,d=(224&s)>>5,s/=256)t.HEAPU8[t.data+i]=((31&s)<<3)+d;t.process(t.data,1)}}return new Uint8Array(t.HEAPU8.subarray(t.md5,t.md5+16))},sha1:function(e){var t=UnityLoader.Cryptography.sha1.module;if(!t){var r=new ArrayBuffer(16777216),n=function(e,t,r){"use asm";var n=new e.Uint32Array(r);function o(e,t){e=e|0;t=t|0;var r=0,o=0,a=0,i=0,s=0,d=0,l=0,u=0,c=0,f=0,h=0,p=0;r=n[80]|0,o=n[81]|0,a=n[82]|0,i=n[83]|0,s=n[84]|0;for(;t;e=e+64|0,t=t-1|0){d=r;l=o;u=a;c=i;f=s;for(p=0;(p|0)<320;p=p+4|0,s=i,i=a,a=o<<30|o>>>2,o=r,r=h){if((p|0)<64){h=n[e+p>>2]|0;h=h<<24&4278190080|h<<8&16711680|h>>>8&65280|h>>>24&255}else{h=n[p-12>>2]^n[p-32>>2]^n[p-56>>2]^n[p-64>>2];h=h<<1|h>>>31}n[p>>2]=h;h=h+((r<<5|r>>>27)+s)+((p|0)<80?(o&a|~o&i|0)+1518500249|0:(p|0)<160?(o^a^i)+1859775393|0:(p|0)<240?(o&a|o&i|a&i)+2400959708|0:(o^a^i)+3395469782|0)|0}r=r+d|0;o=o+l|0;a=a+u|0;i=i+c|0;s=s+f|0}n[80]=r;n[81]=o;n[82]=a;n[83]=i;n[84]=s}return{process:o}}({Uint32Array:Uint32Array},null,r);t=UnityLoader.Cryptography.sha1.module={buffer:r,HEAPU8:new Uint8Array(r),HEAPU32:new Uint32Array(r),process:n.process,sha1:320,data:384}}t.HEAPU32.set(new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),t.sha1>>2);for(var o=0;o>6),e.length-o<64){if(a=e.length-o,t.HEAPU8.set(e.subarray(e.length-a,e.length),t.data),o+=a,t.HEAPU8[t.data+a++]=128,a>56){for(var i=a;i<64;i++)t.HEAPU8[t.data+i]=0;t.process(t.data,1),a=0}for(var i=a;i<64;i++)t.HEAPU8[t.data+i]=0;for(var s=e.length,d=0,i=63;i>=56;i--,d=(224&s)>>5,s/=256)t.HEAPU8[t.data+i]=((31&s)<<3)+d;t.process(t.data,1)}}for(var l=new Uint8Array(20),i=0;i\\[(\\d+)\\]\\+\\d+\\))()":"((\\s*)wasm-function\\[(\\d+)\\])@(blob:.*)",blobParseRegExp:new RegExp("^(blob:.*)(:\\d+:\\d+)$"),getModule:function(e){var t=e.message.match(new RegExp(this.stackTraceFormat,"g"));for(var r in t){var n=t[r].match(new RegExp("^"+this.stackTraceFormat+"$")),o=n[7].match(this.blobParseRegExp);if(o&&UnityLoader.Blobs[o[1]]&&UnityLoader.Blobs[o[1]].Module)return UnityLoader.Blobs[o[1]].Module}},demangle:function(e,t){var r=e.message;return t?(r=r.replace(new RegExp(this.stackTraceFormat,"g"),function(e){var r=e.match(new RegExp("^"+this.stackTraceFormat+"$")),n=r[7].match(this.blobParseRegExp),o=t.demangleSymbol?t.demangleSymbol(r[4]):r[4],a=n&&UnityLoader.Blobs[n[1]]&&UnityLoader.Blobs[n[1]].url?UnityLoader.Blobs[n[1]].url:"blob";return r[1]+o+(r[2]!=o?" ["+r[2]+"]":"")+" ("+(n?a.substr(a.lastIndexOf("/")+1)+n[2]:r[7])+")"}.bind(this)),t.useWasm&&(r=r.replace(new RegExp(this.stackTraceFormatWasm,"g"),function(e){var r=e.match(new RegExp("^"+this.stackTraceFormatWasm+"$")),n=t.demangleSymbol?t.demangleSymbol(r[3]):r[3],o=r[4].match(this.blobParseRegExp),a=o&&UnityLoader.Blobs[o[1]]&&UnityLoader.Blobs[o[1]].url?UnityLoader.Blobs[o[1]].url:"blob";return(n==r[3]?r[1]:r[2]+n+" [wasm:"+r[3]+"]")+(r[4]?" ("+(o?a.substr(a.lastIndexOf("/")+1)+o[2]:r[4])+")":"")}.bind(this))),r):r},handler:function(e,t){var r=t?this.demangle(e,t):e.message;if(!(t&&t.errorhandler&&t.errorhandler(r,e.filename,e.lineno)||(console.log("Invoking error handler due to\n"+r),"function"==typeof dump&&dump("Invoking error handler due to\n"+r),r.indexOf("UnknownError")!=-1||r.indexOf("Program terminated with exit(0)")!=-1||this.didShowErrorMessage))){var r="An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:\n"+r;r.indexOf("DISABLE_EXCEPTION_CATCHING")!=-1?r="An exception has occurred, but exception handling has been disabled in this build. If you are the developer of this content, enable exceptions in your project WebGL player settings to be able to catch the exception or see the stack trace.":r.indexOf("Cannot enlarge memory arrays")!=-1?r="Out of memory. If you are the developer of this content, try allocating more memory to your WebGL build in the WebGL player settings.":r.indexOf("Invalid array buffer length")==-1&&r.indexOf("Invalid typed array length")==-1&&r.indexOf("out of memory")==-1&&r.indexOf("could not allocate memory")==-1||(r="The browser could not allocate enough memory for the WebGL content. If you are the developer of this content, try allocating less memory to your WebGL build in the WebGL player settings."),alert(r),this.didShowErrorMessage=!0}},popup:function(e,t,r){r=r||[{text:"OK"}];var n=document.createElement("div");n.style.cssText="position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); text-align: center; border: 1px solid black; padding: 5px; background: #E8E8E8";var o=document.createElement("span");o.textContent=t,n.appendChild(o),n.appendChild(document.createElement("br"));for(var a=0;a=10.1)?1:0}(),hasWasm:"object"==typeof WebAssembly&&"function"==typeof WebAssembly.validate&&"function"==typeof WebAssembly.compile}}(),compatibilityCheck:function(e,t,r){UnityLoader.SystemInfo.hasWebGL?UnityLoader.SystemInfo.mobile?e.popup("Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway.",[{text:"OK",callback:t}]):["Edge","Firefox","Chrome","Safari"].indexOf(UnityLoader.SystemInfo.browser)==-1?e.popup("Please note that your browser is not currently supported for this Unity WebGL content. Press OK if you wish to continue anyway.",[{text:"OK",callback:t}]):t():e.popup("Your browser does not support WebGL",[{text:"OK",callback:r}])},Blobs:{},loadCode:function(e,t,r){var n=[].slice.call(UnityLoader.Cryptography.md5(e)).map(function(e){return("0"+e.toString(16)).substr(-2)}).join(""),o=document.createElement("script"),a=URL.createObjectURL(new Blob(['UnityLoader["'+n+'"]=',e],{type:"text/javascript"}));UnityLoader.Blobs[a]=r,o.src=a,o.onload=function(){URL.revokeObjectURL(a),t(n)},document.body.appendChild(o)},allocateHeapJob:function(e,t){for(var r=e.TOTAL_STACK||5242880,n=e.TOTAL_MEMORY||(e.buffer?e.buffer.byteLength:268435456),o=65536,a=16777216,i=o;i0;c=f,f=u.indexOf("/",c)+1)e.FS_createPath(u.substring(0,c),u.substring(c,f-1),!0,!0);e.FS_createDataFile(u,null,r.subarray(s,s+d),!0,!0,!0)}e.removeRunDependency("processDataJob"),t.complete()},downloadJob:function(e,t){var r=t.parameters.objParameters?new UnityLoader.UnityCache.XMLHttpRequest(t.parameters.objParameters):new XMLHttpRequest;r.open("GET",t.parameters.url),r.responseType="arraybuffer",r.onload=function(){UnityLoader.Compression.decompress(new Uint8Array(r.response),function(e){t.complete(e)})},t.parameters.onprogress&&r.addEventListener("progress",t.parameters.onprogress),t.parameters.onload&&r.addEventListener("load",t.parameters.onload),r.send()},scheduleBuildDownloadJob:function(e,t,r){UnityLoader.Progress.update(e,t),UnityLoader.Job.schedule(e,t,[],UnityLoader.downloadJob,{url:e.resolveBuildUrl(e[r]),onprogress:function(r){UnityLoader.Progress.update(e,t,r)},onload:function(r){UnityLoader.Progress.update(e,t,r)},objParameters:e.companyName&&e.productName&&e.cacheControl&&(e.cacheControl[r]||e.cacheControl.default)?{companyName:e.companyName,productName:e.productName,cacheControl:e.cacheControl[r]||e.cacheControl.default}:null})},loadModule:function(e){if(e.useWasm=e.wasmCodeUrl&&UnityLoader.SystemInfo.hasWasm,e.useWasm)UnityLoader.initWasmCache(e,"wasmCodeUrl"),UnityLoader.scheduleBuildDownloadJob(e,"downloadWasmCode","wasmCodeUrl"),UnityLoader.Job.schedule(e,"processWasmCode",["downloadWasmCode"],UnityLoader.processWasmCodeJob),UnityLoader.scheduleBuildDownloadJob(e,"downloadWasmFramework","wasmFrameworkUrl"),UnityLoader.Job.schedule(e,"processWasmFramework",["downloadWasmFramework","processWasmCode","setupIndexedDB"],UnityLoader.processWasmFrameworkJob);else{if(!e.asmCodeUrl)throw"WebAssembly support is not detected in this browser.";UnityLoader.scheduleBuildDownloadJob(e,"downloadAsmCode","asmCodeUrl"),UnityLoader.Job.schedule(e,"processAsmCode",["downloadAsmCode"],UnityLoader.processAsmCodeJob),UnityLoader.scheduleBuildDownloadJob(e,"downloadAsmMemory","asmMemoryUrl"),UnityLoader.Job.schedule(e,"processAsmMemory",["downloadAsmMemory"],UnityLoader.processAsmMemoryJob),e.memoryInitializerRequest={addEventListener:function(t,r){e.memoryInitializerRequest.callback=r}},e.asmLibraryUrl&&(e.dynamicLibraries=[e.asmLibraryUrl].map(e.resolveBuildUrl)),UnityLoader.scheduleBuildDownloadJob(e,"downloadAsmFramework","asmFrameworkUrl"),UnityLoader.Job.schedule(e,"processAsmFramework",["downloadAsmFramework","processAsmCode","setupIndexedDB"],UnityLoader.processAsmFrameworkJob)}UnityLoader.scheduleBuildDownloadJob(e,"downloadData","dataUrl"),UnityLoader.Job.schedule(e,"setupIndexedDB",[],UnityLoader.setupIndexedDBJob),e.preRun.push(function(){e.addRunDependency("processDataJob"),UnityLoader.Job.schedule(e,"processData",["downloadData"],UnityLoader.processDataJob)})},instantiate:function(e,t,r){function n(e,r){if("string"==typeof e&&!(e=document.getElementById(e)))return!1;e.innerHTML="",e.style.border=e.style.margin=e.style.padding=0,"static"==getComputedStyle(e).getPropertyValue("position")&&(e.style.position="relative"),e.style.width=r.width||e.style.width,e.style.height=r.height||e.style.height,r.container=e;var n=r.Module;return n.canvas=document.createElement("canvas"),n.canvas.style.width="100%",n.canvas.style.height="100%",n.canvas.addEventListener("contextmenu",function(e){e.preventDefault()}),n.canvas.id="#canvas",e.appendChild(n.canvas),r.compatibilityCheck(r,function(){var t=new XMLHttpRequest;t.open("GET",r.url,!0),t.responseType="text",t.onerror=function(){n.print("Could not download "+r.url),0==document.URL.indexOf("file:")&&alert("It seems your browser does not support running Unity WebGL content from file:// urls. Please upload it to an http server, or try a different browser.")},t.onload=function(){var o=JSON.parse(t.responseText);for(var a in o)"undefined"==typeof n[a]&&(n[a]=o[a]);for(var i=!1,s=0;s=1?i=!0:n.print("Warning: Unsupported graphics API "+d)}return i?(e.style.background=n.backgroundUrl?"center/cover url('"+n.resolveBuildUrl(n.backgroundUrl)+"')":n.backgroundColor?" "+n.backgroundColor:"",r.onProgress(r,0),void UnityLoader.loadModule(n)):void r.popup("Your browser does not support any of the required graphics API for this content: "+n.graphicsAPI,[{text:"OK"}])},t.send()},function(){n.printErr("Instantiation of the '"+t+"' terminated due to the failed compatibility check.")}),!0}function o(e){return o.link=o.link||document.createElement("a"),o.link.href=e,o.link.href}var a={url:t,onProgress:UnityLoader.Progress.handler,compatibilityCheck:UnityLoader.compatibilityCheck,Module:{graphicsAPI:["WebGL 2.0","WebGL 1.0"],onAbort:function(e){throw void 0!==e?(this.print(e),this.printErr(e),e=JSON.stringify(e)):e="","abort("+e+") at "+this.stackTrace()},preRun:[],postRun:[],print:function(e){console.log(e)},printErr:function(e){console.error(e)},Jobs:{},buildDownloadProgress:{},resolveBuildUrl:function(e){return e.match(/(http|https|ftp|file):\/\//)?e:t.substring(0,t.lastIndexOf("/")+1)+e},streamingAssetsUrl:function(){return o(this.resolveBuildUrl("../StreamingAssets"))},wasmRequest:function(e,t){this.wasmCache?(this.wasmCache.request={wasmInstantiate:e,callback:t},this.wasmCache.update()):e(this.wasmBinary).then(function(e){t(e.instance)})}},SetFullscreen:function(){if(a.Module.SetFullscreen)return a.Module.SetFullscreen.apply(a.Module,arguments)},SendMessage:function(){if(a.Module.SendMessage)return a.Module.SendMessage.apply(a.Module,arguments)}};a.Module.gameInstance=a,a.popup=function(e,t){return UnityLoader.Error.popup(a,e,t)},a.Module.postRun.push(function(){a.onProgress(a,1)});for(var i in r)if("Module"==i)for(var s in r[i])a.Module[s]=r[i][s];else a[i]=r[i];return n(e,a)||document.addEventListener("DOMContentLoaded",function(){n(e,a)}),a},Utils:{assert:function(e,t){e||abort("Assertion failed: "+t)},optimizeMathFround:function(e,t){console.log("optimizing out Math.fround calls");for(var r={LOOKING_FOR_MODULE:0,SCANNING_MODULE_VARIABLES:1,SCANNING_MODULE_FUNCTIONS:2},n=["EMSCRIPTEN_START_ASM","EMSCRIPTEN_START_FUNCS","EMSCRIPTEN_END_FUNCS"],o="var",a="global.Math.fround;",i=0,s=t?r.LOOKING_FOR_MODULE:r.SCANNING_MODULE_VARIABLES,d=0,l=0;s<=r.SCANNING_MODULE_FUNCTIONS&&i { + Stats.Memory.updateText(); + }, 1000); + + this.updateText(); + }, + updateText: function(){ + Stats.Memory.element.innerText = "Initial Heap Size: " + (Stats.Memory.initialHeapSize / 1024 / 1024); + Stats.Memory.element.innerText += "\nHeap Size: " + (gameInstance.Module.asmLibraryArg.getTotalMemory() / 1024 / 1024); + Stats.Memory.element.innerText += "\nHigh Watermark: " + (gameInstance.Module.HEAP32[gameInstance.Module.asmLibraryArg.DYNAMICTOP_PTR>> 2] / 1024 / 1024).toFixed(0); + } + }, + Loading: { + timers: [], + init: function(Module){ + this.element = UI.createSection("Load Times (ms)"); + this.updateInterval = setInterval(function(){ + Stats.Loading.updateText(); + }, 500); + + // UnityLoader.Job.schedule(Module, "wasmFrameworkDownloadFinished", ["downloadWasmFramework"], downloadFinishedJob.bind(null, "WebAssembly Framwork")); + UnityLoader.Job.schedule(Module, "downloadFinished", ["downloadWasmCode", "downloadData", "downloadWasmFramework"], this.downloadFinishedJob); + }, + term: function(){ + Stats.Loading.updateText(); + clearInterval(Stats.Loading.updateInterval); + }, + updateText: function(){ + Stats.Loading.element.innerText = ""; + Stats.Loading.timers.forEach(function(timer) { + Stats.Loading.element.innerText += timer.toString(); + Stats.Loading.element.innerText += "\n"; + }); + }, + downloadFinishedJob: function (Module, job) { + Stats.Loading.timers.unshift( + new Timer("Data", Module.Jobs["downloadData"]), + new Timer("Code", Module.Jobs["downloadWasmCode"]), + new Timer("Framework", Module.Jobs["downloadWasmFramework"]) + ); + } + } +}; diff --git a/TemplateData/Timer.js b/TemplateData/Timer.js new file mode 100644 index 0000000..8bb6317 --- /dev/null +++ b/TemplateData/Timer.js @@ -0,0 +1,44 @@ +var Timer = /** @class */ (function () { + function Timer(label, job) { + this.label = label; + if (job == null) { + this.startTime = performance.now(); + } + else { + this.job = job; + this.set(job.starttime, job.endtime); + } + } + Timer.prototype.start = function () { + this.startTime = performance.now(); + }; + Timer.prototype.stop = function () { + this.endTime = performance.now(); + }; + Timer.prototype.set = function (startTime, endTime) { + this.startTime = startTime; + this.endTime = endTime; + }; + Timer.prototype.isDone = function () { + return typeof this.endTime != "undefined"; + }; + Timer.prototype.toString = function () { + var text = this.label + ": "; + if (this.isDone()) { + // text += (this.endTime - this.startTime).toFixed(2); + text += (this.endTime - this.startTime).toFixed(0); + if ((typeof this.job !== "undefined") && this.job.result.value.cached) { + text += " (from cache)"; + } + } + else { + var progress = ((performance.now() - this.startTime).toFixed(2) / 1000) % 3; + text += "in progress "; + for (i = 0; i < progress; i++) { + text += "."; + } + } + return text; + }; + return Timer; +}()); diff --git a/TemplateData/UI.js b/TemplateData/UI.js new file mode 100644 index 0000000..62b9c0e --- /dev/null +++ b/TemplateData/UI.js @@ -0,0 +1,40 @@ +var UI= { + init: function(container, onQuit){ + this.container = container; + this.main = document.createElement("div"); + this.main.id = "overlay"; + + this.main.style.bottom = "0px"; + this.container.appendChild(this.main); + // this.createButton("Reload with #no-cache"); + this.createButton("X", function() { + onQuit(); + UI.container.removeChild(UI.main); + }); + if (!UnityLoader.SystemInfo.mobile) + this.createButton("Enable Fullscreen", function(){ + gameInstance.SetFullscreen(1); + }); + }, + createButton: function (text, callback) { + var button = document.createElement("button"); + button.className = "button"; + var t = document.createTextNode(text); + button.appendChild(t); + button.addEventListener("click", callback); + this.main.appendChild(button); + }, + createSection: function(title) { + var section = document.createElement("p"); + section.id = "section"; + section.innerText = title; + + var content = document.createElement("p"); + content.id = "section-content"; + + section.appendChild(content); + this.main.appendChild(section); + + return content; + } +} \ No newline at end of file diff --git a/TemplateData/UnityLoader.js b/TemplateData/UnityLoader.js new file mode 100644 index 0000000..bdced8e --- /dev/null +++ b/TemplateData/UnityLoader.js @@ -0,0 +1,1428 @@ +var UnityLoader = UnityLoader || { + Compression: { + identity: { + require: function () { + return {}; + }, + decompress: function (data) { + return data; + }, + }, + gzip: { + require: function require(e){var t={"inflate.js":function(e,t,i){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var i=s.inflateInit2(this.strm,t.windowBits);if(i!==f.Z_OK)throw new Error(d[i]);this.header=new u,s.inflateGetHeader(this.strm,this.header)}function a(e,t){var i=new n(t);if(i.push(e,!0),i.err)throw i.msg||d[i.err];return i.result}function r(e,t){return t=t||{},t.raw=!0,a(e,t)}var s=e("./zlib/inflate"),o=e("./utils/common"),l=e("./utils/strings"),f=e("./zlib/constants"),d=e("./zlib/messages"),h=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;n.prototype.push=function(e,t){var i,n,a,r,d,h,u=this.strm,b=this.options.chunkSize,w=this.options.dictionary,m=!1;if(this.ended)return!1;n=t===~~t?t:t===!0?f.Z_FINISH:f.Z_NO_FLUSH,"string"==typeof e?u.input=l.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?u.input=new Uint8Array(e):u.input=e,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new o.Buf8(b),u.next_out=0,u.avail_out=b),i=s.inflate(u,f.Z_NO_FLUSH),i===f.Z_NEED_DICT&&w&&(h="string"==typeof w?l.string2buf(w):"[object ArrayBuffer]"===c.call(w)?new Uint8Array(w):w,i=s.inflateSetDictionary(this.strm,h)),i===f.Z_BUF_ERROR&&m===!0&&(i=f.Z_OK,m=!1),i!==f.Z_STREAM_END&&i!==f.Z_OK)return this.onEnd(i),this.ended=!0,!1;u.next_out&&(0!==u.avail_out&&i!==f.Z_STREAM_END&&(0!==u.avail_in||n!==f.Z_FINISH&&n!==f.Z_SYNC_FLUSH)||("string"===this.options.to?(a=l.utf8border(u.output,u.next_out),r=u.next_out-a,d=l.buf2string(u.output,a),u.next_out=r,u.avail_out=b-r,r&&o.arraySet(u.output,u.output,a,r,0),this.onData(d)):this.onData(o.shrinkBuf(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(m=!0)}while((u.avail_in>0||0===u.avail_out)&&i!==f.Z_STREAM_END);return i===f.Z_STREAM_END&&(n=f.Z_FINISH),n===f.Z_FINISH?(i=s.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===f.Z_OK):n!==f.Z_SYNC_FLUSH||(this.onEnd(f.Z_OK),u.avail_out=0,!0)},n.prototype.onData=function(e){this.chunks.push(e)},n.prototype.onEnd=function(e){e===f.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},i.Inflate=n,i.inflate=a,i.inflateRaw=r,i.ungzip=a},"utils/common.js":function(e,t,i){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;i.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}}return e},i.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,n,a){if(t.subarray&&e.subarray)return void e.set(t.subarray(i,i+n),a);for(var r=0;r=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;o[254]=o[254]=1,i.string2buf=function(e){var t,i,n,r,s,o=e.length,l=0;for(r=0;r>>6,t[s++]=128|63&i):i<65536?(t[s++]=224|i>>>12,t[s++]=128|i>>>6&63,t[s++]=128|63&i):(t[s++]=240|i>>>18,t[s++]=128|i>>>12&63,t[s++]=128|i>>>6&63,t[s++]=128|63&i);return t},i.buf2binstring=function(e){return n(e,e.length)},i.binstring2buf=function(e){for(var t=new a.Buf8(e.length),i=0,n=t.length;i4)f[a++]=65533,i+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&i1?f[a++]=65533:r<65536?f[a++]=r:(r-=65536,f[a++]=55296|r>>10&1023,f[a++]=56320|1023&r)}return n(f,a)},i.utf8border=function(e,t){var i;for(t=t||e.length,t>e.length&&(t=e.length),i=t-1;i>=0&&128===(192&e[i]);)i--;return i<0?t:0===i?t:i+o[e[i]]>t?i:t}},"zlib/inflate.js":function(e,t,i){"use strict";function n(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new _.Buf16(320),this.work=new _.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function r(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=U,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new _.Buf32(we),t.distcode=t.distdyn=new _.Buf32(me),t.sane=1,t.back=-1,z):C}function s(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,r(e)):C}function o(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?C:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,s(e))):C}function l(e,t){var i,n;return e?(n=new a,e.state=n,n.window=null,i=o(e,t),i!==z&&(e.state=null),i):C}function f(e){return l(e,_e)}function d(e){if(ge){var t;for(m=new _.Buf32(512),k=new _.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(x(S,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;x(B,e.lens,0,32,k,0,e.work,{bits:5}),ge=!1}e.lencode=m,e.lenbits=9,e.distcode=k,e.distbits=5}function h(e,t,i,n){var a,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(_.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>n&&(a=n),_.arraySet(r.window,t,i-n,a,r.wnext),n-=a,n?(_.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=v(i.check,Ze,2,0),u=0,c=0,i.mode=j;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",i.mode=ue;break}if((15&u)!==F){e.msg="unknown compression method",i.mode=ue;break}if(u>>>=4,c-=4,xe=(15&u)+8,0===i.wbits)i.wbits=xe;else if(xe>i.wbits){e.msg="invalid window size",i.mode=ue;break}i.dmax=1<>8&1),512&i.flags&&(Ze[0]=255&u,Ze[1]=u>>>8&255,i.check=v(i.check,Ze,2,0)),u=0,c=0,i.mode=D;case D:for(;c<32;){if(0===l)break e;l--,u+=a[s++]<>>8&255,Ze[2]=u>>>16&255,Ze[3]=u>>>24&255,i.check=v(i.check,Ze,4,0)),u=0,c=0,i.mode=L;case L:for(;c<16;){if(0===l)break e;l--,u+=a[s++]<>8),512&i.flags&&(Ze[0]=255&u,Ze[1]=u>>>8&255,i.check=v(i.check,Ze,2,0)),u=0,c=0,i.mode=H;case H:if(1024&i.flags){for(;c<16;){if(0===l)break e;l--,u+=a[s++]<>>8&255,i.check=v(i.check,Ze,2,0)),u=0,c=0}else i.head&&(i.head.extra=null);i.mode=K;case K:if(1024&i.flags&&(m=i.length,m>l&&(m=l),m&&(i.head&&(xe=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),_.arraySet(i.head.extra,a,s,m,xe)),512&i.flags&&(i.check=v(i.check,a,m,s)),l-=m,s+=m,i.length-=m),i.length))break e;i.length=0,i.mode=M;case M:if(2048&i.flags){if(0===l)break e;m=0;do xe=a[s+m++],i.head&&xe&&i.length<65536&&(i.head.name+=String.fromCharCode(xe));while(xe&&m>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=q;break;case G:for(;c<32;){if(0===l)break e;l--,u+=a[s++]<>>=7&c,c-=7&c,i.mode=fe;break}for(;c<3;){if(0===l)break e;l--,u+=a[s++]<>>=1,c-=1,3&u){case 0:i.mode=J;break;case 1:if(d(i),i.mode=ie,t===A){u>>>=2,c-=2;break e}break;case 2:i.mode=$;break;case 3:e.msg="invalid block type",i.mode=ue}u>>>=2,c-=2;break;case J:for(u>>>=7&c,c-=7&c;c<32;){if(0===l)break e;l--,u+=a[s++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=ue;break}if(i.length=65535&u,u=0,c=0,i.mode=Q,t===A)break e;case Q:i.mode=V;case V:if(m=i.length){if(m>l&&(m=l),m>f&&(m=f),0===m)break e;_.arraySet(r,a,s,m,o),l-=m,s+=m,f-=m,o+=m,i.length-=m;break}i.mode=q;break;case $:for(;c<14;){if(0===l)break e;l--,u+=a[s++]<>>=5,c-=5,i.ndist=(31&u)+1,u>>>=5,c-=5,i.ncode=(15&u)+4,u>>>=4,c-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=ue;break}i.have=0,i.mode=ee;case ee:for(;i.have>>=3,c-=3}for(;i.have<19;)i.lens[Ae[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Se={bits:i.lenbits},ye=x(y,i.lens,0,19,i.lencode,0,i.work,Se),i.lenbits=Se.bits,ye){e.msg="invalid code lengths set",i.mode=ue;break}i.have=0,i.mode=te;case te:for(;i.have>>24,ke=Ee>>>16&255,_e=65535&Ee,!(me<=c);){if(0===l)break e;l--,u+=a[s++]<>>=me,c-=me,i.lens[i.have++]=_e;else{if(16===_e){for(Be=me+2;c>>=me,c-=me,0===i.have){e.msg="invalid bit length repeat",i.mode=ue;break}xe=i.lens[i.have-1],m=3+(3&u),u>>>=2,c-=2}else if(17===_e){for(Be=me+3;c>>=me,c-=me,xe=0,m=3+(7&u),u>>>=3,c-=3}else{for(Be=me+7;c>>=me,c-=me,xe=0,m=11+(127&u),u>>>=7,c-=7}if(i.have+m>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=ue;break}for(;m--;)i.lens[i.have++]=xe}}if(i.mode===ue)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=ue;break}if(i.lenbits=9,Se={bits:i.lenbits},ye=x(S,i.lens,0,i.nlen,i.lencode,0,i.work,Se),i.lenbits=Se.bits,ye){e.msg="invalid literal/lengths set",i.mode=ue;break}if(i.distbits=6,i.distcode=i.distdyn,Se={bits:i.distbits},ye=x(B,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Se),i.distbits=Se.bits,ye){e.msg="invalid distances set",i.mode=ue;break}if(i.mode=ie,t===A)break e;case ie:i.mode=ne;case ne:if(l>=6&&f>=258){e.next_out=o,e.avail_out=f,e.next_in=s,e.avail_in=l,i.hold=u,i.bits=c,p(e,w),o=e.next_out,r=e.output,f=e.avail_out,s=e.next_in,a=e.input,l=e.avail_in,u=i.hold,c=i.bits,i.mode===q&&(i.back=-1);break}for(i.back=0;Ee=i.lencode[u&(1<>>24,ke=Ee>>>16&255,_e=65535&Ee,!(me<=c);){if(0===l)break e;l--,u+=a[s++]<>ge)],me=Ee>>>24,ke=Ee>>>16&255,_e=65535&Ee,!(ge+me<=c);){if(0===l)break e;l--,u+=a[s++]<>>=ge,c-=ge,i.back+=ge}if(u>>>=me,c-=me,i.back+=me,i.length=_e,0===ke){i.mode=le;break}if(32&ke){i.back=-1,i.mode=q;break}if(64&ke){e.msg="invalid literal/length code",i.mode=ue;break}i.extra=15&ke,i.mode=ae;case ae:if(i.extra){for(Be=i.extra;c>>=i.extra,c-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=re;case re:for(;Ee=i.distcode[u&(1<>>24,ke=Ee>>>16&255,_e=65535&Ee,!(me<=c);){if(0===l)break e;l--,u+=a[s++]<>ge)],me=Ee>>>24,ke=Ee>>>16&255,_e=65535&Ee,!(ge+me<=c);){if(0===l)break e;l--,u+=a[s++]<>>=ge,c-=ge,i.back+=ge}if(u>>>=me,c-=me,i.back+=me,64&ke){e.msg="invalid distance code",i.mode=ue;break}i.offset=_e,i.extra=15&ke,i.mode=se;case se:if(i.extra){for(Be=i.extra;c>>=i.extra,c-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=ue;break}i.mode=oe;case oe:if(0===f)break e;if(m=w-f,i.offset>m){if(m=i.offset-m,m>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=ue;break}m>i.wnext?(m-=i.wnext,k=i.wsize-m):k=i.wnext-m,m>i.length&&(m=i.length),we=i.window}else we=r,k=o-i.offset,m=i.length;m>f&&(m=f),f-=m,i.length-=m;do r[o++]=we[k++];while(--m);0===i.length&&(i.mode=ne);break;case le:if(0===f)break e;r[o++]=i.length,f--,i.mode=ne;break;case fe:if(i.wrap){for(;c<32;){if(0===l)break e;l--,u|=a[s++]<>>16&65535|0,s=0;0!==i;){s=i>2e3?2e3:i,i-=s;do a=a+t[n++]|0,r=r+a|0;while(--s);a%=65521,r%=65521}return a|r<<16|0}t.exports=n},"zlib/crc32.js":function(e,t,i){"use strict";function n(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}function a(e,t,i,n){var a=r,s=n+i;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return e^-1}var r=n();t.exports=a},"zlib/inffast.js":function(e,t,i){"use strict";var n=30,a=12;t.exports=function(e,t){var i,r,s,o,l,f,d,h,u,c,b,w,m,k,_,g,v,p,x,y,S,B,E,Z,A;i=e.state,r=e.next_in,Z=e.input,s=r+(e.avail_in-5),o=e.next_out,A=e.output,l=o-(t-e.avail_out),f=o+(e.avail_out-257),d=i.dmax,h=i.wsize,u=i.whave,c=i.wnext,b=i.window,w=i.hold,m=i.bits,k=i.lencode,_=i.distcode,g=(1<>>24,w>>>=x,m-=x,x=p>>>16&255,0===x)A[o++]=65535&p;else{if(!(16&x)){if(0===(64&x)){p=k[(65535&p)+(w&(1<>>=x,m-=x),m<15&&(w+=Z[r++]<>>24,w>>>=x,m-=x,x=p>>>16&255,!(16&x)){if(0===(64&x)){p=_[(65535&p)+(w&(1<d){e.msg="invalid distance too far back",i.mode=n;break e}if(w>>>=x,m-=x,x=o-l,S>x){if(x=S-x,x>u&&i.sane){e.msg="invalid distance too far back",i.mode=n;break e}if(B=0,E=b,0===c){if(B+=h-x,x2;)A[o++]=E[B++],A[o++]=E[B++],A[o++]=E[B++],y-=3;y&&(A[o++]=E[B++],y>1&&(A[o++]=E[B++]))}else{B=o-S;do A[o++]=A[B++],A[o++]=A[B++],A[o++]=A[B++],y-=3;while(y>2);y&&(A[o++]=A[B++],y>1&&(A[o++]=A[B++]))}break}}break}}while(r>3,r-=y,m-=y<<3,w&=(1<=1&&0===H[C];C--);if(O>C&&(O=C),0===C)return w[m++]=20971520,w[m++]=20971520,_.bits=1,0;for(N=1;N0&&(e===o||1!==C))return-1;for(K[1]=0,z=1;zr||e===f&&U>s)return 1;for(;;){B=z-T,k[R]S?(E=M[P+k[R]],Z=D[L+k[R]]):(E=96,Z=0),g=1<>T)+v]=B<<24|E<<16|Z|0;while(0!==v);for(g=1<>=1;if(0!==g?(j&=g-1,j+=g):j=0,R++,0===--H[z]){if(z===C)break;z=t[i+k[R]]}if(z>O&&(j&x)!==p){for(0===T&&(T=O),y+=N,I=z-T,F=1<r||e===f&&U>s)return 1;p=j&x,w[p]=O<<24|I<<16|y-m|0}}return 0!==j&&(w[y+j]=z-T<<24|64<<16|0),_.bits=O,0}}};for(var i in t)t[i].folder=i.substring(0,i.lastIndexOf("/")+1);var n=function(e){var i=[];return e=e.split("/").every(function(e){return".."==e?i.pop():"."==e||""==e||i.push(e)})?i.join("/"):null,e?t[e]||t[e+".js"]||t[e+"/index.js"]:null},a=function(e,t){return e?n(e.folder+"node_modules/"+t)||a(e.parent,t):null},r=function(e,t){var i=t.match(/^\//)?null:e?t.match(/^\.\.?\//)?n(e.folder+t):a(e,t):n(t);if(!i)throw"module not found: "+t;return i.exports||(i.parent=e,i(r.bind(null,i),i,i.exports={})),i.exports};return r(null,e)}, + decompress: function (data) { + if (!this.exports) + this.exports = this.require("inflate.js"); + try { return this.exports.inflate(data) } catch (e) {}; + + }, + hasUnityMarker: function (data) { + var commentOffset = 10, expectedComment = "UnityWeb Compressed Content (gzip)"; + if (commentOffset > data.length || data[0] != 0x1F || data[1] != 0x8B) + return false; + var flags = data[3]; + if (flags & 0x04) { + if (commentOffset + 2 > data.length) + return false; + commentOffset += 2 + data[commentOffset] + (data[commentOffset + 1] << 8); + if (commentOffset > data.length) + return false; + } + if (flags & 0x08) { + while (commentOffset < data.length && data[commentOffset]) + commentOffset++; + if (commentOffset + 1 > data.length) + return false; + commentOffset++; + } + return (flags & 0x10) && String.fromCharCode.apply(null, data.subarray(commentOffset, commentOffset + expectedComment.length + 1)) == expectedComment + "\0"; + + }, + }, + brotli: { + require: function require(e){var n={"decompress.js":function(e,n,t){n.exports=e("./dec/decode").BrotliDecompressBuffer},"dec/bit_reader.js":function(e,n,t){function r(e){this.buf_=new Uint8Array(o),this.input_=e,this.reset()}const i=4096,o=8224,s=8191,a=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);r.READ_SIZE=i,r.IBUF_MASK=s,r.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},r.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,n=this.input_.read(this.buf_,e,i);if(n<0)throw new Error("Unexpected end of input");if(n=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&s]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},r.prototype.readBits=function(e){32-this.bit_pos_>>this.bit_pos_&a[e];return this.bit_pos_+=e,n},n.exports=r},"dec/context.js":function(e,n,t){t.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},"dec/decode.js":function(e,n,t){function r(e){var n;return 0===e.readBits(1)?16:(n=e.readBits(3),n>0?17+n:(n=e.readBits(3),n>0?8+n:17))}function i(e){if(e.readBits(1)){var n=e.readBits(3);return 0===n?1:e.readBits(n)+(1<1&&0===s)throw new Error("Invalid size byte");i.meta_block_length|=s<<8*r}}else for(r=0;r4&&0===a)throw new Error("Invalid size nibble");i.meta_block_length|=a<<4*r}return++i.meta_block_length,i.input_end||i.is_metadata||(i.is_uncompressed=e.readBits(1)),i}function a(e,n,t){var r;return t.fillBitWindow(),n+=t.val_>>>t.bit_pos_&K,r=e[n].bits-k,r>0&&(t.bit_pos_+=k,n+=e[n].value,n+=t.val_>>>t.bit_pos_&(1<0;){var u,p=0;if(r.readMoreInput(),r.fillBitWindow(),p+=r.val_>>>r.bit_pos_&31,r.bit_pos_+=w[p].bits,u=255&w[p].value,u>u);else{var c,h,l=u-14,b=0;if(u===M&&(b=o),a!==b&&(s=0,a=b),c=s,s>0&&(s-=2,s<<=l),s+=r.readBits(l)+3,h=s-c,i+h>n)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var v=0;v0;++a){var v,m=L[a],y=0;r.fillBitWindow(),y+=r.val_>>>r.bit_pos_&15,r.bit_pos_+=b[y].bits,v=b[y].value,c[m]=v,0!==v&&(h-=32>>v,++l)}if(1!==l&&0!==h)throw new Error("[ReadHuffmanCode] invalid num_codes or space");f(c,e,s,r)}if(o=q(n,t,k,s,e),0===o)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return o}function d(e,n,t){var r,i;return r=a(e,n,t),i=B.kBlockLengthPrefixCode[r].nbits,B.kBlockLengthPrefixCode[r].offset+t.readBits(i)}function u(e,n,t){var r;return e>>5]),this.htrees=new Uint32Array(n)}function l(e,n){var t,r,o,s={num_htrees:null,context_map:null},f=0;n.readMoreInput();var d=s.num_htrees=i(n)+1,u=s.context_map=new Uint8Array(e);if(d<=1)return s;for(t=n.readBits(1),t&&(f=n.readBits(4)+1),r=[],o=0;o=e)throw new Error("[DecodeContextMap] i >= context_map_size");u[o]=0,++o}else u[o]=p-f,++o}return n.readBits(1)&&c(u,e),s}function b(e,n,t,r,i,o,s){var f,w=2*t,d=t,u=a(n,t*X,s);f=0===u?i[w+(1&o[d])]:1===u?i[w+(o[d]-1&1)]+1:u-2,f>=e&&(f-=e),r[t]=f,i[w+(1&o[d])]=f,++o[d]}function v(e,n,t,r,i,o){var s,a=i+1,f=t&i,w=o.pos_&V.IBUF_MASK;if(n<8||o.bit_pos_+(n<<3)0;)o.readMoreInput(),r[f++]=o.readBits(8),f===a&&(e.write(r,a),f=0);else{if(o.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;o.bit_pos_<32;)r[f]=o.val_>>>o.bit_pos_,o.bit_pos_+=8,++f,--n;if(s=o.bit_end_pos_-o.bit_pos_>>3,w+s>V.IBUF_MASK){for(var d=V.IBUF_MASK+1-w,u=0;u=a){e.write(r,a),f-=a;for(var u=0;u=a;){if(s=a-f,o.input_.read(r,f,s)n.buffer.length){var We=new Uint8Array(E+te);We.set(n.buffer),n.buffer=We}if(q=ye.input_end,D=ye.is_uncompressed,ye.is_metadata)for(m(U);te>0;--te)U.readMoreInput(),U.readBits(8);else if(0!==te)if(D)U.bit_pos_=U.bit_pos_+7&-8,v(n,te,E,c,p,U),E+=te;else{for(t=0;t<3;++t)oe[t]=i(U)+1,oe[t]>=2&&(w(oe[t]+2,W,t*X,U),w(F,x,t*X,U),re[t]=d(x,t*X,U),ae[t]=1);for(U.readMoreInput(),j=U.readBits(2),Q=J+(U.readBits(4)<0;){var Ee,Ve,Oe,Ne,qe,Ye,Be,Re,He,Me,Ae;for(U.readMoreInput(),0===re[1]&&(b(oe[1],W,1,ie,se,ae,U),re[1]=d(x,X,U),ne=T[1].htrees[ie[1]]),--re[1],Ee=a(T[1].codes,ne,U),Ve=Ee>>6,Ve>=2?(Ve-=2,Be=-1):Be=0,Oe=B.kInsertRangeLut[Ve]+(Ee>>3&7),Ne=B.kCopyRangeLut[Ve]+(7&Ee),qe=B.kInsertLengthPrefixCode[Oe].offset+U.readBits(B.kInsertLengthPrefixCode[Oe].nbits),Ye=B.kCopyLengthPrefixCode[Ne].offset+U.readBits(B.kCopyLengthPrefixCode[Ne].nbits),G=c[E-1&p],L=c[E-2&p],Me=0;Me4?3:Ye-2),be=de[le+He],Be=a(T[2].codes,T[2].htrees[be],U),Be>=Q){var ge,Fe,Ze;Be-=Q,Fe=Be&C,Be>>=j,ge=(Be>>1)+1,Ze=(2+(1&Be)<M){if(!(Ye>=O.minDictionaryWordLength&&Ye<=O.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+E+" distance: "+Re+" len: "+Ye+" bytes left: "+te);var Ze=O.offsetsByLength[Ye],Pe=Re-M-1,ke=O.sizeBitsByLength[Ye],Ke=(1<>ke;if(Ze+=Xe*Ye,!(Ge=y){n.write(c,f);for(var Je=0;Je0&&(k[3&K]=Re,++K),Ye>te)throw new Error("Invalid backward reference. pos: "+E+" distance: "+Re+" len: "+Ye+" bytes left: "+te);for(Me=0;Me>=1;return(e&t-1)+t}function o(e,n,t,i,o){do i-=t,e[n+i]=new r(o.bits,o.value);while(i>0)}function s(e,n,t){for(var r=1<0;--U[u])d=new r(255&u,65535&W[p++]),o(e,n+c,h,m,d),c=i(c,u);for(b=y-1,l=-1,u=t+1,h=2;u<=a;++u,h<<=1)for(;U[u]>0;--U[u])(c&b)!==l&&(n+=m,v=s(U,u,t),m=1<>t),h,m,d),c=i(c,u);return y}},"dec/prefix.js":function(e,n,t){function r(e,n){this.offset=e,this.nbits=n}t.kBlockLengthPrefixCode=[new r(1,2),new r(5,2),new r(9,2),new r(13,2),new r(17,3),new r(25,3),new r(33,3),new r(41,3),new r(49,4),new r(65,4),new r(81,4),new r(97,4),new r(113,5),new r(145,5),new r(177,5),new r(209,5),new r(241,6),new r(305,6),new r(369,7),new r(497,8),new r(753,9),new r(1265,10),new r(2289,11),new r(4337,12),new r(8433,13),new r(16625,24)],t.kInsertLengthPrefixCode=[new r(0,0),new r(1,0),new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,1),new r(8,1),new r(10,2),new r(14,2),new r(18,3),new r(26,3),new r(34,4),new r(50,4),new r(66,5),new r(98,5),new r(130,6),new r(194,7),new r(322,8),new r(578,9),new r(1090,10),new r(2114,12),new r(6210,14),new r(22594,24)],t.kCopyLengthPrefixCode=[new r(2,0),new r(3,0),new r(4,0),new r(5,0),new r(6,0),new r(7,0),new r(8,0),new r(9,0),new r(10,1),new r(12,1),new r(14,2),new r(18,2),new r(22,3),new r(30,3),new r(38,4),new r(54,4),new r(70,5),new r(102,5),new r(134,6),new r(198,7),new r(326,8),new r(582,9),new r(1094,10),new r(2118,24)],t.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],t.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},"dec/streams.js":function(e,n,t){function r(e){this.buffer=e,this.pos=0}function i(e){this.buffer=e,this.pos=0}r.prototype.read=function(e,n,t){this.pos+t>this.buffer.length&&(t=this.buffer.length-this.pos);for(var r=0;rthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,n),this.pos),this.pos+=n,n},t.BrotliOutput=i},"dec/transform.js":function(e,n,t){function r(e,n,t){this.prefix=new Uint8Array(e.length),this.transform=n,this.suffix=new Uint8Array(t.length);for(var r=0;r=97&&e[n]<=122&&(e[n]^=32),1):e[n]<224?(e[n+1]^=32,2):(e[n+2]^=5,3)}var o=e("./dictionary");const s=0,a=1,f=2,w=3,d=4,u=5,p=6,c=7,h=8,l=9,b=10,v=11,m=12,y=13,W=14,x=15,U=16,E=17,V=18,O=20;var N=[new r("",s,""),new r("",s," "),new r(" ",s," "),new r("",m,""),new r("",b," "),new r("",s," the "),new r(" ",s,""),new r("s ",s," "),new r("",s," of "),new r("",b,""),new r("",s," and "),new r("",y,""),new r("",a,""),new r(", ",s," "),new r("",s,", "),new r(" ",b," "),new r("",s," in "),new r("",s," to "),new r("e ",s," "),new r("",s,'"'),new r("",s,"."),new r("",s,'">'),new r("",s,"\n"),new r("",w,""),new r("",s,"]"),new r("",s," for "),new r("",W,""),new r("",f,""),new r("",s," a "),new r("",s," that "),new r(" ",b,""),new r("",s,". "),new r(".",s,""),new r(" ",s,", "),new r("",x,""),new r("",s," with "),new r("",s,"'"),new r("",s," from "),new r("",s," by "),new r("",U,""),new r("",E,""),new r(" the ",s,""),new r("",d,""),new r("",s,". The "),new r("",v,""),new r("",s," on "),new r("",s," as "),new r("",s," is "),new r("",c,""),new r("",a,"ing "),new r("",s,"\n\t"),new r("",s,":"),new r(" ",s,". "),new r("",s,"ed "),new r("",O,""),new r("",V,""),new r("",p,""),new r("",s,"("),new r("",b,", "),new r("",h,""),new r("",s," at "),new r("",s,"ly "),new r(" the ",s," of "),new r("",u,""),new r("",l,""),new r(" ",b,", "),new r("",b,'"'),new r(".",s,"("),new r("",v," "),new r("",b,'">'),new r("",s,'="'),new r(" ",s,"."),new r(".com/",s,""),new r(" the ",s," of the "),new r("",b,"'"),new r("",s,". This "),new r("",s,","),new r(".",s," "),new r("",b,"("),new r("",b,"."),new r("",s," not "),new r(" ",s,'="'),new r("",s,"er "),new r(" ",v," "),new r("",s,"al "),new r(" ",v,""),new r("",s,"='"),new r("",v,'"'),new r("",b,". "),new r(" ",s,"("),new r("",s,"ful "),new r(" ",b,". "),new r("",s,"ive "),new r("",s,"less "),new r("",v,"'"),new r("",s,"est "),new r(" ",b,"."),new r("",v,'">'),new r(" ",s,"='"),new r("",b,","),new r("",s,"ize "),new r("",v,"."),new r("\xc2\xa0",s,""),new r(" ",s,","),new r("",b,'="'),new r("",v,'="'),new r("",s,"ous "),new r("",v,", "),new r("",b,"='"),new r(" ",b,","),new r(" ",v,'="'),new r(" ",v,", "),new r("",v,","),new r("",v,"("),new r("",v,". "),new r(" ",v,"."),new r("",v,"='"),new r(" ",v,". "),new r(" ",b,'="'),new r(" ",v,"='"),new r(" ",b,"='")];t.kTransforms=N,t.kNumTransforms=N.length,t.transformDictionaryWord=function(e,n,t,r,s){var a,f=N[s].prefix,w=N[s].suffix,d=N[s].transform,u=dr&&(u=r);for(var h=0;h0;){var y=i(e,a);a+=y,r-=y}for(var W=0;W0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[n-2]?2:"="===e[n-1]?1:0}function i(e){return 3*e.length/4-r(e)}function o(e){var n,t,i,o,s,a,f=e.length;s=r(e),a=new u(3*f/4-s),i=s>0?f-4:f;var w=0;for(n=0,t=0;n>16&255,a[w++]=o>>8&255,a[w++]=255&o;return 2===s?(o=d[e.charCodeAt(n)]<<2|d[e.charCodeAt(n+1)]>>4,a[w++]=255&o):1===s&&(o=d[e.charCodeAt(n)]<<10|d[e.charCodeAt(n+1)]<<4|d[e.charCodeAt(n+2)]>>2,a[w++]=o>>8&255,a[w++]=255&o),a}function s(e){return w[e>>18&63]+w[e>>12&63]+w[e>>6&63]+w[63&e]}function a(e,n,t){for(var r,i=[],o=n;od?d:f+s));return 1===r?(n=e[t-1],i+=w[n>>2],i+=w[n<<4&63],i+="=="):2===r&&(n=(e[t-2]<<8)+e[t-1],i+=w[n>>10],i+=w[n>>4&63],i+=w[n<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=i,t.toByteArray=o,t.fromByteArray=f;for(var w=[],d=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,h=p.length;c> 3); + commentOffset = (WBITS_length + 1 + 2 + 1 + 2 + (MSKIPBYTES << 3) + 7) >> 3; + if (WBITS == 0x11 || commentOffset > data.length) + return false; + var expectedCommentPrefix = WBITS + (((3 << 1) + (MSKIPBYTES << 4) + ((expectedComment.length - 1) << 6)) << WBITS_length); + for (var i = 0; i < commentOffset; i++, expectedCommentPrefix >>>= 8) { + if (data[i] != (expectedCommentPrefix & 0xFF)) + return false; + } + return String.fromCharCode.apply(null, data.subarray(commentOffset, commentOffset + expectedComment.length)) == expectedComment; + + }, + }, + decompress: function (compressed, callback) { + var decompressor = this.gzip.hasUnityMarker(compressed) ? this.gzip : this.brotli.hasUnityMarker(compressed) ? this.brotli : this.identity; + if (this.serverSetupWarningEnabled && decompressor != this.identity) { + console.log("You can reduce your startup time if you configure your web server to host .unityweb files using " + (decompressor == this.gzip ? "gzip" : "brotli") + " compression."); + this.serverSetupWarningEnabled = false; + } + if (typeof callback != "function") + return decompressor.decompress(compressed); + if (!decompressor.worker) { + var workerUrl = URL.createObjectURL(new Blob(["this.require = ", decompressor.require.toString(), "; this.decompress = ", decompressor.decompress.toString(), "; this.onmessage = ", function (e) { + var data = { id: e.data.id, decompressed: this.decompress(e.data.compressed) }; + postMessage(data, data.decompressed ? [data.decompressed.buffer] : []); + }.toString(), "; postMessage({ ready: true });"], { type: "text/javascript" })); + decompressor.worker = new Worker(workerUrl); + decompressor.worker.onmessage = function (e) { + if (e.data.ready) { + URL.revokeObjectURL(workerUrl); + return; + } + this.callbacks[e.data.id](e.data.decompressed); + delete this.callbacks[e.data.id]; + }; + decompressor.worker.callbacks = {}; + decompressor.worker.nextCallbackId = 0; + } + var id = decompressor.worker.nextCallbackId++; + decompressor.worker.callbacks[id] = callback; + decompressor.worker.postMessage({id: id, compressed: compressed}, [compressed.buffer]); + }, + serverSetupWarningEnabled: true, + }, + Cryptography: { + crc32: function (code) { + var module = UnityLoader.Cryptography.crc32.module; + if (!module) { + var buffer = new ArrayBuffer(0x1000000); + var asm = (function (global, env, buffer) { + "use asm" + var HEAPU8 = new global.Uint8Array(buffer); + var HEAPU32 = new global.Uint32Array(buffer); + function process(data, length) { + data = data | 0; + length = length | 0; + var crc = 0; + for (crc = HEAPU32[0x400 >> 2] | 0; length; data = (data + 1) | 0, length = (length - 1) | 0) + crc = HEAPU32[(((crc & 0xFF) ^ HEAPU8[data]) << 2) >> 2] ^ (crc >>> 8) ^ 0xFF000000; + HEAPU32[0x400 >> 2] = crc; + } + return {process: process}; + })({Uint8Array: Uint8Array, Uint32Array: Uint32Array}, null, buffer); + + module = UnityLoader.Cryptography.crc32.module = { + buffer: buffer, + HEAPU8: new Uint8Array(buffer), + HEAPU32: new Uint32Array(buffer), + process: asm.process, + crc32: 0x400, + data: 0x404, + }; + for (var i = 0; i < 0x100; i++) { + var a = i ^ 0xFF; + for (var j = 0; j < 8; j++) + a = (a >>> 1) ^ ((a & 1) ? 0xEDB88320 : 0); + module.HEAPU32[i] = a; + } + } + + module.HEAPU32[module.crc32 >> 2] = 0; + for (var offset = 0; offset < code.length;) { + var length = Math.min(module.HEAPU8.length - module.data, code.length - offset); + module.HEAPU8.set(code.subarray(offset, offset + length), module.data); + crc = module.process(module.data, length); + offset += length; + } + var crc32 = module.HEAPU32[module.crc32 >> 2]; + return new Uint8Array([crc32 >> 24, crc32 >> 16, crc32 >> 8, crc32]); + + }, + md5: function (code) { + var module = UnityLoader.Cryptography.md5.module; + if (!module) { + var buffer = new ArrayBuffer(0x1000000); + var asm = (function (global, env, buffer) { + "use asm" + var HEAPU32 = new global.Uint32Array(buffer); + function process(data, blockCount) { + data = data | 0; + blockCount = blockCount | 0; + var h0 = 0, h1 = 0, h2 = 0, h3 = 0, d0 = 0, d1 = 0, d2 = 0, d3 = 0, d4 = 0, i = 0, t = 0, s = 0; + h0 = HEAPU32[0x80] | 0, h1 = HEAPU32[0x81] | 0, h2 = HEAPU32[0x82] | 0, h3 = HEAPU32[0x83] | 0; + for (; blockCount; data = (data + 64) | 0, blockCount = (blockCount - 1) | 0) { + d0 = h0; d1 = h1; d2 = h2; d3 = h3; + for (i = 0; (i | 0) < 512; i = (i + 8) | 0) { + s = (HEAPU32[i >> 2] | 0); + h0 = (h0 + (HEAPU32[(i + 4) >> 2] | 0) + (HEAPU32[(data + (s >>> 14)) >> 2] | 0) + ( + (i | 0) < 128 ? h3 ^ (h1 & (h2 ^ h3)) : + (i | 0) < 256 ? h2 ^ (h3 & (h1 ^ h2)) : + (i | 0) < 384 ? h1 ^ h2 ^ h3: + (h2 ^ (h1 | ~h3)) + )) | 0; + t = (((h0 << (s & 31)) | (h0 >>> (32 - (s & 31)))) + h1) | 0; h0 = h3; h3 = h2; h2 = h1; h1 = t; + } + h0 = (h0 + d0) | 0; h1 = (h1 + d1) | 0; h2 = (h2 + d2) | 0; h3 = (h3 + d3) | 0; + } + HEAPU32[0x80] = h0; HEAPU32[0x81] = h1; HEAPU32[0x82] = h2; HEAPU32[0x83] = h3; + } + return {process: process}; + })({Uint32Array:Uint32Array}, null, buffer); + + module = UnityLoader.Cryptography.md5.module = { + buffer: buffer, + HEAPU8: new Uint8Array(buffer), + HEAPU32: new Uint32Array(buffer), + process: asm.process, + md5: 0x200, + data: 0x240, + }; + + module.HEAPU32.set(new Uint32Array([ + 0x00000007, 0xD76AA478, 0x0001000C, 0xE8C7B756, 0x00020011, 0x242070DB, 0x00030016, 0xC1BDCEEE, + 0x00040007, 0xF57C0FAF, 0x0005000C, 0x4787C62A, 0x00060011, 0xA8304613, 0x00070016, 0xFD469501, + 0x00080007, 0x698098D8, 0x0009000C, 0x8B44F7AF, 0x000A0011, 0xFFFF5BB1, 0x000B0016, 0x895CD7BE, + 0x000C0007, 0x6B901122, 0x000D000C, 0xFD987193, 0x000E0011, 0xA679438E, 0x000F0016, 0x49B40821, + 0x00010005, 0xF61E2562, 0x00060009, 0xC040B340, 0x000B000E, 0x265E5A51, 0x00000014, 0xE9B6C7AA, + 0x00050005, 0xD62F105D, 0x000A0009, 0x02441453, 0x000F000E, 0xD8A1E681, 0x00040014, 0xE7D3FBC8, + 0x00090005, 0x21E1CDE6, 0x000E0009, 0xC33707D6, 0x0003000E, 0xF4D50D87, 0x00080014, 0x455A14ED, + 0x000D0005, 0xA9E3E905, 0x00020009, 0xFCEFA3F8, 0x0007000E, 0x676F02D9, 0x000C0014, 0x8D2A4C8A, + 0x00050004, 0xFFFA3942, 0x0008000B, 0x8771F681, 0x000B0010, 0x6D9D6122, 0x000E0017, 0xFDE5380C, + 0x00010004, 0xA4BEEA44, 0x0004000B, 0x4BDECFA9, 0x00070010, 0xF6BB4B60, 0x000A0017, 0xBEBFBC70, + 0x000D0004, 0x289B7EC6, 0x0000000B, 0xEAA127FA, 0x00030010, 0xD4EF3085, 0x00060017, 0x04881D05, + 0x00090004, 0xD9D4D039, 0x000C000B, 0xE6DB99E5, 0x000F0010, 0x1FA27CF8, 0x00020017, 0xC4AC5665, + 0x00000006, 0xF4292244, 0x0007000A, 0x432AFF97, 0x000E000F, 0xAB9423A7, 0x00050015, 0xFC93A039, + 0x000C0006, 0x655B59C3, 0x0003000A, 0x8F0CCC92, 0x000A000F, 0xFFEFF47D, 0x00010015, 0x85845DD1, + 0x00080006, 0x6FA87E4F, 0x000F000A, 0xFE2CE6E0, 0x0006000F, 0xA3014314, 0x000D0015, 0x4E0811A1, + 0x00040006, 0xF7537E82, 0x000B000A, 0xBD3AF235, 0x0002000F, 0x2AD7D2BB, 0x00090015, 0xEB86D391, + ])); + } + + module.HEAPU32.set(new Uint32Array([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476]), module.md5 >> 2); + for (var offset = 0; offset < code.length;) { + var length = Math.min(module.HEAPU8.length - module.data, code.length - offset) & ~63; + module.HEAPU8.set(code.subarray(offset, offset + length), module.data); + offset += length; + module.process(module.data, length >> 6); + if (code.length - offset < 64) { + length = code.length - offset; + module.HEAPU8.set(code.subarray(code.length - length, code.length), module.data); + offset += length; + module.HEAPU8[module.data + length++] = 0x80; + if (length > 56) { + for (var i = length; i < 64; i++) + module.HEAPU8[module.data + i] = 0; + module.process(module.data, 1); + length = 0; + } + for (var i = length; i < 64; i++) + module.HEAPU8[module.data + i] = 0; + for (var value = code.length, add = 0, i = 56; i < 64; i++, add = (value & 0xE0) >> 5, value /= 0x100) + module.HEAPU8[module.data + i] = ((value & 0x1F) << 3) + add; + module.process(module.data, 1); + } + } + return new Uint8Array(module.HEAPU8.subarray(module.md5, module.md5 + 16)); + + }, + sha1: function (code) { + var module = UnityLoader.Cryptography.sha1.module; + if (!module) { + var buffer = new ArrayBuffer(0x1000000); + var asm = (function (global, env, buffer) { + "use asm" + var HEAPU32 = new global.Uint32Array(buffer); + function process(data, blockCount) { + data = data | 0; + blockCount = blockCount | 0; + var h0 = 0, h1 = 0, h2 = 0, h3 = 0, h4 = 0, d0 = 0, d1 = 0, d2 = 0, d3 = 0, d4 = 0, t = 0, i = 0; + h0 = HEAPU32[80] | 0, h1 = HEAPU32[81] | 0, h2 = HEAPU32[82] | 0, h3 = HEAPU32[83] | 0, h4 = HEAPU32[84] | 0; + for (; blockCount; data = (data + 64) | 0, blockCount = (blockCount - 1) | 0) { + d0 = h0; d1 = h1; d2 = h2; d3 = h3; d4 = h4; + for (i = 0; (i | 0) < 320; i = (i + 4) | 0, h4 = h3, h3 = h2, h2 = (h1 << 30) | (h1 >>> 2), h1 = h0, h0 = t) { + if ((i | 0) < 64) { + t = (HEAPU32[(data + i) >> 2] | 0); + t = ((t << 24) & 0xFF000000) | ((t << 8) & 0xFF0000) | ((t >>> 8) & 0xFF00) | ((t >>> 24) & 0xFF); + } else { + t = HEAPU32[(i - 12) >> 2] ^ HEAPU32[(i - 32) >> 2] ^ HEAPU32[(i - 56) >> 2] ^ HEAPU32[(i - 64) >> 2]; + t = (t << 1) | (t >>> 31); + } + HEAPU32[i >> 2] = t; + t = (t + (((h0 << 5) | (h0 >>> 27)) + h4) + ( + (i | 0) < 80 ? ((((h1 & h2) | (~h1 & h3)) | 0) + 0x5A827999) | 0 : + (i | 0) < 160 ? ((h1 ^ h2 ^ h3) + 0x6ED9EBA1) | 0 : + (i | 0) < 240 ? (((h1 & h2) | (h1 & h3) | (h2 & h3)) + 0x8F1BBCDC) | 0 : + ((h1 ^ h2 ^ h3) + 0xCA62C1D6) | 0 + )) | 0; + } + h0 = (h0 + d0) | 0; h1 = (h1 + d1) | 0; h2 = (h2 + d2) | 0; h3 = (h3 + d3) | 0; h4 = (h4 + d4) | 0; + } + HEAPU32[80] = h0; HEAPU32[81] = h1; HEAPU32[82] = h2; HEAPU32[83] = h3; HEAPU32[84] = h4; + } + return {process: process}; + })({Uint32Array:Uint32Array}, null, buffer); + + module = UnityLoader.Cryptography.sha1.module = { + buffer: buffer, + HEAPU8: new Uint8Array(buffer), + HEAPU32: new Uint32Array(buffer), + process: asm.process, + sha1: 0x140, + data: 0x180, + }; + } + + module.HEAPU32.set(new Uint32Array([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]), module.sha1 >> 2); + for (var offset = 0; offset < code.length;) { + var length = Math.min(module.HEAPU8.length - module.data, code.length - offset) & ~63; + module.HEAPU8.set(code.subarray(offset, offset + length), module.data); + offset += length; + module.process(module.data, length >> 6); + if (code.length - offset < 64) { + length = code.length - offset; + module.HEAPU8.set(code.subarray(code.length - length, code.length), module.data); + offset += length; + module.HEAPU8[module.data + length++] = 0x80; + if (length > 56) { + for (var i = length; i < 64; i++) + module.HEAPU8[module.data + i] = 0; + module.process(module.data, 1); + length = 0; + } + for (var i = length; i < 64; i++) + module.HEAPU8[module.data + i] = 0; + for (var value = code.length, add = 0, i = 63; i >=56; i--, add = (value & 0xE0) >> 5, value /= 0x100) + module.HEAPU8[module.data + i] = ((value & 0x1F) << 3) + add; + module.process(module.data, 1); + } + } + var sha1 = new Uint8Array(20); + for (var i = 0; i < sha1.length; i++) + sha1[i] = module.HEAPU8[module.sha1 + (i & ~3) + 3 - (i & 3)]; + return sha1; + + }, + + }, + Error: { + // stacktrace example: + // + // [Chrome] + // Error + // at Array.eWg (blob:http%3A//localhost%3A8080/7dd54af3-48c5-47e1-893f-5f1ef09ab62b:10:238896) + // at Object.P7h [as dynCall_iiii] (blob:http%3A//localhost%3A8080/7dd54af3-48c5-47e1-893f-5f1ef09ab62b:28:33689) + // at invoke_iiii (blob:http%3A//localhost%3A8080/972f149f-a28e-4ee9-a1c7-45e8c4b0998b:1:334638) + // at DJd (blob:http%3A//localhost%3A8080/7dd54af3-48c5-47e1-893f-5f1ef09ab62b:15:260807) + // at Object.dynCall (blob:http%3A//localhost%3A8080/972f149f-a28e-4ee9-a1c7-45e8c4b0998b:1:7492) + // at browserIterationFunc (blob:http%3A//localhost%3A8080/972f149f-a28e-4ee9-a1c7-45e8c4b0998b:1:207518) + // at Object.runIter (blob:http%3A//localhost%3A8080/972f149f-a28e-4ee9-a1c7-45e8c4b0998b:1:189915) + // + // [Chrome WebAssembly] + // at ([24622]+70) + // at ([24000]+73) + // + // [Firefox] + // eWg@blob:http://localhost:8080/0e677969-e11c-e24b-bb23-4f3afdbd5a3a:10:1 + // P7h@blob:http://localhost:8080/0e677969-e11c-e24b-bb23-4f3afdbd5a3a:28:1 + // invoke_iiii@blob:http://localhost:8080/67513e21-4cf2-de4e-a571-c6ee67cc2a72:1:334616 + // DJd@blob:http://localhost:8080/0e677969-e11c-e24b-bb23-4f3afdbd5a3a:15:1 + // Runtime.dynCall@blob:http://localhost:8080/67513e21-4cf2-de4e-a571-c6ee67cc2a72:1:7469 + // _emscripten_set_main_loop/browserIterationFunc@blob:http://localhost:8080/67513e21-4cf2-de4e-a571-c6ee67cc2a72:1:207510 + // Browser.mainLoop.runIter@blob:http://localhost:8080/67513e21-4cf2-de4e-a571-c6ee67cc2a72:1:189915 + // + // [Firefox WebAssembly] + // wasm-function[24622]@blob:null/2e0a79af-37a7-ac43-9534-4ac66e23fea4:8059611:1 + // wasm-function[24000]@blob:null/2e0a79af-37a7-ac43-9534-4ac66e23fea4:7932153:1 + // + // [Safari] + // eWg@blob:http://localhost:8080/6efe7f5a-b930-45c3-9175-296366f9d9f4:10:238896 + // P7h@blob:http://localhost:8080/6efe7f5a-b930-45c3-9175-296366f9d9f4:28:33689 + // invoke_iiii@blob:http://localhost:8080/597cffca-fc52-4586-9da7-f9c8e591738b:1:334638 + // DJd@blob:http://localhost:8080/6efe7f5a-b930-45c3-9175-296366f9d9f4:15:260809 + // dynCall@blob:http://localhost:8080/597cffca-fc52-4586-9da7-f9c8e591738b:1:7496 + // browserIterationFunc@blob:http://localhost:8080/597cffca-fc52-4586-9da7-f9c8e591738b:1:207525 + // runIter@blob:http://localhost:8080/597cffca-fc52-4586-9da7-f9c8e591738b:1:189919 + + init: (function () { + Error.stackTraceLimit = 50; + window.addEventListener("error", function (e) { + var Module = UnityLoader.Error.getModule(e); + if (!Module) + return UnityLoader.Error.handler(e); + var debugSymbolsUrl = Module.useWasm ? Module.wasmSymbolsUrl : Module.asmSymbolsUrl; + if (!debugSymbolsUrl) + return UnityLoader.Error.handler(e, Module); + var xhr = new XMLHttpRequest(); + xhr.open("GET", Module.resolveBuildUrl(debugSymbolsUrl)); + xhr.responseType = "arraybuffer"; + xhr.onload = function () { + UnityLoader.loadCode(UnityLoader.Compression.decompress(new Uint8Array(xhr.response)), function (id) { + Module.demangleSymbol = UnityLoader[id](); + UnityLoader.Error.handler(e, Module); + }); + }; + xhr.send(); + }); + return true; + })(), + stackTraceFormat: navigator.userAgent.indexOf("Chrome") != -1 ? "(\\s+at\\s+)(([\\w\\d_\\.]*?)([\\w\\d_$]+)(/[\\w\\d_\\./]+|))(\\s+\\[.*\\]|)\\s*\\((blob:.*)\\)" : + "(\\s*)(([\\w\\d_\\.]*?)([\\w\\d_$]+)(/[\\w\\d_\\./]+|))(\\s+\\[.*\\]|)\\s*@(blob:.*)", + stackTraceFormatWasm: navigator.userAgent.indexOf("Chrome") != -1 ? "((\\s+at\\s*)\\s\\(\\[(\\d+)\\]\\+\\d+\\))()" : + "((\\s*)wasm-function\\[(\\d+)\\])@(blob:.*)", + blobParseRegExp: new RegExp("^(blob:.*)(:\\d+:\\d+)$"), + getModule: function (e) { + var traceMatch = e.message.match(new RegExp(this.stackTraceFormat, "g")); + for (var trace in traceMatch) { + var traceParse = traceMatch[trace].match(new RegExp("^" + this.stackTraceFormat + "$")); + var blobParse = traceParse[7].match(this.blobParseRegExp); + if (blobParse && UnityLoader.Blobs[blobParse[1]] && UnityLoader.Blobs[blobParse[1]].Module) + return UnityLoader.Blobs[blobParse[1]].Module; + } + }, + demangle: function (e, Module) { + var message = e.message; + if (!Module) + return message; + message = message.replace(new RegExp(this.stackTraceFormat, "g"), function (trace) { + var errParse = trace.match(new RegExp("^" + this.stackTraceFormat + "$")); + var blobParse = errParse[7].match(this.blobParseRegExp); + var functionName = Module.demangleSymbol ? Module.demangleSymbol(errParse[4]) : errParse[4]; + var url = blobParse && UnityLoader.Blobs[blobParse[1]] && UnityLoader.Blobs[blobParse[1]].url ? UnityLoader.Blobs[blobParse[1]].url : "blob"; + return errParse[1] + functionName + (errParse[2] != functionName ? " ["+ errParse[2] + "]" : "") + + " (" + (blobParse ? url.substr(url.lastIndexOf("/") + 1) + blobParse[2] : errParse[7]) + ")"; + }.bind(this)); + if (Module.useWasm) { + message = message.replace(new RegExp(this.stackTraceFormatWasm, "g"), function (trace) { + var errParse = trace.match(new RegExp("^" + this.stackTraceFormatWasm + "$")); + var functionName = Module.demangleSymbol ? Module.demangleSymbol(errParse[3]) : errParse[3]; + var blobParse = errParse[4].match(this.blobParseRegExp); + var url = blobParse && UnityLoader.Blobs[blobParse[1]] && UnityLoader.Blobs[blobParse[1]].url ? UnityLoader.Blobs[blobParse[1]].url : "blob"; + return (functionName == errParse[3] ? errParse[1] : errParse[2] + functionName + " [wasm:"+ errParse[3] + "]") + + (errParse[4] ? " (" + (blobParse ? url.substr(url.lastIndexOf("/") + 1) + blobParse[2] : errParse[4]) + ")" : ""); + }.bind(this)); + } + return message; + }, + handler: function (e, Module) { + var message = Module ? this.demangle(e, Module) : e.message; + if (Module && Module.errorhandler && Module.errorhandler(message, e.filename, e.lineno)) + return; + console.log("Invoking error handler due to\n" + message); + if (typeof dump == "function") + dump("Invoking error handler due to\n" + message); + // Firefox has a bug where it's IndexedDB implementation will throw UnknownErrors, which are harmless, and should not be shown. + if (message.indexOf("UnknownError") != -1) + return; + // Ignore error when application terminated with return code 0 + if (message.indexOf("Program terminated with exit(0)") != -1) + return; + if (this.didShowErrorMessage) + return; + var message = "An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:\n" + message; + if (message.indexOf("DISABLE_EXCEPTION_CATCHING") != -1) { + message = "An exception has occurred, but exception handling has been disabled in this build. If you are the developer of this content, enable exceptions in your project WebGL player settings to be able to catch the exception or see the stack trace."; + } else if (message.indexOf("Cannot enlarge memory arrays") != -1) { + message = "Out of memory. If you are the developer of this content, try allocating more memory to your WebGL build in the WebGL player settings."; + } else if (message.indexOf("Invalid array buffer length") != -1 || message.indexOf("Invalid typed array length") != -1 || message.indexOf("out of memory") != -1 || message.indexOf("could not allocate memory") != -1) { + message = "The browser could not allocate enough memory for the WebGL content. If you are the developer of this content, try allocating less memory to your WebGL build in the WebGL player settings."; + } + alert(message); + this.didShowErrorMessage = true; + + }, + popup: function (gameInstance, message, callbacks) { + callbacks = callbacks || [{text: "OK"}]; + var popup = document.createElement("div"); + popup.style.cssText = "position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); text-align: center; border: 1px solid black; padding: 5px; background: #E8E8E8"; + var messageElement = document.createElement("span"); + messageElement.textContent = message; + popup.appendChild(messageElement); + popup.appendChild(document.createElement("br")); + for (var i = 0; i < callbacks.length; i++) { + var button = document.createElement("button"); + if (callbacks[i].text) + button.textContent = callbacks[i].text; + if (callbacks[i].callback) + button.onclick = callbacks[i].callback; + button.style.margin = "5px"; + button.addEventListener("click", function () { gameInstance.container.removeChild(popup); }) + popup.appendChild(button); + } + gameInstance.container.appendChild(popup); + + }, + + }, + Job: { + schedule: function (Module, id, dependencies, callback, parameters) { + parameters = parameters || {}; + var job = Module.Jobs[id]; + if (!job) + job = Module.Jobs[id] = {dependencies: {}, dependants: {}}; + if (job.callback) + throw "[UnityLoader.Job.schedule] job '" + id + "' has been already scheduled"; + if (typeof callback != "function") + throw "[UnityLoader.Job.schedule] job '" + id + "' has invalid callback"; + if (typeof parameters != "object") + throw "[UnityLoader.Job.schedule] job '" + id + "' has invalid parameters"; + job.callback = function (x,y) { job.starttime = performance.now(); callback(x,y) }; + job.parameters = parameters; + job.complete = function (result) { + job.endtime = performance.now(); + job.result = {value: result}; + for (var dependant in job.dependants) { + var dependantJob = Module.Jobs[dependant]; + dependantJob.dependencies[id] = job.dependants[dependant] = false; + var pending = typeof dependantJob.callback != "function"; + for (var dependency in dependantJob.dependencies) + pending = pending || dependantJob.dependencies[dependency]; + if (!pending) { + if (dependantJob.executed) + throw "[UnityLoader.Job.schedule] job '" + id + "' has already been executed"; + dependantJob.executed = true; + setTimeout(dependantJob.callback.bind(null, Module, dependantJob), 0); + } + } + } + var pending = false; + dependencies.forEach(function (dependency) { + var dependencyJob = Module.Jobs[dependency]; + if (!dependencyJob) + dependencyJob = Module.Jobs[dependency] = {dependencies: {}, dependants: {}}; + if (job.dependencies[dependency] = dependencyJob.dependants[id] = !dependencyJob.result) + pending = true; + }); + if (!pending) { + job.executed = true; + setTimeout(job.callback.bind(null, Module, job), 0); + } + + }, + result: function (Module, id) { + var job = Module.Jobs[id]; + if (!job) + throw "[UnityLoader.Job.result] job '" + id + "' does not exist"; + if (typeof job.result != "object") + throw "[UnityLoader.Job.result] job '" + id + "' has invalid result"; + return job.result.value; + + }, + + }, + Progress: { + Styles: { + Dark: { + progressLogoUrl: "data:image/png;base64,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", + progressEmptyUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAAASCAYAAABmbl0zAAAACXBIWXMAAAsSAAALEgHS3X78AAAATUlEQVRo3u3aIQ4AIAwEQUr4/5cPiyMVBDOj0M2mCKgkGdAwjYCudZzLOLiITYPrCdEgGkSDaEA0iAbRIBpEA6JBNHx1vnL7V4NNwxsbCNMGI3YImu0AAAAASUVORK5CYII=", + progressFullUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAAASCAYAAABmbl0zAAAACXBIWXMAAAsSAAALEgHS3X78AAAAO0lEQVRo3u3SQREAAAjDMMC/56EB3omEXjtJCg5GAkyDaTANpsE0YBpMg2kwDaYB02AaTINpMA2Yhr8FO18EIBpZMeQAAAAASUVORK5CYII=", + }, + Light: { + progressLogoUrl: "data:image/png;base64,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", + progressEmptyUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAAASCAYAAABmbl0zAAAACXBIWXMAAAsSAAALEgHS3X78AAAAUUlEQVRo3u3aMQ4AEAxAUcRJzGb3v1mt3cQglvcmc/NTA3XMFQUuNCPgVk/nahwchE2D6wnRIBpEg2hANIgG0SAaRAOiQTR8lV+5/avBpuGNDcz6A6oq1CgNAAAAAElFTkSuQmCC", + progressFullUrl: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAAASCAYAAABmbl0zAAAACXBIWXMAAAsSAAALEgHS3X78AAAAQElEQVRo3u3SMREAMAgAsVIpnTvj3xlogDmR8PfxftaBgSsBpsE0mAbTYBowDabBNJgG04BpMA2mwTSYBkzDXgP/hgGnr4PpeAAAAABJRU5ErkJggg==", + }, + }, + handler: function (gameInstance, progress) { + if (!gameInstance.Module) + return; + var style = UnityLoader.Progress.Styles[gameInstance.Module.splashScreenStyle]; + var progressLogoUrl = gameInstance.Module.progressLogoUrl ? gameInstance.Module.resolveBuildUrl(gameInstance.Module.progressLogoUrl) : style.progressLogoUrl; + var progressEmptyUrl = gameInstance.Module.progressEmptyUrl ? gameInstance.Module.resolveBuildUrl(gameInstance.Module.progressEmptyUrl) : style.progressEmptyUrl; + var progressFullUrl = gameInstance.Module.progressFullUrl ? gameInstance.Module.resolveBuildUrl(gameInstance.Module.progressFullUrl) : style.progressFullUrl; + var commonStyle = "position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);"; + if (!gameInstance.logo) { + gameInstance.logo = document.createElement("div"); + gameInstance.logo.style.cssText = commonStyle + "background: url('" + progressLogoUrl + "') no-repeat center / contain; width: 154px; height: 130px;"; + gameInstance.container.appendChild(gameInstance.logo); + } + if (!gameInstance.progress) { + gameInstance.progress = document.createElement("div"); + gameInstance.progress.style.cssText = commonStyle + " height: 18px; width: 141px; margin-top: 90px;"; + gameInstance.progress.empty = document.createElement("div"); + gameInstance.progress.empty.style.cssText = "background: url('" + progressEmptyUrl + "') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;"; + gameInstance.progress.appendChild(gameInstance.progress.empty); + gameInstance.progress.full = document.createElement("div"); + gameInstance.progress.full.style.cssText = "background: url('" + progressFullUrl + "') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;"; + gameInstance.progress.appendChild(gameInstance.progress.full); + gameInstance.container.appendChild(gameInstance.progress); + } + gameInstance.progress.full.style.width = (100 * progress) + "%"; + gameInstance.progress.empty.style.width = (100 * (1 - progress)) + "%"; + if (progress == 1) + gameInstance.logo.style.display = gameInstance.progress.style.display = "none"; + + }, + update: function (Module, id, e) { + var progress = Module.buildDownloadProgress[id]; + if (!progress) + progress = Module.buildDownloadProgress[id] = { + started: false, + finished: false, + lengthComputable: false, + total: 0, + loaded: 0, + }; + if (typeof e == "object" && (e.type == "progress" || e.type == "load")) { + if (!progress.started) { + progress.started = true; + progress.lengthComputable = e.lengthComputable; + progress.total = e.total; + } + progress.loaded = e.loaded; + if (e.type == "load") + progress.finished = true; + } + var loaded = 0, total = 0, started = 0, computable = 0, unfinishedNonComputable = 0; + for (var id in Module.buildDownloadProgress) { + var progress = Module.buildDownloadProgress[id]; + if (!progress.started) + return 0; + started++; + if (progress.lengthComputable) { + loaded += progress.loaded; + total += progress.total; + computable++; + } else if (!progress.finished) { + unfinishedNonComputable++; + } + } + var totalProgress = started ? (started - unfinishedNonComputable - (total ? computable * (total - loaded) / total : 0)) / started : 0; + Module.gameInstance.onProgress(Module.gameInstance, 0.9 * totalProgress); + + }, + + }, + // The Unity WebGL generated content depends on SystemInfo, therefore it should not be changed. If any modification is necessary, do it at your own risk. + SystemInfo: (function() { + var unknown = "-"; + var nVer = navigator.appVersion; + var nAgt = navigator.userAgent; + var browser = navigator.appName; + var version = navigator.appVersion; + var majorVersion = parseInt(navigator.appVersion, 10); + var nameOffset, verOffset, ix; + if ((verOffset = nAgt.indexOf("Opera")) != -1) { + browser = "Opera"; + version = nAgt.substring(verOffset + 6); + if ((verOffset = nAgt.indexOf("Version")) != -1) { + version = nAgt.substring(verOffset + 8); + } + } else if ((verOffset = nAgt.indexOf("MSIE")) != -1) { + browser = "Microsoft Internet Explorer"; + version = nAgt.substring(verOffset + 5); + } else if ((verOffset = nAgt.indexOf("Edge")) != -1) { + browser = "Edge"; + version = nAgt.substring(verOffset + 5); + } else if ((verOffset = nAgt.indexOf("Chrome")) != -1) { + browser = "Chrome"; + version = nAgt.substring(verOffset + 7); + } else if ((verOffset = nAgt.indexOf("Safari")) != -1) { + browser = "Safari"; + version = nAgt.substring(verOffset + 7); + if ((verOffset = nAgt.indexOf("Version")) != -1) { + version = nAgt.substring(verOffset + 8); + } + } else if ((verOffset = nAgt.indexOf("Firefox")) != -1) { + browser = "Firefox"; + version = nAgt.substring(verOffset + 8); + } else if (nAgt.indexOf("Trident/") != -1) { + browser = "Microsoft Internet Explorer"; + version = nAgt.substring(nAgt.indexOf("rv:") + 3); + } else if ((nameOffset = nAgt.lastIndexOf(" ") + 1) < (verOffset = nAgt.lastIndexOf("/"))) { + browser = nAgt.substring(nameOffset, verOffset); + version = nAgt.substring(verOffset + 1); + if (browser.toLowerCase() == browser.toUpperCase()) { + browser = navigator.appName; + } + } + if ((ix = version.indexOf(";")) != -1) + version = version.substring(0, ix); + if ((ix = version.indexOf(" ")) != -1) + version = version.substring(0, ix); + if ((ix = version.indexOf(")")) != -1) + version = version.substring(0, ix); + majorVersion = parseInt("" + version, 10); + if (isNaN(majorVersion)) { + version = "" + parseFloat(navigator.appVersion); + majorVersion = parseInt(navigator.appVersion, 10); + } + else version = "" + parseFloat(version); + var mobile = /Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(nVer); + var os = unknown; + var clientStrings = [ + {s: "Windows 3.11", r: /Win16/}, + {s: "Windows 95", r: /(Windows 95|Win95|Windows_95)/}, + {s: "Windows ME", r: /(Win 9x 4.90|Windows ME)/}, + {s: "Windows 98", r: /(Windows 98|Win98)/}, + {s: "Windows CE", r: /Windows CE/}, + {s: "Windows 2000", r: /(Windows NT 5.0|Windows 2000)/}, + {s: "Windows XP", r: /(Windows NT 5.1|Windows XP)/}, + {s: "Windows Server 2003", r: /Windows NT 5.2/}, + {s: "Windows Vista", r: /Windows NT 6.0/}, + {s: "Windows 7", r: /(Windows 7|Windows NT 6.1)/}, + {s: "Windows 8.1", r: /(Windows 8.1|Windows NT 6.3)/}, + {s: "Windows 8", r: /(Windows 8|Windows NT 6.2)/}, + {s: "Windows 10", r: /(Windows 10|Windows NT 10.0)/}, + {s: "Windows NT 4.0", r: /(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/}, + {s: "Windows ME", r: /Windows ME/}, + {s: "Android", r: /Android/}, + {s: "Open BSD", r: /OpenBSD/}, + {s: "Sun OS", r: /SunOS/}, + {s: "Linux", r: /(Linux|X11)/}, + {s: "iOS", r: /(iPhone|iPad|iPod)/}, + {s: "Mac OS X", r: /Mac OS X/}, + {s: "Mac OS", r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}, + {s: "QNX", r: /QNX/}, + {s: "UNIX", r: /UNIX/}, + {s: "BeOS", r: /BeOS/}, + {s: "OS/2", r: /OS\/2/}, + {s: "Search Bot", r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/} + ]; + for (var id in clientStrings) { + var cs = clientStrings[id]; + if (cs.r.test(nAgt)) { + os = cs.s; + break; + } + } + + var osVersion = unknown; + if (/Windows/.test(os)) { + osVersion = /Windows (.*)/.exec(os)[1]; + os = "Windows"; + } + switch (os) { + case "Mac OS X": + osVersion = /Mac OS X (10[\.\_\d]+)/.exec(nAgt)[1]; + break; + case "Android": + osVersion = /Android ([\.\_\d]+)/.exec(nAgt)[1]; + break; + case "iOS": + osVersion = /OS (\d+)_(\d+)_?(\d+)?/.exec(nVer); + osVersion = osVersion[1] + "." + osVersion[2] + "." + (osVersion[3] | 0); + break; + } + return { + width: screen.width ? screen.width : 0, + height: screen.height ? screen.height : 0, + browser: browser, + browserVersion: version, + mobile: mobile, + os: os, + osVersion: osVersion, + gpu: (function() { + var canvas = document.createElement("canvas"); + var gl = canvas.getContext("experimental-webgl"); + if(gl) { + var renderedInfo = gl.getExtension("WEBGL_debug_renderer_info"); + if(renderedInfo) { + return gl.getParameter(renderedInfo.UNMASKED_RENDERER_WEBGL); + } + } + return unknown; + })(), + language: window.navigator.userLanguage || window.navigator.language, + hasWebGL: (function() { + if (!window.WebGLRenderingContext) { + return 0; + } + var canvas = document.createElement("canvas"); + var gl = canvas.getContext("webgl2"); + if (!gl) { + gl = canvas.getContext("experimental-webgl2"); + if (!gl) { + gl = canvas.getContext("webgl"); + if (!gl) { + gl = canvas.getContext("experimental-webgl"); + if (!gl) { + return 0; + } + } + return 1; + } + return 2; + } + return 2; + })(), + hasCursorLock: (function() { + var e = document.createElement("canvas"); + if (e["requestPointerLock"] || e["mozRequestPointerLock"] || e["webkitRequestPointerLock"] || e["msRequestPointerLock"]) return 1; else return 0; + })(), + hasFullscreen: (function() { + var e = document.createElement("canvas"); + if (e["requestFullScreen"] || e["mozRequestFullScreen"] || e["msRequestFullscreen"] || e["webkitRequestFullScreen"]) { + if (browser.indexOf("Safari") == -1 || version >= 10.1) return 1; + } + return 0; + })(), + hasThreads: typeof SharedArrayBuffer !== 'undefined', + hasWasm: typeof WebAssembly == "object" && typeof WebAssembly.validate == "function" && typeof WebAssembly.compile == "function", + }; + + })(), + compatibilityCheck: function (gameInstance, onsuccess, onerror) { + if (!UnityLoader.SystemInfo.hasWebGL) { + gameInstance.popup("Your browser does not support WebGL", + [{text: "OK", callback: onerror}]); + } else if (UnityLoader.SystemInfo.mobile) { + gameInstance.popup("Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway.", + [{text: "OK", callback: onsuccess}]); + } else if (["Edge", "Firefox", "Chrome", "Safari"].indexOf(UnityLoader.SystemInfo.browser) == -1) { + gameInstance.popup("Please note that your browser is not currently supported for this Unity WebGL content. Press OK if you wish to continue anyway.", + [{text: "OK", callback: onsuccess}]); + } else { + onsuccess(); + } + + }, + Blobs: {}, + loadCode: function (code, onload, info) { + var functionId = [].slice.call(UnityLoader.Cryptography.md5(code)).map(function(x) { return ("0" + x.toString(16)).substr(-2); }).join(""); + var script = document.createElement("script"); + var blobUrl = URL.createObjectURL(new Blob(["UnityLoader[\"" + functionId + "\"]=", code], { type: "text/javascript" })); + UnityLoader.Blobs[blobUrl] = info; + script.src = blobUrl; + script.onload = function () { + URL.revokeObjectURL(blobUrl); + onload(functionId); + } + document.body.appendChild(script); + + }, + setupIndexedDBJob: function (Module, job) { + function setupIndexedDB(idb) { + if (setupIndexedDB.called) + return; + setupIndexedDB.called = true; + Module.indexedDB = idb; + job.complete(); + } + try { + var idb = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + var testRequest = idb.open("/idbfs-test"); + testRequest.onerror = function(e) { e.preventDefault(); setupIndexedDB(); } + testRequest.onsuccess = function() { testRequest.result.close(); setupIndexedDB(idb); } + setTimeout(setupIndexedDB, 1000); + } catch (e) { + setupIndexedDB(); + } + + }, + initWasmCache: function (Module, urlId) { + if (!Module.cacheControl || ["must-revalidate", "immutable"].indexOf(Module.cacheControl[urlId] || Module.cacheControl["default"]) == -1) + return; + Module.wasmCache = { + update: function () { + var wasm = this; + if (wasm.cache && wasm.download && wasm.request) { + if (wasm.cache.module && wasm.cache.md5 == wasm.download.md5) { + wasm.request.wasmInstantiate(wasm.cache.module).then(function (result) { + console.log("[Unity Cache] WebAssembly module '" + wasm.cache.url + "' successfully loaded from the indexedDB cache"); + wasm.request.callback(result); + }); + } else { + wasm.request.wasmInstantiate(wasm.download.binary).then(function (result) { + wasm.cache.module = result.module; + wasm.cache.md5 = wasm.download.md5; + UnityLoader.UnityCache.WebAssembly.put(wasm.cache, function () { + console.log("[Unity Cache] WebAssembly module '" + wasm.cache.url + "' successfully stored in the indexedDB cache"); + }, function (error) { + console.log("[Unity Cache] WebAssembly module '" + wasm.cache.url + "' not stored in the indexedDB cache due to the error: " + error); + }); + wasm.request.callback(result.instance); + }); + } + } + }, + }; + UnityLoader.UnityCache.WebAssembly.get(Module.resolveBuildUrl(Module[urlId]), function (result) { Module.wasmCache.cache = result; Module.wasmCache.update(); }); + + }, + processWasmCodeJob: function (Module, job) { + Module.wasmBinary = UnityLoader.Job.result(Module, "downloadWasmCode").data; + if (Module.wasmCache) { + Module.wasmCache.download = { + binary: Module.wasmBinary, + md5: [].slice.call(UnityLoader.Cryptography.md5(Module.wasmBinary)).map(function(x) { return ("0" + x.toString(16)).substr(-2); }).join(""), + }; + Module.wasmCache.update(); + } + job.complete(); + + }, + processWasmFrameworkJob: function (Module, job) { + var code = UnityLoader.Job.result(Module, "downloadWasmFramework").data; + UnityLoader.loadCode(code, function (id) { + var blob = new Blob([code], { type: "application/javascript" }); + Module["mainScriptUrlOrBlob"] = blob; + UnityLoader[id](Module); + job.complete(); + }, {Module: Module, url: Module["wasmFrameworkUrl"]}); + + }, + processAsmCodeJob: function (Module, job) { + var asm = UnityLoader.Job.result(Module, "downloadAsmCode").data; + UnityLoader.loadCode(!Math.fround ? UnityLoader.Utils.optimizeMathFround(asm) : asm, function (id) { + Module.asm = UnityLoader[id]; + job.complete(); + }, {Module: Module, url: Module["asmCodeUrl"]}); + + }, + processAsmFrameworkJob: function (Module, job) { + var code = UnityLoader.Job.result(Module, "downloadAsmFramework").data; + UnityLoader.loadCode(code, function (id) { + var blob = new Blob([code], { type: "application/javascript" }); + Module["mainScriptUrlOrBlob"] = blob; + UnityLoader[id](Module); + job.complete(); + }, {Module: Module, url: Module["asmFrameworkUrl"]}); + + }, + processMemoryInitializerJob: function (Module, job) { + Module["memoryInitializerRequest"].status = 200; + Module["memoryInitializerRequest"].response = UnityLoader.Job.result(Module, "downloadMemoryInitializer").data; + if (Module["memoryInitializerRequest"].callback) + Module["memoryInitializerRequest"].callback(); + job.complete(); + + }, + processDataJob: function (Module, job) { + var data = UnityLoader.Job.result(Module, "downloadData").data; + var view = new DataView(data.buffer, data.byteOffset, data.byteLength); + var pos = 0; + var prefix = "UnityWebData1.0\0"; + if (!String.fromCharCode.apply(null, data.subarray(pos, pos + prefix.length)) == prefix) + throw "unknown data format"; + pos += prefix.length; + var headerSize = view.getUint32(pos, true); pos += 4; + while (pos < headerSize) { + var offset = view.getUint32(pos, true); pos += 4; + var size = view.getUint32(pos, true); pos += 4; + var pathLength = view.getUint32(pos, true); pos += 4; + var path = String.fromCharCode.apply(null, data.subarray(pos, pos + pathLength)); pos += pathLength; + for (var folder = 0, folderNext = path.indexOf("/", folder) + 1 ; folderNext > 0; folder = folderNext, folderNext = path.indexOf("/", folder) + 1) + Module["FS_createPath"](path.substring(0, folder), path.substring(folder, folderNext - 1), true, true); + Module["FS_createDataFile"](path, null, data.subarray(offset, offset + size), true, true, true); + } + Module["removeRunDependency"]("processDataJob"); + job.complete(); + + }, + downloadJob: function (Module, job) { + var xhr = job.parameters.objParameters ? new UnityLoader.UnityCache.XMLHttpRequest(job.parameters.objParameters) : new XMLHttpRequest(); + xhr.open("GET", job.parameters.url); + xhr.responseType = "arraybuffer"; + //xhr.onload = function () { UnityLoader.Compression.decompress(new Uint8Array(xhr.response), function (decompressed) { job.complete(decompressed) }) }; + xhr.onload = function () { UnityLoader.Compression.decompress(new Uint8Array(xhr.response), function (decompressed) { var result = {data: decompressed, cached: xhr.xhr.cached}; job.complete(result); }) }; + if (job.parameters.onprogress) + xhr.addEventListener("progress", job.parameters.onprogress); + if (job.parameters.onload) + xhr.addEventListener("load", job.parameters.onload); + xhr.send(); + + }, + scheduleBuildDownloadJob: function (Module, jobId, urlId) { + UnityLoader.Progress.update(Module, jobId); + UnityLoader.Job.schedule(Module, jobId, [], UnityLoader.downloadJob, { + url: Module.resolveBuildUrl(Module[urlId]), + onprogress: function(e) { UnityLoader.Progress.update(Module, jobId, e); }, + onload: function(e) { UnityLoader.Progress.update(Module, jobId, e); }, + objParameters: Module.companyName && Module.productName && Module.cacheControl && (Module.cacheControl[urlId] || Module.cacheControl["default"]) ? { + companyName: Module.companyName, + productName: Module.productName, + cacheControl: Module.cacheControl[urlId] || Module.cacheControl["default"], + } : null, + }); + + }, + loadModule: function (Module) { + Module.useWasm = Module["wasmCodeUrl"] && UnityLoader.SystemInfo.hasWasm; + + if (Module.useWasm) { + // UnityLoader.initWasmCache(Module, "wasmCodeUrl"); + UnityLoader.scheduleBuildDownloadJob(Module, "downloadWasmCode", "wasmCodeUrl"); + UnityLoader.Job.schedule(Module, "processWasmCode", ["downloadWasmCode"], UnityLoader.processWasmCodeJob); + if (Module["wasmMemoryUrl"]) + { + UnityLoader.scheduleBuildDownloadJob(Module, "downloadMemoryInitializer", "wasmMemoryUrl"); + UnityLoader.Job.schedule(Module, "processMemoryInitializer", ["downloadMemoryInitializer"], UnityLoader.processMemoryInitializerJob); + Module["memoryInitializerRequest"] = { addEventListener: function (type, callback) { Module["memoryInitializerRequest"].callback = callback; } } + } + UnityLoader.scheduleBuildDownloadJob(Module, "downloadWasmFramework", "wasmFrameworkUrl"); + UnityLoader.Job.schedule(Module, "processWasmFramework", ["downloadWasmFramework", "processWasmCode", "setupIndexedDB"], UnityLoader.processWasmFrameworkJob); + + } else if (Module["asmCodeUrl"]) { + UnityLoader.scheduleBuildDownloadJob(Module, "downloadAsmCode", "asmCodeUrl"); + UnityLoader.Job.schedule(Module, "processAsmCode", ["downloadAsmCode"], UnityLoader.processAsmCodeJob); + UnityLoader.scheduleBuildDownloadJob(Module, "downloadMemoryInitializer", "asmMemoryUrl"); + UnityLoader.Job.schedule(Module, "processMemoryInitializer", ["downloadMemoryInitializer"], UnityLoader.processMemoryInitializerJob); + Module["memoryInitializerRequest"] = { addEventListener: function (type, callback) { Module["memoryInitializerRequest"].callback = callback; } } + if (Module.asmLibraryUrl) + Module.dynamicLibraries = [Module.asmLibraryUrl].map(Module.resolveBuildUrl); + UnityLoader.scheduleBuildDownloadJob(Module, "downloadAsmFramework", "asmFrameworkUrl"); + UnityLoader.Job.schedule(Module, "processAsmFramework", ["downloadAsmFramework", "processAsmCode", "setupIndexedDB"], UnityLoader.processAsmFrameworkJob); + + } else { + throw "WebAssembly support is not detected in this browser."; + } + + UnityLoader.scheduleBuildDownloadJob(Module, "downloadData", "dataUrl"); + UnityLoader.Job.schedule(Module, "setupIndexedDB", [], UnityLoader.setupIndexedDBJob); + + Module["preRun"].push(function () { + Module["addRunDependency"]("processDataJob"); + UnityLoader.Job.schedule(Module, "processData", ["downloadData"], UnityLoader.processDataJob); + }); + + }, + instantiate: function (container, url, parameters) { + function instantiate(container, gameInstance) { + if (typeof container == "string" && !(container = document.getElementById(container))) + return false; + + container.innerHTML = ""; + container.style.border = container.style.margin = container.style.padding = 0; + if (getComputedStyle(container).getPropertyValue("position") == "static") + container.style.position = "relative"; + container.style.width = gameInstance.width || container.style.width; + container.style.height = gameInstance.height || container.style.height; + gameInstance.container = container; + + var Module = gameInstance.Module; + Module.canvas = document.createElement("canvas"); + Module.canvas.style.width = "100%"; + Module.canvas.style.height = "100%"; + Module.canvas.addEventListener("contextmenu", function (e) { e.preventDefault() }), + Module.canvas.id = "#canvas"; + container.appendChild(Module.canvas); + + gameInstance.compatibilityCheck(gameInstance, function () { + var xhr = new XMLHttpRequest(); + xhr.open("GET", gameInstance.url, true); + xhr.responseType = "text"; + xhr.onerror = function() { + Module.print("Could not download " + gameInstance.url); + if (document.URL.indexOf("file:") == 0) { + alert ("It seems your browser does not support running Unity WebGL content from file:// urls. Please upload it to an http server, or try a different browser."); + } + } + xhr.onload = function () { + var parameters = JSON.parse(xhr.responseText); + for (var parameter in parameters) { + if (typeof Module[parameter] == "undefined") + Module[parameter] = parameters[parameter]; + } + + var graphicsApiMatch = false; + for(var i = 0; i < Module.graphicsAPI.length; i++) { + var api = Module.graphicsAPI[i]; + if (api == "WebGL 2.0" && UnityLoader.SystemInfo.hasWebGL == 2) { + graphicsApiMatch = true; + } + else if (api == "WebGL 1.0" && UnityLoader.SystemInfo.hasWebGL >= 1) { + graphicsApiMatch = true; + } + else + Module.print("Warning: Unsupported graphics API " + api); + } + if (!graphicsApiMatch) { + gameInstance.popup("Your browser does not support any of the required graphics API for this content: " + Module.graphicsAPI, [{text: "OK"}]); + return; + } + + container.style.background = Module.backgroundUrl ? "center/cover url('" + Module.resolveBuildUrl(Module.backgroundUrl) + "')" : + Module.backgroundColor ? " " + Module.backgroundColor : ""; + + // show loading screen as soon as possible + gameInstance.onProgress(gameInstance, 0.0); + + UnityLoader.loadModule(Module); + } + xhr.send(); + }, function () { + Module.printErr("Instantiation of the '" + url + "' terminated due to the failed compatibility check."); + }); + + return true; + } + + function resolveURL(url) { + resolveURL.link = resolveURL.link || document.createElement("a"); + resolveURL.link.href = url; + return resolveURL.link.href; + } + + var gameInstance = { + url: url, + onProgress: UnityLoader.Progress.handler, + compatibilityCheck: UnityLoader.compatibilityCheck, + Module: { + graphicsAPI: ["WebGL 2.0", "WebGL 1.0"], + onAbort: function(what){ + if (what !== undefined) { + this.print(what); + this.printErr(what); + what = JSON.stringify(what); + } else { + what = ''; + } + throw 'abort(' + what + ') at ' + this.stackTrace(); + }, + preRun: [], + postRun: [], + print: function (message) { console.log(message); }, + printErr: function (message) { console.error(message); }, + Jobs: {}, + buildDownloadProgress: {}, + resolveBuildUrl: function (buildUrl) { return buildUrl.match(/(http|https|ftp|file):\/\//) ? buildUrl : url.substring(0, url.lastIndexOf("/") + 1) + buildUrl; }, + streamingAssetsUrl: function () { return resolveURL(this.resolveBuildUrl("../StreamingAssets")) }, + pthreadMainPrefixURL: "Build/", + wasmRequest: function (wasmInstantiate, callback) { + if (this.wasmCache && !UnityLoader.SystemInfo.hasThreads) { + this.wasmCache.request = { + wasmInstantiate: wasmInstantiate, + callback: callback, + }; + this.wasmCache.update(); + } else { + wasmInstantiate(this.wasmBinary).then(function (result) { callback(result.instance); }); + } + }, + }, + SetFullscreen: function() { + if (gameInstance.Module.SetFullscreen) + return gameInstance.Module.SetFullscreen.apply(gameInstance.Module, arguments); + }, + SendMessage: function() { + if (gameInstance.Module.SendMessage) + return gameInstance.Module.SendMessage.apply(gameInstance.Module, arguments); + }, + }; + + gameInstance.Module.gameInstance = gameInstance; + gameInstance.popup = function (message, callbacks) { return UnityLoader.Error.popup(gameInstance, message, callbacks); }; + gameInstance.Module.postRun.push(function() { + gameInstance.onProgress(gameInstance, 1); + }); + + for (var parameter in parameters) { + if (parameter == "Module") { + for (var moduleParameter in parameters[parameter]) + gameInstance.Module[moduleParameter] = parameters[parameter][moduleParameter]; + } else { + gameInstance[parameter] = parameters[parameter]; + } + } + + if (!instantiate(container, gameInstance)) + document.addEventListener("DOMContentLoaded", function () { instantiate(container, gameInstance) }); + + return gameInstance; + + }, + Utils: { + assert: function (condition, text) { + if (!condition) + abort("Assertion failed: " + text); + + }, + optimizeMathFround: function (code, embeddedAsm) { + console.log("optimizing out Math.fround calls"); + + var State = { + LOOKING_FOR_MODULE: 0, + SCANNING_MODULE_VARIABLES: 1, + SCANNING_MODULE_FUNCTIONS: 2, + }; + var stateSwitchMarker = [ + "EMSCRIPTEN_START_ASM", + "EMSCRIPTEN_START_FUNCS", + "EMSCRIPTEN_END_FUNCS", + ]; + var froundPrefix = "var"; + var froundMarker = "global.Math.fround;"; + + var position = 0; + var state = embeddedAsm ? State.LOOKING_FOR_MODULE : State.SCANNING_MODULE_VARIABLES; + var froundLast = 0; + var froundLength = 0; + + for(; state <= State.SCANNING_MODULE_FUNCTIONS && position < code.length; position++) { + if (code[position] == 0x2F && code[position + 1] == 0x2F && code[position + 2] == 0x20 && + String.fromCharCode.apply(null, code.subarray(position + 3, position + 3 + stateSwitchMarker[state].length)) === stateSwitchMarker[state]) { + // if code at position starts with "// " + stateSwitchMarker[state] + state++; + } else if (state == State.SCANNING_MODULE_VARIABLES && !froundLength && code[position] == 0x3D && + String.fromCharCode.apply(null, code.subarray(position + 1, position + 1 + froundMarker.length)) === froundMarker) { + // if we are at the module variable section and Math_fround name has not yet been found and code at position starts with "=" + froundMarker + froundLast = position - 1; + while(code[froundLast - froundLength] != 0x20) + froundLength++; // scan back until the first space character (it is always present as at least it is a part of the previously found "// ") + if (!froundLength || String.fromCharCode.apply(null, code.subarray(froundLast - froundLength - froundPrefix.length, froundLast - froundLength)) !== froundPrefix) + froundLast = froundLength = 0; + } else if (froundLength && code[position] == 0x28) { + // if Math_fround name has been found and code at position starts with "(" + var nameLength = 0; + while (nameLength < froundLength && code[position - 1 - nameLength] == code[froundLast - nameLength]) + nameLength++; + if (nameLength == froundLength) { + var c = code[position - 1 - nameLength]; + if (c < 0x24 || (0x24 < c && c < 0x30) || (0x39 < c && c < 0x41) || (0x5A < c && c < 0x5F) || (0x5F < c && c < 0x61) || 0x7A < c) { + // if the matched Math_fround name is not a suffix of another identifier, i.e. it's preceding character does not match [$0-9A-Z_a-z] + for(;nameLength; nameLength--) + code[position - nameLength] = 0x20; // fill the Math_fround name with spaces (replacement works faster than shifting back the rest of the code) + } + } + } + } + return code; + + }, + + }, + UnityCache: function () { + var UnityCacheDatabase = { name: "UnityCache", version: 2 }; + var XMLHttpRequestStore = { name: "XMLHttpRequest", version: 1 }; + var WebAssemblyStore = { name: "WebAssembly", version: 1 }; + + function log(message) { + console.log("[UnityCache] " + message); + } + + function resolveURL(url) { + resolveURL.link = resolveURL.link || document.createElement("a"); + resolveURL.link.href = url; + return resolveURL.link.href; + } + + function isCrossOriginURL(url) { + var originMatch = window.location.href.match(/^[a-z]+:\/\/[^\/]+/); + return !originMatch || url.lastIndexOf(originMatch[0], 0); + } + + function UnityCache() { + var cache = this; + cache.queue = []; + + function initDatabase(database) { + if (typeof cache.database != "undefined") + return; + cache.database = database; + if (!cache.database) + log("indexedDB database could not be opened"); + while (cache.queue.length) { + var queued = cache.queue.shift(); + if (cache.database) { + cache.execute.apply(cache, queued); + } else if (typeof queued.onerror == "function") { + queued.onerror(new Error("operation cancelled")); + } + } + } + + try { + var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + function upgradeDatabase() { + var openRequest = indexedDB.open(UnityCacheDatabase.name, UnityCacheDatabase.version); + openRequest.onupgradeneeded = function (e) { + var database = e.target.result; + if (!database.objectStoreNames.contains(WebAssemblyStore.name)) + database.createObjectStore(WebAssemblyStore.name); + }; + openRequest.onsuccess = function (e) { initDatabase(e.target.result); }; + openRequest.onerror = function () { initDatabase(null); }; + } + var openRequest = indexedDB.open(UnityCacheDatabase.name); + openRequest.onupgradeneeded = function (e) { + var objectStore = e.target.result.createObjectStore(XMLHttpRequestStore.name, { keyPath: "url" }); + ["version", "company", "product", "updated", "revalidated", "accessed"].forEach(function (index) { objectStore.createIndex(index, index); }); + }; + openRequest.onsuccess = function (e) { + var database = e.target.result; + if (database.version < UnityCacheDatabase.version) { + database.close(); + upgradeDatabase(); + } else { + initDatabase(database); + } + }; + openRequest.onerror = function () { initDatabase(null); }; + setTimeout(openRequest.onerror, 1000); + } catch (e) { + initDatabase(null); + } + }; + + UnityCache.prototype.execute = function (store, operation, parameters, onsuccess, onerror) { + if (this.database) { + try { + var target = this.database.transaction([store], ["put", "delete", "clear"].indexOf(operation) != -1 ? "readwrite" : "readonly").objectStore(store); + if (operation == "openKeyCursor") { + target = target.index(parameters[0]); + parameters = parameters.slice(1); + } + var request = target[operation].apply(target, parameters); + if (typeof onsuccess == "function") + request.onsuccess = function (e) { onsuccess(e.target.result); }; + request.onerror = onerror; + } catch (e) { + if (typeof onerror == "function") + onerror(e); + } + } else if (typeof this.database == "undefined") { + this.queue.push(arguments); + } else if (typeof onerror == "function") { + onerror(new Error("indexedDB access denied")); + } + }; + + var unityCache = new UnityCache(); + + function createXMLHttpRequestResult(url, company, product, timestamp, xhr) { + var result = { url: url, version: XMLHttpRequestStore.version, company: company, product: product, updated: timestamp, revalidated: timestamp, accessed: timestamp, responseHeaders: {}, xhr: {} }; + if (xhr) { + ["Last-Modified", "ETag"].forEach(function (header) { result.responseHeaders[header] = xhr.getResponseHeader(header); }); + ["responseURL", "status", "statusText", "response"].forEach(function (property) { result.xhr[property] = xhr[property]; }); + } + return result; + } + + function CachedXMLHttpRequest(objParameters) { + this.cache = { enabled: false }; + if (objParameters) { + this.cache.control = objParameters.cacheControl; + this.cache.company = objParameters.companyName; + this.cache.product = objParameters.productName; + } + this.xhr = new XMLHttpRequest(objParameters); + this.xhr.cached = false; + this.xhr.addEventListener("load", function () { + var xhr = this.xhr, cache = this.cache; + if (!cache.enabled || cache.revalidated) + return; + if (xhr.status == 304) { + cache.result.revalidated = cache.result.accessed; + cache.revalidated = true; + unityCache.execute(XMLHttpRequestStore.name, "put", [cache.result]); + this.xhr.cached = true; + log("'" + cache.result.url + "' successfully revalidated and served from the indexedDB cache"); + } else if (xhr.status == 200) { + cache.result = createXMLHttpRequestResult(cache.result.url, cache.company, cache.product, cache.result.accessed, xhr); + cache.revalidated = true; + unityCache.execute(XMLHttpRequestStore.name, "put", [cache.result], function (result) { + log("'" + cache.result.url + "' successfully downloaded and stored in the indexedDB cache"); + }, function (error) { + log("'" + cache.result.url + "' successfully downloaded but not stored in the indexedDB cache due to the error: " + error); + }); + } else { + log("'" + cache.result.url + "' request failed with status: " + xhr.status + " " + xhr.statusText); + } + }.bind(this)); + }; + + CachedXMLHttpRequest.prototype.send = function (data) { + var xhr = this.xhr, cache = this.cache; + var sendArguments = arguments; + cache.enabled = cache.enabled && xhr.responseType == "arraybuffer" && !data; + if (!cache.enabled) + return xhr.send.apply(xhr, sendArguments); + unityCache.execute(XMLHttpRequestStore.name, "get", [cache.result.url], function (result) { + if (!result || result.version != XMLHttpRequestStore.version) { + xhr.send.apply(xhr, sendArguments); + return; + } + cache.result = result; + cache.result.accessed = Date.now(); + if (cache.control == "immutable") { + cache.revalidated = true; + unityCache.execute(XMLHttpRequestStore.name, "put", [cache.result]); + xhr.dispatchEvent(new Event('load')); + xhr.cached = true; + log("'" + cache.result.url + "' served from the indexedDB cache without revalidation"); + } else if (isCrossOriginURL(cache.result.url) && (cache.result.responseHeaders["Last-Modified"] || cache.result.responseHeaders["ETag"])) { + var headXHR = new XMLHttpRequest(); + headXHR.open("HEAD", cache.result.url); + headXHR.onload = function () { + cache.revalidated = ["Last-Modified", "ETag"].every(function (header) { + return !cache.result.responseHeaders[header] || cache.result.responseHeaders[header] == headXHR.getResponseHeader(header); + }); + if (cache.revalidated) { + cache.result.revalidated = cache.result.accessed; + unityCache.execute(XMLHttpRequestStore.name, "put", [cache.result]); + xhr.dispatchEvent(new Event('load')); + xhr.cached = true; + log("'" + cache.result.url + "' successfully revalidated and served from the indexedDB cache"); + } else { + xhr.send.apply(xhr, sendArguments); + } + } + headXHR.send(); + } else { + if (cache.result.responseHeaders["Last-Modified"]) { + xhr.setRequestHeader("If-Modified-Since", cache.result.responseHeaders["Last-Modified"]); + xhr.setRequestHeader("Cache-Control", "no-cache"); + } else if (cache.result.responseHeaders["ETag"]) { + xhr.setRequestHeader("If-None-Match", cache.result.responseHeaders["ETag"]); + xhr.setRequestHeader("Cache-Control", "no-cache"); + } + xhr.send.apply(xhr, sendArguments); + } + }, function (error) { + xhr.send.apply(xhr, sendArguments); + }); + }; + + CachedXMLHttpRequest.prototype.open = function (method, url, async, user, password) { + this.cache.result = createXMLHttpRequestResult(resolveURL(url), this.cache.company, this.cache.product, Date.now()); + this.cache.enabled = ["must-revalidate", "immutable"].indexOf(this.cache.control) != -1 && method == "GET" && this.cache.result.url.match("^https?:\/\/") + && (typeof async == "undefined" || async) && typeof user == "undefined" && typeof password == "undefined"; + this.cache.revalidated = false; + return this.xhr.open.apply(this.xhr, arguments); + }; + + CachedXMLHttpRequest.prototype.setRequestHeader = function (header, value) { + this.cache.enabled = false; + return this.xhr.setRequestHeader.apply(this.xhr, arguments); + }; + + var xhr = new XMLHttpRequest(); + for (var property in xhr) { + if (!CachedXMLHttpRequest.prototype.hasOwnProperty(property)) { + (function (property) { + Object.defineProperty(CachedXMLHttpRequest.prototype, property, typeof xhr[property] == "function" ? { + value: function () { return this.xhr[property].apply(this.xhr, arguments); }, + } : { + get: function () { return this.cache.revalidated && this.cache.result.xhr.hasOwnProperty(property) ? this.cache.result.xhr[property] : this.xhr[property]; }, + set: function (value) { this.xhr[property] = value; }, + }); + })(property); + } + } + + return { + XMLHttpRequest: CachedXMLHttpRequest, + WebAssembly: { + get: function (url, callback) { + var base = { url: resolveURL(url), version: WebAssemblyStore.version, module: null, md5: null }; + unityCache.execute(WebAssemblyStore.name, "get", [base.url], function (result) { + callback(result && result.version == WebAssemblyStore.version ? result : base); + }, function () { + callback(base); + }); + }, + put: function (result, onsuccess, onerror) { + unityCache.execute(WebAssemblyStore.name, "put", [result, result.url], onsuccess, onerror); + }, + }, + }; + } (), + +}; diff --git a/TemplateData/UnityProgress.js b/TemplateData/UnityProgress.js new file mode 100644 index 0000000..a82adc6 --- /dev/null +++ b/TemplateData/UnityProgress.js @@ -0,0 +1,24 @@ +function UnityProgress(gameObject, progress) { + if (!gameObject.Module) + return; + if (!gameObject.logo) { + gameObject.logo = document.createElement("div"); + gameObject.logo.className = "logo " + gameObject.Module.splashScreenStyle; + gameObject.container.appendChild(gameObject.logo); + } + if (!gameObject.progress) { + gameObject.progress = document.createElement("div"); + gameObject.progress.className = "progress " + gameObject.Module.splashScreenStyle; + gameObject.progress.empty = document.createElement("div"); + gameObject.progress.empty.className = "empty"; + gameObject.progress.appendChild(gameObject.progress.empty); + gameObject.progress.full = document.createElement("div"); + gameObject.progress.full.className = "full"; + gameObject.progress.appendChild(gameObject.progress.full); + gameObject.container.appendChild(gameObject.progress); + } + gameObject.progress.full.style.width = (100 * progress) + "%"; + gameObject.progress.empty.style.width = (100 * (1 - progress)) + "%"; + if (progress == 1) + gameObject.logo.style.display = gameObject.progress.style.display = "none"; +} \ No newline at end of file diff --git a/TemplateData/favicon.ico b/TemplateData/favicon.ico new file mode 100644 index 0000000..dd6bf7e Binary files /dev/null and b/TemplateData/favicon.ico differ diff --git a/TemplateData/progressEmpty.Dark.png b/TemplateData/progressEmpty.Dark.png new file mode 100644 index 0000000..eff4730 Binary files /dev/null and b/TemplateData/progressEmpty.Dark.png differ diff --git a/TemplateData/progressFull.Dark.png b/TemplateData/progressFull.Dark.png new file mode 100644 index 0000000..3e5c8a0 Binary files /dev/null and b/TemplateData/progressFull.Dark.png differ diff --git a/TemplateData/progressLogo.Dark.png b/TemplateData/progressLogo.Dark.png new file mode 100644 index 0000000..c15fb23 Binary files /dev/null and b/TemplateData/progressLogo.Dark.png differ diff --git a/TemplateData/style.css b/TemplateData/style.css new file mode 100644 index 0000000..693dfb5 --- /dev/null +++ b/TemplateData/style.css @@ -0,0 +1,48 @@ +.webgl-content * {border: 0; margin: 0; padding: 0} +.webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);} + +.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);} +.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;} +.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;} +.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;} +.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;} + +.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');} +.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');} +.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');} + +.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;} +.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;} +.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;} +.webgl-content .footer .title {margin-right: 10px; float: right;} +.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;} + +#overlay { + position: absolute; + left: 0px; + bottom: 0px; + background-color: #ababab80; + font-family: Helvetica, Verdana, Arial; +} + +#section { + color: #202050; + background-color: #7d7d7d80; + font-weight: bold; + margin: 6px; + padding: 4px; +} + +#section-content { + font-weight: normal; +} + +.webgl-content .button { + /*border: 10px; margin: 10px; padding: 10px*/ + position: absolute; + top: 0px; + left: 0px; + padding: 5px; + color: #202050; + background-color: #7d7d7d; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..2265adc --- /dev/null +++ b/index.html @@ -0,0 +1,115 @@ + + + + + + Unity WebGL Player | Benchmarks + + + + + + + + + + + +
+
+
+ + + \ No newline at end of file