From fa19c537deba51c6880e03338ac8c699db357d78 Mon Sep 17 00:00:00 2001 From: Emre Guneyler Date: Tue, 30 Jun 2020 01:02:12 +0000 Subject: [PATCH] cards game --- assets/cards/Fipps-Regular.otf | Bin 0 -> 34220 bytes assets/cards/all.png | Bin 0 -> 2961 bytes assets/cards/bg.png | Bin 0 -> 2183 bytes assets/cards/cards.png | Bin 0 -> 3365 bytes assets/cards/crab.png | Bin 0 -> 271 bytes assets/cards/dog.aseprite | Bin 0 -> 859 bytes assets/cards/dog.png | Bin 0 -> 399 bytes assets/cards/flash.aseprite | Bin 0 -> 770 bytes assets/cards/flash.png | Bin 0 -> 252 bytes assets/cards/fletters.json | 266 +++++++++++++++++++++++++++ assets/cards/fletters.png | Bin 0 -> 1818 bytes assets/cards/fonts.css | 4 + assets/cards/greenbg.aseprite | Bin 0 -> 2028 bytes assets/cards/greenbg.png | Bin 0 -> 1634 bytes assets/cards/ham.png | Bin 0 -> 783 bytes assets/cards/hud.aseprite | Bin 0 -> 3232 bytes assets/cards/hud.png | Bin 0 -> 5926 bytes assets/cards/hud2.png | Bin 0 -> 4931 bytes assets/cards/letters.png | Bin 0 -> 1699 bytes assets/cards/magic.png | Bin 0 -> 780 bytes assets/cards/mbg.png | Bin 0 -> 2183 bytes assets/cards/mhud.png | Bin 0 -> 1116 bytes assets/cards/numbers.png | Bin 0 -> 1592 bytes assets/cards/pletters.json | 266 +++++++++++++++++++++++++++ assets/cards/pletters.png | Bin 0 -> 1699 bytes assets/cards/screens.aseprite | Bin 0 -> 2372 bytes assets/cards/screens.png | Bin 0 -> 6317 bytes assets/cards/spadesshine.aseprite | Bin 0 -> 1734 bytes assets/cards/spadesshine.png | Bin 0 -> 983 bytes assets/cards/tapper.png | Bin 0 -> 773 bytes assets/cards/vendor/webfontloader.js | 17 ++ cards.html | 76 ++++++++ css/main.css | 1 + js/more/cards/bundle.js | 164 +++++++++++++++++ 34 files changed, 794 insertions(+) create mode 100755 assets/cards/Fipps-Regular.otf create mode 100755 assets/cards/all.png create mode 100755 assets/cards/bg.png create mode 100755 assets/cards/cards.png create mode 100755 assets/cards/crab.png create mode 100755 assets/cards/dog.aseprite create mode 100755 assets/cards/dog.png create mode 100755 assets/cards/flash.aseprite create mode 100755 assets/cards/flash.png create mode 100644 assets/cards/fletters.json create mode 100755 assets/cards/fletters.png create mode 100644 assets/cards/fonts.css create mode 100755 assets/cards/greenbg.aseprite create mode 100755 assets/cards/greenbg.png create mode 100755 assets/cards/ham.png create mode 100755 assets/cards/hud.aseprite create mode 100755 assets/cards/hud.png create mode 100755 assets/cards/hud2.png create mode 100755 assets/cards/letters.png create mode 100755 assets/cards/magic.png create mode 100755 assets/cards/mbg.png create mode 100755 assets/cards/mhud.png create mode 100755 assets/cards/numbers.png create mode 100644 assets/cards/pletters.json create mode 100755 assets/cards/pletters.png create mode 100755 assets/cards/screens.aseprite create mode 100755 assets/cards/screens.png create mode 100755 assets/cards/spadesshine.aseprite create mode 100755 assets/cards/spadesshine.png create mode 100755 assets/cards/tapper.png create mode 100644 assets/cards/vendor/webfontloader.js create mode 100644 cards.html create mode 100644 js/more/cards/bundle.js diff --git a/assets/cards/Fipps-Regular.otf b/assets/cards/Fipps-Regular.otf new file mode 100755 index 0000000000000000000000000000000000000000..9334dad594277ba8339786217d75260e58436dc8 GIT binary patch literal 34220 zcmc(I33yf2x%LVq=R|`jE<+I%j?`MUYJoaWH?=C)p_K|+?Vv#kf*`~Iih>%#bP|#f zKu{4i&WJ_!e;hZsJ&M_sX+VnQVesKEfsY}1{rwPXNU1iMGdyX7+&ghp8Y@20FpLdKY zczopO^G-4Qnm#yRZ;aXNoYCJMQNQla!*MQ!=hNqUQ&M)j;oC+TvIu9+VrjkW*hLV!}*jcz;`cWmaiN+|KdGQ++uq7{%_Qnmqt~k zxPRmJUmo8zcYAGOLt+CCd$XN6!xm? zbpejg(tW{2W?L^vD)z5;^r&*ewCSeIq_Vw=-rwG*;H%wUF8C@1R@kPnci~@63L6pa zTQDN%|1=ycmIC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AFBOP1dg$zt*{KWxze zOmn2n+E(Ns3tc1|nC1n=PqdnyQB9HzU%x7dkk2OhA$AC0sD@;9ZOwo-#V2U`5;DD|HnTloI@JYe$J(-i$`9;Jk$0InO{`QK^YbMbYLvBz-&`^% z440mYiDfgRc2mGECp+XTdCyo7+P#nFM=F)5;$(4B5l&XiuDs-bE*(#G28yxksvWZt zvEfO6T0zx5*#=@}wf7BNxi6mzGywbCp-vZV;G8F*imJ~s!GvpTx4`D+~5ps?SU@VXB zpX1Flp*RWL>CcGVr;a2$O~6LG{J?R_3fU%y3|^fwDnoqG*g^Y|SW%l+T=o11< zp4U$rQ2WS!EAYIE@Y%aAa_#j2XU^w`duezLX$FLvaqR{2p6^D)3}Cu$3xwwBM9Bse zl}_F6{=2sI$@}k3z^%L)a*oSyMwEE*$BS)iV&ZQVcFUEW;dF?fF4i@c9ux1ut$1Z1 z1G`%_J9}>r(^+DXFv*%Kei(P^vN|xzD!g;lq}Kh*=!As#P71ts+h?_;&D7>@s3*&ZCR{#}&|1Tg$Qfy8ZT>pL+1?uiF3h!toFp)_u)`HhI< zl^wpGXN>?&@}-)Hs}4_qV54QaG)!ue}vU~V*!6sJ}-Tni6XvN80D^hl44iT_(qv%1Z^r52#j0tPL zK6WSZqvy5yk)e=_DnPU8x}{5j40~lV{c?{xp1OwB|KPNc59jD_js$^w-8(#vaJ?d!FN$7vh>JeAMLf9a!b#rO z@mus79NQ|J*a)pT+H|q%IFG)*(E-8R@*jR&&n>eYhv$`sJmIVka6R;|>_zMO?0aU3 z=Vb~lnDfCa136igBIj%jHklcjoRGG*p95gr_o|OhNkZ#!v*_Y}WylXMh8t*Rb>n!ZjWQd4=Y10}WFFC`{eH2~fe4&eN*zk&i$()9@DBHf5dHb{ gPXzvd2ryfuCRIzX(68!gT~cJ>;p&Cn_=frIFTXCt@Bjb+ literal 0 HcmV?d00001 diff --git a/assets/cards/bg.png b/assets/cards/bg.png new file mode 100755 index 0000000000000000000000000000000000000000..70aee72c37280d00962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)i!rWDRpSa9vyyJZ%{n9bPk@v@b&U*icg z{>c{#XKSgtt5o12L*k3CbPS7vSaK?Ws^Rr5jK@5R_TvpC%mZs2aAH@C5Tdjrdi$8r zu2+s*;VP)igZIAh4yHBAfOk5o@Y09L?QmVJlTKg7!-e7kBiQ?#g||!|+Xk;0cjj0Z_e`^|`=EZ)Wzu(*q<4 z2oP86A^?0rM!-cH_~#Koz7qBSdHNO8M)nyogn^?I{K_v)T!AkidqE&w3h;?mXGZ<3 z{}&(shM_s?wb`EKtu#VkbJuknDIypzxdETxe7Xr7)&@zyq1F?Wpx69I3SY@_KW_4| zDs6m-p$GZ$h(A$9Y|iZCV(m>>nmoHY`CJkp`3xfhb<1z8ym zf5=E^9m=gOsF~{{Q+xIU@y>dN%2SJ#sCKh`xhV^5yIMw-N%xwb`=-wuf8BUZ5SypZ z%zYX&-JX648_>VYpUws}zNbl>Z)jME)A1~m_`ny845E8lT6d(AB z41&(uPq$G!Q>;Anp>+yxqrHYwq|4ofN=jX$A!#mEi2`c>|H@Fvz=sEWJ5Bu1_UPaou3OkdKLkmqvAHJBlzYR<-dUt~GSs+;d1 zH4K4AEX>Oo_dTGlt)^kwm#js!nU^aTFZYYhvazP(w|m1!4JI`d-@;$nuTgz0eRrVwitljM-a6nS zahsy9$H-N`$N?3^;|Hv2o1`B-Gu2!&=9pUk4h$)lOu&5q<#+3^+uXmt(PpIJTk`dT zoFO$&uddZMy=}F_X5QELOLJWcU2JY5nwR@?A~)YQ;R826B6@0#mATGAgLG+y5((Qu zeegbwqMW_>yeI|F*qjT25{#rsVoj-xj2X R3p3zj9JM%ZPCxAN(;p3wt*8J1 literal 0 HcmV?d00001 diff --git a/assets/cards/crab.png b/assets/cards/crab.png new file mode 100755 index 0000000000000000000000000000000000000000..7ea587fa0a20facccb3c412fa8c1d9c8e8c80966 GIT binary patch literal 271 zcmV+q0r38bP)Px#$w@>(R7i>Clra*-AP7ap*%MKu_7EP^#*28Ew8;!xWXK?^hOFsA;|RPD8jN#q zvxG*@U zSPHbRl~1Sr@)T0k!s~pm9RP6dbJ$%%Bmn3NXdCe@?$!{t1gzh_WwDf_wYvkTi~qwj zTM4vgK>{+?JNbxj`9GteRbJ`DhpS^Ertr1_LQAnBc{4b? zaNgPfGpDtsBu=;&`1i?6_Lt2|>x0fZTy?>w8|_SpP;v6BDfA%(q* ef1SL{e~I1u|B_jaYs7EzBpGh9V=z$4Px$Nl8ROR7i=2Bo2?$PE`~3AA9(UmzeMzgCM2@T*SvfbOWQ=MpbDdC88VXCa;@FVJ4aZ zTkoXnN{|C1N;`08Q6)XS%002ovPDHLkV1kn+v&8@a literal 0 HcmV?d00001 diff --git a/assets/cards/flash.aseprite b/assets/cards/flash.aseprite new file mode 100755 index 0000000000000000000000000000000000000000..d6488cabd05bcb6c6cc17b52f351d45128a80bb6 GIT binary patch literal 770 zcmb`EUr19?9LIm|b`#bR2}*qOAQe3n`$HI-WiEV4AI1u^l2TR!FQOC?l@ga0#e~`( zg3Lule_r}WFA)UVz&!*Jrh&CWDlCW|0)rq{bo$&oX`|=P<$UhBzXQMT=iK8lMBd*r zq?$)bg@_zrmIgJa=@PCiUk+|!=oyLj!#F2{PZ-rw`toOGW^1{3Lh!}01nHJRF* zU)mZH-Qzb#n?`4T#MDb)zrB1sH`eM?d;Bt$n%umDHid->_i~*p-Ntk>JUpcgpZLVd z*lOx&F{sPuSCRV&?8h)DeM`sLKnxBY7|7jUsY-xy5*3v6px20|C lNY+lI)}2|FzJ0!HC~4+Cuby3>E1Y}%pni5vI_96W{sD%5(Nh2b literal 0 HcmV?d00001 diff --git a/assets/cards/flash.png b/assets/cards/flash.png new file mode 100755 index 0000000000000000000000000000000000000000..994307b39fb9059293734bed9131919380ec807a GIT binary patch literal 252 zcmVPx#wn;=mR7i={R!bIyAPl3tx&M{xMjR~tVrRhYgeD{?7AQPW7zbf|88}0dd5yCS z)Qn|b;tfE=n-&24BzQ0CHP3OsBECZgsk|F*D6QbI&Gpq6>_IIVN)ZF!Z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Vt&xVSl!>=G69eOu!5 z^mY|SE?bMVZS-?CJ-H%f{{1vDi)7(4e^t;GPkXNQ3bn_lyMx5Ce>!%Qr{()3R?Nr9 zN*_46^;UqD?_k3w$EuZABHIFt^rp(aB(-qYR~y`sodDjHB_Np)A^8_Fi!t|tstA`| zRwMPVyx)*+)eY;{Ex5*dPLQ1~NJ@XMFI_xf7af`HBZx(` zP8T$G7e3Q`ehkAeU8tVd;ZCLP^m7AC+akTtoA6ylD?M;BY28EdRlx#XbGQQb$>Dy` zhQY4*=E?Gcn&#gcM;Fc(aQqYdo|5F@t2GE$EC0=-GbnFQNvFx!eK5i#?tAk4y952U zNt}{<(zFI@ro->oFq(|_!$a%zE9+fBlI>u>Qdgx+L9W7jFm0Ribx^Z1zg-`EDX<7; zGS3ImQM3U4s2E47o4)4zS)NDz#F*Ci1N-S#a)waj4cOU%%6g(V1dQyPXLlSdJhh-r zku0;2Kgr+HoBpS}?X~5&S7&sVF^;mrAcs|)I^>ih^;KB}ZZ`cY|DU5bc$!i3F||0< Ryt>gu7!ewcY6~G;`wO)sDJ=j1 literal 0 HcmV?d00001 diff --git a/assets/cards/fonts.css b/assets/cards/fonts.css new file mode 100644 index 0000000..ac8386c --- /dev/null +++ b/assets/cards/fonts.css @@ -0,0 +1,4 @@ +@font-face { + font-family: 'fipps'; + src: url("./Fipps-Regular.otf"); +} diff --git a/assets/cards/greenbg.aseprite b/assets/cards/greenbg.aseprite new file mode 100755 index 0000000000000000000000000000000000000000..ef424f9b7a98bf315b09ce5b841b33040e3a065f GIT binary patch literal 2028 zcmeH`%PWLY7>D0)m}ViDBqe1|lI)BjlBt;#2@6?}ED)wlB9g{^l2Rm!+!r<$iUlcU zp~Ozgid+gI8x%Hj`#dvpUJH8NS*TOq{yT2Ujk|@`vb2K->Z6E4dNQ(^dmY#%Vq#lTjtlY$kXzv!;dw4%> xj}v(v(KT6pvWjcaXpBQJZi4X&j92ilub}fSTzox`PVtRj_lUHdxbwCrKL9pV*&P4? literal 0 HcmV?d00001 diff --git a/assets/cards/greenbg.png b/assets/cards/greenbg.png new file mode 100755 index 0000000000000000000000000000000000000000..5210d880b8e0754915f2a6a89be289cacc4e0951 GIT binary patch literal 1634 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV07SM1B&RJJqwaxEDmyaVpw-h<|P9In~bN6 zV@SoEw>LKCIys8C9%TQO$I;2q=@g^X8d22X;>=>PIiq3!!I_=kQq65{9X_*%jiI3@ zH|<%;-Zl3a84mEt+3zoov1MXtsLg$U{QCFGt9%R$b}uS-|KI&{2j=0t^anql!j@U^EqsW`xnQV4#Y_ocG5+m&I>oW@woE ogArIZTb?Px%$w@>(RCt{2T+wobAPfvM9XbF1WAF5ZKD1n|2bhEqP_s{Mr)Ifx7ej~u7z_r3 z;hu1tpF>A(n5GAde_dZ6u{cQauj{KiZtXa<$FSw^{rRQ%OEKdwAp~9hJLg3By`Ndv z?Y@X4KPI-MNT%r#mgSipLu*0q`MsZ2P0)h>DCX%6(3@Y%Bq{NixTJ-d0WbroAax_0a{+d1 z7w>13q4qH~%)k+1ob|V3<;0<0gB3r(1yYcU@V~KLuwifF7By)SHVvyy>2fiS_%Ynn z7?-F5am2g-B2xSu0do0M=wSv46VwP<`&#ufmozGjgPO%KvAE*oq!TrK5m@6Li76GU zmw~v(IlTdT17ngF)s0+S3?$N+R4lC&ippE!Gy^E0)h1ibQ$gAUM`PfWQ!&EE@Rm4- zSpyjAKs5v92}G%?)N)C3V|YiZf|vn?fH4DS4WhBuk>bYkj$(k``~VjO20N~x^*K`Qn3ndr3y?JdX_y_KHXI7On^*3qZ7oGsD_JVz! z9JnnE+8AjD96^AWz}40ORDMnh1YiO@HLh9(;__1$!G?ygeE@!2wN@F_z=Z7tx7i8C z#FO3#J0+|a2+tQWdM^+rj#MkewhDB&ZqR=f3hi!C49?gMx~?zh{am$XpbGkkvs959 zr3!R+{x|OYJ^*G6t=ge`3*hejRe8O{yTUCtnR1_Lq!(grBTNCA7w122Bt`t1r$t0Q zDo_0XZFdO(P5H0`! N002ovPDHLkV1jDIV4wg1 literal 0 HcmV?d00001 diff --git a/assets/cards/hud.aseprite b/assets/cards/hud.aseprite new file mode 100755 index 0000000000000000000000000000000000000000..76dedb1cc5eb1d1945912bdf9edce8d35de8aaff GIT binary patch literal 3232 zcmcJQX;f238^p|1Eg;{fb?n@fUN6QLIT(jB%NLac|JA~G9WMz z^4I;lA;Y))2KmU!3bND97qUIN1d^J%6Y@8*B?yECOjobF3GBckU-_Ro|`1kpHsTae+BS8c5uSH8ta`-EP&QJk@x)8Pv>3w7P% zZ1iTCS8C`UZZJz;{4sw2@l0bX-j|vocMPzNq1O^PrU7XKxzF(A^jb8&<8uE}~NvE_{P|Tn}AtVSKeb#**(a$;R^Cs@7zUyTfi)}FZ4iXJa>3>DWiwE=M$&YYxnHQ zgFUGZT;byt;imwr2^C?_nwvy@j*5Ue_`s@O9~UlD=ZY%tjQ;Aj7qfee+oofRcke|0 z(v|ITrPXPbDDJ!}MWza$sIackni@74E~-(aN_mdgBWX6mxuj_zW>`XaAM*-TdS&ip zlDaX&^`y$F%y?{NajlFBh^Ly#0tO+MN=gDU=Dc{7>quC}kA2Y97$@-?tntOvbQyCS zv~w#Kb-#WNJbZt4%E4Tf`9@|{#osB51t3Al35jsmmx-M3a!QNQ>Zym%fJ4h*wl)sh zlJ=hobrN#GAt@Oy$u~;r<|q|*uk4en+Q!{+pV~Erv`M8|woS zU9u=w5pNw#FIT+;q+cW$l^olU5aQ*{<}_%weP~sc^8R?7Qn+!!UQPAU7z|(W=o7ljqOtC66wpsMugqD^3?x9LLy(Dk;a3S{RRnKN#F)BY50xXOJY z1LJ)a7Uc?BO1MWs-dVQl!ipm6e9H{Jm@s^dK7%is zzQ1_wsiNnE^v?xa4+zUl3%$$D7;k-Vl&&MUcUb30SOm`}*v`Ut{YUr(DT61Z+_F9f zeLG1m$^cDN-grrT_M$pbaneAcd-ICsD6Bwbz*zpWM9X{>-Dx0cjDKhhiiSk=vu`vK z4oZ}+y6I4`=B_ z;qi>ZyJB~7=f~&t9V9s~gP>G-U2}BDZNUFxTxt_w1`>v@odL(fI4>eK$!Xn-M=G++ zfwTVPQ*jnP01C%-t(H^i}$HoxS1wl4p6H+j%7U(Sfyt zjA3Wr^zKYBl0iEVn-pHC8mkvw?JmJKkqqzL_*TLzclr8gN07K9+z8)`ZxvzAmki@h zZ^}z2%5(}&7YAF5d)8cZo~Y26rDubX*4M`<6JIX;=!jLnm>q!wK0af(tazYntV|r{ z5`I|8Gh?EgO*?{}L)CG`KYt7A&yeq;P{rT|-;P@m==yf%l}V$@)t^0?^(dqu*1OpnqF|S7OZB%mq0J99*}b=RWoZew^8!ngDQjf1>^<q6$@PUGim@Pnr3s zBB)N6LfE)ZiYn!)soRaavwRml&9bfN;*b}s#-s)<*+(fv0T--l5K5EhKRO%QhX#fa z_8EVfnJ&LII+K;l_ z-125SVm?u6A#s_EBuQ!G{mh%AWt$YVXli)ONkuAK<)YW>6mUDY{iuR)m_k#8SYg9{ zyqDde?RKFpv43qj1^B#X)dgbr>kCj~dhUr7&st#V$2+nWkkDFi61VFWE@QL|9{k!% z94z2Lz4qP*hrUSMXhmRpL;|dCAb|jv_F)RiSIPa>7ThNR!04J@X(dd zC4zAwD|BvuqSM?QWmj|r$?$^M8PRT*!#>&WhPe8I@%AT$QsI#0`ToQi6{T}#zS7Yv z<8d4aH7}z9KLgiiRgb?L&z3JSukL+lH>?gcl%M+&Xz6uO2M#ZjO8q+HA^!60dReaO_2wCLMbGHHN`!odWx? zfzFn;WCs5>?(iOo-@F~eBU~lI7Dn>4$HE&O2ysQxY`I2R?>I~6T?{K%uXG^ML^;c- H-NEiJ4JCg* literal 0 HcmV?d00001 diff --git a/assets/cards/hud.png b/assets/cards/hud.png new file mode 100755 index 0000000000000000000000000000000000000000..63353d10fb742bccfdaeab1b9d88e0acc70995b4 GIT binary patch literal 5926 zcmeHKX*kqx_rL91KWo;C8EYlWw1_YyB}IxXp=>R(Gz!T&lZJ?xqDZ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+aX98ZGfpJf~qZh6}m>P?D0?@J1h! z6Tzgas4Y;g!Igtb+;IIVW=|2DbroqtF`R;7f;qcF z=gJ7beB;fs7*7_&f1W=G{6XLk0)G(rgTVg~0#lR?j=($i3Xi8b5G=J!51%m3H*yaD E7nW@k00000 literal 0 HcmV?d00001 diff --git a/assets/cards/hud2.png b/assets/cards/hud2.png new file mode 100755 index 0000000000000000000000000000000000000000..5ef4fb2ce060a57e62739b4c25120e9ca0ac95cd GIT binary patch literal 4931 zcmeAS@N?(olHy`uVBq!ia0y~yU;#2&7&zE~RK2WrGmv5|4sv&5Sa(k5B?E)dUr!gu zkcv5P?w<91V<5s7@VrxRMThLAD-A0+1DS=awHEd5nde+t%tR(`HPtu4UMt_T9;m)l`uyTK-=?$m z?ONyL85k@$ctI*S9>iH`{IqS5^xW`MzCjHrG9eQr?!a(8$noTRMp2c6&*~j!0Yw@> z&SqdKn91f<$Gl@Q%j|jvkg&jXi1>x2UMJtXZaTr0b^i39?@J%;;o)OoXu1H>)4(wA zncjrSNBZwyzd1W`PtE=4{hQ~1|M>Ik`+oY~dCzscgcakLgPdqE4Ps}&9fk<4pZlk-$zPf{;rsTmOIF|P z*575BG3(Fz+WRJqK$ZV4fy`}Sa5HC^=JzjOb^6-#QW4fa&wu)V+e|E&8QD3T;%2p6zohk3KCAR^@K&#X?bouH&g{LHkuC;Q z^cL#qvr-JvTc2v$rW@R&4%iV{V|$6(%6#6c~6JG&Y1>b`%D3B4$Bc zzkrcJ^eM~#iEHOh1&Yedhl_IW_{vvr=L{4~$c4D3fgQ+U5Fmm&5d50=fZ*P_aZ&j| z|3Bb|M6v@jgVw9x`@Vu)y$%{ACJYM>JiqSmrMYz7>maYMLjU)~#R1dB0yCJFga?nm zn=TEpe>hkBz54t7>}g)do=0g#t}op?sUGMwU5L{hHnSbLv1D)Pr@d3v4qTi3f8kma z#%o^J+OJ!G{S36t`!dMo4Gg=c1kJznV@cUcmtTK>{(g0S`=pxZf7edUn11j1rN6ww zuP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=IwbbiVkR7fCzwVoh4z|uD|Wu@=uy|lJq>c&CI0@fV_qAa zc7bs*lCPT2V!_ zgb* z9imWO$<|2@Xx%$8ScEcA<|oh5-_Loo`+n0JL`p@1F}`j@YxP*=RjV9BsoS;--tjJe zJf1@7nl$oUHwJN{D%bC<_fOJ4{yKKm9*GH zcy9dW$AxE#Qe(8Q(=&2=3^F*mq~%pWg4$5BpmasXQm6Sw|4*QF8NV03&S&Q#8ULLD N>Px%#z{m$R9J<@mQP3&Q5?rVZ&(QSlu_WJ($JEKT3YHL7JKVprw)2aFxnCn6oeH5 zqk|Mg3W9=?TY+E~73`AGp@XFC!PwZAh%JLmVLeC+p-6vt9o9F_jPuWCq%REnet+hD zfAfBS-U_yHwKXO&;N@^m0JOHXneTGcr!C$zhvZ z0Maf6R^8~}Xz2vr3r>`6=(56A{u@1Xvz!~G=I3iRctH={M3lpYKU?Mi9EhBB{|Ye~ zkGmGh)TJrc4W18F_?`oH(2T;Ghx2l7(9z~K2Rs8<1Ij$ekH*@4k?#fC|0IV}7r2rG zj^t391C#N%Jlj!fyZpdg0F>N0KIgi(DFs#-b$0nT>egTVFxjlK6C#SpdJ0CJT?%yF zOdkMCg#t^3(tGmwa>lmdxd@%cnz4a2atkmo2dfxvIh#ltH-OGdU3M{4I-jQ6zs^n>_H%4 zr=q`<-=u2gnf|M0fm6j>XGLIm^?2Ab04)ECo7Ys=g8(R%(~a=S=@7Gj$iTY411Cq9HuccMY3_ENGeQ7 v9p#LM!Du=d%?qRD!DyK{S}%<3>QH>23A;sv$?+Uu%Ywnv)z4*}Q$iB}EJQH# literal 0 HcmV?d00001 diff --git a/assets/cards/mhud.png b/assets/cards/mhud.png new file mode 100755 index 0000000000000000000000000000000000000000..52e757dcc9db4e6773df0f8d70bed5f5198f8334 GIT binary patch literal 1116 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=Aw{o-U3d z6?5L+-J37sF2Vj_<_j(@r9k&>N^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zpnSL^!M2lDbBDMdzWhB+Pb$ox2|YNoE3AfnSz`w&-7!UUBc)v839fdoUh1;f`WSov z>lxMN_9fxU|~s zQilfzJf6(vl|&HGb_9auX?&&*mcIG=!j30PqL37^x*G?yX#3=~xzgat>Fx(`Ud~^T zW2N?-C3Sslhvm?lQ!=n*cWP#ArA?52pc!17FE574`n?8RQ`!w27z*!2|4x%+xOdbn z@~8D);ftObRRc~Q965r%pXy12?ed}5VSX1ensW)32zv!%;?FS48!4vJo}PQp*Ex^V0C)xr#jy^o0in5?={jM3w(MO$Sw%9m>2>*nQU6O4LUSg zy5U7Nh{n>>NI0It%AGxk%%P+4z9^*Y6@;FgGw9?6429QiRZ_7dyA7evX8+n))B2!n zD$tDBa%is!PRU8ofgsx--O{+qY8j@1dxW<#E%8sat)qPV0`$MXh|MfogaV5!A_jGV zrq*Ee6~dYVOdyw%f0yDhepg;ItJFT)%_bJOpJ1@{)v?@7s%yB5)u4LhriIEz75XpU zC}*}YL{;!y(1Qe`-#%=XSb;$eqF5jji0Y>x55S@*)Igm3B}99z__)wS7kHRSpN9|o zlu2Tou_cU;{oE;EgmR?E0_lLKy#j$&LDHJPryJB7~d%)bFQ(vP_S literal 0 HcmV?d00001 diff --git a/assets/cards/pletters.json b/assets/cards/pletters.json new file mode 100644 index 0000000..9b52820 --- /dev/null +++ b/assets/cards/pletters.json @@ -0,0 +1,266 @@ +{ + "A": { + "x": 0, + "y": 0, + "w": 16, + "h": 20 + }, + "B": { + "x": 16, + "y": 0, + "w": 16, + "h": 20 + }, + "C": { + "x": 32, + "y": 0, + "w": 16, + "h": 20 + }, + "D": { + "x": 48, + "y": 0, + "w": 16, + "h": 20 + }, + "E": { + "x": 64, + "y": 0, + "w": 14, + "h": 20 + }, + "F": { + "x": 78, + "y": 0, + "w": 14, + "h": 20 + }, + "G": { + "x": 92, + "y": 0, + "w": 16, + "h": 20 + }, + "H": { + "x": 0, + "y": 20, + "w": 16, + "h": 20 + }, + "I": { + "x": 16, + "y": 20, + "w": 8, + "h": 20 + }, + "J": { + "x": 24, + "y": 20, + "w": 16, + "h": 20 + }, + "K": { + "x": 40, + "y": 20, + "w": 16, + "h": 20 + }, + "L": { + "x": 56, + "y": 20, + "w": 14, + "h": 20 + }, + "M": { + "x": 70, + "y": 20, + "w": 20, + "h": 20 + }, + "N": { + "x": 90, + "y": 20, + "w": 16, + "h": 20 + }, + "O": { + "x": 0, + "y": 40, + "w": 16, + "h": 20 + }, + "P": { + "x": 16, + "y": 40, + "w": 16, + "h": 20 + }, + "Q": { + "x": 32, + "y": 40, + "w": 16, + "h": 22 + }, + "R": { + "x": 48, + "y": 40, + "w": 16, + "h": 20 + }, + "S": { + "x": 64, + "y": 40, + "w": 16, + "h": 20 + }, + "T": { + "x": 80, + "y": 40, + "w": 16, + "h": 20 + }, + "U": { + "x": 96, + "y": 40, + "w": 16, + "h": 20 + }, + "V": { + "x": 0, + "y": 62, + "w": 18, + "h": 20 + }, + "W": { + "x": 18, + "y": 62, + "w": 20, + "h": 20 + }, + "X": { + "x": 38, + "y": 62, + "w": 18, + "h": 20 + }, + "Y": { + "x": 56, + "y": 62, + "w": 20, + "h": 20 + }, + "Z": { + "x": 76, + "y": 62, + "w": 16, + "h": 20 + }, + "0": { + "x": 0, + "y": 82, + "w": 16, + "h": 20 + }, + "1": { + "x": 16, + "y": 82, + "w": 10, + "h": 20 + }, + "2": { + "x": 26, + "y": 82, + "w": 16, + "h": 20 + }, + "3": { + "x": 42, + "y": 82, + "w": 16, + "h": 20 + }, + "4": { + "x": 58, + "y": 82, + "w": 16, + "h": 20 + }, + "5": { + "x": 74, + "y": 82, + "w": 16, + "h": 20 + }, + "6": { + "x": 90, + "y": 82, + "w": 14, + "h": 20 + }, + "7": { + "x": 106, + "y": 82, + "w": 16, + "h": 20 + }, + "8": { + "x": 122, + "y": 82, + "w": 16, + "h": 20 + }, + "9": { + "x": 138, + "y": 82, + "w": 16, + "h": 20 + }, + "?": { + "x": 128, + "y": 0, + "w": 18, + "h": 22 + }, + ".": { + "x": 146, + "y": 0, + "w": 8, + "h": 22 + }, + "+": { + "x": 154, + "y": 0, + "w": 12, + "h": 22 + }, + "-": { + "x": 166, + "y": 0, + "w": 12, + "h": 22 + }, + "/": { + "x": 178, + "y": 0, + "w": 14, + "h": 22 + }, + ",": { + "x": 192, + "y": 0, + "w": 10, + "h": 22 + }, + "*": { + "x": 203, + "y": 0, + "w": 12, + "h": 22 + }, + " ": { + "x": 215, + "y": 0, + "w": 10, + "h": 22 + } +} diff --git a/assets/cards/pletters.png b/assets/cards/pletters.png new file mode 100755 index 0000000000000000000000000000000000000000..9e9b6c36cdcc6ecca743fdefb5b7c5f1f1bb6f20 GIT binary patch literal 1699 zcmeHHjZ@Nh82=)^aEWQ}{bcRXyrmb+LT%akLPV&ouw_xU(A0n=nkAX0MUbu{5yd7B zl(qpQn{Nw3BOXYKXOaIR z0DwIu(Ab0c)BdymQ5xXgR%F-5kN!NXRiV9q$Uuz?#-*V4Gv^0Hv56yjAKq` zr6%!4_D!ym;vKZvnz?jsz%c)HZ;9CpxN*oSAL^q{7aVHU?Vx>IniWz&NlomRPBCnp ztBSGkZpXW08OmMJv^0O`^FaW5r|n&Kpw&MY!zY|aI@s}KL!%+C+luT=Izx}+}>^zD*E}q$X8R^a~vm=$K z1&VM|_K~LGS~_W;*`$%q>hH4@&@IxN2oYyYTZuJZT<|n)EF0IZQcxqkYn!e?jopKs z*o;==LB=-@&Z`$WXPY}2UFt5?B>nxTZ59uFJ#_C-*s~LqOD#TPZ3m|AvY zvjG)vOK)E9SS(kodY#2#m<{u9*%S8Y?@nRb(OW=(gnB@fc~@Jtyor3>CLy5e8&&hn zB$@rR^{Md@`$P2^cL)KD?wr`xmw9|~#b{jHcD;z%;TTUxt;w_Z({dh=>p@cfRCvnm zay+-M{Wg!NunX3(7Iw_&VwOz z%&>=;{iJCqxoE-U$`w${Qq5U~h?wDOobSt%ly-bmZNYx3P0!TBJ~1j#2yj)G?w{2P zrkcioE9}cW>8K)_v#pNpK+sh$h0Q3W4^mzAFcjcegB^pPi4o*<|S)Sz8T zP#8Q@mXOmId8~Pvh!3jEc)+h*!mFF96AB!kgGR?RGU)w$$xlKxXq=dKRat1theOcE zP7GM;l3<6kUlfk!?##l<*bgWHs!6vXSA>b9tyu8I)tjg+WmSkmXt8yiOuu<)AOd`Eo;BUAw89I)l~_2XdQ-b1!THr%;yfS3sNFRV&L2HJ4$Z|K}?w1x9ZhkLUc8mYV%fn%2VP7o5Gmdsk& zF%gbYtKmiI=)q@Om|2ZdRCf&<9(pSmKIs9+TgIVy^JCMkr<{f*Cmt^edWO!;hnyP4M7yp6lcJ|NWN`FnWLVI(WjvFT@`awa|CMb~3SnaQMPMnjSQT literal 0 HcmV?d00001 diff --git a/assets/cards/screens.aseprite b/assets/cards/screens.aseprite new file mode 100755 index 0000000000000000000000000000000000000000..4bdae74b66aecf93a57d47b664994fa256a44c1a GIT binary patch literal 2372 zcmdUveNYp38pqe7jW;T}oBDEXwMm`!w7wmJh!{-Tvz{I})uKo#r&M`~P=RWIC5Diy zRjS^|tJ;_Zs2PhVN6}J=n748$FKWWo!bmjPg)=5aU{?~z-V(^(lb}~;?q+W0X6}z} zCZBA6&y)Rrp8aL^-CrO`?}aG{G8LK1Mc@-jf%i`btoav_U&8DEaom`WAY;SR0;$s= zU@p8_+(6`Warfc;WiI#W3g@{>;FLj-h1^xZ4U40IX^|^|#XERFeE)BNmg+Ph(Q*#x zb*%=WsDT$qff4BVT^I%|Kmqb09FidxG9eJsAd2Hp;sybq z9iV`)kj=ZrsRy_#c`O8(#+@uNFFb3pAx0!$Ib?e$YktJ+&-x6h!6nJ`%mnYUrcHAb zQufUFb#hl)Iayj9cTUa(y)u2~moW=#mu*V;$C?$k{JZRshiU=t8#9*|1UDAxk|t;p zm*tmrrc1t?p19PCH4`DNj-L5BJ+Eqy%vB_d{$iAImzxE zXe}@FZ$)py2eM;L6Hm-^5hL8>8WlI<3#_l{KKAuZ*k;l93n+4sAG%X-48P`Lx6oAw zGAZWwG=ZO%-P%qWu127~*Q1z|f244#UP=07+fAF}NRGtOWBZ7F&?zff+L3Lycr_~p zWx@wu0@DzQOEpa;=ORpHiXW__aDzg0h08Cs6hURhGU z*L!MkoQF%6QOt|9KI-N@+nw1SgF??UUe&aE8l9Z4yzG?3vA}=V=5=6f5$Y)RG)mBB zeWr<>#xvrJjrh~2*{5B&Y+UT6x61|_>_JN?Uu9KyvGh#A+x?eX>Q)H(o&?vF3-1?k zv`V^1*uknezo1fF`8sFoeG9dTw9%iIohS8});%R0b;7rES~pSfw#g<&`PB|W$Kz}j zp_q!j=9-rG%! zt>;&F4QS6(5c<|#N~MSEN6QW5k9tTx*Dp!+8{Un^mmVa|tS+kx${B?DU-1Fk$@uE6 z!wp^047A6l;zECWMc&A|A0#lxw+&?Jf1I$lWGFk=KgRk-V|QS*QeP#b{l-7j?k)FN=$N&4dQE8+9e*F15X$cf|N{a)9A;Npn dU-&~eRr}LC|H~FUzhnQt!C^kuf{kBX{wJpMv8@0A literal 0 HcmV?d00001 diff --git a/assets/cards/screens.png b/assets/cards/screens.png new file mode 100755 index 0000000000000000000000000000000000000000..3a07279a6075c78313c80d4f36fdef915bb8ebf4 GIT binary patch literal 6317 zcmeHKdpJ~E8{bN~RPyNL$hGrGVo*~l6qE22I$@+CLe!@Yxy&dWX2z*-x{fq%A(xIM zw=SP1hm4cUe2p?XCCX(+%(x`O5XOwz-`X?$)ARISf6jWIJ?~z7zw5W&^?QHsT6-?L zA3m@~Ra+H;pf%119kCFk2yPW2<(0sY^-vdqQ6OLs?1w7bbVndaE5zB+{zz=@SnrTtD;qmX0yI z3OlmPOa~{q9!Gm`43HrLPxZ6a>c)w$A{Mg*PYSRj*3ow=gBKikN!*+$cB_O1FZjY? zZR1~`hy)`8R$9xz%gBvy(`-l!63^gB;6C!FqsXIuN~;l5upC({)UL1`F~f<72Nd0a{6aQ?QlqyGF^Otg zh>;INSonsL@GA0+06MID2NuyrUi!Ukr35r)x*4SOvqBJ(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cbc#2H_waRo7{G+0bk6tv#6ZWPx&kx4{BRCt{2o6C0OAPhtyXa4_}oyCkDLW7WyN-}3uE5}XiVnLZllTuQtR4SE9 zrBbP*bcMpN>%Zog;QS|F&;K%jha}y_0a&T7UjFzL+m@tRy(%O+@n1BjIhn8M76Nzbb9Qa31hXO-Ho%qwQI03BYpE(Z_EhSJfrVFms*^Z zyGhb`YQDyVyVDLU6Kc)Z#Ca}v`AV(}-`a$L-Rx<+kpWR#x!kyB{2dc2=lo<`X*r8} zNKI(f`F2eR{3+*^{N8}a{f@Gd#DpmGN%;4*Wj(kiwC;RT6QX}deIx&i`p~NqXg{KJa_S;ir{obCNNTmS{6xG49WB--I5nPzk zfJ&wLVs*0lN=XB%l;-0JWs=j)S4t^=qAPHsPFzn#b=K3(hvu{+pjQjcI50lvXj-kc zGIudmb)onxhLQ1?d{Hps-?L_qYRTWwtN0@*^7U?d_`5R}r_7R1{TzWZU(avKlkEHR zRlOwVLY0TFpSnoQC*>m#NB4YVU$PI%avPxv%W}nzIZIgIj*>TAZ$je0^9O%gQ6XOt z^IFvLxkU0g#Vz<<8sYp!v#I%1^i|;YyOOe8v16_}%+B;e5;K}#0Qr9-e_%c+pJ6^V zpV|eb==Wz=_qQ|-rDe>!k*E%?SlcXPM)M0W|8L?C)|sKtZ^`FYZUkywKe}%@c^>kc z^~T3&WVxsw#q6djVf=r$p!uKiC(~QE_HV9_eFZ}{%!HG=5>>%wA9BYEllf{lEWUR|d0p@>UzNZ>UJ|n&E{ZGS3>`aO) zVZ|R!Nj>-;CKT*UmIBB>(|k`g5PU&eL;4?>pGu{y^$oYW=#)ap05<>t002ovPDHLk FV1n+4@WTKA literal 0 HcmV?d00001 diff --git a/assets/cards/tapper.png b/assets/cards/tapper.png new file mode 100755 index 0000000000000000000000000000000000000000..1ec8c4eb61860680b98f19db403f132b0d82956d GIT binary patch literal 773 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=B;BJzX3_ zD(1YsyU|a{QHK4&#e&}V3CZa>IqM!V`fS_sKy=-X>@&9P3wJd=nRnpOq$hF*x{e*Y zaq|bCnOIDrB-5rhXI?24zxy7_%~P`f{-ICl9E>m4HgEHv(bLww?D+b1`O*8;Hpn;M zX*K*|U$|gY9js-O*nJQ%e9H0I9*w@glHX$qlJB}6jxgB=R`>=iH*>_VJM6$9C zl7HNn`V;EKa4JOll-^-^O-7CLZVKgs|2#MyBCj2~A@c8I$-Q4k>+62+Dx5FWP?S>7 zD{my;pYqKCaS{r}|CyPwXix0$=0tDZyg&#%v^kN2&z^5zp} zlvn=A_u$Kq6^1{2n;m!W=wm2J7jXJ@DE`%&`(`ir{m&;FN$JIKH~h8o(Py;NW@WHl z#<1YH2*Z~dObv3u3>T7bPHwnev%i8<@k&4EY^Ih?yiOgn%Xq}KXIG|V&k|fA&D!Ve zn#PduzwDRbg0nXaK75?UT2NYBZ7}=pdfOir#q&0@Csd#N7tr>^y5aj2htRoe@8D%9D0y zuljb5ux9xt?SBEA-V_{Ds;H>Si&6ja;s1x{3xJV5tik-d@mfKLzwMqNxC7)*Pgg&e IbxsLQ09TLu_y7O^ literal 0 HcmV?d00001 diff --git a/assets/cards/vendor/webfontloader.js b/assets/cards/vendor/webfontloader.js new file mode 100644 index 0000000..d1e856a --- /dev/null +++ b/assets/cards/vendor/webfontloader.js @@ -0,0 +1,17 @@ +/* Web Font Loader v1.6.28 - (c) Adobe Systems, Google. License: Apache 2.0 */(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2=b.f?e():a.fonts.load(fa(b.a),b.h).then(function(a){1<=a.length?d():setTimeout(f,25)},function(){e()})}f()}),e=null,f=new Promise(function(a,d){e=setTimeout(d,b.f)});Promise.race([f,d]).then(function(){e&&(clearTimeout(e),e=null);b.g(b.a)},function(){b.j(b.a)})};function Q(a,b,c,d,e,f,g){this.v=a;this.B=b;this.c=c;this.a=d;this.s=g||"BESbswy";this.f={};this.w=e||3E3;this.u=f||null;this.m=this.j=this.h=this.g=null;this.g=new M(this.c,this.s);this.h=new M(this.c,this.s);this.j=new M(this.c,this.s);this.m=new M(this.c,this.s);a=new G(this.a.c+",serif",J(this.a));a=O(a);this.g.a.style.cssText=a;a=new G(this.a.c+",sans-serif",J(this.a));a=O(a);this.h.a.style.cssText=a;a=new G("serif",J(this.a));a=O(a);this.j.a.style.cssText=a;a=new G("sans-serif",J(this.a));a= +O(a);this.m.a.style.cssText=a;N(this.g);N(this.h);N(this.j);N(this.m)}var R={D:"serif",C:"sans-serif"},S=null;function T(){if(null===S){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);S=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return S}Q.prototype.start=function(){this.f.serif=this.j.a.offsetWidth;this.f["sans-serif"]=this.m.a.offsetWidth;this.A=q();U(this)}; +function la(a,b,c){for(var d in R)if(R.hasOwnProperty(d)&&b===a.f[R[d]]&&c===a.f[R[d]])return!0;return!1}function U(a){var b=a.g.a.offsetWidth,c=a.h.a.offsetWidth,d;(d=b===a.f.serif&&c===a.f["sans-serif"])||(d=T()&&la(a,b,c));d?q()-a.A>=a.w?T()&&la(a,b,c)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?V(a,a.v):V(a,a.B):ma(a):V(a,a.v)}function ma(a){setTimeout(p(function(){U(this)},a),50)}function V(a,b){setTimeout(p(function(){v(this.g.a);v(this.h.a);v(this.j.a);v(this.m.a);b(this.a)},a),0)};function W(a,b,c){this.c=a;this.a=b;this.f=0;this.m=this.j=!1;this.s=c}var X=null;W.prototype.g=function(a){var b=this.a;b.g&&w(b.f,[b.a.c("wf",a.c,J(a).toString(),"active")],[b.a.c("wf",a.c,J(a).toString(),"loading"),b.a.c("wf",a.c,J(a).toString(),"inactive")]);K(b,"fontactive",a);this.m=!0;na(this)}; +W.prototype.h=function(a){var b=this.a;if(b.g){var c=y(b.f,b.a.c("wf",a.c,J(a).toString(),"active")),d=[],e=[b.a.c("wf",a.c,J(a).toString(),"loading")];c||d.push(b.a.c("wf",a.c,J(a).toString(),"inactive"));w(b.f,d,e)}K(b,"fontinactive",a);na(this)};function na(a){0==--a.f&&a.j&&(a.m?(a=a.a,a.g&&w(a.f,[a.a.c("wf","active")],[a.a.c("wf","loading"),a.a.c("wf","inactive")]),K(a,"active")):L(a.a))};function oa(a){this.j=a;this.a=new ja;this.h=0;this.f=this.g=!0}oa.prototype.load=function(a){this.c=new ca(this.j,a.context||this.j);this.g=!1!==a.events;this.f=!1!==a.classes;pa(this,new ha(this.c,a),a)}; +function qa(a,b,c,d,e){var f=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=e||null,m=d||null||{};if(0===c.length&&f)L(b.a);else{b.f+=c.length;f&&(b.j=f);var h,l=[];for(h=0;h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+
+
+ + + + diff --git a/css/main.css b/css/main.css index f848c07..d4b8439 100644 --- a/css/main.css +++ b/css/main.css @@ -2,6 +2,7 @@ body { font-family: 'Noto Sans', sans-serif; margin: 0; + background: #000; } section { diff --git a/js/more/cards/bundle.js b/js/more/cards/bundle.js new file mode 100644 index 0000000..30f09cb --- /dev/null +++ b/js/more/cards/bundle.js @@ -0,0 +1,164 @@ +var Tetris=function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=8)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var i=0;i",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),c=["%","/","?",";","#"].concat(l),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=i(17);function _(t,e,i){if(t&&n.isObject(t)&&t instanceof s)return t;var r=new s;return r.parse(t,e,i),r}s.prototype.parse=function(t,e,i){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var s=t.indexOf("?"),a=-1!==s&&s127?N+="x":N+=M[k];if(!N.match(p)){var L=I.slice(0,A),F=I.slice(A+1),U=M.match(f);U&&(L.push(U[1]),F.unshift(U[2])),F.length&&(_="/"+F.join(".")+_),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=r.toASCII(this.hostname));var B=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+B,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!g[b])for(A=0,D=l.length;A0)&&i.host.split("@"))&&(i.auth=O.shift(),i.host=i.hostname=O.shift());return i.search=t.search,i.query=t.query,n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!E.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var S=E.slice(-1)[0],C=(i.host||t.host||E.length>1)&&("."===S||".."===S)||""===S,A=0,P=E.length;P>=0;P--)"."===(S=E[P])?E.splice(P,1):".."===S?(E.splice(P,1),A++):A&&(E.splice(P,1),A--);if(!x&&!b)for(;A--;A)E.unshift("..");!x||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),C&&"/"!==E.join("/").substr(-1)&&E.push("");var O,I=""===E[0]||E[0]&&"/"===E[0].charAt(0);T&&(i.hostname=i.host=I?"":E.length?E.shift():"",(O=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=O.shift(),i.host=i.hostname=O.shift()));return(x=x||i.host&&E.length)&&!I&&E.unshift(""),E.length?i.pathname=E.join("/"):(i.pathname=null,i.path=null),n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},s.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,i){"use strict";t.exports=function(t,e){e=e||{};for(var i={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=i.parser[e.strictMode?"strict":"loose"].exec(t),n={},s=14;s--;)n[i.key[s]]=r[s]||"";return n[i.q.name]={},n[i.key[12]].replace(i.q.parser,function(t,e,r){e&&(n[i.q.name][e]=r)}),n}},function(t,e,i){"use strict";var r=Object.prototype.hasOwnProperty,n="~";function s(){}function o(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function a(t,e,i,r,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new o(i,r||t,s),h=n?n+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function u(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(n=!1)),u.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)r.call(t,e)&&i.push(n?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},u.prototype.listeners=function(t){var e=n?n+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,s=i.length,o=new Array(s);r80*i){r=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),p>u&&(u=p);f=0!==(f=Math.max(h-r,u-a))?1/f:0}return o(y,_,i,r,a,f),_}function n(t,e,i,r,n){var s,o;if(n===P(t,e,i,r)>0)for(s=e;s=e;s-=r)o=S(s,t[s],t[s+1],o);return o&&_(o,o.next)&&(C(o),o=o.next),o}function s(t,e){if(!t)return t;e||(e=t);var i,r=t;do{if(i=!1,r.steiner||!_(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{if(C(r),(r=e=r.prev)===r.next)break;i=!0}}while(i||r!==e);return e}function o(t,e,i,r,n,c,d){if(t){!d&&c&&function(t,e,i,r){var n=t;do{null===n.z&&(n.z=f(n.x,n.y,e,i,r)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,r,n,s,o,a,h,u=1;do{for(i=t,t=null,s=null,o=0;i;){for(o++,r=i,a=0,e=0;e0||h>0&&r;)0!==a&&(0===h||!r||i.z<=r.z)?(n=i,i=i.nextZ,a--):(n=r,r=r.nextZ,h--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;i=r}s.nextZ=null,u*=2}while(o>1)}(n)}(t,r,n,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,r,n,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),C(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(s(t),e,i),e,i,r,n,c,2):2===d&&l(t,e,i,r,n,c):o(s(t),e,i,r,n,c,1);break}}}function a(t){var e=t.prev,i=t,r=t.next;if(y(e,i,r)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(v(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y)&&y(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(t,e,i,r){var n=t.prev,s=t,o=t.next;if(y(n,s,o)>=0)return!1;for(var a=n.xs.x?n.x>o.x?n.x:o.x:s.x>o.x?s.x:o.x,l=n.y>s.y?n.y>o.y?n.y:o.y:s.y>o.y?s.y:o.y,c=f(a,h,e,i,r),d=f(u,l,e,i,r),p=t.prevZ,g=t.nextZ;p&&p.z>=c&&g&&g.z<=d;){if(p!==t.prev&&p!==t.next&&v(n.x,n.y,s.x,s.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&v(n.x,n.y,s.x,s.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&v(n.x,n.y,s.x,s.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=d;){if(g!==t.prev&&g!==t.next&&v(n.x,n.y,s.x,s.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function u(t,e,i){var r=t;do{var n=r.prev,o=r.next.next;!_(n,o)&&w(n,r,r.next,o)&&E(n,o)&&E(o,n)&&(e.push(n.i/i),e.push(r.i/i),e.push(o.i/i),C(r),C(r.next),r=t=o),r=r.next}while(r!==t);return s(r)}function l(t,e,i,r,n,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&m(h,u)){var l=T(h,u);return h=s(h,h.next),l=s(l,l.next),o(h,e,i,r,n,a),void o(l,e,i,r,n,a)}u=u.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,r=e,n=t.x,s=t.y,o=-1/0;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){var a=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=n&&a>o){if(o=a,a===n){if(s===r.y)return r;if(s===r.next.y)return r.next}i=r.x=r.x&&r.x>=l&&n!==r.x&&v(si.x||r.x===i.x&&p(i,r)))&&(i=r,d=h)),r=r.next}while(r!==u);return i}(t,e)){var i=T(e,t);s(e,e.next),s(i,i.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function f(t,e,i,r,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,i=t;do{(e.x=0&&(t-o)*(r-a)-(i-o)*(e-a)>=0&&(i-o)*(s-a)-(n-o)*(r-a)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&w(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,r=!1,n=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&n<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next}while(i!==t);return r}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||_(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,i,r){var n=b(y(t,e,i)),s=b(y(t,e,r)),o=b(y(i,r,t)),a=b(y(i,r,e));return n!==s&&o!==a||(!(0!==n||!x(t,i,e))||(!(0!==s||!x(t,r,e))||(!(0!==o||!x(i,t,r))||!(0!==a||!x(i,e,r)))))}function x(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function b(t){return t>0?1:t<0?-1:0}function E(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function T(t,e){var i=new A(t.i,t.x,t.y),r=new A(e.i,e.x,e.y),n=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,r.next=i,i.prev=r,s.next=r,r.prev=s,r}function S(t,e,i,r){var n=new A(t,e,i);return r?(n.next=r.next,n.prev=r,r.next.prev=n,r.next=n):(n.prev=n,n.next=n),n}function C(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,i,r){for(var n=0,s=e,o=i-r;s0&&(r+=t[n-1].length,i.holes.push(r))}return i}},function(t,e,i){(function(r,n){var s;!function(r){var o=r.Promise,a=o&&"resolve"in o&&"reject"in o&&"all"in o&&"race"in o&&function(){var t;return new o(function(e){t=e}),"function"==typeof t}();e?(e.Promise=a?o:A,e.Polyfill=A):void 0===(s=function(){return a?o:A}.call(e,i,e,t))||(t.exports=s);var h="pending",u="sealed",l="fulfilled",c="rejected",d=function(){};function p(t){return"[object Array]"===Object.prototype.toString.call(t)}var f,g=void 0!==n?n:setTimeout,v=[];function m(){for(var t=0;t0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array)}).call(this,i(1))},function(t,e,i){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function s(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new s(n.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new s(n.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},i(12),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,i(1))},function(t,e,i){(function(t,e){!function(t,i){"use strict";if(!t.setImmediate){var r,n,s,o,a,h=1,u={},l=!1,c=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){f(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,i=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=i,e}}()?t.MessageChannel?((s=new MessageChannel).port1.onmessage=function(t){f(t.data)},r=function(t){s.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,r=function(t){var e=c.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,n.removeChild(e),e=null},n.appendChild(e)}):r=function(t){setTimeout(f,0,t)}:(o="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&f(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(o+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),i=0;i1)for(var i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=u-l,b=Math.floor,E=String.fromCharCode;function T(t){throw new RangeError(w[t])}function S(t,e){for(var i=t.length,r=[];i--;)r[i]=e(t[i]);return r}function C(t,e){var i=t.split("@"),r="";return i.length>1&&(r=i[0]+"@",t=i[1]),r+S((t=t.replace(_,".")).split("."),e).join(".")}function A(t){for(var e,i,r=[],n=0,s=t.length;n=55296&&e<=56319&&n65535&&(e+=E((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=E(t)}).join("")}function O(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function I(t,e,i){var r=0;for(t=i?b(t/p):t>>1,t+=b(t/e);t>x*c>>1;r+=u)t=b(t/x);return b(r+(x+1)*t/(t+d))}function D(t){var e,i,r,n,s,o,a,d,p,m,y,_=[],w=t.length,x=0,E=g,S=f;for((i=t.lastIndexOf(v))<0&&(i=0),r=0;r=128&&T("not-basic"),_.push(t.charCodeAt(r));for(n=i>0?i+1:0;n=w&&T("invalid-input"),((d=(y=t.charCodeAt(n++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:u)>=u||d>b((h-x)/o))&&T("overflow"),x+=d*o,!(d<(p=a<=S?l:a>=S+c?c:a-S));a+=u)o>b(h/(m=u-p))&&T("overflow"),o*=m;S=I(x-s,e=_.length+1,0==s),b(x/e)>h-E&&T("overflow"),E+=b(x/e),x%=e,_.splice(x++,0,E)}return P(_)}function M(t){var e,i,r,n,s,o,a,d,p,m,y,_,w,x,S,C=[];for(_=(t=A(t)).length,e=g,i=0,s=f,o=0;o<_;++o)(y=t[o])<128&&C.push(E(y));for(r=n=C.length,n&&C.push(v);r<_;){for(a=h,o=0;o<_;++o)(y=t[o])>=e&&yb((h-i)/(w=r+1))&&T("overflow"),i+=(a-e)*w,e=a,o=0;o<_;++o)if((y=t[o])h&&T("overflow"),y==e){for(d=i,p=u;!(d<(m=p<=s?l:p>=s+c?c:p-s));p+=u)S=d-m,x=u-m,C.push(E(O(m+S%x,0))),d=b(S/x);C.push(E(O(d,0))),s=I(i,w,r==n),i=0,++r}++i,++e}return C.join("")}a={version:"1.4.1",ucs2:{decode:A,encode:P},decode:D,encode:M,toASCII:function(t){return C(t,function(t){return y.test(t)?"xn--"+M(t):t})},toUnicode:function(t){return C(t,function(t){return m.test(t)?D(t.slice(4).toLowerCase()):t})}},void 0===(n=function(){return a}.call(e,i,e,t))||(t.exports=n)}()}).call(this,i(15)(t),i(1))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,i){"use strict";e.decode=e.parse=i(18),e.encode=e.stringify=i(19)},function(t,e,i){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,i,s){e=e||"&",i=i||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(e);var h=1e3;s&&"number"==typeof s.maxKeys&&(h=s.maxKeys);var u=t.length;h>0&&u>h&&(u=h);for(var l=0;l=0?(c=g.substr(0,v),d=g.substr(v+1)):(c=g,d=""),p=decodeURIComponent(c),f=decodeURIComponent(d),r(o,p)?n(o[p])?o[p].push(f):o[p]=[o[p],f]:o[p]=f}return o};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,i){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,i,a){return e=e||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?s(o(t),function(o){var a=encodeURIComponent(r(o))+i;return n(t[o])?s(t[o],function(t){return a+encodeURIComponent(r(t))}).join(e):a+encodeURIComponent(r(t[o]))}).join(e):a?encodeURIComponent(r(a))+i+encodeURIComponent(r(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function s(t,e){if(t.map)return t.map(e);for(var i=[],r=0;r=11&&(e=!0)}if(_.android.device){var r=navigator.userAgent.match(/Android\s([0-9.]*)/);r&&parseInt(r[1],10)>=7&&(e=!0)}}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:_.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!_.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},R=i(4),L=i.n(R),F=i(5),U=i.n(F),B=i(2),G=i.n(B);!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(w||(w={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(x||(x={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(b||(b={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(E||(E={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(T||(T={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(S||(S={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(C||(C={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(A||(A={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(P||(P={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(O||(O={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(I||(I={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(D||(D={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(M||(M={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(N||(N={})), +/*! + * @pixi/utils - v5.2.1 + * Compiled Tue, 28 Jan 2020 23:33:11 UTC + * + * @pixi/utils is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +k.RETINA_PREFIX=/@([0-9\.]+)x/,k.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var j,H=!1,X="5.2.1";function z(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function Y(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)}var V=function(){for(var t=[],e=[],i=0;i<32;i++)t[i]=i,e[i]=i;t[b.NORMAL_NPM]=b.NORMAL,t[b.ADD_NPM]=b.ADD,t[b.SCREEN_NPM]=b.SCREEN,e[b.NORMAL]=b.NORMAL_NPM,e[b.ADD]=b.ADD_NPM,e[b.SCREEN]=b.SCREEN_NPM;var r=[];return r.push(e),r.push(t),r}();function W(t,e){return V[e?1:0][t]}function q(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var i=t>>16&255,r=t>>8&255,n=255&t;return(255*e<<24)+((i=i*e+.5|0)<<16)+((r=r*e+.5|0)<<8)+(n=n*e+.5|0)}function K(t,e,i,r){return(i=i||new Float32Array(4))[0]=(t>>16&255)/255,i[1]=(t>>8&255)/255,i[2]=(255&t)/255,(r||void 0===r)&&(i[0]*=e,i[1]*=e,i[2]*=e),i[3]=e,i}Float32Array,Uint32Array,Int32Array,Uint8Array;function Z(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function $(t){return!(t&t-1||!t)}function J(t){var e=(t>65535?1:0)<<4,i=((t>>>=e)>255?1:0)<<3;return e|=i,e|=i=((t>>>=i)>15?1:0)<<2,(e|=i=((t>>>=i)>3?1:0)<<1)|(t>>>=i)>>1}function Q(t,e,i){var r,n=t.length;if(!(e>=n||0===i)){var s=n-(i=e+i>n?n-e:i);for(r=e;r=0?St.S:St.N:2*Math.abs(e)<=Math.abs(t)?t>0?St.E:St.W:e>0?t>0?St.SE:St.SW:t>0?St.NE:St.NW},matrixAppendRotationInv:function(t,e,i,r){void 0===i&&(i=0),void 0===r&&(r=0);var n=Et[St.inv(e)];n.tx=i,n.ty=r,t.append(n)}},Ct=function(){function t(){this.worldTransform=new mt,this.localTransform=new mt,this.position=new pt(this.onChange,this,0,0),this.scale=new pt(this.onChange,this,1,1),this.pivot=new pt(this.onChange,this,0,0),this.skew=new pt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var i=t.worldTransform,r=this.worldTransform;r.a=e.a*i.a+e.b*i.c,r.b=e.a*i.b+e.b*i.d,r.c=e.c*i.a+e.d*i.c,r.d=e.c*i.b+e.d*i.d,r.tx=e.tx*i.a+e.ty*i.c+i.tx,r.ty=e.tx*i.b+e.ty*i.d+i.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!0,configurable:!0}),t.IDENTITY=new t,t}(),At=function(){function t(t,e,i,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),this.x=Number(t),this.y=Number(e),this.width=Number(i),this.height=Number(r),this.type=ct.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t=this.y&&ee!=u>e&&t<(e-a)/(u-a)*(h-o)+o&&(i=!i)}return i},t}(),Dt=function(){function t(t,e,i,r,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===n&&(n=20),this.x=t,this.y=e,this.width=i,this.height=r,this.radius=n,this.type=ct.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var i=t-(this.x+this.radius),r=e-(this.y+this.radius),n=this.radius*this.radius;if(i*i+r*r<=n)return!0;if((i=t-(this.x+this.width-this.radius))*i+r*r<=n)return!0;if(i*i+(r=e-(this.y+this.height-this.radius))*r<=n)return!0;if((i=t-(this.x+this.radius))*i+r*r<=n)return!0}return!1},t}(); +/*! + * @pixi/display - v5.2.1 + * Compiled Tue, 28 Jan 2020 23:33:11 UTC + * + * @pixi/display is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +k.SORTABLE_CHILDREN=!1;var Mt=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null};Mt.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},Mt.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},Mt.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?At.EMPTY:((t=t||new At(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},Mt.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},Mt.prototype.addQuad=function(t){var e=this.minX,i=this.minY,r=this.maxX,n=this.maxY,s=t[0],o=t[1];e=sr?s:r,n=o>n?o:n,e=(s=t[2])r?s:r,n=o>n?o:n,e=(s=t[4])r?s:r,n=o>n?o:n,e=(s=t[6])r?s:r,n=o>n?o:n,this.minX=e,this.minY=i,this.maxX=r,this.maxY=n},Mt.prototype.addFrame=function(t,e,i,r,n){this.addFrameMatrix(t.worldTransform,e,i,r,n)},Mt.prototype.addFrameMatrix=function(t,e,i,r,n){var s=t.a,o=t.b,a=t.c,h=t.d,u=t.tx,l=t.ty,c=this.minX,d=this.minY,p=this.maxX,f=this.maxY,g=s*e+a*i+u,v=o*e+h*i+l;c=gp?g:p,f=v>f?v:f,c=(g=s*r+a*i+u)p?g:p,f=v>f?v:f,c=(g=s*e+a*n+u)p?g:p,f=v>f?v:f,c=(g=s*r+a*n+u)p?g:p,f=v>f?v:f,this.minX=c,this.minY=d,this.maxX=p,this.maxY=f},Mt.prototype.addVertexData=function(t,e,i){for(var r=this.minX,n=this.minY,s=this.maxX,o=this.maxY,a=e;as?h:s,o=u>o?u:o}this.minX=r,this.minY=n,this.maxX=s,this.maxY=o},Mt.prototype.addVertices=function(t,e,i,r){this.addVerticesMatrix(t.worldTransform,e,i,r)},Mt.prototype.addVerticesMatrix=function(t,e,i,r,n,s){var o=t.a,a=t.b,h=t.c,u=t.d,l=t.tx,c=t.ty;n=n||0,s=s||0;for(var d=this.minX,p=this.minY,f=this.maxX,g=this.maxY,v=i;vr?t.maxX:r,this.maxY=t.maxY>n?t.maxY:n},Mt.prototype.addBoundsMask=function(t,e){var i=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,n=t.maxXh?n:h,this.maxY=s>u?s:u}},Mt.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},Mt.prototype.addBoundsArea=function(t,e){var i=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,n=t.maxXh?n:h,this.maxY=s>u?s:u}},Mt.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},Mt.prototype.addFramePad=function(t,e,i,r,n,s){t-=n,e-=s,i+=n,r+=s,this.minX=this.minXi?this.maxX:i,this.minY=this.minYr?this.maxY:r};var Nt=function(t){function e(){t.call(this),this.tempDisplayObjectParent=null,this.transform=new Ct,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Mt,this._boundsID=0,this._lastBoundsID=-1,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={_tempDisplayObjectParent:{configurable:!0},x:{configurable:!0},y:{configurable:!0},worldTransform:{configurable:!0},localTransform:{configurable:!0},position:{configurable:!0},scale:{configurable:!0},pivot:{configurable:!0},skew:{configurable:!0},rotation:{configurable:!0},angle:{configurable:!0},zIndex:{configurable:!0},worldVisible:{configurable:!0},mask:{configurable:!0}};return e.mixin=function(t){for(var i=Object.keys(t),r=0;r1)for(var r=0;rthis.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),r=this.getChildIndex(e);this.children[i]=e,this.children[r]=t,this.onChildrenChange(i=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(t);Q(this.children,i,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments,i=arguments.length;if(i>1)for(var r=0;r0&&s<=n){i=this.children.splice(r,s);for(var o=0;o1&&this.children.sort(kt),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t title : "+t.title+"
tabIndex: "+t.tabIndex},Ft.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},Ft.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2,e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},Ft.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},Ft.prototype._onFocus=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},Ft.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live","off")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},Ft.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},Ft.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},Ft.prototype.destroy=function(){this.destroyTouchHook(),this.div=null;for(var t=0;te.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var i=this._head.next;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!0,configurable:!0}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var i=t-this._lastFrame|0;if(i=0;l--){var c=u[l],d=this.recursiveFindHit(t,c,i,r,a);if(d){if(!c.parent)continue;a=!1,d&&(t.target&&(r=!1),o=!0)}}return n&&(r&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(s)&&(o=!0),e.interactive&&(o&&!t.target&&(t.target=e),i&&i(t,e,!!o))),o},Vt.prototype.findHit=function(t,e,i,r){this.recursiveFindHit(t,e,i,r,!1)};var Wt={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Nt.mixin(Wt);var qt=1,Kt={target:null,data:{global:null}},Zt=function(t){function e(e,i){t.call(this),i=i||{},this.renderer=e,this.autoPreventDefault=void 0===i.autoPreventDefault||i.autoPreventDefault,this.interactionFrequency=i.interactionFrequency||10,this.mouse=new jt,this.mouse.identifier=qt,this.mouse.global.set(-999999),this.activeInteractionData={},this.activeInteractionData[qt]=this.mouse,this.interactionDataPool=[],this.eventData=new Xt,this.interactionDOMElement=null,this.moveWhenInside=!1,this.eventsAdded=!1,this.tickerAdded=!1,this.mouseOverRenderer=!1,this.supportsTouchEvents="ontouchstart"in window,this.supportsPointerEvents=!!window.PointerEvent,this.onPointerUp=this.onPointerUp.bind(this),this.processPointerUp=this.processPointerUp.bind(this),this.onPointerCancel=this.onPointerCancel.bind(this),this.processPointerCancel=this.processPointerCancel.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.processPointerDown=this.processPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.processPointerMove=this.processPointerMove.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.processPointerOverOut=this.processPointerOverOut.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.cursorStyles={default:"inherit",pointer:"pointer"},this.currentCursorMode=null,this.cursor=null,this.resolution=1,this.delayedEvents=[],this.search=new Vt,this._useSystemTicker=void 0===i.useSystemTicker||i.useSystemTicker,this.setTargetElement(this.renderer.view,this.renderer.resolution)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={useSystemTicker:{configurable:!0}};return i.useSystemTicker.get=function(){return this._useSystemTicker},i.useSystemTicker.set=function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},e.prototype.hitTest=function(t,e){return Kt.target=null,Kt.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(Kt,e,null,!0),Kt.target},e.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(Bt.system.add(this.tickerUpdate,this,Lt.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(Bt.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){!this.eventsAdded&&this.interactionDOMElement&&(window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.eventsAdded&&this.interactionDOMElement&&(window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime8)throw new Error("max arguments reached");var h=this,u=h.name,l=h.items;this._aliasCount++;for(var c=0,d=l.length;c0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t}();Object.defineProperties($t.prototype,{dispatch:{value:$t.prototype.emit},run:{value:$t.prototype.emit}}); +/*! + * @pixi/core - v5.2.1 + * Compiled Tue, 28 Jan 2020 23:33:11 UTC + * + * @pixi/core is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +var Jt=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new $t("setRealSize",2),this.onUpdate=new $t("update"),this.onError=new $t("onError",1)},Qt={valid:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};Jt.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.run(this._width,this._height)},Jt.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},Jt.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.run(t,e))},Qt.valid.get=function(){return!!this._width&&!!this._height},Jt.prototype.update=function(){this.destroyed||this.onUpdate.run()},Jt.prototype.load=function(){return Promise.resolve()},Qt.width.get=function(){return this._width},Qt.height.get=function(){return this._height},Jt.prototype.upload=function(t,e,i){return!1},Jt.prototype.style=function(t,e,i){return!1},Jt.prototype.dispose=function(){},Jt.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},Object.defineProperties(Jt.prototype,Qt);var te=function(t){function e(e){var i=e.naturalWidth||e.videoWidth||e.width,r=e.naturalHeight||e.videoHeight||e.height;t.call(this,i,r),this.source=e,this.noSubImage=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.crossOrigin=function(t,e,i){void 0===i&&0!==e.indexOf("data:")?t.crossOrigin=function(t,e){if(void 0===e&&(e=window.location),0===t.indexOf("data:"))return"";e=e||window.location,ut||(ut=document.createElement("a")),ut.href=t;var i=Object(B.parse)(ut.href),r=!i.port&&""===e.port||i.port===e.port;return i.hostname===e.hostname&&r&&i.protocol===e.protocol?"":"anonymous"}(e):!1!==i&&(t.crossOrigin="string"==typeof i?i:"anonymous")},e.prototype.upload=function(t,e,i,r){var n=t.gl,s=e.realWidth,o=e.realHeight;return r=r||this.source,n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===I.UNPACK),this.noSubImage||e.target!==n.TEXTURE_2D||i.width!==s||i.height!==o?(i.width=s,i.height=o,n.texImage2D(e.target,0,e.format,e.format,e.type,r)):n.texSubImage2D(n.TEXTURE_2D,0,0,0,e.format,e.type,r),!0},e.prototype.update=function(){if(!this.destroyed){var e=this.source.naturalWidth||this.source.videoWidth||this.source.width,i=this.source.naturalHeight||this.source.videoHeight||this.source.height;this.resize(e,i),t.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(Jt),ee=function(t){function e(e,i){if(i=i||{},!(e instanceof HTMLImageElement)){var r=new Image;t.crossOrigin(r,e,i.crossorigin),r.src=e,e=r}t.call(this,e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(void 0!==i.createBitmap?i.createBitmap:k.CREATE_IMAGE_BITMAP)&&!!window.createImageBitmap,this.alphaMode="number"==typeof i.alphaMode?i.alphaMode:null,void 0!==i.premultiplyAlpha&&(this.premultiplyAlpha=i.premultiplyAlpha),this.bitmap=null,this._load=null,!1!==i.autoLoad&&this.load()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.load=function(t){var e=this;return void 0!==t&&(this.createBitmap=t),this._load?this._load:(this._load=new Promise(function(t){e.url=e.source.src;var i=e.source,r=function(){e.destroyed||(i.onload=null,i.onerror=null,e.resize(i.width,i.height),e._load=null,e.createBitmap?t(e.process()):t(e))};i.complete&&i.src?r():(i.onload=r,i.onerror=function(t){return e.onError.run(t)})}),this._load)},e.prototype.process=function(){var t=this;return null!==this._process?this._process:null===this.bitmap&&window.createImageBitmap?(this._process=window.createImageBitmap(this.source,0,0,this.source.width,this.source.height,{premultiplyAlpha:this.premultiplyAlpha===I.UNPACK?"premultiply":"none"}).then(function(e){return t.destroyed?Promise.reject():(t.bitmap=e,t.update(),t._process=null,Promise.resolve(t))}),this._process):Promise.resolve(this)},e.prototype.upload=function(e,i,r){if("number"==typeof this.alphaMode&&(i.alphaMode=this.alphaMode),!this.createBitmap)return t.prototype.upload.call(this,e,i,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(t.prototype.upload.call(this,e,i,r,this.bitmap),!this.preserveBitmap){var n=!0;for(var s in i._glTextures){var o=i._glTextures[s];if(o!==r&&o.dirtyId!==i.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,t.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e}(te),ie=[];function re(t,e){if(!t)return null;var i="";if("string"==typeof t){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);r&&(i=r[1].toLowerCase())}for(var n=ie.length-1;n>=0;--n){var s=ie[n];if(s.test&&s.test(t,i))return new s(t,e)}return new ee(t,e)}var ne=function(t){function e(e,i){var r=i||{},n=r.width,s=r.height;if(!n||!s)throw new Error("BufferResource width or height invalid");t.call(this,n,s),this.data=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,i){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===I.UNPACK),i.width===e.width&&i.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(i.width=e.width,i.height=e.height,r.texImage2D(e.target,0,i.internalFormat,e.width,e.height,0,e.format,i.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(Jt),se={scaleMode:A.NEAREST,format:T.RGBA,alphaMode:I.NPM},oe=function(t){function e(e,i){void 0===e&&(e=null),void 0===i&&(i=null),t.call(this);var r=(i=i||{}).alphaMode,n=i.mipmap,s=i.anisotropicLevel,o=i.scaleMode,a=i.width,h=i.height,u=i.wrapMode,l=i.format,c=i.type,d=i.target,p=i.resolution,f=i.resourceOptions;!e||e instanceof Jt||((e=re(e,f)).internal=!0),this.width=a||0,this.height=h||0,this.resolution=p||k.RESOLUTION,this.mipmap=void 0!==n?n:k.MIPMAP_TEXTURES,this.anisotropicLevel=void 0!==s?s:k.ANISOTROPIC_LEVEL,this.wrapMode=u||k.WRAP_MODE,this.scaleMode=void 0!==o?o:k.SCALE_MODE,this.format=l||T.RGBA,this.type=c||C.UNSIGNED_BYTE,this.target=d||S.TEXTURE_2D,this.alphaMode=void 0!==r?r:I.UNPACK,void 0!==i.premultiplyAlpha&&(this.premultiplyAlpha=i.premultiplyAlpha),this.uid=it(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&h>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.setResource(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={realWidth:{configurable:!0},realHeight:{configurable:!0}};return i.realWidth.get=function(){return Math.ceil(this.width*this.resolution-1e-4)},i.realHeight.get=function(){return Math.ceil(this.height*this.resolution-1e-4)},e.prototype.setStyle=function(t,e){var i;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,i=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,i=!0),i&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,i){return this.resolution=i||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},e.prototype.setRealSize=function(t,e,i){return this.resolution=i||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=$(this.realWidth)&&$(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT(),this)},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete at[this.cacheId],delete ot[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.from=function(t,i,r){void 0===r&&(r=k.STRICT_TEXTURE_CACHE);var n="string"==typeof t,s=null;n?s=t:(t._pixiId||(t._pixiId="pixiid_"+it()),s=t._pixiId);var o=at[s];if(n&&r&&!o)throw new Error('The cacheId "'+s+'" does not exist in BaseTextureCache.');return o||((o=new e(t,i)).cacheId=s,e.addToCache(o,s)),o},e.fromBuffer=function(t,i,r,n){t=t||new Float32Array(i*r*4);var s=new ne(t,{width:i,height:r}),o=t instanceof Float32Array?C.FLOAT:C.UNSIGNED_BYTE;return new e(s,Object.assign(se,n||{width:i,height:r,type:o}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),at[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),at[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=at[t];if(e){var i=e.textureCacheIds.indexOf(t);return i>-1&&e.textureCacheIds.splice(i,1),delete at[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var ce=function(t){function e(e,i){if(i=i||{},!(e instanceof HTMLVideoElement)){var r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),"string"==typeof e&&(e=[e]),t.crossOrigin(r,e[0].src||e[0],i.crossorigin);for(var n=0;n0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(Bt.shared.add(this.update,this),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(Bt.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isAutoUpdating&&Bt.shared.remove(this.update,this),this.source&&(this.source.removeEventListener("error",this._onError,!0),this.source.pause(),this.source.src="",this.source.load()),t.prototype.dispose.call(this)},i.autoUpdate.get=function(){return this._autoUpdate},i.autoUpdate.set=function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(Bt.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(Bt.shared.add(this.update,this),this._isAutoUpdating=!0))},i.updateFPS.get=function(){return this._updateFPS},i.updateFPS.set=function(t){t!==this._updateFPS&&(this._updateFPS=t)},e.test=function(t,i){return t instanceof HTMLVideoElement||e.TYPES.indexOf(i)>-1},Object.defineProperties(e.prototype,i),e}(te);ce.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];var de=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(te);ie.push(ee,de,he,ce,le,ne,ue,ae);var pe=function(t){this.renderer=t};pe.prototype.destroy=function(){this.renderer=null};var fe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,i){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===I.UNPACK),i.width===e.width&&i.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(i.width=e.width,i.height=e.height,r.texImage2D(e.target,0,r.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(ne),ge=function(t,e){this.width=Math.ceil(t||100),this.height=Math.ceil(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new $t("disposeFramebuffer",2)},ve={colorTexture:{configurable:!0}};ve.colorTexture.get=function(){return this.colorTextures[0]},ge.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new oe(null,{scaleMode:0,resolution:1,mipmap:!1,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},ge.prototype.addDepthTexture=function(t){return this.depthTexture=t||new oe(new fe(null,{width:this.width,height:this.height}),{scaleMode:0,resolution:1,width:this.width,height:this.height,mipmap:!1,format:T.DEPTH_COMPONENT,type:C.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},ge.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},ge.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},ge.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var i=0;i-1&&e.textureCacheIds.splice(i,1),delete ot[t],e}}else if(t&&t.textureCacheIds){for(var r=0;rthis.baseTexture.width,o=i+n>this.baseTexture.height;if(s||o){var a=s&&o?"and":"or",h="X: "+e+" + "+r+" = "+(e+r)+" > "+this.baseTexture.width,u="Y: "+i+" + "+n+" = "+(i+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=r&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},i.rotate.get=function(){return this._rotate},i.rotate.set=function(t){this._rotate=t,this.valid&&this.updateUvs()},i.width.get=function(){return this.orig.width},i.height.get=function(){return this.orig.height},Object.defineProperties(e.prototype,i),e}(L.a);function xe(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}we.EMPTY=new we(new oe),xe(we.EMPTY),xe(we.EMPTY.baseTexture),we.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new we(new oe(new he(t)))}(),xe(we.WHITE),xe(we.WHITE.baseTexture);var be=function(t){function e(e,i){var r=null;if(!(e instanceof me)){var n=arguments[1],s=arguments[2],o=arguments[3],a=arguments[4];console.warn("Please use RenderTexture.create("+n+", "+s+") instead of the ctor directly."),r=arguments[0],i=null,e=new me({width:n,height:s,scaleMode:o,resolution:a})}t.call(this,e,i),this.legacyRenderer=r,this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.resize=function(t,e,i){void 0===i&&(i=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,i&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"==typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new me(t))},e}(we),Ee=function(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0};Ee.prototype.createTexture=function(t,e){var i=new me(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new be(i)},Ee.prototype.getOptimalTexture=function(t,e,i){void 0===i&&(i=1);var r=Ee.SCREEN_KEY;t*=i,e*=i,this.enableFullScreen&&t===this._pixelsWidth&&e===this._pixelsHeight||(r=(65535&(t=Z(t)))<<16|65535&(e=Z(e))),this.texturePool[r]||(this.texturePool[r]=[]);var n=this.texturePool[r].pop();return n||(n=this.createTexture(t,e)),n.filterPoolKey=r,n.setResolution(i),n},Ee.prototype.getFilterTexture=function(t,e){var i=this.getOptimalTexture(t.width,t.height,e||t.resolution);return i.filterFrame=t.filterFrame,i},Ee.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},Ee.prototype.returnFilterTexture=function(t){this.returnTexture(t)},Ee.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var i=this.texturePool[e];if(i)for(var r=0;r0&&t.height>0,i)for(var r=0;r1){for(var u=0;u=0;--r)t[r]=i[r]||null,t[r]&&(t[r]._batchLocation=r)},e.prototype.boundArray=function(t,e,i,r){for(var n=t.elements,s=t.ids,o=t.count,a=0,h=0;h=0&&l=w.WEBGL2&&(i=t.getContext("webgl2",e)),i)this.webGLVersion=2;else if(this.webGLVersion=1,!(i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),i},e.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBKIT_WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.run(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")},Object.defineProperties(e.prototype,i),e}(pe),Xe=function(t){function e(e){t.call(this,e),this.managedFramebuffers=[],this.unknownFramebuffer=new ge(10,10)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={size:{configurable:!0}};return e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new At,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;k.PREFER_ENV===w.WEBGL_LEGACY&&(e=null,i=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),i||(this.writeDepthTexture=!1)}},e.prototype.bind=function(t,e){var i=this.gl;if(t){var r=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,r.framebuffer)),r.dirtyId!==t.dirtyId&&(r.dirtyId=t.dirtyId,r.dirtyFormat!==t.dirtyFormat?(r.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):r.dirtySize!==t.dirtySize&&(r.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var n=0;n1&&e.drawBuffers(n),t.depthTexture)&&this.writeDepthTexture){var a=t.depthTexture;this.renderer.texture.bind(a,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a._glTextures[this.CONTEXT_UID].texture,0)}i.stencil||!t.stencil&&!t.depth||(i.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,i.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,i.stencil))},e.prototype.disposeFramebuffer=function(t,e){var i=t.glFramebuffers[this.CONTEXT_UID],r=this.gl;if(i){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(r.deleteFramebuffer(i.framebuffer),i.stencil&&r.deleteRenderbuffer(i.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var i=0;i=r.data.byteLength)e.bufferSubData(s,0,r.data);else{var o=r.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;n.byteLength=r.data.byteLength,e.bufferData(s,r.data,o)}}}},e.prototype.checkCompatibility=function(t,e){var i=t.attributes,r=e.attributeData;for(var n in r)if(!i[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},e.prototype.getSignature=function(t,e){var i=t.attributes,r=e.attributeData,n=["g",t.id];for(var s in i)r[s]&&n.push(s);return n.join("-")},e.prototype.initGeometryVao=function(t,e){this.checkCompatibility(t,e);var i=this.gl,r=this.CONTEXT_UID,n=this.getSignature(t,e),s=t.glVertexArrayObjects[this.CONTEXT_UID],o=s[n];if(o)return s[e.id]=o,o;var a=t.buffers,h=t.attributes,u={},l={};for(var c in a)u[c]=0,l[c]=0;for(var d in h)!h[d].size&&e.attributeData[d]?h[d].size=e.attributeData[d].size:h[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),u[h[d].buffer]+=h[d].size*Ye[h[d].type];for(var p in h){var f=h[p],g=f.size;void 0===f.stride&&(u[f.buffer]===g*Ye[f.type]?f.stride=0:f.stride=u[f.buffer]),void 0===f.start&&(f.start=l[f.buffer],l[f.buffer]+=g*Ye[f.type])}o=i.createVertexArray(),i.bindVertexArray(o);for(var v=0;v=w.WEBGL2&&(t=e.getContext("webgl2",{})),t||((t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?t.getExtension("WEBGL_draw_buffers"):t=null),ti=t}return ti}function ii(t,e,i){if("precision"!==t.substring(0,9)){var r=e;return e===M.HIGH&&i!==M.HIGH&&(r=M.MEDIUM),"precision "+r+" float;\n"+t}return i!==M.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var ri={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function ni(t){return ri[t]}var si=null,oi={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray"};function ai(t,e){if(!si){var i=Object.keys(oi);si={};for(var r=0;r0&&(e+="\nelse "),ie.name?1:-1});for(var u=0;u0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,i=this.renderer.projection,r=i.transform,n=i.sourceFrame,s=i.destinationFrame,o=e?e.resolution:this.renderer.resolution,a=(t.x-n.x)*o+s.x,h=(t.y-n.y)*o+s.y,u=t.width*o,l=t.height*o;r&&(a+=r.tx*o,h+=r.ty*o),e||(h=this.renderer.height-l-h),this.renderer.gl.scissor(a,h,u,l)},e}(Oi),Di=function(t){function e(e){t.call(this,e),this.glConst=WebGLRenderingContext.STENCIL_TEST}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,i=this.renderer.gl,r=t._stencilCounter;0===r&&(this.renderer.framebuffer.forceStencil(),i.enable(i.STENCIL_TEST)),t._stencilCounter++,i.colorMask(!1,!1,!1,!1),i.stencilFunc(i.EQUAL,r,this._getBitwiseMask()),i.stencilOp(i.KEEP,i.KEEP,i.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<>=1,i++;this.stateId=t.data}for(var r=0;rthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,i=!1,r=0;rthis.maxIdle&&(t.destroyTexture(n,!0),e[r]=null,i=!0)}if(i){for(var s=0,o=0;o=0;i--)this.unload(t.children[i])},e}(pe),Vi=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121},Wi=function(t){function e(e){t.call(this,e),this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new oe}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var i=0;i=1:e.mipmap=0,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=P.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,e){var i=this.gl;if(e.mipmap&&i.generateMipmap(t.target),i.texParameteri(t.target,i.TEXTURE_WRAP_S,e.wrapMode),i.texParameteri(t.target,i.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){i.texParameteri(t.target,i.TEXTURE_MIN_FILTER,t.scaleMode?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&t.anisotropicLevel>0&&t.scaleMode===A.LINEAR){var n=Math.min(t.anisotropicLevel,i.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else i.texParameteri(t.target,i.TEXTURE_MIN_FILTER,t.scaleMode?i.LINEAR:i.NEAREST);i.texParameteri(t.target,i.TEXTURE_MAG_FILTER,t.scaleMode?i.LINEAR:i.NEAREST)},e}(pe),qi=new mt,Ki=function(t){function e(i){void 0===i&&(i={}),t.call(this,"WebGL",i),i=this.options,this.type=x.WEBGL,this.gl=null,this.CONTEXT_UID=0,this.runners={destroy:new $t("destroy"),contextChange:new $t("contextChange",1),reset:new $t("reset"),update:new $t("update"),postrender:new $t("postrender"),prerender:new $t("prerender"),resize:new $t("resize",2)},this.globalUniforms=new Le({projectionMatrix:new mt},!0),this.addSystem(Pi,"mask").addSystem(He,"context").addSystem(zi,"state").addSystem(Ui,"shader").addSystem(Wi,"texture").addSystem(Ve,"geometry").addSystem(Xe,"framebuffer").addSystem(Ii,"scissor").addSystem(Di,"stencil").addSystem(Mi,"projection").addSystem(Yi,"textureGC").addSystem(Ue,"filter").addSystem(ki,"renderTexture").addSystem(Ge,"batch"),this.initPlugins(e.__plugins),i.context?this.context.initFromContext(i.context):this.context.initFromOptions({alpha:this.transparent,antialias:i.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:i.preserveDrawingBuffer,powerPreference:this.options.powerPreference}),this.renderingToScreen=!0,function(t){var e;if(!H){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var i=["\n %c %c %c PixiJS "+X+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=window.console).log.apply(e,i)}else window.console&&window.console.log("PixiJS "+X+" - "+t+" - http://www.pixijs.com/");H=!0}}(2===this.context.webGLVersion?"WebGL 2":"WebGL 1"),this.resize(this.options.width,this.options.height)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t){if(void 0===j&&(j=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:k.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!i||!i.getContextAttributes().stencil);if(i){var n=i.getExtension("WEBGL_lose_context");n&&n.loseContext()}return i=null,r}catch(t){return!1}}()),j)return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.addSystem=function(t,e){e||(e=t.name);var i=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var r in this[e]=i,this.runners)this.runners[r].add(i);return this},e.prototype.render=function(t,e,i,r,n){if(this.renderingToScreen=!e,this.runners.prerender.run(),this.emit("prerender"),this.projection.transform=r,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var s=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=s}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==i?i:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.run(),this.projection.transform=null,this.emit("postrender")}},e.prototype.resize=function(e,i){t.prototype.resize.call(this,e,i),this.runners.resize.run(e,i)},e.prototype.reset=function(){return this.runners.reset.run(),this},e.prototype.clear=function(){this.framebuffer.bind(),this.framebuffer.clear()},e.prototype.destroy=function(e){for(var i in this.runners.destroy.run(),this.runners)this.runners[i].destroy();t.prototype.destroy.call(this,e),this.gl=null},e.registerPlugin=function(t,i){e.__plugins=e.__plugins||{},e.__plugins[t]=i},e}(function(t){function e(e,i){t.call(this),(i=Object.assign({},k.RENDER_OPTIONS,i)).roundPixels&&(k.ROUND_PIXELS=i.roundPixels,nt("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),this.options=i,this.type=x.UNKNOWN,this.screen=new At(0,0,i.width,i.height),this.view=i.view||document.createElement("canvas"),this.resolution=i.resolution||k.RESOLUTION,this.transparent=i.transparent,this.autoDensity=i.autoDensity||i.autoResize||!1,this.preserveDrawingBuffer=i.preserveDrawingBuffer,this.clearBeforeRender=i.clearBeforeRender,this._backgroundColor=0,this._backgroundColorRgba=[0,0,0,0],this._backgroundColorString="#000000",this.backgroundColor=i.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent=new Rt,this._lastObjectRendered=this._tempDisplayObjectParent,this.plugins={}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={width:{configurable:!0},height:{configurable:!0},backgroundColor:{configurable:!0}};return e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},i.width.get=function(){return this.view.width},i.height.get=function(){return this.view.height},e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,i,r){0===(r=r||t.getLocalBounds()).width&&(r.width=1),0===r.height&&(r.height=1);var n=be.create(0|r.width,0|r.height,e,i);return qi.tx=-r.x,qi.ty=-r.y,this.render(t,n,!1,qi,!!t.parent),n},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.plugins=null,this.type=x.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoDensity=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},i.backgroundColor.get=function(){return this._backgroundColor},i.backgroundColor.set=function(t){this._backgroundColor=t,this._backgroundColorString=Y(t),z(t,this._backgroundColorRgba)},Object.defineProperties(e.prototype,i),e}(L.a));var Zi="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",$i=function(){this.texArray=null,this.blend=0,this.type=E.TRIANGLES,this.start=0,this.size=0,this.data=null},Ji=function(){this.elements=[],this.ids=[],this.count=0};Ji.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,i=this.MAX_TEXTURES,r=e._textureArrayPool,n=this.renderer.batch,s=this._tempBoundTextures,o=this.renderer.textureGC.count,a=++oe._globalBatch,h=0,u=r[0],l=0;n.copyBoundTextures(s,i);for(var c=0;c=i&&(n.boundArray(u,s,a,i),this.buildDrawCalls(u,l,c),l=c,u=r[++h],++a),d._batchEnabled=a,d.touched=o,u.elements[u.count++]=d)}u.count>0&&(n.boundArray(u,s,a,i),this.buildDrawCalls(u,l,this._bufferSize),++h,++a);for(var p=0;p0&&(e+="\nelse "),i0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?r=200:1223===r&&(r=204),2===(r/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=i,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(i),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var n=new DOMParser;this.data=n.parseFromString(i,"text/xml")}else{var s=document.createElement("div");s.innerHTML=i,this.data=s}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||i;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,Cr||(Cr=document.createElement("a")),Cr.href=t;var i=!(t=gr()(Cr.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&i&&r===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var i=t.indexOf("/");e=t.substring(i+1,t.indexOf(";",i))}else{var r=t.indexOf("?"),n=t.indexOf("#"),s=Math.min(r>-1?r:t.length,n>-1?n:t.length);e=(t=t.substring(0,s)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},Tr(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function Or(t,e,i){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=i)}function Ir(t){return t.toString().replace("object ","")}Pr.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE: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.XHR_RESPONSE_TYPE.BLOB,tga:Pr.XHR_RESPONSE_TYPE.BLOB,json:Pr.XHR_RESPONSE_TYPE.JSON,text:Pr.XHR_RESPONSE_TYPE.TEXT,txt:Pr.XHR_RESPONSE_TYPE.TEXT,ttf:Pr.XHR_RESPONSE_TYPE.BUFFER,otf:Pr.XHR_RESPONSE_TYPE.BUFFER},Pr.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var Dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var Mr=window.URL||window.webkitURL;var Nr={caching:function(t,e){var i=this;br[t.url]?(t.data=br[t.url],t.complete()):t.onComplete.once(function(){return br[i.url]=i.data}),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===Pr.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var i=Mr.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=i,t.type=Pr.TYPE.IMAGE,void(t.data.onload=function(){Mr.revokeObjectURL(i),t.data.onload=null,e()})}}else{var r=t.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return t.data=new Image,t.data.src="data:"+r+";base64,"+function(t){for(var e="",i=0;i>2,n[1]=(3&r[0])<<4|r[1]>>4,n[2]=(15&r[1])<<2|r[2]>>6,n[3]=63&r[2],i-(t.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(var o=0;oi&&!t.autoResize&&(s=i);var o=t._buffers;o||(o=t._buffers=this.generateBuffers(t));var a=e[0]._texture.baseTexture;this.state.blendMode=W(t.blendMode,a.alphaMode),n.state.set(this.state);var h,u,l,c,d=n.gl,p=t.worldTransform.copyTo(this.tempMatrix);p.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=p.toArray(!0),this.shader.uniforms.uColor=(h=t.tintRgb,u=t.worldAlpha,l=this.shader.uniforms.uColor,c=a.alphaMode,l=l||new Float32Array(4),c||void 0===c?(l[0]=h[0]*u,l[1]=h[1]*u,l[2]=h[2]*u):(l[0]=h[0],l[1]=h[1],l[2]=h[2]),l[3]=u,l),this.shader.uniforms.uSampler=a,this.renderer.shader.bind(this.shader);for(var f=!1,g=0,v=0;gr&&(m=r),v>=o.length&&o.push(this._generateOneMoreBuffer(t));var y=o[v];y.uploadDynamic(e,g,m);var _=t._bufferUpdateIDs[v]||0;(f=f||y._updateID<_)&&(y._updateID=t._updateID,y.uploadStatic(e,g,m)),n.geometry.bind(y.geometry),d.drawElements(d.TRIANGLES,6*m,d.UNSIGNED_SHORT,0)}}},e.prototype.generateBuffers=function(t){for(var e=[],i=t._maxSize,r=t._batchSize,n=t._properties,s=0;s0,u=a.alpha,l=u<1&&h?q(a._tintRGB,u):a._tintRGB+(255*u<<24);r[s]=l,r[s+n]=l,r[s+2*n]=l,r[s+3*n]=l,s+=4*n}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(Be),zr={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||Number.isNaN(t))return e;var i=Math.ceil(t/this.maxLength);return ithis.maxSegments&&(i=this.maxSegments),i}},Yr=function(){this.reset()};Yr.prototype.clone=function(){var t=new Yr;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},Yr.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=we.WHITE,this.matrix=null,this.visible=!1},Yr.prototype.destroy=function(){this.texture=null,this.matrix=null};var Vr={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var i=t.points,r=t.holes,n=e.points,s=e.indices;if(i.length>=6){for(var o=[],a=0;a196*v*v?(A=E-S,P=T-C,O=Math.sqrt(A*A+P*P),A/=O,P/=O,A*=v,P*=v,d.push(_-A*D,w-P*D),d.push(_+A*M,w+P*M),d.push(_-A*M*D,w-P*D),f++):(d.push(_+(j-_)*D,w+(H-w)*D),d.push(_-(j-_)*M,w-(H-w)*M))}}m=r[2*(p-2)],y=r[2*(p-2)+1],_=r[2*(p-1)],w=r[2*(p-1)+1],E=-(y-w),T=m-_,O=Math.sqrt(E*E+T*T),E/=O,T/=O,E*=v,T*=v,d.push(_-E*D,w-T*D),d.push(_+E*M,w+T*M);for(var z=e.indices,Y=0;Yl*a}},tn.arc=function(t,e,i,r,n,s,o,a,h){for(var u=o-s,l=zr._segmentsCount(Math.abs(u)*n,40*Math.ceil(Math.abs(u)/ft)),c=u/(2*l),d=2*c,p=Math.cos(c),f=Math.sin(c),g=l-1,v=g%1/g,m=0;m<=g;++m){var y=c+s+d*(m+v*m),_=Math.cos(y),w=-Math.sin(y);h.push((p*_+f*w)*n+i,(p*-w+f*_)*n+r)}};var en=function(){};en.curveLength=function(t,e,i,r,n,s,o,a){for(var h=0,u=0,l=0,c=0,d=0,p=0,f=0,g=0,v=0,m=0,y=0,_=t,w=e,x=1;x<=10;++x)m=_-(g=(f=(p=(d=1-(u=x/10))*d)*d)*t+3*p*u*i+3*d*(l=u*u)*n+(c=l*u)*o),y=w-(v=f*e+3*p*u*r+3*d*l*s+c*a),_=g,w=v,h+=Math.sqrt(m*m+y*y);return h},en.curveTo=function(t,e,i,r,n,s,o){var a=o[o.length-2],h=o[o.length-1];o.length-=2;var u=zr._segmentsCount(en.curveLength(a,h,t,e,i,r,n,s)),l=0,c=0,d=0,p=0,f=0;o.push(a,h);for(var g=1,v=0;g<=u;++g)d=(c=(l=1-(v=g/u))*l)*l,f=(p=v*v)*v,o.push(d*a+3*c*v*t+3*l*p*i+f*n,d*h+3*c*v*e+3*l*p*r+f*s)};var rn=function(){};rn.curveLength=function(t,e,i,r,n,s){var o=t-2*i+n,a=e-2*r+s,h=2*i-2*t,u=2*r-2*e,l=4*(o*o+a*a),c=4*(o*h+a*u),d=h*h+u*u,p=2*Math.sqrt(l+c+d),f=Math.sqrt(l),g=2*l*f,v=2*Math.sqrt(d),m=c/f;return(g*p+f*c*(p-v)+(4*d*l-c*c)*Math.log((2*f+m+p)/(m+v)))/(4*g)},rn.curveTo=function(t,e,i,r,n){for(var s=n[n.length-2],o=n[n.length-1],a=zr._segmentsCount(rn.curveLength(s,o,t,e,i,r)),h=0,u=0,l=1;l<=a;++l){var c=l/a;h=s+(t-s)*c,u=o+(e-o)*c,n.push(h+(t+(i-t)*c-h)*c,u+(e+(r-e)*c-u)*c)}};var nn=function(){this.reset()};nn.prototype.begin=function(t,e,i){this.reset(),this.style=t,this.start=e,this.attribStart=i},nn.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},nn.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0};var sn={};sn[ct.POLY]=Vr,sn[ct.CIRC]=Wr,sn[ct.ELIP]=Wr,sn[ct.RECT]=qr,sn[ct.RREC]=Kr;var on=[],an=[],hn=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this.shape=t,this.lineStyle=i,this.fillStyle=e,this.matrix=r,this.type=t.type,this.points=[],this.holes=[]};hn.prototype.clone=function(){return new hn(this.shape,this.fillStyle,this.lineStyle,this.matrix)},hn.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null};var un=new dt,ln=new Mt,cn=function(t){function e(){t.call(this),this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.dirty=0,this.batchDirty=-1,this.cacheDirty=-1,this.clearDirty=0,this.drawCalls=[],this.batches=[],this.shapeIndex=0,this._bounds=new Mt,this.boundsDirty=-1,this.boundsPadding=0,this.batchable=!1,this.indicesUint16=null,this.uvsFloat32=null,this.closePointEps=1e-4}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={bounds:{configurable:!0}};return i.bounds.get=function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,i,r){var n=new hn(t,e,i,r);return this.graphicsData.push(n),this.dirty++,this},e.prototype.drawHole=function(t,e){if(!this.graphicsData.length)return null;var i=new hn(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=r.lineStyle,r.holes.push(i),this.dirty++,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var i=0;i0&&(r=(i=this.batches[this.batches.length-1]).style);for(var n=this.shapeIndex;n0&&((n=an.pop())||((n=new $i).textures=new Ji),this.drawCalls.push(n)),n.start=l,n.size=0,n.textures.count=0,n.type=u),f.touched=1,f._batchEnabled=t,f._batchLocation=s,f.wrapMode=10497,n.textures.elements[n.textures.count++]=f,s++)),n.size+=d.size,l+=d.size,a=f._batchLocation,this.addColors(i,p.color,p.alpha,d.attribSize),this.addTextureIds(r,a,d.attribSize)}oe._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,i=this.colors,r=this.textureIds,n=new ArrayBuffer(3*t.length*4),s=new Float32Array(n),o=new Uint32Array(n),a=0,h=0;h>16)+(65280&e)+((255&e)<<16),i);r-- >0;)t.push(n)},e.prototype.addTextureIds=function(t,e,i){for(;i-- >0;)t.push(e)},e.prototype.addUvs=function(t,e,i,r,n,s){for(var o=0,a=e.length,h=i.frame;o0&&t.alpha>0;return h?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:h},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new It,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new It,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,r=i[i.length-2],n=i[i.length-1];return r===t&&n===e||i.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,i,r){this._initCurve();var n=this.currentPath.points;return 0===n.length&&this.moveTo(0,0),rn.curveTo(t,e,i,r,n),this},e.prototype.bezierCurveTo=function(t,e,i,r,n,s){return this._initCurve(),en.curveTo(t,e,i,r,n,s,this.currentPath.points),this},e.prototype.arcTo=function(t,e,i,r,n){this._initCurve(t,e);var s=this.currentPath.points,o=tn.curveTo(t,e,i,r,n,s);if(o){var a=o.cx,h=o.cy,u=o.radius,l=o.startAngle,c=o.endAngle,d=o.anticlockwise;this.arc(a,h,u,l,c,d)}return this},e.prototype.arc=function(t,e,i,r,n,s){if(void 0===s&&(s=!1),r===n)return this;if(!s&&n<=r?n+=ft:s&&r<=n&&(r+=ft),0===n-r)return this;var o=t+Math.cos(r)*i,a=e+Math.sin(r)*i,h=this.geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var l=Math.abs(u[u.length-2]-o),c=Math.abs(u[u.length-1]-a);l0;return s?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:s},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,i,r){return this.drawShape(new At(t,e,i,r))},e.prototype.drawRoundedRect=function(t,e,i,r,n){return this.drawShape(new Dt(t,e,i,r,n))},e.prototype.drawCircle=function(t,e,i){return this.drawShape(new Pt(t,e,i))},e.prototype.drawEllipse=function(t,e,i,r){return this.drawShape(new Ot(t,e,i,r))},e.prototype.drawPolygon=function(t){var e=arguments,i=t,r=!0;if(i.points&&(r=i.closeStroke,i=i.points),!Array.isArray(i)){i=new Array(arguments.length);for(var n=0;n>16&255)/255*n,s.tint[1]=(r>>8&255)/255*n,s.tint[2]=(255&r)/255*n,s.tint[3]=n,t.shader.bind(e),t.geometry.bind(i,e),t.state.set(this.state);for(var a=0,h=o.length;a>16)+(65280&n)+((255&n)<<16)}}},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID;for(var t=this.transform.worldTransform,e=t.a,i=t.b,r=t.c,n=t.d,s=t.tx,o=t.ty,a=this.geometry.points,h=this.vertexData,u=0,l=0;l=r&&vn.x=n&&vn.y>16)+(65280&t)+((255&t)<<16)},i.texture.get=function(){return this._texture},i.texture.set=function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||we.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},Object.defineProperties(e.prototype,i),e}(Rt),_n=0,wn={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:_n,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},xn=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],bn=function(t){this.styleID=0,this.reset(),Cn(this,t,t)},En={align:{configurable:!0},breakWords:{configurable:!0},dropShadow:{configurable:!0},dropShadowAlpha:{configurable:!0},dropShadowAngle:{configurable:!0},dropShadowBlur:{configurable:!0},dropShadowColor:{configurable:!0},dropShadowDistance:{configurable:!0},fill:{configurable:!0},fillGradientType:{configurable:!0},fillGradientStops:{configurable:!0},fontFamily:{configurable:!0},fontSize:{configurable:!0},fontStyle:{configurable:!0},fontVariant:{configurable:!0},fontWeight:{configurable:!0},letterSpacing:{configurable:!0},lineHeight:{configurable:!0},leading:{configurable:!0},lineJoin:{configurable:!0},miterLimit:{configurable:!0},padding:{configurable:!0},stroke:{configurable:!0},strokeThickness:{configurable:!0},textBaseline:{configurable:!0},trim:{configurable:!0},whiteSpace:{configurable:!0},wordWrap:{configurable:!0},wordWrapWidth:{configurable:!0}};function Tn(t){return"number"==typeof t?Y(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function Sn(t){if(Array.isArray(t)){for(var e=0;e=0;i--){var r=e[i].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&xn.indexOf(r)<0&&(r='"'+r+'"'),e[i]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},Object.defineProperties(bn.prototype,En);var An=function(t,e,i,r,n,s,o,a,h){this.text=t,this.style=e,this.width=i,this.height=r,this.lines=n,this.lineWidths=s,this.lineHeight=o,this.maxLineWidth=a,this.fontProperties=h};An.measureText=function(t,e,i,r){void 0===r&&(r=An._canvas),i=null==i?e.wordWrap:i;var n=e.toFontString(),s=An.measureFont(n);0===s.fontSize&&(s.fontSize=e.fontSize,s.ascent=e.fontSize);var o=r.getContext("2d");o.font=n;for(var a=(i?An.wordWrap(t,e,r):t).split(/(?:\r\n|\r|\n)/),h=new Array(a.length),u=0,l=0;lp)if(""!==s&&(o+=An.addLine(s),s="",n=0),An.canBreakWords(v,e.breakWords))for(var w=An.wordWrapSplit(v),x=0;xp&&(o+=An.addLine(s),d=!1,s="",n=0),s+=b,n+=C}else{s.length>0&&(o+=An.addLine(s),s="",n=0);var A=g===f.length-1;o+=An.addLine(v,!A),d=!1,s="",n=0}else _+n>p&&(d=!1,o+=An.addLine(s),s="",n=0),(s.length>0||!An.isBreakingSpace(v)||d)&&(s+=v,n+=_)}return o+=An.addLine(s,!1)},An.addLine=function(t,e){return void 0===e&&(e=!0),t=An.trimRight(t),t=e?t+"\n":t},An.getFromCache=function(t,e,i,r){var n=i[t];if(void 0===n){var s=t.length*e;n=r.measureText(t).width+s,i[t]=n}return n},An.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},An.collapseNewlines=function(t){return"normal"===t},An.trimRight=function(t){if("string"!=typeof t)return"";for(var e=t.length-1;e>=0;e--){var i=t[e];if(!An.isBreakingSpace(i))break;t=t.slice(0,-1)}return t},An.isNewline=function(t){return"string"==typeof t&&An._newlines.indexOf(t.charCodeAt(0))>=0},An.isBreakingSpace=function(t){return"string"==typeof t&&An._breakingSpaces.indexOf(t.charCodeAt(0))>=0},An.tokenize=function(t){var e=[],i="";if("string"!=typeof t)return e;for(var r=0;ro;--c){for(var g=0;g0};var Mn=function(t){var e=this;this.limiter=new Dn(k.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){e.queue&&e.prepareItems()},this.registerFindHook(Un),this.registerFindHook(Bn),this.registerFindHook(Nn),this.registerFindHook(kn),this.registerFindHook(Rn),this.registerUploadHook(Ln),this.registerUploadHook(Fn)};function Nn(t,e){var i=!1;if(t&&t._textures&&t._textures.length)for(var r=0;r=0;r--)this.add(t.children[r]);return this},Mn.prototype.destroy=function(){this.ticking&&Bt.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null};var Gn=function(t){function e(e){t.call(this,e),this.uploadHookHelper=this.renderer,this.registerFindHook(Xn),this.registerUploadHook(jn),this.registerUploadHook(Hn)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Mn);function jn(t,e){return e instanceof oe&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function Hn(t,e){if(!(e instanceof gn))return!1;var i=e.geometry;e.finishPoly(),i.updateBatches();for(var r=i.batches,n=0;n0&&r.x>h&&(Q(n,1+p-++g,1+m-p),m=p,p=-1,s.push(f),c=Math.max(c,f),d++,r.x=0,r.y+=t.lineHeight,u=null))}else s.push(l),c=Math.max(c,l),++d,++g,r.x=0,r.y+=t.lineHeight,u=null}var x=o.charAt(o.length-1);"\r"!==x&&"\n"!==x&&(/(?:\s)/.test(x)&&(l=f),s.push(l),c=Math.max(c,l));for(var b=[],E=0;E<=d;E++){var T=0;"right"===this._font.align?T=c-s[E]:"center"===this._font.align&&(T=(c-s[E])/2),b.push(T)}for(var S=n.length,C=this.tint,A=0;A=0?t:16777215,this.dirty=!0},i.align.get=function(){return this._font.align},i.align.set=function(t){this._font.align=t||"left",this.dirty=!0},i.anchor.get=function(){return this._anchor},i.anchor.set=function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)},i.font.get=function(){return this._font},i.font.set=function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)},i.text.get=function(){return this._text},i.text.set=function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},i.maxWidth.get=function(){return this._maxWidth},i.maxWidth.set=function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)},i.maxLineHeight.get=function(){return this.validate(),this._maxLineHeight},i.textWidth.get=function(){return this.validate(),this._textWidth},i.letterSpacing.get=function(){return this._letterSpacing},i.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)},i.textHeight.get=function(){return this.validate(),this._textHeight},e.registerFont=function(t,i){var r={},n=t.getElementsByTagName("info")[0],s=t.getElementsByTagName("common")[0],o=t.getElementsByTagName("page"),a=lt(o[0].getAttribute("file"),k.RESOLUTION),h={};r.font=n.getAttribute("face"),r.size=parseInt(n.getAttribute("size"),10),r.lineHeight=parseInt(s.getAttribute("lineHeight"),10)/a,r.chars={},i instanceof we&&(i=[i]);for(var u=0;u>16&255)/255,o=(i>>8&255)/255,a=(255&i)/255,h=((r=r||3375104)>>16&255)/255,u=(r>>8&255)/255,l=(255&r)/255,c=[.3,.59,.11,0,0,s,o,a,t=t||.2,0,h,u,l,e=e||.15,0,s-h,o-u,a-l,0,0];this._loadMatrix(c,n)},e.prototype.night=function(t,e){var i=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.predator=function(t,e){var i=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},i.matrix.get=function(){return this.uniforms.m},i.matrix.set=function(t){this.uniforms.m=t},i.alpha.get=function(){return this.uniforms.uAlpha},i.alpha.set=function(t){this.uniforms.uAlpha=t},Object.defineProperties(e.prototype,i),e}(xi);is.prototype.grayscale=is.prototype.greyscale; +/*! + * @pixi/filter-displacement - v5.2.1 + * Compiled Tue, 28 Jan 2020 23:33:11 UTC + * + * @pixi/filter-displacement is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +var rs=new mt;Nt.prototype._cacheAsBitmap=!1,Nt.prototype._cacheData=!1;var ns=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(Nt.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new ns),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),Nt.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},Nt.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var i=this.getLocalBounds().clone();if(this.filters){var r=this.filters[0].padding;i.pad(r)}i.ceil(k.RESOLUTION);var n=t.renderTexture.current,s=t.renderTexture.sourceFrame,o=t.projection.transform,a=be.create(i.width,i.height),h="cacheAsBitmap_"+it();this._cacheData.textureCacheId=h,oe.addToCache(a.baseTexture,h),we.addToCache(a,h);var u=rs;u.tx=-i.x,u.ty=-i.y,this.transform.worldTransform.identity(),this.render=this._cacheData.originalRender,t.render(this,a,!0,u,!0),t.projection.transform=o,t.renderTexture.bind(n,s),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var l=new yn(a);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-i.x/i.width,l.anchor.y=-i.y/i.height,l.alpha=e,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}},Nt.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},Nt.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(),i=this.alpha;this.alpha=1;var r=t.context;e.ceil(k.RESOLUTION);var n=be.create(e.width,e.height),s="cacheAsBitmap_"+it();this._cacheData.textureCacheId=s,oe.addToCache(n.baseTexture,s),we.addToCache(n,s);var o=rs;this.transform.localTransform.copyTo(o),o.invert(),o.tx-=e.x,o.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,n,!0,o,!1),t.context=r,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var a=new yn(n);a.transform.worldTransform=this.transform.worldTransform,a.anchor.x=-e.x/e.width,a.anchor.y=-e.y/e.height,a.alpha=i,a._bounds=this._bounds,this._cacheData.sprite=a,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=a.containsPoint.bind(a)}},Nt.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._lastBoundsID=this._boundsID},Nt.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},Nt.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,oe.removeFromCache(this._cacheData.textureCacheId),we.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},Nt.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}, +/*! + * @pixi/mixin-get-child-by-name - v5.2.1 + * Compiled Tue, 28 Jan 2020 23:33:11 UTC + * + * @pixi/mixin-get-child-by-name is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +Nt.prototype.name=null,Rt.prototype.getChildByName=function(t){for(var e=0;e({menubg:t(0,0,89,64),spades:{shine:e(0,64,32,32,7)}}),ls=(t,e,i)=>({checkbox:e(0,0,128,64,2)}),cs=(t,e,i)=>({rbutton:i(144,0,16,32/3),wbutton:t(96,0,48,32),menubg9:i(48,0,16,16),menubg:t(48,0,48),undo:t(0,0,32),over:t(0,32,32),menu:{idle:e(0,64,32,32,1,1),open:e(0,64,32,32,6,1),close:e(160,64,32,32,6,-1)},checkbox:{onoff:e(0,192,64,32,2),off:t(0,192,64,32),on:t(64,192,64,32)},select:{onoff:e(0,224,32,32,2)},back:t(0,96,32),pause:t(0,128,32),play:t(0,160,32)}),ds=t=>({front:t(0,0,64,89),spades:t(0,96,32),hearts:t(0,128,32),clubs:t(0,160,32),diamonds:t(0,192,32),back:t(0,224,64,89),highlight:t(0,320,64,89),shadow:t(64,320,64,89)}),ps=(t,e)=>{let i=(e,i,r,n)=>gs(t,e,i,r,n),r={};for(let t in e){let n=e[t];r[t]=i(n.x,n.y,n.w,n.h)}return r},fs=(t,e,i,r,n)=>{let s=(e,i,r,n)=>gs(t,e,i,r,n);return[s(e,i,r,n),s(e+r,i,r,n),s(e+2*r,i,r,n),s(e,i+n,r,n),s(e+r,i+n,r,n),s(e+2*r,i+n,r,n),s(e,i+2*n,r,n),s(e+r,i+2*n,r,n),s(e+2*r,i+2*n,r,n)]},gs=(t,e,i,r,n=r)=>{let s=new At(e,i,r,n),o=new we(t);return o.frame=s,o},vs=(t,e,i,r,n,s,o=1)=>{let a=[];for(let h=0;h({sRank:bs[e],color:Es[t],suit:t,rank:e}),Ss=t=>xs.map(e=>Ts(t,e)),Cs=ws.flatMap(Ss),As=(t=Cs)=>new Os(t),Ps=(t=Cs)=>new Os(t.concat(t.slice(0)));function Os(t){let e;this.test=()=>{e=t.slice(0)},this.shuffle=()=>{e=function(t){for(let e=t.length-1;e>0;e--){const i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}return t}(t.slice(0))},this.debug=()=>{let t=ws.slice(0),i=[];for(let t of e)"ace"===t.rank&&i.push(t.suit);i.sort(),t.sort();for(let e=0;e<4;e++)if(i[e]!==t[e])throw"Bad Deck "+i},this.remaining=()=>e.length,this.draw=()=>e.pop(),this.drawRest=()=>e}function Is(t){return`${t.rank}.${t.suit}`}function Ds(t){return t.map(Is).join(",")}function Ms(t){let[e,i]=t.split(".");return Ts(i,e)}function Ns(t){return""===t?[]:t.split(",").map(Ms)}const ks=[0,1,2,3,4,5,6],Rs=[0,1,2,3],Ls=t=>(t||0===t)&&!(t<0),Fs=(t,e)=>t.color!==e.color&&t.sRank===e.sRank+1,Us=t=>"king"===t.rank;function Bs(t=[],e=[]){let i,r=this.options={};this.front=e,this.hidden=t,this.inProgress=()=>i,this.cutLast=()=>e.pop(),this.cut1=t=>e.splice(t,e.length-t),this.cutInProgress=t=>(i=!0,this.cut1(t)),this.cutInProgressCommit=()=>{i=!1},this.hide1=e=>{e.forEach(e=>t.push(e))},this.add1=t=>{t.forEach(t=>e.push(t))},this.clear=()=>{e=this.front=[],t=this.hidden=[]},this.reveal1=()=>t.pop(),this.unreveal1=()=>{r.dontExtend=!0,e.pop()},this.unreveal2=e=>{r.dontExtend=!1,t.push(e)};const n=()=>e[e.length-1];this.topCard=()=>n(),this.canAdd=t=>{let e=n(),i=t[0];return e?Fs(e,i):Us(i)},this.canReveal=()=>0===e.length&&t.length>0,this.write=()=>{return`${Ds(this.front)};${Ds(this.hidden)}`},this.read=i=>{let[r,n]=i.split(";");e=this.front=Ns(r),t=this.hidden=Ns(n)}}function Gs(t=[]){this.top=()=>t[t.length-1],this.remove=()=>t.pop(),this.clear=()=>{t=[]},this.add=e=>{t.push(e)},this.canRemove=()=>t.length>0,this.canAdd=t=>{if(1!==t.length)return!1;let e=this.top(),i=t[0];return e?function(t,e){return t.suit===e.suit&&t.sRank===e.sRank-1}(e,i):function(t){return"ace"===t.rank}(i)},this.isDone=()=>13===t.length,this.write=()=>Ds(t),this.read=e=>{t=Ns(e)}}function js(){let t,e,i,r=[],n=[];this.options=t=>{let{cardsPerDraw:r}=t;switch(r){case ms:e=1,i=!0;break;case ys:e=1,i=!1;break;case _s:default:e=3,i=!1}},this.init=t=>{r=t,n=[]},this.nbDeck=()=>r.length,this.canShuffle=()=>!i,this.shuffle2=t=>{r=t.reverse()},this.shuffle1=()=>{let t=n;return n=[],t},this.undoShuffle=()=>{n=r.reverse(),r=[]},this.dealOnlyOne=()=>[r.pop()],this.dealOne1=()=>{let t=[];for(let i=0;i{t.forEach(t=>n.push(t))},this.undealOne=()=>{let t=n.pop();r.push(t)},this.undoDraw=e=>{t=!1,n.push(e)},this.draw1=()=>(t=!0,n.pop()),this.drawCancel1=e=>{t=!1,n.push(e)},this.drawCommit1=()=>{t=!1},this.topCard=()=>n[n.length-1],this.showStack3=()=>{let e=t?-2:-3;return n.slice(e,n.length)},this.write=()=>{return`${Ds(r)};${Ds(n)}`},this.read=t=>{let[e,i]=t.split(";");r=Ns(e),n=Ns(i)}}const Hs=(t,e=xs)=>e.map(e=>Ts(t,e)),Xs=Ts("diamonds","king"),zs=Hs("diamonds",xs.slice(0,12)),Ys=Hs("hearts"),Vs=Hs("clubs"),Ws=Hs("spades");function qs(){this.playEnding=function(){let t=function(t){let e=ks.slice(1,ks.length).map(t=>Ks()),i=Ks(t);return[...e,i]}([Xs]),e=[Zs(Ys),Zs(Ws),Zs(Vs),Zs(zs)],i=new js;return function(t,e,i){const r=t=>t.write();let n=t.map(r),s=e.map(r),o=r(i);return`${n.join("!")} ${s.join("!")} ${o}`}(t,e,i)}()}function Ks(t){return new Bs([],t)}function Zs(t){return new Gs(t)}function $s(t,e){for(let i of Object.keys(t))e(i,t[i])}function Js(t,e){let i={};return Object.keys(t).forEach(r=>{i[r]=e(r,t[r])}),i}function Qs(t,e){let i=window.localStorage;const r=e=>i.setItem(t,e),n=e=>{let r=i.getItem(t);return null==r?e:r};this.apply=t=>(null!=t&&r(t),n(e)),this.boolean=t=>(!0!==t&&!1!==t||r(t?"1":"0"),"1"===n(e?"1":"0")),this.remove=()=>(()=>i.removeItem(t))()}function to(){let t={spider:new Qs("showTutorial.spider",!0),solitaire:new Qs("showTutorial.solitaire",!0),freecell:new Qs("showTutorial.freecell",!0)},e={cardsPerDraw:new Qs("solitaire.cardPerDraw",ys)};this.getOptions=()=>({showTutorial:Js(t,(t,e)=>e.boolean()),solitaire:Js(e,(t,e)=>e.apply())}),this.solitaire=()=>Js(e,(t,e)=>e.apply()),this.setSolitaireCardsPerDraw=t=>{e.cardsPerDraw.apply(t)},this.setShowTutorial=(e,i)=>{t[e].boolean(i)}}function eo(){let t={spider:new Qs("play.spider",null),solitaire:new Qs("play.solitaire",null),freecell:new Qs("play.freecell",null)};this.play=(e,i)=>(i&&t[e].apply(i),t[e].apply())}var io=function(t){let e={assetsBase:"assets/images/"};return function t(e,i){for(var r in i)ro(e[r])&&ro(i[r])?t(e[r],i[r]):e[r]=i[r]}(e,t),e};function ro(t){return"object"==typeof t}function no(t){let e,i,r=t.clientWidth,n=t.clientHeight;i=n,(e=Math.max(r,i*(16/9)))>r&&(i=(e=r)/(16/9)),this.width=e,this.height=i,this.aspect=this.width/this.height;const s=this.app=new ur({width:r,height:n});t.appendChild(s.view),this.withApp=t=>t(s),this.bounds=t.getBoundingClientRect();let o=new so,a=new oo;this.resize=()=>{let e=t.clientWidth,i=t.clientHeight,r=window.devicePixelRatio||1;this.pixelRatio=r,this.width=e,this.height=i,this.aspect=this.width/this.height,this.bounds=t.getBoundingClientRect(),s.resizeTo=t,s.resize(),o.clear(),a.publish()},this.addResizeListener=t=>{a.subscribe(t)},this.responsiveBounds=o.setF(this),this.bindResize=()=>(function(t){e=window,i="resize",r=function(t){return e=>{t.resize()}}(t),e.addEventListener(i,r);var e,i,r})(this)}function so(){let t=new WeakMap;this.clear=()=>t=new WeakMap,this.setF=(...e)=>i=>()=>{let r=t.get(i);return void 0===r&&t.set(i,r=i(...e)),r}}function oo(){let t=[];this.publish=()=>{t.forEach(t=>t())},this.subscribe=e=>{t.push(e)}}function ao(t=0,e=t){return[t,e]}function ho(t,e=[]){return e[0]=t[0],e[1]=t[1],e}function uo(t,e){return t[0]===e[0]&&t[1]===e[1]}function lo(t,e){t[0]=Math.max(t[0],e[0]),t[0]=Math.min(t[0],e[1]),t[1]=Math.max(t[1],e[2]),t[1]=Math.min(t[1],e[3])}function co(t){return e=>(e[0]=t(e[0]),e[1]=t(e[1]),e)}const po=co(t=>Math.round(t));function fo(t){return(e=t[0],i=t[1])=>(t[0]=e,t[1]=i,t)}function go(t,e,...i){return t[0]+=e[0],t[1]+=e[1],i.forEach(e=>{t[0]+=e[0],t[1]+=e[1]}),t}function vo(t,e){return t[0]-=e[0],t[1]-=e[1],t}function mo(t,e){return t[0]*=e[0],t[1]*=e[1],t}function yo(t,e){return t[0]/=e[0],t[1]/=e[1],t}function _o(t,e){return t[0]*=e,t[1]*=e,t}function wo(t,e,i){t[0]=e[0]*i,t[1]=e[1]*i}function xo(t,e,i){return t[0]+=e[0]*i,t[1]+=e[1]*i,t}function bo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Eo(t,e){let i=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(i*i+r*r)}function To(t){return _o(t,1/bo(t)),t}function So(t,e){return To(Ao(e,t))}function Co(t,e){return _o(ho(t),e)}function Ao(t,e){return vo(ho(t),e)}function Po(t,e){return go(ho(t),e)}function Oo(t,e){return mo(ho(t),e)}const{vec2:Io}=r;function Do(t){let e=this.data={touches:{}};function i(t,e,i){return t.addEventListener(e,i),()=>t.removeEventListener(e,i)}this.update=t=>{let{current:i,wheel:r}=e;r&&(r.handled?delete e.wheel:r.handled=!0),i&&(i.dpos=Ao(i.epos,i.start),i.tapping&&(i.tapping.handled?delete i.tapping:i.tapping.handled=!0),i.ending&&(i.ending.handled?delete e.current:i.ending.handled=!0))},this.bindTouch=()=>(function(t){const e=[],o=function(t){return function(e){e.preventDefault();const i=n(e);t.current={button:e.button,tapping:{},start:i,epos:i,dpos:Io(0)}}}(t),a=function(t){return function(e){if(t.current){let{dpos:e}=t.current,i=s(e);t.current.ending={swipe:i}}}}(t),h=function(t){return function(e){const i=n(e);t.current&&(t.current.epos=i),t.epos=i}}(t),u=r(t);return["mousedown","touchstart"].forEach(t=>e.push(i(document,t,o))),["mousemove","touchmove"].forEach(t=>e.push(i(document,t,h))),["mouseup","touchend"].forEach(t=>e.push(i(document,t,a))),e.push(i(document,"wheel",u)),()=>{e.forEach(t=>t())}})(this.data);const r=t=>e=>{t.wheel={epos:n(e),y:Math.sign(e.deltaY)}},n=e=>{let i=(t=>t.clientX||0===t.clientX?[t.clientX,t.clientY]:t.touches&&t.targetTouches[0]?[t.targetTouches[0].clientX,t.targetTouches[0].clientY]:void 0)(e),{bounds:r}=t;return[i[0]-r.x,i[1]-r.y]};const s=t=>{let e={};return t[1]<-80?e.up=!0:t[1]>80&&(e.down=!0),t[0]<-80?e.left=!0:t[0]>80&&(e.right=!0),(e.up||e.down||e.left||e.right)&&(e.swiped=!0),e}}function Mo(){return new Rt}function No(t){return new yn(t)}function ko(){let t=[],e=this.c=Mo();this.addChild=(i,r=e)=>{t.push(i),r.addChild(i.container.c)},this.removeChild=(i,r=e)=>{t.splice(t.indexOf(i),1),r.removeChild(i.container.c)},this.vcenter=(t,e=0)=>{let i=.5*t-.5*this.bounds().height;this.moveY(i+e)},this.hcenter=t=>{let e=.5*t-.5*this.bounds().width;this.moveX(e)},this.right=t=>{let e=t-this.bounds().width;this.moveX(e)},this.center=(t,e,i,r)=>{this.hcenter(t,i),this.vcenter(e,r)},this.bottom=t=>{this.moveY(t-this.bounds().height)};let i=!0;this.hideStopUpdate=()=>{i=!1,this.visible(!1)},this.showStartUpdate=()=>{i=!0,this.visible(!0)},this.bounds=()=>e.getBounds(),this.globalPosition=()=>e.getGlobalPosition(),this.move=(t,i)=>{e.position.set(t,i)},this.moveX=t=>{e.position.x=t},this.moveY=t=>{e.position.y=t},this.moveX=t=>{e.position.x=t},this.alpha=t=>e.alpha=t,this.rotation=t=>e.rotation=t,this.scale=(t,i)=>e.scale.set(t,i),this.pivot=(t,i)=>e.pivot.set(t,i),this.visible=t=>e.visible=t,this.mask=t=>e.mask=t,this.update=t=>{i&&this.each(e=>e.update(t))},this.render=()=>{i&&this.each(t=>t.render())},this.each=e=>{t.forEach(e)}}function Ro(t,e){this.A=t,this.B=e;this.Mid=[(t[0]+e[0])/2,(t[1]+e[1])/2];let i=e[0]-t[0],r=e[1]-t[1];this.translate=this.scale=i=>{return new Ro(go(Co(t,1-i),Co(e,i)),go(Co(t,i),Co(e,1-i)))},this.pointFrom=(e,n)=>{return[t[0]+i*e-r*n,t[1]+r*e+i*n]}}function Lo(t,e){return new Ro(t,e)}function Fo(t,e,i,r){return new Uo(t,e,i,r)}function Uo(t,e,i,r){let n,s,o,a,h,u;this.width=i,this.height=r,this.copy=()=>new Uo(t,e,i,r),this.move=(l,c)=>{t=this.x=l,e=this.y=c,n=this.x1=t+i,s=this.y1=e+r,o=this.A=[t,e],a=this.B=[t,s],h=this.C=[n,s],u=this.D=[n,e],this.AB=Lo(o,a),this.BC=Lo(a,h),this.CD=Lo(h,u),this.DA=Lo(u,o)},this.move(t,e),this.contains=i=>ti.x1&&s>i.y1,this.intersects=i=>!(t>i.x1||i.x>n)&&!(e>i.y1||i.y>s),this.containsPoint=(i,r)=>i>t&&ie&&r{t&&t(...e)},Go=t=>new Promise(e=>setTimeout(e,t));function jo(t,e,{onUpdate:i}){let r=0;return n=>{(r+=n)>=e?(t(),r=0):i&&i(r/e)}}const Ho=t=>new zo(t),Xo=()=>new Yo;function zo(t){let e=[];this.apply=e=>e(t),this.set=i=>(t=i(t),e.forEach(e=>e(t)),t),this.mutate=i=>{let r=i(t);return e.forEach(e=>e(t)),r},this.subscribe=t=>e.push(t),this.unsubscribe=t=>e.splice(e.indexOf(t),1),this.log=(t=(t=>t))=>{this.subscribe(e=>console.log(t(e)))}}function Yo(){let t,e,i,r=[];this.begin=n=>(t||(t=new Promise((t,s)=>{e=t,i=s,r.forEach(e=>e.onBegin(n,t,s))}).finally(n=>{t=void 0,e=void 0,i=void 0,r.forEach(t=>Bo(t.onEnd))})),t),this.reject=()=>{i&&i()},this.resolve=t=>{e&&e(t)},this.subfun=t=>this.subscribe({onBegin:t}),this.subscribe=t=>r.push(t),this.unsubscribe=t=>r.splice(r.indexOf(t),1)}const Vo=t=>e=>t,Wo=t=>t,qo=t=>!!t,Ko=t=>!t,Zo=(Vo(!1),Vo(!0),Vo(null));function $o(){let t=this.oView=Ho({}),e=this.oHamburger=Ho({}),i=this.oOptions={showTutorial:{spider:Ho(!1),solitaire:Ho(!1),freecell:Ho(!1)},solitaire:{cardsPerDraw:Ho(null)}};this.init=t=>{n(),r(t.options)},this.userActionSelectGame=t=>{s(t)},this.userActionSelectBack=()=>{o()},this.userActionOptionShowTutorialCheck=t=>{i.showTutorial[t].set(Ko)},this.userActionOptionSoliCardsPerDraw=t=>{i.solitaire.cardsPerDraw.set(e=>t)},this.userActionSelectMenuBar=()=>{let t=e.apply(t=>t.open);a(!t)};const r=t=>{let{showTutorial:e,solitaire:r}=t;$s(e,(t,e)=>{i.showTutorial[t].set(t=>e)}),i.solitaire.cardsPerDraw.set(t=>r.cardsPerDraw)},n=async()=>{u(),a(!1),h("spider")},s=async t=>{h(t)},o=async()=>{u()},a=t=>{e.mutate(e=>{e.open=t})},h=e=>{t.mutate(t=>{t.home=!1,t.game=e})},u=()=>{t.mutate(t=>{t.home=!0,t.game=!1})}}function Jo(t,e,i){this.container=new ko;this.init=t=>{},this.remove=()=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Qo(t,e=t,{yoyo:i=0,onLap:r}){let n=0,s=1,o=i,a=!1;const h=()=>{t!==e?((()=>n=0)(),o=i,s=1,a=!1):(()=>n=1)()},u=()=>{o--,s*=-1,r&&r()};return{update(t){if((n+=t*s)>1){if(n=1,a)return;o>0&&u()}n<0&&(n=0,o>0&&u())},smoothstop(){a=!0},settledRepeat:()=>n>=1&&0===o,settled:(t=1)=>n>=t,progress:(t=1)=>n,both(i,r=i){t=i,e=r,h()},target:t=>((t||0===t)&&(e=t,h()),e),value:i=>((i||0===i)&&(t=i,h()),(()=>t+(e-t)*n)()),easing:i=>(i=>t+(e-t)*i(n))(i)}}const ta={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:(4-2*t)*t-1,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1+--t*t*t*t*t,easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t};function ea(t,e,i){let{x:r,y:n,width:s,height:o,texture:a}=i,h=No(a);const u=()=>{h.position.set(r,n)},l=()=>{h.width=s,h.height=o};let c=this.container=new ko;let d;c.c.addChild(h),l(),u(),this.init=t=>{d=t},this.data=()=>d,this.alpha=t=>{h.alpha=t},this.texture=t=>{h.texture=t},this.rotation=t=>{h.rotation=t},this.anchor=t=>{h.anchor.set(t,t)},this.visible=t=>{h.visible=t},this.height=t=>{o!==t&&(o=t,l())},this.size=(t,e=o)=>{s===t&&o===e||(s=t,o=e,l())},this.y=t=>{n!==t&&(n=t,u())},this.move=(t,e)=>{r===t&&n===e||(r=t,n=e,u())},this.scale=(t,e)=>{c.c.scale.set(t,e)},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function ia(t,e){return Math.round(t/e)*e}function ra(t,...e){t&&t(...e)}function na({onBegin:t,onUpdate:e,onEnd:i},r){let n;return()=>{const{current:s}=r.data;if(s){let{epos:i}=s;ra(n?e:t,i),n=i}else n&&(ra(i,n),n=void 0)}}function sa({onBegin:t,onMove:e,onEnd:i,threshold:r=20},n){let s,o,a="end";return()=>{const{current:h}=n.data;if(h){let{epos:i}=h;if("end"===a)ra(t,i,h),o=i,a="begin",s=i;else if("begin"===a){Eo(o,i)>r&&(a="moving")}else ra(e,i,h),s=i}else"begin"!==a&&"moving"!==a||ra(i,s),a="end"}}function oa({onBegin:t,onUpdate:e,onEnd:i,boundsFn:r},n){let s="end";return()=>{const{current:o}=n.data;if(o){let{epos:n}=o;"end"===s?ha(...n,r())?(ra(t,n),s="running"):s="cancel":"cancel"===s||"running"===s&&(ha(...n,r())?ra(e,n):(ra(i,!1),s="cancel"))}else"running"===s?(ra(i,!0),s="end"):"cancel"===s&&(s="end")}}function aa(t,e,i){return()=>{const{current:r}=e.data;if(r){let{ending:e,epos:n}=r;if(e){let{swipe:{swiped:r}}=e;!r&ha(...n,i())&&t(...n)}}}}const ha=(t,e,i)=>{let r=i.x,n=i.x+i.width,s=i.y,o=s+i.height;return r<=t&&n>t&&s<=e&&o>e};function ua(t,e,i){const{textures:r}=e,n=r.mhud;let s=new ea(this,e,{width:i.width,height:i.height,texture:n.menubg});(this.container=new ko).addChild(s);let o,a=new Qo(0,0,{}),h=new Qo(0,0,{});let u=null;this.init=t=>{u="fading",o=t,a.both(0,1)};const l=()=>{"fading"===u&&a.settled()&&(u="black",h.both(0,1),o&&o()),"black"===u&&h.settled()&&(u="fadingOff",a.both(1,0))};this.update=t=>{a.update(t/500),h.update(t/300),l(),this.container.update(t)},this.render=()=>{let t=a.value();t=ia(t,.2),s.alpha(t),this.container.render()}}function la(t,e,i){let{routes:r}=i,n=new Jo(this,e,i),s=new ua(this,e,i),o=this.container=new ko;let a;o.addChild(n),o.addChild(s),this.init=t=>{};this.route=t=>{let e=r[t];s.init(()=>{(t=>{a&&a.forEach(t=>{t.remove(),n.container.removeChild(t)}),a=t,t.forEach(t=>{n.container.addChild(t),t.init()}),t[1].container.move(i.bar.x,i.bar.y)})(e)})},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function ca(t,e,i){const{textures:r}=e;let n=new ea(this,e,{width:i.width,height:i.height,texture:r.greenbg});(this.container=new ko).addChild(n),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function da(t,e){e={name:"pool",warnLeak:400,...e};const i=(()=>{let t=0;return()=>t++})();let r=[],n=[];this.name=()=>e.name,this.alives=()=>r.length,this.total=()=>n.length+r.length,this.warnLeak=()=>e.warnLeak,this.toString=()=>`[${this.name()} alives: ${this.alives()} deads: ${n.length}]`,this.acquire=(e=(()=>{}))=>{let s;return this.total()>this.warnLeak()&&(console.warn(`possible pool leak at ${this.name()}.`),this.releaseLast()),e(s=n.length>0?n.pop():t(i())),r.push(s),s},this.acquireLimit=(t,e)=>{for(;this.alives(){this.releaseIndex(r.indexOf(t))},this.releaseIndex=t=>{t>-1&&n.push(r.splice(t,1)[0])},this.releaseLast=()=>{this.releaseIndex(0)},this.releaseAll=()=>{n=[...n,...r],r=[]},this.releaseIf=(t,e=(()=>{}))=>{let i=[],s=[];r.forEach(r=>{t(r)?(e(r),i.push(r)):s.push(r)}),r=s,n=[...i,...n]},this.reduce=(t,e)=>r.reduce(t,e),this.map=t=>r.map(t),this.flatMap=t=>r.flatMap(t),this.each=t=>{r.forEach(t)},this.find=t=>r.find(t)}function pa(t,e,i){const{textures:r}=e;let{texture:n=r.fletters,kerning:s=r.fkerning}=i,{size:o}=i,a=new da(()=>new fa(this,e,{size:o,texture:n,kerning:s})),h=this.container=new ko;let u;this.init=t=>{},this.setText=t=>{u!==t&&(u=t,a.each(t=>h.removeChild(t)),a.releaseAll(),(t=>{let e,i=0,r=0;for(let n=0;n{t.init({x:i,y:r,letter:s}),e=t.getSize()}),i+=e.w):(i=0,r+=e?e.h:0)}a.each(t=>h.addChild(t))})(u))},this.bounds=()=>h.getBounds(),this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function fa(t,e,i){const{texture:r,kerning:n}=i;let{size:s}=i,o=new ea(this,e,{});let a,h;(this.container=new ko).addChild(o),this.init=t=>{let e=t.x,i=t.y,u=t.letter,l=r[u]||r["?"],c=n[u]||n["?"],d=c.w,p=c.h;a=s*(d/p),h=s,o.size(a,h),o.move(e,i),o.texture(l)},this.getSize=()=>({w:a,h:h}),this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function ga(t,e,i){let r=this.cardGame=t.cardGame;const{textures:n}=e;let s=n.mcards,o=[new va(this,e,{icon:s.hearts,text:"SOLI\nTAIRE",width:i.menucard.width,height:i.menucard.height,onTap(){r.userActionSelectGame("solitaire")}}),new va(this,e,{icon:s.clubs,text:"SPIDER",width:i.menucard.width,height:i.menucard.height,onTap(){r.userActionSelectGame("spider")}}),new va(this,e,{icon:s.diamonds,text:"FREE\nCELL",width:i.menucard.width,height:i.menucard.height,onTap(){r.userActionSelectGame("freecell")}})],a=this.container=new ko;o.forEach((t,e)=>{t.container.move(e*(i.menucard.width+i.menucardGap),0),a.addChild(t)}),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function va(t,e,i){const{events:r,textures:n}=e;let s=n.mcards,{width:o,height:a}=i,h=new Qo(0,0,{}),u=Mo(),l=new ea(this,e,{width:o,height:a,texture:s.shadow}),c=new ea(this,e,{width:o,height:a,texture:s.front}),d=new pa(this,e,{size:.15*a}),p=new ea(this,e,{width:.8*o,height:.8*o,texture:i.icon}),f=this.container=new ko;f.addChild(l),f.c.addChild(u),u.addChild(c.container.c),p.move(.5*o-.8*o*.5,a-.9*o),u.addChild(p.container.c),d.container.move(.05*i.width,.1*i.height),u.addChild(d.container.c),d.setText(i.text),this.init=t=>{};const g=oa({onBegin(){h.value(h.value()),h.target(1)},onUpdate(){},onEnd(t){h.value(h.value()),h.target(0),t&&i.onTap()},boundsFn:()=>f.bounds()},r);this.update=t=>{h.update(t/200),g(t),this.container.update(t)};let v=.05*o,m=.05*a;this.render=()=>{(()=>{let t=h.easing(ta.easeOutQuad),e=-v*t,i=-m*t;u.position.set(e,i)})(),this.container.render()}}function ma(t,e,i){this.cardGame=t.cardGame;let r=(()=>{let{width:t,height:e}=i,r=e-2*(.14*t),n=r*(64/89);r=Math.round(r);let s=.1*(n=Math.round(n));return{menucardGap:s,menucard:Fo(.5*(t-3*(s+n)),.5*e-.5*r,n,r),width:t,height:e}})(),n=new ca(this,e,r),s=new ga(this,e,r),o=this.container=new ko;o.addChild(n),s.container.move(r.menucard.x,r.menucard.y),o.addChild(s),this.init=t=>{},this.remove=()=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function ya(t,e,i){const r=(t,i)=>new ea(this,e,{...t,texture:i});let{width:n,height:s,tileWidth:o,textures:a}=i,h=i.tileHeight||o,u=n-2*o,l=s-2*h,c=[{x:0,y:0,width:o,height:h},{x:0+o,y:0,width:u,height:h},{x:0+o+u,y:0,width:o,height:h},{x:0,y:0+h,width:o,height:l},{x:0+o,y:0+h,width:u,height:l},{x:0+o+u,y:0+h,width:o,height:l},{x:0,y:0+h+l,width:o,height:h},{x:0+o,y:0+h+l,width:u,height:h},{x:0+o+u,y:0+h+l,width:o,height:h}].map((t,e)=>r(t,a[e])),d=this.container=new ko;c.forEach(t=>d.addChild(t)),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function _a(t,e,i){let{contents:r,gap:n=0}=i,s=this.container=new ko;(()=>{let t=0;r.forEach(e=>{s.addChild(e),e.container.moveY(t);let i=e.container.bounds();t+=i.height+n})})(),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function wa(t,e,i){const{textures:r}=e,n=r.mhud;let s,o,a,{width:h,height:u,contents:l}=i,c=new ya(this,e,{width:h,height:u,tileWidth:16,textures:n.menubg9}),d=new _a(this,e,{contents:l,gap:.1*u}),p=new ea(this,e,{width:16,texture:n.menubg}),f=new gn,g=this.container=new ko;(()=>{f.beginFill(16777215),f.drawRect(0,0,h,u),f.endFill(),g.c.addChild(f),g.mask(f),g.addChild(c),c.container.alpha(.2),g.addChild(d),g.addChild(p),s=d.container.bounds().height;let t=(o=c.container.bounds().height)/s;p.height(o*t),p.move(h-16,0),(a=o-s)>=0?p.visible(!1):p.visible(!0)})(),this.init=t=>{};let v=new Qo(0,0,{}),m=0,y=0;let _=!1;const{events:w}=e,x=sa({onBegin(t){let e=c.container.bounds(),i=ha(...t,e);_=i},onMove(t,{dpos:e}){var i;_&&(i=e[1],a>=0||(m=i))},onEnd(t){_&&(a>=0||(y+=m,m=0,y>0&&v.both(y,0),y{x(t),v.update(t/200),(()=>{if(!v.settled()){let t=v.value();y=t}})(),this.container.update(t)},this.render=()=>{let t=m+y;d.container.moveY(t);let e=o*(-1*t/s);p.y(e),this.container.render()}}function xa(t,e,i){let r=(n=i.label,s={fontFamily:i.fontFamily||"fipps",fontSize:i.size,fill:i.fill||0,align:i.align,wordWrap:i.wordWrap,wordWrapWidth:i.wordWrapWidth},new In(n,s));var n,s;(this.container=new ko).c.addChild(r);let o=i.label;this.text=t=>{o!==t&&(o=t,r.text=o)},this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function ba(t,e,i){let{x:r,y:n,width:s,height:o,animations:a}=i,h=Js(a,(t,e)=>new Ea(e)),u=Object.keys(a)[0];const l=()=>h[u];this.play=t=>{u=t,l().reset()},this.smoothplay=(t,e)=>{u=t,l().smoothplay(e)};let c=No();const d=()=>{c.position.set(r,n)},p=()=>{c.width=s,c.height=o};let f=this.container=new ko;let g;f.c.addChild(c),p(),d(),this.init=t=>{g=t},this.data=()=>g,this.alpha=t=>{c.alpha=t},this.anchor=t=>{c.anchor.set(t,t)},this.visible=t=>{c.visible=t},this.size=(t,e)=>{s===t&&o===e||(s=t,o=e,p())},this.move=(t,e)=>{r===t&&n===e||(r=t,n=e,d())},this.scale=(t,e)=>{f.c.scale.set(t,e)},this.update=t=>{l().update(t),this.container.update(t)},this.render=()=>{let t=l().texture();c.texture=t,this.container.render()}}function Ea({textures:t,duration:e,loop:i}){let r=t.length-1,n=new Qo(0,r,{yoyo:i});this.texture=()=>{let e=n.value(),i=Math.floor(e);return t[i]},this.smoothplay=t=>{0===t?(n.value(n.value()),n.target(r)):(n.value(n.value()),n.target(0))},this.reset=()=>{n.both(0,r)},this.update=t=>{n.update(t/e)}}function Ta(t,e,i){const{textures:r}=e,n=r.mhud.checkbox;let s=new ba(this,e,{width:i.width,height:i.height,animations:{onoff:{textures:n.onoff,duration:200}}});(this.container=new ko).addChild(s),this.smoothcheck=t=>{s.smoothplay("onoff",t?0:1)},this.init=t=>{};const{events:o}=e,a=aa(()=>{ra(i.onCheck)},o,()=>s.container.bounds());this.update=t=>{a(t),this.container.update(t)},this.render=()=>{this.container.render()}}function Sa(t,e,i){let{contents:r=[],gap:n=0}=i;const s=()=>{let t=0;r.forEach(e=>{o.addChild(e),e.container.moveX(t);let i=e.container.bounds();t+=i.width+n})};let o=this.container=new ko;s(),this.contents=t=>{r.forEach(t=>o.removeChild(t)),r=t,s()},this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Ca(t,e,i){let r=new Ta(this,e,{width:i.width,height:i.height,onCheck:i.onCheck}),n=new Sa(this,e,{contents:[r,new xa(this,e,{label:i.label,fontFamily:i.fontFamily,fill:i.fill,size:i.size||.4*i.height})],gap:.1*i.width});this.dO=r;(this.container=new ko).addChild(n),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Aa(t,e,i){let r=t.cardGame,n=.06*i.height,s=new xa(this,e,{label:"Show Tutorial",size:n,align:"center"});const o=({key:t,name:n})=>{let s=new Ca(this,e,{width:i.checkbox.width,height:i.checkbox.height,label:n,onCheck:()=>{r.userActionOptionShowTutorialCheck(t)}});return s.container.moveX(2*i.uiMargin),r.oOptions.showTutorial[t].subscribe(t=>s.dO.smoothcheck(t)),s};let a=[{key:"solitaire",name:"Solitaire"},{key:"spider",name:"Spider"},{key:"freecell",name:"Freecell"}].map(t=>o(t)),h=new _a(this,e,{contents:[s,...a],gap:.5*i.uiMargin}),u=this.container=new ko;s.container.moveX(i.uiMargin),u.addChild(h),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Pa(t,e,i){const{textures:r}=e,n=r.mhud.select;let s=new ba(this,e,{width:i.width,height:i.height,animations:{onoff:{textures:n.onoff,duration:50}}});(this.container=new ko).addChild(s),this.smoothcheck=t=>{s.smoothplay("onoff",t?0:1)},this.init=t=>{};const{events:o}=e,a=aa(()=>{ra(i.onCheck)},o,()=>s.container.bounds());this.update=t=>{a(t),this.container.update(t)},this.render=()=>{this.container.render()}}function Oa(t,e,i){let r=new Pa(this,e,{width:i.width,height:i.height,onCheck:i.onCheck}),n=new Sa(this,e,{contents:[r,new xa(this,e,{label:i.label,size:.4*i.width})],gap:.1*i.width});this.dO=r;(this.container=new ko).addChild(n),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Ia(t,e,i){let r=t.cardGame,n=.06*i.height,s=new xa(this,e,{label:"Cards Per Draw",size:n});const o=(t,n)=>{let s=new Oa(this,e,{width:i.select.width,height:i.select.height,label:n,onCheck:()=>{r.userActionOptionSoliCardsPerDraw(t)}});return s.container.moveX(2*i.uiMargin),r.oOptions.solitaire.cardsPerDraw.subscribe(e=>{let i=e===t;s.dO.smoothcheck(i)}),s};let a=Js({[ms]:"1 card no reshuffle",[ys]:"1 card",[_s]:"3 cards"},(t,e)=>o(t,e)),h=new _a(this,e,{contents:[s,...Object.values(a)],gap:.5*i.uiMargin});(this.container=new ko).addChild(h),s.container.hcenter(i.height),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Da(t,e,i){this.cardGame=t.cardGame;const{textures:r}=e;let n=r.mcards,s=(()=>{let{width:t,height:e}=i,r=.05*e,n=1.4*(e-2*r),s=n*(64/89),o=Fo(.5*t,.5*e,s,n),a=.1*s,h=Fo(.5*t-.5*n+a,.5*e-.5*s+a,n-2*a,s-2*a),u=.25*s,l=.5*u;return{uiMargin:r,checkbox:Fo(0,0,u,.5*u),select:Fo(0,0,l,l),menuInside:h,menu:o,width:t,height:e}})(),o=new ea(this,e,{width:s.menu.width,height:s.menu.height,texture:n.front}),a=()=>[new Aa(this,e,s)],h=new wa(this,e,{width:s.menuInside.width,height:s.menuInside.height,contents:[...a()]}),u=new wa(this,e,{width:s.menuInside.width,height:s.menuInside.height,contents:[new Ia(this,e,s),...a()]}),l=new wa(this,e,{width:s.menuInside.width,height:s.menuInside.height,contents:[...a()]}),c=new wa(this,e,{width:s.menuInside.width,height:s.menuInside.height,contents:[...a()]});const d=[h,l,u,c];let p,f={spider:l,freecell:c,solitaire:u},g=this.container=new ko;o.anchor(.5),o.rotation(.5*Math.PI),o.move(s.menu.x,s.menu.y),g.addChild(o),d.forEach(t=>t.container.move(s.menuInside.x,s.menuInside.y));const v=t=>{p&&g.removeChild(p),g.addChild(t),p=t};this.cardGame.oView.subscribe(t=>{let{home:e,game:i}=t;v(e?h:f[i])}),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Ma(t,e,i){let r=t.cardGame;const{events:n,textures:s}=e,o=s.mhud;let a=(()=>{let{width:t,height:e}=i,r=.08*e,n=Fo(0,0,r,r),s=.5*r,o=t-n.width-s,a=Fo(o,s,r,r),h=Fo(o,a.y1+.5*s,r,r);return{icon:n,menu:a,back:h,gametext:Fo(o-1.2*s,h.y1+s,.4*r,r),width:t,height:e}})(),h=o.menu,u=new ba(this,e,{width:a.icon.width,height:a.icon.height,animations:{openclose:{textures:h.close,duration:200}}}),l=Mo(),c=new ea(this,e,{width:a.icon.width,height:a.icon.height,texture:o.back}),d=new pa(this,e,{size:a.gametext.width}),p=this.container=new ko;u.container.move(a.menu.x,a.menu.y),p.addChild(u),p.c.addChild(l),c.container.move(a.back.x,a.back.y),l.addChild(c.container.c),d.container.move(a.gametext.x,a.gametext.y),l.addChild(d.container.c);let f={spider:"SPIDER",solitaire:"SOLI\nTAIRE",freecell:"FREE\nCELL"};r.oView.subscribe(t=>{t.game?(l.visible=!0,d.setText(f[t.game])):l.visible=!1}),r.oHamburger.subscribe(({open:t})=>{t?u.smoothplay("openclose",1):u.smoothplay("openclose",0)}),this.init=t=>{};const g=aa(()=>{r.userActionSelectMenuBar()},n,()=>u.container.bounds()),v=aa(()=>{r.userActionSelectBack()},n,()=>c.container.bounds());this.update=t=>{g(t),v(t),this.container.update(t)},this.render=()=>{this.container.render()}}function Na(){const t=[0,1,2,3,4,5,6];let e,i,r=0;this.init=()=>{i=!1,r=0,e=t.slice(0)},this.acquireDeal=()=>{if(i)return null;let t=e[r],n=r;e[r]--;let s=0;do{if(r=(r+1)%e.length,s++>e.length){i=!0;break}}while(e[r]<0);return 0===t?{i:n,hidden:!1}:{i:n,hidden:!0}}}function ka(){const t=[13,13,13,13];let e,i,r;this.init=()=>{i=!1,e=0,r=t.slice(0)},this.acquireHole=()=>{if(i)return null;let t=e;return r[e]--,e=(e+1)%r.length,0===r[t]&&3===t&&(i=!0),t}}const Ra=t=>new Promise(e=>setTimeout(e,t));function La(t){let e=ks.map(t=>Ho(new Bs)),i=Rs.map(t=>Ho(new Gs)),r=Ho(new js),n=this.undoer=Ho([]),s=this.bSelection=Ho({}),o=this.aSelection=Ho({}),a=this.pSelection=Ho({}),h=this.oSaveState=Ho(null),u=this.oShowTutorial=Ho(null),l=this.oGameReset=Ho(null),c=this.oGameOver=Ho(null),d=new Na,p=new ka,f={deal:Xo(),settle:Xo(),reveal:Xo(),move:Xo(),dealdraw:Xo(),unreveal:Xo()},g=Rs.map(t=>Ho(null)),v=Rs.map(t=>Ho(null)),m=this.holeEndN=t=>g[t],y=this.holeInN=t=>v[t],_=this.holeN=t=>i[t],w=this.stackN=t=>e[t],x=this.fx=t=>f[t];this.drawer=r;let b=As();let E;this.userActionNewGame=async t=>{await this.userInit({options:t}),await $()},this.userInit=async t=>{await T(),await C(t.options),t.play?await A(t.play):await P()};const T=async()=>{E=!1,await S(),await Ra(300)},S=async()=>{for(let t in f)x(t).reject("Action cancel Fxs")},C=t=>{E=!0,n.set(t=>[]),e.forEach(t=>t.mutate(t=>t.clear())),i.forEach(t=>t.mutate(t=>t.clear())),r.mutate(e=>e.options(t)),l.set(Wo),c.set(Zo)},A=async t=>{(t=>{const e=(t,e)=>t.mutate(t=>t.read(e));let[i,n,s]=t.split(" ");i=i.split("!"),n=n.split("!"),i.forEach((t,i)=>{e(w(i),t)}),n.forEach((t,i)=>{e(_(i),t)}),e(r,s)})(t)},P=async()=>{for(b.shuffle(),r.mutate(t=>t.init(b.drawRest())),d.init();E;){let t=d.acquireDeal();if(null===t)break;await O(t)}},O=async t=>{let{i:e,hidden:i}=t,n=r.mutate(t=>t.dealOnlyOne());await x("deal").begin({stackN:e,cards:n,hidden:i}),i?w(e).mutate(t=>{t.hide1(n)}):w(e).mutate(t=>{t.add1(n)})},I=async()=>{let t=M();await x("dealdraw").begin(t),r.mutate(e=>e.dealOne2(t)),Z(async()=>{await at(t)})},D=()=>r.mutate(t=>t.draw1()),M=()=>r.mutate(t=>t.dealOne1()),N=()=>{r.mutate(t=>t.drawCommit1())},k=t=>{r.mutate(e=>e.undoDraw(t))},R=t=>{s.mutate(e=>e.cards=t)},L=()=>{a.mutate(t=>{t.active=!1})},F=(t,e)=>{let i=w(t).apply(t=>t.front.indexOf(e[0]));a.mutate(r=>{r.active=!0,r.stackN=!1,r.cardN=!1,r.holeN=!1,r.drawN=!1,r.stackN=t,r.cardN=i,r.cards=e})},U=async()=>{for(p.init();E;){let t=p.acquireHole();if(!Ls(t))break;await Ra(20+50*Math.random()),await B(t)}},B=async t=>{let e=_(t).mutate(t=>t.remove());m(t).set(t=>e),y(t).set(Wo)},G=async(t,e)=>{y(t).set(Wo),j(t,e);let i=!0;Rs.forEach(t=>{let e=_(t);i=i&&e.apply(t=>t.isDone())}),i&&await(async()=>{c.set(Vo({})),await U()})()},j=(t,e)=>_(t).mutate(t=>t.add(e)),H=(t,e)=>w(t).mutate(t=>t.add1(e)),X=(t,e)=>w(t).mutate(t=>t.cutInProgress(e)),z=t=>w(t).mutate(t=>t.cutInProgressCommit()),Y=t=>w(t).mutate(t=>t.cutLast()),V=(t,e)=>w(t).mutate(t=>e.forEach(e=>t.cutLast())),W=(t,e)=>_(t).mutate(t=>t.add(e)),q=t=>_(t).apply(t=>t.canRemove()),K=t=>_(t).mutate(t=>t.remove()),Z=t=>{(t=>{n.mutate(e=>e.push(t))})(t),$()},$=()=>{let t=(()=>{const t=t=>t.apply(Wo).write();let n=e.map(t),s=i.map(t),o=t(r);return`${n.join("!")} ${s.join("!")} ${o}`})();J(t)},J=t=>{h.set(e=>t)},Q=(t,e)=>_(t).apply(t=>t.canAdd(e)),tt=(t,e)=>w(t).apply(t=>t.canAdd(e));const et=async()=>{if(!n.apply(t=>t.length>0))return;let t=n.mutate(t=>t.pop());await t()},it=async(t,e,i,r)=>{r&&(w(t).mutate(t=>t.unreveal1(r)),await x("unreveal").begin({stackN:t,card:r}),w(t).mutate(t=>t.unreveal2(r))),V(e,i),await x("move").begin({srcStackN:e,dstStackN:t,cards:i}),H(t,i)},rt=async t=>{let e=Y(t);k(e)},nt=async(t,e)=>{K(t),await x("move").begin({srcHoleN:t,dstDrawN:!0,cards:[e]}),k(e)},st=async(t,e,i)=>{V(e,i),await x("move").begin({srcStackN:e,dstHoleN:t,cards:i}),W(t,i[0])},ot=async(t,e,i,r)=>{r&&(w(t).mutate(t=>t.unreveal1(r)),await x("unreveal").begin({stackN:t,card:r}),w(t).mutate(t=>t.unreveal2(r))),K(e),await x("move").begin({srcHoleN:e,dstStackN:t,cards:i}),H(t,i)},at=async t=>{r.mutate(e=>e.undealOne(t))},ht=async t=>{if(!w(t).apply(t=>t.canReveal()))return null;let e=w(t).mutate(t=>t.reveal1());return await x("reveal").begin({stackN:t,card:e}),H(t,[e]),e},ut=async(t,e)=>{let i=t[0];await x("settle").begin({drawN:!0,cards:t}),r.mutate(t=>t.drawCancel1(i)),e||(t=>{a.mutate(e=>{e.active=!0,e.stackN=!1,e.cardN=!1,e.holeN=!1,e.drawN=!1,e.drawN=!0,e.cards=t})})(t)},lt=async(t,e,i)=>{await x("settle").begin({holeN:t,cards:e}),W(t,e[0]),i||((t,e)=>{a.mutate(i=>{i.active=!0,i.stackN=!1,i.cardN=!1,i.holeN=!1,i.drawN=!1,i.holeN=t,i.cards=e})})(t,e)},ct=async(t,e,i)=>{let r=((t,e)=>w(t).mutate(t=>t.cut1(e)))(t,i),n=ht(t),s=x("move").begin({srcStackN:t,dstStackN:e,cards:r}),o=await n;await s,H(e,r),Z(async()=>{await it(t,e,r,o)})},dt=async t=>{let e=D(),i=[e];await x("move").begin({srcDrawN:!0,dstHoleN:t,cards:i}),N(),G(t,e),Z(async()=>{await nt(t,e)})},pt=async(t,e)=>{let i=Y(t),r=[i],n=ht(t),s=x("move").begin({srcStackN:t,dstHoleN:e,cards:r}),o=await n;await s,G(e,i),Z(async()=>{await ot(t,e,r,o)})},ft=async()=>{if(!r.apply(t=>t.canShuffle()))return;let t=r.mutate(t=>t.shuffle1());r.mutate(e=>e.shuffle2(t)),Z(async()=>{await(async()=>{r.mutate(t=>t.undoShuffle())})()})},gt=async t=>{let e=D();(t=>{o.mutate(e=>{e.drawN=!0,e.cards=t})})([e]),L(),R([e])},vt=async t=>{let{stackN:e,cards:i,hasMoved:r}=o.apply(Wo),{stackN:n,holeN:s}=t;Ls(n)&&tt(n,i)?await(async(t,e)=>{e[0];await x("settle").begin({stackN:t,cards:e}),N(),H(t,e),Z(async()=>{await rt(t)})})(n,i):Ls(s)&&Q(s,i)?await(async(t,e)=>{let i=e[0];await x("settle").begin({holeN:t,cards:e}),N(),G(t,i),Z(async()=>{await nt(t,i)})})(s,i):((Ls(n)||Ls(s))&&St(),await ut(i,r))},mt=async(t,e)=>{if(a.apply(t=>t.active)){let{stackN:e,cardN:i,holeN:r,drawN:n,cards:s}=a.apply(t=>t);if(Ls(e)&&e!==t&&tt(t,s))return L(),await ct(e,t,i),!0;if(Ls(r)&&tt(t,s))return L(),await(async(t,e)=>{let i=[K(t)];await x("move").begin({srcHoleN:t,dstStackN:e,cards:i}),H(e,i),Z(async()=>{st(t,e,i)})})(r,t),!0;if(n&&tt(t,s))return L(),await(async t=>{let e=D(),i=[e];await x("move").begin({srcDrawN:!0,dstStackN:t,cards:i}),N(),H(t,i),Z(async()=>{await rt(t)})})(t),!0}return!1},yt=async t=>{let{stackN:e,cardN:i}=t;if(await mt(e))return;if(!Ls(i))return;let r=X(e,i);((t,e)=>{o.mutate(i=>{i.stackN=t,i.cards=e})})(e,r),L(),R(r)},_t=async t=>{let{stackN:e,cards:i,hasMoved:r}=o.apply(Wo),{stackN:n,holeN:s}=t;Ls(s)&&Q(s,i)?(await(async(t,e,i)=>{await x("settle").begin({holeN:e,cards:i}),G(e,i[0]);let r=await ht(t);Z(async()=>{await ot(t,e,i,r)})})(e,s,i),z(e)):Ls(n)&&n!==e&&tt(n,i)?(await(async(t,e,i)=>{await x("settle").begin({stackN:e,cards:i}),H(e,i);let r=await ht(t);Z(async()=>{await it(t,e,i,r)})})(e,n,i),z(e)):((Ls(n)||Ls(s))&&St(),await(async(t,e,i)=>{await x("settle").begin({stackN:t,cards:e}),H(t,e),z(t),i||F(t,e)})(e,i,r))},wt=async t=>{let{holeN:e}=t;if(await(async t=>{if(a.apply(t=>t.active)){let{stackN:e,drawN:i,cardN:r,cards:n}=a.apply(t=>t);if(Ls(e)&&Q(t,n))return L(),await pt(e,t),!0;if(i&&Q(t,n))return L(),await dt(t),!0}return!1})(e))return;if(!q(e))return;let i=[K(e)];((t,e)=>{o.mutate(i=>{i.holeN=t,i.cards=e})})(e,i),L(),R(i)},xt=async t=>{let{holeN:e,cards:i,hasMoved:r}=o.apply(Wo),{stackN:n}=t;Ls(n)&&tt(n,i)?await(async(t,e,i)=>{await x("settle").begin({stackN:e,cards:i}),H(e,i),Z(async()=>{st(t,e,i)})})(e,n,i):(Ls(n)&&St(),await lt(e,i,r))},bt=async t=>{let{epos:e,decay:i}=t,{stackN:r,holeN:n,drawN:s}=t,{active:a,activeEnding:h}=o.apply(Wo);a||h||(((t,e)=>{o.mutate(i=>{i.active=!0,i.stackN=!1,i.holeN=!1,i.drawN=!1,i.hasMoved=!1,i.epos=t,i.decay=e})})(e,i),Ls(r)?await yt(t):s?await gt():Ls(n)&&await wt(t))},Et=async t=>{let{epos:e,decay:i}=t,{activeEnding:r,active:n,stackN:s,drawN:a,holeN:h}=o.apply(Wo);n&&!r&&(o.mutate(t=>{t.activeEnding=!0}),Ls(s)?await _t(t):Ls(a)?await vt(t):Ls(h)?await xt(t):L(),o.mutate(t=>{t.activeEnding=!1}),o.mutate(t=>{t.active=!1}))},Tt=t=>i.findIndex(e=>e.apply(e=>e.canAdd([t]))),St=()=>{t.oOptions.showTutorial.solitaire.apply(Wo)&&Ct()},Ct=()=>{u.set(Wo)};let At=function(){let t=Promise.resolve();return function(e){return t=t.then(e)}}();const Pt=t=>async(...e)=>{c.apply(qo)||await t(...e)};this.userActionDealDraw=Pt(async()=>{await At(I)}),this.userActionDragStart=Pt(async t=>{await bt(t)}),this.userActionDragMove=Pt(async t=>{await(async t=>{o.apply(t=>t.active)&&o.mutate(e=>{e.epos=t,e.hasMoved=!0})})(t)}),this.userActionDragEnd=Pt(async t=>{await Et(t)}),this.userActionDoubleClick=Pt(async t=>{await(async t=>{let{stackN:e,drawN:i}=t,{activeEnding:n,active:s}=o.apply(Wo);if(s||n)console.log("still active");else if(Ls(e)){let t=w(e).apply(t=>t.topCard());if(!t)return void console.log("no card");let i=Tt(t);Ls(i)&&await pt(e,i)}else if(i){let t=r.apply(t=>t.topCard()),e=Tt(t);Ls(e)&&await dt(e)}})(t)}),this.userActionShuffle=Pt(async()=>{await At(ft)}),this.userActionUndo=Pt(async()=>{await At(et)})}const Fa=t=>new Promise(e=>setTimeout(e,t));function Ua(t){let e,i=ks.map(t=>Ho(new Bs)),r=Rs.map(t=>Ho(new Gs)),n=this.undoer=Ho([]),s=this.drawer=Ho(new js),o=this.bSelection=Ho({}),a=this.aSelection=Ho({}),h=this.pSelection=Ho({}),u=Xo(),l=Xo(),c=Xo(),d=Xo(),p=Xo(),f=Xo(),g=Xo(),v=[u,l,c,d,p,f,g],m=Xo(),y={deal:Xo(),settle:Xo(),reveal:Xo(),move:Xo(),dealdraw:Xo(),unreveal:Xo()},_=new Na,w=this.holeN=t=>r[t],x=this.stackN=t=>i[t],b=this.fx=t=>y[t],E=As();this.userActionDoubleTapStack=async()=>{g.resolve()},this.userActionShuffle=async()=>{f.resolve()},this.userActionUndo=async()=>{lt()},this.userActionNewGame=async()=>{await this.remove(),this.init()},this.userActionDealDraw=()=>{c.resolve()},this.userActionSelectDraw=(t,e)=>{d.resolve(),t&&T(t,e)},this.userActionSelectStack=(t,e,i,r)=>{u.resolve({stackN:t,cardN:e}),i&&T(i,r)},this.userActionSelectHole=(t,e,i)=>{p.resolve({holeN:t}),e&&T(e,i)},this.userActionMove=t=>{a.mutate(e=>{e.epos=t,e.hasMoved=!0})},this.userActionEndSelectStack=t=>{a.mutate(e=>{e.stackN=t})},this.userActionEndSelectHole=t=>{a.mutate(e=>{e.holeN=t})};const T=(t,e)=>{a.mutate(i=>{i.active=!0,i.stackN=!1,i.holeN=!1,i.hasMoved=!1,i.epos=t,i.decay=e})},S=t=>{o.mutate(e=>e.cards=t)};this.userActionEndTap=()=>{l.resolve(a.apply(t=>({stackN:t.stackN,holeN:t.holeN,hasMoved:t.hasMoved}))),a.mutate(t=>{t.active=!1}),H()};const C=async()=>{for(let t in y)b(t).reject("Action cancel Fxs");await Fa(0)},A=async()=>{v.forEach(t=>t.reject("Action cancel user observes")),await Fa(0)};this.remove=async()=>{e=!1,await Promise.all([A(),C()])},this.init=()=>{O(),I(),bt()};const P=()=>l.begin(),O=()=>(e=!0,i.forEach(t=>t.mutate(t=>t.clear())),r.forEach(t=>t.mutate(t=>t.clear())),Promise.resolve()),I=async()=>{E.shuffle(),E.debug(),s.mutate(t=>t.init(E.drawRest())),_.init(),await D()},D=async()=>{try{if(!e)return void await Promise.reject();let t=_.acquireDeal();t?(await M(t),D()):await Promise.resolve()}catch(t){console.warn(t)}},M=async t=>{let{i:e,hidden:i}=t,r=[s.mutate(t=>t.dealOne1())];await b("deal").begin({stackN:e,cards:r,hidden:i}),i?x(e).mutate(t=>{t.hide1(r)}):x(e).mutate(t=>{t.add1(r)})},N=async t=>{let e=st(),i=[e];await b("move").begin({srcDrawN:!0,dstStackN:t,cards:i}),at(),Y(t,i),dt(async()=>{await ft(t,e)})},k=async(t,e)=>{let i=[et(t)];await b("move").begin({srcHoleN:t,dstStackN:e,cards:i}),Y(e,i),dt(async()=>{vt(t,e,i)})},R=async(t,e,i)=>{let r=V(t,i),n=j(t),s=b("move").begin({srcStackN:t,dstStackN:e,cards:r}),o=await n;await s,Y(e,r),dt(async()=>{await pt(t,e,r,o)})},L=async t=>{let e=st(),i=[e];await b("move").begin({srcDrawN:!0,dstHoleN:t,cards:i}),at(),z(t,e),dt(async()=>{await gt(t,e)})},F=async(t,e)=>{let i=K(t),r=[i],n=j(t),s=b("move").begin({srcStackN:t,dstHoleN:e,cards:r}),o=await n;await s,z(e,i),dt(async()=>{await mt(t,e,r,o)})},U=async(t,e,i)=>{await b("settle").begin({holeN:e,cards:i}),z(e,i[0]);let r=await j(t);dt(async()=>{await mt(t,e,i,r)})},B=async(t,e,i)=>{await b("settle").begin({stackN:e,cards:i}),Y(e,i);let r=await j(t);dt(async()=>{await pt(t,e,i,r)})},G=async(t,e,i)=>{await b("settle").begin({stackN:t,cards:e}),Y(t,e),q(t),i||X(t,e)},j=async t=>{if(!x(t).apply(t=>t.canReveal()))return null;let e=x(t).mutate(t=>t.reveal1());return await b("reveal").begin({stackN:t,card:e}),Y(t,[e]),e},H=()=>{h.mutate(t=>{t.active=!1})},X=(t,e)=>{let i=x(t).apply(t=>t.front.indexOf(e[0]));h.mutate(r=>{r.active=!0,r.stackN=!1,r.cardN=!1,r.holeN=!1,r.drawN=!1,r.stackN=t,r.cardN=i,r.cards=e})},z=(t,e)=>w(t).mutate(t=>t.add(e)),Y=(t,e)=>x(t).mutate(t=>t.add1(e)),V=(t,e)=>x(t).mutate(t=>t.cut1(e)),W=(t,e)=>x(t).mutate(t=>t.cutInProgress(e)),q=t=>x(t).mutate(t=>t.cutInProgressCommit()),K=t=>x(t).mutate(t=>t.cutLast()),Z=(t,e)=>x(t).mutate(t=>e.forEach(e=>t.cutLast())),$=async(t,e,i)=>{await b("settle").begin({stackN:e,cards:i}),Y(e,i),dt(async()=>{vt(t,e,i)})},J=async(t,e,i)=>{await b("settle").begin({holeN:t,cards:e}),Q(t,e[0]),i||((t,e)=>{h.mutate(i=>{i.active=!0,i.stackN=!1,i.cardN=!1,i.holeN=!1,i.drawN=!1,i.holeN=t,i.cards=e})})(t,e)},Q=(t,e)=>w(t).mutate(t=>t.add(e)),tt=t=>w(t).apply(t=>t.canRemove()),et=t=>w(t).mutate(t=>t.remove()),it=async(t,e)=>{let i=[e];await b("settle").begin({holeN:t,cards:i}),at(),z(t,e),dt(async()=>{await gt(t,e)})},rt=async(t,e)=>{let i=[e];await b("settle").begin({stackN:t,cards:i}),at(),Y(t,i),dt(async()=>{await ft(t,e)})},nt=async(t,e)=>{let i=[t];await b("settle").begin({drawN:!0,cards:i}),s.mutate(e=>e.drawCancel1(t)),e||(t=>{h.mutate(e=>{e.active=!0,e.stackN=!1,e.cardN=!1,e.holeN=!1,e.drawN=!1,e.drawN=!0,e.cards=t})})(i)},st=()=>s.mutate(t=>t.draw1()),ot=()=>s.mutate(t=>t.dealOne1()),at=()=>{s.mutate(t=>t.drawCommit1())},ht=t=>{s.mutate(e=>e.undoDraw(t))};let ut=function(){let t=Promise.resolve();return function(e){return t=t.then(e)}}();const lt=()=>{ut(ct)};const ct=async()=>{if(!n.apply(t=>t.length>0))return void await Promise.resolve();let t=n.mutate(t=>t.pop());await t()},dt=t=>{n.mutate(e=>e.push(t))},pt=async(t,e,i,r)=>{r&&(x(t).mutate(t=>t.unreveal1(r)),await b("unreveal").begin({stackN:t,card:r}),x(t).mutate(t=>t.unreveal2(r))),Z(e,i),await b("move").begin({srcStackN:e,dstStackN:t,cards:i}),Y(t,i)},ft=async t=>{let e=K(t);ht(e)},gt=async(t,e)=>{et(t),await b("move").begin({srcHoleN:t,dstDrawN:!0,cards:[e]}),ht(e)},vt=async(t,e,i)=>{Z(e,i),await b("move").begin({srcStackN:e,dstHoleN:t,cards:i}),Q(t,i[0])},mt=async(t,e,i,r)=>{r&&(x(t).mutate(t=>t.unreveal1(r)),await b("unreveal").begin({stackN:t,card:r}),x(t).mutate(t=>t.unreveal2(r))),et(e),await b("move").begin({srcHoleN:e,dstStackN:t,cards:i}),Y(t,i)},yt=async t=>{s.mutate(e=>e.undealOne(t))};let _t;const wt=t=>r.findIndex(e=>e.apply(e=>e.canAdd([t])));let xt=[async()=>{await(()=>f.begin())();let t=s.mutate(t=>t.shuffle1());s.mutate(e=>e.shuffle2(t)),dt(async()=>{await(async()=>{s.mutate(t=>t.undoShuffle())})()})},async()=>{await(()=>c.begin())();let t=ot();await b("dealdraw").begin(t),s.mutate(e=>e.dealOne2(t)),dt(async()=>{await yt(t)})},async()=>{await(()=>d.begin())();let t=st();H(),S([t]);let e=await P(),{stackN:i,holeN:r,hasMoved:n}=e;Ls(i)&&St(i,[t])?await rt(i,t):Ls(r)&&Tt(r,[t])?await it(r,t):await nt(t,n),m.resolve({drawN:!0})},async()=>{let{holeN:t}=await(()=>p.begin())();if(h.apply(t=>t.active)){let{stackN:e,drawN:i,cardN:r,cards:n}=h.apply(t=>t);if(Ls(e)&&Tt(t,n))return H(),await F(e,t);if(i&&Tt(t,n))return H(),await L(t)}if(!tt(t))return Promise.resolve();let e=[et(t)];H(),S(e);let i=await P(),{stackN:r,hasMoved:n}=i;return Ls(r)&&St(r,e)?await $(t,r,e):await J(t,e,n)},async()=>{let{stackN:t,cardN:e}=await(()=>u.begin())();if(h.apply(t=>t.active)){let{stackN:e,cardN:i,holeN:r,drawN:n,cards:s}=h.apply(t=>t);if(Ls(e)&&e!==t&&St(t,s))return H(),void await R(e,t,i);if(Ls(r)&&St(t,s))return H(),void await k(r,t);if(n&&St(t,s))return H(),void await N(t)}if(!Ls(e))return;let i=W(t,e);H(),S(i),_t={stackN:t,cards:i};let r=await P(),{stackN:n,holeN:s,hasMoved:o}=r;Ls(s)&&Tt(s,i)?(await U(t,s,i),q(t)):Ls(n)&&n!==t&&St(n,i)?(await B(t,n,i),q(t)):await G(t,i,o),m.resolve({stackN:t})},async()=>{await(()=>g.begin())();let{stackN:t,drawN:e}=await m.begin();if(Ls(t)){let e=x(t).apply(t=>t.topCard()),i=wt(e);Ls(i)&&await F(t,i)}else if(e){let t=s.apply(t=>t.topCard()),e=wt(t);Ls(e)&&await L(e)}}];const bt=()=>{xt.forEach(Et)},Et=async t=>{try{for(;e;)await t()}catch(t){console.warn(t)}},Tt=(t,e)=>w(t).apply(t=>t.canAdd(e)),St=(t,e)=>x(t).apply(t=>t.canAdd(e))}const Ba={Fade:"fade",SlideDown:"slidedown",Scale:"scale"};function Ga(t,e,i){let{content:r,transition:n=Ba.Fade}=i,s=new Qo(0,0,{}),o=this.container=new ko;o.addChild(r),this.transition=t=>{o.showStartUpdate(),t?(s.value(s.value()),s.target(1)):(s.value(s.value()),s.target(0))},this.init=t=>{},this.update=t=>{s.update(t/100),0===s.value()&&s.settled()&&o.hideStopUpdate(),this.container.update(t)};let a=-i.height;this.render=()=>{let t=s.value();if(n===Ba.Fade)o.alpha(t);else if(n===Ba.SlideDown){let e=(1-t)*a;this.container.moveY(e)}else n===Ba.Scale&&this.container.scale(t,t);0===t?this.container.visible(!1):this.container.visible(!0),this.container.render()}}Math.PI;function ja(t,e){return Math.random()*(e-t)+t}function Ha(t,e){return Math.floor(ja(t,e))}function Xa(t,e,i){const{textures:r}=e,n=r.mhud;let s=new xa(this,e,{label:i.label,size:.3*i.height}),o=s.container.bounds(),a=new ya(this,e,{width:o.width+16,height:i.height,tileWidth:16,textures:n.rbutton}),h=this.container=new ko;h.addChild(a),h.addChild(s),s.container.center(o.width+16,i.height);let u=new Qo(0,0,{yoyo:1});this.init=t=>{};const{events:l}=e,c=aa(()=>{ra(i.onTap),u.both(0,1)},l,()=>h.bounds());this.update=t=>{u.update(t/100),c(t),this.container.update(t)},this.render=()=>{let t=.05*u.value();h.scale(1-t),this.container.render()}}function za(t,e,i){const{textures:r}=e,n=r.mscreen;let s=i.text.p,o=.7*i.width,a=.7*i.height,h=.95*a-s,u=new da(()=>new Ya(this,e,{width:s,height:s})),l=new xa(this,e,{label:"Game Over",fill:11285042,size:i.text.h1}),c=new xa(this,e,{label:i.content,size:i.text.p}),d=new _a(this,e,{contents:[l,c]}),p=new ea(this,e,{width:o,height:a,texture:n.menubg}),f=new Xa(this,e,{label:"New Game",width:.2*o,height:.2*a,onTap(){ra(i.onNewGame)}}),g=new Xa(this,e,{label:"Main Menu",width:.2*o,height:.2*a,onTap(){ra(i.onMainMenu)}}),v=new Sa(this,e,{contents:[g,f],gap:.1*i.width}),m=this.container=new ko;m.addChild(p),m.addChild(d),l.container.hcenter(o),c.container.hcenter(o),m.addChild(c),c.container.hcenter(o),v.container.hcenter(o),m.addChild(v),v.container.bottom(h-i.uiMargin);this.init=t=>{},this.releaseShine=t=>{m.removeChild(t),u.release(t)};const y=jo(()=>{((t,e)=>{let i=`${t}.${e}`;if(u.map(t=>t.poskey).includes(i))return;let r=u.acquire(t=>t.init());r.container.move(t,e),m.addChild(r),r.poskey=i})(.1*o+Math.floor(Ha(0,.8*o)/s)*s,h)},200,{});this.update=t=>{y(t),this.container.update(t)},this.render=()=>{this.container.render()}}function Ya(t,e,i){const{textures:r}=e,n=r.mscreen.spades;let s=new ba(this,e,{width:i.width,height:i.height,animations:{shine:{textures:n.shine,duration:300,loop:99999}}});(this.container=new ko).addChild(s);let o=new Qo(0,0,{});this.init=()=>{o.both(0,1)};const a=()=>{o.settled()&&t.releaseShine(this)};this.update=t=>{a(),o.update(t/1e3),this.container.update(t)},this.render=()=>{let t=1-o.value();t=ia(t,.3),s.alpha(.5+.5*t),this.container.render()}}function Va(t,e,i){let r=t.gsolitaire,n=t.cardGame,{optionsStore:s}=e,o=new za(this,e,{content:"You finished Solitaire.",onNewGame(){let t=s.solitaire();r.userActionNewGame(t)},onMainMenu(){n.userActionSelectBack()},...i}),a=new Ga(this,e,{content:o,transition:Ba.Scale,...i}),h=this.container=new ko;o.container.center(i.width,i.height),h.addChild(a);const u=t=>{a.transition(t)};r.oGameOver.subscribe(t=>{t&&u(!0)}),r.oGameReset.subscribe(t=>{u(!1)}),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}const Wa={ace:"A",two:"2",three:"3",four:"4",five:"5",six:"6",seven:"7",eight:"8",nine:"9",ten:"10",jack:"J",queen:"Q",king:"K"};function qa(t,e,i){const{textures:r}=e;let n=r.mcards,s=i.card.width,o=i.card.height,a=.8*s,h=a,u=.5*a,l=u,c=.1*u,d=new ea(this,e,{width:s,height:o}),p=Mo(),f=new ea(this,e,{width:a,height:h}),g=new ea(this,e,{width:u,height:l}),v=new pa(this,e,{size:u}),m=new ea(this,e,{width:s+2,height:o+2,texture:n.highlight}),y=this.container=new ko;let _,w;y.addChild(d),y.c.addChild(p),g.anchor(.5),g.container.move(.5*u+c,.5*l+c),p.addChild(g.container.c),f.anchor(.5),f.container.move(s-.5*a-c,o-.5*h-c),p.addChild(f.container.c),v.container.move(s-u-c,c),p.addChild(v.container.c),m.move(-1,-1),y.addChild(m),this.init=t=>{_=t.n,w=t.highlight,this.highlight(w),d.texture(t.back?n.back:n.front),t.back?p.visible=!1:(p.visible=!0,f.texture(n[t.suit]),g.texture(n[t.suit]),v.setText(Wa[t.rank]),"ten"===t.rank?v.container.move(s-u-4*c,c):v.container.move(s-u-c,c))},this.highlight=t=>{(w=t)?m.visible(!0):m.visible(!1)},this.n=()=>_,this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Ka(t,e,i){let r=new da(()=>new Za(this,e,i)),n=new qa(this,e,i),s=new Qo(0,0,{}),o=this.container=new ko;let a,h,u,l;o.addChild(n),this.init=t=>{r.each(t=>o.removeChild(t)),r.releaseAll();let{card:e,orig:i,dest:l}=t;a=e,h=i,u=Ao(l,i),n.init({...a}),s.both(0,1)};this.releaseTrail=t=>{o.removeChild(t),r.release(t)};const c=jo(()=>{s.settled()||(()=>{let t=r.acquire(t=>t.init(a));t.container.move(...l),o.addChild(t)})()},50,{});this.update=t=>{s.update(t/300),(()=>{let t=s.easing(ta.easeInOutQuad),e=Co(u,t);l=Po(h,e)})(),c(t),this.container.update(t)},this.render=()=>{l&&n.container.move(...l),this.container.render()}}function Za(t,e,i){let r=new qa(this,e,i);(this.container=new ko).addChild(r);let n=new Qo(0,0,{});this.init=t=>{r.init(t),n.both(0,1)};const s=()=>{n.settled()&&t.releaseTrail(this)};this.update=t=>{s(),n.update(t/500),this.container.update(t)},this.render=()=>{let t=1-n.value();t=function(t,e){return Math.round(t/e)*e}(t,.3),r.container.scale(t,t),r.container.alpha(t),this.container.render()}}function $a(t,e,i){let r=t.gsolitaire,n=new da(()=>new Ka(this,e,i)),s=this.container=new ko;this.init=t=>{},[0,1,2,3].forEach(e=>{r.holeEndN(e).subscribe(r=>{let o=t.dHoleN(e).nextCardGlobalPosition(),a=[Ha(0,.5*i.width),Ha(0,i.height-i.card.height)],h=n.acquire(t=>t.init({card:r,orig:o,dest:a}));s.addChild(h)})}),r.oGameReset.subscribe(t=>{n.each(t=>s.removeChild(t)),n.releaseAll()}),this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Ja(t,e,i){let r,{contents:n}=i;const s=()=>n[r];this.canNext=()=>rr>0,this.isLast=()=>r===n.length-1,this.first=()=>a(0),this.next=()=>a(r+1),this.back=()=>a(r-1);let o=this.container=new ko;const a=t=>{if(void 0!==r){let t=s();o.removeChild(t)}r=t,o.addChild(s()),ra(i.onContentChanged,r,this)};this.init=t=>{this.first()},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Qa(t,e,i){const r=t=>()=>ra(t);let n=new th(this,e,{label:"Close",width:.2*i.width,height:i.height,onTap:r(i.onClose)}),s=new th(this,e,{label:"Next",width:.2*i.width,height:i.height,onTap:r(i.onNext)}),o=new th(this,e,{label:"Back",width:.2*i.width,height:i.height,onTap:r(i.onBack)}),a=new th(this,e,{label:"Play",width:.2*i.width,height:i.height,onTap:r(i.onClose)}),h=new Sa(this,e,{}),u=new Sa(this,e,{gap:.02*i.width});this.placeButtons=t=>{let{close:e,next:r,back:l,play:c}=t;h.contents(e?[n]:[]);let d=[];l&&d.push(o),r&&d.push(s),c&&d.push(a),u.contents(d),u.container.right(i.width)};let l=this.container=new ko;l.addChild(h),l.addChild(u),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function th(t,e,i){const{textures:r}=e,n=r.mhud;let s=new ea(this,e,{width:i.width,height:i.height,texture:n.wbutton}),o=new xa(this,e,{label:i.label,size:.5*i.height,fontFamily:"Roboto",fill:16777215,align:"center"}),a=this.container=new ko;a.addChild(s),a.addChild(o),o.container.center(i.width,i.height),this.init=t=>{};const{events:h}=e,u=aa(()=>{ra(i.onTap)},h,()=>a.bounds());this.update=t=>{u(t),this.container.update(t)},this.render=()=>{this.container.render()}}function eh(t,e,i){let{page:r,total:n}=i,s=` of ${n}`,o=new xa(this,e,{label:(()=>`${r}`)(),size:i.size,fill:16777215,fontFamily:"Roboto"}),a=new xa(this,e,{label:s,size:i.size,fill:16777215,fontFamily:"Roboto"});this.page=t=>{r=t,(()=>{o.text(r);let t=o.container.bounds();a.container.moveX(t.width)})()};let h=this.container=new ko;(()=>{h.addChild(o),h.addChild(a);let t=o.container.bounds();a.container.moveX(t.width)})(),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function ih(t,e,i){const{textures:r}=e,n=r.mhud;let{contents:s}=i,o=i.tutorial.width-2*i.uiMargin,a=new ya(this,e,{width:i.tutorial.width,height:i.tutorial.height,tileWidth:32,textures:n.menubg9}),h=new xa(this,e,{label:i.header,size:i.text.h1,fontFamily:"Roboto",fill:16777215}),u=.1*i.tutorial.height,l=new Ca(this,e,{fontFamily:"Roboto",fill:16777215,size:.6*u,label:"Don't show again",width:.1*i.tutorial.width,height:u,onCheck(){ra(i.onDontShow)}}),c=s.map(t=>new xa(this,e,{label:t,size:i.text.p,fill:16777215,fontFamily:"Roboto",wordWrap:!0,wordWrapWidth:o})),d=new eh(this,e,{size:i.text.p,total:c.length}),p=.14*i.height,f=new Qa(this,e,{width:i.tutorial.width-2*i.uiMargin,height:p,onClose(){ra(i.onClose)},onNext(){g.next()},onBack(){g.back()}});let g=new Ja(this,e,{contents:c,onContentChanged:(t,e)=>{d.page(t+1),(t=>{let e=t.canNext(),i=t.canBack(),r=e,n=!e,s=!n;f.placeButtons({back:i,next:r,play:n,close:s})})(e)}}),v=this.container=new ko;(()=>{v.addChild(a),v.addChild(l),v.addChild(d),v.addChild(h),v.addChild(g),v.addChild(f),f.container.move(i.uiMargin,i.tutorial.height-p-i.uiMargin),l.container.move(i.uiMargin,i.tutorial.height-p-u-2*i.uiMargin);let t=d.container.bounds();d.container.move(i.tutorial.width-.5*t.width-i.uiMargin,i.uiMargin),h.container.move(i.uiMargin,i.uiMargin);let e=h.container.bounds();g.container.move(i.uiMargin,i.uiMargin+e.bottom)})(),this.setDontShow=t=>{l.dO.smoothcheck(t)},this.init=t=>{g.first()},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function rh(t,e,i){let{content:r}=i,n=new Qo(0,0,{}),s=this.container=new ko;s.addChild(r),this.fadeIn=t=>{s.showStartUpdate(),t?(n.value(n.value()),n.target(1)):(n.value(n.value()),n.target(0))},this.init=t=>{},this.update=t=>{n.update(t/200),0===n.value()&&n.settled()&&s.hideStopUpdate(),this.container.update(t)},this.render=()=>{let t=n.value();s.alpha(t),this.container.render()}}function nh(t,e,i){let r=t.gsolitaire,n=t.cardGame,s=new ih(this,e,{header:"How to Play",contents:["The goal of Solitaire is to create a stack of cards from low to high in each of the four foundation piles. Each pile can contain only one suit.","In Solitaire, aces are low and kings are high. The four foundation piles must begin with aces and end with kings.","Near the foundation piles, you can move cards from one column to another. Cards in columns must be placed in descending order and must alternate red and black. For example, you can put a red 6 on a black 7","You can also move sequential runs of cards between columns. Just tap the deepest card in the run and drag them all to another column.","If you ever have an empty column, you can place a King there or any sequential stack with a King at its head.","If you get stuck, tap the deck in the upper-left corner to draw more cards. You can deal it again by tapping the red O icon. You can double tap on a card to automatically place it in a hole."],onClose(){a(!1)},onDontShow(){n.userActionOptionShowTutorialCheck("solitaire")},...i}),o=new rh(this,e,{content:s});const a=t=>{t&&s.init(),o.fadeIn(t)};(this.container=new ko).addChild(o),r.oShowTutorial.subscribe(t=>{a(!0)}),n.oOptions.showTutorial.solitaire.subscribe(t=>s.setDontShow(!t)),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function sh(t,e,i){let r=t.cardGame,n=t.gsolitaire;const{events:s}=e;let o,a=Promise.resolve();const h=sa({onBegin(e){let i=Date.now();if(o&&i-o<300)return a.then(()=>{let i=t.getHitKeyForEpos(e);i&&n.userActionDoubleClick(i)}),void(o=null);o=i;let r=t.getHitKeyForEpos(e);n.userActionDragStart({epos:e,...r})},onMove(t){n.userActionDragMove(t)},onEnd(e){let i=t.getHitKeyForEpos(e);a=n.userActionDragEnd({epos:e,...i})}},s);this.container=new ko;this.init=t=>{};let u=!1;r.oHamburger.subscribe(({open:t})=>{u=t}),this.update=t=>{u||h(t),this.container.update(t)},this.render=()=>{this.container.render()}}function oh(t,e,i){const{events:r}=e;let{onBeginCard:n,onEndCard:s}=i,o={width:i.card.width,height:i.card.height},a=this.container=new ko;let h;this.init=t=>{},this.getHitCardForEpos=t=>{let e=a.globalPosition(),i={x:e.x,y:e.y,...o};if(ha(...t,i)){return{decay:[-t[0]+i.x,-t[1]+i.y]}}return null};let u=na({onBegin(t){let e=a.globalPosition();if(h={x:e.x,y:e.y,...o},ha(...t,h)){let e=[-t[0]+h.x,-t[1]+h.y];n&&n(t,e)}},onUpdate(){},onEnd(t){ha(...t,h)&&s&&s()}},r);this.update=t=>{u(t),this.container.update(t)},this.render=()=>{this.container.render()}}function ah(t,e,i){const{textures:r}=e;let n=r.mcards,s=new ea(this,e,{width:i.width,height:i.height,texture:n.highlight}),o=new Qo(1,1,{});(this.container=new ko).addChild(s),this.init=t=>{o.both(0,1)},this.update=t=>{o.update(t/500),this.container.update(t)};let a=.25*i.width;this.render=()=>{let t=o.easing(ta.easeInQuad),e=a*t;s.move(-e,-e),s.size(i.width+2*e,i.height+2*e),s.alpha(1-t),this.container.render()}}function hh(t,e,i){this.gsolitaire=t.gsolitaire,this.solitaire=t.solitaire;let r=[new uh(this,e,{n:0,...i}),new uh(this,e,{n:1,...i}),new uh(this,e,{n:2,...i}),new uh(this,e,{n:3,...i})];this.dHoleN=t=>r[t],this.getHitKeyForEpos=t=>r.reduce((e,i)=>e||i.getHitCardForEpos(t),null);let n=this.container=new ko;r.forEach((t,e)=>{t.container.move(0,e*i.holes.height+2*i.stackMargin),n.addChild(t)});this.gsolitaire.pSelection.subscribe(({active:t,holeN:e})=>{if(!Ls(e))return;let i=this.dHoleN(e);t?i.highlight(!0):i.highlight(!1)}),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function uh(t,e,i){let r=t.gsolitaire;t.solitaire;const{textures:n}=e;let s=n.mcards,{n:o}=i,a=i.card.width,h=i.card.height,u=new ea(this,e,{width:a+2,height:h+2,texture:s.highlight}),l=new ah(this,e,{width:a+2,height:h+2}),c=new oh(this,e,i),d=new qa(this,e,i);this.nextCardGlobalPosition=()=>{let{x:t,y:e}=d.container.globalPosition();return[t,e]},this.getHitCardForEpos=t=>{let e=c.getHitCardForEpos(t);return e&&(e.holeN=o),e};let p=this.container=new ko;p.addChild(c),p.addChild(d),u.container.move(-1,-1),p.addChild(u),l.container.move(-1,-1),p.addChild(l),d.highlight(!1),r.holeN(o).subscribe(t=>{let e=t.top();e?(u.visible(!1),d.container.visible(!0),d.init(e)):(u.visible(!0),d.container.visible(!1))}),r.holeInN(o).subscribe(t=>{l.init()}),this.highlight=d.highlight,this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function lh(t,e,i){const{events:r}=e;let{onBeginCard:n,onEndCard:s}=i,o=new da(()=>new qa(this,e,i)),a=[],h=new Qo(0,0,{}),u=this.container=new ko;this.init=t=>{let e=t.stack,r=t.inProgress;a.forEach(t=>u.removeChild(t)),a=[],o.releaseAll(),e.forEach((t,e)=>{let i=o.acquire(i=>{i.init({n:e,...t})});a.push(i),u.addChild(i)}),r||this.extend(i.stacks.height),this.highlight(!1),this.render()},this.extend=t=>{let e=t/(a.length+3);e=Math.min(e,.4*i.card.width),h.value(h.value()),h.target(e)},this.empty=()=>0===a.length,this.highlight=t=>{a.forEach(e=>e.highlight(t))},this.highlightCard=t=>{a[t].highlight(!0)},this.highlightCards=t=>{t.forEach((t,e)=>this.highlightCard(a.length-1-e))};this.getHitCardForEpos=t=>{let e=h.value(),i=(a.map(t=>t.container.bounds()),a.find((i,r)=>{let n=r===a.length-1,s=i.container.bounds(),o={x:s.x,y:s.y,width:s.width,height:n?s.height:e};return ha(t[0],t[1],o)}));if(i){i.container.globalPosition();let e=i.container.bounds(),r=[-t[0]+e.x,-t[1]+e.y];return{cardN:i.n(),decay:r}}return null};const l=na({onBegin(t){let e=h.value(),i=a.find((i,r)=>{let n=r===a.length-1,s=i.container.bounds(),o={x:s.x,y:s.y,width:s.width,height:n?s.height:e};return ha(t[0],t[1],o)});if(i){let e=i.container.bounds(),r=[-t[0]+e.x,-t[1]+e.y];n&&n(i.n(),t,r)}},onUpdate(){},onEnd(t){let e=a.find((e,i)=>{let r=e.container.bounds();return ha(t[0],t[1],r)});e&&s&&s(e.n())}},r);this.update=t=>{l(),h.update(t/200),this.container.update(t)};const c=t=>{let e=h.value();return p(t,e)},d=()=>c(a.length);this.nextCardGlobalPosition=()=>{let t=u.globalPosition(),e=d();return[t.x,t.y+e]},this.lastCardGlobalPosition=()=>(t=>{let e=u.globalPosition(),i=c(t);return[e.x,e.y+i]})(a.length),this.nextCardLocalPosition=()=>[0,d()],this.cardsHeight=()=>{let t=h.target();return p(a.length+3,t)};const p=(t,e)=>t*e;this.render=()=>{(()=>{let t=h.value();a.forEach((e,i)=>{let r=p(i,t);e.container.move(0,Math.round(r))})})(),this.container.render()}}const ch={back:!0},dh=(()=>{let t={};for(let e=0;e<8;e++)t[e]=new Array(e).fill(ch);return t})(),ph=t=>{let e=As();e.test();let i=[];for(let r=0;rr[t];let n=this.container=new ko;r.forEach((t,e)=>{t.container.move(e*i.stacks.width,0),n.addChild(t)}),this.getHitKeyForEpos=t=>r.reduce((e,i)=>e||i.getHitCardForEpos(t),null);this.gsolitaire.pSelection.subscribe(({active:t,stackN:e,cards:i})=>{if(!Ls(e))return;let r=this.dStackN(e);t?r.highlightCards(i):r.highlight(!1)}),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function gh(t,e,i){let{n:r}=i,n=new lh(this,e,i),s=new lh(this,e,i),o=new oh(this,e,i);this.getHitCardForEpos=t=>{let e=[n,o].reduce((e,i)=>e||i.getHitCardForEpos(t),null);return e&&(e.stackN=r),e},this.highlight=n.highlight,this.highlightCards=n.highlightCards,this.nextCardGlobalPosition=n.nextCardGlobalPosition,this.lastCardGlobalPosition=s.lastCardGlobalPosition;let a=this.container=new ko;a.addChild(o),a.addChild(s),a.addChild(n),this.init=t=>{o.init()},this.update=t=>{this.container.update(t)};this.render=()=>{(()=>{let t=s.nextCardLocalPosition();n.container.move(t[0],t[1])})(),this.container.render()};const h=(t,e)=>{let r=t+e,o=i.stacks.height/(r+3),a=o*t,h=o*(e+3);s.extend(a),n.extend(h),s.render(),n.render(),this.render()};t.gsolitaire.stackN(r).subscribe(t=>{let e=t.inProgress();n.init({stack:t.front,inProgress:e}),s.init({stack:dh[t.hidden.length],inProgress:e}),e||h(t.hidden.length,t.front.length)})}function vh(t,e,i){let r=t.gsolitaire;t.solitaire;const{events:n,textures:s}=e,o=s.mhud;let a=new lh(this,e,{onBeginCard(){r.userActionDealDraw()},...i}),h=new lh(this,e,i),u=i.card.width-i.stackMargin,l=new ea(this,e,{width:u,height:u,texture:o.over}),c=this.container=new ko;c.addChild(a),c.addChild(h),h.container.move(0,i.card.height+i.deck.height),l.container.move(.5*(i.card.width-u),.5*(i.card.height-u)),c.addChild(l),l.visible(!1),this.dDrawN=h,this.deckGlobalPosition=a.lastCardGlobalPosition,this.showGlobalPosition=h.nextCardGlobalPosition,this.getHitKeyForEpos=t=>{let e=h.getHitCardForEpos(t);return e?e.drawN=!0:h.getHitCardForEpos(t),e},r.drawer.subscribe(t=>{let e=t.nbDeck();0===e?l.visible(!0):l.visible(!1),a.init({stack:dh[Math.min(3,e)]}),a.extend(i.deck.height),h.init({stack:t.showStack3()})}),r.fx("dealdraw").subscribe({onBegin(t,e){e()},onEnd(){}});r.pSelection.subscribe(({active:t,drawN:e})=>{e&&(t?h.highlightCards([0]):h.highlight(!1))}),this.init=t=>{};const d=oa({onBegin(){a.empty()&&r.userActionShuffle()},boundsFn:()=>l.container.bounds()},n);this.update=t=>{d(),this.container.update(t)},this.render=()=>{this.container.render()}}function mh({onBegin:t,onUpdate:e,onEnd:i}){let r,n,s=this.p=new Qo(0,0,{});this.begin=(e,i)=>{r=i,n=e,s.both(0,1),ra(t,n)};this.update=t=>{s.update(t),r&&ra(e,n,s.value()),s.settled()&&r&&(ra(i,n),r(),r=void 0,n=void 0)}}function yh(t,e,i){this.gsolitaire=t.gsolitaire,this.solitaire=t.solitaire;let r=new qa(this,e,i);this.container=new ko;let n,s,o=new mh({onBegin(e){let{cards:i,stackN:o,isHidden:a}=e;r.container.visible(!0),a?r.init(ch):r.init(i[0]),n=t.dDraw.deckGlobalPosition();let h=t.dStackN(o).nextCardGlobalPosition();s=[h[0]-n[0],h[1]-n[1]]},onUpdate(t,e){let i=Co(s,e);r.container.move(n[0]+i[0],n[1]+i[1])},onEnd(){r.container.visible(!1)}});this.gsolitaire.fx("deal").subfun((t,e)=>{o.begin(t,e)}),this.init=t=>{},this.update=t=>{o.update(t/(1e3/30)),this.container.update(t)},this.render=()=>{this.container.render()}}function _h(t,e,i){let r=new qa(this,e,i),n=new qa(this,e,i),s=this.container=new ko;s.addChild(r),s.addChild(n),r.container.pivot(.5,0),n.container.pivot(.5,0),n.init(ch),s.visible(!1),this.init=t=>{},this.beginUnreveal=t=>{s.visible(!0),r.init({...t}),r.container.scale(1,1),n.container.scale(0,1)},this.beginReveal=t=>{s.visible(!0),r.init({...t,highlight:!1}),r.container.scale(0,1),n.container.scale(1,1)},this.updateUnreveal=t=>{t<.5?r.container.scale(1-2*t,1):n.container.scale(2*t-1,1)},this.updateReveal=t=>{t<.5?n.container.scale(1-2*t,1):r.container.scale(2*t-1,1)},this.endReveal=()=>{s.visible(!1)},this.endUnreveal=()=>{s.visible(!1)},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function wh(t,e,i){let r=new _h(this,e,i);(this.container=new ko).addChild(r);let n=new mh({onUpdate(t,e){r.updateReveal(e)}}),s=new mh({onUpdate(t,e){r.updateUnreveal(e)}});t.gsolitaire.fx("reveal").subscribe({onBegin({stackN:e,card:i},s){let o=t.dStackN(e).lastCardGlobalPosition();r.beginReveal(i),r.container.move(o[0],o[1]),n.begin(i,s)},onEnd(){r.endReveal()}}),t.gsolitaire.fx("unreveal").subscribe({onBegin({stackN:e,card:i},n){let o=t.dStackN(e).lastCardGlobalPosition();r.beginUnreveal(i),r.container.move(o[0],o[1]),s.begin(i,n)},onEnd(){r.endUnreveal()}}),this.init=t=>{},this.update=t=>{n.update(t/200),s.update(t/200),this.container.update(t)},this.render=()=>{this.container.render()}}function xh(t,e,i){this.gsolitaire=t.gsolitaire,this.solitaire=t.solitaire;let r=new lh(this,e,i);let n,s;(this.container=new ko).addChild(r),this.gsolitaire.bSelection.subscribe(({cards:t})=>{r.init({stack:t}),r.highlight(!0)}),this.gsolitaire.aSelection.subscribe(({active:t,activeEnding:e,epos:i,decay:n})=>{t&&!e&&n&&r.container.move(i[0]+n[0],i[1]+n[1])});let o=new mh({onBegin(e){let i,{drawN:o,stackN:a,holeN:h}=e;if(n=r.container.globalPosition(),Ls(a)){i=t.dStackN(a).nextCardGlobalPosition()}else if(Ls(o))i=t.dDraw.showGlobalPosition();else if(Ls(h)){i=t.dHoleN(h).nextCardGlobalPosition()}s=[i[0]-n.x,i[1]-n.y]},onUpdate(t,e){let i=Co(s,e);r.container.move(n.x+i[0],n.y+i[1])}});this.gsolitaire.fx("settle").subscribe({onBegin(t,e){o.begin(t,e)},onEnd(){r.init({stack:[]})}}),this.init=t=>{},this.update=t=>{o.update(t/200),this.container.update(t)},this.render=()=>{this.container.render()}}function bh(t,e,i){let r=new lh(this,e,i);this.gsolitaire=t.gsolitaire;let n,s;(this.container=new ko).addChild(r);let o=new mh({onBegin(e){let i,r,{srcDrawN:o,srcHoleN:a,srcStackN:h,dstStackN:u,dstHoleN:l,dstDrawN:c}=e;Ls(h)?i=t.dStackN(h):Ls(a)?i=t.dHoleN(a):o&&(i=t.dDrawN),Ls(u)?r=t.dStackN(u):Ls(l)?r=t.dHoleN(l):Ls(c)&&(r=t.dDrawN),n=i.nextCardGlobalPosition();let d=r.nextCardGlobalPosition();s=[d[0]-n[0],d[1]-n[1]]},onUpdate(t,e){let i=Co(s,e);r.container.move(n[0]+i[0],n[1]+i[1])}});this.gsolitaire.fx("move").subscribe({onBegin(t,e){r.init({stack:t.cards}),o.begin(t,e)},onEnd(){r.init({stack:[]})}}),this.init=t=>{},this.update=t=>{o.update(t/200),this.container.update(t)},this.render=()=>{this.container.render()}}function Eh(t,e,i){const{events:r}=e;let n=(()=>{let{width:t,height:e}=i,r=Math.round(.04*e/4),n=Math.round(.02*e/4),s=.1*r,o=e/4-4*n,a=64/89*o;o=Math.floor(o);let h=Fo(0,0,a=Math.floor(a),o),u=Fo(r,r,a,o),l=2*r,c=Fo(u.x1+l,r,a+r,e-r),d=Fo(c.x+7*c.width+l,c.y,0,o+3*n),p=Fo(0,0,a,.2*o),f=1.1*a,g=2*o,v=Fo(t-f,g,f,e-g-2*r),m={p:.03*t,h1:.05*t},y=.02*t;return{tutorial:Fo(0,0,.8*t,.9*e),uiMargin:y,text:m,deck:p,stackMargin:r,cMargin:s,card:h,stacks:c,holes:d,draws:u,bar:v,width:t,height:e}})(),s=this.cardGame=t.cardGame,o=this.gsolitaire=new La(s),a=this.solitaire=new Ua,h=new Va(this,e,n),u=new nh(this,e,n),l=new sh(this,e,n),c=new ca(this,e,n),d=new vh(this,e,n),p=new fh(this,e,n),f=new hh(this,e,n),g=new yh(this,e,n),v=new xh(this,e,n),m=new wh(this,e,n),y=new bh(this,e,n);this.dHoleN=f.dHoleN,this.dStackN=p.dStackN,this.dDrawN=d.dDrawN,this.dDraw=d;let _=new $a(this,e,n);this.getHitKeyForEpos=t=>{return[p,d,f].reduce((e,i)=>e||i.getHitKeyForEpos(t),null)};let w=this.container=new ko;w.addChild(l),w.addChild(c),w.addChild(d),d.container.move(n.draws.x,n.draws.y),w.addChild(p),p.container.move(n.stacks.x,n.stacks.y),w.addChild(f),f.container.move(n.holes.x,n.holes.y),w.addChild(g),w.addChild(m),w.addChild(y),w.addChild(v),w.addChild(u),u.container.center(n.width,n.height),w.addChild(_),w.addChild(h);let{fixtures:x,playStore:b,optionsStore:E}=e,T=!0;this.init=t=>{let e=b.play("solitaire");T&&(T=!1,e=x.playEnding),o.userInit({play:e,options:E.solitaire()})},o.oSaveState.subscribe(t=>{b.play("solitaire",t)}),this.remove=()=>{a.remove()};const S=sa({onMove(t){a.userActionMove(t)},onEnd(){a.userActionEndTap()}},r);this.update=t=>{this.container.update(t),S()},this.render=()=>{this.container.render()}}const Th=t=>(t||0===t)&&!(t<0);function Sh(t=[],e=[]){let i,r=this.options={};this.front=e,this.hidden=t,this.inProgress=()=>i,this.cutLast=()=>e.pop(),this.cut1=t=>e.splice(t,e.length-t),this.cutInProgress=t=>(i=!0,this.cut1(t)),this.cutInProgressCommit=()=>{i=!1},this.hide1=e=>{e.forEach(e=>t.push(e))},this.add1=t=>{t.forEach(t=>e.push(t))},this.clear=()=>{e=this.front=[],t=this.hidden=[]},this.reveal1=()=>t.pop(),this.unreveal1=()=>{r.dontExtend=!0,e.pop()},this.unreveal2=e=>{r.dontExtend=!1,t.push(e)};this.topCard=()=>(()=>e[e.length-1])(),this.canReveal=()=>0===e.length&&t.length>0,this.write=()=>{return`${writeStack(this.front)};${writeStack(this.hidden)}`},this.read=i=>{let[r,n]=i.split(";");e=this.front=readStack(r),t=this.hidden=readStack(n)}}const Ch=[0,1,2,3,4,5,6,7,8,9],Ah=(t,e)=>{t.topCard(),e[0];return!0};function Ph(){let t;this.nbDeck=()=>t?t.length:0,this.init=e=>{t=e},this.dealOnlyOne=()=>[t.pop()]}function Oh(){const t=[6,6,6,6,5,5,5,5,5,5];let e,i,r=0;this.init=()=>{i=!1,r=0,e=t.slice(0)},this.acquireDeal=()=>{if(i)return null;let t=e[r],n=r;e[r]--;let s=0;do{if(r=(r+1)%e.length,s++>e.length){i=!0;break}}while(e[r]<0);return 0===t?{i:n,hidden:!1}:{i:n,hidden:!0}}}function Ih(){let t=Ch.map(t=>Ho(new Sh)),e=Ho(new Ph),i=this.oBSelection=Ho({}),r=this.oASelection=Ho({}),n=this.oPSelection=Ho({}),s={move:Xo(),deal:Xo(),settle:Xo(),reveal:Xo(),unreveal:Xo()},o=this.stackN=e=>t[e],a=this.fx=t=>s[t];this.drawer=e;let h,u=Ps(),l=new Oh,c=new Dh;this.userInit=async t=>{await d(),await p(t.options),t.play||await g()};const d=async()=>{h=!1,await Go(300)},p=()=>{h=!0,t.forEach(t=>t.mutate(t=>t.clear()))};let f;const g=async()=>{for(u.shuffle(),e.mutate(t=>t.init(u.drawRest())),l.init(),f=!0;h;){let t=l.acquireDeal();if(null===t)break;await v(t)}f=!1},v=async(t,i)=>{let{i:r,hidden:n}=t,s=e.mutate(t=>t.dealOnlyOne());await a("deal").begin({stackN:r,cards:s,hidden:n,slow:i}),n?o(r).mutate(t=>{t.hide1(s)}):o(r).mutate(t=>{t.add1(s)})},m=t=>{_(t),y()},y=()=>{},_=t=>{c.mutate(e=>e.push(t))},w=()=>{n.mutate(t=>{t.active=!1})},x=(t,e)=>{let i=o(t).apply(t=>t.front.indexOf(e[0]));n.mutate(r=>{r.active=!0,r.stackN=!1,r.cardN=!1,r.stackN=t,r.cardN=i,r.cards=e})},b=(t,e)=>o(t).mutate(t=>t.add1(e)),E=(t,e)=>o(t).mutate(t=>t.cutInProgress(e)),T=t=>o(t).mutate(t=>t.cutInProgressCommit()),S=(t,e)=>o(t).apply(t=>Ah(t,e)),C=async t=>{if(!o(t).apply(t=>t.canReveal()))return null;let e=o(t).mutate(t=>t.reveal1());return await a("reveal").begin({stackN:t,card:e}),b(t,[e]),e},A=async t=>{let{stackN:e,cards:i,hasMoved:n}=r.apply(Wo),{stackN:s}=t;Th(s)&&s!==e&&S(s,i)?(await(async(t,e,i)=>{await a("settle").begin({stackN:e,cards:i}),b(e,i);let r=await C(t);m(async()=>{await actionUndoStackStack(t,e,i,r)})})(e,s,i),T(e)):(Th(s),await(async(t,e,i)=>{await a("settle").begin({stackN:t,cards:e}),b(t,e),T(t),i||x(t,e)})(e,i,n))},P=async(t,e,i)=>{let r=((t,e)=>o(t).mutate(t=>t.cut1(e)))(t,i),n=C(t),s=a("move").begin({srcStackN:t,dstStackN:e,cards:r}),h=await n;await s,b(e,r),m(async()=>{await actionUndoStackStack(t,e,r,h)})},O=async t=>{let{stackN:e,cardN:s}=t;if(await(async(t,e)=>{if(n.apply(t=>t.active)){let{stackN:e,cardN:i,cards:r}=n.apply(t=>t);if(Th(e)&&e!==t&&S(t,r))return w(),await P(e,t,i),!0}return!1})(e))return;if(!Th(s))return;let o=E(e,s);((t,e)=>{r.mutate(i=>{i.stackN=t,i.cards=e})})(e,o),w(),(t=>{i.mutate(e=>e.cards=t)})(o)},I=async()=>{if(!f)for(let t=0;t{let{epos:e,decay:i}=t,{stackN:n}=t,{active:s,activeEnding:o}=r.apply(Wo);s||o||(((t,e)=>{r.mutate(i=>{i.active=!0,i.stackN=!1,i.hasMoved=!1,i.epos=t,i.decay=e})})(e,i),Th(n)&&await O(t))},M=async t=>{let{epos:e,decay:i}=t,{activeEnding:n,active:s,stackN:o}=r.apply(Wo);s&&!n&&(r.mutate(t=>{t.activeEnding=!0}),Th(o)?await A(t):w(),r.mutate(t=>{t.activeEnding=!1}),r.mutate(t=>{t.active=!1}))},N=t=>async(...e)=>{await t(...e)};let k=function(){let t=Promise.resolve();return function(e){t=t.then(e)}}();this.userActionDealDraw=N(async()=>{await k(I)}),this.userActionDragStart=N(async t=>{await D(t)}),this.userActionDragMove=N(async t=>{await(async t=>{r.apply(t=>t.active)&&r.mutate(e=>{e.epos=t,e.hasMoved=!0})})(t)}),this.userActionDragEnd=N(async t=>{await M(t)}),this.userActionUndo=N(async()=>{await k(c.actionUndos)})}function Dh(){let t=Ho([]);this.effectUndoPush=e=>{t.mutate(t=>t.push(e))},this.actionUndos=async()=>{if(!t.apply(t=>t.length>0))return;let e=t.mutate(t=>t.pop());await e()}}function Mh(t,e,i){const{events:r}=e;let n;Promise.resolve();const s=sa({onBegin(t){let e=Date.now();if(n&&e-n<300)return ra(i.onDoubleClick),void(n=null);n=e,ra(i.onDragStart,t)},onMove(t){ra(i.onDragMove,t)},onEnd(t){ra(i.onDragEnd,t)}},r);this.container=new ko;this.init=t=>{};let o=!1;this.dontHandleMoves=t=>{o=t},this.update=t=>{o||s(t),this.container.update(t)},this.render=()=>{this.container.render()}}function Nh(t,e,i){let r=t.cardGame,n=t.gspider,s=new Mh(this,e,{onDragStart(e){let i=t.getHitKeyForEpos(e);n.userActionDragStart({epos:e,...i})},onDragMove(t){n.userActionDragMove(t)},onDragEnd(e){let i=t.getHitKeyForEpos(e);n.userActionDragEnd({epos:e,...i})}});(this.container=new ko).addChild(s),this.init=t=>{},r.oHamburger.subscribe(({open:t})=>{s.dontHandleMoves(t)}),this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function kh(t,e,i){let{n:r}=i,n=new lh(this,e,i),s=new lh(this,e,i),o=new oh(this,e,i);this.getHitCardForEpos=t=>{let e=[n,o].reduce((e,i)=>e||i.getHitCardForEpos(t),null);return e&&(e.stackN=r),e},this.highlight=n.highlight,this.highlightCards=n.highlightCards,this.nextCardGlobalPosition=n.nextCardGlobalPosition,this.lastCardGlobalPosition=s.lastCardGlobalPosition;let a=this.container=new ko;a.addChild(o),a.addChild(s),a.addChild(n),this.init=t=>{u(t),o.init()},this.update=t=>{this.container.update(t)};this.render=()=>{(()=>{let t=s.nextCardLocalPosition();n.container.move(t[0],t[1])})(),this.container.render()};const h=(t,e)=>{let r=t+e,o=i.stacks.height/(r+3),a=o*t,h=o*(e+3);s.extend(a),n.extend(h),s.render(),n.render(),this.render()},u=t=>{let e=t.inProgress();n.init({stack:t.front,inProgress:e}),s.init({stack:dh[t.hidden.length],inProgress:e}),e||h(t.hidden.length,t.front.length)}}function Rh(t,e,i){let r=t.gspider,n=Ch.map(t=>new kh(this,e,{n:t,...i}));this.dStackN=t=>n[t];let s=this.container=new ko;n.forEach((t,e)=>{t.container.move(e*i.stacks.width,0),s.addChild(t)}),this.getHitKeyForEpos=t=>n.reduce((e,i)=>e||i.getHitCardForEpos(t),null),this.init=t=>{};r.oPSelection.subscribe(({active:t,stackN:e,cards:i})=>{if(!Th(e))return;let r=this.dStackN(e);t?r.highlightCards(i):r.highlight(!1)}),Ch.forEach(e=>{let i=this.dStackN(e);t.gspider.stackN(e).subscribe(i.init)}),this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Lh(t,e,i){let r=new qa(this,e,i);let n,s;(this.container=new ko).addChild(r);let o=new mh({onBegin({card:t,settleTarget:e,settleSource:i}){r.container.visible(!0),r.init(t),n=i,s=[e[0]-n[0],e[1]-n[1]]},onUpdate(t,e){let i=Co(s,e);r.container.move(n[0]+i[0],n[1]+i[1])},onEnd(){r.container.visible(!1)}});this.beginDeal=(t,e)=>{o.begin(t,e)};let a=1e3/60;this.slow=t=>{a=t?1e3/30:1e3/60},this.init=t=>{},this.update=t=>{o.update(t/a),this.container.update(t)},this.render=()=>{this.container.render()}}function Fh(t,e,i){let r=t.gspider,n=new Lh(this,e,i);(this.container=new ko).addChild(n),r.fx("deal").subfun(({slow:e,hidden:i,stackN:r,cards:s},o)=>{let a=i?ch:s[0],h=t.dStackN(r).nextCardGlobalPosition(),u=t.dDraw.deckGlobalPosition();n.slow(e),n.beginDeal({card:a,settleSource:u,settleTarget:h},o)}),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Uh(t,e,i){let r=t.gspider,n=new lh(this,e,{onBeginCard(){r.userActionDealDraw()},...i});(this.container=new ko).addChild(n),this.init=t=>{},r.drawer.subscribe(t=>{let e=t.nbDeck();n.init({stack:dh[Math.min(3,e)]}),n.extend(.2*i.card.height)}),this.deckGlobalPosition=n.lastCardGlobalPosition,this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Bh(t,e,i){let r=new lh(this,e,i);let n,s;(this.container=new ko).addChild(r);let o=new mh({onBegin(t){n=r.container.globalPosition(),s=[t[0]-n.x,t[1]-n.y]},onUpdate(t,e){let i=Co(s,e);r.container.move(n.x+i[0],n.y+i[1])}});this.beginDrag=t=>{r.init({stack:t}),r.highlight(!0)},this.moveDrag=(t,e)=>{r.container.move(t[0]+e[0],t[1]+e[1])},this.endDrag=()=>{r.init({stack:[]})},this.beginSettle=(t,e)=>{o.begin(t,e)},this.init=t=>{},this.update=t=>{o.update(t/200),this.container.update(t)},this.render=()=>{this.container.render()}}function Gh(t,e,i){let r=t.gspider,n=new Bh(this,e,i);(this.container=new ko).addChild(n),r.oBSelection.subscribe(({cards:t})=>{n.beginDrag(t)}),r.oASelection.subscribe(({active:t,activeEnding:e,epos:i,decay:r})=>{t&&!e&&r&&n.moveDrag(i,r)}),r.fx("settle").subscribe({onBegin({stackN:e},i){let r=t.dStackN(e).nextCardGlobalPosition();n.beginSettle(r,i)},onEnd(){n.endDrag()}}),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function jh(t,e,i){let r=new _h(this,e,i),n=new mh({onUpdate(t,e){r.updateReveal(e)}}),s=new mh({onUpdate(t,e){r.updateUnreveal(e)}});this.beginReveal=(t,e,i)=>{r.beginReveal(t),r.container.move(e[0],e[1]),n.begin(t,i)},this.endReveal=()=>{r.endReveal()},this.beginUnreveal=(t,e,i)=>{r.beginUnreveal(t),r.container.move(e[0],e[1]),s.begin(t,i)},this.endUnreveal=()=>{r.endUnreveal()};(this.container=new ko).addChild(r),this.init=t=>{},this.update=t=>{n.update(t/200),s.update(t/200),this.container.update(t)},this.render=()=>{this.container.render()}}function Hh(t,e,i){let r=new jh(this,e,i);(this.container=new ko).addChild(r),this.init=t=>{},t.gspider.fx("reveal").subscribe({onBegin({stackN:e,card:i},n){let s=t.dStackN(e).lastCardGlobalPosition();r.beginReveal(i,s,n)},onEnd(){r.endReveal()}}),t.gspider.fx("unreveal").subscribe({onBegin({stackN:e,card:i},n){let s=t.dStackN(e).lastCardGlobalPosition();r.beginUnreveal(i,s,n)},onEnd(){r.endUnreveal()}}),this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Xh(t,e,i){let r,n,s=new lh(this,e,i),o=new mh({onBegin(t){let{settleTarget:e,settleSource:i}=t;r=i,n=[e[0]-r[0],e[1]-r[1]]},onUpdate(t,e){let i=Co(n,e);s.container.move(r[0]+i[0],r[1]+i[1])}});this.beginMove=(t,e)=>{s.init({stack:t.cards}),o.begin(t,e)},this.endMove=()=>{s.init({stack:[]})};(this.container=new ko).addChild(s),this.init=t=>{},this.update=t=>{o.update(t/200),this.container.update(t)},this.render=()=>{this.container.render()}}function zh(t,e,i){let r=t.gspider,n=new Xh(this,e,i);(this.container=new ko).addChild(n),r.fx("move").subscribe({onBegin(e,i){let{cards:r,srcStackN:s,dstStackN:o}=e,a=t.dStackN(s),h=t.dStackN(o),u=a.nextCardGlobalPosition(),l=h.nextCardGlobalPosition();n.beginMove({settleSource:u,settleTarget:l,cards:r},i)},onEnd(){n.endMove()}}),this.init=t=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Yh(t,e,i){const{events:r}=e;let n=(()=>{let{width:t,height:e,bar:r}=i,n=t-r.width,s=.008*n,o=.002*n,a=(n-2*s)/11,h=a-o,u=h/(64/89);u=Math.floor(u);let l=Fo(0,0,h=Math.floor(h),u),c=Fo(s,e-l.height-s,a,0);return{width:t,height:e,card:l,stacks:Fo(c.x1+o,s,a,e-2*s),draws:c}})(),s=this.cardGame=t.cardGame,o=this.gspider=new Ih(s),a=new Nh(this,e,n),h=new ca(this,e,n),u=new Rh(this,e,n),l=new Fh(this,e,n),c=new Uh(this,e,n),d=new Gh(this,e,n),p=new Hh(this,e,n),f=new zh(this,e,n);this.dStackN=u.dStackN,this.dDraw=c,this.getHitKeyForEpos=t=>{return[u].reduce((e,i)=>e||i.getHitKeyForEpos(t),null)};let g=this.container=new ko;g.addChild(a),g.addChild(h),g.addChild(c),c.container.move(n.draws.x,n.draws.y),g.addChild(u),u.container.move(n.stacks.x,n.stacks.y),g.addChild(l),g.addChild(p),g.addChild(f),g.addChild(d),this.init=t=>{o.userInit({})},this.remove=()=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Vh(t,e,i){const{events:r,textures:n}=e;let s=new pa(this,e,{size:i.size}),o=new pa(this,e,{size:i.size}),a=new Qo(0,1,{yoyo:1}),h=this.container=new ko;s.setText(i.label),h.addChild(s),h.addChild(o),o.container.move(0,i.size+4),this.setText=o.setText,this.init=t=>{};const u=aa(()=>{i.onTap&&(i.onTap(),a.both(0,1))},r,()=>h.bounds());this.update=t=>{a.update(t/100),u(t),this.container.update(t)},this.render=()=>{let t=.1*a.value();h.scale(1-t),this.container.render()}}function Wh(t,e,i){const{events:r}=e;let{vertical:n}=i,s=new ea(this,e,{width:i.size,height:i.size,texture:i.icon}),o=new pa(this,e,{size:.5*i.size}),a=new Qo(0,1,{yoyo:1}),h=this.container=new ko;h.addChild(s),h.addChild(o),o.setText(i.text),n?o.container.move(0,i.size):o.container.move(i.size,.25*i.size),this.init=t=>{};const u=aa(()=>{i.onTap&&(i.onTap(),a.both(0,1))},r,()=>h.bounds());this.update=t=>{u(t),a.update(t/100),this.container.update(t)},this.render=()=>{let t=.1*a.value();h.scale(1-t),this.container.render()}}function qh(t,e,i){let r=t.gsolitaire;const{textures:n}=e,s=n.mhud;let o=(()=>{let{width:t,height:e,bar:r}=i,n=.1*r.width,s=4*n,o=r.width,a=o,h=Fo(0,n,.2*o,.2*a);return{newGame:h,moves:Fo(0,h.y1+s,.2*o,.2*a),undo:Fo(0,r.height-a,.5*o,.5*a),width:t,height:e}})(),a=new Wh(this,e,{text:"UNDO",icon:s.undo,size:o.undo.height,vertical:!0,onTap(){r.userActionUndo()}}),h=new Vh(this,e,{size:o.moves.height,label:"SCORE"}),{optionsStore:u}=e,l=new Vh(this,e,{label:" NEW\nGAME",size:o.newGame.height,onTap(){let t=u.solitaire();r.userActionNewGame(t)}}),c=this.container=new ko;a.container.move(o.undo.x,o.undo.y),c.addChild(a),l.container.move(o.newGame.x,o.newGame.y),c.addChild(l),h.container.move(o.moves.x,o.moves.y),c.addChild(h),this.init=t=>{},this.remove=()=>{},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Kh(t,e,i){let r=this.cardGame=new $o,n=(()=>{let{width:t,height:e}=i,r=(Math.round(.04*e/4),e/4-4*Math.round(.02*e/4)),n=64/89*r;r=Math.floor(r);let s=.09*t,o=.4*e;return{card:Fo(0,0,n=Math.floor(n),r),bar:Fo(t-s,o,s,e-o-2*(.01*t)),width:t,height:e}})(),s=new Ma(this,e,n),o=new Da(this,e,n),a=new Ga(this,e,{transition:Ba.SlideDown,content:o,...n}),h=new ma(this,e,n),u=new Eh(this,e,n),l=new qh(u,e,n),c=new Yh(this,e,n);let d=new la(this,e,{routes:{home:[h,new Jo(this,e,n)],solitaire:[u,l],spider:[c,l],freecell:[u,l]},...n}),p=this.container=new ko;p.addChild(d),p.addChild(s),p.addChild(a),r.oView.subscribe(t=>{let{home:e,game:i}=t;e?d.route("home"):d.route(i)}),r.oHamburger.subscribe(({open:t})=>{a.transition(t)});let{optionsStore:f}=e;this.init=t=>{r.init({options:f.getOptions()})},function(t,e){$s(e.oOptions.showTutorial,(e,i)=>{i.subscribe(i=>{t.setShowTutorial(e,i)})}),e.oOptions.solitaire.cardsPerDraw.subscribe(e=>{t.setSolitaireCardsPerDraw(e)})}(f,r),this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function Zh(t){const{canvas:e}=t;let i=new Kh(this,t,(()=>{let{width:t,height:i}=e;return{width:t,height:i}})());(this.container=new ko).addChild(i),this.init=t=>{i.init()},this.update=t=>{this.container.update(t)},this.render=()=>{this.container.render()}}function $h(t,e){const i=io(e);let r,n=i.assetsBase;const s=t=>n+t;k.SCALE_MODE=A.NEAREST,Fr.shared.add("mall",s("all.png")).add("greenbg",s("greenbg.png")).add("mscreen",s("screens.png")).add("mcards",s("cards.png")).add("mhud",s("hud.png")).add("mhud2",s("hud2.png")).add("mbg",s("bg.png")).add("mletters",s("letters.png")).add("fletters",s("fletters.png")).add("flettersjson",s("fletters.json")).add("pletters",s("pletters.png")).add("plettersjson",s("pletters.json")).add("mtapper",s("tapper.png")).load((e,n)=>{const s=new no(t),o=function(t){const e=e=>t[e].data,i=e=>t[e].texture,r=t=>(e,r,n,s)=>gs(i(t),e,r,n,s),n=t=>(e,r,n,s,o,a)=>vs(i(t),e,r,n,s,o,a),s=t=>(e,r,n,s)=>fs(i(t),e,r,n,s),o=r("mscreen"),a=n("mscreen"),h=s("mscreen"),u=r("mcards"),l=r("mhud"),c=n("mhud"),d=s("mhud"),p=r("mhud2"),f=n("mhud2"),g=s("mhud2");return{fletters:ps(i("fletters"),e("flettersjson")),fkerning:e("flettersjson"),pletters:ps(i("pletters"),e("plettersjson")),pkerning:e("plettersjson"),greenbg:i("greenbg"),mbg:i("mbg"),mscreen:us(o,a,h),mcards:ds(u),mhud:cs(l,c,d),mhud2:ls(p,f,g)}}(n),a=new Do(s);a.bindTouch(),s.bindResize();const h=new to,u=new eo,l=new qs;(r=new Zh({fixtures:l,playStore:u,optionsStore:h,canvas:s,config:i,textures:o,events:a})).init({}),s.withApp(t=>{t.stage.addChild(r.container.c),t.ticker.add(t=>{t=16/t,a.update(t),r.update(t),r.render()})})})}i.d(e,"app",function(){return $h})}]); \ No newline at end of file