4 lines
146 KiB
JavaScript
4 lines
146 KiB
JavaScript
|
var UnityLoader=UnityLoader||{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}]):["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"),i=URL.createObjectURL(new Blob(['UnityLoader["'+n+'"]=',e],{type:"text/javascript"}));UnityLoader.Blobs[i]=r,o.src=i,o.onload=function(){URL.revokeObjectURL(i),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,i=16777216,a=o;a<n||a<2*r;)a+=a<i?a:i;a!=n&&e.printErr("increasing TOTAL_MEMORY to "+a+" to be compliant with the asm.js spec (and given that TOTAL_STACK="+r+")"),n=a,t.parameters.useWasm?(e.wasmMemory=new WebAssembly.Memory({initial:n/o,maximum:n/o}),e.buffer=e.wasmMemory.buffer):e.buffer?e.buffer.byteLength!=n&&(e.printErr("provided buffer should be "+n+" bytes, but it is "+e.buffer.byteLength+", reallocating the buffer"),e.buffer=new ArrayBuffer(n)):e.buffer=new ArrayBuffer(n),e.TOTAL_MEMORY=e.buffer.byteLength,t.complete()},setupIndexedDBJob:function(e,t){function r(n){r.called||(r.called=!0,e.indexedDB=n,t.complete())}try{var n=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,o=n.open("/idbfs-test");o.onerror=function(e){e.preventDefault(),r()},o.onsuccess=function(){o.result.close(),r(n)},setTimeout(r,1e3)}catch(e){r()}},processWasmCodeJob:function(e,t){e.wasmBinary=UnityLoader.Job.result(e,"downloadWasmCode"),t.complete()},processWasmFrameworkJob:function(e,t){UnityLoader.loadCode(UnityLoader.Job.result(e,"downloadWasmFramework"),function(r){UnityLoader[r](e),t.complete()},{Module:e,url:e.wasmFrameworkUrl})},processAsmCodeJob:function(e,t){var r=UnityLoader.Job.result(e,"downloadAsmCode");UnityLoader.loadCode(Math.fround?r:UnityLoader.Utils.optimizeMathFround(r),function(r){e.asm=UnityLoader[r],t.complete()},{Module:e,url:e.asmCodeUrl})},processAsmFrameworkJob:function(e,t){UnityLoader.loadCode(UnityLoader.Job.result(e,"downloadAsmFramework"),function(r){UnityLoader[r](e),t.complete()},{Module:e,url:e.asmFrameworkUrl})},processAsmMemoryJob:function(e,t){e.memoryInitializerRequest.status=200,e.memoryInitializerRequest.response=UnityLoader.Job.result(e,"downloadAsmMemory"),e.memoryInitializerRequest.callback&&e.memoryInitializerRequest.callback(),t.complete()},processDataJob:function(e,t){var r=UnityLoader.Job.result(e,"downloadData"),n=new DataView(r.buffer,r.byteOffset,r.byteLength),o=0,i="UnityWebData1.0\0";if(!String.fromCharCode.apply(null,r.subarray(o,o+i.length))==i)throw"unknown data format";o+=i.length;var a=n.getUint32(o,!0);for(o+=4;o<a;){var s=n.getUint32(o,!0);o+=4;var d=n.getUint32(o,!0);o+=4;var l=n.getUint32(o,!0);o+=4;var f=String.fromCharCode.apply(null,r.subarray(o,o+l));o+=l;for(var u=0,c=f.indexOf("/",u)+1;c>0;u=c,c=f.indexOf("/",u)+1)e.FS_createPath(f.substring(0,u),f.substring(u,c-1),!0,!0);e.FS_createDataFile(f,null,r.subarray(s,s+d),!0,!0,!0)}e.removeRunDependency("processDataJob"),t.complete()},downloadJob:function(e,t){var r=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,[],UnityLo
|
||
|
i+=n.total,s++):n.finished||d++}var l=a?(a-d-(i?s*(i-o)/i:0))/a:0;e.gameInstance.onProgress(e.gameInstance,l)}},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 u,this.strm.avail_out=0;var r=a.inflateInit2(this.strm,t.windowBits);if(r!==l.Z_OK)throw new Error(f[r]);this.header=new c,a.inflateGetHeader(this.strm,this.header)}function o(e,t){var r=new n(t);if(r.push(e,!0),r.err)throw r.msg||f[r.err];return r.result}function i(e,t){return t=t||{},t.raw=!0,o(e,t)}var a=e("./zlib/inflate"),s=e("./utils/common"),d=e("./utils/strings"),l=e("./zlib/constants"),f=e("./zlib/messages"),u=e("./zlib/zstream"),c=e("./zlib/gzheader"),h=Object.prototype.toString;n.prototype.push=function(e,t){var r,n,o,i,f,u,c=this.strm,w=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;n=t===~~t?t:t===!0?l.Z_FINISH:l.Z_NO_FLUSH,"string"==typeof e?c.input=d.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?c.input=new Uint8Array(e):c.input=e,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new s.Buf8(w),c.next_out=0,c.avail_out=w),r=a.inflate(c,l.Z_NO_FLUSH),r===l.Z_NEED_DICT&&p&&(u="string"==typeof p?d.string2buf(p):"[object ArrayBuffer]"===h.call(p)?new Uint8Array(p):p,r=a.inflateSetDictionary(this.strm,u)),r===l.Z_BUF_ERROR&&m===!0&&(r=l.Z_OK,m=!1),r!==l.Z_STREAM_END&&r!==l.Z_OK)return this.onEnd(r),this.ended=!0,!1;c.next_out&&(0!==c.avail_out&&r!==l.Z_STREAM_END&&(0!==c.avail_in||n!==l.Z_FINISH&&n!==l.Z_SYNC_FLUSH)||("string"===this.options.to?(o=d.utf8border(c.output,c.next_out),i=c.next_out-o,f=d.buf2string(c.output,o),c.next_out=i,c.avail_out=w-i,i&&s.arraySet(c.output,c.output,o,i,0),this.onData(f)):this.onData(s.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(m=!0)}while((c.avail_in>0||0===c.avail_out)&&r!==l.Z_STREAM_END);return r===l.Z_STREAM_END&&(n=l.Z_FINISH),n===l.Z_FINISH?(r=a.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l.Z_OK):n!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),c.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=i,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 i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){var t,r,n,o,i,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),o=0,t=0,r=e.length;t<r;t++)i=e[t],a.set(i,o),o+=i.length;return a}},i={arraySet:function(e,t,r,n,o){for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,i))},r.setTyped(n)},"utils/strings.js":function(e,t,r){"use strict";function n(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(e,
|
||
|
for(s=o;s<D&&w>0;++s){var b,g=Z[s],y=0;n.fillBitWindow(),y+=n.val_>>>n.bit_pos_&15,n.bit_pos_+=m[y].bits,b=m[y].value,h[g]=b,0!==b&&(w-=32>>b,++p)}if(1!==p&&0!==w)throw new Error("[ReadHuffmanCode] invalid num_codes or space");d(h,e,a,n)}if(i=W(t,r,F,a,e),0===i)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return i}function f(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 u(e,t,r){var n;return e<q?(r+=Y[e],r&=3,n=t[r]+z[e]):n=e-q+1,n}function c(e,t){for(var r=e[t],n=t;n;--n)e[n]=e[n-1];e[0]=r}function h(e,t){var r,n=new Uint8Array(256);for(r=0;r<256;++r)n[r]=r;for(r=0;r<t;++r){var o=e[r];e[r]=n[o],o&&c(n,o)}}function w(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*J[e+31>>>5]),this.htrees=new Uint32Array(t)}function p(e,t){var r,n,i,a={num_htrees:null,context_map:null},d=0;t.readMoreInput();var f=a.num_htrees=o(t)+1,u=a.context_map=new Uint8Array(e);if(f<=1)return a;for(r=t.readBits(1),r&&(d=t.readBits(4)+1),n=[],i=0;i<V;i++)n[i]=new B(0,0);for(l(f+d,n,0,t),i=0;i<e;){var c;if(t.readMoreInput(),c=s(n,0,t),0===c)u[i]=0,++i;else if(c<=d)for(var w=1+(1<<c)+t.readBits(c);--w;){if(i>=e)throw new Error("[DecodeContextMap] i >= context_map_size");u[i]=0,++i}else u[i]=c-d,++i}return t.readBits(1)&&h(u,e),a}function m(e,t,r,n,o,i,a){var d,l=2*r,f=r,u=s(t,r*V,a);d=0===u?o[l+(1&i[f])]:1===u?o[l+(i[f]-1&1)]+1:u-2,d>=e&&(d-=e),n[r]=d,o[l+(1&i[f])]=d,++i[f]}function b(e,t,r,n,o,i){var a,s=o+1,d=r&o,l=i.pos_&k.IBUF_MASK;if(t<8||i.bit_pos_+(t<<3)<i.bit_end_pos_)for(;t-- >0;)i.readMoreInput(),n[d++]=i.readBits(8),d===s&&(e.write(n,s),d=0);else{if(i.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;i.bit_pos_<32;)n[d]=i.val_>>>i.bit_pos_,i.bit_pos_+=8,++d,--t;if(a=i.bit_end_pos_-i.bit_pos_>>3,l+a>k.IBUF_MASK){for(var f=k.IBUF_MASK+1-l,u=0;u<f;u++)n[d+u]=i.buf_[l+u];a-=f,d+=f,t-=f,l=0}for(var u=0;u<a;u++)n[d+u]=i.buf_[l+u];if(d+=a,t-=a,d>=s){e.write(n,s),d-=s;for(var u=0;u<d;u++)n[u]=n[s+u]}for(;d+t>=s;){if(a=s-d,i.input_.read(n,d,a)<a)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(n,s),t-=a,d=0}if(i.input_.read(n,d,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");i.reset()}}function g(e){var t=e.bit_pos_+7&-8,r=e.readBits(t-e.bit_pos_);return 0==r}function y(e){var t=new U(e),r=new k(t);n(r);var o=a(r);return o.meta_block_length}function A(e,t){var r=new U(e);null==t&&(t=y(e));var n=new Uint8Array(t),o=new x(n);return v(r,o),o.pos<o.buffer.length&&(o.buffer=o.buffer.subarray(0,o.pos)),o.buffer}function v(e,t){var r,i,d,c,h,y,A,v,U,x=0,W=0,N=0,R=0,F=[16,15,11,4],P=0,D=0,Z=0,Y=[new w(0,0),new w(0,0),new w(0,0)];const z=128+k.READ_SIZE;U=new k(e),N=n(U),i=(1<<N)-16,d=1<<N,c=d-1,h=new Uint8Array(d+z+E.maxDictionaryWordLength),y=d,A=[],v=[];for(var J=0;J<3240;J++)A[J]=new B(0,0),v[J]=new B(0,0);for(;!W;){var G,j,X,K,Q,_,$,ee,te,re=0,ne=[1<<28,1<<28,1<<28],oe=[0],ie=[1,1,1],ae=[0,1,0,1,0,1],se=[0],de=null,le=null,fe=null,ue=0,ce=null,he=0,we=0,pe=null,me=0,be=0,ge=0;for(r=0;r<3;++r)Y[r].codes=null,Y[r].htrees=null;U.readMoreInput();var ye=a(U);if(re=ye.meta_block_length,x+re>t.buffer.length){var Ae=new Uint8Array(x+re);Ae.set(t.buffer),t.buffer=Ae}if(W=ye.input_end,G=ye.is_uncompressed,ye.is_metadata)for(g(U);re>0;--re)U.readMoreInput(),U.readBits(8);else if(0!==re)if(G)U.bit_pos_=U.bit_pos_+7&-8,b(t,re,x,h,c,U),x+=re;else{for(r=0;r<3;++r)ie[r]=o(U)+1,ie[r]>=2&&(l(ie[r]+2,A,r*V,U),l(S,v,r*V,U),ne[r]=f(v,r*V,U),se[r]=1);for(U.readMoreInput(),j=U.readBits(2),X=q+(U.readBits(4)<<j),K=(1<<j)-1,Q=X+(48<<j),le=new Uint8Array(ie[0]),r=0;r<ie[0];++r)U.readMoreInput(),le[r]=U.readBits(2)<<1;var ve=p(ie[0]<<T,U);_=ve.num_htrees,de=ve.context_map;var Ue=p(ie[2]<<I,U);for($=Ue.num_htrees,fe=Ue.context_map,Y[0]=new w(C,_),Y[1]=new w(H,ie[1]),Y[2]=new w(Q,$),r=0;r<3;++r)Y[r].decode(U);for(ce=0,pe=0,ee=le[oe[0]],be=L.lookupOffsets[ee],ge=L.lookupOffsets[ee+1],te=Y[1].htrees[0];re>0;){var xe,ke,Ee,Be,We,Le,Oe,Me,Ne,Re,Ce;for(U.readMoreInput(),0===
|
||
|
},"dec/dictionary-browser.js":function(e,t,r){var n=e("base64-js");r.init=function(){var t=e("./decode").BrotliDecompressBuffer,r=n.toByteArray(e("./dictionary.bin.js"));return t(r)}},"dec/huffman.js":function(e,t,r){function n(e,t){this.bits=e,this.value=t}function o(e,t){for(var r=1<<t-1;e&r;)r>>=1;return(e&r-1)+r}function i(e,t,r,o,i){do o-=r,e[t+o]=new n(i.bits,i.value);while(o>0)}function a(e,t,r){for(var n=1<<t-r;t<s&&(n-=e[t],!(n<=0));)++t,n<<=1;return t-r}r.HuffmanCode=n;const s=15;r.BrotliBuildHuffmanTable=function(e,t,r,d,l){var f,u,c,h,w,p,m,b,g,y,A,v=t,U=new Int32Array(16),x=new Int32Array(16);for(A=new Int32Array(l),c=0;c<l;c++)U[d[c]]++;for(x[1]=0,u=1;u<s;u++)x[u+1]=x[u]+U[u];for(c=0;c<l;c++)0!==d[c]&&(A[x[d[c]]++]=c);if(b=r,g=1<<b,y=g,1===x[s]){for(h=0;h<y;++h)e[t+h]=new n(0,65535&A[0]);return y}for(h=0,c=0,u=1,w=2;u<=r;++u,w<<=1)for(;U[u]>0;--U[u])f=new n(255&u,65535&A[c++]),i(e,t+h,w,g,f),h=o(h,u);for(m=y-1,p=-1,u=r+1,w=2;u<=s;++u,w<<=1)for(;U[u]>0;--U[u])(h&m)!==p&&(t+=g,b=a(U,u,r),g=1<<b,y+=g,p=h&m,e[v+p]=new n(b+r&255,t-v-p&65535)),f=new n(u-r&255,65535&A[c++]),i(e,t+(h>>r),w,g,f),h=o(h,u);return y}},"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;n<r;n++)e[t+n]=this.buffer[this.pos+n];return this.pos+=r,r},r.BrotliInput=n,o.prototype.write=function(e,t){if(this.pos+t>this.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<e.length;n++)this.prefix[n]=e.charCodeAt(n);for(var n=0;n<r.length;n++)this.suffix[n]=r.charCodeAt(n)}function o(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}var i=e("./dictionary");const a=0,s=1,d=2,l=3,f=4,u=5,c=6,h=7,w=8,p=9,m=10,b=11,g=12,y=13,A=14,v=15,U=16,x=17,k=18,E=20;var B=[new n("",a,""),new n("",a," "),new n(" ",a," "),new n("",g,""),new n("",m," "),new n("",a," the "),new n(" ",a,""),new n("s ",a," "),new n("",a," of "),new n("",m,""),new n("",a," and "),new n("",y,""),new n("",s,""),new n(", ",a," "),new n("",a,", "),new n(" ",m," "),new n("",a," in "),new n("",a," to "),new n("e ",a," "),new n("",a,'"'),new n("",a,"."),new n("",a,'">'),new n("",a,"\n"),new n("",l,""),new n("",a,"]"),new n("",a," for "),new n("",A,""),new n("",d,""),new n("",a," a "),new n("",a," that "),new n(" ",m,""),new n("",a,". "),new n(".",a,""),new n(" ",a,", "),new n("",v,""),new n("",a," with "),new n("",a,"'"),new n("",a," from "),new n("",a," by "),new n("",U,""),new n("",x,""),new n(" the ",a,""),new n("",f,""),new n("",a,". The "),new n("",b,""),new n("",a," on "),new n("",a," as "),
|