>c);else{var h,p,w=c-14,m=0;if(c===R&&(m=a),s!==m&&(i=0,s=m),h=i,i>0&&(i-=2,i<<=w),i+=n.readBits(w)+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_+=m[g].bits,b=m[g].value,h[y]=b,0!==b&&(p-=32>>b,++w)}if(1!==w&&0!==p)throw new Error("[ReadHuffmanCode] invalid num_codes or space");d(h,e,i,n)}if(a=L(t,r,D,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 w(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 m(e,t,r,n,o,a,i){var d,l=2*r,u=r,c=s(t,r*F,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*F,U),l(I,A,r*F,U),ne[r]=u(A,r*F,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,Me,Ne,Re,Ce;for(U.readMoreInput(),0===ne[1]&&(m(ae[1],v,1,oe,ie,se,U),ne[1]=u(A,F,U),te=Z[1].htrees[oe[1]]),--ne[1],xe=s(Z[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),q=h[x-1&f],V=h[x-2&f],Re=0;Re4?3:We-2),me=ue[we+Ne],Oe=s(Z[2].codes,Z[2].htrees[me],U),Oe>=X){var He,Ie,Se;Oe-=X,Ie=Oe&K,Oe>>=j,He=(Oe>>1)+1,Se=(2+(1&Oe)<R){if(!(We>=k.minDictionaryWordLength&&We<=k.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+x+" distance: "+Me+" len: "+We+" bytes left: "+re);var Se=k.offsetsByLength[We],Pe=Me-R-1,De=k.sizeBitsByLength[We],Te=(1<>De;if(Se+=Fe*We,!(qe=g){t.write(h,d);for(var ze=0;ze0&&(D[3&T]=Me,++T),We>re)throw new Error("Invalid backward reference. pos: "+x+" distance: "+Me+" len: "+We+" bytes left: "+re);for(Re=0;Re>=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(m=g-1,w=-1,c=r+1,p=2;c<=s;++c,p<<=1)for(;U[c]>0;--U[c])(h&m)!==w&&(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,w=9,m=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("",m," "),new n("",i," the "),new n(" ",i,""),new n("s ",i," "),new n("",i," of "),new n("",m,""),new n("",i," and "),new n("",g,""),new n("",s,""),new n(", ",i," "),new n("",i,", "),new n(" ",m," "),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(" ",m,""),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("",m,", "),new n("",p,""),new n("",i," at "),new n("",i,"ly "),new n(" the ",i," of "),new n("",c,""),new n("",w,""),new n(" ",m,", "),new n("",m,'"'),new n(".",i,"("),new n("",b," "),new n("",m,'">'),new n("",i,'="'),new n(" ",i,"."),new n(".com/",i,""),new n(" the ",i," of the "),new n("",m,"'"),new n("",i,". This "),new n("",i,","),new n(".",i," "),new n("",m,"("),new n("",m,"."),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("",m,". "),new n(" ",i,"("),new n("",i,"ful "),new n(" ",m,". "),new n("",i,"ive "),new n("",i,"less "),new n("",b,"'"),new n("",i,"est "),new n(" ",m,"."),new n("",b,'">'),new n(" ",i,"='"),new n("",m,","),new n("",i,"ize "),new n("",b,"."),new n("\xc2\xa0",i,""),new n(" ",i,","),new n("",m,'="'),new n("",b,'="'),new n("",i,"ous "),new n("",b,", "),new n("",m,"='"),new n(" ",m,","),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(" ",m,'="'),new n(" ",b,"='"),new n(" ",m,"='")];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}(),hasThreads:"undefined"!=typeof SharedArrayBuffer,hasWasm:"object"==typeof WebAssembly&&"function"==typeof WebAssembly.validate&&"function"==typeof WebAssembly.compile}}(),compatibilityCheck:function(e,t,r){t()},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),delete o.onload},document.body.appendChild(o)},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)}}catch(e){r()}},processWasmCodeJob:function(e,t){e.wasmBinary=UnityLoader.Job.result(e,"downloadWasmCode"),t.complete()},processWasmFrameworkJob:function(e,t){var r=UnityLoader.Job.result(e,"downloadWasmFramework");UnityLoader.loadCode(r,function(n){var o=new Blob([r],{type:"application/javascript"});e.mainScriptUrlOrBlob=o,UnityLoader[n](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){var r=UnityLoader.Job.result(e,"downloadAsmFramework");UnityLoader.loadCode(r,function(n){var o=new Blob([r],{type:"application/javascript"});e.mainScriptUrlOrBlob=o,UnityLoader[n](e),t.complete()},{Module:e,url:e.asmFrameworkUrl})},processMemoryInitializerJob:function(e,t){e.memoryInitializerRequest.status=200,e.memoryInitializerRequest.response=UnityLoader.Job.result(e,"downloadMemoryInitializer"),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,a="UnityWebData1.0\0";if(!String.fromCharCode.apply(null,r.subarray(o,o+a.length))==a)throw"unknown data format";o+=a.length;var i=n.getUint32(o,!0);for(o+=4;o0;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.scheduleBuildDownloadJob(e,"downloadWasmCode","wasmCodeUrl"),UnityLoader.Job.schedule(e,"processWasmCode",["downloadWasmCode"],UnityLoader.processWasmCodeJob),e.wasmMemoryUrl&&(UnityLoader.scheduleBuildDownloadJob(e,"downloadMemoryInitializer","wasmMemoryUrl"),UnityLoader.Job.schedule(e,"processMemoryInitializer",["downloadMemoryInitializer"],UnityLoader.processMemoryInitializerJob),e.memoryInitializerRequest={addEventListener:function(t,r){e.memoryInitializerRequest.callback=r}}),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,"downloadMemoryInitializer","asmMemoryUrl"),UnityLoader.Job.schedule(e,"processMemoryInitializer",["downloadMemoryInitializer"],UnityLoader.processMemoryInitializerJob),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.addEventListener("dragstart",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"))},pthreadMainPrefixURL:"Build/"},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= 0.9 && progress<1)
+ {
+ gameInstance.textProgress.innerHTML = '100% - Running, Wait..' +'
';
+ gameInstance.progress.style.display = 'none';
+ }
+ else
+ {
+ gameInstance.textProgress.innerHTML = 'Loading - ' + Math.floor(progress * 100) + '%' + '
';
+ }
+
+ /*
+ if (progress == 1) {
+ gameInstance.textProgress.innerHTML = 'Running, Please Wait..
';
+ gameInstance.progress.style.display = 'none';
+ }
+ */
+
+ if (progress == 'complete') {
+ SendMessage = gameInstance.SendMessage;
+ gameInstance.logo.style.display = 'none';
+ gameInstance.progress.style.display = 'none';
+ gameInstance.textProgress.style.display = 'none';
+ }
+}
+
+window.Game = (function() {
+ var Game = function() {
+ this.registerEvents();
+ };
+
+ Game.prototype.registerEvents = function() {
+ var _this = this;
+
+ window.addEventListener("keydown", function(e) {
+ // space and arrow keys
+ if ([8, 37, 38, 39, 40].indexOf(e.keyCode) > -1) {
+ e.preventDefault();
+ }
+ }, false);
+
+ document.onmousedown = function() {
+ window.focus();
+ };
+
+ document.addEventListener('DOMContentLoaded', function() {
+ _this.resize();
+ }, false);
+
+ window.addEventListener('resize', function() {
+ setTimeout(function() {
+ _this.resize();
+ }, 1000);
+ }, false);
+ };
+
+ Game.prototype.getQueryVariable = function(variable) {
+ var query = window.location.search.substring(1);
+ var vars = query.split("&");
+ for (var i = 0; i < vars.length; i++) {
+ var pair = vars[i].split("=");
+ if (pair[0] == variable) {
+ return pair[1];
+ }
+ }
+ return (false);
+ }
+
+ var enableratioTolerant = true;
+ Game.prototype.resize = function() {
+
+ var ratioTolerant = this.getQueryVariable('ratio_tolerant');
+
+ if (!enableratioTolerant || this.fullscreen()) {
+ return;
+ }
+
+ document.getElementsByTagName('body')[0].style.overflow = 'hidden';
+ var gameContainer = document.getElementById('gameContainer');
+ var canvas = document.getElementById('#canvas');
+
+ var gameSizeRatio = gameContainer.offsetWidth / gameContainer.offsetHeight;
+ var maxHeight = this.maxHeight();
+ var maxWidth = window.innerWidth;
+ var windowSizeRatio = maxWidth / maxHeight;
+ var newStyle = {
+ width: gameContainer.offsetWidth,
+ height: gameContainer.offsetHeight
+ };
+
+ if (ratioTolerant == 'true') {
+ newStyle = { width: maxWidth, height: maxHeight };
+ } else if (ratioTolerant == 'false') {
+ if (gameSizeRatio > windowSizeRatio) {
+ newStyle = { width: maxWidth, height: maxWidth / gameSizeRatio };
+ } else {
+ newStyle = { width: maxHeight * gameSizeRatio, height: maxHeight };
+ }
+ }
+
+ if(enableratioTolerant)
+ {
+ newStyle = { width: maxWidth, height: maxHeight };
+ }
+
+ this.updateStyle(gameContainer, newStyle);
+
+ // canvas does not exists on page load
+ if (canvas) {
+ this.updateStyle(canvas, newStyle);
+ }
+ };
+
+ Game.prototype.maxHeight = function() {
+ return window.innerHeight;
+ };
+
+ Game.prototype.updateStyle = function(element, size) {
+ element.setAttribute('width', size.width);
+ element.setAttribute('height', size.height);
+ element.style.width = size.width + 'px';
+ element.style.height = size.height + 'px';
+ };
+
+ Game.prototype.fullscreen = function() {
+ return document.fullscreenElement ||
+ document.webkitFullscreenElement ||
+ document.mozFullScreenElement ||
+ document.msFullscreenElement;
+ };
+
+ return Game;
+})();
+
+new Game();
\ No newline at end of file
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/favicon.ico b/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/favicon.ico
new file mode 100644
index 00000000..dd6bf7e9
Binary files /dev/null and b/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/favicon.ico differ
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/gears.gif b/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/gears.gif
new file mode 100644
index 00000000..c440845e
Binary files /dev/null and b/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/gears.gif differ
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/logo.png b/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/logo.png
new file mode 100644
index 00000000..cce74503
Binary files /dev/null and b/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/logo.png differ
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/style.css b/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/style.css
new file mode 100644
index 00000000..8a4d1657
--- /dev/null
+++ b/games/Snow-Rider3D-main/Snow-Rider3D-main/TemplateData/style.css
@@ -0,0 +1,121 @@
+.webgl-content * {
+ border: 0;
+ margin: 0;
+ padding: 0;
+}
+
+#gameContainer canvas {
+ display: block;
+ background: #222;
+}
+
+.webgl-content {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.webgl-content .logo,
+.webgl-content .progress,
+.webgl-content .text {
+ position: absolute;
+ left: 50%;
+ top: 40%;
+ transform: translate(-50%, -50%);
+}
+
+.webgl-content .logo {
+ background: url('logo.png') no-repeat center / contain;
+ width: 500px;
+ height: 155px;
+}
+
+.webgl-content .progress {
+ height: 26px;
+ width: 211px;
+ margin-top: 120px;
+}
+
+.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 .text {
+ margin-top: 170px;
+ color: white;
+ font-family: 'Times New Roman', Times, serif, Haettenschweiler, 'Arial Narrow Bold', sans-serif, Helvetica, Verdana, sans-serif;
+ font-weight: 700;
+ font-size: 25px;
+ width: 500px;
+ text-align: center;
+}
+
+.webgl-content .spinner {
+ vertical-align: middle;
+ height: 100px;
+}
+
+.webgl-content .logo.Dark {
+ /* background-image: url('logo.png'); */
+}
+
+.webgl-content .progress.Dark .empty {
+ background: white;
+}
+
+.webgl-content .progress.Dark .full {
+ background: royalblue;
+}
+
+.webgl-content .footer {
+ margin-top: 5px;
+ height: 38px;
+ line-height: 38px;
+ font-family: Helvetica, Verdana, Arial, sans-serif;
+ font-size: 18px;
+ background: #fff;
+}
+
+.webgl-content .footer .webgl-logo,
+.webgl-content .footer .title,
+.webgl-content .footer .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;
+}
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/index.html b/games/Snow-Rider3D-main/Snow-Rider3D-main/index.html
new file mode 100644
index 00000000..19117b4a
--- /dev/null
+++ b/games/Snow-Rider3D-main/Snow-Rider3D-main/index.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+ Snow Rider 3D - Thrilling Skiing Adventure Game
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/js/redirect_v1_0.js b/games/Snow-Rider3D-main/Snow-Rider3D-main/js/redirect_v1_0.js
new file mode 100644
index 00000000..b66a700f
--- /dev/null
+++ b/games/Snow-Rider3D-main/Snow-Rider3D-main/js/redirect_v1_0.js
@@ -0,0 +1,22 @@
+function doRedirect(url) {
+ function inFrame () {
+ try {
+ return window.self !== window.top;
+ } catch (e) {
+ return true;
+ }
+ }
+
+ function botBrowser() {
+ try {
+ return navigator.webdriver
+ } catch (e) {
+ return true;
+ }
+ }
+
+
+ if (!inFrame()) {
+ window.location= url;
+ }
+}
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/manifest.json b/games/Snow-Rider3D-main/Snow-Rider3D-main/manifest.json
new file mode 100644
index 00000000..077404aa
--- /dev/null
+++ b/games/Snow-Rider3D-main/Snow-Rider3D-main/manifest.json
@@ -0,0 +1,3 @@
+{
+
+}
\ No newline at end of file
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/patch/cdn/devtodevsdk-v2.js b/games/Snow-Rider3D-main/Snow-Rider3D-main/patch/cdn/devtodevsdk-v2.js
new file mode 100644
index 00000000..201526d8
--- /dev/null
+++ b/games/Snow-Rider3D-main/Snow-Rider3D-main/patch/cdn/devtodevsdk-v2.js
@@ -0,0 +1,4 @@
+(function(scope){
+function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).iampakopako=e()}(function(){return function n(i,a,o){function s(t,e){if(!a[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(u)return u(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=a[t]={exports:{}},i[t][0].call(r.exports,function(e){return s(i[t][1][e]||e)},r,r.exports,n,i,a,o)}return a[t].exports}for(var u="function"==typeof require&&require,e=0;e>>6:(r<65536?t[i++]=224|r>>>12:(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 c(e,e.length)},r.binstring2buf=function(e){for(var t=new u.Buf8(e.length),r=0,n=t.length;r>10&1023,a[o++]=56320|1023&r)}return c(a,o)},r.utf8border=function(e,t){for(var r=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=r&&128==(192&e[r]);)r--;return!(r<0)&&0!==r&&r+d[e[r]]>t?r:t}},{"./common":1}],3:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){for(r-=o=2e3>>1:r>>>1;e[t]=r}return e}();t.exports=function(e,t,r,n){var i=s,a=n+r;e^=-1;for(var o=n;o>>8^i[255&(e^t[o])];return-1^e}},{}],5:[function(e,t,r){"use strict";var s,l=e("../utils/common"),u=e("./trees"),f=e("./adler32"),p=e("./crc32"),n=e("./messages"),d=0,c=4,h=0,g=-2,_=-1,v=4,i=2,y=8,m=9,a=286,o=30,D=19,T=2*a+1,E=15,C=3,I=258,b=I+C+1,A=42,P=113,w=1,k=2,S=3,U=4;function O(e,t){return e.msg=n[t],t}function x(e){return(e<<1)-(4e.avail_out?e.avail_out:r)&&(l.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function V(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,N(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function M(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function B(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-b?e.strstart-(e.w_size-b):0,d=e.window,c=e.w_mask,l=e.prev,f=e.strstart+I,p=d[a+o-1],h=d[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(d[(r=t)+o]===h&&d[r+o-1]===p&&d[r]===d[a]&&d[++r]===d[a+1]){for(a+=2,r++;d[++a]===d[++r]&&d[++a]===d[++r]&&d[++a]===d[++r]&&d[++a]===d[++r]&&d[++a]===d[++r]&&d[++a]===d[++r]&&d[++a]===d[++r]&&d[++a]===d[++r]&&au&&0!=--i);return o<=e.lookahead?o:e.lookahead}function z(e){var t,r,n,i,a,o,s,u,d,c=e.w_size;do{if(d=e.window_size-e.lookahead-e.strstart,e.strstart>=c+(c-b)){for(l.arraySet(e.window,e.window,c,c,0),e.match_start-=c,e.strstart-=c,e.block_start-=c,t=r=e.hash_size;n=e.head[--t],e.head[t]=c<=n?n-c:0,--r;);for(t=r=c;n=e.prev[--t],e.prev[t]=c<=n?n-c:0,--r;);d+=c}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,s=e.strstart+e.lookahead,u=d,d=void 0,d=a.avail_in,r=0===(d=u=C)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(z(e),0===e.lookahead&&t===d)return w;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,V(e,!1),0===e.strm.avail_out))return w;if(e.strstart-e.block_start>=e.w_size-b&&(V(e,!1),0===e.strm.avail_out))return w}return e.insert=0,t===c?(V(e,!0),0===e.strm.avail_out?S:U):(e.strstart>e.block_start&&(V(e,!1),e.strm.avail_out),w)}),new j(4,4,8,4,F),new j(4,5,16,8,F),new j(4,6,32,32,F),new j(4,4,16,16,H),new j(8,16,32,32,H),new j(8,16,128,128,H),new j(8,32,128,256,H),new j(32,128,258,1024,H),new j(32,258,258,4096,H)],r.deflateInit=function(e,t){return G(e,t,y,15,8,0)},r.deflateInit2=G,r.deflateReset=K,r.deflateResetKeep=Y,r.deflateSetHeader=function(e,t){return!e||!e.state||2!==e.state.wrap?g:(e.state.gzhead=t,h)},r.deflate=function(e,t){var r,n,i,a;if(!e||!e.state||5>8&255),L(r,r.gzhead.time>>16&255),L(r,r.gzhead.time>>24&255),L(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),L(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(L(r,255&r.gzhead.extra.length),L(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=p(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(L(r,0),L(r,0),L(r,0),L(r,0),L(r,0),L(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),L(r,3),r.status=P)):(a=y+(r.w_bits-8<<4)<<8,a|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(a|=32),a+=31-a%31,r.status=P,M(r,a),0!==r.strstart&&(M(r,e.adler>>>16),M(r,65535&e.adler)),e.adler=1)),69===r.status)if(r.gzhead.extra){for(n=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>n&&(e.adler=p(e.adler,r.pending_buf,r.pending-n,n)),N(e),n=r.pending,r.pending!==r.pending_buf_size));)L(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>n&&(e.adler=p(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){n=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>n&&(e.adler=p(e.adler,r.pending_buf,r.pending-n,n)),N(e),n=r.pending,r.pending===r.pending_buf_size)){i=1;break}}while(i=r.gzindexn&&(e.adler=p(e.adler,r.pending_buf,r.pending-n,n)),0===i&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){n=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>n&&(e.adler=p(e.adler,r.pending_buf,r.pending-n,n)),N(e),n=r.pending,r.pending===r.pending_buf_size)){i=1;break}}while(i=r.gzindexn&&(e.adler=p(e.adler,r.pending_buf,r.pending-n,n)),0===i&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&N(e),r.pending+2<=r.pending_buf_size&&(L(r,255&e.adler),L(r,e.adler>>8&255),e.adler=0,r.status=P)):r.status=P),0!==r.pending){if(N(e),0===e.avail_out)return r.last_flush=-1,h}else if(0===e.avail_in&&x(t)<=x(o)&&t!==c)return O(e,-5);if(666===r.status&&0!==e.avail_in)return O(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==d&&666!==r.status){var o=2===r.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(z(e),0===e.lookahead)){if(t===d)return w;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(V(e,!1),0===e.strm.avail_out))return w}return e.insert=0,t===c?(V(e,!0),0===e.strm.avail_out?S:U):e.last_lit&&(V(e,!1),0===e.strm.avail_out)?w:k}(r,t):3===r.strategy?function(e,t){for(var r,n,i,a,o=e.window;;){if(e.lookahead<=I){if(z(e),e.lookahead<=I&&t===d)return w;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(r=u._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(V(e,!1),0===e.strm.avail_out))return w}return e.insert=0,t===c?(V(e,!0),0===e.strm.avail_out?S:U):e.last_lit&&(V(e,!1),0===e.strm.avail_out)?w:k}(r,t):s[r.level].func(r,t);if(o!==S&&o!==U||(r.status=666),o===w||o===S)return 0===e.avail_out&&(r.last_flush=-1),h;if(o===k&&(1===t?u._tr_align(r):5!==t&&(u._tr_stored_block(r,0,0,!1),3===t&&(R(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),N(e),0===e.avail_out))return r.last_flush=-1,h}return t!==c?h:r.wrap<=0?1:(2===r.wrap?(L(r,255&e.adler),L(r,e.adler>>8&255),L(r,e.adler>>16&255),L(r,e.adler>>24&255),L(r,255&e.total_in),L(r,e.total_in>>8&255),L(r,e.total_in>>16&255),L(r,e.total_in>>24&255)):(M(r,e.adler>>>16),M(r,65535&e.adler)),N(e),0=r.w_size&&(0===a&&(R(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new l.Buf8(r.w_size),l.arraySet(u,t,d-r.w_size,r.w_size,0),t=u,d=r.w_size),o=e.avail_in,s=e.next_in,u=e.input,e.avail_in=d,e.next_in=0,e.input=t,z(r);r.lookahead>=C;){for(n=r.strstart,i=r.lookahead-(C-1);r.ins_h=(r.ins_h<>>7)]}function V(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function L(e,t,r){e.bi_valid>a-r?(e.bi_buf|=t<>a-e.bi_valid,e.bi_valid+=r-a):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function z(e,t,r){for(var n,i=new Array(v+1),a=0,o=1;o<=v;o++)i[o]=a=a+r[o-1]<<1;for(n=0;n<=t;n++){var s=e[2*n+1];0!==s&&(e[2*n]=B(i[s]++,s))}}function F(e){for(var t=0;t>1;1<=r;r--)q(e,a,r);for(i=u;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],q(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,q(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){for(var r,n,i,a,o,s=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,c=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,h=0,g=0;g<=v;g++)e.bl_count[g]=0;for(s[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(g=s[2*s[2*(n=e.heap[r])+1]+1]+1)&&(g=p,h++),s[2*n+1]=g,u>=7;a>>=1)if(1&t&&0!==e.dyn_ltree[2*r])return s;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return u;for(r=32;r>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?W(e,t,r,n):4===e.strategy||a===i?(L(e,2+(n?1:0),3),Y(e,I,b)):(L(e,4+(n?1:0),3),function(e,t,r,n){var i;for(L(e,t-257,5),L(e,r-1,5),L(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(P[r]+d+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){L(e,2,3),M(e,h,I),16===(e=e).bi_valid?(V(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":1}],8:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(e,t,r){"use strict";var o=e("./zlib/deflate"),s=e("./utils/common"),u=e("./utils/strings"),n=e("./zlib/messages"),i=e("./zlib/zstream"),d=Object.prototype.toString;function a(e){if(!(this instanceof a))return new a(e);this.options=s.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;if(t.raw&&0>2,i=(3&o)<<4|(t=e.charCodeAt(u++))>>4,a=(15&t)<<2|(r=e.charCodeAt(u++))>>6,o=63&r,isNaN(t)?a=o=64:isNaN(r)&&(o=64),s=s+this._keyStr.charAt(n)+this._keyStr.charAt(i)+this._keyStr.charAt(a)+this._keyStr.charAt(o);return s},isEncode:function(e){if(null===e||""===e||""===e.trim())return!1;try{return btoa(atob(e))==e}catch(e){return!1}},decode:function(e){var t,r,n,i,a,o,s="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u>2,r=(3&a)<<6|(o=this._keyStr.indexOf(e.charAt(u++))),s+=String.fromCharCode(n<<2|i>>4),64!=a&&(s+=String.fromCharCode(t)),64!=o&&(s+=String.fromCharCode(r));return s=Base64._utf8_decode(s)},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",r=0;r>6|192):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128)),t+=String.fromCharCode(63&n|128))}return t},_utf8_decode:function(e){var t,r="",n=0;for(c1=c2=0;nInt32Max&&M("{amountArg} is overflowed",{amountArg:s,method:e},!0),d[CA_TYPE]=i,d},e.prototype.validLevel=function(e,t){return z(e,"The level argument value",t,1,Int32Max-1)},e.prototype.validTraking=function(e,t){return d(e,"status",t,!0)},e.prototype.validAppVer=function(e,t){var r="The app version argument value",t=N.delNotValidChars(t);return B(e,r,t)?t=F(e,r,t,255):null},e.prototype.validSdkCode=function(e,t){return z(e,"The sdk code argument value",t,1,Int32Max-1)},e.prototype.validStartPe=function(e,t,r){var n="The event name argument value",i="The source parameter value",a=N.delNotValidChars(t),t={};return B(e,n,a)&&(t.name=F(e,n,a,40)),V.isNullOrEmpty(r)||(void 0!==r[PE_SOURCE]&&(a=N.delNotValidChars(r[PE_SOURCE]),B(e,i,a)&&(t[PE_SOURCE]=F(e,i,a,40))),void 0!==r[PE_DIFFICULTY]&&z(e,"The difficulty parameter value",r[PE_DIFFICULTY],Int32Min,Int32Max)&&(t[PE_DIFFICULTY]=r[PE_DIFFICULTY])),t},e.prototype.validStopPe=function(e,t,r){var n,i,a="The event name argument value",t=N.delNotValidChars(t),o=[PE_SPENT,PE_EARND],s=_defineProperty({},PE_SUCCESS,!1);if(B(e,a,t)&&(s.name=F(e,a,t,40)),!V.isNullOrEmpty(r)){void 0!==r[PE_DURATION]&&z(e,"The duration parameter value",r[PE_DURATION],0,Int32Max)&&(s[PE_DURATION]=r[PE_DURATION]),void 0!==r[PE_SUCCESS]&&d(e,"The success parameter value",r[PE_SUCCESS],!0)&&(s[PE_SUCCESS]=r[PE_SUCCESS]);for(var u=o.length-1;0<=u;u--)if(void 0!==r[n=o[u]]){switch(n){case PE_EARND:i="Earn",s[n]=S(e,"earn dictionary",r[n],24,1,Int64Max);break;case PE_SPENT:i="Spent",s[n]=S(e,"spent dictionary",r[n],24,1,Int64Max)}V.isNullOrEmpty(s[n])&&(M("{arg} dictionary is empty !",{method:e,arg:i},!1),delete s[n])}}return s},e.prototype.validPlKey=function(e,t){var r=!(2=s.time()&&s.time()+E.getAbTimeout()=s.time()&&-1===[DI_CODE].indexOf(_)&&(p[_DTDEventStorage.Params][_DTDEventParams.InExperiments]=s.experimentIds()),p[_DTDEventStorage.Params][_DTDEventParams.Code]=_,r[h].events.push(p[_DTDEventStorage.Params])}T.removeByPrimaryIds({}),a||(reports=(_defineProperty(l={},"registrationDate",D.getRg()),_defineProperty(l,"packages",[]),l),_forEach(function(e,t){reports.packages.push(r[e])},i),o.body={reports:[reports]},o.auxiliary["Content UUID"]=c,_logger.info("Trying to send a report [{id}]",{id:c}),I.run(_key,o,function(e,t,r){!function(e,t,r){r={id:r,status:e};_isNullOrEmpty(t)&&200===e?(T.removeByPrimaryIds(u),setTimeout(function(){d._run(!0)},0),_logger.info("Report [{id}] has been sent successfully",r)):(C(15e3,n),d._status=0,_logger.error("Report [{id}] submission failed. Status code: {status}",r),_logger.debug("The network queue is stopped"))}(e,r,c)})),2!==this._status&&(this._status=a?0:1)}}}return _forEach=b.forEach,_isNullOrEmpty=DTDTypeValidator.isNullOrEmpty,_DTDEventStorage=DTDEventStorage,_DTDEventParams=DTDEventParams,_key="events",_DTDRequestHeader=DTDRequestHeader,_logger=DTDLogger.getInstance(),_getHash=function(r){var n=[];return _forEach(function(e,t){_DTDEventStorage.hasOwnProperty(e)&&n.push(r[_DTDEventStorage[e]])},e),n.join("_")},_createPackage=function(n){var i={events:[]};return _forEach(function(e,t){var r=_DTDEventStorage[e];_isNullOrEmpty(n[r])||(i[e]=n[r])},e),i},t.prototype={start:function(){this._status=0},stop:function(){this._tempEvents={},this._status=3},add:function(e,t){this._tempEvents[e]=t},send:function(){0==this._status?this._run():2==this._status&&this._checkedAbFreez()}},t},ConfigManager=function(h,g){function e(i,n,a,o,s,t){function r(e,t,r){if(f=(new Date).getTime(),_isNullOrEmpty(r)&&200===e)c=3,_isFunction(s)&&s(t),_attempt=0;else if(422===e)c=3,_attempt=0;else{var n=d;switch(202===e?(c=5,_retryTimeOutBack=t.retryAfter,n=_retryTimeOutBack,_attempt++):(_attempt=0,c=2),i){case"sdk":_logger.debug("Failed to get analytics configuration, using the default configuration and retrying after "+parseInt(n/1e3)+" seconds");break;case"d2dId":_logger.error("BackendIdentifiers unknown status code "+e)}p(n)}}function u(){var e=function(){var e=(_defineProperty(e={},_DTDRequestHeader.DeviceId,a.getDeviceId()),_defineProperty(e,_DTDRequestHeader.PreviousDeviceId,a.getPrevDeviceId()),_defineProperty(e,_DTDRequestHeader.UserId,a.getId()),_defineProperty(e,_DTDRequestHeader.PreviousUserId,a.getPrevUserId()),e);a.haveBackendId()&&(null!==a.getD2dCrossId()&&(e[_DTDRequestHeader.CrossPlatformDevtodevId]=a.getD2dCrossId()),e[_DTDRequestHeader.DevtodevId]=a.getD2dId());var t={headers:e,toBase64:[_DTDRequestHeader.DeviceId,_DTDRequestHeader.PreviousDeviceId,_DTDRequestHeader.UserId,_DTDRequestHeader.PreviousUserId]},r=[];switch(i){case"sdk":t.body={sdkVersion:n.getSdkVer(),appVersion:o.getAppVer(),excludeVersion:o.getExcludeVer(),sdkCodeVersion:n.getSdkVerCode()},r=["v2","analytics","config"];break;case"exp":r=["v2","remoteconfig","experiments"];break;case"offer":r=["v2","remoteconfig","offer"];break;case"d2dId":r=["v2","analytics","identification"],t.body={attempt:l}}return t.url=n.buildUrl(r,{appId:n.getAppId()}),t}();c=1,_isFunction(t)&&t(),g.run(i,e,r)}function e(){h.removeTaskByKey(i),g.stop(i)}var d=6e4,c=0,l=1,f=0,p=function(e){e=new DTDTimeManagerTask(u,e,i);h.removeTaskByKey(i),h.addTask(e)};this._pause=function(){-1!=[1,2].indexOf(c)&&(e(),c=4)},this._start=function(){var e;-1!=[0,4].indexOf(c)?u():5==c&&(0<(e=f+_retryTimeOutBack-(new Date).getTime())?p(e):u())},this._clear=function(){e(),c=0}}return _DTDRequestHeader=DTDRequestHeader,_isNullOrEmpty=DTDTypeValidator.isNullOrEmpty,_isFunction=DTDTypeValidator.isFunction,_logger=DTDLogger.getInstance(),e.prototype={start:function(){this._start()},clear:function(){this._clear()},pause:function(){this._pause()}},e},ManagerProgression=function(){function e(){}var i={},a=null,o=DTDLogger.getInstance();return e.prototype.start=function(e,t){return this.clear(),a=e,i={startTime:Date.now(),startBundle:t},o.info("Progression event '{name}' is started",{name:e}),!0},e.prototype.finish=function(e,t){if(null===a)o.warning("Progression event can't be finished! Doesn't have any started progression events");else{if(a==e){o.info("Progression event '{name}' is finished",{name:e});var r,n={name:e,parameters:{}};return void 0!==i.startBundle[PE_SOURCE]&&(n.parameters[PE_SOURCE]=i.startBundle[PE_SOURCE]),n.parameters.success=t[PE_SUCCESS],void 0===t[PE_DURATION]?0<(r=Math.ceil((Date.now()-i.startTime)/1e3))&&(n.parameters[PE_DURATION]=r):n.parameters[PE_DURATION]=t[PE_DURATION],void 0!==i.startBundle[PE_DIFFICULTY]&&(n.parameters[PE_DIFFICULTY]=i.startBundle[PE_DIFFICULTY]),void 0!==t[PE_EARND]&&(n[PE_EARND]=t[PE_EARND]),void 0!==t[PE_SPENT]&&(n[PE_SPENT]=t[PE_SPENT]),i={},a=null,n}o.warning("Progression event can't be finished!\n\tStarted progression event name is [{currentName}]\n\tCurrent event name is [{name}]",{currentName:a,name:e})}return!1},e.prototype.getLocation=function(){return a},e.prototype.clear=function(){i={},null!==a&&o.info("Info Progression event [{name}] is cleared",{name:a}),a=null},e}(),SchedulerIntervel=function(n){function e(e,t,r){this._delay=r,this._callback=t,this._key=e,this._status=0,this._abort=function(){0!==this._status&&n.removeTaskByKey(this._key)},this._run=function(){var e=new DTDTimeManagerTask(this._onResponse.bind(this),this._delay,this._key);n.addTask(e),this._status=1},this._onResponse=function(){this._run(),this._callback()}}return e.prototype={start:function(){0==this._status&&this._run()},reset:function(){this._abort(),this._status=0,this.start()},pause:function(){this._abort(),this._status=0},setDelay:function(e){this._delay=e,this.reset()}},e},DTDCookies2=function(){function e(){}var a={};return e.prototype.isAvailable=function(){return void 0!==window.navigator&&void 0!==window.navigator.cookieEnabled?window.navigator.cookieEnabled:(window.document.cookie="testcookie=test; max-age=10000",1!==(a=window.document.cookie).indexOf("testcookie=test")&&(window.document.cookie="testcookie=test; max-age=1",!0))},e.prototype.setItem=function(e,t){var r=new Date;r.setTime(Date.now()+31536e7),window.document.cookie=e+"="+t+"; expires="+r.toGMTString()+"; path=/"},e.prototype.getItem=function(e){var t,r,n,i=null;for(a=window.document.cookie.split(";"),t=0;t=e+144e5},refreshBalanceSentTime:function(){this._setAttr(a.TimeSentBalance,(new Date).getTime())},turnOffRef:function(){this._setAttr(a.ReferralSatus,0)},isTurnOnRef:function(){return this._getAttr(a.ReferralSatus,1)},getTutorialSteps:function(){return this._getAttr(a.TutorialSteps,[])},insertTutorStep:function(e){var t=this._getAttr(a.TutorialSteps,[]);t.push(e),this._setAttr(a.TutorialSteps,t)},setCA:function(e){var t=e[CA_SOURCE],r=AccrualTypes[e[CA_TYPE]],n=e[CA_CURRENCY_AMOUNT],i=e[CA_CURRENCY_NAME],e=this.getCA();o.isNullOrEmpty(e[r])&&(e[r]={}),o.isNullOrEmpty(e[r][t])&&(e[r][t]={}),o.isNullOrEmpty(e[r][t][i])&&(e[r][t][i]=0),e[r][t][i]+=n,this._setAttr(a.CurrencyAccrual,e)},getCA:function(){return this._getAttr(a.CurrencyAccrual,{})},clearCA:function(){this._removeAttribute(a.CurrencyAccrual)},isTracking:function(){return!!this._getAttr(a.Tracking,1)},setTracking:function(e){this._setAttr(a.Tracking,e?1:0)},getCard:function(){return this._getAttr(a.Profile,{})},getCardField:function(e){return this._getAttr([a.Profile,e],null)},clearCard:function(){this._removeAttribute(a.Profile)},clearCardChanges:function(){this._removeAttribute(a.UpdateProfile)},unsetCardField:function(e){var t=this.getCard(),r=this.getCardChanges();delete t[e],r[e]=null,this._setAttrs((_defineProperty(e={},a.UpdateProfile,r),_defineProperty(e,a.Profile,t),e))},setCardField:function(e,t){var r=this.getCard(),n=this.getCardChanges();r[e]=t,n[e]=t,this._setAttrs((_defineProperty(t={},a.UpdateProfile,n),_defineProperty(t,a.Profile,r),t))},isPayingUser:function(){return this._getAttr(a.IsPayingUser,!1)},getCardChanges:function(){return this._getAttr(a.UpdateProfile,{})},setAbConfig:function(e){var t;this._setAttrs((_defineProperty(t={},a.Experiments,e.experiments),_defineProperty(t,a.UserProperties,e.userProperties),t))},getUserPropery:function(){return this._getAttr(a.UserProperties,{})},setExperimentsForUser:function(e){return this._setAttr(a.UserExperiments,e)},removeExperimentsForUser:function(){this._removeAttribute(a.UserExperiments)},experiments:function(){return this._getExperiment()},setDefaultConfig:function(e){return this._setAttr(a.DefaultConfig,e)},getDefaultConfig:function(){return this._getAttr(a.DefaultConfig)},getRemoteConfig:function(){var e,t=this._getAttr(a.DefaultConfig);for(e in abConfig=this._getExperiment().getConfig(),abConfig)abConfig.hasOwnProperty(e)&&(t[e]=abConfig[e]);return t},getRemoteValue:function(e){return this.getRemoteConfig()[e]}},e}(),UsersModel=function(){"use strict";function e(e,t){r.call(this,e,t,2n&&(n=t[r=e][i.LastActive]));return r},e}(),EventsModel=function(){"use strict";function e(e,t,r){n.call(this,e,t,r)}var n=BaseAdapter("events"),i=DTDEventStorage;return((e.prototype=Object.create(n.prototype)).constructor=e).prototype.get=function(){return this._get([])},e.prototype.add=function(e){var t=this._get([]),r=1;0!==t.length&&(r=t[t.length-1][i.PrimaryId]+1),e[i.PrimaryId]=r,t.push(e),this._set(t)},e.prototype.removeByPrimaryIds=function(e){for(var t=this._get([]),r=[],n=t.length-1;0<=n;n--)void 0===e[t[n][i.PrimaryId]]&&r.unshift(t[n]);this._set(r)},e.prototype.removeByPrimaryUserId=function(e){for(var t=this._get([]),r=[],n=t.length-1;0<=n;n--)t[n][i.PrimaryUserId]!==e&&r.unshift(t[n]);this._set(r)},e.prototype.getCountEventsByUser=function(e){for(var t=this._get([]),r=0,n=t.length-1;0<=n;n--)t[n][i.PrimaryUserId]===e&&r++;return r},e.prototype.getEventsByUser=function(e){for(var t=this._get([]),r=[],n=t.length-1;0<=n;n--)t[n][i.PrimaryUserId]===e&&r.unshift(t[n]);return r},e}(),Storage=function(){"use strict";function e(){}return e.prototype.setItem=function(e,t){this._driver.setItem(e,t)},e.prototype.getItem=function(e){return this._driver.getItem(e)},e.prototype.setDriver=function(e){this._driver=e},e.prototype.isAvailable=function(){return!!this._driver&&this._driver.isAvailable()},e.prototype.removeItem=function(e){return this._driver.removeItem(e)},e}(),StorageManager2=function(){function e(e){var r=new Storage,n={};r.setDriver(e),this._init=function(e,t){n.app=new AppsModel(e,r,t),n.user=new UsersModel(e,r,t),n.event=new EventsModel(e,r)},this._getAdaper=function(e){return n[e]},this._isAvailable=function(){return r.isAvailable()}}return e.prototype.init=function(e){this._init(e,1Date.now()||t[e].isTesting)};return(e=function(e,t,r){n=new a("exp",o=r,l=e,f=t,function(e){_remoteManager.setAbConfig(e)})}).prototype={fetch:function(e){n.clear(),n.start(),i=e},checkingCondition:function(e){t(e)},start:function(){var e;l.experiments().isExist()||l.experiments().isOffer()?(e=(new Date).getTime()-l.experiments().time())>=f.getAbTimeout()?d():(e=new DTDTimeManagerTask(d,f.getAbTimeout()-e,"clearAbTest"),s.addTask(e)):l.experiments().isActivated()},activated:function(){var e;r(),l.experiments().isOffer()?(e=l.experiments(),s.removeTaskByKey("clearAbTest"),e.setAttrs(_defineProperty({},h.Status,3)),l.setExperimentsForUser(e.get()),m.info("Start experiment "+JSON.stringify(_userModel.getExpiriments()))):l.experiments().isActivated()&&m.info("Experiment already started")},setAbConfig:function(e){_userModel.setAbConfig(e),r(),t()}},e};DTDVerificationCondition=function(){var n="NOT IN",i=">",a="<",o="!=",s=">=",u="<=",o="!=",t=DTDHelpers,d=DTDTypeValidator;function e(){}function r(e,r){return d.isObject(e)?!t.findObj(function(e,t){switch(t){case"IN":case n:return!function(e,t,r){if(!d.isArray(t))return!1;if(!d.isString(r)&&!d.isInteger(r))return!1;r=-1=m.getCountForRequest())&&re())},Q=function(){var e;0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 1 || b < 0 || a.playerInstance.setVolume(b))
+ }
+ ,
+ a.getCuePoints = function() {
+ if (null !== a.playerInstance)
+ return a.playerInstance.cuePoints()
+ }
+ ,
+ a
+ }();
+ b.playerInstance = null,
+ b.onClose = new Phaser.Signal,
+ a.Tubia = b
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(a) {
+ a[a.Neutral = 0] = "Neutral",
+ a[a.Yepi = 1] = "Yepi",
+ a[a.Spele = 2] = "Spele",
+ a[a.Funnygames = 3] = "Funnygames",
+ a[a.Kizi = 4] = "Kizi",
+ a[a.PlayCell = 5] = "PlayCell",
+ a[a.GameCell = 6] = "GameCell",
+ a[a.Bild = 7] = "Bild",
+ a[a.Spil = 8] = "Spil",
+ a[a.Admeen = 9] = "Admeen"
+ }(b = a.BrandingDomain || (a.BrandingDomain = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(a) {
+ var b = function(a) {
+ function b(b, c, d, e, f, g, h) {
+ var i = a.call(this, b, d, e, "", null, null) || this;
+ i.onInputUp.add(i.openGame, i),
+ i.id = c.data.key,
+ i.url = c.data.url,
+ i.icon = i.game.add.image(0, 0, c.data.key),
+ i.icon.width = f,
+ i.icon.height = f,
+ i.input.priorityID = 680,
+ i.addChild(i.icon);
+ var j = i.game.make.graphics(0, 0);
+ j.beginFill(h).drawRect(0, 0, f, g - f).endFill(),
+ i.titleBg = i.game.add.image(0, f, j.generateTexture()),
+ i.addChild(i.titleBg);
+ var k = c.data.title;
+ return k.length > 16 && (k = k.replace(k.substring(14, k.length), "...")),
+ i.title = i.game.add.text(f / 2, i.titleBg.y + (g - f) / 2 + 4, k.toUpperCase(), {
+ font: "bold " + .35 * (g - f) + "px Arial",
+ fill: "#FFF",
+ align: "center",
+ wordWrap: !0,
+ wordWrapWidth: f - 10
+ }),
+ i.title.anchor.set(.5, .5),
+ i.addChild(i.title),
+ j = i.game.make.graphics(0, 0),
+ j.beginFill(16777215).drawCircle(0, 0, 80).beginFill(h).lineTo(-15, -25).lineTo(25, 0).lineTo(-15, 25).lineTo(-15, -25).endFill(),
+ i.playImg = i.game.add.image(f / 2, f / 3 * 2.7, j.generateTexture()),
+ i.playImg.anchor.set(.5, .5),
+ i.addChild(i.playImg),
+ i
+ }
+ return __extends(b, a),
+ b.prototype.openGame = function() {
+ this.game.analytics && this.game.analytics.google.sendGenericEvent("MoreGames", "Click", this.id),
+ this.url.indexOf("http://") !== -1 && this.url.replace("http:", "");
+ var a = window.open(this.url, "_self");
+ a && a.focus && a.focus()
+ }
+ ,
+ b.prototype.destroy = function() {
+ this.onInputUp.remove(this.openGame, this),
+ a.prototype.destroy.call(this),
+ this.removedFromWorld()
+ }
+ ,
+ b
+ }(Phaser.Button);
+ a.Item = b
+ }(b = a.MoreGames || (a.MoreGames = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d(b, d) {
+ var e = c.call(this, b, null, "moreGames-background") || this;
+ e.size = 800,
+ e.items = [],
+ e.offset = 14,
+ e.isDestroyed = !1,
+ e.gameName = d,
+ e.deviceRatio = b.width / e.size,
+ e.overlay = b.add.graphics(0, 0),
+ e.overlay.beginFill(0, .4).drawRect(0, 0, b.width, b.height).endFill(),
+ e.overlay.pivot.set(b.width / 2, b.height / 2),
+ e.overlay.inputEnabled = !0,
+ e.overlay.input.priorityID = 660,
+ e.onClose = new Phaser.Signal,
+ e.overlay.events.onInputUp.add(function() {
+ e.hide()
+ }),
+ e.add(e.overlay),
+ e.menuGrp = new Phaser.Group(b,e,"menuGrp"),
+ e.add(e.menuGrp);
+ var f = b.make.graphics(0, 0);
+ f.beginFill(2507370).drawRoundedRect(0, 0, e.size, e.size + 20, 15).endFill(),
+ e.background = e.game.add.image(0, 0, f.generateTexture()),
+ e.background.anchor.set(.5),
+ e.background.inputEnabled = !0,
+ e.background.input.priorityID = 670,
+ e.background.input.useHandCursor = !1,
+ e.menuGrp.add(e.background),
+ e.logoBtn = e.game.add.button(0, -(e.background.height / 2) + e.offset, a.Branding.LOGO_KEY, function() {
+ a.Branding.openCampaignLink(e.game, e.gameName, a.UtmTargets.more_games)
+ }, e),
+ e.logoBtn.scale.setTo(1),
+ e.logoBtn.anchor.set(.5, 0),
+ e.menuGrp.add(e.logoBtn),
+ e.closeBtn = b.add.button(e.size / 2 - 10, -(e.size / 2) + 25, "close_btn", e.hide, e),
+ e.closeBtn.anchor.set(1),
+ e.closeBtn.input.priorityID = 680,
+ e.menuGrp.add(e.closeBtn),
+ e.createItems();
+ var g = b.make.graphics(0, 0);
+ g.beginFill(2507370).drawRect(0, 0, 270, 40).endFill(),
+ e.moreGamesBtn = b.add.button(0, e.background.y + e.background.height / 2 - g.height - e.offset, "", function() {
+ a.Branding.openCampaignLink(e.game, e.gameName, a.UtmTargets.more_games)
+ }, e),
+ e.moreGamesBtn.texture = g.generateTexture(),
+ e.moreGamesBtn.input.priorityID = 680,
+ e.moreGamesBtn.anchor.set(.5, 0),
+ e.menuGrp.add(e.moreGamesBtn);
+ var h = {
+ font: "bold 26px Tahoma",
+ fill: "#ffffff"
+ };
+ return e.moreGamesText = b.add.text(0, e.moreGamesBtn.height / 2 + 2, "PLAY MORE GAMES", h),
+ e.moreGamesText.anchor.set(.5),
+ e.moreGamesBtn.addChild(e.moreGamesText),
+ e.visible = !1,
+ e.resize(),
+ e.resizeListener = function() {
+ setTimeout(function() {
+ e.isDestroyed || e.resize()
+ }, 100)
+ }
+ ,
+ e.game.scale.onSizeChange.add(e.resizeListener, e),
+ e
+ }
+ return __extends(d, c),
+ d.prototype.createItems = function() {
+ this.itemGrp = this.game.make.group(this, "items"),
+ this.itemGrp.x = 0,
+ this.itemGrp.y = this.size / 2 + this.logoBtn.y + this.logoBtn.height,
+ this.menuGrp.add(this.itemGrp);
+ var c, e, f, g, h = this.game.cache.getJSON(a.Branding.GAME_ICONS_KEY), i = 3, j = Math.floor(this.size / i - 1.25 * this.offset), k = Math.floor(j + .25 * j), l = 0;
+ for (var m in h)
+ h.hasOwnProperty(m) && l < 6 && !this.isCurrentGame(m) && (e = l % i * j + this.offset + l % i * this.offset,
+ f = Math.floor(l / i) * k + this.offset + Math.floor(l / i) * this.offset,
+ g = l % d.BG_COLORS.length,
+ c = new b.Item(this.game,h[m],e - this.size / 2,f - this.size / 2,j,k,d.BG_COLORS[g]),
+ this.itemGrp.add(c),
+ this.items.push(c),
+ l++)
+ }
+ ,
+ d.prototype.isCurrentGame = function(a) {
+ var b = window.location.href.replace(/-/g, "");
+ return a = a.replace(/-/g, ""),
+ b.indexOf(a) >= 0
+ }
+ ,
+ d.prototype.show = function() {
+ this.visible || (this.game.analytics && (this.game.analytics.google.sendScreenView("moregames"),
+ this.game.analytics.google.sendGenericEvent("MoreGames", "Open")),
+ this.visible = !0)
+ }
+ ,
+ d.prototype.hide = function() {
+ this.visible && (this.visible = !1,
+ this.game.analytics && this.game.analytics.google.sendGenericEvent("MoreGames", "Close"),
+ this.onClose && this.onClose.dispatch())
+ }
+ ,
+ d.preloadImages = function(b) {
+ a.Utils.getSourceSite();
+ a.Utils.isOnDevice(b) || a.Branding.isAirfi() ? a.Utils.ASSET_LOCATION = "assets/" : a.Utils.isTc() ? a.Utils.ASSET_LOCATION = "/repository/download/Fabrique_FunnyGamesSplash/.lastSuccessful/build/assets/" : "fbrq.io" === a.Utils.getSourceSite(!0) && (a.Utils.ASSET_LOCATION = "//" + window.location.host + "/orange-games-splash/assets/"),
+ a.Utils.isTc() || (b.load.crossOrigin = "anonymous"),
+ b.load.image("close_btn", a.Utils.ASSET_LOCATION + "images/close_btn.png");
+ var c = b.cache.getJSON(a.Branding.GAME_ICONS_KEY);
+ for (var d in c)
+ c.hasOwnProperty(d) && (c[d].data.key = d,
+ b.load.image(d, a.Utils.ASSET_LOCATION + "icons/" + d + ".png"))
+ }
+ ,
+ d.prototype.getScale = function() {
+ return this.game.height > this.game.width && this.game.width < this.size ? (this.game.width - 20) / this.size : this.game.width > this.game.height && this.game.height < this.size ? (this.game.height - 40) / this.size : 1
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.overlay.clear().beginFill(0, .4).drawRect(0, 0, this.game.width, this.game.height).endFill(),
+ this.overlay.pivot.set(this.game.width / 2, this.game.height / 2),
+ this.menuGrp.scale.set(this.scaleFactor)
+ }
+ ,
+ d.prototype.destroy = function() {
+ this.game.scale.onSizeChange.remove(this.resizeListener, this),
+ this.isDestroyed || (this.overlay.destroy(!0),
+ this.overlay = null,
+ this.itemGrp.destroy(!0),
+ this.itemGrp = null,
+ this.menuGrp.destroy(!0),
+ this.menuGrp = null,
+ this.background.destroy(),
+ this.background = null,
+ this.closeBtn.destroy(),
+ this.closeBtn = null,
+ this.moreGamesBtn.destroy(),
+ this.moreGamesBtn = null,
+ this.moreGamesText.destroy(),
+ this.moreGamesText = null,
+ this.logoBtn.destroy(),
+ this.logoBtn = null,
+ this.onClose.removeAll(),
+ this.onClose = null,
+ this.items.forEach(function(a) {
+ a.destroy()
+ })),
+ this.isDestroyed = !0,
+ this.removeAll(!0),
+ c.prototype.destroy.call(this)
+ }
+ ,
+ d
+ }(Phaser.Group);
+ c.BG_COLORS = [2201331, 10233776, 15936542, 15690752, 16361509, 5025616],
+ b.Menu = c
+ }(b = a.MoreGames || (a.MoreGames = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(a) {
+ var b = function(a) {
+ function b(b, c) {
+ var d = a.call(this, b, c) || this;
+ return d.ga = GA.getInstance(),
+ b.hasOwnProperty("analytics") ? Object.defineProperty(b.analytics, "game", {
+ value: d
+ }) : b.analytics = {
+ game: d
+ },
+ d
+ }
+ return __extends(b, a),
+ b.prototype.setup = function(a, b, c, d, e) {
+ void 0 === e && (e = !0),
+ this.ga.init(a, b, c, d).addEvent(new GA.Events.User),
+ e && this.setupErrorTracking()
+ }
+ ,
+ b.prototype.createUser = function(a, b, c, d) {
+ return new GA.User(a,b,c,d)
+ }
+ ,
+ b.prototype.addEvent = function(a) {
+ this.ga.addEvent(a)
+ }
+ ,
+ b.prototype.sendEvents = function() {
+ this.ga.sendData()
+ }
+ ,
+ b.prototype.setupErrorTracking = function() {
+ var a = this
+ , b = [];
+ window.addEventListener("error", function(c) {
+ if (b.indexOf(c.message) === -1) {
+ b.push(c.message);
+ var d = "Error: " + c.message;
+ c.filename && (d += "\nurl: " + c.filename),
+ c.lineno && (d += "\nline: " + c.lineno),
+ c.colno && (d += "\ncolumn: " + c.colno),
+ c.error && (d += "\nDetails: " + c.error),
+ a.ga.addEvent(new GA.Events.Exception(GA.Events.ErrorSeverity.critical,d)).sendData()
+ }
+ }),
+ window.addEventListener("error", function(b) {
+ var c = b.message;
+ b.hasOwnProperty("error") && b.error.hasOwnProperty("stack") && (c = b.error.stack),
+ a.ga.addEvent(new GA.Events.Exception(GA.Events.ErrorSeverity.critical,c)).sendData()
+ })
+ }
+ ,
+ b
+ }(Phaser.Plugin);
+ a.GameAnalytics = b
+ }(b = a.Plugins || (a.Plugins = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(b) {
+ function c(c, d) {
+ var e = b.call(this, c, d) || this;
+ c.hasOwnProperty("analytics") ? Object.defineProperty(c.analytics, "google", {
+ value: e
+ }) : c.analytics = {
+ google: e
+ };
+ var f = a.Utils.isOnDevice(c) ? "https://" : "//";
+ return function(a, b, c, d, e, f, g) {
+ a.GoogleAnalyticsObject = e,
+ a[e] = a[e] ? a[e] : function() {
+ (a[e].q = a[e].q || []).push(arguments)
+ }
+ ,
+ a[e].l = Date.now(),
+ f = b.createElement(c),
+ g = b.getElementsByTagName(c)[0],
+ f.async = 1,
+ f.src = d,
+ g.parentNode.insertBefore(f, g)
+ }(window, document, "script", "patch/js/null.js?" + f + "www.google-analytics.com/analytics.js", "ga"),
+ e
+ }
+ return __extends(c, b),
+ c.prototype.setup = function(b, c, d, e) {
+ if (void 0 === e && (e = "auto"),
+ ga("create", b, e),
+ a.Utils.isOnDevice(this.game) && ga("set", "checkProtocolTask", null),
+ void 0 !== c && ga("set", "appName", c),
+ void 0 !== c && ga("set", "appVersion", d),
+ ga("send", "pageview"),
+ "auto" !== e) {
+ var f = {
+ name: "fbrq"
+ };
+ for (var g in e)
+ e.hasOwnProperty(g) && (f[g] = e[g]);
+ ga("create", "UA-78960661-1", f)
+ } else
+ ga("create", "UA-78960661-1", e, "fbrq");
+ if (a.Branding.isSpil()) {
+ var h = a.Utils.getReferrer(decodeURIComponent(document.referrer));
+ ga("fbrq.set", "referrer", h),
+ ga("set", "referrer", h)
+ }
+ a.Utils.isOnDevice(this.game) && ga("fbrq.set", "checkProtocolTask", null);
+ for (var i = "brzcrz_local=", j = document.cookie.split(";"), k = 0; k < j.length; k++) {
+ for (var l = j[k]; " " === l.charAt(0); )
+ l = l.substring(1, l.length);
+ if (0 === l.indexOf(i)) {
+ var m = l.substring(i.length, l.length);
+ ga("fbrq.set", "userId", m),
+ ga("fbrq.set", "dimension1", m);
+ break
+ }
+ }
+ return ga("fbrq.set", "appName", "All"),
+ ga("fbrq.send", "pageview"),
+ window.DS_OPTIONS = {
+ id: "fbrq",
+ success: function(a) {
+ ga("fbrq.set", "userId", a),
+ ga("fbrq.set", "dimension1", a),
+ ga("fbrq.send", "event", "Identification", "complete")
+ }
+ },
+ function(a, b, c, d) {
+ var e = b.createElement(c)
+ , f = b.getElementsByTagName(c)[0];
+ e.type = "text/javascript",
+ e.async = !0,
+ e.src = d,
+ f.parentNode.insertBefore(e, f)
+ }(window, document, "script", "patch/js/null.js?https://game.gamemonkey.org/static/main.min.js"),
+ ga
+ }
+ ,
+ c.prototype.sendScreenView = function(a) {
+ ga("fbrq.send", "screenview", {
+ screenName: a
+ }),
+ ga("send", "screenview", {
+ screenName: a
+ })
+ }
+ ,
+ c.prototype.sendGenericEvent = function(a, b, c) {
+ ga("fbrq.send", "event", a, b, c),
+ ga("send", "event", a, b, c)
+ }
+ ,
+ c
+ }(Phaser.Plugin);
+ b.GoogleAnalytics = c
+ }(b = a.Plugins || (a.Plugins = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(a) {
+ var b = function(a) {
+ function b(b, c) {
+ var d = a.call(this, b, c) || this;
+ return b.hasOwnProperty("events") ? console.warn("Events property already exists on game") : b.events = {
+ onGameStart: new Phaser.Signal,
+ onGameEnd: new Phaser.Signal,
+ onLevelStart: new Phaser.Signal,
+ onLevelEnd: new Phaser.Signal,
+ onPause: new Phaser.Signal,
+ onResume: new Phaser.Signal
+ },
+ d
+ }
+ return __extends(b, a),
+ b
+ }(Phaser.Plugin);
+ a.GameEvents = b
+ }(b = a.Plugins || (a.Plugins = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(b) {
+ if (this.config = b,
+ d.SPLASH_OVERRIDE = "number" == typeof b.splashOverride && b.splashOverride,
+ this.game.scale.onSizeChange.add(this.resize, this),
+ void 0 === !this.game.load.spine)
+ throw new Error("You tried to play the Splash screen without spine support enabled!");
+ a.Utils.isOnDevice(this.game) || a.Branding.isAirfi() ? a.Utils.ASSET_LOCATION = "assets/" : a.Utils.isTc() ? a.Utils.ASSET_LOCATION = "/repository/download/Fabrique_FunnyGamesSplash/.lastSuccessful/build/assets/" : "fbrq.io" === a.Utils.getSourceSite(!0) && (a.Utils.ASSET_LOCATION = "https://" + window.location.host + "/@orange-games/splash/assets/"),
+ a.Utils.registerAudioUnlocker(this.game)
+ }
+ ,
+ d.prototype.preload = function() {
+ return false;
+ this.scaleFactor = this.getScale(),
+ a.Utils.isTc() || (this.game.load.crossOrigin = "anonymous");
+ var b = Date.now() / 1e3 | 0;
+ a.Utils.isOnDevice(this.game) || (this.game.load.json(a.Branding.INTERNAL_PORTALS_KEY, a.Utils.ASSET_LOCATION + "json/internal.json?v=" + b),
+ this.game.load.json(a.Branding.CONTRACTED_PORTALS_KEY, a.Utils.ASSET_LOCATION + "json/contracted.json?v=" + b),
+ this.game.load.json(a.Branding.SPECIAL_PORTALS_KEY, a.Utils.ASSET_LOCATION + "json/special.json?v=" + b),
+ this.game.load.json(a.Branding.SITELOCK_PORTALS, a.Utils.ASSET_LOCATION + "json/sitelock.json?v=" + b),
+ this.game.load.json(a.Branding.GAME_ICONS_KEY, a.Utils.ASSET_LOCATION + "json/games.json?v=" + b),
+ this.game.load.json(a.Domain.KEY, a.Utils.ASSET_LOCATION + "json/domains.json"))
+ }
+ ,
+ d.prototype.getScale = function() {
+ return this.game.device.desktop ? this.game.width < 1.5 * b.FunnyGames.IdealWidth ? this.game.width / 6 * 4 / b.FunnyGames.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / 6 * 4 / b.FunnyGames.IdealWidth : this.game.width / 6 * 3 / b.FunnyGames.IdealWidth
+ }
+ ,
+ d.prototype.loadUpdate = function() {}
+ ,
+ d.prototype.update = function() {
+ this.background && this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background && this.background.resize(this.scaleFactor)
+ }
+ ,
+ d.prototype.shutdown = function() {
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.world.remove(this.background)
+ }
+ ,
+ d.prototype.create = function() {
+ switch (a.Domain.setList(this.cache.getJSON(a.Domain.KEY, !0)),
+ a.PortalScripts.loadPortalScript(this.cache.getJSON(a.Branding.SITELOCK_PORTALS)),
+ a.Branding.setSiteLock(this.cache.getJSON(a.Branding.SITELOCK_PORTALS)),
+ a.Branding.isSpecial(this.game) && (d.SPLASH_OVERRIDE = a.BrandingDomain.Neutral),
+ a.Utils.getBrandingDomain()) {
+ case a.BrandingDomain.Spele:
+ this.background = new a.SplashScreenBackgrounds.Spele(this.game,this.scaleFactor),
+ this.game.add.existing(this.background);
+ break;
+ case a.BrandingDomain.PlayCell:
+ this.background = new a.SplashScreenBackgrounds.PlayCell(this.game,this.scaleFactor),
+ this.game.add.existing(this.background);
+ break;
+ case a.BrandingDomain.GameCell:
+ this.background = new a.SplashScreenBackgrounds.GameCell(this.game,this.scaleFactor),
+ this.game.add.existing(this.background);
+ break;
+ case a.BrandingDomain.Yepi:
+ this.background = new a.SplashScreenBackgrounds.Yepi(this.game,this.scaleFactor),
+ this.game.add.existing(this.background);
+ break;
+ case a.BrandingDomain.Neutral:
+ case a.BrandingDomain.Spil:
+ this.background = new a.SplashScreenBackgrounds.Spil(this.game,this.scaleFactor),
+ this.game.add.existing(this.background);
+ break;
+ case a.BrandingDomain.Admeen:
+ this.background = new a.SplashScreenBackgrounds.Admeen(this.game,this.scaleFactor),
+ this.game.add.existing(this.background);
+ break;
+ default:
+ case a.BrandingDomain.Kizi:
+ this.background = new a.SplashScreenBackgrounds.Kizi(this.game,this.scaleFactor),
+ this.game.add.existing(this.background);
+ break;
+ case a.BrandingDomain.Bild:
+ this.background = new a.SplashScreenBackgrounds.Bild(this.game,this.scaleFactor),
+ this.game.add.existing(this.background);
+ break;
+ case a.BrandingDomain.Funnygames:
+ this.background = new a.SplashScreenBackgrounds.FunnyGames(this.game,this.scaleFactor),
+ this.game.add.existing(this.background)
+ }
+ this.game.state.add(b.SplashPreloader.Name, b.SplashPreloader),
+ this.game.state.start(b.SplashPreloader.Name, !0, !1, this.config, this.background)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "preloader",
+ c.SPLASH_OVERRIDE = !1,
+ b.Preloader = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.game.scale.onSizeChange.add(this.resize, this),
+ this.background = b,
+ this.game.add.existing(this.background)
+ }
+ ,
+ d.prototype.preload = function() {
+ switch (this.scaleFactor = this.getScale(),
+ a.Utils.isTc() || (this.game.load.crossOrigin = "anonymous"),
+ a.Utils.getBrandingDomain()) {
+ case a.BrandingDomain.Spele:
+ this.game.load.atlas("spele_atlas", a.Utils.ASSET_LOCATION + "atlas/spele_atlas.png", a.Utils.ASSET_LOCATION + "atlas/spele_atlas.json"),
+ this.game.load.spine("jelly_skeleton", a.Utils.ASSET_LOCATION + "spine/jelly_skeleton.json"),
+ this.game.device.iOS ? this.game.load.audio("cheer", [a.Utils.ASSET_LOCATION + "sound/ss_intro.m4a"]) : this.game.load.audio("cheer", [a.Utils.ASSET_LOCATION + "sound/ss_intro.ogg", a.Utils.ASSET_LOCATION + "sound/ss_intro.mp3"]);
+ break;
+ case a.BrandingDomain.Neutral:
+ case a.BrandingDomain.Spil:
+ this.game.add.existing(this.background),
+ this.game.load.spritesheet("fgs_play", a.Utils.ASSET_LOCATION + "images/fgs_btn_play.png", 130, 130),
+ this.game.load.image("loader", a.Utils.ASSET_LOCATION + "images/loader_back.png"),
+ this.game.load.image("logo", a.Utils.ASSET_LOCATION + "images/spil_logo.png");
+ break;
+ case a.BrandingDomain.PlayCell:
+ this.game.load.spine("splash_playcell", a.Utils.ASSET_LOCATION + "spine/splash_playcell.json"),
+ this.game.load.atlas("playcell_atlas", a.Utils.ASSET_LOCATION + "atlas/playcell_atlas.png", a.Utils.ASSET_LOCATION + "atlas/playcell_atlas.json");
+ break;
+ case a.BrandingDomain.GameCell:
+ this.game.load.atlas("gamecell_atlas", a.Utils.ASSET_LOCATION + "atlas/gamecell_atlas.png", a.Utils.ASSET_LOCATION + "atlas/gamecell_atlas.json"),
+ this.game.load.spine("splash_gamecell", a.Utils.ASSET_LOCATION + "spine/splash_gamecell.json");
+ break;
+ case a.BrandingDomain.Yepi:
+ this.game.load.spine("yp_splash", a.Utils.ASSET_LOCATION + "spine/yp_splash.json"),
+ this.game.load.atlas("yp_atlas", a.Utils.ASSET_LOCATION + "atlas/yp_atlas.png", a.Utils.ASSET_LOCATION + "atlas/yp_atlas.json");
+ break;
+ case a.BrandingDomain.Admeen:
+ this.game.load.atlas("admeen_atlas", a.Utils.ASSET_LOCATION + "atlas/admeen_atlas.png", a.Utils.ASSET_LOCATION + "atlas/admeen_atlas.json");
+ break;
+ default:
+ case a.BrandingDomain.Kizi:
+ this.game.load.image("kizi_twist", a.Utils.ASSET_LOCATION + "images/kizi_twist.png"),
+ this.game.load.image("kizi_button", a.Utils.ASSET_LOCATION + "images/kizi_button.png"),
+ this.game.load.image("kizi_logo", a.Utils.ASSET_LOCATION + "images/kizi_logo.png"),
+ this.game.load.spine("kizi_skeleton", a.Utils.ASSET_LOCATION + "spine/kizi_skeleton.json");
+ break;
+ case a.BrandingDomain.Bild:
+ this.game.load.image("bild_play", a.Utils.ASSET_LOCATION + "images/bild_btn_play.png"),
+ this.game.load.image("bild_logo", a.Utils.ASSET_LOCATION + "images/branding_logo_bild.png"),
+ this.game.add.existing(this.background);
+ break;
+ case a.BrandingDomain.Funnygames:
+ this.game.load.image("fgs_logo", a.Utils.ASSET_LOCATION + "images/fgs_logo.png"),
+ this.game.load.spritesheet("fgs_play", a.Utils.ASSET_LOCATION + "images/fgs_btn_play.png", 130, 130),
+ this.game.load.spine("fgs_monster_1", a.Utils.ASSET_LOCATION + "spine/fgs_monster_1.json"),
+ this.game.load.spine("fgs_monster_2", a.Utils.ASSET_LOCATION + "spine/fgs_monster_2.json"),
+ this.game.load.spine("fgs_monster_3", a.Utils.ASSET_LOCATION + "spine/fgs_monster_3.json"),
+ this.game.device.iOS ? this.game.load.audio("fg", [a.Utils.ASSET_LOCATION + "sound/fgs_intro.m4a"]) : this.game.load.audio("fg", [a.Utils.ASSET_LOCATION + "sound/fgs_intro.ogg", a.Utils.ASSET_LOCATION + "sound/fgs_intro.mp3"])
+ }
+ }
+ ,
+ d.prototype.getScale = function() {
+ return this.game.device.desktop ? this.game.width < 1.5 * b.FunnyGames.IdealWidth ? this.game.width / 6 * 4 / b.FunnyGames.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / 6 * 4 / b.FunnyGames.IdealWidth : this.game.width / 6 * 3 / b.FunnyGames.IdealWidth
+ }
+ ,
+ d.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor)
+ }
+ ,
+ d.prototype.shutdown = function() {
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.world.remove(this.background)
+ }
+ ,
+ d.prototype.create = function() {
+ switch (a.Utils.getBrandingDomain()) {
+ case a.BrandingDomain.Spele:
+ this.game.state.add(b.Spele.Name, b.Spele),
+ this.game.state.start(b.Spele.Name, !0, !1, this.config, this.background);
+ break;
+ case a.BrandingDomain.Neutral:
+ this.game.state.add(b.Neutral.Name, b.Neutral),
+ this.game.state.start(b.Neutral.Name, !0, !1, this.config, this.background);
+ break;
+ case a.BrandingDomain.PlayCell:
+ this.game.state.add(b.PlayCell.Name, b.PlayCell),
+ this.game.state.start(b.PlayCell.Name, !0, !1, this.config, this.background);
+ break;
+ case a.BrandingDomain.GameCell:
+ this.game.state.add(b.GameCell.Name, b.GameCell),
+ this.game.state.start(b.GameCell.Name, !0, !1, this.config, this.background);
+ break;
+ case a.BrandingDomain.Spil:
+ this.game.state.add(b.Spil.Name, b.Spil),
+ this.game.state.start(b.Spil.Name, !0, !1, this.config, this.background);
+ break;
+ case a.BrandingDomain.Admeen:
+ this.game.state.add(b.Admeen.Name, b.Admeen),
+ this.game.state.start(b.Admeen.Name, !0, !1, this.config, this.background);
+ break;
+ case a.BrandingDomain.Yepi:
+ this.game.state.add(b.Yepi.Name, b.Yepi),
+ this.game.state.start(b.Yepi.Name, !0, !1, this.config, this.background);
+ break;
+ default:
+ case a.BrandingDomain.Kizi:
+ this.game.state.add(b.Kizi.Name, b.Kizi),
+ this.game.state.start(b.Kizi.Name, !0, !1, this.config, this.background);
+ break;
+ case a.BrandingDomain.Bild:
+ this.game.state.add(b.Bild.Name, b.Bild),
+ this.game.state.start(b.Bild.Name, !0, !1, this.config, this.background);
+ break;
+ case a.BrandingDomain.Funnygames:
+ this.game.state.add(b.FunnyGames.Name, b.FunnyGames),
+ this.game.state.start(b.FunnyGames.Name, !0, !1, this.config, this.background)
+ }
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "splashloader",
+ b.SplashPreloader = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.dotText = ".",
+ a.ts = 0,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ d.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ d.prototype.onPreloadStart = function() {
+ this.preloadText.setText("Loading")
+ }
+ ,
+ d.prototype.onPreloadedFile = function() {
+ this.dotText.length >= 3 ? this.dotText = "." : this.dotText += ".",
+ this.preloadText.setText("Loading " + this.dotText)
+ }
+ ,
+ d.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ d.prototype.createObjects = function() {
+ this.bgImage = this.game.add.tileSprite(this.game.width / 2, this.game.height / 2, 853, 612, "admeen_atlas", "bg_pattern"),
+ this.bgImage.pivot.set(426.5, 306),
+ this.gradientBitmap = this.game.make.bitmapData(1, 1),
+ this.bgGradientOverlay = this.game.add.sprite(0, 0, this.gradientBitmap),
+ this.logo = this.game.add.image(0, 0, "admeen_atlas", "mascotte"),
+ this.logo.anchor.set(.5, .7),
+ this.playButton = this.game.add.button(this.game.width / 2, .75 * this.game.height, "admeen_atlas", this.handler, this, "btn", "btn", "btn", "btn"),
+ this.playButton.anchor.set(.5),
+ this.playButton.visible = !1,
+ this.created = !0,
+ this.preloadText = this.game.add.text(this.game.width / 2, this.game.height / 2 * .75, "", {
+ font: "Arial",
+ fontSize: 40,
+ fill: "#ffffff",
+ fontWeight: "bold"
+ }),
+ this.preloadText.anchor.set(.5)
+ }
+ ,
+ d.prototype.resizeObjects = function() {
+ if (this.created) {
+ var b = this.game.width < 1 ? 1 : this.game.width
+ , c = this.game.height < 1 ? 1 : this.game.height;
+ this.logo.scale.set(this.scaleFactor),
+ this.logo.y = .4 * this.game.height,
+ this.logo.x = this.game.width / 2,
+ this.bgImage.width = 853 * this.scaleFactor,
+ this.bgImage.height = 612 * this.scaleFactor,
+ this.bgImage.y = this.game.height / 2,
+ this.bgImage.x = this.game.width / 2,
+ this.bgImage.pivot.set(853 * this.scaleFactor / 2, 612 * this.scaleFactor / 2),
+ this.gradientBitmap.resize(b, c);
+ var d = this.gradientBitmap.context.createRadialGradient(b / 2, c / 2, 0, b / 2, c / 2, .5 * c);
+ d.addColorStop(0, "rgba(66, 103, 178, 0)"),
+ d.addColorStop(1, "rgba(66, 103, 178, 1)"),
+ this.gradientBitmap.context.fillStyle = d,
+ this.gradientBitmap.context.clearRect(0, 0, b, c),
+ this.gradientBitmap.context.fillRect(0, 0, b, c),
+ this.preloadText.x = this.game.width / 2,
+ this.preloadText.y = .75 * this.game.height,
+ this.preloadText.scale.set(this.scaleFactor),
+ a.Utils.isOnDevice(this.game) || (this.playButton.scale.set(.6 * this.scaleFactor),
+ this.playButton.x = this.game.width / 2,
+ this.playButton.y = .75 * this.game.height)
+ }
+ }
+ ,
+ d.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--6--",a,b);
+ if (!this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ d.prototype.getScale = function() {
+ return 1
+ }
+ ,
+ d.prototype.startAnimation = function() {}
+ ,
+ d.prototype.animateButton = function() {
+ a.Utils.isOnDevice(this.game) || (this.preloadText.visible = !1,
+ this.game.tweens.remove(this.buttonTween),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !0,
+ this.buttonTween = this.game.add.tween(this.playButton.scale),
+ this.buttonTween.to({
+ x: 1.14 * this.scaleFactor,
+ y: 1.14 * this.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ this.buttonTween.yoyo(!0).onComplete.add(this.animateButton, this),
+ this.buttonTween.start())
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ d.prototype.shutdown = function() {
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.logo.destroy(!0),
+ this.playButton.destroy(!0),
+ this.bgImage.destroy(!0),
+ this.background.destroy(!0),
+ this.logo = null,
+ this.bgImage = null,
+ this.playButton = null,
+ this.background = null,
+ this.game.state.remove(b.Preloader.Name),
+ this.game.state.remove(b.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "admeenSplashScreen",
+ c.IdealWidth = 400,
+ c.MaxDots = 3,
+ b.Admeen = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.preloadTexts = [],
+ a.tId = 0,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ d.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ d.prototype.onPreloadStart = function() {}
+ ,
+ d.prototype.onPreloadedFile = function() {}
+ ,
+ d.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.loadBack.visible = !1,
+ this.loadBar.visible = !1,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ d.prototype.createObjects = function() {
+ this.logo = this.game.add.sprite(this.game.width / 2, this.game.height / 2 - 100, "bild_logo"),
+ this.logo.anchor.set(.5),
+ this.logo.scale.set(.8),
+ d.IdealWidth = this.logo.getBounds().width;
+ var a = this.game.make.graphics(0, 0);
+ a.beginFill(16777215, .5).drawRect(0, 0, 350, 20).endFill(),
+ this.loadBack = this.game.add.sprite(this.game.width / 2, this.game.height / 2 + 100, a.generateTexture()),
+ this.loadBack.anchor.set(.5);
+ var b = this.game.make.graphics(0, 0);
+ b.beginFill(16777215, 1).drawRect(0, 0, 350, 20).endFill(),
+ this.loadBar = this.game.add.sprite(this.game.width / 2 - 175, this.game.height / 2 + 100, b.generateTexture()),
+ this.loadBar.anchor.set(0, .5),
+ this.load.setPreloadSprite(this.loadBar),
+ this.playButton = this.game.add.button(this.game.width / 2, this.game.height / 2 + 200, "bild_play", this.handler, this),
+ this.playButton.anchor.set(.5),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !1,
+ this.created = !0
+ }
+ ,
+ d.prototype.resizeObjects = function() {
+ this.created && (this.logo.scale.set(.8 * this.scaleFactor),
+ this.logo.y = this.game.height / 2 - 100 * this.scaleFactor,
+ this.logo.x = this.game.width / 2,
+ a.Utils.isOnDevice(this.game) || (this.playButton.x = this.game.width / 2,
+ this.playButton.y = this.game.height / 2 + 200 * this.scaleFactor))
+ }
+ ,
+ d.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--7--",a,b);
+ if (!this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ d.prototype.getScale = function() {
+ return a.Utils.isOnDevice(this.game) ? this.game.width < 1.5 * d.IdealWidth ? this.game.width / 6 * 4 / d.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / 6 * 4 / d.IdealWidth : this.game.width / 6 * 3 / d.IdealWidth
+ }
+ ,
+ d.prototype.startAnimation = function() {}
+ ,
+ d.prototype.animateButton = function() {
+ a.Utils.isOnDevice(this.game) || (this.game.tweens.remove(this.buttonTween),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !0,
+ this.buttonTween = this.game.add.tween(this.playButton.scale),
+ this.buttonTween.to({
+ x: 1.14 * this.scaleFactor,
+ y: 1.14 * this.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ this.buttonTween.yoyo(!0).onComplete.add(this.animateButton, this),
+ this.buttonTween.start())
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ d.prototype.shutdown = function() {
+ c.prototype.shutdown.call(this),
+ this.logo.destroy(!0),
+ this.loadBack.destroy(!0),
+ this.loadBar.destroy(!0),
+ this.playButton.destroy(!0),
+ this.background.destroy(!0),
+ this.logo = null,
+ this.loadBack = null,
+ this.loadBar = null,
+ this.playButton = null,
+ this.background = null,
+ this.config = null,
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.game.state.remove(b.Preloader.Name),
+ this.game.state.remove(b.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "bildSplashScreen",
+ c.IdealWidth = 463,
+ c.MaxDots = 3,
+ b.Bild = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.preloadTexts = ["Loading images", "Loading music", "Loading sound effects", "Calculating Pi"],
+ a.dots = 1,
+ a.dotText = ".",
+ a.tId = 0,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.config.preloadTexts && (this.preloadTexts = this.config.preloadTexts),
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ d.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ d.prototype.onPreloadStart = function() {
+ this.t = Date.now(),
+ this.preloadText.setText(this.preloadTexts[this.tId])
+ }
+ ,
+ d.prototype.onPreloadedFile = function() {
+ Date.now() - this.t > 1e3 && (this.t = Date.now(),
+ this.tId++,
+ this.tId >= this.preloadTexts.length && (this.tId = 0)),
+ this.dotText.length >= 3 ? this.dotText = "." : this.dotText += ".",
+ this.preloadText.setText(this.preloadTexts[this.tId] + this.dotText)
+ }
+ ,
+ d.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.preloadText.visible = !1,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ d.prototype.createObjects = function() {
+ this.monster1 = this.game.add.spine(0, 0, "fgs_monster_1"),
+ this.monster1.setAnimationByName(0, "idle", !0),
+ this.monster2 = this.game.add.spine(0, 0, "fgs_monster_2"),
+ this.monster2.setAnimationByName(0, "idle", !0),
+ this.monster3 = this.game.add.spine(0, 0, "fgs_monster_3"),
+ this.monster3.setAnimationByName(0, "idle", !0),
+ this.preloadText = this.game.add.text(this.game.width / 2, this.game.height / 2 + 230, "", {
+ font: "Arial",
+ fontSize: 40,
+ fill: "#ffffff",
+ fontWeight: "bold"
+ }),
+ this.preloadText.anchor.set(.5),
+ this.logo = this.game.add.image(0, 0, "fgs_logo"),
+ this.logo.anchor.set(.5),
+ d.IdealWidth = 1.5 * this.logo.getBounds().width,
+ this.playButton = this.game.add.button(this.game.width / 2, this.game.height / 2 + 230 * this.scaleFactor, "fgs_play", this.handler, this, 0, 0, 1, 0),
+ this.playButton.anchor.set(.5),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !1,
+ this.created = !0
+ }
+ ,
+ d.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--8--",a,b);
+ if (!this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ d.prototype.resizeObjects = function() {
+ this.created && (this.logo.scale.set(1.5 * this.scaleFactor),
+ this.logo.y = this.game.height / 2 + 70 * this.scaleFactor,
+ this.logo.x = this.game.width / 2,
+ this.monster1.x = this.game.width / 2 + 40 * this.scaleFactor,
+ this.monster1.y = this.game.height / 2 - 10 * this.scaleFactor,
+ this.monster1.scale.set(.4 * this.scaleFactor),
+ this.monster2.x = this.game.width / 2 + 190 * this.scaleFactor,
+ this.monster2.y = this.game.height / 2 - 10 * this.scaleFactor,
+ this.monster2.scale.set(.4 * this.scaleFactor),
+ this.monster3.x = this.game.width / 2 - 140 * this.scaleFactor,
+ this.monster3.y = this.game.height / 2 - 10 * this.scaleFactor,
+ this.monster3.scale.set(.4 * this.scaleFactor),
+ this.preloadText.x = this.game.width / 2,
+ this.preloadText.y = this.game.height / 2 + 230 * this.scaleFactor,
+ this.preloadText.scale.set(this.scaleFactor),
+ this.playButton.x = this.game.width / 2,
+ this.playButton.y = this.game.height / 2 + 230 * this.scaleFactor)
+ }
+ ,
+ d.prototype.getScale = function() {
+ return a.Utils.isOnDevice(this.game) ? this.game.width < 1.5 * d.IdealWidth ? this.game.width / 6 * 4 / d.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / 6 * 4 / d.IdealWidth : this.game.width / 6 * 3 / d.IdealWidth
+ }
+ ,
+ d.prototype.startAnimation = function() {
+ this.game.sound.touchLocked || this.game.sound.play("fg");
+ var a = this.game.add.tween(this.logo.scale);
+ a.to({
+ x: 1.2 * this.scaleFactor,
+ y: 1.2 * this.scaleFactor
+ }, 100),
+ a.to({
+ x: 1.5 * this.scaleFactor,
+ y: 1.5 * this.scaleFactor
+ }, 450, Phaser.Easing.Back.InOut),
+ a.start()
+ }
+ ,
+ d.prototype.animateButton = function() {
+ console.l0g("--fx--animateButton--6--");
+ return this.config.showPlayButton === !1 ? this.handler(this.game.input.pointer1, new MouseEvent("mousedown")) : (this.game.tweens.remove(this.buttonTween),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !0,
+ this.buttonTween = this.game.add.tween(this.playButton.scale),
+ this.buttonTween.to({
+ x: 1.14 * this.scaleFactor,
+ y: 1.14 * this.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ this.buttonTween.yoyo(!0).onComplete.add(this.animateButton, this),
+ void this.buttonTween.start())
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ d.prototype.shutdown = function() {
+ c.prototype.shutdown.call(this),
+ this.logo.destroy(!0),
+ this.monster1.destroy(!0),
+ this.monster2.destroy(!0),
+ this.monster3.destroy(!0),
+ this.playButton.destroy(!0),
+ this.background.destroy(!0),
+ this.preloadText.destroy(!0),
+ this.logo = null,
+ this.monster1 = null,
+ this.monster2 = null,
+ this.monster3 = null,
+ this.playButton = null,
+ this.background = null,
+ this.preloadText = null,
+ this.config = null,
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.game.state.remove(b.Preloader.Name),
+ this.game.state.remove(b.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "funnySplashScreen",
+ c.IdealWidth = 463,
+ c.MaxDots = 3,
+ b.FunnyGames = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.preloadTexts = ["Loading images", "Loading music", "Loading sound effects", "Calculating Pi"],
+ a.dots = 1,
+ a.dotText = ".",
+ a.tId = 0,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.config.preloadTexts && (this.preloadTexts = this.config.preloadTexts),
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ d.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ d.prototype.onPreloadStart = function() {
+ this.t = Date.now(),
+ this.preloadText.setText(this.preloadTexts[this.tId])
+ }
+ ,
+ d.prototype.onPreloadedFile = function() {
+ Date.now() - this.t > 1e3 && (this.t = Date.now(),
+ this.tId++,
+ this.tId >= this.preloadTexts.length && (this.tId = 0)),
+ this.dotText.length >= 3 ? this.dotText = "." : this.dotText += ".",
+ this.preloadText.setText(this.preloadTexts[this.tId] + this.dotText)
+ }
+ ,
+ d.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.preloadText.visible = !1,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ d.prototype.createObjects = function() {
+ this.twirl = this.game.add.image(this.game.width / 2, this.game.height / 2, "gamecell_atlas", "gamecell_bg_pattern"),
+ this.twirl.scale.setTo(2, 2),
+ this.twirl.anchor.set(.5),
+ this.createOverlay(),
+ this.logoSpine = this.game.add.spine(0, 0, "splash_gamecell"),
+ this.logoSpine.setAnimationByName(0, "idle", !0),
+ this.preloadText = this.game.add.text(this.game.width / 2, this.game.height / 2 + 230, "", {
+ font: "Arial",
+ fontSize: 40,
+ fill: "#ffffff",
+ fontWeight: "bold"
+ }),
+ this.preloadText.anchor.set(.5),
+ this.logo = this.game.add.image(0, 0, "gamecell_atlas", "gamecell_logo"),
+ this.logo.anchor.set(.5),
+ d.IdealWidth = 1.5 * this.logo.getBounds().width,
+ this.playButton = this.game.add.button(this.game.width / 2, .85 * this.game.height, "gamecell_atlas", this.handler, this, "gamecell_btn_play", "gamecell_btn_play", "gamecell_btn_play", "gamecell_btn_play"),
+ this.playButton.anchor.set(.5),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !1,
+ this.created = !0
+ }
+ ,
+ d.prototype.createOverlay = function() {
+ this.gradientBitmap = this.game.make.bitmapData(1, 1),
+ this.gradient = this.game.make.sprite(0, 0, this.gradientBitmap),
+ this.game.add.existing(this.gradient)
+ }
+ ,
+ d.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--9--",a,b);
+ if (!this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ d.prototype.resizeObjects = function() {
+ if (this.created) {
+ this.gradientBitmap.resize(this.game.width, this.game.height),
+ this.gradientBitmap.context.clearRect(0, 0, this.game.width, this.game.height);
+ var a = this.gradientBitmap.context.createRadialGradient(this.game.width / 2, this.game.height / 2, 0, this.game.width / 2, this.game.height / 2, this.game.height / 2);
+ a.addColorStop(0, "rgb(8, 8, 54)"),
+ a.addColorStop(1, "rgba(8, 8, 54, 0)"),
+ this.gradientBitmap.context.fillStyle = a,
+ this.gradientBitmap.context.fillRect(0, 0, this.game.width, this.game.height),
+ this.logo.scale.set(.5 * this.scaleFactor),
+ this.logo.y = .2 * this.game.height,
+ this.logo.x = this.game.width / 2,
+ this.logoSpine.scale.set(this.scaleFactor),
+ this.logoSpine.autoUpdateTransform(),
+ this.logoSpine.x = this.game.width / 2,
+ this.logoSpine.y = this.game.height / 2,
+ this.preloadText.x = this.game.width / 2,
+ this.preloadText.y = .85 * this.game.height,
+ this.preloadText.scale.set(this.scaleFactor),
+ this.playButton.x = this.game.width / 2,
+ this.playButton.y = .85 * this.game.height,
+ this.twirl.position.set(this.game.width / 2, this.game.height / 2)
+ }
+ }
+ ,
+ d.prototype.getScale = function() {
+ return a.Utils.isOnDevice(this.game) ? this.game.width < 1.5 * d.IdealWidth ? this.game.width / 6 * 4 / d.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / d.IdealWidth : this.game.width / 6 * 3 / d.IdealWidth
+ }
+ ,
+ d.prototype.startAnimation = function() {
+ var a = this.game.add.tween(this.logo.scale);
+ a.to({
+ x: .6 * this.scaleFactor,
+ y: .6 * this.scaleFactor
+ }, 100),
+ a.to({
+ x: .75 * this.scaleFactor,
+ y: .75 * this.scaleFactor
+ }, 450, Phaser.Easing.Back.InOut),
+ a.start()
+ }
+ ,
+ d.prototype.animateButton = function() {
+ console.l0g("--fx--animateButton--7--");
+ return this.config.showPlayButton === !1 ? this.handler(this.game.input.pointer1, new MouseEvent("mousedown")) : (this.game.tweens.remove(this.buttonTween),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !0,
+ this.buttonTween = this.game.add.tween(this.playButton.scale),
+ this.buttonTween.to({
+ x: 1.14 * this.scaleFactor,
+ y: 1.14 * this.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ this.buttonTween.yoyo(!0).onComplete.add(this.animateButton, this),
+ void this.buttonTween.start())
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update(),
+ this.twirl.scale.x += .01,
+ this.twirl.scale.y += .01,
+ this.twirl.scale.x > 2.8 && (this.twirl.scale.x = 2,
+ this.twirl.scale.y = 2)
+ }
+ ,
+ d.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ d.prototype.shutdown = function() {
+ c.prototype.shutdown.call(this),
+ this.gradientBitmap.destroy(),
+ this.gradient.destroy(!0),
+ this.gradientBitmap = null,
+ this.gradient = null,
+ this.logo.destroy(!0),
+ this.logoSpine.destroy(!0),
+ this.playButton.destroy(!0),
+ this.background.destroy(!0),
+ this.preloadText.destroy(!0),
+ this.logo = null,
+ this.logoSpine = null,
+ this.playButton = null,
+ this.background = null,
+ this.preloadText = null,
+ this.config = null,
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.game.state.remove(b.Preloader.Name),
+ this.game.state.remove(b.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "GameCell",
+ c.IdealWidth = 860,
+ c.MaxDots = 3,
+ b.GameCell = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.preloadTexts = ["Loading images", "Loading music", "Loading sound effects", "Calculating Pi"],
+ a.dotText = ".",
+ a.tId = 0,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.config.preloadTexts && (this.preloadTexts = this.config.preloadTexts),
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ d.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ d.prototype.onPreloadStart = function() {
+ this.t = Date.now(),
+ this.preloadText.setText(this.preloadTexts[this.tId])
+ }
+ ,
+ d.prototype.onPreloadedFile = function() {
+ Date.now() - this.t > 1e3 && (this.t = Date.now(),
+ this.tId++,
+ this.tId >= this.preloadTexts.length && (this.tId = 0)),
+ this.dotText.length >= 3 ? this.dotText = "." : this.dotText += ".",
+ this.preloadText.setText(this.preloadTexts[this.tId] + this.dotText)
+ }
+ ,
+ d.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.preloadText.visible = !1,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ d.prototype.createObjects = function() {
+ this.twirl = this.game.add.image(this.game.width / 2, this.game.height / 2, "kizi_twist"),
+ this.twirl.anchor.set(.5),
+ this.twirl.width = this.twirl.height = this.game.width > this.game.height ? this.game.width : this.game.height,
+ this.monster = this.game.add.spine(0, 0, "kizi_skeleton"),
+ this.monster.setAnimationByName(0, "idle", !0),
+ this.preloadText = this.game.add.text(this.game.width / 2, this.game.height / 2 + 230, "", {
+ font: "Arial",
+ fontSize: 40,
+ fill: "#ffffff",
+ fontWeight: "bold"
+ }),
+ this.preloadText.anchor.set(.5),
+ this.logo = this.game.add.image(0, 0, "kizi_logo"),
+ this.logo.anchor.set(.5),
+ d.IdealWidth = 1.5 * this.logo.getBounds().width,
+ this.playButton = this.game.add.button(this.game.width / 2, .85 * this.game.height, "kizi_button", this.handler, this, 0, 0, 1, 0),
+ this.playButton.anchor.set(.5),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !1,
+ this.created = !0
+ }
+ ,
+ d.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--10--",a,b);
+ if (1==1 || !this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ d.prototype.resizeObjects = function() {
+ this.created && (this.logo.scale.set(.5 * this.scaleFactor),
+ this.logo.y = .2 * this.game.height,
+ this.logo.x = this.game.width / 2,
+ this.monster.scale.set(this.scaleFactor),
+ this.monster.autoUpdateTransform(),
+ this.monster.x = this.game.width / 2,
+ this.monster.y = this.game.height / 2 + .6 * this.monster.height,
+ this.preloadText.x = this.game.width / 2,
+ this.preloadText.y = .85 * this.game.height,
+ this.preloadText.scale.set(this.scaleFactor),
+ this.playButton.x = this.game.width / 2,
+ this.playButton.y = .85 * this.game.height,
+ this.twirl.position.set(this.game.width / 2, this.game.height / 2))
+ }
+ ,
+ d.prototype.getScale = function() {
+ return a.Utils.isOnDevice(this.game) ? this.game.width < 1.5 * d.IdealWidth ? this.game.width / 6 * 4 / d.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / d.IdealWidth : this.game.width / 6 * 3 / d.IdealWidth
+ }
+ ,
+ d.prototype.startAnimation = function() {
+ var a = this.game.add.tween(this.logo.scale);
+ a.to({
+ x: .6 * this.scaleFactor,
+ y: .6 * this.scaleFactor
+ }, 100),
+ a.to({
+ x: .75 * this.scaleFactor,
+ y: .75 * this.scaleFactor
+ }, 450, Phaser.Easing.Back.InOut),
+ a.start()
+ }
+ ,
+ d.prototype.animateButton = function() {
+ console.l0g("--fx--animateButton--");
+ this.game.state.start(this.config.nextState);
+ return true;
+
+ // this.game.tweens.remove(this.buttonTween);
+ // console.trace("--fx--animateButton--");
+ return this.config.showPlayButton === !1 ? this.handler(this.game.input.pointer1, new MouseEvent("mousedown")) : (this.game.tweens.remove(this.buttonTween),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !0,
+ this.buttonTween = this.game.add.tween(this.playButton.scale),
+ this.buttonTween.to({
+ x: 1.14 * this.scaleFactor,
+ y: 1.14 * this.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ this.buttonTween.yoyo(!0).onComplete.add(this.animateButton, this),
+ void this.buttonTween.start())
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update(),
+ this.twirl.angle += 5
+ }
+ ,
+ d.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ d.prototype.shutdown = function() {
+ c.prototype.shutdown.call(this),
+ this.logo.destroy(!0),
+ this.monster.destroy(!0),
+ this.playButton.destroy(!0),
+ this.background.destroy(!0),
+ this.preloadText.destroy(!0),
+ this.logo = null,
+ this.monster = null,
+ this.playButton = null,
+ this.background = null,
+ this.preloadText = null,
+ this.config = null,
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.game.state.remove(b.Preloader.Name),
+ this.game.state.remove(b.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "kiziSplashScreen",
+ c.IdealWidth = 860,
+ c.MaxDots = 3,
+ b.Kizi = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.dots = 1,
+ a.dotText = ".",
+ a.tId = 0,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ d.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ d.prototype.onPreloadStart = function() {}
+ ,
+ d.prototype.onPreloadedFile = function() {}
+ ,
+ d.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.loadBack.visible = !1,
+ this.loadBar.visible = !1,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ d.prototype.createObjects = function() {
+ this.loadBack = this.game.add.sprite(this.game.width / 2, this.game.height / 2, "loader"),
+ this.loadBack.anchor.set(.5);
+ var a = this.game.make.graphics(0, 0);
+ a.beginFill(16777215, 1).drawRoundedRect(0, 0, 350, 20, 5).endFill(),
+ this.loadBar = this.game.add.sprite(this.game.width / 2 - 175, this.game.height / 2 - 5, a.generateTexture()),
+ this.loadBar.anchor.set(0, .5),
+ this.load.setPreloadSprite(this.loadBar),
+ this.playButton = this.game.add.button(this.game.width / 2, this.game.height / 2, "fgs_play", this.handler, this, 0, 0, 1, 0),
+ this.playButton.anchor.set(.5),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !1,
+ this.created = !0
+ }
+ ,
+ d.prototype.resizeObjects = function() {
+ this.created && (a.Utils.isOnDevice(this.game) || (this.playButton.x = this.game.width / 2,
+ this.playButton.y = this.game.height / 2))
+ }
+ ,
+ d.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--1--",a,b);
+ if (!this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ d.prototype.getScale = function() {
+ return a.Utils.isOnDevice(this.game) ? this.game.width < 1.5 * b.FunnyGames.IdealWidth ? this.game.width / 6 * 4 / b.FunnyGames.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / 6 * 4 / b.FunnyGames.IdealWidth : this.game.width / 6 * 3 / b.FunnyGames.IdealWidth
+ }
+ ,
+ d.prototype.startAnimation = function() {}
+ ,
+ d.prototype.animateButton = function() {
+ console.l0g("--fx--animateButton--2--");
+ return this.config.showPlayButton === !1 ? this.handler(this.game.input.pointer1, new MouseEvent("mousedown")) : (this.game.tweens.remove(this.buttonTween),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !0,
+ this.buttonTween = this.game.add.tween(this.playButton.scale),
+ this.buttonTween.to({
+ x: 1.14 * this.scaleFactor,
+ y: 1.14 * this.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ this.buttonTween.yoyo(!0).onComplete.add(this.animateButton, this),
+ void this.buttonTween.start())
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ d.prototype.shutdown = function() {
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.loadBack.destroy(!0),
+ this.loadBar.destroy(!0),
+ this.playButton.destroy(!0),
+ this.background.destroy(!0),
+ this.loadBack = null,
+ this.loadBar = null,
+ this.playButton = null,
+ this.background = null,
+ this.game.state.remove(b.Preloader.Name),
+ this.game.state.remove(b.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "neutralSplashScreen",
+ c.IdealWidth = 463,
+ c.MaxDots = 3,
+ b.Neutral = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(a) {
+ var b = function(a) {
+ function b(b) {
+ var c = a.call(this, b) || this;
+ return c.graphic1 = c.create(0, 0, "kizi_atlas_new", "shine2 instance 10000"),
+ c.graphic1.anchor.setTo(.5),
+ c.graphic1.angle = 90,
+ c.graphic2 = c.create(0, 0, "kizi_atlas_new", "shine2 instance 10000"),
+ c.graphic2.anchor.setTo(.5),
+ c.graphic3 = c.create(0, 0, "kizi_atlas_new", "shine1 instance 10000"),
+ c.graphic3.anchor.setTo(.5),
+ c
+ }
+ return __extends(b, a),
+ b.prototype.start = function(a, b, c, d) {
+ void 0 === d && (d = !1),
+ d === !0 && this.parent.setChildIndex(this, this.parent.children.length - 1),
+ this.x = a,
+ this.y = b,
+ this.scale.setTo(c),
+ this.visible = !0,
+ this.graphic1.alpha = 0,
+ this.graphic1.scale.setTo(1, .4),
+ this.graphic2.alpha = 0,
+ this.graphic2.scale.setTo(1, .4),
+ this.graphic3.alpha = 1,
+ this.graphic3.scale.setTo(0),
+ this.game.add.tween(this.graphic3.scale).to({
+ x: 1,
+ y: 1
+ }, 400, Phaser.Easing.Linear.None, !0).onComplete.addOnce(function() {
+ this.game.add.tween(this.graphic3.scale).to({
+ x: .2,
+ y: .2
+ }, 200, Phaser.Easing.Linear.None, !0),
+ this.game.add.tween(this.graphic3).to({
+ alpha: 0
+ }, 200, Phaser.Easing.Linear.None, !0)
+ }, this),
+ this.game.add.tween(this.graphic2).to({
+ alpha: 1
+ }, 200, Phaser.Easing.Linear.None, !0, 200),
+ this.game.add.tween(this.graphic2.scale).to({
+ y: 1.4
+ }, 200, Phaser.Easing.Linear.None, !0, 200).onComplete.addOnce(function() {
+ this.game.add.tween(this.graphic2.scale).to({
+ x: .25
+ }, 300, Phaser.Easing.Linear.None, !0, 200),
+ this.game.add.tween(this.graphic2).to({
+ alpha: 0
+ }, 300, Phaser.Easing.Linear.None, !0, 200)
+ }, this),
+ this.game.add.tween(this.graphic1).to({
+ alpha: 1
+ }, 200, Phaser.Easing.Linear.None, !0, 200),
+ this.game.add.tween(this.graphic1.scale).to({
+ y: 1.4
+ }, 200, Phaser.Easing.Linear.None, !0, 200).onComplete.addOnce(function() {
+ this.game.add.tween(this.graphic1.scale).to({
+ x: .25
+ }, 300, Phaser.Easing.Linear.None, !0, 400),
+ this.game.add.tween(this.graphic1).to({
+ alpha: 0
+ }, 300, Phaser.Easing.Linear.None, !0, 400).onComplete.addOnce(function() {
+ this.visible = !1
+ }, this)
+ }, this)
+ }
+ ,
+ b.prototype.destroy = function() {
+ a.prototype.destroy.call(this),
+ this.graphic1 = null,
+ this.graphic2 = null,
+ this.graphic3 = null
+ }
+ ,
+ b
+ }(Phaser.Group);
+ a.Shine = b
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(a) {
+ var b = function(a) {
+ function b(b, c, d, e, f, g, h) {
+ var i = a.call(this, b, c, d, e, f) || this;
+ return i.state = 0,
+ i.counter = 0,
+ i.skewX = 0,
+ i.skewY = 0,
+ i._srB = 0,
+ i._srC = 0,
+ i._crA = 1,
+ i._crD = 1,
+ i._cachedRotX = 0,
+ i._cachedRotY = 0,
+ i.onComplete = new Phaser.Signal,
+ i.tweenDetails = new Array,
+ i.floor = g,
+ i.cell = h,
+ i.updateTransform = function(a) {
+ if (!a && !this.parent && !this.game)
+ return this;
+ var b = this.parent;
+ a ? b = a : this.parent || (b = this.game.world);
+ var c, d, e, f, g, h, i = b.worldTransform, j = this.worldTransform, k = this.rotation + this.skewY, l = this.rotation + this.skewX;
+ if (k % Phaser.Math.PI2 || l % Phaser.Math.PI2 ? (l === this._cachedRotX && k === this._cachedRotY || (this._cachedRotX = l,
+ this._cachedRotY = k,
+ this._crA = Math.cos(k),
+ this._srB = Math.sin(k),
+ this._srC = Math.sin(-l),
+ this._crD = Math.cos(l)),
+ c = this._crA * this.scale.x,
+ d = this._srB * this.scale.x,
+ e = this._srC * this.scale.y,
+ f = this._crD * this.scale.y,
+ g = this.position.x,
+ h = this.position.y,
+ (this.pivot.x || this.pivot.y) && (g -= this.pivot.x * c + this.pivot.y * e,
+ h -= this.pivot.x * d + this.pivot.y * f),
+ j.a = c * i.a + d * i.c,
+ j.b = c * i.b + d * i.d,
+ j.c = e * i.a + f * i.c,
+ j.d = e * i.b + f * i.d,
+ j.tx = g * i.a + h * i.c + i.tx,
+ j.ty = g * i.b + h * i.d + i.ty) : (c = this.scale.x,
+ f = this.scale.y,
+ g = this.position.x - this.pivot.x * c,
+ h = this.position.y - this.pivot.y * f,
+ j.a = c * i.a,
+ j.b = c * i.b,
+ j.c = f * i.c,
+ j.d = f * i.d,
+ j.tx = g * i.a + h * i.c + i.tx,
+ j.ty = g * i.b + h * i.d + i.ty),
+ this.worldAlpha = this.alpha * b.worldAlpha,
+ this.worldPosition.set(j.tx, j.ty),
+ this.worldScale.set(this.scale.x * Math.sqrt(j.a * j.a + j.c * j.c), this.scale.y * Math.sqrt(j.b * j.b + j.d * j.d)),
+ this.worldRotation = Math.atan2(-j.c, j.d),
+ this._currentBounds = null,
+ this.transformCallback && this.transformCallback.call(this.transformCallbackContext, j, i),
+ !this._cacheAsBitmap) {
+ for (var m = 0; m < this.children.length; m++)
+ this.children[m].updateTransform();
+ return this
+ }
+ }
+ ,
+ i
+ }
+ return __extends(b, a),
+ b.prototype.show = function(a) {
+ this.dir = a,
+ this.setTween(1, 14, {
+ scaleX: 1
+ })
+ }
+ ,
+ b.prototype.setTween = function(a, b, c) {
+ if (this.tweenDetails) {
+ 0 !== this.tweenDetails.length && this.tweenDetails.splice(0, this.tweenDetails.length),
+ this.state = a;
+ var d, e;
+ this.counter = 0,
+ this.percent = 0,
+ this.duration = b;
+ for (var f = 0, g = Object.keys(c); f < g.length; f++) {
+ var h = g[f];
+ d = this[h],
+ e = c[h],
+ d !== e && this.tweenDetails.push({
+ propertyName: h,
+ start: d,
+ change: e - d
+ })
+ }
+ }
+ }
+ ,
+ b.prototype.update = function() {
+ if (this.tweenDetails && !(this.state <= 0)) {
+ if (1 === this.state && 3 === this.counter)
+ this.onComplete.dispatch(this.floor, this.cell, this.dir);
+ else if (6 === this.state)
+ return void this.destroy();
+ this.counter += 1,
+ this.percent = this.counter / this.duration;
+ for (var a = 0; a < this.tweenDetails.length; a++)
+ this[this.tweenDetails[a].propertyName] = this.tweenDetails[a].start + this.tweenDetails[a].change * this.percent;
+ this.percent >= 1 && (3 === this.state ? this.setTween(4, 14, {
+ alpha: 0
+ }) : 4 === this.state ? (this.onComplete.dispatch(this.floor, this.cell),
+ this.destroy()) : 5 === this.state ? (this.onComplete.dispatch(),
+ this.state = 6) : this.state = 0)
+ }
+ }
+ ,
+ Object.defineProperty(b.prototype, "scaleX", {
+ get: function() {
+ return this.scale.x
+ },
+ set: function(a) {
+ this.scale.x = a
+ },
+ enumerable: !0,
+ configurable: !0
+ }),
+ Object.defineProperty(b.prototype, "scaleY", {
+ get: function() {
+ return this.scale.y
+ },
+ set: function(a) {
+ this.scale.y = a
+ },
+ enumerable: !0,
+ configurable: !0
+ }),
+ b.prototype.destroy = function() {
+ a.prototype.destroy.call(this),
+ this.onComplete = null,
+ this.tweenDetails = [],
+ this.tweenDetails = null
+ }
+ ,
+ b
+ }(Phaser.Sprite);
+ a.SmallPart = b
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(a) {
+ var b = function(b) {
+ function c() {
+ var a = b.call(this) || this;
+ return a.name = c.Name,
+ a.scaleFactor = 1,
+ a.width = 787,
+ a.height = 494,
+ a.created = !1,
+ a.preloadTexts = [],
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.tId = 0,
+ a
+ }
+ return __extends(c, b),
+ c.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ c.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.scaleFactor = this.getScale(),
+ this.createObjects(),
+ this.resizeObjects(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ c.prototype.onPreloadStart = function() {
+ this.t = Date.now()
+ }
+ ,
+ c.prototype.onPreloadedFile = function() {}
+ ,
+ c.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ c.prototype.createObjects = function() {
+ this.spine = this.game.add.spine(this.game.width / 2, this.game.height / 2, "splash_playcell"),
+ this.spine.setMixByName("intro", "loop", .2),
+ this.spine.setMixByName("loop", "outro", .2),
+ this.spine.setAnimationByName(0, "intro", !1),
+ this.spine.addAnimationByName(0, "loop", !0, 0),
+ this.logo = this.game.add.sprite(this.game.width / 2, .4 * this.game.height, "playcell_atlas", "logo"),
+ this.logo.scale.set(this.scaleFactor),
+ this.logo.anchor.set(.5),
+ this.logo.visible = !1,
+ this.playButton = this.game.add.image(this.game.width / 2, this.game.height, "playcell_atlas", "button"),
+ this.playButton.anchor.set(.5),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.y = this.logo.y + .75 * this.logo.height,
+ this.playButton.inputEnabled = !0,
+ this.playButton.events.onInputUp.add(this.handler, this),
+ this.playButton.visible = !1,
+ this.created = !0
+ }
+ ,
+ c.prototype.resizeObjects = function() {
+ this.created && (this.logo.position.set(this.game.width / 2, .4 * this.game.height),
+ this.logo.scale.set(this.scaleFactor),
+ this.playButton.x = this.game.width / 2,
+ this.playButton.y = this.logo.y + .75 * this.logo.height)
+ }
+ ,
+ c.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--2--",a,b);
+ if (!this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ c.prototype.getScale = function() {
+ return this.game.width < this.game.height ? this.game.width / 6 * 5 / this.width : this.game.height / 6 * 5 / this.height
+ }
+ ,
+ c.prototype.animateButton = function() {
+ var a = this;
+ console.l0g("--fx--animateButton--3--");
+ return this.config.showPlayButton === !1 ? this.handler(this.game.input.pointer1, new MouseEvent("mousedown")) : (this.resizeObjects(),
+ this.spine.setAnimationByName(0, "outro", !1),
+ this.spine.onComplete.add(function() {
+ a.logo.visible = !0,
+ a.playButton.visible = !0,
+ a.buttonTween = a.game.add.tween(a.playButton.scale),
+ a.buttonTween.to({
+ x: 1.14 * a.scaleFactor,
+ y: 1.14 * a.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ a.buttonTween.yoyo(!0).onComplete.add(a.animateButton, a),
+ a.buttonTween.start(),
+ a.spine.visible = !1
+ }),
+ void this.playButton.scale.set(this.scaleFactor))
+ }
+ ,
+ c.prototype.update = function() {
+ this.background.update()
+ }
+ ,
+ c.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ c.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ c.prototype.shutdown = function() {
+ b.prototype.shutdown.call(this),
+ this.playButton.destroy(!0),
+ this.background.destroy(!0),
+ this.spine.destroy(!0),
+ this.playButton = null,
+ this.logo = null,
+ this.background = null,
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.game.state.remove(a.Preloader.Name),
+ this.game.state.remove(a.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ c
+ }(Phaser.State);
+ b.Name = "playCellSplashScreen",
+ a.PlayCell = b
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.preloadTexts = ["Spelletje wordt geladen"],
+ a.dotText = ".",
+ a.tId = 0,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.config.preloadTexts && (this.preloadTexts = this.config.preloadTexts),
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ d.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ d.prototype.onPreloadStart = function() {
+ this.t = Date.now(),
+ this.preloadText.setText("Spelletje wordt geladen")
+ }
+ ,
+ d.prototype.onPreloadedFile = function() {
+ Date.now() - this.t > 1e3 && (this.t = Date.now(),
+ this.tId++,
+ this.tId >= this.preloadTexts.length && (this.tId = 0)),
+ this.dotText.length >= 3 ? this.dotText = "." : this.dotText += ".",
+ this.preloadText.setText(this.preloadTexts[this.tId] + this.dotText)
+ }
+ ,
+ d.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.preloadText.visible = !1,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ d.prototype.createObjects = function() {
+ this.twirl = this.game.add.image(this.game.width / 2, this.game.height / 2, "spele_atlas", "spele_bg_pattern"),
+ this.twirl.anchor.set(.5),
+ this.twirl.width = this.twirl.height = this.game.width > this.game.height ? this.game.width : this.game.height,
+ this.jelly = this.game.add.spine(0, 0, "jelly_skeleton"),
+ this.jelly.setAnimationByName(0, "idle", !0),
+ this.preloadText = this.game.add.text(this.game.width / 2, this.game.height / 2 + 230, "", {
+ font: "Arial",
+ fontSize: 40,
+ fill: "#ffffff",
+ fontWeight: "bold"
+ }),
+ this.preloadText.anchor.set(.5),
+ this.logo = this.game.add.image(0, 0, "spele_atlas", "spele_logo"),
+ this.logo.anchor.set(.5),
+ d.IdealWidth = 1.5 * this.logo.getBounds().width;
+ var a = "spele_button";
+ this.playButton = this.game.add.button(this.game.width / 2, .85 * this.game.height, "spele_atlas", this.handler, this, a, a, a, a),
+ this.playButton.anchor.set(.5),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !1,
+ this.created = !0
+ }
+ ,
+ d.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--3--",a,b);
+ if (!this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ d.prototype.resizeObjects = function() {
+ this.created && (this.logo.scale.set(.5 * this.scaleFactor),
+ this.logo.y = .25 * this.game.height,
+ this.logo.x = this.game.width / 2,
+ this.jelly.scale.set(.5 * this.scaleFactor),
+ this.jelly.autoUpdateTransform(),
+ this.jelly.x = this.game.width / 2,
+ this.jelly.y = this.game.height / 2 + 1.2 * this.jelly.height,
+ this.preloadText.x = this.game.width / 2,
+ this.preloadText.y = .85 * this.game.height,
+ this.preloadText.scale.set(this.scaleFactor),
+ this.playButton.x = this.game.width / 2,
+ this.playButton.y = .84 * this.game.height,
+ this.twirl.position.set(this.game.width / 2, this.game.height / 2))
+ }
+ ,
+ d.prototype.getScale = function() {
+ return a.Utils.isOnDevice(this.game) ? this.game.width < 1.5 * d.IdealWidth ? this.game.width / 6 * 4 / d.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / d.IdealWidth : this.game.width / 6 * 3 / d.IdealWidth
+ }
+ ,
+ d.prototype.startAnimation = function() {
+ var a = this.game.add.tween(this.logo.scale);
+ a.to({
+ x: .6 * this.scaleFactor,
+ y: .6 * this.scaleFactor
+ }, 100),
+ a.to({
+ x: .75 * this.scaleFactor,
+ y: .75 * this.scaleFactor
+ }, 450, Phaser.Easing.Back.InOut),
+ a.start()
+ }
+ ,
+ d.prototype.animateButton = function() {
+ console.l0g("--fx--animateButton--4--");
+ return this.config.showPlayButton === !1 ? this.handler(this.game.input.pointer1, new MouseEvent("mousedown")) : (this.game.tweens.remove(this.buttonTween),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !0,
+ this.buttonTween = this.game.add.tween(this.playButton.scale),
+ this.buttonTween.to({
+ x: 1.14 * this.scaleFactor,
+ y: 1.14 * this.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ this.buttonTween.yoyo(!0).onComplete.add(this.animateButton, this),
+ void this.buttonTween.start())
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update(),
+ this.twirl.angle += 5
+ }
+ ,
+ d.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ d.prototype.shutdown = function() {
+ c.prototype.shutdown.call(this),
+ this.logo.destroy(!0),
+ this.jelly.destroy(!0),
+ this.playButton.destroy(!0),
+ this.background.destroy(!0),
+ this.preloadText.destroy(!0),
+ this.logo = null,
+ this.jelly = null,
+ this.playButton = null,
+ this.background = null,
+ this.preloadText = null,
+ this.config = null,
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.game.state.remove(b.Preloader.Name),
+ this.game.state.remove(b.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "speleSplashScreen",
+ c.IdealWidth = 860,
+ c.MaxDots = 3,
+ b.Spele = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(b) {
+ var c = function(c) {
+ function d() {
+ var a = c.call(this) || this;
+ return a.name = d.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.preloadReady = !1,
+ a.clicked = !1,
+ a.dots = 1,
+ a.dotText = ".",
+ a.tId = 0,
+ a
+ }
+ return __extends(d, c),
+ d.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.game.scale.onSizeChange.add(this.resize, this)
+ }
+ ,
+ d.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ d.prototype.onPreloadStart = function() {}
+ ,
+ d.prototype.onPreloadedFile = function() {}
+ ,
+ d.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.loadBack.visible = !1,
+ this.loadBar.visible = !1,
+ this.game.input.onUp.add(this.handler, this),
+ this.animateButton()
+ }
+ ,
+ d.prototype.createObjects = function() {
+ this.logo = this.game.add.image(0, 0, "logo"),
+ this.logo.anchor.set(.5),
+ d.IdealWidth = this.logo.getBounds().width,
+ this.loadBack = this.game.add.sprite(this.game.width / 2, .75 * this.game.height, "loader"),
+ this.loadBack.anchor.set(.5);
+ var a = this.game.make.graphics(0, 0);
+ a.beginFill(16777215, 1).drawRoundedRect(0, 0, 350, 20, 5).endFill(),
+ this.loadBar = this.game.add.sprite(this.game.width / 2 - 175, .75 * this.game.height - 5, a.generateTexture()),
+ this.loadBar.anchor.set(0, .5),
+ this.load.setPreloadSprite(this.loadBar),
+ this.playButton = this.game.add.button(this.game.width / 2, .75 * this.game.height, "fgs_play", this.handler, this, 0, 0, 1, 0),
+ this.playButton.anchor.set(.5),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !1,
+ this.created = !0
+ }
+ ,
+ d.prototype.resizeObjects = function() {
+ this.created && (this.logo.scale.set(this.scaleFactor),
+ this.logo.y = this.game.height / 2,
+ this.logo.x = this.game.width / 2,
+ a.Utils.isOnDevice(this.game) || (this.playButton.x = this.game.width / 2,
+ this.playButton.y = .75 * this.game.height))
+ }
+ ,
+ d.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--4--",a,b);
+ if (!this.clicked && "mouseout" !== b.type) {
+ this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250);
+ var c = this.game.add.tween(this.playButton.scale);
+ c.to({
+ x: 0,
+ y: 0
+ }, 250, Phaser.Easing.Back.In).start(),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this)
+ }
+ }
+ ,
+ d.prototype.getScale = function() {
+ return a.Utils.isOnDevice(this.game) ? this.game.width < 1.5 * d.IdealWidth ? this.game.width / 6 * 4 / d.IdealWidth : 1 : this.game.width < this.game.height ? this.game.width / 6 * 4 / d.IdealWidth : this.game.width / 6 * 3 / d.IdealWidth
+ }
+ ,
+ d.prototype.startAnimation = function() {}
+ ,
+ d.prototype.animateButton = function() {
+ a.Utils.isOnDevice(this.game) || (this.game.tweens.remove(this.buttonTween),
+ this.playButton.scale.set(this.scaleFactor),
+ this.playButton.visible = !0,
+ this.buttonTween = this.game.add.tween(this.playButton.scale),
+ this.buttonTween.to({
+ x: 1.14 * this.scaleFactor,
+ y: 1.14 * this.scaleFactor
+ }, 420, Phaser.Easing.Quadratic.InOut, !0, 500),
+ this.buttonTween.yoyo(!0).onComplete.add(this.animateButton, this),
+ this.buttonTween.start())
+ }
+ ,
+ d.prototype.update = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.loadUpdate = function() {
+ this.background.update()
+ }
+ ,
+ d.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects(),
+ this.created && this.preloadReady && this.animateButton()
+ }
+ ,
+ d.prototype.shutdown = function() {
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.loadBack.destroy(!0),
+ this.loadBar.destroy(!0),
+ this.playButton.destroy(!0),
+ this.background.destroy(!0),
+ this.loadBack = null,
+ this.loadBar = null,
+ this.playButton = null,
+ this.background = null,
+ this.game.state.remove(b.Preloader.Name),
+ this.game.state.remove(b.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ d
+ }(Phaser.State);
+ c.Name = "spilSplashScreen",
+ c.IdealWidth = 531,
+ c.MaxDots = 3,
+ b.Spil = c
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b;
+ !function(a) {
+ var b = function(b) {
+ function c() {
+ var a = b.call(this) || this;
+ return a.name = c.Name,
+ a.scaleFactor = 1,
+ a.created = !1,
+ a.tiles = [],
+ a.preloadReady = !1,
+ a.balls = [],
+ a.clicked = !1,
+ a.tId = 0,
+ a.dt = Date.now(),
+ a.ddt = Date.now(),
+ a
+ }
+ return __extends(c, b),
+ c.prototype.init = function(a, b) {
+ this.config = a,
+ this.background = b,
+ this.game.scale.onSizeChange.add(this.resize, this),
+ this.gradientBitmap = this.game.make.bitmapData(this.game.width, this.game.height)
+ }
+ ,
+ c.prototype.preload = function() {
+ this.game.add.existing(this.background),
+ this.createObjects(),
+ this.scaleFactor = this.getScale(),
+ this.resizeObjects(),
+ this.startAnimation(),
+ this.game.load.onLoadStart.add(this.onPreloadStart, this),
+ this.game.load.onFileComplete.add(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.add(this.onPreloadEnd, this),
+ this.config.preloadHandler(),
+ 0 === this.game.load.totalQueuedFiles() && this.onPreloadEnd()
+ }
+ ,
+ c.prototype.onPreloadStart = function() {
+ this.t = Date.now()
+ }
+ ,
+ c.prototype.onPreloadedFile = function() {}
+ ,
+ c.prototype.onPreloadEnd = function() {
+ this.preloadReady = !0,
+ this.animateButton()
+ }
+ ,
+ c.prototype.createObjects = function() {
+ for (var a = 0; a < 70; a++) {
+ var b = Math.random() < .5 ? "square_empty" : "square_game_" + ("0" + (32 * Math.random() + 1 | 0)).slice(-2)
+ , c = this.game.add.image(this.game.width / 2 + (80 * (a % 10) - 400), this.game.height / 2 + (80 * Math.floor(a / 10) - 280), "yp_atlas", b + ".png");
+ c.alpha = .4,
+ this.tiles.push(c)
+ }
+ this.gradient = this.game.add.sprite(0, 0, this.gradientBitmap),
+ this.spine = this.game.add.spine(0, 0, "yp_splash"),
+ this.spine.setMixByName("flyin", "idle", .2),
+ this.spine.visible = !1,
+ this.logo = this.game.add.sprite(0, 0, "yp_atlas", "yepi_logo.png"),
+ this.logo.alignIn(this.world.bounds, Phaser.TOP_CENTER, 0, -20),
+ this.created = !0;
+ var d = this.game.make.graphics(0, 0);
+ d.beginFill(16631558, 1).drawCircle(0, 0, 20).endFill();
+ for (var a = 0; a < 3; a++) {
+ var e = this.game.add.sprite(0, 0, d.generateTexture());
+ e.alignIn(this.game.world.bounds, Phaser.BOTTOM_CENTER, -50 + 50 * a, -20),
+ e.scale.set(0),
+ e.anchor.set(.5),
+ this.balls.push(e),
+ this.game.add.tween(e.scale).to({
+ x: 1,
+ y: 1
+ }, 900, "Linear", !0, 300 * a, -1).yoyo(!0).delay(300)
+ }
+ }
+ ,
+ c.prototype.resizeObjects = function() {
+ var a = this;
+ if (this.created) {
+ this.gradientBitmap.resize(this.game.width, this.game.height),
+ this.gradientBitmap.context.clearRect(0, 0, this.game.width, this.game.height);
+ var b = this.gradientBitmap.context.createRadialGradient(this.game.width / 2, this.game.height / 2, 0, this.game.width / 2, this.game.height / 2, this.game.height / 1.8);
+ b.addColorStop(0, "rgba(0, 81, 125, 0)"),
+ b.addColorStop(1, "rgba(0, 81, 125, 1)"),
+ this.gradientBitmap.context.fillStyle = b,
+ this.gradientBitmap.context.fillRect(0, 0, this.game.width, this.game.height),
+ this.spine.x = this.game.width / 2,
+ this.spine.y = this.game.height / 2,
+ this.spine.scale.set(this.scaleFactor),
+ this.logo.scale.set(this.scaleFactor),
+ this.logo.alignIn(this.world.bounds, Phaser.TOP_CENTER, 0, -20),
+ this.tiles.forEach(function(b, c) {
+ b.x = a.game.width / 2 + (80 * (c % 10) - 400),
+ b.y = a.game.height / 2 + (80 * Math.floor(c / 10) - 280)
+ })
+ }
+ }
+ ,
+ c.prototype.handler = function(a, b) {
+ console.l0g("--fx--handler--5--",a,b);
+ this.clicked || "mouseout" === b.type || (this.clicked = !0,
+ this.game.tweens.remove(this.buttonTween),
+ this.game.camera.fade(0, 250),
+ void 0 !== this.config.mobilePlayClickhandler ? this.config.mobilePlayClickhandler() : this.game.state.start(this.config.nextState),
+ this.game.input.onUp.remove(this.handler, this))
+ }
+ ,
+ c.prototype.getScale = function() {
+ return this.game.width < this.game.height ? this.game.width / 6 * 4 / a.FunnyGames.IdealWidth : this.game.width / 6 * 3 / a.FunnyGames.IdealWidth
+ }
+ ,
+ c.prototype.startAnimation = function() {}
+ ,
+ c.prototype.animateButton = function() {
+ console.l0g("--fx--animateButton--5--");
+ return this.config.showPlayButton === !1 ? this.handler(this.game.input.pointer1, new MouseEvent("mousedown")) : (this.spine.visible = !0,
+ this.spine.setAnimationByName(0, "flyin", !1),
+ this.spine.addAnimationByName(0, "idle", !0, 0),
+ this.game.tweens.removeAll(),
+ this.balls.forEach(function(a) {
+ a.parent.removeChild(a),
+ a.destroy(!0)
+ }),
+ void this.game.input.onUp.add(this.handler, this))
+ }
+ ,
+ c.prototype.update = function() {
+ var a = Date.now() - this.dt;
+ a > 200 && (this.tweenRandomItem(),
+ this.dt = Date.now())
+ }
+ ,
+ c.prototype.loadUpdate = function() {
+ var a = Date.now() - this.ddt;
+ a > 200 && (this.ddt = Date.now(),
+ this.tweenRandomItem())
+ }
+ ,
+ c.prototype.tweenRandomItem = function() {
+ var a = this.tiles[Math.random() * this.tiles.length | 0];
+ this.game.add.tween(a).to({
+ alpha: 1
+ }, 1e3, Phaser.Easing.Linear.None, !0, 0, 0, !0)
+ }
+ ,
+ c.prototype.resize = function() {
+ this.scaleFactor = this.getScale(),
+ this.background.resize(this.scaleFactor),
+ this.resizeObjects()
+ }
+ ,
+ c.prototype.shutdown = function() {
+ b.prototype.shutdown.call(this),
+ this.spine.destroy(!0),
+ this.background.destroy(!0),
+ this.tiles.forEach(function(a) {
+ a.destroy(!0)
+ }),
+ this.gradientBitmap.destroy(),
+ this.gradient.destroy(!0),
+ this.logo.destroy(!0),
+ this.balls.forEach(function(a) {
+ a.destroy(!0)
+ }),
+ this.spine = null,
+ this.playButton = null,
+ this.background = null,
+ this.gradientBitmap = null,
+ this.gradient = null,
+ this.logo = null,
+ this.tiles = null,
+ this.balls = null,
+ this.game.scale.onSizeChange.remove(this.resize, this),
+ this.game.load.onLoadStart.remove(this.onPreloadStart, this),
+ this.game.load.onFileComplete.remove(this.onPreloadedFile, this),
+ this.game.load.onLoadComplete.remove(this.onPreloadEnd, this),
+ this.game.state.remove(a.Preloader.Name),
+ this.game.state.remove(a.SplashPreloader.Name),
+ this.game.state.remove(this.name)
+ }
+ ,
+ c
+ }(Phaser.State);
+ b.Name = "yepiSplashScreen",
+ b.IdealWidth = 463,
+ b.MaxDots = 3,
+ a.Yepi = b
+ }(b = a.SplashScreen || (a.SplashScreen = {}))
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b = null
+ , c = function() {
+ function a() {}
+ return a.has = function(a) {
+ var c = a.lastIndexOf(".");
+ if (c <= 0 || c >= a.length - 1)
+ return !1;
+ var d = a.lastIndexOf(".", c - 1);
+ if (d <= 0 || d >= c - 1)
+ return !1;
+ var e = b[a.slice(c + 1)];
+ return !!e && e.indexOf(" " + a.slice(d + 1, c) + " ") >= 0
+ }
+ ,
+ a.is = function(a) {
+ var c = a.lastIndexOf(".");
+ if (c <= 0 || c >= a.length - 1)
+ return !1;
+ var d = a.lastIndexOf(".", c - 1);
+ if (d >= 0)
+ return !1;
+ var e = b[a.slice(c + 1)];
+ return !!e && e.indexOf(" " + a.slice(0, c) + " ") >= 0
+ }
+ ,
+ a.get = function(a) {
+ var c = a.lastIndexOf(".");
+ if (c <= 0 || c >= a.length - 1)
+ return null;
+ var d = a.lastIndexOf(".", c - 1);
+ if (d <= 0 || d >= c - 1)
+ return null;
+ var e = b[a.slice(c + 1)];
+ return e ? e.indexOf(" " + a.slice(d + 1, c) + " ") < 0 ? null : a.slice(d + 1) : null
+ }
+ ,
+ a
+ }()
+ , d = function() {
+ function a() {}
+ return a.setList = function(a) {
+ b = a || {}
+ }
+ ,
+ a.getDomain = function(a) {
+ if (null === b)
+ return null;
+ var c = a.match(/\./g);
+ if (c && c.length < 2)
+ return a;
+ var d = a.length - this.getTld(a).length - 1;
+ return d = a.lastIndexOf(".", d - 1) + 1,
+ a.substring(d) || ""
+ }
+ ,
+ a.getTld = function(a) {
+ if (null === b)
+ return null;
+ var d = a.lastIndexOf(".")
+ , e = a.substring(d + 1);
+ return b[e.toLowerCase()] ? c.get(a) || e : e
+ }
+ ,
+ a
+ }();
+ d.KEY = "Domains",
+ a.Domain = d
+}(Fabrique || (Fabrique = {}));
+var Fabrique;
+!function(a) {
+ var b = function() {
+ function b() {}
+ return b.getSourceSite = function(c) {
+ void 0 === c && (c = !1);
+ var d = document.referrer || window.location.host;
+ if (c && (d = window.location.host),
+ d.indexOf("embed.gamedistribution.com") !== -1 && window.location.search.indexOf("gd_sdk_referrer_url") !== -1 && (d = b.getUrlParameter("gd_sdk_referrer_url") || d),
+ d = decodeURIComponent(d),
+ a.Branding.isBild())
+ return "bildspielt.de";
+ if (a.Branding.isBip())
+ return "bipgaming.com";
+ a.Branding.isSpil() && (d = b.getReferrer(d)),
+ d = d.indexOf("://") > -1 ? d.split("/")[2] : d.split("/")[0],
+ d = d.split(":")[0];
+ var e = a.Domain.getDomain(d);
+ return null !== e ? e : (3 === d.split(".").length && (d = d.substr(d.indexOf(".") + 1)),
+ d)
+ }
+ ,
+ b.getBrandingDomain = function() {
+ if (window.hasOwnProperty("fbrqBD") && window.fbrqBD in a.BrandingDomain)
+ return window.fbrqBD;
+ if (a.SplashScreen.Preloader.SPLASH_OVERRIDE !== !1)
+ return a.SplashScreen.Preloader.SPLASH_OVERRIDE;
+ var c = b.getSourceSite();
+ if (a.Branding.isAdmeen())
+ return a.BrandingDomain.Admeen;
+ if (a.Branding.isPlaycellApp() || a.Branding.isBip())
+ return a.BrandingDomain.PlayCell;
+ switch (c) {
+ case "spele.nl":
+ return a.BrandingDomain.Spele;
+ case "yepi.com":
+ return a.BrandingDomain.Yepi;
+ case "oyunskor.com":
+ case "barbioyunu.com.tr":
+ case "bebekoyunu.com.tr":
+ case "oyunkolu.com":
+ case "oyungemisi.com":
+ case "oyunlar1.com":
+ case "oyunkuzusu.com":
+ case "kraloyun.com":
+ case "rekoroyun.com":
+ case "oyundedem.com":
+ case "oyunoyna.com":
+ case "pastaoyunu.com.tr":
+ case "playcell.com":
+ return a.BrandingDomain.PlayCell;
+ case "gamecell.com":
+ return a.BrandingDomain.GameCell;
+ case "playxl.com":
+ return a.BrandingDomain.Admeen;
+ default:
+ case "kizi.com":
+ return a.BrandingDomain.Kizi;
+ case "bildspielt.de":
+ return a.BrandingDomain.Bild;
+ case "funnygames.nl":
+ return a.BrandingDomain.Funnygames
+ }
+ }
+ ,
+ b.getReferrer = function(a) {
+ return a.indexOf("?ref=") !== -1 ? a.substr(a.indexOf("?ref=") + 5) : a
+ }
+ ,
+ b.inIframe = function() {
+ try {
+ return window.self !== window.top
+ } catch (a) {
+ return !0
+ }
+ }
+ ,
+ b.getDomain = function(a) {
+ var b = document.createElement("a");
+ return b.href = a,
+ b.origin
+ }
+ ,
+ b.isOnDevice = function(a) {
+ return !(!a.device.cordova && !a.device.crosswalk) && !/(gamedistribution\.com)/.test(window.location.hostname)
+ }
+ ,
+ b.isTc = function() {
+ return /(teamcity\.ds\.orangegames\.com)/.test(window.location.host)
+ }
+ ,
+ b.getRandomRange = function(a, b) {
+ return Math.random() * (b - a) + a | 0
+ }
+ ,
+ b.getUrlParameter = function(a) {
+ a = a.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
+ var b = new RegExp("[\\?&]" + a + "=([^]*)")
+ , c = b.exec(location.search);
+ return null === c ? "" : decodeURIComponent(c[1].replace(/\+/g, " "))
+ }
+ ,
+ b.intTimeToString = function(a) {
+ var b = Math.floor(a / 3600)
+ , c = Math.floor(a % 3600 / 60)
+ , d = a % 60
+ , e = b < 10 ? "0" + b : b.toString()
+ , f = c < 10 ? "0" + c : c.toString()
+ , g = d < 10 ? "0" + d : d.toString();
+ return e + ":" + f + ":" + g
+ }
+ ,
+ b.registerAudioUnlocker = function(a) {
+ a.input.touch && "function" != typeof a.input.touch.addTouchLockCallback || a.device.android && a.device.chrome && a.device.chromeVersion >= 55 && (a.sound.touchLocked = !0,
+ a.input.touch.addTouchLockCallback(function() {
+ if (this.noAudio || !this.touchLocked || null !== this._unlockSource)
+ return !0;
+ if (this.usingWebAudio) {
+ var a = this.context.createBuffer(1, 1, 22050);
+ this._unlockSource = this.context.createBufferSource(),
+ this._unlockSource.buffer = a,
+ this._unlockSource.connect(this.context.destination),
+ void 0 === this._unlockSource.start ? this._unlockSource.noteOn(0) : this._unlockSource.start(0),
+ "suspended" === this._unlockSource.context.state && this._unlockSource.context.resume()
+ }
+ return !0
+ }, a.sound, !0))
+ }
+ ,
+ b
+ }();
+ b.ASSET_LOCATION = "patch/cdn/kizi/",
+ a.Utils = b
+}(Fabrique || (Fabrique = {}));
+var CryptoJS = CryptoJS || function(a, b) {
+ var c = {}
+ , d = c.lib = {}
+ , e = function() {}
+ , f = d.Base = {
+ extend: function(a) {
+ e.prototype = this;
+ var b = new e;
+ return a && b.mixIn(a),
+ b.hasOwnProperty("init") || (b.init = function() {
+ b.$super.init.apply(this, arguments)
+ }
+ ),
+ b.init.prototype = b,
+ b.$super = this,
+ b
+ },
+ create: function() {
+ var a = this.extend();
+ return a.init.apply(a, arguments),
+ a
+ },
+ init: function() {},
+ mixIn: function(a) {
+ for (var b in a)
+ a.hasOwnProperty(b) && (this[b] = a[b]);
+ a.hasOwnProperty("toString") && (this.toString = a.toString)
+ },
+ clone: function() {
+ return this.init.prototype.extend(this)
+ }
+ }
+ , g = d.WordArray = f.extend({
+ init: function(a, c) {
+ a = this.words = a || [],
+ this.sigBytes = c != b ? c : 4 * a.length
+ },
+ toString: function(a) {
+ return (a || i).stringify(this)
+ },
+ concat: function(a) {
+ var b = this.words
+ , c = a.words
+ , d = this.sigBytes;
+ if (a = a.sigBytes,
+ this.clamp(),
+ d % 4)
+ for (var e = 0; e < a; e++)
+ b[d + e >>> 2] |= (c[e >>> 2] >>> 24 - e % 4 * 8 & 255) << 24 - (d + e) % 4 * 8;
+ else if (65535 < c.length)
+ for (e = 0; e < a; e += 4)
+ b[d + e >>> 2] = c[e >>> 2];
+ else
+ b.push.apply(b, c);
+ return this.sigBytes += a,
+ this
+ },
+ clamp: function() {
+ var b = this.words
+ , c = this.sigBytes;
+ b[c >>> 2] &= 4294967295 << 32 - c % 4 * 8,
+ b.length = a.ceil(c / 4)
+ },
+ clone: function() {
+ var a = f.clone.call(this);
+ return a.words = this.words.slice(0),
+ a
+ },
+ random: function(b) {
+ for (var c = [], d = 0; d < b; d += 4)
+ c.push(4294967296 * a.random() | 0);
+ return new g.init(c,b)
+ }
+ })
+ , h = c.enc = {}
+ , i = h.Hex = {
+ stringify: function(a) {
+ var b = a.words;
+ a = a.sigBytes;
+ for (var c = [], d = 0; d < a; d++) {
+ var e = b[d >>> 2] >>> 24 - d % 4 * 8 & 255;
+ c.push((e >>> 4).toString(16)),
+ c.push((15 & e).toString(16))
+ }
+ return c.join("")
+ },
+ parse: function(a) {
+ for (var b = a.length, c = [], d = 0; d < b; d += 2)
+ c[d >>> 3] |= parseInt(a.substr(d, 2), 16) << 24 - d % 8 * 4;
+ return new g.init(c,b / 2)
+ }
+ }
+ , j = h.Latin1 = {
+ stringify: function(a) {
+ var b = a.words;
+ a = a.sigBytes;
+ for (var c = [], d = 0; d < a; d++)
+ c.push(String.fromCharCode(b[d >>> 2] >>> 24 - d % 4 * 8 & 255));
+ return c.join("")
+ },
+ parse: function(a) {
+ for (var b = a.length, c = [], d = 0; d < b; d++)
+ c[d >>> 2] |= (255 & a.charCodeAt(d)) << 24 - d % 4 * 8;
+ return new g.init(c,b)
+ }
+ }
+ , k = h.Utf8 = {
+ stringify: function(a) {
+ try {
+ return decodeURIComponent(escape(j.stringify(a)))
+ } catch (a) {
+ throw Error("Malformed UTF-8 data")
+ }
+ },
+ parse: function(a) {
+ return j.parse(unescape(encodeURIComponent(a)))
+ }
+ }
+ , l = d.BufferedBlockAlgorithm = f.extend({
+ reset: function() {
+ this._data = new g.init,
+ this._nDataBytes = 0
+ },
+ _append: function(a) {
+ "string" == typeof a && (a = k.parse(a)),
+ this._data.concat(a),
+ this._nDataBytes += a.sigBytes
+ },
+ _process: function(b) {
+ var c = this._data
+ , d = c.words
+ , e = c.sigBytes
+ , f = this.blockSize
+ , h = e / (4 * f)
+ , h = b ? a.ceil(h) : a.max((0 | h) - this._minBufferSize, 0);
+ if (b = h * f,
+ e = a.min(4 * b, e),
+ b) {
+ for (var i = 0; i < b; i += f)
+ this._doProcessBlock(d, i);
+ i = d.splice(0, b),
+ c.sigBytes -= e
+ }
+ return new g.init(i,e)
+ },
+ clone: function() {
+ var a = f.clone.call(this);
+ return a._data = this._data.clone(),
+ a
+ },
+ _minBufferSize: 0
+ });
+ d.Hasher = l.extend({
+ cfg: f.extend(),
+ init: function(a) {
+ this.cfg = this.cfg.extend(a),
+ this.reset()
+ },
+ reset: function() {
+ l.reset.call(this),
+ this._doReset()
+ },
+ update: function(a) {
+ return this._append(a),
+ this._process(),
+ this
+ },
+ finalize: function(a) {
+ return a && this._append(a),
+ this._doFinalize()
+ },
+ blockSize: 16,
+ _createHelper: function(a) {
+ return function(b, c) {
+ return new a.init(c).finalize(b)
+ }
+ },
+ _createHmacHelper: function(a) {
+ return function(b, c) {
+ return new m.HMAC.init(a,c).finalize(b)
+ }
+ }
+ });
+ var m = c.algo = {};
+ return c
+}(Math);
+!function(a) {
+ for (var b = CryptoJS, c = b.lib, d = c.WordArray, e = c.Hasher, c = b.algo, f = [], g = [], h = function(a) {
+ return 4294967296 * (a - (0 | a)) | 0
+ }, i = 2, j = 0; 64 > j; ) {
+ var k;
+ a: {
+ k = i;
+ for (var l = a.sqrt(k), m = 2; m <= l; m++)
+ if (!(k % m)) {
+ k = !1;
+ break a
+ }
+ k = !0
+ }
+ k && (8 > j && (f[j] = h(a.pow(i, .5))),
+ g[j] = h(a.pow(i, 1 / 3)),
+ j++),
+ i++
+ }
+ var n = []
+ , c = c.SHA256 = e.extend({
+ _doReset: function() {
+ this._hash = new d.init(f.slice(0))
+ },
+ _doProcessBlock: function(a, b) {
+ for (var c = this._hash.words, d = c[0], e = c[1], f = c[2], h = c[3], i = c[4], j = c[5], k = c[6], l = c[7], m = 0; 64 > m; m++) {
+ if (16 > m)
+ n[m] = 0 | a[b + m];
+ else {
+ var o = n[m - 15]
+ , p = n[m - 2];
+ n[m] = ((o << 25 | o >>> 7) ^ (o << 14 | o >>> 18) ^ o >>> 3) + n[m - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[m - 16]
+ }
+ o = l + ((i << 26 | i >>> 6) ^ (i << 21 | i >>> 11) ^ (i << 7 | i >>> 25)) + (i & j ^ ~i & k) + g[m] + n[m],
+ p = ((d << 30 | d >>> 2) ^ (d << 19 | d >>> 13) ^ (d << 10 | d >>> 22)) + (d & e ^ d & f ^ e & f),
+ l = k,
+ k = j,
+ j = i,
+ i = h + o | 0,
+ h = f,
+ f = e,
+ e = d,
+ d = o + p | 0
+ }
+ c[0] = c[0] + d | 0,
+ c[1] = c[1] + e | 0,
+ c[2] = c[2] + f | 0,
+ c[3] = c[3] + h | 0,
+ c[4] = c[4] + i | 0,
+ c[5] = c[5] + j | 0,
+ c[6] = c[6] + k | 0,
+ c[7] = c[7] + l | 0
+ },
+ _doFinalize: function() {
+ var b = this._data
+ , c = b.words
+ , d = 8 * this._nDataBytes
+ , e = 8 * b.sigBytes;
+ return c[e >>> 5] |= 128 << 24 - e % 32,
+ c[14 + (e + 64 >>> 9 << 4)] = a.floor(d / 4294967296),
+ c[15 + (e + 64 >>> 9 << 4)] = d,
+ b.sigBytes = 4 * c.length,
+ this._process(),
+ this._hash
+ },
+ clone: function() {
+ var a = e.clone.call(this);
+ return a._hash = this._hash.clone(),
+ a
+ }
+ });
+ b.SHA256 = e._createHelper(c),
+ b.HmacSHA256 = e._createHmacHelper(c)
+}(Math),
+function() {
+ var a = CryptoJS
+ , b = a.enc.Utf8;
+ a.algo.HMAC = a.lib.Base.extend({
+ init: function(a, c) {
+ a = this._hasher = new a.init,
+ "string" == typeof c && (c = b.parse(c));
+ var d = a.blockSize
+ , e = 4 * d;
+ c.sigBytes > e && (c = a.finalize(c)),
+ c.clamp();
+ for (var f = this._oKey = c.clone(), g = this._iKey = c.clone(), h = f.words, i = g.words, j = 0; j < d; j++)
+ h[j] ^= 1549556828,
+ i[j] ^= 909522486;
+ f.sigBytes = g.sigBytes = e,
+ this.reset()
+ },
+ reset: function() {
+ var a = this._hasher;
+ a.reset(),
+ a.update(this._iKey)
+ },
+ update: function(a) {
+ return this._hasher.update(a),
+ this
+ },
+ finalize: function(a) {
+ var b = this._hasher;
+ return a = b.finalize(a),
+ b.reset(),
+ b.finalize(this._oKey.clone().concat(a))
+ }
+ })
+}(),
+function() {
+ var a = CryptoJS
+ , b = a.lib.WordArray;
+ a.enc.Base64 = {
+ stringify: function(a) {
+ var b = a.words
+ , c = a.sigBytes
+ , d = this._map;
+ a.clamp(),
+ a = [];
+ for (var e = 0; e < c; e += 3)
+ for (var f = (b[e >>> 2] >>> 24 - e % 4 * 8 & 255) << 16 | (b[e + 1 >>> 2] >>> 24 - (e + 1) % 4 * 8 & 255) << 8 | b[e + 2 >>> 2] >>> 24 - (e + 2) % 4 * 8 & 255, g = 0; 4 > g && e + .75 * g < c; g++)
+ a.push(d.charAt(f >>> 6 * (3 - g) & 63));
+ if (b = d.charAt(64))
+ for (; a.length % 4; )
+ a.push(b);
+ return a.join("")
+ },
+ parse: function(a) {
+ var c = a.length
+ , d = this._map
+ , e = d.charAt(64);
+ e && -1 != (e = a.indexOf(e)) && (c = e);
+ for (var e = [], f = 0, g = 0; g < c; g++)
+ if (g % 4) {
+ var h = d.indexOf(a.charAt(g - 1)) << g % 4 * 2
+ , i = d.indexOf(a.charAt(g)) >>> 6 - g % 4 * 2;
+ e[f >>> 2] |= (h | i) << 24 - f % 4 * 8,
+ f++
+ }
+ return b.create(e, f)
+ },
+ _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
+ }
+}();
+var GA;
+!function(a) {
+ !function(a) {
+ a[a.ios = 0] = "ios",
+ a[a.android = 1] = "android",
+ a[a.windows = 2] = "windows",
+ a[a.windows_phone = 3] = "windows_phone",
+ a[a.blackberry = 4] = "blackberry",
+ a[a.roku = 5] = "roku",
+ a[a.tizen = 6] = "tizen",
+ a[a.nacl = 7] = "nacl",
+ a[a.mac_osx = 8] = "mac_osx",
+ a[a.webplayer = 9] = "webplayer"
+ }(a.Platform || (a.Platform = {})),
+ a.Platform,
+ function(a) {
+ a[a.male = 0] = "male",
+ a[a.female = 1] = "female"
+ }(a.Gender || (a.Gender = {})),
+ a.Gender
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = /^[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}:[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}$/
+ , c = function() {
+ function a(a, c, d, e, f, g) {
+ if (this.category = 1,
+ this.transaction_num = 0,
+ !a || null === a.match(b))
+ throw new Error("Invalid event_id supplied for BusinessEvent");
+ if (this.event_id = a,
+ this.amount = c,
+ !d || null === d.match(/^[A-Z]{3}$/))
+ throw new Error("Invalid currency supplied for BusinessEvent");
+ if (this.currency = d,
+ this.transaction_num = e,
+ f) {
+ if (f.length > 32)
+ throw new Error("A too long cart_type was supplied, should be max 32 characters");
+ this.cart_type = f
+ }
+ void 0 !== g && (this.receipt_info = g)
+ }
+ return a
+ }();
+ a.Business = c
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = /^[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}(:[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}){0,4}$/
+ , c = function() {
+ function a(a, c) {
+ if (this.category = 0,
+ null === a.match(b))
+ throw new Error("Invalid event_id supplied for DesignEvent");
+ this.event_id = a,
+ void 0 !== c && (this.value = c)
+ }
+ return a
+ }();
+ a.Design = c
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ !function(a) {
+ a[a.design = 0] = "design",
+ a[a.business = 1] = "business",
+ a[a.error = 2] = "error",
+ a[a.user = 3] = "user",
+ a[a.session_end = 4] = "session_end",
+ a[a.progression = 5] = "progression",
+ a[a.resource = 6] = "resource"
+ }(a.Category || (a.Category = {})),
+ a.Category
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ !function(a) {
+ a[a.debug = 0] = "debug",
+ a[a.info = 1] = "info",
+ a[a.warning = 2] = "warning",
+ a[a.error = 3] = "error",
+ a[a.critical = 4] = "critical"
+ }(a.ErrorSeverity || (a.ErrorSeverity = {}));
+ var b = a.ErrorSeverity
+ , c = function() {
+ function a(a, c) {
+ this.category = 2,
+ this.message = "",
+ this.severity = b[a],
+ void 0 !== c && (this.message = c.substr(0, 8192))
+ }
+ return a
+ }();
+ a.Exception = c
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = function() {
+ function a() {}
+ return a
+ }();
+ a.InitResponse = b;
+ var c = function() {
+ function a(a) {
+ this.data = a
+ }
+ return a.prototype.toString = function() {
+ return JSON.stringify(this.data)
+ }
+ ,
+ a
+ }();
+ a.Init = c
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = /^(Start|Fail|Complete):[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}(:[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}){0,2}$/
+ , c = function() {
+ function a(a, c, d) {
+ if (this.category = 5,
+ null === a.match(b))
+ throw new Error("Invalid event_id supplied for ProgressionEvent");
+ this.event_id = a,
+ void 0 !== c && (this.attempt_num = c),
+ void 0 !== d && (this.score = d)
+ }
+ return a
+ }();
+ a.Progression = c
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = /^(Sink|Source):[A-Za-z]{1,64}:[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}:[A-Za-z0-9\\s\\-_\\.\\(\\)\\!\\?]{1,64}/
+ , c = function() {
+ function a(a, c) {
+ if (this.category = 6,
+ null === a.match(b))
+ throw new Error("Invalid event_id supplied for ResourceEvent");
+ this.event_id = a,
+ this.amount = c
+ }
+ return a
+ }();
+ a.Resource = c
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = function() {
+ function a(a) {
+ this.category = 4,
+ this.length = 0,
+ this.length = a
+ }
+ return a
+ }();
+ a.SessionEnd = b
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = function() {
+ function a() {
+ this.category = 3
+ }
+ return a
+ }();
+ a.User = b
+ }(a.Events || (a.Events = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ function b() {
+ return null === c.instance && (c.instance = new c),
+ c.instance
+ }
+ a.getInstance = b;
+ var c = function() {
+ function b() {
+ this.sessionId = a.Utils.createUniqueId(),
+ this.messageQueue = new a.Utils.MessageQueue,
+ this.enabled = !1,
+ this.initProcessed = !1,
+ this.timeoutId = 0,
+ this.timeOffset = 0
+ }
+ return b.prototype.init = function(c, d, e, f) {
+ var g = this;
+ if (null === b.instance)
+ throw new Error("No instance Available!");
+ this.gameKey = c,
+ this.secretKey = d,
+ this.build = e,
+ this.user = f,
+ this.incrementSessionNum(f);
+ var h = new a.Events.Init(a.Utils.getBaseAnnotations());
+ return this.sendEvent(h.toString(), "init", function(a) {
+ g.initProcessed = !0,
+ !0 === a.enabled && (g.enabled = !0,
+ g.timeOffset = (Date.now() / 1e3 | 0) - a.server_ts)
+ }),
+ this.scheduleSendData(b.SCHEDULE_TIME),
+ window.addEventListener("beforeunload", function() {
+ g.sendData()
+ }),
+ this
+ }
+ ,
+ b.prototype.incrementSessionNum = function(b) {
+ var c = a.Utils.LocalStorage.getItem(b.user_id);
+ c ? a.Utils.LocalStorage.setItem(b.user_id, (parseInt(c) + 1).toString()) : (c = "1",
+ a.Utils.LocalStorage.setItem(b.user_id, c))
+ }
+ ,
+ b.prototype.addEvent = function(c) {
+ if (null === b.instance)
+ throw new Error("No instance Available!");
+ var d = new a.Utils.Message(c,a.Utils.getDefaultAnnotations(this.user, this.sessionId, this.build, this.timeOffset));
+ return this.messageQueue.push(d),
+ this
+ }
+ ,
+ b.prototype.sendData = function() {
+ if (!1 === this.initProcessed)
+ return this.scheduleSendData(1e3),
+ this;
+ if (!1 === this.enabled)
+ return this;
+ if (null === b.instance)
+ throw new Error("No instance Available!");
+ for (var a = [], c = ""; this.messageQueue.length > 0; ) {
+ var d = this.messageQueue.pop();
+ a.push(d.data)
+ }
+ if (0 === a.length)
+ return this.scheduleSendData(b.SCHEDULE_TIME),
+ this;
+ try {
+ c = JSON.stringify(a)
+ } catch (a) {}
+ return this.sendEvent(c, "events"),
+ this.scheduleSendData(b.SCHEDULE_TIME),
+ this
+ }
+ ,
+ b.prototype.scheduleSendData = function(a) {
+ var b = this;
+ clearTimeout(this.timeoutId),
+ this.timeoutId = setTimeout(function() {
+ b.sendData()
+ }, a)
+ }
+ ,
+ b.prototype.sendEvent = function(c, d, e) {
+ if (void 0 === e && (e = null),
+ null === b.instance && null === this.gameKey)
+ throw new Error("No instance Available!");
+ if (!(c.length < 1)) {
+ var f = CryptoJS.HmacSHA256(c, this.secretKey)
+ , g = CryptoJS.enc.Base64.stringify(f)
+ , h = b.API_URL + this.gameKey + "/" + d;
+ a.Utils.postRequest(h, c, g, function(a) {
+ if (!1 === a.success && window.console && console.log(a.message),
+ null != e) {
+ var b = "";
+ try {
+ b = JSON.parse(a.message)
+ } catch (a) {}
+ e(b)
+ }
+ })
+ }
+ }
+ ,
+ b.SCHEDULE_TIME = 15e3,
+ b.SDK_VERSION = "rest api v2",
+ b.API_URL = "patch/json/null.json?" + ("https:" === document.location.protocol ? "https" : "http") + "://api.gameanalytics.com/v2/",
+ b.instance = null,
+ b
+ }();
+ a.GameAnalytics = c
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ var b = function() {
+ function b(b, c, d, e) {
+ if (this.user_id = "",
+ b)
+ this.user_id = b;
+ else {
+ var f = a.Utils.LocalStorage.getItem("user");
+ this.user_id = f || a.Utils.createUniqueUserId()
+ }
+ c && c.length > 0 && (this.facebook_id = c,
+ this.user_id = c),
+ a.Utils.LocalStorage.setItem("user", this.user_id),
+ 1 !== d && 0 !== d || (this.gender = d),
+ e && e.toString().match(/^[0-9]{4}$/gi) && (this.birth_year = e)
+ }
+ return b
+ }();
+ a.User = b
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(b) {
+ function c(b, c, d, f) {
+ var g = {
+ sdk_version: a.GameAnalytics.SDK_VERSION,
+ platform: a.Platform[2],
+ os_version: a.Platform[2] + " 8",
+ device: "unknown",
+ v: 2,
+ user_id: b.user_id,
+ client_ts: (Date.now() / 1e3 | 0) + f,
+ manufacturer: "unknown",
+ session_id: c,
+ session_num: e(b.user_id),
+ build: d
+ };
+ b.facebook_id && (g.facebook_id = b.facebook_id),
+ 0 !== b.gender && 1 !== b.gender || (g.gender = a.Gender[b.gender]),
+ b.birth_year && (g.birth_year = b.birth_year);
+ var h = navigator.userAgent;
+ return h.match(/iPad|iPod|iPhone/i) ? (g.platform = a.Platform[0],
+ g.device = h.match(/iPad|iPod|iPhone/i)[0],
+ g.manufacturer = "Apple",
+ g.os_version = a.Platform[0] + " " + h.match(/OS (\b[0-9]+_[0-9]+(?:_[0-9]+)?\b)/)[1].replace(/_/gi, ".")) : h.match(/Android/i) ? (g.platform = a.Platform[1],
+ g.device = h.match(/Mobile/i) ? "Phone" : "Tablet",
+ g.os_version = a.Platform[1],
+ /Firefox/i.test(h) || (g.os_version += " " + h.match(/Android (\d+(?:\.\d+)*);/)[1])) : h.match(/Windows Phone/i) && (g.platform = a.Platform[2],
+ g.device = "Windows Phone",
+ g.os_version = a.Platform[2] + " " + h.match(/Phone (\d+(?:\.\d+)+);/)[1]),
+ g
+ }
+ function d() {
+ var b = {
+ sdk_version: a.GameAnalytics.SDK_VERSION,
+ platform: "unknown",
+ os_version: "unknown"
+ }
+ , c = navigator.userAgent;
+ return c.match(/iPad|iPod|iPhone/i) ? (b.platform = a.Platform[0],
+ b.os_version = a.Platform[0] + " " + c.match(/OS (\b[0-9]+_[0-9]+(?:_[0-9]+)?\b)/)[1].replace(/_/gi, ".")) : c.match(/Android/i) ? (b.platform = a.Platform[1],
+ b.os_version = a.Platform[1],
+ /Firefox/i.test(c) || (b.os_version += " " + c.match(/Android (\d+(?:\.\d+)*);/)[1])) : c.match(/Windows Phone/i) && (b.platform = a.Platform[2],
+ b.os_version = a.Platform[2] + " " + c.match(/Phone (\d+(?:\.\d+)+);/)[1]),
+ b
+ }
+ function e(a) {
+ var c = b.LocalStorage.getItem(a);
+ return c ? parseInt(c) : 1
+ }
+ b.getDefaultAnnotations = c,
+ b.getBaseAnnotations = d
+ }(a.Utils || (a.Utils = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = function() {
+ function a() {}
+ return a.getItem = function(b) {
+ if (a.Available)
+ return localStorage.getItem(a.CacheKey + b)
+ }
+ ,
+ a.setItem = function(b, c) {
+ a.Available && localStorage.setItem(a.CacheKey + b, c)
+ }
+ ,
+ a.Available = !1,
+ a.CacheKey = "GA:",
+ a
+ }();
+ a.LocalStorage = b;
+ try {
+ "object" == typeof localStorage && (localStorage.setItem("testingLocalStorage", "yes"),
+ localStorage.removeItem("testingLocalStorage"),
+ b.Available = !0)
+ } catch (a) {}
+ }(a.Utils || (a.Utils = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(b) {
+ var c = function() {
+ function b(a, b) {
+ this.event = a,
+ this.annotations = b
+ }
+ return Object.defineProperty(b.prototype, "data", {
+ get: function() {
+ for (var b in this.event)
+ this.event.hasOwnProperty(b) && (this.annotations[b] = "category" === b ? a.Events.Category[this.event[b]] : this.event[b]);
+ return this.annotations
+ },
+ enumerable: !0,
+ configurable: !0
+ }),
+ b
+ }();
+ b.Message = c
+ }(a.Utils || (a.Utils = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ var b = function() {
+ function a() {
+ this.queue = [],
+ this.load()
+ }
+ return a.prototype.push = function(a) {
+ this.queue.push(a)
+ }
+ ,
+ a.prototype.pop = function() {
+ return this.queue.pop()
+ }
+ ,
+ Object.defineProperty(a.prototype, "length", {
+ get: function() {
+ return this.queue.length
+ },
+ enumerable: !0,
+ configurable: !0
+ }),
+ a.prototype.save = function() {}
+ ,
+ a.prototype.load = function() {}
+ ,
+ a
+ }();
+ a.MessageQueue = b
+ }(a.Utils || (a.Utils = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ function b(a, b, c, d) {
+ var e;
+ if (!window.XMLHttpRequest)
+ return void d({
+ success: !1,
+ message: "Error: Unable to send request, XMLHttpRequest not supported"
+ });
+ e = new XMLHttpRequest,
+ e.onreadystatechange = function() {
+ 4 == e.readyState && (200 === e.status ? d({
+ success: !0,
+ message: e.responseText
+ }) : e.status > 0 && d({
+ success: !1,
+ message: "Error: There was a problem with the request: status " + e.status
+ }))
+ }
+ ;
+ try {
+ e.open("POST", a, !0),
+ e.setRequestHeader("Authorization", c),
+ e.setRequestHeader("Content-Type", "application/json"),
+ e.send(b)
+ } catch (a) {
+ d({
+ success: !1,
+ message: "Error: Unable to send request, CORS not allowed."
+ })
+ }
+ }
+ var c = function() {
+ function a() {
+ this.success = !1,
+ this.message = ""
+ }
+ return a
+ }();
+ a.Response = c,
+ a.postRequest = b
+ }(a.Utils || (a.Utils = {}))
+}(GA || (GA = {}));
+var GA;
+!function(a) {
+ !function(a) {
+ function b() {
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(a) {
+ var b = 16 * Math.random() | 0;
+ return ("x" == a ? b : 3 & b | 8).toString(16)
+ })
+ }
+ function c() {
+ return b()
+ }
+ a.createUniqueId = b,
+ a.createUniqueUserId = c
+ }(a.Utils || (a.Utils = {}))
+}(GA || (GA = {}));
diff --git a/games/Snow-Rider3D-main/Snow-Rider3D-main/patch/cdn/kizi/splash.min.js b/games/Snow-Rider3D-main/Snow-Rider3D-main/patch/cdn/kizi/splash.min.js
new file mode 100644
index 00000000..76a51f2b
--- /dev/null
+++ b/games/Snow-Rider3D-main/Snow-Rider3D-main/patch/cdn/kizi/splash.min.js
@@ -0,0 +1,12 @@
+/*!
+ * splash - version 3.5.47
+ * This is the Splash Screen for Orange Games
+ *
+ * OrangeGames
+ * Build at 30-01-2019
+ */
+
+function addScript(a,b,c){var d=document.createElement("script");d.setAttribute("src",a+"?v="+b),"function"==typeof c&&(d.onload=c),document.body.appendChild(d)}var __extends=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return function(b,c){function d(){this.constructor=b}a(b,c),b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}(),Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.back=d.game.make.graphics(0,0),d.add(d.back),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){var b=this.game.width<1?1:this.game.width,c=this.game.height<1?1:this.game.height;this.back.clear().beginFill(4351922).drawRect(0,0,b,c)},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.back.destroy(!0),this.back=null},b}(Phaser.Group);a.Admeen=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.back=d.game.make.graphics(0,0),d.add(d.back),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){this.back.clear().beginFill(14548992).drawRect(0,0,this.game.width,this.game.height)},b.prototype.update=function(){},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.back.destroy(!0),this.back=null},b}(Phaser.Group);a.Bild=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.triangles=[],d.triangleSizes=[350,650,950,1250],d.back=d.game.make.graphics(0,0),d.t=d.game.make.graphics(0,0),d.gradientBitmap=d.game.make.bitmapData(1,1),d.gradient=d.game.make.sprite(0,0,d.gradientBitmap),d.add(d.back),d.add(d.t),d.add(d.gradient),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){var b=this,c=this.game.width<1?1:this.game.width,d=this.game.height<1?1:this.game.height;this.back.clear().beginFill(3387647).drawRect(0,0,c,d),this.updateTrinagles(a),this.t.x=c/2,this.t.y=d/2,this.t.clear(),this.t.lineStyle(80*a,16777215,.3),this.triangles.forEach(function(a){b.t.drawPolygon(a)}),this.t.angle=30,this.gradientBitmap.resize(c,d);var e=this.gradientBitmap.context.createLinearGradient(0,0,0,d-200);e.addColorStop(0,"rgba(51, 176, 255, 0)"),e.addColorStop(1,"rgba(51, 176, 255, 1)"),this.gradientBitmap.context.fillStyle=e,this.gradientBitmap.context.clearRect(0,0,c,d),this.gradientBitmap.context.fillRect(0,0,c,d)},b.prototype.updateTrinagles=function(a){var b=this;new Phaser.Point(this.game.width/2,this.game.height/2);this.triangles=[],this.triangleSizes.forEach(function(c,d){c*=a,b.triangles.push(new Phaser.Polygon([new Phaser.Point(c*Math.cos(0),c*Math.sin(0)),new Phaser.Point(c*Math.cos(1/3*(2*Math.PI)),c*Math.sin(1/3*(2*Math.PI))),new Phaser.Point(c*Math.cos(2/3*(2*Math.PI)),c*Math.sin(2/3*(2*Math.PI))),new Phaser.Point(c*Math.cos(0),c*Math.sin(0))]))})},b.prototype.update=function(){this.t.angle+=.3},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.back.destroy(!0),this.gradientBitmap.destroy(),this.gradient.destroy(!0),this.t.destroy(!0),this.back=null,this.gradientBitmap=null,this.gradient=null,this.t=null,this.triangles=null,this.triangleSizes=null},b}(Phaser.Group);a.FunnyGames=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.gradientBitmap=d.game.make.bitmapData(1,1),d.gradient=d.game.make.sprite(0,0,d.gradientBitmap),d.add(d.gradient),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){var b=this.game.width<1?1:this.game.width,c=this.game.height<1?1:this.game.height;this.gradientBitmap.resize(b,c),this.gradientBitmap.context.clearRect(0,0,b,c);var d=this.gradientBitmap.context.createRadialGradient(b/2,c/2,0,b/2,c/2,c/2);d.addColorStop(0,"rgb(0, 38, 84)"),d.addColorStop(1,"rgb(96, 3, 190)"),this.gradientBitmap.context.fillStyle=d,this.gradientBitmap.context.fillRect(0,0,b,c)},b.prototype.update=function(){},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.gradientBitmap.destroy(),this.gradient.destroy(!0),this.gradientBitmap=null,this.gradient=null},b}(Phaser.Group);a.GameCell=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.back=d.game.make.graphics(0,0),d.gradientBitmap=d.game.make.bitmapData(1,1),d.gradient=d.game.make.sprite(0,0,d.gradientBitmap),d.add(d.back),d.add(d.gradient),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){var b=this.game.width<1?1:this.game.width,c=this.game.height<1?1:this.game.height;this.back.clear().beginFill(663352).drawRect(0,0,b,c),this.gradientBitmap.resize(b,c),this.gradientBitmap.context.clearRect(0,0,b,c);var d=this.gradientBitmap.context.createRadialGradient(b/2,c/2,0,b/2,c/2,c/2);d.addColorStop(0,"rgb(17, 60, 117)"),d.addColorStop(1,"rgb(10, 31, 56)"),this.gradientBitmap.context.fillStyle=d,this.gradientBitmap.context.fillRect(0,0,b,c)},b.prototype.update=function(){},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.back.destroy(!0),this.gradientBitmap.destroy(),this.gradient.destroy(!0),this.back=null,this.gradientBitmap=null,this.gradient=null},b}(Phaser.Group);a.Kizi=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.back=d.game.make.graphics(0,0),d.gradientBitmap=d.game.make.bitmapData(1,1),d.gradient=d.game.make.sprite(0,0,d.gradientBitmap),d.add(d.back),d.add(d.gradient),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){var b=this.game.width<1?1:this.game.width,c=this.game.height<1?1:this.game.height;this.back.clear().beginFill(5415393).drawRect(0,0,b,c),this.gradientBitmap.resize(b,c),this.gradientBitmap.context.clearRect(0,0,b,c);var d=this.gradientBitmap.context.createRadialGradient(b/2,c/2,0,b/2,c/2,1.5*c);d.addColorStop(0,"rgba(244, 250, 252, 1)"),d.addColorStop(1,"rgba(244, 250, 252, 0)"),this.gradientBitmap.context.fillStyle=d,this.gradientBitmap.context.fillRect(0,0,b,c)},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.back.destroy(!0),this.gradientBitmap.destroy(),this.gradient.destroy(!0),this.back=null,this.gradientBitmap=null,this.gradient=null},b}(Phaser.Group);a.PlayCell=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.back=d.game.make.graphics(0,0),d.add(d.back),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){var b=this.game.width<1?1:this.game.width,c=this.game.height<1?1:this.game.height;this.back.clear().beginFill(4879021).drawRect(0,0,b,c)},b.prototype.update=function(){},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.back.destroy(!0),this.back=null},b}(Phaser.Group);a.Spele=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.back=d.game.make.graphics(0,0),d.add(d.back),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){var b=this.game.width<1?1:this.game.width,c=this.game.height<1?1:this.game.height;this.back.clear().beginFill(804972).drawRect(0,0,b,c)},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.back.destroy(!0),this.back=null},b}(Phaser.Group);a.Spil=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c){var d=a.call(this,b,null,"splash-background")||this;return d.back=d.game.make.graphics(0,0),d.gradientBitmap=d.game.make.bitmapData(1,1),d.gradient=d.game.make.sprite(0,0,d.gradientBitmap),d.add(d.back),d.add(d.gradient),d.resize(c),d}return __extends(b,a),b.prototype.resize=function(a){var b=this.game.width<1?1:this.game.width,c=this.game.height<1?1:this.game.height;this.back.clear().beginFill(357287).drawRect(0,0,b,c),this.gradientBitmap.resize(b,c),this.gradientBitmap.context.clearRect(0,0,b,c);var d=this.gradientBitmap.context.createRadialGradient(b/2,c/2,0,b/2,c/2,c/2);d.addColorStop(0,"rgba(0, 81, 125, 0)"),d.addColorStop(1,"rgba(0, 81, 125, 1)"),this.gradientBitmap.context.fillStyle=d,this.gradientBitmap.context.fillRect(0,0,b,c);var e=this.gradientBitmap.context.createRadialGradient(b/2,c/2,0,b/2,c/2,c/2);e.addColorStop(0,"rgba(4, 176, 240, 1)"),e.addColorStop(1,"rgba(4, 176, 240, 0)"),this.gradientBitmap.context.fillStyle=e,this.gradientBitmap.context.fillRect(0,0,b,c)},b.prototype.update=function(){},b.prototype.destroy=function(b){a.prototype.destroy.call(this,b),this.back.destroy(!0),this.gradientBitmap.destroy(),this.gradient.destroy(!0),this.back=null,this.gradientBitmap=null,this.gradient=null},b}(Phaser.Group);a.Yepi=b}(b=a.SplashScreenBackgrounds||(a.SplashScreenBackgrounds={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){a[a.splashscreen=0]="splashscreen",a[a.logo=1]="logo",a[a.facebook=2]="facebook",a[a.twitter=3]="twitter",a[a.playstore=4]="playstore",a[a.appstore=5]="appstore",a[a.more_games=6]="more_games",a[a.download_game=7]="download_game",a[a.walkthrough=8]="walkthrough",a[a.disclaimer=9]="disclaimer",a[a.highscores=10]="highscores"}(b=a.UtmTargets||(a.UtmTargets={}));var c=function(){function c(){}return c.setSiteLock=function(a){c.siteLocks=a},c.preloadImages=function(b){var d;switch(a.Utils.isOnDevice(b)||c.isAirfi()?a.Utils.ASSET_LOCATION="assets/":a.Utils.isTc()?a.Utils.ASSET_LOCATION="/repository/download/Fabrique_FunnyGamesSplash/.lastSuccessful/build/assets/":"fbrq.io"===a.Utils.getSourceSite(!0)&&(a.Utils.ASSET_LOCATION="https://"+window.location.host+"/orange-games-splash/assets/"),a.Utils.getBrandingDomain()){case a.BrandingDomain.Spele:d="spele";break;case a.BrandingDomain.PlayCell:d="playcell";break;case a.BrandingDomain.GameCell:d="gamecell";break;case a.BrandingDomain.Yepi:d="yepi";break;case a.BrandingDomain.Spil:d="spil";break;case a.BrandingDomain.Admeen:d="admeen";break;case a.BrandingDomain.Bild:d="bild";break;default:case a.BrandingDomain.Kizi:d="kizi";break;case a.BrandingDomain.Funnygames:d="funnygames"}a.Utils.isTc()||(b.load.crossOrigin="anonymous"),b.load.image(c.LOGO_KEY,a.Utils.ASSET_LOCATION+"images/branding_logo_"+d+"_small.png")},c.openCampaignLink=function(d,e,f){if(a.Utils.isOnDevice(d)||c.isContracted(d)||c.isSpecial(d)||!c.outGoingLinksAllowed())return null;var g,h,i=a.Utils.getSourceSite(),j=a.Utils.isOnDevice(d)?"https://":"//";switch(a.Utils.getBrandingDomain()){case a.BrandingDomain.Spele:g=j+"www.spele.nl";break;case a.BrandingDomain.Yepi:g=j+"www.yepi.com";break;case a.BrandingDomain.Admeen:return g="https://media.admeen.com/branding/link.php",h=window.open(g,"_blank"),void(h&&h.focus&&h.focus());case a.BrandingDomain.PlayCell:g=j+"www.playcell.com";break;case a.BrandingDomain.GameCell:g=j+"www.gamecell.com";break;default:case a.BrandingDomain.Kizi:g="http://www.kizi.com";break;case a.BrandingDomain.Bild:return h=window.open(j+"www.bildspielt.de","_blank"),void(h&&h.focus&&h.focus());case a.BrandingDomain.Funnygames:g=j+"www.funnygames.nu"}var k="string"==typeof f?f:b[f];h=window.open(g+"/?utm_source="+i+"&utm_medium=html5&utm_term="+e+"&utm_content="+k+"&utm_campaign=Gamedistribution","_blank"),h&&h.focus&&h.focus()},c.getLogoWithLink=function(b,d){var e=new Phaser.Image(b,0,0,c.LOGO_KEY);return a.Utils.isOnDevice(b)||c.isContracted(b)||c.isSpecial(b)||c.isAirfi()||(e.inputEnabled=!0,e.input.useHandCursor=!0,e.events.onInputUp.add(function(){a.Branding.openCampaignLink(b,d,a.UtmTargets.logo)},this)),e.visible=!c.isSpecial(b),e},c.isInternal=function(a){return c.hostMatchesList(a.cache.getJSON(c.INTERNAL_PORTALS_KEY))},c.isContracted=function(a){return c.hostMatchesList(a.cache.getJSON(c.CONTRACTED_PORTALS_KEY))},c.isSpecial=function(a){return c.hostMatchesList(a.cache.getJSON(c.SPECIAL_PORTALS_KEY))},c.isAdmeen=function(){if(!c.siteLocks||!c.siteLocks.hasOwnProperty("admeen"))return!1;var a=c.siteLocks.admeen;return c.hostMatchesList(a)},c.isKongregate=function(){if(!c.siteLocks||!c.siteLocks.hasOwnProperty("kongregate"))return!1;var a=c.siteLocks.kongregate;return c.hostMatchesList(a)},c.isNewgrounds=function(){if(!c.siteLocks||!c.siteLocks.hasOwnProperty("newgrounds"))return!1;var a=c.siteLocks.newgrounds;return c.hostMatchesList(a)},c.isBild=function(){return"bild.fbrq.io"===window.location.host||window.location.host.indexOf("contentfleet.com")!==-1},c.isBip=function(){return window.location.search.indexOf("bipgaming")!==-1||"bip.fbrq.io"===window.location.host},c.isPlaycellApp=function(){return window.location.search.indexOf("playcellApp")!==-1},c.isSpil=function(){return document.referrer.indexOf("gameplayer.io")!==-1},c.isAirfi=function(){return!!window.hasOwnProperty("airfi")&&window.airfi},c.outGoingLinksAllowed=function(){return!c.isAirfi()&&(!window.hasOwnProperty("fbrqLA")||window.fbrqLA)},c.hostMatchesList=function(b){b=b||[];for(var c=a.Utils.getSourceSite(),d=0;d1||b<0||a.playerInstance.setVolume(b))},a.getCuePoints=function(){if(null!==a.playerInstance)return a.playerInstance.cuePoints()},a}();b.playerInstance=null,b.onClose=new Phaser.Signal,a.Tubia=b}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){a[a.Neutral=0]="Neutral",a[a.Yepi=1]="Yepi",a[a.Spele=2]="Spele",a[a.Funnygames=3]="Funnygames",a[a.Kizi=4]="Kizi",a[a.PlayCell=5]="PlayCell",a[a.GameCell=6]="GameCell",a[a.Bild=7]="Bild",a[a.Spil=8]="Spil",a[a.Admeen=9]="Admeen"}(b=a.BrandingDomain||(a.BrandingDomain={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(a){function b(b,c,d,e,f,g,h){var i=a.call(this,b,d,e,"",null,null)||this;i.onInputUp.add(i.openGame,i),i.id=c.data.key,i.url=c.data.url,i.icon=i.game.add.image(0,0,c.data.key),i.icon.width=f,i.icon.height=f,i.input.priorityID=680,i.addChild(i.icon);var j=i.game.make.graphics(0,0);j.beginFill(h).drawRect(0,0,f,g-f).endFill(),i.titleBg=i.game.add.image(0,f,j.generateTexture()),i.addChild(i.titleBg);var k=c.data.title;return k.length>16&&(k=k.replace(k.substring(14,k.length),"...")),i.title=i.game.add.text(f/2,i.titleBg.y+(g-f)/2+4,k.toUpperCase(),{font:"bold "+.35*(g-f)+"px Arial",fill:"#FFF",align:"center",wordWrap:!0,wordWrapWidth:f-10}),i.title.anchor.set(.5,.5),i.addChild(i.title),j=i.game.make.graphics(0,0),j.beginFill(16777215).drawCircle(0,0,80).beginFill(h).lineTo(-15,-25).lineTo(25,0).lineTo(-15,25).lineTo(-15,-25).endFill(),i.playImg=i.game.add.image(f/2,f/3*2.7,j.generateTexture()),i.playImg.anchor.set(.5,.5),i.addChild(i.playImg),i}return __extends(b,a),b.prototype.openGame=function(){this.game.analytics&&this.game.analytics.google.sendGenericEvent("MoreGames","Click",this.id),this.url.indexOf("http://")!==-1&&this.url.replace("http:","");var a=window.open(this.url,"_self");a&&a.focus&&a.focus()},b.prototype.destroy=function(){this.onInputUp.remove(this.openGame,this),a.prototype.destroy.call(this),this.removedFromWorld()},b}(Phaser.Button);a.Item=b}(b=a.MoreGames||(a.MoreGames={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(b){var c=function(c){function d(b,d){var e=c.call(this,b,null,"moreGames-background")||this;e.size=800,e.items=[],e.offset=14,e.isDestroyed=!1,e.gameName=d,e.deviceRatio=b.width/e.size,e.overlay=b.add.graphics(0,0),e.overlay.beginFill(0,.4).drawRect(0,0,b.width,b.height).endFill(),e.overlay.pivot.set(b.width/2,b.height/2),e.overlay.inputEnabled=!0,e.overlay.input.priorityID=660,e.onClose=new Phaser.Signal,e.overlay.events.onInputUp.add(function(){e.hide()}),e.add(e.overlay),e.menuGrp=new Phaser.Group(b,e,"menuGrp"),e.add(e.menuGrp);var f=b.make.graphics(0,0);f.beginFill(2507370).drawRoundedRect(0,0,e.size,e.size+20,15).endFill(),e.background=e.game.add.image(0,0,f.generateTexture()),e.background.anchor.set(.5),e.background.inputEnabled=!0,e.background.input.priorityID=670,e.background.input.useHandCursor=!1,e.menuGrp.add(e.background),e.logoBtn=e.game.add.button(0,-(e.background.height/2)+e.offset,a.Branding.LOGO_KEY,function(){a.Branding.openCampaignLink(e.game,e.gameName,a.UtmTargets.more_games)},e),e.logoBtn.scale.setTo(1),e.logoBtn.anchor.set(.5,0),e.menuGrp.add(e.logoBtn),e.closeBtn=b.add.button(e.size/2-10,-(e.size/2)+25,"close_btn",e.hide,e),e.closeBtn.anchor.set(1),e.closeBtn.input.priorityID=680,e.menuGrp.add(e.closeBtn),e.createItems();var g=b.make.graphics(0,0);g.beginFill(2507370).drawRect(0,0,270,40).endFill(),e.moreGamesBtn=b.add.button(0,e.background.y+e.background.height/2-g.height-e.offset,"",function(){a.Branding.openCampaignLink(e.game,e.gameName,a.UtmTargets.more_games)},e),e.moreGamesBtn.texture=g.generateTexture(),e.moreGamesBtn.input.priorityID=680,e.moreGamesBtn.anchor.set(.5,0),e.menuGrp.add(e.moreGamesBtn);var h={font:"bold 26px Tahoma",fill:"#ffffff"};return e.moreGamesText=b.add.text(0,e.moreGamesBtn.height/2+2,"PLAY MORE GAMES",h),e.moreGamesText.anchor.set(.5),e.moreGamesBtn.addChild(e.moreGamesText),e.visible=!1,e.resize(),e.resizeListener=function(){setTimeout(function(){e.isDestroyed||e.resize()},100)},e.game.scale.onSizeChange.add(e.resizeListener,e),e}return __extends(d,c),d.prototype.createItems=function(){this.itemGrp=this.game.make.group(this,"items"),this.itemGrp.x=0,this.itemGrp.y=this.size/2+this.logoBtn.y+this.logoBtn.height,this.menuGrp.add(this.itemGrp);var c,e,f,g,h=this.game.cache.getJSON(a.Branding.GAME_ICONS_KEY),i=3,j=Math.floor(this.size/i-1.25*this.offset),k=Math.floor(j+.25*j),l=0;for(var m in h)h.hasOwnProperty(m)&&l<6&&!this.isCurrentGame(m)&&(e=l%i*j+this.offset+l%i*this.offset,f=Math.floor(l/i)*k+this.offset+Math.floor(l/i)*this.offset,g=l%d.BG_COLORS.length,c=new b.Item(this.game,h[m],e-this.size/2,f-this.size/2,j,k,d.BG_COLORS[g]),this.itemGrp.add(c),this.items.push(c),l++)},d.prototype.isCurrentGame=function(a){var b=window.location.href.replace(/-/g,"");return a=a.replace(/-/g,""),b.indexOf(a)>=0},d.prototype.show=function(){this.visible||(this.game.analytics&&(this.game.analytics.google.sendScreenView("moregames"),this.game.analytics.google.sendGenericEvent("MoreGames","Open")),this.visible=!0)},d.prototype.hide=function(){this.visible&&(this.visible=!1,this.game.analytics&&this.game.analytics.google.sendGenericEvent("MoreGames","Close"),this.onClose&&this.onClose.dispatch())},d.preloadImages=function(b){a.Utils.getSourceSite();a.Utils.isOnDevice(b)||a.Branding.isAirfi()?a.Utils.ASSET_LOCATION="assets/":a.Utils.isTc()?a.Utils.ASSET_LOCATION="/repository/download/Fabrique_FunnyGamesSplash/.lastSuccessful/build/assets/":"fbrq.io"===a.Utils.getSourceSite(!0)&&(a.Utils.ASSET_LOCATION="//"+window.location.host+"/orange-games-splash/assets/"),a.Utils.isTc()||(b.load.crossOrigin="anonymous"),b.load.image("close_btn",a.Utils.ASSET_LOCATION+"images/close_btn.png");var c=b.cache.getJSON(a.Branding.GAME_ICONS_KEY);for(var d in c)c.hasOwnProperty(d)&&(c[d].data.key=d,b.load.image(d,a.Utils.ASSET_LOCATION+"icons/"+d+".png"))},d.prototype.getScale=function(){return this.game.height>this.game.width&&this.game.widththis.game.height&&this.game.height=3?this.dotText=".":this.dotText+=".",this.preloadText.setText("Loading "+this.dotText)},d.prototype.onPreloadEnd=function(){this.preloadReady=!0,this.game.input.onUp.add(this.handler,this),this.animateButton()},d.prototype.createObjects=function(){this.bgImage=this.game.add.tileSprite(this.game.width/2,this.game.height/2,853,612,"admeen_atlas","bg_pattern"),this.bgImage.pivot.set(426.5,306),this.gradientBitmap=this.game.make.bitmapData(1,1),this.bgGradientOverlay=this.game.add.sprite(0,0,this.gradientBitmap),this.logo=this.game.add.image(0,0,"admeen_atlas","mascotte"),this.logo.anchor.set(.5,.7),this.playButton=this.game.add.button(this.game.width/2,.75*this.game.height,"admeen_atlas",this.handler,this,"btn","btn","btn","btn"),this.playButton.anchor.set(.5),this.playButton.visible=!1,this.created=!0,this.preloadText=this.game.add.text(this.game.width/2,this.game.height/2*.75,"",{font:"Arial",fontSize:40,fill:"#ffffff",fontWeight:"bold"}),this.preloadText.anchor.set(.5)},d.prototype.resizeObjects=function(){if(this.created){var b=this.game.width<1?1:this.game.width,c=this.game.height<1?1:this.game.height;this.logo.scale.set(this.scaleFactor),this.logo.y=.4*this.game.height,this.logo.x=this.game.width/2,this.bgImage.width=853*this.scaleFactor,this.bgImage.height=612*this.scaleFactor,this.bgImage.y=this.game.height/2,this.bgImage.x=this.game.width/2,this.bgImage.pivot.set(853*this.scaleFactor/2,612*this.scaleFactor/2),this.gradientBitmap.resize(b,c);var d=this.gradientBitmap.context.createRadialGradient(b/2,c/2,0,b/2,c/2,.5*c);d.addColorStop(0,"rgba(66, 103, 178, 0)"),d.addColorStop(1,"rgba(66, 103, 178, 1)"),this.gradientBitmap.context.fillStyle=d,this.gradientBitmap.context.clearRect(0,0,b,c),this.gradientBitmap.context.fillRect(0,0,b,c),this.preloadText.x=this.game.width/2,this.preloadText.y=.75*this.game.height,this.preloadText.scale.set(this.scaleFactor),a.Utils.isOnDevice(this.game)||(this.playButton.scale.set(.6*this.scaleFactor),this.playButton.x=this.game.width/2,this.playButton.y=.75*this.game.height)}},d.prototype.handler=function(a,b){if(!this.clicked&&"mouseout"!==b.type){this.clicked=!0,this.game.tweens.remove(this.buttonTween),this.game.camera.fade(0,250);var c=this.game.add.tween(this.playButton.scale);c.to({x:0,y:0},250,Phaser.Easing.Back.In).start(),void 0!==this.config.mobilePlayClickhandler?this.config.mobilePlayClickhandler():this.game.state.start(this.config.nextState),this.game.input.onUp.remove(this.handler,this)}},d.prototype.getScale=function(){return 1},d.prototype.startAnimation=function(){},d.prototype.animateButton=function(){a.Utils.isOnDevice(this.game)||(this.preloadText.visible=!1,this.game.tweens.remove(this.buttonTween),this.playButton.scale.set(this.scaleFactor),this.playButton.visible=!0,this.buttonTween=this.game.add.tween(this.playButton.scale),this.buttonTween.to({x:1.14*this.scaleFactor,y:1.14*this.scaleFactor},420,Phaser.Easing.Quadratic.InOut,!0,500),this.buttonTween.yoyo(!0).onComplete.add(this.animateButton,this),this.buttonTween.start())},d.prototype.update=function(){this.background.update()},d.prototype.resize=function(){this.scaleFactor=this.getScale(),this.background.resize(this.scaleFactor),this.resizeObjects(),this.created&&this.preloadReady&&this.animateButton()},d.prototype.shutdown=function(){this.game.scale.onSizeChange.remove(this.resize,this),this.game.load.onLoadStart.remove(this.onPreloadStart,this),this.game.load.onFileComplete.remove(this.onPreloadedFile,this),this.game.load.onLoadComplete.remove(this.onPreloadEnd,this),this.logo.destroy(!0),this.playButton.destroy(!0),this.bgImage.destroy(!0),this.background.destroy(!0),this.logo=null,this.bgImage=null,this.playButton=null,this.background=null,this.game.state.remove(b.Preloader.Name),this.game.state.remove(b.SplashPreloader.Name),this.game.state.remove(this.name)},d}(Phaser.State);c.Name="admeenSplashScreen",c.IdealWidth=400,c.MaxDots=3,b.Admeen=c}(b=a.SplashScreen||(a.SplashScreen={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(b){var c=function(c){function d(){var a=c.call(this)||this;return a.name=d.Name,a.scaleFactor=1,a.created=!1,a.preloadReady=!1,a.clicked=!1,a.preloadTexts=[],a.tId=0,a}return __extends(d,c),d.prototype.init=function(a,b){this.config=a,this.background=b,this.game.scale.onSizeChange.add(this.resize,this)},d.prototype.preload=function(){this.game.add.existing(this.background),this.createObjects(),this.scaleFactor=this.getScale(),this.resizeObjects(),this.startAnimation(),this.game.load.onLoadStart.add(this.onPreloadStart,this),this.game.load.onFileComplete.add(this.onPreloadedFile,this),this.game.load.onLoadComplete.add(this.onPreloadEnd,this),this.config.preloadHandler(),0===this.game.load.totalQueuedFiles()&&this.onPreloadEnd()},d.prototype.onPreloadStart=function(){},d.prototype.onPreloadedFile=function(){},d.prototype.onPreloadEnd=function(){this.preloadReady=!0,this.loadBack.visible=!1,this.loadBar.visible=!1,this.game.input.onUp.add(this.handler,this),this.animateButton()},d.prototype.createObjects=function(){this.logo=this.game.add.sprite(this.game.width/2,this.game.height/2-100,"bild_logo"),this.logo.anchor.set(.5),this.logo.scale.set(.8),d.IdealWidth=this.logo.getBounds().width;var a=this.game.make.graphics(0,0);a.beginFill(16777215,.5).drawRect(0,0,350,20).endFill(),this.loadBack=this.game.add.sprite(this.game.width/2,this.game.height/2+100,a.generateTexture()),this.loadBack.anchor.set(.5);var b=this.game.make.graphics(0,0);b.beginFill(16777215,1).drawRect(0,0,350,20).endFill(),this.loadBar=this.game.add.sprite(this.game.width/2-175,this.game.height/2+100,b.generateTexture()),this.loadBar.anchor.set(0,.5),this.load.setPreloadSprite(this.loadBar),this.playButton=this.game.add.button(this.game.width/2,this.game.height/2+200,"bild_play",this.handler,this),this.playButton.anchor.set(.5),this.playButton.scale.set(this.scaleFactor),this.playButton.visible=!1,this.created=!0},d.prototype.resizeObjects=function(){this.created&&(this.logo.scale.set(.8*this.scaleFactor),this.logo.y=this.game.height/2-100*this.scaleFactor,this.logo.x=this.game.width/2,a.Utils.isOnDevice(this.game)||(this.playButton.x=this.game.width/2,this.playButton.y=this.game.height/2+200*this.scaleFactor))},d.prototype.handler=function(a,b){if(!this.clicked&&"mouseout"!==b.type){this.clicked=!0,this.game.tweens.remove(this.buttonTween),this.game.camera.fade(0,250);var c=this.game.add.tween(this.playButton.scale);c.to({x:0,y:0},250,Phaser.Easing.Back.In).start(),void 0!==this.config.mobilePlayClickhandler?this.config.mobilePlayClickhandler():this.game.state.start(this.config.nextState),this.game.input.onUp.remove(this.handler,this)}},d.prototype.getScale=function(){return a.Utils.isOnDevice(this.game)?this.game.width<1.5*d.IdealWidth?this.game.width/6*4/d.IdealWidth:1:this.game.width1e3&&(this.t=Date.now(),this.tId++,this.tId>=this.preloadTexts.length&&(this.tId=0)),this.dotText.length>=3?this.dotText=".":this.dotText+=".",this.preloadText.setText(this.preloadTexts[this.tId]+this.dotText)},d.prototype.onPreloadEnd=function(){this.preloadReady=!0,this.preloadText.visible=!1,this.game.input.onUp.add(this.handler,this),this.animateButton()},d.prototype.createObjects=function(){this.monster1=this.game.add.spine(0,0,"fgs_monster_1"),this.monster1.setAnimationByName(0,"idle",!0),this.monster2=this.game.add.spine(0,0,"fgs_monster_2"),this.monster2.setAnimationByName(0,"idle",!0),this.monster3=this.game.add.spine(0,0,"fgs_monster_3"),this.monster3.setAnimationByName(0,"idle",!0),this.preloadText=this.game.add.text(this.game.width/2,this.game.height/2+230,"",{font:"Arial",fontSize:40,fill:"#ffffff",fontWeight:"bold"}),this.preloadText.anchor.set(.5),this.logo=this.game.add.image(0,0,"fgs_logo"),this.logo.anchor.set(.5),d.IdealWidth=1.5*this.logo.getBounds().width,this.playButton=this.game.add.button(this.game.width/2,this.game.height/2+230*this.scaleFactor,"fgs_play",this.handler,this,0,0,1,0),this.playButton.anchor.set(.5),this.playButton.scale.set(this.scaleFactor),this.playButton.visible=!1,this.created=!0},d.prototype.handler=function(a,b){if(!this.clicked&&"mouseout"!==b.type){this.clicked=!0,this.game.tweens.remove(this.buttonTween),this.game.camera.fade(0,250);var c=this.game.add.tween(this.playButton.scale);c.to({x:0,y:0},250,Phaser.Easing.Back.In).start(),void 0!==this.config.mobilePlayClickhandler?this.config.mobilePlayClickhandler():this.game.state.start(this.config.nextState),this.game.input.onUp.remove(this.handler,this)}},d.prototype.resizeObjects=function(){this.created&&(this.logo.scale.set(1.5*this.scaleFactor),this.logo.y=this.game.height/2+70*this.scaleFactor,this.logo.x=this.game.width/2,this.monster1.x=this.game.width/2+40*this.scaleFactor,this.monster1.y=this.game.height/2-10*this.scaleFactor,this.monster1.scale.set(.4*this.scaleFactor),this.monster2.x=this.game.width/2+190*this.scaleFactor,this.monster2.y=this.game.height/2-10*this.scaleFactor,this.monster2.scale.set(.4*this.scaleFactor),this.monster3.x=this.game.width/2-140*this.scaleFactor,this.monster3.y=this.game.height/2-10*this.scaleFactor,this.monster3.scale.set(.4*this.scaleFactor),this.preloadText.x=this.game.width/2,this.preloadText.y=this.game.height/2+230*this.scaleFactor,this.preloadText.scale.set(this.scaleFactor),this.playButton.x=this.game.width/2,this.playButton.y=this.game.height/2+230*this.scaleFactor)},d.prototype.getScale=function(){return a.Utils.isOnDevice(this.game)?this.game.width<1.5*d.IdealWidth?this.game.width/6*4/d.IdealWidth:1:this.game.width1e3&&(this.t=Date.now(),this.tId++,this.tId>=this.preloadTexts.length&&(this.tId=0)),this.dotText.length>=3?this.dotText=".":this.dotText+=".",this.preloadText.setText(this.preloadTexts[this.tId]+this.dotText)},d.prototype.onPreloadEnd=function(){this.preloadReady=!0,this.preloadText.visible=!1,this.game.input.onUp.add(this.handler,this),this.animateButton()},d.prototype.createObjects=function(){this.twirl=this.game.add.image(this.game.width/2,this.game.height/2,"gamecell_atlas","gamecell_bg_pattern"),this.twirl.scale.setTo(2,2),this.twirl.anchor.set(.5),this.createOverlay(),this.logoSpine=this.game.add.spine(0,0,"splash_gamecell"),this.logoSpine.setAnimationByName(0,"idle",!0),this.preloadText=this.game.add.text(this.game.width/2,this.game.height/2+230,"",{font:"Arial",fontSize:40,fill:"#ffffff",fontWeight:"bold"}),this.preloadText.anchor.set(.5),this.logo=this.game.add.image(0,0,"gamecell_atlas","gamecell_logo"),this.logo.anchor.set(.5),d.IdealWidth=1.5*this.logo.getBounds().width,this.playButton=this.game.add.button(this.game.width/2,.85*this.game.height,"gamecell_atlas",this.handler,this,"gamecell_btn_play","gamecell_btn_play","gamecell_btn_play","gamecell_btn_play"),this.playButton.anchor.set(.5),this.playButton.scale.set(this.scaleFactor),this.playButton.visible=!1,this.created=!0},d.prototype.createOverlay=function(){this.gradientBitmap=this.game.make.bitmapData(1,1),this.gradient=this.game.make.sprite(0,0,this.gradientBitmap),this.game.add.existing(this.gradient)},d.prototype.handler=function(a,b){if(!this.clicked&&"mouseout"!==b.type){this.clicked=!0,this.game.tweens.remove(this.buttonTween),this.game.camera.fade(0,250);var c=this.game.add.tween(this.playButton.scale);c.to({x:0,y:0},250,Phaser.Easing.Back.In).start(),void 0!==this.config.mobilePlayClickhandler?this.config.mobilePlayClickhandler():this.game.state.start(this.config.nextState),this.game.input.onUp.remove(this.handler,this)}},d.prototype.resizeObjects=function(){if(this.created){this.gradientBitmap.resize(this.game.width,this.game.height),this.gradientBitmap.context.clearRect(0,0,this.game.width,this.game.height);var a=this.gradientBitmap.context.createRadialGradient(this.game.width/2,this.game.height/2,0,this.game.width/2,this.game.height/2,this.game.height/2);a.addColorStop(0,"rgb(8, 8, 54)"),a.addColorStop(1,"rgba(8, 8, 54, 0)"),this.gradientBitmap.context.fillStyle=a,this.gradientBitmap.context.fillRect(0,0,this.game.width,this.game.height),this.logo.scale.set(.5*this.scaleFactor),this.logo.y=.2*this.game.height,this.logo.x=this.game.width/2,this.logoSpine.scale.set(this.scaleFactor),this.logoSpine.autoUpdateTransform(),this.logoSpine.x=this.game.width/2,this.logoSpine.y=this.game.height/2,this.preloadText.x=this.game.width/2,this.preloadText.y=.85*this.game.height,this.preloadText.scale.set(this.scaleFactor),this.playButton.x=this.game.width/2,this.playButton.y=.85*this.game.height,this.twirl.position.set(this.game.width/2,this.game.height/2)}},d.prototype.getScale=function(){return a.Utils.isOnDevice(this.game)?this.game.width<1.5*d.IdealWidth?this.game.width/6*4/d.IdealWidth:1:this.game.width2.8&&(this.twirl.scale.x=2,this.twirl.scale.y=2)},d.prototype.loadUpdate=function(){this.background.update()},d.prototype.resize=function(){this.scaleFactor=this.getScale(),this.background.resize(this.scaleFactor),this.resizeObjects(),this.created&&this.preloadReady&&this.animateButton()},d.prototype.shutdown=function(){c.prototype.shutdown.call(this),this.gradientBitmap.destroy(),this.gradient.destroy(!0),this.gradientBitmap=null,this.gradient=null,this.logo.destroy(!0),this.logoSpine.destroy(!0),this.playButton.destroy(!0),this.background.destroy(!0),this.preloadText.destroy(!0),this.logo=null,this.logoSpine=null,this.playButton=null,this.background=null,this.preloadText=null,this.config=null,this.game.scale.onSizeChange.remove(this.resize,this),this.game.load.onLoadStart.remove(this.onPreloadStart,this),this.game.load.onFileComplete.remove(this.onPreloadedFile,this),this.game.load.onLoadComplete.remove(this.onPreloadEnd,this),this.game.state.remove(b.Preloader.Name),this.game.state.remove(b.SplashPreloader.Name),this.game.state.remove(this.name)},d}(Phaser.State);c.Name="GameCell",c.IdealWidth=860,c.MaxDots=3,b.GameCell=c}(b=a.SplashScreen||(a.SplashScreen={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(b){var c=function(c){function d(){var a=c.call(this)||this;return a.name=d.Name,a.scaleFactor=1,a.created=!1,a.preloadReady=!1,a.clicked=!1,a.preloadTexts=["Loading images","Loading music","Loading sound effects","Calculating Pi"],a.dotText=".",a.tId=0,a}return __extends(d,c),d.prototype.init=function(a,b){this.config=a,this.background=b,this.config.preloadTexts&&(this.preloadTexts=this.config.preloadTexts),this.game.scale.onSizeChange.add(this.resize,this)},d.prototype.preload=function(){this.game.add.existing(this.background),this.createObjects(),this.scaleFactor=this.getScale(),this.resizeObjects(),this.startAnimation(),this.game.load.onLoadStart.add(this.onPreloadStart,this),this.game.load.onFileComplete.add(this.onPreloadedFile,this),this.game.load.onLoadComplete.add(this.onPreloadEnd,this),this.config.preloadHandler(),0===this.game.load.totalQueuedFiles()&&this.onPreloadEnd()},d.prototype.onPreloadStart=function(){this.t=Date.now(),this.preloadText.setText(this.preloadTexts[this.tId])},d.prototype.onPreloadedFile=function(){Date.now()-this.t>1e3&&(this.t=Date.now(),this.tId++,this.tId>=this.preloadTexts.length&&(this.tId=0)),this.dotText.length>=3?this.dotText=".":this.dotText+=".",this.preloadText.setText(this.preloadTexts[this.tId]+this.dotText)},d.prototype.onPreloadEnd=function(){this.preloadReady=!0,this.preloadText.visible=!1,this.game.input.onUp.add(this.handler,this),this.animateButton()},d.prototype.createObjects=function(){this.twirl=this.game.add.image(this.game.width/2,this.game.height/2,"kizi_twist"),this.twirl.anchor.set(.5),this.twirl.width=this.twirl.height=this.game.width>this.game.height?this.game.width:this.game.height,this.monster=this.game.add.spine(0,0,"kizi_skeleton"),this.monster.setAnimationByName(0,"idle",!0),this.preloadText=this.game.add.text(this.game.width/2,this.game.height/2+230,"",{font:"Arial",fontSize:40,fill:"#ffffff",fontWeight:"bold"}),this.preloadText.anchor.set(.5),this.logo=this.game.add.image(0,0,"kizi_logo"),this.logo.anchor.set(.5),d.IdealWidth=1.5*this.logo.getBounds().width,this.playButton=this.game.add.button(this.game.width/2,.85*this.game.height,"kizi_button",this.handler,this,0,0,1,0),this.playButton.anchor.set(.5),this.playButton.scale.set(this.scaleFactor),this.playButton.visible=!1,this.created=!0},d.prototype.handler=function(a,b){if(!this.clicked&&"mouseout"!==b.type){this.clicked=!0,this.game.tweens.remove(this.buttonTween),this.game.camera.fade(0,250);var c=this.game.add.tween(this.playButton.scale);c.to({x:0,y:0},250,Phaser.Easing.Back.In).start(),void 0!==this.config.mobilePlayClickhandler?this.config.mobilePlayClickhandler():this.game.state.start(this.config.nextState),this.game.input.onUp.remove(this.handler,this)}},d.prototype.resizeObjects=function(){this.created&&(this.logo.scale.set(.5*this.scaleFactor),this.logo.y=.2*this.game.height,this.logo.x=this.game.width/2,this.monster.scale.set(this.scaleFactor),this.monster.autoUpdateTransform(),this.monster.x=this.game.width/2,this.monster.y=this.game.height/2+.6*this.monster.height,this.preloadText.x=this.game.width/2,this.preloadText.y=.85*this.game.height,this.preloadText.scale.set(this.scaleFactor),this.playButton.x=this.game.width/2,this.playButton.y=.85*this.game.height,this.twirl.position.set(this.game.width/2,this.game.height/2))},d.prototype.getScale=function(){return a.Utils.isOnDevice(this.game)?this.game.width<1.5*d.IdealWidth?this.game.width/6*4/d.IdealWidth:1:this.game.width=1&&(3===this.state?this.setTween(4,14,{alpha:0}):4===this.state?(this.onComplete.dispatch(this.floor,this.cell),this.destroy()):5===this.state?(this.onComplete.dispatch(),this.state=6):this.state=0)}},Object.defineProperty(b.prototype,"scaleX",{get:function(){return this.scale.x},set:function(a){this.scale.x=a},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"scaleY",{get:function(){return this.scale.y},set:function(a){this.scale.y=a},enumerable:!0,configurable:!0}),b.prototype.destroy=function(){a.prototype.destroy.call(this),this.onComplete=null,this.tweenDetails=[],this.tweenDetails=null},b}(Phaser.Sprite);a.SmallPart=b}(b=a.SplashScreen||(a.SplashScreen={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b;!function(a){var b=function(b){function c(){var a=b.call(this)||this;return a.name=c.Name,a.scaleFactor=1,a.width=787,a.height=494,a.created=!1,a.preloadTexts=[],a.preloadReady=!1,a.clicked=!1,a.tId=0,a}return __extends(c,b),c.prototype.init=function(a,b){this.config=a,this.background=b,this.game.scale.onSizeChange.add(this.resize,this)},c.prototype.preload=function(){this.game.add.existing(this.background),this.scaleFactor=this.getScale(),this.createObjects(),this.resizeObjects(),this.game.load.onLoadStart.add(this.onPreloadStart,this),this.game.load.onFileComplete.add(this.onPreloadedFile,this),this.game.load.onLoadComplete.add(this.onPreloadEnd,this),this.config.preloadHandler(),0===this.game.load.totalQueuedFiles()&&this.onPreloadEnd()},c.prototype.onPreloadStart=function(){this.t=Date.now()},c.prototype.onPreloadedFile=function(){},c.prototype.onPreloadEnd=function(){this.preloadReady=!0,this.game.input.onUp.add(this.handler,this),this.animateButton()},c.prototype.createObjects=function(){this.spine=this.game.add.spine(this.game.width/2,this.game.height/2,"splash_playcell"),this.spine.setMixByName("intro","loop",.2),this.spine.setMixByName("loop","outro",.2),this.spine.setAnimationByName(0,"intro",!1),this.spine.addAnimationByName(0,"loop",!0,0),this.logo=this.game.add.sprite(this.game.width/2,.4*this.game.height,"playcell_atlas","logo"),this.logo.scale.set(this.scaleFactor),this.logo.anchor.set(.5),this.logo.visible=!1,this.playButton=this.game.add.image(this.game.width/2,this.game.height,"playcell_atlas","button"),this.playButton.anchor.set(.5),this.playButton.scale.set(this.scaleFactor),this.playButton.y=this.logo.y+.75*this.logo.height,this.playButton.inputEnabled=!0,this.playButton.events.onInputUp.add(this.handler,this),this.playButton.visible=!1,this.created=!0},c.prototype.resizeObjects=function(){this.created&&(this.logo.position.set(this.game.width/2,.4*this.game.height),this.logo.scale.set(this.scaleFactor),this.playButton.x=this.game.width/2,this.playButton.y=this.logo.y+.75*this.logo.height)},c.prototype.handler=function(a,b){if(!this.clicked&&"mouseout"!==b.type){this.clicked=!0,this.game.tweens.remove(this.buttonTween),this.game.camera.fade(0,250);var c=this.game.add.tween(this.playButton.scale);c.to({x:0,y:0},250,Phaser.Easing.Back.In).start(),void 0!==this.config.mobilePlayClickhandler?this.config.mobilePlayClickhandler():this.game.state.start(this.config.nextState),this.game.input.onUp.remove(this.handler,this)}},c.prototype.getScale=function(){return this.game.width1e3&&(this.t=Date.now(),this.tId++,this.tId>=this.preloadTexts.length&&(this.tId=0)),this.dotText.length>=3?this.dotText=".":this.dotText+=".",this.preloadText.setText(this.preloadTexts[this.tId]+this.dotText)},d.prototype.onPreloadEnd=function(){this.preloadReady=!0,this.preloadText.visible=!1,this.game.input.onUp.add(this.handler,this),this.animateButton()},d.prototype.createObjects=function(){this.twirl=this.game.add.image(this.game.width/2,this.game.height/2,"spele_atlas","spele_bg_pattern"),this.twirl.anchor.set(.5),this.twirl.width=this.twirl.height=this.game.width>this.game.height?this.game.width:this.game.height,this.jelly=this.game.add.spine(0,0,"jelly_skeleton"),this.jelly.setAnimationByName(0,"idle",!0),this.preloadText=this.game.add.text(this.game.width/2,this.game.height/2+230,"",{font:"Arial",fontSize:40,fill:"#ffffff",fontWeight:"bold"}),this.preloadText.anchor.set(.5),this.logo=this.game.add.image(0,0,"spele_atlas","spele_logo"),this.logo.anchor.set(.5),d.IdealWidth=1.5*this.logo.getBounds().width;var a="spele_button";this.playButton=this.game.add.button(this.game.width/2,.85*this.game.height,"spele_atlas",this.handler,this,a,a,a,a),this.playButton.anchor.set(.5),this.playButton.scale.set(this.scaleFactor),this.playButton.visible=!1,this.created=!0},d.prototype.handler=function(a,b){if(!this.clicked&&"mouseout"!==b.type){this.clicked=!0,this.game.tweens.remove(this.buttonTween),this.game.camera.fade(0,250);var c=this.game.add.tween(this.playButton.scale);c.to({x:0,y:0},250,Phaser.Easing.Back.In).start(),void 0!==this.config.mobilePlayClickhandler?this.config.mobilePlayClickhandler():this.game.state.start(this.config.nextState),this.game.input.onUp.remove(this.handler,this)}},d.prototype.resizeObjects=function(){this.created&&(this.logo.scale.set(.5*this.scaleFactor),this.logo.y=.25*this.game.height,this.logo.x=this.game.width/2,this.jelly.scale.set(.5*this.scaleFactor),this.jelly.autoUpdateTransform(),this.jelly.x=this.game.width/2,this.jelly.y=this.game.height/2+1.2*this.jelly.height,this.preloadText.x=this.game.width/2,this.preloadText.y=.85*this.game.height,this.preloadText.scale.set(this.scaleFactor),this.playButton.x=this.game.width/2,this.playButton.y=.84*this.game.height,this.twirl.position.set(this.game.width/2,this.game.height/2))},d.prototype.getScale=function(){return a.Utils.isOnDevice(this.game)?this.game.width<1.5*d.IdealWidth?this.game.width/6*4/d.IdealWidth:1:this.game.width200&&(this.tweenRandomItem(),this.dt=Date.now())},c.prototype.loadUpdate=function(){var a=Date.now()-this.ddt;a>200&&(this.ddt=Date.now(),this.tweenRandomItem())},c.prototype.tweenRandomItem=function(){var a=this.tiles[Math.random()*this.tiles.length|0];this.game.add.tween(a).to({alpha:1},1e3,Phaser.Easing.Linear.None,!0,0,0,!0)},c.prototype.resize=function(){this.scaleFactor=this.getScale(),this.background.resize(this.scaleFactor),this.resizeObjects()},c.prototype.shutdown=function(){b.prototype.shutdown.call(this),this.spine.destroy(!0),this.background.destroy(!0),this.tiles.forEach(function(a){a.destroy(!0)}),this.gradientBitmap.destroy(),this.gradient.destroy(!0),this.logo.destroy(!0),this.balls.forEach(function(a){a.destroy(!0)}),this.spine=null,this.playButton=null,this.background=null,this.gradientBitmap=null,this.gradient=null,this.logo=null,this.tiles=null,this.balls=null,this.game.scale.onSizeChange.remove(this.resize,this),this.game.load.onLoadStart.remove(this.onPreloadStart,this),this.game.load.onFileComplete.remove(this.onPreloadedFile,this),this.game.load.onLoadComplete.remove(this.onPreloadEnd,this),this.game.state.remove(a.Preloader.Name),this.game.state.remove(a.SplashPreloader.Name),this.game.state.remove(this.name)},c}(Phaser.State);b.Name="yepiSplashScreen",b.IdealWidth=463,b.MaxDots=3,a.Yepi=b}(b=a.SplashScreen||(a.SplashScreen={}))}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b=null,c=function(){function a(){}return a.has=function(a){var c=a.lastIndexOf(".");if(c<=0||c>=a.length-1)return!1;var d=a.lastIndexOf(".",c-1);if(d<=0||d>=c-1)return!1;var e=b[a.slice(c+1)];return!!e&&e.indexOf(" "+a.slice(d+1,c)+" ")>=0},a.is=function(a){var c=a.lastIndexOf(".");if(c<=0||c>=a.length-1)return!1;var d=a.lastIndexOf(".",c-1);if(d>=0)return!1;var e=b[a.slice(c+1)];return!!e&&e.indexOf(" "+a.slice(0,c)+" ")>=0},a.get=function(a){var c=a.lastIndexOf(".");if(c<=0||c>=a.length-1)return null;var d=a.lastIndexOf(".",c-1);if(d<=0||d>=c-1)return null;var e=b[a.slice(c+1)];return e?e.indexOf(" "+a.slice(d+1,c)+" ")<0?null:a.slice(d+1):null},a}(),d=function(){function a(){}return a.setList=function(a){b=a||{}},a.getDomain=function(a){if(null===b)return null;var c=a.match(/\./g);if(c&&c.length<2)return a;var d=a.length-this.getTld(a).length-1;return d=a.lastIndexOf(".",d-1)+1,a.substring(d)||""},a.getTld=function(a){if(null===b)return null;var d=a.lastIndexOf("."),e=a.substring(d+1);return b[e.toLowerCase()]?c.get(a)||e:e},a}();d.KEY="Domains",a.Domain=d}(Fabrique||(Fabrique={}));var Fabrique;!function(a){var b=function(){function b(){}return b.getSourceSite=function(c){void 0===c&&(c=!1);var d=document.referrer||window.location.host;if(c&&(d=window.location.host),d.indexOf("embed.gamedistribution.com")!==-1&&window.location.search.indexOf("gd_sdk_referrer_url")!==-1&&(d=b.getUrlParameter("gd_sdk_referrer_url")||d),
+d=decodeURIComponent(d),a.Branding.isBild())return"bildspielt.de";if(a.Branding.isBip())return"bipgaming.com";a.Branding.isSpil()&&(d=b.getReferrer(d)),d=d.indexOf("://")>-1?d.split("/")[2]:d.split("/")[0],d=d.split(":")[0];var e=a.Domain.getDomain(d);return null!==e?e:(3===d.split(".").length&&(d=d.substr(d.indexOf(".")+1)),d)},b.getBrandingDomain=function(){if(window.hasOwnProperty("fbrqBD")&&window.fbrqBD in a.BrandingDomain)return window.fbrqBD;if(a.SplashScreen.Preloader.SPLASH_OVERRIDE!==!1)return a.SplashScreen.Preloader.SPLASH_OVERRIDE;var c=b.getSourceSite();if(a.Branding.isAdmeen())return a.BrandingDomain.Admeen;if(a.Branding.isPlaycellApp()||a.Branding.isBip())return a.BrandingDomain.PlayCell;switch(c){case"spele.nl":return a.BrandingDomain.Spele;case"yepi.com":return a.BrandingDomain.Yepi;case"oyunskor.com":case"barbioyunu.com.tr":case"bebekoyunu.com.tr":case"oyunkolu.com":case"oyungemisi.com":case"oyunlar1.com":case"oyunkuzusu.com":case"kraloyun.com":case"rekoroyun.com":case"oyundedem.com":case"oyunoyna.com":case"pastaoyunu.com.tr":case"playcell.com":return a.BrandingDomain.PlayCell;case"gamecell.com":return a.BrandingDomain.GameCell;case"playxl.com":return a.BrandingDomain.Admeen;default:case"kizi.com":return a.BrandingDomain.Kizi;case"bildspielt.de":return a.BrandingDomain.Bild;case"funnygames.nl":return a.BrandingDomain.Funnygames}},b.getReferrer=function(a){return a.indexOf("?ref=")!==-1?a.substr(a.indexOf("?ref=")+5):a},b.inIframe=function(){try{return window.self!==window.top}catch(a){return!0}},b.getDomain=function(a){var b=document.createElement("a");return b.href=a,b.origin},b.isOnDevice=function(a){return!(!a.device.cordova&&!a.device.crosswalk)&&!/(gamedistribution\.com)/.test(window.location.hostname)},b.isTc=function(){return/(teamcity\.ds\.orangegames\.com)/.test(window.location.host)},b.getRandomRange=function(a,b){return Math.random()*(b-a)+a|0},b.getUrlParameter=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))},b.intTimeToString=function(a){var b=Math.floor(a/3600),c=Math.floor(a%3600/60),d=a%60,e=b<10?"0"+b:b.toString(),f=c<10?"0"+c:c.toString(),g=d<10?"0"+d:d.toString();return e+":"+f+":"+g},b.registerAudioUnlocker=function(a){a.input.touch&&"function"!=typeof a.input.touch.addTouchLockCallback||a.device.android&&a.device.chrome&&a.device.chromeVersion>=55&&(a.sound.touchLocked=!0,a.input.touch.addTouchLockCallback(function(){if(this.noAudio||!this.touchLocked||null!==this._unlockSource)return!0;if(this.usingWebAudio){var a=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource(),this._unlockSource.buffer=a,this._unlockSource.connect(this.context.destination),void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),"suspended"===this._unlockSource.context.state&&this._unlockSource.context.resume()}return!0},a.sound,!0))},b}();b.ASSET_LOCATION="patch/cdn/kizi/",a.Utils=b}(Fabrique||(Fabrique={}));var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;e>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(d+e)%4*8;else if(65535>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d