diff --git a/.firebase/hosting.d3d3.cache b/.firebase/hosting.d3d3.cache new file mode 100644 index 000000000..b36e54001 --- /dev/null +++ b/.firebase/hosting.d3d3.cache @@ -0,0 +1,1529 @@ +1.61a26f097f464ab07297.js,1580478898801,d6cbfcc220007eb17385e8b18d421cf19d6e4fa0d62217a172a8798d5c0d2157 +105.42550c4dae298a9df06c.js,1580478898816,f4b7de6af7030b0d61efb1d4b8c18d23b2b3ed6a8ca62dc6f6779d5816fdccc8 +101.9d0d8a78a2ff2d1214a0.js,1580478898816,a0b1a65997f1fb14f6834649164337f6b01f09c7b2f7fe52dc09b090176806cc +102.7977c999bdeddb936980.js,1580478898816,c6b41b6d012796b779053e9011d115aa24d464aba100d408a4fed755e1766dbd +100.fa8a994f1b243fc7c67c.js,1580478898816,eb25223dde4bd3bbbacb340c7f99f3b3f1447d1d03c8b16e37f5feb2c49488e8 +104.bbff00b96271c7b3dbea.js,1580478898816,15ff4ba3217361d0c952cd33dd68da633068dcca6fbeec456fc1ff9b5fb9b3a8 +106.01c153a8aebae4803e74.js,1580478898817,b4c77a1121d4a1c46716b0d0db93edbd22b1fa7992466028896a09417fb765c8 +103.ce2e30f6e87701eda6fa.js,1580478898816,b37e6ee41a8737ebc70c84badd8fc002819c09787d05778440a3d92fef3a5c35 +107.a56b5c169d7463de5d02.js,1580478898816,57b38885f386aa3808dff6261e964dbaf8ed88932c5914fd587f19394ab4af9b +108.443cbe614917b8aac71d.js,1580478898816,225355788325bae43ca2c5f53f4ee706a32790bd5c7c9b06352f38fdfda40cad +109.70a6369181b8b07bc4ca.js,1580478898816,2ef0924a213df21a90f55eebddbd582494a691e2b1f7f87890ca3334c61b51d2 +112.753268832d878c3717ef.js,1580478898817,14a89734c18db141812f3a3540ff8de33f12bcb0dc296a6bd3a3c97248a9db5b +110.caadd1f14f27b173ea89.js,1580478898817,88c843bcb96d18649740d72c8d1e0a5e90d3a143808bf6c222a5051b55b1366a +111.ec147bad898c5704d8d9.js,1580478898817,3330a2f51e1249f44286deff02dd4e07102c10bca002e29db9e1b5aa3dd0f3df +113.c6baa4f1767422e50708.js,1580478898817,ff9b49fc41b76727fa75fc14163a3751d56e3ab56e46b0cb8e1dfe859f21b68b +116.1206453c879dbd1b0923.js,1580478898817,9dd088df1233b9a573314db25a2ffc0252bed43057bc39e8f68f4faba3ef1f32 +117.8290be0aecfa38b538a6.js,1580478898818,2a0c2a8917aeb797aa586ee2fbb793627ed110bf05036e8afd52fdf25923aa7a +118.2250a312c9b33ff2237a.js,1580478898818,a1d2b1b7146d74dde07af60f5af95a321458baeb202e929b86497633cce2b52a +121.e330fa09cb0602f22ac3.js,1580478898818,56e5cb06caca5887e147f1e8a6aa4be32d56b9cbb17ad5aab5afbabf15d79c0c +114.6b410ff5f33e5b42054c.js,1580478898817,48c3c3b64c4fbfce32150b70aacf77b29f12f7434ecf0e15667897fc8c10150b +119.635b195f3769fac32310.js,1580478898819,dcfa23ad9b923579d9f54605e6f61054570da116a3cdf277cae35892d1cc69c2 +122.b9a40a73feec6ea9f137.js,1580478898819,66f852cbb9730e5fd783f4fd024226134743a73e3d31e4f68974c3b69208bed6 +115.1ef2e806aa21ad1b10cf.js,1580478898817,b82e081ba1560ebe7e74b45160bd6aea98500ac5849b3eedf9f6cb2319d2f045 +123.128ae110fca7736d0312.js,1580478898818,d94258d87afdd42292e761e6d2c96de71407639153d5347ad642590fd27d47fd +120.d2c5105a2593dcebddb7.js,1580478898818,836561f7ef2c79061a83a740c0857f1c63f51139b2c008da8bc7277f7ae3972a +125.b6a01ebc76ba5982a21b.js,1580478898819,d80d1c4432c471c28a6898acf59b82a0b402cfcb3fd4856a257a3f723614d818 +124.d35e141a0a13fe61c881.js,1580478898819,080c4d70d5226f716924cc519aadc36923fcfd881ccb70683fb0f846c49cd7cb +128.bb4cf2898fa5d847cfe1.js,1580478898820,d546bebf63a1f83186f56abf55290eb564101d10417e446c003b839d59fa5cbb +129.6d7b74e09c9e13cfa066.js,1580478898821,4a87ffb459f595bedbcd2eed58c5a541c06fe4f4b197bafc447dbacb6766f45c +126.0781c6863d889604fccb.js,1580478898819,0046bab157f7c5645ba1446ec0b9fdd6dbfe5af8abf2ea96fcb5892339229be3 +127.10398ebe17d2f59f4798.js,1580478898819,1ba8d6bcb6b0002e6bf763fd38f3e35ee5df0261a1224b11bb67951b040c5318 +132.cb0eea497618007fd60f.js,1580478898821,180abea2851860ea8ca9b2249374bb3db6d910f31a40b66cef78c3789cae23cc +130.b4a86b789e731f335f3b.js,1580478898820,b92c59971b3494ed639264795b5de81a5660b5154169fa85c3d1686e15a309e1 +133.175b44e13be78cfee317.js,1580478898821,9d716d1377d6fd5ae42097201f19fb51cef3defe3e9a0de363938915326aef79 +134.43b2e53824d39615cbee.js,1580478898821,10dfe66d23932e7b4ed23ea69af9681205be9c1bc31f0fb0e6334c3e3933ba0a +135.684ab15108745f10971d.js,1580478898821,3043bc983623a0ed7a367176a3d003110a1d73a1d7d5be7cf39fcdf28f4c478f +131.fbefd995f9cf55acb5e0.js,1580478898821,e64f9d94ed1a94d394c852dacd8f95e95244a4cc56447affc3238146135526d9 +136.5de23d9da01a80574f1a.js,1580478898821,da4581dcd45ef41ddbc513ea4de94a2d86679f2959d8b612add6a35041a537c7 +14.2f8fac2ddd57bb4079e7.js,1580478898804,d66397857735c7ce051ef8878bc36723ac86a76de3f0cc3ddb8658d9503972ee +137.c32ec6bde80a85d046ab.js,1580478898821,a6e1bfaf351bfc9f53d372d481640df5747fc76a21dde3cf8ba39609c436d025 +138.439d1c6b560f20a2a164.js,1580478898821,43334822da261e21cdc1a864938915ffd9024448245eea2870285368565f6f0c +141.e85cd8598405ffe7022d.js,1580478898822,feeabc18ec630640df755635a059a94880742f2b35367ebd8c36ffa70259b5e1 +140.ad65d05f4de948f04e8f.js,1580478898821,f2fd01d52474500af5351b4ef8cdc53d2add58bc6ec7dfce1cf445faa0c181c8 +142.5438f0d84b486525db1d.js,1580478898822,d9d2acb2240fb4a990c902e8a40e902f71634d1b255b9baf1c6bfe7b0e26b439 +139.baf1fd4eb307438e4ba0.js,1580478898821,d15fbe1b263624f32aa4d32c90788ca7ca7a7d83f78d08d6385637aa9db13426 +144.b0d120408e2c753f1da2.js,1580478898822,7ec44ba5727c178cb43fdb20c42d92dd9a161d405cd415ac1794648c1ce2793d +145.73f6cb73fb869da76d29.js,1580478898822,cc74013701530a87f09b552b96fd77fd332730667b184fa4b2a59559acd9d496 +143.4446a4fb184cfa70c039.js,1580478898822,7885f2c0a2ca1401e5394ba38308972eeedf4a1bd3def8beb7e6a307cac237de +146.fb6c2bf11b46171e5dfc.js,1580478898822,2f22a408ccb1b0e7aa9e1bb5b022160dd89db43c909af3bb3e18eefea20693d5 +147.ee84971e1fb2989ae748.js,1580478898823,39c18845ab35129656b1131993fa6e567467476f20400a5cd08774ff322419c1 +148.bd87fbde8dcb10fd99b5.js,1580478898823,7fe547d1143b5abbd086d6549faedf3e283a65739733277e0f2e270c072fad7f +149.f959d965683717b52066.js,1580478898823,6c8fa86a0702b0793614867986a903ed993c045e2c9e412619279a8d2872f3e1 +153.50ba49f4cc223088cbb4.js,1580478898823,dbad3d3e5555da62de36012756e5fc227e0bc734bbe4c7e6fd20be1a1a91b33e +152.f4d7eddb51f29c56c661.js,1580478898823,cb2d120116fad666fd2db2e2e27af8d035a59602037fa58796a8e54f32660557 +15.f67c58d6f8654866281c.js,1580478898804,1fb56cd6c29edde7b63d9ea315ae79f0606c7cf957c3257a288f2f6a5053f0a0 +151.fe81dfa6a7452baabaa0.js,1580478898823,f4de6994335f679263d10f16e3142c1431521e00f1865f360963435dc9370cfa +155.6ded9a568464cbaf5ad5.js,1580478898823,5eed335ce9a4b7f928fa2d08573ed518e5cb5ff16bc1d449830e6458c2d5345e +154.496a30c1e2e6c9982018.js,1580478898823,6002e4796b63abf92e07970d0f6900b5d947551c96a490f6ab1aa30f9eb8874c +157.4365da2beade76ee70fe.js,1580478898823,b66c6de2a33af920bf2d73251b02e81c6799d47ccdad0ea5fac53fc1dfff9f6a +156.59ee91fa4665479aca3c.js,1580478898823,e0e0338abc4f3972269d507f0fd2ad8622e8e7d777686c9d09033f64044e0898 +160.c81fa792c15f015bdba2.js,1580478898824,ab2c4831e8bad069911e3aecf5307d4c2cc6f5f526bb779f1236c988a3df4865 +161.e023c902ccf45fea39d6.js,1580478898824,8356d3364195608c40db421426381e36f1286a9a836231e007a91f848b6577e8 +16.451f9b96e881b0a21c59.js,1580478898804,890df31e456494426a52a6a68231fe2ae120b976c8224db448b1cd298a3d069f +150.836502f3577cc6a57de4.js,1580478898823,ea8715622b35b31e707841af7fc25e395dbcc85d1d1299f031351100d0ec05c0 +162.809086080725e5322760.js,1580478898824,5a5d0c29372acfdc349e3322c58eeb2e439f56072d17045744e3204977f8afdf +158.4a5278396b8b4e22165b.js,1580478898824,5edf3baccc2a6e45f94cb51656079fa7296f064e6bba0bd32d71c31185585bae +164.26bfb4e5690d88b54391.js,1580478898824,e6081cb5706dba8309b1788cc37f0331046cfc7d34abc2661e503b7e2f5caf3e +159.d18b5a8ccad1a4da8ade.js,1580478898824,cea9f135cd8e009917b0a84a7731fcada822d7c133e037e9d11e420d2899c7b3 +166.bbe334c21d21fc019343.js,1580478898824,5cf937f5c17f89d8cdd9d1416fc8b394cca591201dd608f4985b615ab4f4cf57 +163.329192410823cbbf9ecb.js,1580478898824,116e6bbfa44334a6c4cd95ccbab9ee16d5bae10aef49db1930c5b446b98b80d0 +165.e9312c2a7d37b778e1bd.js,1580478898824,5e119dd2cf8c0815ea5360e247d1d73901935add076845058d0de69a04eb79ec +170.8a936542a61087a24277.js,1580478898826,f2370a412273470782dd43e19337ecd0162d1b96cd1a2e29905c5708a907c917 +167.e6cf40ef94714407a71c.js,1580478898825,42ef7fe7c211c2f47aef89e4f5db87557e7363f9f38247293cdabbd6cdc2eada +169.c4b1c53a0031c8ef80e6.js,1580478898825,b5166418511bd474aec913342bd658d2ce9ac97f01a1a1eb46e450f28755f367 +175.3543624a6b61cbfccdf1.js,1580478898826,a084e43c65702aff3e9c6ffa785f63768143c404d2e72eff39c8c8f09968b635 +174.16ee1c8b314298e9fe02.js,1580478898826,825bb840227d9088cfc1b18a2365b68dd110985d9d4a21ee0413e61d3622fe59 +168.26c1b841f5c05d3af4c1.js,1580478898824,21dfff71879aa735cfc32f5c77b321f1268670b9ebee51a075fcf68ad008124f +17.f013a9653d9c0647de1f.js,1580478898804,a254ca7df3bf519c7cffb6de80b596ec4d53220df9a75aff0b11dee71fea59c6 +171.924f0b1e80fe0ecaff1a.js,1580478898826,3b7cdf0c8f25e35a3f6fa1232abcf11676fa0f4c9253a6bd4e29124dcf92c78e +176.c17a494cc8cc38e32e37.js,1580478898826,b39f993a48c0fd57db8ab4d69678bbca6aa6c7b006b36c07d40fc6032cb19812 +18.d533ba0f066d95e3850e.js,1580478898804,5d4c4d6934748f8b335c4c4fe02b14d28369e731e1d32c407071dbf129cf39c9 +173.9e0e9ec781ec07bf17e1.js,1580478898826,8428a68fca3a9fc047467617bb18f03a3e907bafecb7fdc6b91ec0404b0bf3c1 +19.cbbadcd1b74d50f7a19d.js,1580478898804,8fd885ec9379b2a854c5b1a35327c729f3ebf435244feb8f0becd16326bb5c98 +20.11c2192b193b1c7dbe0e.js,1580478898804,0fc8198d6680a427783757b1e2b25576673281249ea6a6b919065a1de93596a3 +21.90d2c833b5a81d2df40d.js,1580478898804,81d521c584ee1ec9eb105b8ac064560006311870d06361d3d1123c5aa36a7824 +172.3c2d685e175f61ee8ab6.js,1580478898825,84067fe9ef4a0e2dceba166f5a6ce7842d4a00ceae0ba3899a74e02e3943f576 +25.102c95e49cd076990227.js,1580478898804,826813f230baeef2374d1be159c72ef7492d0df74e5cfe0d2c10699b31db9e51 +24.23edf4ee32855f646cb4.js,1580478898804,f0979f66bc79077b36f5800a1ec24647bd9e86c4d04b60dec0a544258a2578a5 +27.59c13c2b8232432acb07.js,1580478898805,843329a287271de5503ae7723d37e19236d22dbcaedfa09345415bcc9c65170c +26.07dac0c40f06e36a55d7.js,1580478898805,e82b2d1bbcb697fbba511acf4582dd28e37a6a389ad688bd94e8735dfc63a455 +28.c5fccefc47984f26490c.js,1580478898805,65c50c86cd74aaf30594b0a17874977aabb7aecb83471b2a40b0ecc6936e26d0 +23.710580bf7a004c8fe289.js,1580478898804,7b00faa8c19eb45068b9c053a75cbec33bd577e2fcd9a651d6dd031549bc9ded +29.ec202eca4d8c162b34ce.js,1580478898806,29e4e627fae01c56dfa9e6a05ab126ff7494d976356f73accf1a9de1ac1510c9 +22.cfbcc26442526a28b98b.js,1580478898804,59950214be59115ab2cc06c82b97c80f9a842f573c1b209c89fd1e22faeb0a6f +30.cb3a7a634ac89beb85a1.js,1580478898806,eefbc74c9869d48ac3dd10f9f24c29ff275b14507f9157e5907b6e75e87ec997 +3.cd739db5f44cafb06fdb.js,1580478898800,0dbbcf99d01fc902f8c34cd85c3bf34adef12b307298c1fc1591760a7c3c338a +32.0ae728abf7d321f2d7cd.js,1580478898806,9ebd3379924fb38654ee79d8ef7507823fca5e095c828cbafbf8de17a400e486 +33.243c78fdc53d93938b29.js,1580478898806,35f4645dc941debb7dce4d2260fa52b7a704f1f6d7ae1cb6c7fd57dea29efbff +34.071ccd086e82d6a86a3a.js,1580478898806,de91316daf1468ac071ac7d22047ab3cfb6e444634b6a1fced5f5f3f638dc2d9 +31.8cfbbd4d869bf6132995.js,1580478898806,c52e47f09aa0a214a2ee721f41aae66e057353049c3d371dd8bae1ecf75a3afc +35.a90b650d7d6053596f1a.js,1580478898806,b0923b5cf856471c4621f695a6f2f19bbde1ebad2fe6a54f4295bd7a4631632d +38.c9b126611dd6f490ddd6.js,1580478898806,e9a6f4b10149e5f38eee431cde8cda3555c2abcae2ae4fe0ea9aec9cd8c4c38e +36.ccf2018697f371f0234e.js,1580478898806,3d1c66a6f37eed2de46e762a12af4f932af6fe573e44afe722332976cd88291c +37.0fdb4aa391a5cbdb7813.js,1580478898806,3fbab6067889d8d64660c0f4b857b2350d8e68e766d4b59907b08ba6058aae5f +39.3f9c18d1f67109d943ca.js,1580478898806,9956d14cdcc01f082111b2c1dbeef203bcba09ababd3c2b3a787f19b8e08dc65 +4.5cc29a0ef82142ca3137.js,1580478898800,cbeae4651ec8942b1106eefe7d86bfe3e4cc698925b11a22ab518fc42ee57031 +40.a7723094a63edb1bae60.js,1580478898806,ed87fbd096c1d3ae557c5fae8685952ec9d029b4fb74e8d1a2b7782f231c974b +41.cb5ab3ba4e42a82e3822.js,1580478898807,4dc253b58eb4306115bb5f7265db7e13b39b3d1b2d7e7353f6f900b90532c108 +44.faeae82a65460df0cd8c.js,1580478898809,27eac3e665fa1e811fa261d0afcc29ce097bc721f8a30235006f6bcf4bbfce60 +42.fc530dc3d9204a6d1e19.js,1580478898807,6d4ac9e4d76b41386a067dbea484c3a74443773cc0706e867a5dc8a312bd210b +45.7eaae69696dda716fb4a.js,1580478898809,985e69c6a654ad474e0a8adbb8e9ec3e2711facf4168e3cdc5d41aa440bdef45 +43.4941930b91c0922c8cc2.js,1580478898807,b5b5365292f88166b01d4923e665d5893565b004cb32db7697cc44d6c1b475d3 +5.92e815376d2cf45cc1dd.js,1580478898800,50231db451dbb27aa1dccff42001a06d0b9b22fa2bf7ad941added28ff66a280 +48.659b17b28f0b0d953783.js,1580478898809,16157ac1d80670d18dae5f0d3ba3cbd4f9c8035ed7e2b23445dc511494b6eb32 +52.bdfec0da8a82cf022628.js,1580478898809,f266f4a19704e3704ab4f442fdb62138c4b314ad3d759bdd113687108c62d8f8 +49.7e0a2938f43f5f4c5735.js,1580478898809,044ad235a53b3d591f24dcb6509df71a4d231c7c643ce34330deddfdec2885af +47.bc9de91a0cfd99f89689.js,1580478898809,9b32e9dfdcb0f579c9c8d09691f18b075cb8460603987fabb83b50bcfd31afe2 +54.9ea7a3312729796a0512.js,1580478898809,132a2f3537d814947a95be8692ebc8ffeb979484aed5b1ac99252bfcfcc567e3 +53.2661db24b951988a48dc.js,1580478898809,0784de704d07d637065baba3495d250de23e402cc1353ba091e5cb3cf8b40582 +50.2978c87fcfcd4e3b9fd5.js,1580478898809,0885a0168ce9a9d76f4d1a40818052360314ae58fab65e3a412091bdc07b2610 +55.adc7f5f20ab87ac235fb.js,1580478898809,a6a73883f29f61db66455bd2a452e0d49419bb67719c1473e80ddab2d1529660 +6.abe27e46c4d674bf6989.js,1580478898801,53c1dc7b8881cf0cfb6da89f6c36ba5a725e842496e8ce4bf2051822318317fb +60.3130ee48a9166ff21ed4.js,1580478898811,a641dada4462478a98d7559bff92775ee63886aa5766444f4a2d2c27cf97590f +51.0227ec7c3d017adfcafd.js,1580478898809,0ac0b3477ac92b52f6206825fc55d89533bb65cc394042a549782d492e8de0ce +61.c4801816d23da12ec933.js,1580478898811,9c52726720640ce91bf8ca647c1bb490889755988786e6d35ac03c997d6a17b5 +56.a1b00e34f26f8106a991.js,1580478898810,e6573f3a02af06b189ec0555f5ec485a92c8b6e3fffba1ead6f6633cb2de361e +65.fb4d772e0169daedf26d.js,1580478898811,6ee6cc8f942657301d56b4b59fdbc24e49807348bf95454603063f56a9e9217d +57.e02fddbef1b03604bcb4.js,1580478898810,abea396c4286a557a930b195fc996575a502aca76603165dd148bfe98a113410 +64.d4450b1fa044c7f8a1cc.js,1580478898811,f40bf8289eb4f3c60974aa0cc8366c30d3843de64c00a2dc4bf58e2430143e92 +67.7e891ca173c027c37eab.js,1580478898811,5732dc18c68d9b01cda120aba1e4e819a6a60218a1f98428eb5b680b92947cad +66.80737484b5f75a3fde26.js,1580478898811,0321ab1ccb63ab0e075bf5afd3a1436213f36f952a04ce09d251b2788638f801 +58.2ac7985d9c435de6f446.js,1580478898810,556ef234bb15e1f03411243af59d51905047a9cf967cfabf20e3a0a6fff002b1 +59.6e032be3a4ff28c4762a.js,1580478898811,e30ce8cf438bbb415fa183b15448c33fb47bd45ce80dc9a044c46733c71e4c97 +7.88ae6fb1a7d4b283f65c.js,1580478898800,a0407f1eecba33fadb3f568dc9808340ddd2baa6ef9af0c7dd7af7fa4e3b5167 +72.e6eecc21bfe9e2b8cfa1.js,1580478898812,9ac0c46b33cca826cf1eb8bb32c0aff9fce42f5b18f90fd611745f3ce44cd484 +73.ed98ec5e3d7502c0f7e7.js,1580478898812,b3cfba8f9d1f710c0fc791020994d6a964fe9a2b5d6f21baa7af4ea5d16c49c4 +62.d22b60b85baf37eb8ca2.js,1580478898811,31515948d83c931ffd472c64fca19b8f14deea2e1feb345a73d0fd9fff4c2f9f +74.ba3fb1501ebe80646e50.js,1580478898813,d986a37acae3b0829c2c44964d2065a5735284d5a38da6f7eceff06e95808adc +75.63120cf8639ad9b1035e.js,1580478898813,a8060b27e2c9c96a84919a8120e3c707c5ffcee6d80e10a67976ed75956abf33 +71.d28fe59b0807e4be840b.js,1580478898812,adf97d83e69e4b479bcdba2a339c0a5188f05f41b9d50eb4b102356fe1acd4a2 +70.70f4b4731ee2b82e177a.js,1580478898812,35c702a7bc3f4bb10f9202d3fdd3ff1e0da41e857aa3cfb5ef50c3fda4b658ee +76.43d57d3d03d7021e8dba.js,1580478898813,d2e9dc7a78c8f22364f2097a756407d5434e803e034fffd07538ac006d3366a9 +78.e14ecd2633fe9929f769.js,1580478898813,f37b0559d48522e1c1025f1b68c656416711008033cc99fe4a3d0d229d030aaa +77.0d68b24657eaa886105e.js,1580478898813,c6111ecc9b9f40e4e6786f94f26e3cf2c445962b8ea3632c36af556a8ecf052b +46.f291ecc76c214fecf434.js,1580478898809,f6f6b77cbf0e0b57e2a93612df296354382974165b42bff851d239a5e8f0146c +79.6e6c09584de4fe2ead90.js,1580478898813,1fb3799aad783fbae2c106f502eecaf5e5f9881fbe18a9c4573ec02a48c5e430 +3rdpartylicenses.txt,1580478898800,ed4074389df0376e440003299539a22179b6477d2e8d72a04666881b7ccc6669 +68.b64d8c1f47ec297ff85f.js,1580478898811,122520bd737f3abe29a8c4aee019e140e020a83c86f543c433fb884b586bb546 +63.59f411a84efc6c0c1cd8.js,1580478898811,fe8bc2cec5b6ec1d5e8516ef71acf5d60cccfb35d36079f0b3dc805bf88d4362 +69.1d7a7f35115c64ecd629.js,1580478898812,74372aca395387ec4e184ea1630c40b20364a3c9ddb875cd40fca46aae26d0bb +81.74ff1a893125a3b1d2c4.js,1580478898813,4ed529dfa6511d2f177ee1a460bf068443969ce31cf17de5743732afdc3f7e30 +80.e99d4e3edf0bb5b88a51.js,1580478898813,461b8091cd4eca3d0e7a354b47ee70818f41008ce09e2922921c1dc0ebfaac3f +82.c1c45f82a3a2b87431b5.js,1580478898813,62db4708a8d20a932130199d027cca3755b181fa118e35f98bd480fcf667f272 +83.c713da69f19e67e99e38.js,1580478898813,5576551489e3c2dbc8e2cd95ac17fd81412ea5231ee922d36f3e5ddeb19a903c +84.1011ac194ef4a59cc639.js,1580478898814,6fa0281165d8bd219a53d2630f01ea54a46ac42b1594120f37a34a83c88e97d5 +85.e279b3f2c04a68594867.js,1580478898814,ca5d1c99ce48b805b0a899c2a63965c71fe5bbfd662f83b2d5edc4da4c6b28b5 +86.227bed5f8601bb2ce4c7.js,1580478898814,afe4c70ea124ddbaa38cd284d73c27af3c1b069cfe19373176a17733385347d4 +89.ad8547c0cbf2b9c67de1.js,1580478898815,6829507a1bd72ee4de31c76f4df53b6e017f12a984447f083671c56f67cc1c22 +87.9f528cf9f66c52854100.js,1580478898814,d45f4330e46fe90b97d074a4cb17294717d3f777f837324fbefd269746b84281 +88.0d502e2a147f0cc5f772.js,1580478898814,e33e4a6f409694250d01151aa594cf0595d482ab13b57da04295d270b61baa69 +9.7e8f76eb03354b884754.js,1580478898800,0cee37dd39d0144bbe2d8f3216f217d56ccc47092f9ccc13b14ae1a20afb0658 +91.7415647a12a73a99c198.js,1580478898815,5da56bc9f6ecd04958c1fd33ecd76f44d02cbe3e234f6591c7075bdc56b0bd64 +90.44e979035767bc5ce654.js,1580478898815,140bd00f59468765c58789f2b5c52f0ddb9759f42424c0517f81fe6ecb9ad1d9 +94.e55fe1c9642848c74b4e.js,1580478898815,c88cd8365c2f3259bf7d252ec12a38017b3b4b120660d7aa77f716d2c2a4448f +92.4c68fd35c84580597e81.js,1580478898815,aaa442bf13184470028ee284d91645c72b54329612412a23878632793b1ab44e +95.b98dfa09836c356698cc.js,1580478898815,e98a87050839c07018ae1eb8f09eec306527a78ff6908a78c9e2c67f3e95bf27 +96.7ac8477b665c8429295d.js,1580478898815,2687f8dfd98dec92539b4e66246fec155c768eebd7d368ac677d49ac8786f339 +93.8f3b95643e85632dd4dd.js,1580478898815,fbe51e2e3e5cf18ee699239414afdde39811c3024494b17a98f1bef2f6e2cfd5 +97.012a616fafa296633c8a.js,1580478898815,32cbefc507d832d02853b630c95c13802cf021b663a92b85edb19481cdd53c15 +99.e500f3236f3aa16b948b.js,1580478898815,9bd807eb9bdb50d1ede801b9d66f93e4910c6042d777386a37afe28bb9bd941b +98.443fd9ab8b0df6be7ae4.js,1580478898815,41433536bfcbd8afe73ddc9d430d2afefa6a30e2dcd2804c1704d2bdb769dcaf +index.html,1580478899062,38a42384d0bb01f9596392ef4a08b936a0e1c754f95f050217a9756c43bfd01a +common.061ba2def8f106285019.js,1580478898801,248a127ede865f96040dea91f1d3c5b8b0865453eb0206d91cc8496af369522e +runtime.c4520e643ffa94dc8822.js,1580478898800,e67e3fc5546cce993780ecc0dc3f8efa8a9c07f5de7e7ac9001e10463e23a5c4 +assets/shapes.svg,1580478899062,b21e747ee911c1d3f8179a70c8201320f93c4067017e0defa0640e54a689a06c +styles.bb278ecaae0e5dc0cb82.css,1580478898801,6cf62de562bb5b25ba963857729cea42c77fe61b9ec107704636e82649282083 +assets/altruism/altruism_list.json,1580478898930,d1a917718756e0b37ca274f21c5247deb9aae84f09cbbd79d108c20bf44a91c7 +es2015-polyfills.e5c723082c445f3e52b8.js,1580478898800,47a8b820657dd0e1cd58764371b22d6360bd51550d54813b5036877e46048602 +polyfills.71e9ddbc01ee01b46aa9.js,1580478898801,1c7b5beab7fb20a2310a295d502172c9b1465a421929d218f7d0ec3be273fee9 +8.13be7bcba3231340779b.js,1580478898800,09a5722fa322b84f2a76adf2bc0d6c5c6df4d42107e2269e4c6eaa702ee5d939 +assets/data/alex_survey.json,1580478898932,48c463eaf5d24f5f536f07a3632eb3b1d83c359407d5fc7e069d0bc86f3fc2c6 +assets/data/alex_survey_aya.json,1580478898932,f02a7b80c0f07a17ad7b917c64d9eb869280686809bf3a6825096a258faf78eb +assets/data/alex_survey_caregiver.json,1580478898932,cb9fd6b467d4babbcf742f31380ddb62366dc98b20aaa7bb3276227df6706a13 +assets/data/life_insight.json,1580478898932,98f3ec29dd7777737dc38a3250a6e4efd2e3b6d4a12aaa27d2529db7064c6754 +assets/data/temp_survey.json,1580478898932,ea8dca2ac49d7913a1f69ece9934bfacce0288f14294ef3d23281096b3791fdf +assets/data/temp_survey2.json,1580478898933,288f53acba70fa630092cd77f8c700075b0ae9cf752e94df192a11f401209537 +assets/fonts/eightbitwonder.fnt,1580478898933,e67aec1fb6ddb8e607122ef227cd33eb3f46dc3d83b792288a4c75453042b9b7 +assets/game/fishpoints.json,1580478898934,74d42d9530b7d6073ce6e80bc105b38c82b7baa26331697106539f2f61d26fdb +assets/game/sprite/5-pegions.json,1580478898935,8a7fbafe75d54bd160031d43427b493f3b31c898a3fc3c3149b6906041e10c7f +assets/game/sprite/angelfish.json,1580478898934,4d55ab1e6b04cf0dbcb299f4e94d282ea56913ab840f35e5587863425a26bd19 +assets/game/sprite/angryfish.json,1580478898934,2fea60fcf4108e1d9043352bc95bbca2aeea316ad0bafc509e30a631cc31fb5e +assets/game/sprite/attack_plant.json,1580478898935,ec6fe1ba7badb0573fd19793f61ac06612d8cb1f5a2625b93a4259ad045a745e +assets/game/sprite/betta.json,1580478898936,811d3ffc538509e476abe5161a77aeb6549d60752899bfc7196e2443bcc3f452 +assets/game/sprite/bird_tundra_sprite.json,1580478898936,80d9ff956837b981cf2bfa8303097d94786da386901bb5a0d2081049b267a300 +assets/altruism/altruism_1.png,1580478898931,e25536363612abada81543641e7df9cd9a36d75bc436b8d114746448343d6b03 +assets/game/sprite/5-pegions.png,1580478898935,1dce6b09411b5bc5b47b90564cb8b0f83d290189bc4bfdd4937cf6dc5cb070ba +assets/game/sprite/angryfish.png,1580478898935,d2e5c9a796ed44d0000a22b8bd7f9af6bc6cac6b3125f6ebc919406772e0fffc +assets/fonts/eightbitwonder.png,1580478898933,10de9e5df795493521f5a9439171b31ba45c4a1cbe2984c88a06328ce355a5a0 +assets/game/sprite/bird_tundra_sprite.png,1580478898936,ce9145c6190b7d9ce88ec8997f8a765f1b0f9afd3a7f26bd0d20929db88bf5f2 +assets/game/sprite/black-diver-sprite.json,1580478898936,2ea4fc3567edf1feae36d09af2bc7618839b97319203712c6b91ac9cdd7d3b69 +assets/game/sprite/brave_lion_idle-0.json,1580478898936,58c0923e8bc8b0397b5216b6ebf5f21c8bc687f0b01a83f08d054f28e84b8b6e +assets/game/sprite/brave_lion_jump-0.json,1580478898937,904d4cc8eca46bcb6ebdc632dab3097e681eb489360e795bed6a0f4c87c76d90 +assets/game/sprite/brown_bear.json,1580478898937,9f2e9628cd932ca1aa3678770aac1c829fda8f1beb52796d824674c010362a75 +assets/game/sprite/butterfly.json,1580478898938,f449c72f99d94a106c17c794d17ace0079794f619f9759a1cbafca700ca9d240 +assets/game/sprite/butterfly.png,1580478898940,67d646b3eb8247997944af3221d8e0562d7863b7c569edc8068e0d33569244af +assets/game/sprite/chicken_sprite.json,1580478898939,ef7d233a53605e010138cf2f3a1bfa1fde816f9f4350705782f1479574e26d74 +assets/game/sprite/clownfish.json,1580478898940,7c73a0efe80f3231a5e27f17aea50d223bb2b2e0e6903805492cfafdece1523c +assets/game/sprite/angelfish.png,1580478898934,279581fd4225dd22ac99fa3c78168df03cda45abfc7740f7d852a98d7fbec275 +assets/game/sprite/coyote_tundra_sprite.json,1580478898942,41ec0ca91d9847fcb652f2d8b7788b5a28d0f782b00571d49785cf4edd825415 +assets/altruism/message_6.png,1580478898932,ffb3fa982ab84bc581c81cbbf6ef227301873c0671b5496ee1c0848b5b7db481 +assets/game/sprite/brave_lion_idle-0.png,1580478898937,38648d370c7bc69e5657313992a751bcf91d1d0f7705080919749039fe9198a8 +assets/game/sprite/brave_lion_jump-0.png,1580478898937,fbfa9165e49d5b2725ad787d7dfbd5c793cc9d0d5de4255cbabc5d41a8fb416d +assets/game/sprite/cron_attack_sprite.json,1580478898942,508e0cab6f4ec3babe7b416f5f98c300df9714eec13e639fd2d245ad7ffe246f +assets/fonts/fontawesome-webfont.woff2,1580478898934,156e171dae6239bcd8304d42163d8b1e6bfd029759d46be88a4e446a51249ba2 +assets/altruism/message_4.png,1580478898931,29898621b57181fcd586057e61d86bc724485c461b81eb36434e1b102681533f +assets/game/sprite/bluestarfish.png,1580478898936,f487bbdcebfbb9e69c979282f741361917d1883de5622cf895a2b638307bc84e +assets/altruism/message_12.png,1580478898930,a8ecb2935811d96cecde2afec1d5478de6eefba03a960402634d9046317c11a1 +assets/fonts/fontawesome-webfont.woff,1580478898933,9cb84ef5f51a04cf0dd3a9aec98c43ad4d44df442b7454c6b448913e36fb0c43 +assets/game/sprite/coyote_tundra_sprite.png,1580478898942,7e521e0e2219163254f51fe8718bb88570375980d2dbe81ecf8e246dabd81b54 +assets/game/sprite/cron_stand_sprite.json,1580478898945,77eda4433b924612b687b3e7a49ee9b9ca7aa45ebc7f97d35126c0e952422e72 +assets/game/sprite/clownfish.png,1580478898942,d676e93ebc12f79492a4475862f390ad2643aa3852ba6de3e4839a6f1bc80f55 +assets/game/sprite/blueanchovy.png,1580478898936,23fafb106940db344f12e2b72c9b065b5c9096f9da59cbab0e3e27c0b7562c15 +assets/altruism/altruism_2.png,1580478898930,9d83c4c6ca602a0c3c52118c3a50cededbfc7fd0691403a1358d6e6ce2b18159 +assets/game/sprite/cron_attack_sprite.png,1580478898945,ca74c68697d30e22b29b3a3f5f7dc654446592fa2de0de3284273bb56a6da84b +assets/altruism/message_1.png,1580478898931,7f4610bc5880f93c80fae22fbb9482f1bc6f2bcba8ff2da483ce7ff7ad9a16ac +assets/altruism/message_15.png,1580478898930,a527d0f858d54d08b7309134012a1006299d738d2952cb9a650a46f6d462095d +assets/altruism/message_3.png,1580478898931,cba0b06324e474f945c43db56d8f6c0cede4804b8833b667a4935f1b1ab598bd +assets/game/sprite/discusfish.json,1580478898945,5d70eeaad34c9dda21efb362b266332aa96884870cecf2b2a23c7b3050488faa +assets/game/sprite/dolphin.json,1580478898945,9342b2b1bf842361309b9b09d69f3bb015aa56b83db1fc296c0f8df141ebce64 +assets/altruism/message_5.png,1580478898932,752595c37c1f3918f1bc7a9380c6bbea0b452ad08caaf672cd863f1f868d84ed +assets/altruism/message_7.png,1580478898932,9e4e258f3686df4f5b44098b644b108f6630af3e17923a81aa26cf17b66ac286 +assets/game/sprite/dori.json,1580478898946,ca0ceba76ecf25a740df2ec5bc8fe21282136682a41963f0a429eb7d5a993058 +assets/fonts/fontawesome-webfont.ttf,1580478898934,225dc03087123b26cb71296d418705ec2e89e826acd04bfe6fc6353a0f5220c8 +assets/game/sprite/dory2.json,1580478898946,54150d59881eb932d380583d1437c4fae2083149492af14c306b56996df6b48a +assets/altruism/message_2.png,1580478898931,fe0a01b57a15db7e07245111d1265b87db16a16c09aec3e72e797fac152401ad +assets/game/sprite/duck_sprite.json,1580478898946,93e410721b108c7a2f9cafe5db19fc349db45acaf6e4c7dfc21f57b79566b98b +assets/game/sprite/fat_swimmer.json,1580478898947,03e0b714c16935c3c30a29da38345c36e14fc1268ea615bad236806be2ea4ed8 +assets/fonts/fontawesome-webfont.eot,1580478898933,9acdf34fe486fad3cfa8ef4aa925ebbe9e955c8a8d127bff4d427620b0eeb643 +assets/altruism/message_13.png,1580478898930,51ee77ee84f44719d1a7a7bc050a2c903b4e65b743615898b017ce951bcb2bf2 +assets/altruism/message_10.png,1580478898929,e11b09f53b6546bf0a82e054f61709ee79f052c545b3d770e1a39f2d8a733e78 +assets/altruism/message_16.png,1580478898930,839d6383c6d1a5a79d8476e8a369eef5ab9388e6e595fb6b6962ee4f96a7f143 +assets/game/sprite/goldfish.json,1580478898947,991eed0556905b4c95fd5783097738e71acc08b1db3e1553e5e7c80e9c5936d3 +assets/game/sprite/cron_stand_sprite.png,1580478898945,ccdd76129e5176101f1ebbf67942683466122280a66bb92cef3b6803cb5f44c9 +assets/game/sprite/goose_sprite.json,1580478898947,ae2eb65a2a518ca66ed53430d270b6830d3542505557e7bb21382262f54bec54 +assets/game/sprite/discusfish.png,1580478898945,f03504e6a879db44195e7b8b557f0c80fa0016f5bbe619ed6f439de0c8625dac +assets/fonts/FontAwesome.otf,1580478898934,cf0e420036f754a89fa5019859adb0c7addae2e84914c3f256508b6d55799ae0 +assets/altruism/message_8.png,1580478898932,e934fc638cfd3110d90477447ac1c81fa51dfcb014c5e48c99f2ecc378a46257 +assets/game/sprite/greencrab.json,1580478898948,43e14f81d65a7a35946b6eaff60ffd57bfdd83e0a1c11ff0e498446a467601e4 +assets/game/sprite/fish_progress_s.png,1580478898947,d32bb30ed355cd7bfd79a5adac17e1a6381d8738a0a5a759e9a3efe35e07d9e0 +assets/altruism/message_11.png,1580478898930,c80a2c0358aba853992024bf1862bb5ba19afc5c48c782cf6c38190ec0dd74af +assets/game/sprite/guppy2.json,1580478898948,80d668e7250e7ff6166678c0e127cd6aa64606a85b97acd2221ab191f24ad89a +assets/game/sprite/guppy2.png,1580478898954,58f5a92c2c3deda4270a1a206f4d92be6272c7fe1d10f728d40b568b17d0ec69 +assets/game/sprite/hare_tundra_sprite.json,1580478898954,27edaa9e4f86bf066b780bab074ea168fb90829c495c4e64e10b30142d24d1b5 +assets/game/sprite/hare_tundra_sprite.png,1580478898954,b62f7a5e72856a621b50c34f41c3a398613071a2f252aa8c0e765ca1afca321f +assets/game/sprite/dolphin.png,1580478898945,88641c1aebe5000ad57d8b1a9c7135732141490bf7547c2c2bed4e532987dc43 +assets/game/sprite/husky_grey_tundra_sprite.json,1580478898954,9c02ad54bbdfe512f5c02c6854f54314679a8a7d7f92f869117a5df45d25b579 +assets/altruism/message_14.png,1580478898930,25e1a0dacb3a1791d8839999a268c1038b4ab197cddd9e62efbb175fcad17907 +assets/game/sprite/husky_white_tundra_sprite.json,1580478898955,c9989e22ef0d7fcdfb408cdd6573b94086a319d6cfe85c5e9769fe0912e598f2 +assets/game/sprite/jellyfish.json,1580478898955,b40553c8fadd9981f2002bdbc85249bf63e67c6ac38c417661253f9dab116e64 +assets/game/sprite/kitefish.json,1580478898955,54a314a73dcd36695c20451796f7830d337263fa4776f791ccee8fcd3890bba9 +assets/altruism/message_17.png,1580478898931,7a7ddad203f7c26ad8d49cc1c13d94ce06c41238b544211d800ee47256d9cea1 +assets/game/sprite/koala_sprite.json,1580478898955,51f55b5a97ea62822fc5014f7ebd6725b1ac220b09e3aa92b3f12b6ee481b115 +assets/altruism/message_9.png,1580478898932,f191d23157a65bc65c7a6694aa125d7beb5718d5b6d1b964a6494619dfa2fac3 +assets/game/sprite/nemo.json,1580478898956,811f706b1cc4ea942ed8144b37c5556470fcafde91292cd4329c2718e47c5c4f +assets/game/sprite/goldfish.png,1580478898947,afc8948936244da54ed0fc57953ccc6e261fd8b34597c20e8dfef4454dcd3761 +assets/game/sprite/octopus.xml,1580478898957,ed939efd4c13a0086b08d02dd4006444caf4c5af953c9d2f1c806f696a2053b8 +assets/game/sprite/ostrich_sprite.json,1580478898957,88d459a3078e060c7aa1dcb86a84f15d6d6e1a10f7d656ba49245934cfc7316f +assets/game/sprite/owl_sprite.json,1580478898957,06f6f88e062508518b8322da6cfc38a0ee4850465ed43a1a58253dc6683b9dfb +assets/game/sprite/chicken_sprite.png,1580478898942,5e2443fc5f3f9bc323fc729053798495a90aa51f5129a14ac638f9ca3d948f36 +assets/game/sprite/penguin_sprite.json,1580478898957,dc36e44b1e956929f0c5bfa1778135f80721824a0efd4ca43077623489acdfd1 +assets/game/sprite/greenanchovy.png,1580478898948,ec97b82e18c1437bd21bfd494dae4504812b06adb310d66f9e4aac4a10a0f59d +assets/game/sprite/pingu_tundra_sprite.json,1580478898958,015d2ed35a43fae37a8ca9fb69ad5a2672dd2344114ca906e9c444a5abc00cdd +assets/game/sprite/ostrich_sprite.png,1580478898957,58e97ed7a4382f54a87ce00c9a4df112000e3aadc046aa386e01e37d73ec43c1 +assets/game/sprite/pufferfish.json,1580478898958,4e17ad4c0507a5ef85e63624223d82149534bc79b6b76c20ea5848cc5c53751d +assets/game/sprite/purple-diver-sprite.json,1580478898959,dec9cd5627ad0978733a7e9fb12d28065de8e78a9463936fef016cfdba4f48d5 +assets/game/sprite/rabbit.json,1580478898959,830640430bcc3185ba3f92e3cb54aaa6e63e535c3eaf0eaca5499430d335878b +assets/game/sprite/greenstarfish.png,1580478898954,8e872af31aa3e7af245719ce16fb239f19e060980f9efc7b25867f0e9b1b4337 +assets/game/sprite/pufferfish.png,1580478898959,41c5cb23a40f4939756ad5823e7d6f73eef71e2c67ee684bbf9b7a1329397a50 +assets/game/sprite/koala_sprite.png,1580478898956,37477ca3c72758353211820381ad06a32416a2f5880d8d7da83169e6ee378f93 +assets/game/sprite/reindeer.json,1580478898959,db540a5f67770f9665bb7f9d664747c9d906be73c2aa9f76c5e042fba1e8f14a +assets/game/sprite/nemo.png,1580478898957,8c1a784f2b6672e8c00190f20d263243797da9d9b6819696188fdd525125d6ba +assets/game/sprite/redcrab.json,1580478898960,cae66e130b7fd44069f55d78f70c6c32e9c74b1e22a88d3edcff378ca61eff9f +assets/game/sprite/octopus.png,1580478898957,ae174367de1634ae9cc291d5f9386fff722e92a0c588862e6a11c684a6b530b1 +assets/game/sprite/salmon.json,1580478898960,2e8882193d12822ca849e190cf6484b8f0097ce58331b743d70eab2b4f28cf5f +assets/game/sprite/sea_lion_brown_sprite.json,1580478898960,2f1b3390f3075e34ba999989b70ae9bf8debd17875cc585bc0befeac6b2cbb45 +assets/game/sprite/sea_lion_brown_sprite.png,1580478898960,68aec204d6ef2a3258d53969048007994f527a457571c8d2f10984c0c54918da +assets/game/sprite/sea_lion_silver_sprite.json,1580478898961,ec3ce8b3a13a35fb2c111097c198c1519af40f5b4803e93466d24281ae0c19b1 +assets/game/sprite/sea_lion_silver_sprite.png,1580478898961,cfe5699fddf5b04cdb0c8072a70e5d62a63c083beef20f8f1927e6573ea1280e +assets/game/sprite/seacreatures.xml,1580478898961,305130513e8a72b39803241542758f136760cde3b909094f3326d0823c73fa94 +assets/game/sprite/redstarfish copy.png,1580478898959,e15ea8ca6dcd82ef6e5c08f0b98de7066dc996d4b2d81afb5f1a22db09330e6f +assets/game/sprite/pinkanchovy.png,1580478898958,4bbe921d3b76e09ff9ca43e2cddeaf4033e9e0f3086b80911351e90d906aca11 +assets/game/sprite/seahorseyellow.json,1580478898961,9a937174a84fd378ed5fbe86f8a2c587ce080682fb8709cc138aac68b7228fd1 +assets/game/sprite/sharkswimming.json,1580478898961,a33267f4ac6b95d6bafacf36753bb0337c7b7cf558f817732bb0b446beb1fae3 +assets/game/sprite/dory2.png,1580478898946,bfe3d644c949d23ecea92cedb3fab2d8cf35e100d3f123e292ebc07152b0a669 +assets/game/sprite/betta.png,1580478898936,be05eb2059ccb4f5a3bdd6e27eed79cd0d07feec59513db3dd8a6fa3432d22b5 +assets/game/sprite/snowflakes.png,1580478898961,e580ccac6b7b97ab5161cecdb1c99dd8654a51f22c75c96fc13f5805256c6a4a +assets/game/sprite/salmon.png,1580478898960,1c692aabd6cc2b67ec43ed04274dbfc5583eafff68f6d6a10a368f669c1a7fa4 +assets/game/sprite/sparrow_sprite.json,1580478898962,592853afad351b5ac11e130d1c5255d71baa1d7b054da113ec1a246d1633a7a9 +assets/game/sprite/dori.png,1580478898945,2bbc0d44f40df8aa8eb1b1cc257823385fe488cc756131dc04d9cd4db064c979 +assets/game/sprite/squid.json,1580478898962,42f9d35323ea8fae21d41d2a33cfcb888119c55a802e972d56c16c71bac56046 +assets/game/sprite/squirrel_run.json,1580478898963,4fa6517f3a8fb1c7fd5b37561326965d0802def48a2244321f9bdb858f536828 +assets/game/sprite/fat_swimmer.png,1580478898947,0989d05cd67b21ef87f94e49d28e853d9a8eea5de5b36f5a025f8730b2b3c75b +assets/game/sprite/submarine.json,1580478898963,132a5b5472e84f596563628a396a884d5f0afe607a35fcffc9d7a1ba9b212493 +assets/game/sprite/jellyfish.png,1580478898955,85b675c5a631f3b2edccb0a2ea131a77708df5be93c589811bb979e437ab77d8 +assets/game/sprite/submarine_at.json,1580478898963,e23c328d7244d41596a86592c172871db426e45b6fa627df67cf3342f36b4cd1 +assets/game/sprite/swimrightgreenfish.json,1580478898963,44b14c7672d58b717a43dddc4271c3d9ed5c3caeedffe3c254d0185b76d2c8ca +assets/game/sprite/swordfish.json,1580478898963,a521a267819fd4d6ef3701371f3dc483683ea25186dd511d3cd5965e2b890daa +assets/game/sprite/kitefish.png,1580478898957,866911ccfd4478df821c359bc15cea8dde524c3f0cc4e1177219d6fe92e1afcb +assets/game/sprite/redstarfish.png,1580478898959,2a7f3a09fd9e7ab81e4ff4e78e8d869feefc2ba520809b47ddb7d61a9892bfc1 +assets/game/sprite/thirsty_plant.json,1580478898963,dd61a884ba9a1b983db4853c8dec0ab7025acc62f32e9b23df2b146b4a92c800 +assets/game/sprite/squid.png,1580478898962,eddc37f5842d52aa0f83f8bc33a5eba106f835ca01a9b4e73e4396ac459ad816 +assets/game/sprite/duck_sprite.png,1580478898946,6acf23cee29aa5d69a9e70a34f1f54671244495e2f3ca2cdfd5bb5680064378a +assets/game/sprite/submarine_at.png,1580478898963,36351abd2cfaca29ab6f77ae3d69fa6c6fafd287f3ae3deead4f4ef0e01a2901 +assets/game/sprite/tigerbarb.json,1580478898964,70cf2f09613390021f0b5267b453cf96d4c93848a665c83db5a4f7f946d231a7 +assets/game/sprite/swimrightgreenfish.png,1580478898963,14043e50e9770ea0f11e697bd1678eeb1940a5a915b9b142caac0e38df94d74a +assets/game/sprite/rabbit.png,1580478898959,8b3af48639e99f0b84e5c18fcad5c167409a7151aab5256da4f803c4fe252c33 +assets/game/sprite/tigerbarb.png,1580478898964,34d2b856662ac4d4401a289173c2cba82a4809908a64dced0cb37e55787cac5b +assets/game/sprite/triceratops_idle_sprit.json,1580478898964,15ae8c1f90a65e38273002ddf64e6870339c3bf67dfafe28de7fd8360023e60a +assets/game/sprite/timer.png,1580478898964,5762ce125cb27dbd3489d0074d6d1ff9c43689142527dc3cedbe7155ae02d6ea +assets/game/sprite/vulture_sprite.json,1580478898966,bf82a5677e6e6b9f8e54bbaa9ab119b7d4e7f622a2c7b9abe851337fabe051e4 +assets/game/sprite/whale.json,1580478898966,670b5cb3e5120cd1f63137a06f924ed859fde1b76403d00fb7046b43455b58ad +assets/game/sprite/wolf_walk_sprite.json,1580478898966,e0a0c3f4b59dd85f501516f92c5a6e471b9254d86414491a1f04f3869f61c88b +assets/game/sprite/pingu_tundra_sprite.png,1580478898958,ea52d9a5d11520cad7cf961dcfea9290d0dea849497f46b9c012acebda17e4ed +assets/game/sprite/squirrel_run-0.png,1580478898962,423a73de655773115a3de70bd0137f1a1efc7754e690759c76c532ba2f2813a9 +assets/game/sprite/sharkswimming.png,1580478898961,b8e23a56f18119de41e2a50d688a402b0111050218657d83972fe2cac846caf6 +assets/game/sprite/yellowtang.json,1580478898967,059476f6763af1f47b5f1959ff53ec5481b083bc555d8cfe3917107dbd8dbe89 +assets/game/sprite/wolf_walk_sprite.png,1580478898966,afc98d5c93ab5c13049bf2f34cb85456f8588d2d6f9d3e9f1e237597c7aca215 +assets/game/sprite/yeti_laugh_sprite.json,1580478898967,d143343d79e7744cc3f4b940d04f17a2034da7571e209fe27259fb7108495091 +assets/game/sprite/owl_sprite.png,1580478898957,d45a3e2fd817194386d8ac9b7baca90ce464509630d4b1957f6bd17028348aa6 +assets/game/sprite/whale.png,1580478898966,6c743f071ce79f8422c9772b6decf1dcdc553ba73b15707f8253edde4975c1dd +assets/game/sprite/yellowstarfish copy.png,1580478898966,85d0e14dbbc38433bc1bab1597fab6a138f0df189fff8af136477aafcb38b7e1 +assets/game/sprite/yeti_walk_sprite.json,1580478898967,f06656aa44bb9cfcc6119675e0e6ca581de9f84024999ee094b0fcd2975d9d82 +assets/game/sprite/goose_sprite.png,1580478898948,a4326b86e4f2b22abd65fdb11714a9820e228f98962bdb440c57c0654ea6c2b7 +assets/fonts/fontawesome-webfont.svg,1580478898933,303fc405939cc4d296906102b8047b71a4ec14a7b51aa7a2abfaad416ec8fb3c +assets/icon/favicon.png,1580478898968,8e68255d734086edf5b43bd7f16d3afc37ef2b9b2a4e8fc385e87a79b665ef3e +assets/game/sprite/sparrow_sprite.png,1580478898962,e74904bfebfa80c117fc28e494a6b472bb2ec5c1bbe556de00a2ecdc8e83ebdd +assets/img/15points.png,1580478898968,4e4867fc92b58ac8b48a82fa87f419e357cb3ebc28c2a55ae394abc7abae5ca5 +assets/game/sprite/brown_bear.png,1580478898939,4f9cc0d6e63cb4a1eec248cd46be558d64cb600e187ed037d3b567011d4bafcf +assets/game/sprite/greencrab.png,1580478898948,bfe20e2f095242aa1a4ca985285bdcb2afbf44bf0883847aed688ea300952023 +assets/img/50cent.jpg,1580478898968,4b6839a7d010dd39b33a23d6d5a3950b1b57be0024c9b4e34c24089f01702560 +assets/game/sprite/penguin_sprite.png,1580478898957,d29d24175ab9d78c048b01a1cfdfd3fc522a1220e30bfc91de66d1091d42af4f +assets/game/sprite/yeti_standing.png,1580478898967,9debb791947ef268603189c492880a8cd09246c17fd4353a6a840ae5aa41e6b5 +assets/img/CHOP_RI.svg,1580478898975,26abcc759f3c8748408ac44c46dc1d6cbfacaef30be61e6ae078c31c052a6089 +assets/img/Tap1.gif,1580478899048,1c78158d6fb5b345e2eee7c16ddd0332d6121e85cdf6d8c8753b4e98c7736479 +assets/game/sprite/triceratops_idle_sprit.png,1580478898966,1d90e9f017821e49f3be2bd90b239d29cf5e2c6d251441456652420109e99024 +assets/img/Tap2.gif,1580478899049,fdd9f757bad74c8cd31f417d4bedec8b0c0000bddfc5f6185bbdd3ca259db636 +assets/game/sprite/yellowtang.png,1580478898967,a407d6c00f7bb5f11862535c57cec415fdff6e89a41e733cce63849ee24ffbea +assets/img/30points.png,1580478898968,d19b34ce20b401fa5dfed6214ce6fcf82183e5962cebee14c05bf714d3138d81 +assets/img/Tap3.gif,1580478899049,16ea3eeb84160ae9947ef132dc7d9c958cb0dfcbb222bcc80cef647d7afe3246 +assets/img/50points.png,1580478898968,70ee9c131593ab0d5cdfa0d2e77aa4a9c7cc97b59d59ca363f74bf4d0189ff52 +assets/img/Tap4.gif,1580478899050,f0105fd7a55a88959d054a236d94d97a1d3eda29f89716e089c13153c0de7d2a +assets/img/Tap5.gif,1580478899049,44a958af75456f3460c10d43e41725d642b991cb7d4bf83249b38aeaa8ff9f85 +assets/img/RedBanner.png,1580478899007,60185905ecbf77f2078a61aefd5f4a1898b46b9472659b94c0ee0a04b0aa38ef +assets/img/Tap6.gif,1580478899050,9e72e7717c5c54eb9c0db6e68db311f7cb790a8909289742f620efbefb82fc73 +assets/img/TitleBG2.png,1580478899050,dc37a7e8a90743a5154109d502a919596fe246c629b2d3ab31249f53e4cb4f6e +assets/img/achovies-grey_tn.jpg,1580478898968,595fcf7e37c26a2216c54feb87bb9d30915ca2a63b31326aa62c1b3d16bac18e +assets/game/sprite/husky_white_tundra_sprite.png,1580478898955,44a49901680fb4fd4d7a058e7c545f5039a1969ba5b7783e83ccb78426353087 +assets/img/achovies_tn.jpg,1580478898968,103cbe487ee05fd24b5c4a769342d89dd15f0ce712764360154dc77245ab3865 +assets/img/active_task_done.png,1580478898968,415dc1c5f9c37ac9925e977871585df3da0d6309c6504b85efa525aef6dc9b61 +assets/game/sprite/seacreatures.png,1580478898961,6dbff34d42cde7abc91d057743ed8a43f91c7a6a5c24944ed303a640271359fe +assets/img/angelfish-grey_tn.jpg,1580478898969,1d69684d31229193ad458da6da49e9d4ab643c5881b9bbcfc64a6a5cf9399688 +assets/img/angelfish_tn.jpg,1580478898969,c4234a06b8618669855476be64d1b0359a7545b39180e7f07c135ea2ae9688a4 +assets/img/angryfish-grey_tn.jpg,1580478898969,aea10a2d19bc5d09d13ff20c280a5b4eb0d2b783401da3160752de2827963ad7 +assets/img/Fireworks.png,1580478898987,8522e7d43fb2fd31ac39461fdf7e0e3e77151d154ca0f287a29b93d82849697a +assets/img/TitleBG4.png,1580478899050,2723d70706fff3c42d1f5a02dcb2869962df1ffcb458988d2fb4bdd542685ba3 +assets/img/TitleBG5.png,1580478899050,9a3176df6641fedef26153b7cd1e7fcc9cb55cd4cfd496425baf0226fc685be4 +assets/img/angryfish_tn.jpg,1580478898969,a57acc299d0f7319dd42399b67480cca755b3ec6aafde75d9f7bced8e315da04 +assets/img/arrow.png,1580478898973,2127617db0b43ff9e58f28b47ee0bb9fa5dcd4ee72ed68bf09b3a5996ef6ffb3 +assets/img/backgroud_daily copy.png,1580478898973,15ad80f56a68434ebb93ad90b1e09e08dec3371cb4fd7a42fad59f03fb73f6e5 +assets/game/sprite/yellowstarfish.png,1580478898967,ca3a34be5d73fa1365177313cf0a538f1e07ffa0de9c49074505a53fee525047 +assets/img/backgroud_daily.png,1580478898972,4aeee2c80de73e25637ca9ee415e177c1a03e78c87a854c18ad87223b37166ea +assets/game/sprite/redcrab.png,1580478898959,a2441e5921abab30a47255230d9f192773465c93a208e702940c73c613ddf905 +assets/img/badgeAT-none.png,1580478898973,ced48ff1955bd077b10ad0881df87e5a6158e54f3c9d623082c49f9239579044 +assets/img/TitleBG3.png,1580478899050,29aa07e9ae5e435e1030ff1c3da742ff6fdf3eaaefe34fd9d337ff5aaaa3736a +assets/img/betta-grey_tn.jpg,1580478898974,e2f54a368a4d4698c129d1d1dfb308eb4d1073789c2bdd609be95992fea4a962 +assets/img/betta_tn.jpg,1580478898973,8a15d42be945f4970fbcae11c755bacd20df0694e38a9c64a056f3a7312d6b98 +assets/img/bird_tn.jpg,1580478898974,88757fadc569047d8c241ece1ca134533824f975868b37de4de7b48d87eb991f +assets/img/badgeAT1.png,1580478898973,2f7933948e951e63e27039a194f9596c96bf6662314695aa8433fb1d1eec67e5 +assets/img/badgeAT3.png,1580478898973,834176c64ae4dfc1ffaec01f8e3c7a1b3bbf8a410d5163e3391f2f4db5373fef +assets/img/affect_grid.png,1580478898969,94d285710fd02832c605fb8035d158a7204c4d2595cfc5f4cc2ad41ba299ae43 +assets/img/badgeAT4.png,1580478898973,84b2d34a3d7c0b178ee1419f81c0cabb035f061969cfaf43273ace04b550c40d +assets/img/badgeAT5.png,1580478898973,7ebb42e76be4f5c3e0b8ed4d77562c54d6b46620912045a3bd36d02cb3d974fa +assets/phaser.min.js,1580478899061,8628d59988ba414803f27be62516baf71c98b5b3f93c9d5a6699a41cb0d74357 +assets/img/badgeAT6.png,1580478898973,f745a6ca3ed273325a612d88800b4f673489aaf272c3d14b4d9afed7ec1a18cb +assets/game/sprite/swordfish.png,1580478898963,df257b41ec29d7a5473fd54e8ae5d3e9936118163868849e2881bb7aa9587514 +assets/img/badgeAT2.png,1580478898973,64fbb529094ef47f13372f27ef415b6266f1e3e20bc344af6b1da2125fac5e00 +assets/img/bubbles-grey_tn.jpg,1580478898975,67491c53074df2a24a334268a27d9be99c7ea78555671951c7782d7abd40c28a +assets/img/bubbles_tn.jpg,1580478898975,0fac60b8ceac411152b00634622b9b5234d366df752f0a3f91cdcf66c19dd72c +assets/img/butterfly-grey_tn.jpg,1580478898975,bb83f6033f5e406a30da4eadb023393929e5aad5226f7bc3d315aaa084644a1b +assets/img/butterfly_tn.jpg,1580478898975,7f9ac5fe73dd72a567fe78582fdb8807287541c1db6c3a26be004669db34c07e +assets/img/chicken_tn.jpeg,1580478898975,dbc74ca1e6202ccd8b493a72f0985b5a4fb819ccb45f0e7e3effdf56a6871cb6 +assets/img/clownfish-grey_tn.jpg,1580478898976,c59da8aed0598c09be824ef92b34974762fca509d0352f79bf249e180f9feafa +assets/img/clownfish_tn.jpg,1580478898976,f273157572345a57e9347e39d4fa4c748f15fcfe09f48d828c4473d9f983f709 +assets/img/connected.png,1580478898976,ca9e5f939eaa36d63a9b2dcedc314373ae46904dbb1d9951388eb13173353193 +assets/img/coyote_tn.jpg,1580478898976,a95992f688a3c56df2f0cc231464dee27234f2a8b5824ecd5c2f94b7a1e2ede7 +assets/img/brown_bear.jpeg,1580478898974,1ed944d96d28952d130a3d50b7c589d126e268270b0443dac4c0060948f52ece +assets/img/crabfish-grey_tn.jpg,1580478898976,6db1004baebfb3607286178ff9002e739ed86509d8916d966d28eeea79695a9f +assets/img/crabfish_tn.jpg,1580478898976,68a0f0943b05786d4b8f78eed98d692350b8abdbcf039b71db0390e82e492f83 +assets/img/carnivore2_tn.jpg,1580478898975,04c740fc917c16a4152bf3cdae9c1e70315088443f97d39902464034e9ad6ec5 +assets/img/cryptocoin_tn.jpg,1580478898976,fb24ce521aa50d679da08c328e5ddd3646e0af03dc276ef044d6d1d8ed2f5d33 +assets/img/create_outline.m,1580478898977,26edaf6b157fcda7c38767127b25273b340ab56ea08e1ad892e3bca16da9af9b +assets/img/chicken_tn.jpg,1580478898975,2e3048cd82bdec21df70573206473fe0002187021c239664d9f8746ed7a6e360 +assets/game/sprite/husky_grey_tundra_sprite.png,1580478898955,18777d66b6737748ee06d95fc23a140dbdd044dc2f4fccac9e1abf6575f757f4 +assets/game/sprite/yeti_walk_sprite.png,1580478898968,9707d16af6baada23ae7ef53141d86f406fe2efd68d3cfb26323a438682fc009 +assets/img/diamond.png,1580478898977,4bae2671d1d98481472cc1ae0441e9efdbdb906b70c44f0aecd0290dca466d7c +assets/img/discus-grey_tn.jpg,1580478898977,a08b39c44f023c1dd88a0030008559785042fc7486263966a7953d043d749ac9 +assets/img/disconnected.png,1580478898979,a9dcf96ed1e32d3c2077927636409ecb37a2ad61852000d13a54413a0e7aa304 +assets/img/bronze.png,1580478898974,e99fe42717d28f7f0d46eee18a21ff7c0856f996b9b0707787bedfe3bca0df55 +assets/img/discus_tn.jpg,1580478898977,33710f3e61b4f3610e02fbad312259f0d1974f56d0a5d8b25dc6bed4ab2cf148 +assets/game/sprite/vulture_sprite.png,1580478898966,a31c031b058c9a687f0f58ca13815b6e2f924d414d7e2e9796215bf39160ca2a +assets/img/dolphin-grey_tn.jpg,1580478898979,7eaed96d3fc805ca8eb9899c561f15f64d1695850a90ff6d457327fff59435e7 +assets/img/banner_fish.png,1580478898974,a5ce3da6582eadca5fbb95496d0c6bee7fbaade253c6e86c070d39f3e6d330d2 +assets/img/dolphin_tn.jpg,1580478898979,1efb2b5aeab36400c943de2c5a3bb3c55227bf1cb635ad8d9c1b7d123426bed2 +assets/img/duck_tn.jpeg,1580478898979,2f67a51c05fb328be09f2b76e30083eb8dac5a779d3ec04b4e9c9a0c2f7404d3 +assets/img/electricfish-grey_tn.jpg,1580478898980,5e580d116f628bdb2f23e8323e1b2621bf3d988e396d82b713e977a947e9133a +assets/img/electricfish_tn.jpg,1580478898979,112a82605a9e38e70d46356c883809b714f58c68f1f8e566e5cee4ca8d4ef168 +assets/img/empty_money.png,1580478898980,e5559e67a4fb279156d96a4f30eb225e42f03895b8dfec0a1535df02aae806ec +assets/img/firstday.png,1580478898988,855c1d891e70cfc4a7b475ca0afede36dfcc4a4504172792485cce90a3bab771 +assets/img/corn_tn.jpg,1580478898976,4960a876876f00e27d4258e95b929a677202bfe3ac358b98110c30eec25b6dd6 +assets/game/sprite/black-diver-sprite.png,1580478898936,cbfd286ada9b175e38008ff01bfef61bff54470034c7d113bda6dc0fdfa16298 +assets/img/dance2.png,1580478898977,4771441016896ae71a61bb2b7a425dc1c12f826a1aac42847f5efd3c16e66287 +assets/img/fatdiver2.png,1580478898987,903df874cd96a7fa07c58b622c77b338b51f1573ce831c1375acabfb9ed303da +assets/img/fishjournal_tn.jpg,1580478898989,da1a41d2c560c2282e7df090b7af0f630d5fd670e2c7ac54a14bc159635416c1 +assets/img/first_aq.png,1580478898987,bdcf93647817549d83542ae2d9b31bc566c821d26475317673c84ff4684f46cd +assets/img/fish.png,1580478898989,142761d98162b5edf28c4e044d80e52914cc646ec0c73cc2d4e2e4c4fda975d4 +assets/img/badge_help.png,1580478898973,9b049e7d1cb225d379764d549ff88cf67ce03083d97ca993b7cf6cc59773b3cb +assets/img/clown_help.jpg,1580478898975,ee1924778ba53abdca10f2828f9e5c766a732d9d6d3e2b9a617bb62901d856aa +assets/img/bronze_trophy.png,1580478898974,8bab52b596eca7c989bab2d6db892b5b90c8a40410871c7eefe6625e006a8a1a +assets/img/bubble256yay.png,1580478898975,4508c904f02a5b9ab094a47a3eba35c8960263cf9997ef8769c3fdef9344d0bc +assets/img/blue.png,1580478898974,ce50935c931653191d07bb6a6fee452c6c66a4c383cbacd2c36998778fbbe561 +assets/img/full_money.png,1580478898991,a722fca23987435c00c0918ae6e5dcde3317988fba46279605fa0752a7d946f1 +assets/img/cute_whale.png,1580478898977,84cef95722a2b6cde825102f426d5ecac748a1dbb3844da2f83802df31b66d84 +assets/img/fish_journal.png,1580478898989,7fa78b1f47eec9ffdcd9917744157836946aed90557e9f3eedba0cabc2236029 +assets/img/dance.png,1580478898977,09a0ef9991a297bdd9460628b55de7fd7d95a84dc66093e18621744662a31e79 +assets/img/fishjournal.png,1580478898989,53b1cc84169af8abf6f76ff1ea2d44fc61a84d35b8e4af038628fe04aa49fa98 +assets/img/duck_tn.jpg,1580478898980,6fd16acc871ac01ced90114f44ddf356927671dea1b08123da6a5dc843a6cf33 +assets/img/goldfish-grey_tn.jpg,1580478898992,cd1caa4d15427e43edbb3839b3a836a68ae58fd36fb858de871ad1e66245efc9 +assets/img/goldfish_tn.jpg,1580478898991,db70d19be377d750f564caa47668a892d300984009548aec744233d4b1e9cf84 +assets/game/sprite/seahorseyellow.png,1580478898961,2d87c1f4071554d96863746be4ca5c421b04eec6f4c18705fd88456ddadccfe4 +assets/img/goose_tn.jpeg,1580478898991,84f09bbe3888cb96a35e8ea620a08922975c7febe5af1f079f4c49624cc04bf2 +assets/img/green1.png,1580478898993,0dbd3ab37c18e492038fbeebc027b54b8bfb54719b5992dec15ccd3a5f069a5d +assets/img/green2.png,1580478898993,a15e92aeecc934ac2c33c324f9fbfb8b935fd0119beaa085246e7fb5d9bc5337 +assets/img/green3.png,1580478898993,1e26496b3f7566d33929a5529fd65ca6f39070cdcb6b2b7f114e9dac3aa86b19 +assets/img/green4.png,1580478898994,bae232f59a604da7d0f424e02337d484552919fbe358103f1136fe792fb76608 +assets/img/exciting.png,1580478898988,2c7a97883471dc084325270c9fbdd80682529e9896b47f686dc8349343349908 +assets/img/bubble256.png,1580478898974,d79dc60da5a39ad8a550f80d9430c3545862a1e4d5e0cc2158bf5ecd36e3319b +assets/img/greencrab-grey_tn.jpg,1580478898994,42f63a18869496f43cb69d509e59b3d28c2ff02d928d633c163d5ec74491d8fb +assets/img/greencrab_tn.jpg,1580478898994,2407fac5c3d2eb6a314471f2604a9bf4b7d58dcac8b9f86c1f34684563dbe230 +assets/img/greenfish-grey_tn.jpg,1580478898994,385a29599e4c845d7d3860abc6db9f3602ba35aabe9498fc6d37176b524588de +assets/img/greenfish_tn.jpg,1580478898994,a06dcbc4ea91bc80c3d2c42ff909335530d772972053f9248eb62618b04972bc +assets/img/grey-husky_tn.jpg,1580478898995,8a34aa8fb43ecfe6b2eda87870fb2b70b25c7d16e860839c4bd3c9b5b8a678ea +assets/img/guppy_tn.jpg,1580478898995,6d404b879de7fdad684664b29cfe4c9095ebd8c05cb0e7051afc55f36115425d +assets/img/guppy-grey_tn.jpg,1580478898995,1d71f0511e3e59e4854e7303fdc7f95336bb103c931817330b3007839a4997b0 +assets/img/hare_tn.jpg,1580478898995,09df823b47ed4833f55f8d02bc7a498f68eb2cab096111be3be00e96ddd325e5 +assets/game/sprite/submarine.png,1580478898963,13be85aedee11e042bbf6a60a86561612d321fdc98b26b572f8c38e21c755d8f +assets/img/horse1.png,1580478898995,9132298a3541fddbcd56cbc17f30b11e3ca5f3f683a5c4f2d94a6f9268b2ac5b +assets/img/horse2.png,1580478898996,c800d9deee38842797ac96c1f93eb95721104d867cee7ef42f16dd1282734710 +assets/img/horse3.png,1580478898995,faeb6e635c8dfff6b097e32e67bc8488fd519fa69cb992cb3d02f6792b9f4989 +assets/img/horse4.png,1580478898996,da6b06499c891a04e519dda271d11d91332539c6658d7e315b7ddbdae56c6e8d +assets/img/fish_help.jpg,1580478898988,cf5aeb23bb664d13838dae3977c60918583ff4c770d377a1acb713ac7c763766 +assets/img/gotosea.png,1580478898992,1a175c63069f596b186bbf8eedf2467b1af1544bc04453a79a9fdf80de1133b0 +assets/img/jellyfish-grey_tn.jpg,1580478898997,ef5554ed82cf8fc9c2614777553375aca41ac7d92aecc5f4ac355f0ee052fd17 +assets/img/ionic.png,1580478898997,afe827d31879a9439f62cf4aceafae4f96d7e2678341ea85ae0516e7ce2a4ad5 +assets/img/jellyfish_tn.jpg,1580478898997,56bda89beffa4337b36ff92908383faaeffaf7061c3fb9cd5f18fb5aa023699a +assets/img/gold.png,1580478898991,e06d839596ecfa9c4079006e790b2cc7c4ce25f1e3c4e7cbb517dd3f5ccbf4ae +assets/img/diver-0.png,1580478898979,4c4dba507c04809b6ae1776d1fd6b8835a39e3943b1da37e2dffdd79acfaa909 +assets/img/kitefish-grey_tn.jpg,1580478898997,c75ce55309db63cf6c6b36d31076a410a9c61f4c32450586d2b1bcc5a197bd45 +assets/img/kitefish_tn.jpg,1580478898998,8c6a95c75d8fdf6c65d069ca256dad3e0f39225e6121aeaf695ca66b9de092fa +assets/img/loader_bar.png,1580478898998,96dbf66871c3d67f14b4a80db17a9d71a97e98da42500ffc67cd6c1b93065bf5 +assets/img/goose_tn.jpg,1580478898992,54f1fa17f84a377eaf8a3f2aaaa943ba6acee755e9f9bd26ab78699fd27a51e8 +assets/img/happy_fish.png,1580478898996,f89c6fa515639728a19f490b48becff6292f512243575092df4ef11a64815118 +assets/img/freetime.png,1580478898991,4a9714705105909d2071a44f617b97cf7c4f025462326bbd6f3fb110ff8bad6a +assets/img/magenta1.png,1580478898998,13e95a44a07224866dc621788c49c3dd061d4ce981394426f8afd7cdcb94ff13 +assets/img/insightsdemo.png,1580478898997,9fbf61480c2c9dad8070b5b7d02b87e694c187f0a52b772a784ef0a27d79d0da +assets/img/magenta2.png,1580478898999,26ae66ba659d703cabd4597df6f42bad251aa55c1f54744ee30fec0c5a13ba7e +assets/img/magenta3.png,1580478899000,3238e48d9a9116a8cbc3e0fa5a8d48d1e81855caff1f2e1c366cbb25d0ee91c5 +assets/game/sprite/reindeer.png,1580478898960,9782b4215a28da203a659aaba474d7b811914f97c8f3bc9f794700c0d8fc88ab +assets/img/magenta4.png,1580478899000,22ebe8163fa1053bbacec1ed243e5c5964f8416df50008d3a3cd736718e479b8 +assets/img/gift.png,1580478898991,81d7b54b4cf501c18c3bf02b5fe9e60e797f750aac0aa6131870afba53e17972 +assets/img/nemo-grey_tn.jpg,1580478899001,c22bbefc7f8ca6dd5742574f9e8e5c46e81404fa1c206631d78f9d8fb3fa137a +assets/img/nemodori-grey_tn.jpg,1580478899001,bd180559f234d9d5e11a1130ffc8318ca8de79afad8b8e6ac053a6c0afcf34f1 +assets/img/nemo_tn.png,1580478899001,b2d0eba2bb6f80d0640477ba8b02cc71364ea3f777c9a32ee29f54f19fd9f087 +assets/img/gold_trophy.png,1580478898991,be291f7369740d42a73f919086e9fc6fdd95db43226a381afc567e3f0891890f +assets/img/nemodori_tn.jpg,1580478899001,85ca21b60470baa9e59e53d1b57c94818eb890abceec0d2d47576e8dbd322b98 +assets/img/not_done.png,1580478899001,df34de34dae9aee6485b9ffb0d18f385725df8be86f4a269769b52eaf94bbcb4 +assets/img/green.png,1580478898993,75232a24043b66513d50efcf4254a580aaff9b4baa11f9734a84c15f020f320e +assets/img/not_done_today.png,1580478899001,e535175d23782b16b8585b4ec3334fc0be591edd808df8439f24f1d8232939d7 +assets/img/location_icon1.png,1580478898998,a1c10a471b57982348d01e2a98f797d6991d68a68a2d55d0eeaa1afeb0f00e54 +assets/img/laughingfish.png,1580478898998,32fdf99dcd57aed226ed4d561499a508e044fb772dba1b1a377aa5e1898ced4f +assets/img/octopus-grey_tn.jpg,1580478899002,afc9ef627b30e1a282930b4e7340d48048a043eddbe7549f00ef6c353946d87b +assets/img/nemo_tn.jpg,1580478899001,f86d4a008dfd3af3c56c795a4bb3068fe8483d4f0ed1b035db26eda64f368f79 +assets/img/octopus_tn.jpg,1580478899002,07037229274cf656fe9c84b6999378759bcafa6d97be1282befef11f6e479aa6 +assets/img/koala_tn.jpg,1580478898998,505e765304fbad5898132f0d3fcdbd16606cd828e3436f6133fda98921b002e9 +assets/img/one_dollar.jpeg,1580478899002,6dccc5d5e44c71e5561b48ad6edbe192dfc423a0a00a7ed4bb8657463b10c2a7 +assets/img/nothing.png,1580478899001,e400cb921301178c2b078528f41f559e91506e442ca75c6706b245ef23402a9c +assets/img/bluespt.png,1580478898974,93e99e09cffaf807c626641d66ca6285b9a0fafb7f3cce286e8aa17b83ce8cfd +assets/img/ostrich_tn.jpeg,1580478899002,e93cc35e35eb97596eda98df8476eeaac33d228b6b87cb7d11621b66e7ae39e9 +assets/img/owl_tn.jpeg,1580478899003,81999747b9b9f2efd80cb32b9feeca7d7cac4c7bd352b2805cc0321648f37dda +assets/img/penguin_tn.jpeg,1580478899003,ec9bfea9a72023a7d658b140df5b6b88dca47bd96438684b0875a21690a8c368 +assets/img/penguin_tn.jpg,1580478899003,6a4798d5dab189ee581f62885c5a2fa1f7761095a402aa010656f76865692eaa +assets/img/location_icon2.png,1580478898998,ddbb50e331823ebd421956c359fe3cc4b96e84e60ae8091ab6dbe79b2e9ca3a6 +assets/img/green_trophy.png,1580478898993,203a53e6437cd250a7286309dba62cd9095e6e62f119b3f4428523c62211547e +assets/img/money.gif,1580478899001,ac268ed0d3935ab57736441136a999607dd0a44ec554d03de3ecc7e041346063 +assets/game/sprite/attack_plant.png,1580478898935,31f3119f61e8b6b7413fbbde7fa84c4837330b87b2492fbe586efeb45effb5a2 +assets/img/pingu_tn.jpeg,1580478899003,c4b1ade3f5f1cabd181830d6ef26cfcb6d6e214398b207b966893c04b5b18b0c +assets/img/pingu_tn.jpg,1580478899003,a50cc3c73c46307337bc778f6ac4f60257a2fb352138a0efbc8926e821355b89 +assets/img/pink1.png,1580478899003,4ffb950ba27854f73778cba4f53cc89d87916809be2a35d97d489ba1be1b0f7f +assets/img/pink2.png,1580478899003,c466b8eaa44cb26dfd9a923807d7c2c62a7bd8e2ba9d31803922dd6ae8fafe6b +assets/img/pink3.png,1580478899003,0ea428d7d39ab687c6391145d93fc28fd31e7bf9a7c8baa5c96056e3e8c42a70 +assets/img/ostrich_tn.jpg,1580478899002,000e9b8b87072b15f4c54ef14af7d37822716699133ce45d133cc0515cd235c2 +assets/img/pink4.png,1580478899003,ee3cd6627d840348c2f0ea33e38319358cd0e2eaf22dde1657bd92d150357788 +assets/img/pouch.png,1580478899005,cda4bb070d81e0546ce88c3483b70af30009a0077e886a5c83bc0a8aadda1fc1 +assets/img/puffer-grey_tn.jpg,1580478899005,7fff4491ab9c3330fc8f83f0f60b6bac06d3b5403bd5103afa645ba4223fc44a +assets/img/puffer_tn.jpg,1580478899005,7470a948148d2c94cf3cb3f92fe09f0dc93d9b5666c4a66707a9115351c104b5 +assets/img/purple1.png,1580478899005,4840bb9d2941d2cf3e117de643767ce2096705a3deca3bb79362aadf8c1797f6 +assets/img/purple2.png,1580478899005,b8ffdcaf5c6e8c08948b3da004392ecadd60d7b8d71755594e5fe8eddf2920e3 +assets/img/purple3.png,1580478899006,f344391a07fbfcf2d41199b0787a4fbd10b7d6e858614b994492bfdf5946da7c +assets/img/purple4.png,1580478899005,8af277f1974e1b3e260395a0594e88a0fbb6ff5be71cf6cf842b89236767aaf9 +assets/img/rabbit.jpeg,1580478899006,b3938a07ef160512cbaec9365f6e9d5666a7bd01fab51e08b7d37e677248d44b +assets/img/greyspt.png,1580478898995,a565358be5cdee3fb1573472c7cd962f0510dc144c2d5273e102db20cb246d44 +assets/img/rainforest_tn.jpeg,1580478899007,590939dc70afe4b8157f2f054d4a6e712654e115ecb67c82ad6e24bfc921aa26 +assets/img/pirate-4.png,1580478899005,afb2b4032dbdb980acdfd4d8a227fbe4f3fc6e2f22ac0b8d7a9c5ceb8e59a81e +assets/img/igloo_tresurechest.png,1580478898996,50531206b3f74a707f651d48eb746d912d4de47c4350fc1cdb94afb765bcae93 +assets/img/redcrab-grey_tn.jpg,1580478899007,6771b2218dbdf5340c7a74530b2fe91230b7726de57f3c885728465d97cd31f4 +assets/img/redcrab_tn.jpg,1580478899007,707f3dd0c45a0452e40b03689a4023aa78a8ccb51cd3470a005c4b4fb2e55345 +assets/img/salmon_tn.jpg,1580478899041,cf9e8c1c26d227e10fb55b343995e34350ebd9ba14ae9789b3b8e67e9a68e478 +assets/img/salmon-grey_tn.jpg,1580478899042,3f1775f1a02dfdc43e6209c2e9b1fff26d3f9340246b56c2022a2a8fba757b3a +assets/img/lion_tn.jpg,1580478898998,8e192b59dbd854e472f57298279826739944ff4eb274d69f795e16194f87da34 +assets/img/owl_tn.jpg,1580478899003,a1293a16ff1520ed533ccb01f83d694357799aac9c6718fb4bfb2a7bf8593d29 +assets/img/raindeer.jpeg,1580478899007,55fefcfec8fab00deab6d7e70e0100fed87d96914b9a4c93500e822691abdb18 +assets/img/seahorseyellow-grey_tn.jpg,1580478899043,71bc05bbcdcfd0fdf76fb8263998175262339dc5629b47b6b9d5c6ebdb852294 +assets/img/seahorseyellow_tn.jpg,1580478899043,73c265afe809e729dd45fe477b95c6944b7f735343e388fdd2647ccd2e37d1dd +assets/game/sprite/yeti_laugh_sprite.png,1580478898967,4104c9ba2da0c2453d29ee1c7cc41e75284153e5633a1afe3b121e3d11fa332c +assets/img/sealion_tn.jpeg,1580478899043,a43d0f93b8956ca60a51bfe64969be9176a77cf678531fea2a06013bcc8603c5 +assets/img/shark-grey_tn.jpg,1580478899043,3200cf149f10ff54beada2c4358473695c3733a4e8bd093eff924e90843c80ba +assets/img/sealion_tn.jpg,1580478899043,3f2dc4e59bcbe484018ef2116065361eb768062171dabd033dac0ac73da92aed +assets/img/rightsign.png,1580478899041,25ed4d362038589302e45cc08ba259a79499397999d5804341fb269324f9d1a8 +assets/img/sea-grey_tn.jpg,1580478899043,7d48f2c3a6362ba3f676a957e2f46d0d183ede76827d7a11174585fc1d79343d +assets/img/insight_help.png,1580478898996,eff5efb1575ebea19abf157e6ef2f661c882662a0924654d69cee0a439ad0c17 +assets/img/bg-3.png,1580478898974,e47b7a511da628476df540f4798a8d269b78f1e6a9ecaa79ea7aea2b28d4a164 +assets/img/seabed.png,1580478899043,812cd89478d8883a0dc3c6c77bb15953c85ac781028c4df12cb2bfa5e14346ae +assets/img/red.png,1580478899007,bd4640accd0c6357b748b5562593a650a2da9c98b4e860565e7589f6dd9f9600 +assets/img/shark_tn.jpg,1580478899043,9a2396f6177ec60b4cd1464793f79150950dfef821bf2f962fda4ac278db42f1 +assets/img/pirate-8.png,1580478899005,c735a2a6e350968f8b655d5455b26efa0494885dc37bd3e7eb43368de91609fd +assets/img/sea_tn.jpg,1580478899042,9d51c71025a5d775c7416dedb49ce47cac19267c3d65c0a6ceac463661585a20 +assets/img/snowflakes.png,1580478899044,e580ccac6b7b97ab5161cecdb1c99dd8654a51f22c75c96fc13f5805256c6a4a +assets/img/snowglobe_tn.jpeg,1580478899045,7292cd61544de6b0101466f274c67877a9d6a0400252b7f3adcfd5103ca4a0f8 +assets/img/pirate-2.png,1580478899004,188c064d32c9a8b9411c17ccbcd19f4b9c310c297ac1e71a0c267b049fcf6624 +assets/img/pirate-1.png,1580478899003,582366e9605731cc4276b8096bd33ae6869d6669276f173af26444f6fc351f2a +assets/img/pirate-5.png,1580478899005,8b23f32dbbe0da3d5111494b5f74487a67fcc468e8d5cce49f8344716790f57e +assets/img/pirate-6.png,1580478899005,e32bd06a849fd0f119ab48b1a075ee0f48e95186816f73d83acbff93ef9984c7 +assets/img/pirate-7.png,1580478899005,09a33ac92b496540a2ba8bcbbf9948564a31f66fa0194e96fdc58aa185b177ec +assets/img/pirate-9.png,1580478899005,7bcb174f13b34f5eb64deecc3212e69d314c98fa978ed12c6471d782d3f669eb +assets/img/sparrow_tn.jpeg,1580478899046,d15ffae28348ec1ff95336b958014329c9ce2081ce5d54dabccf32c6659fa587 +assets/game/sprite/thirsty_plant.png,1580478898964,25a6b321d82308c33df333df80ce64bb669d6e1f214ee0f10dab7170485643f0 +assets/img/pirate-3.png,1580478899004,3d9bb1131fca475013187eee8a8412cc79a45e3b34c05db2819e33726bb0cf22 +assets/img/smiley.png,1580478899044,f2626fa9624486e687a391f4bbaca5705815ccab687106ee34abed91b1ad861a +assets/img/igloo_tn.jpg,1580478898996,b4ed0f08fbb9ad3ae8344662c93209e4778427e62b9bc85ca62e82fe042fc6d2 +assets/img/squid-grey_tn.jpg,1580478899047,8837ede110cd4266f35fca063c11349a165872e84205ecd3d5dfc41d49771c60 +assets/img/squid_tn.jpg,1580478899046,c82bd8b21b77d6e50fede4c4fdb855d08b8e489c3a558a3503afa0b623955e31 +assets/img/squirrel_tn.jpeg,1580478899047,692613d8796b651fa1e5780c4b7d76106f2bd6df9778a1b90816a94110ab68fa +assets/img/starfish-grey_tn.jpg,1580478899047,863a14a4b790b565acfbf3b0e55865e74281f48e5793706d47c35bd88685a263 +assets/img/sea-grey_tn.png,1580478899043,c2a26952b7354046ef2f1148e26c94f172a693a01af269dbc1d194cfaa95d2d4 +assets/img/starfish_tn.jpg,1580478899047,11f2a118a25bf5163a4054b97cd2e41878aca0b26de59f969b8a5f2dfecfef8d +assets/img/stars.svg,1580478899048,a218b6765e4d003ceb1f16a7e5eb00fd9bc9fbbc76e77918aa015d9e2b84970f +assets/img/steps2.png,1580478899047,015de8ba38b0975798ae829f2808ae9d8fabde541b3ff9b8a2cf8b4c1b565d65 +assets/img/survey_done.png,1580478899048,70cf639e4a14a2ac95070fad18f7fa6ce645ecbb30a2f33ade303c269a8bfa53 +assets/img/survey_done_today.png,1580478899048,4f8621bb237816e51719a5c9deb54ffcdf42534ce7a2dbde584574f221da1040 +assets/img/spatialmemoryphoto1.png,1580478899046,0ef4d8572f895c1d00a72e7631657813854716a8c2870ad64abd3e52e3b53714 +assets/img/swordfish-grey_tn.jpg,1580478899048,014b24e69120bb27140fe2b8c01e38b281d8c3639c982f2f1ea2ef0e2f6f60eb +assets/img/swordfish_tn.jpg,1580478899048,3ae9c2ac9b153252dfcfdcb1c730f31cb717e1f271b07b719c1c85478bc14efc +assets/img/rainforest_tn.jpg,1580478899007,471afaeff32e86e4acfe0fda6e41cf20c63043543c94affabd495ce304e3852a +assets/img/tap_lifeinsight.gif,1580478899048,65f2c1963f1c6fe2f13c08de45f601b2fbb6e161d1bb4e8b39ede4b2855682f6 +assets/game/sprite/purple-diver-sprite.png,1580478898959,a880170c4f41f027f44b04909c8f9d437f78ab3ba88ed0b4c365c0fb779e9193 +assets/img/tappingalternate.gif,1580478899049,148fc3b4687b28f681ca8310d87717095fb59774bfc1538a3d47ddb6a2205ddd +assets/img/tigerbarb-grey_tn.jpg,1580478899050,474827e2c19bbec80755949bef15898ac7a99db41290cb03192c73d252e22eb6 +assets/img/tigerbarb_tn.jpg,1580478899050,fdffbaf1f41d12b952679085d0c7f01e79d42e3774b01804296770e209ef1f9c +assets/img/today.png,1580478899050,191a159da62505a98b13e4d10be52a7cdfbacc6539e91c6e7abea75337246ec4 +assets/img/redspt.png,1580478899008,6bda7cd3dece4dd06656d95e4385abdfb72352e25690ad3f865e7c0f29b60c22 +assets/img/social.png,1580478899046,a018609767ef74b0a7a059124f28d2cc69082996f91d99c0b2dc475561951eb9 +assets/img/treasure_chest_rainforest.jpeg,1580478899051,b44ec1dc8d33ed2173822f6ce6d95c9b2ba3dd5b034ee3b0e339a929256066b0 +assets/img/silver_trophy.png,1580478899044,a2957e1773351a8bfeaa470e7005a0df15ed05f5ed2f08a93469e012bddbe43f +assets/img/tappingphoto1.png,1580478899050,4b4a9c404186bdcc1a2ac7c0f4915ec2514b596a02ebeeae78fec12ff7bcba0a +assets/img/triceratops_tn.jpeg,1580478899052,be8c96794a51967094350631a80e933c0a9e50e2a0052b3a062e94fc797a9d44 +assets/img/trivia.gif,1580478899052,02125e5b8c6cdb486f859dac8f4d0c4752132aedee05b37c4dcc043ab9c8f7b2 +assets/img/treasure.png,1580478899050,4ee1c560f755ac6913a2899409d8e254b8d26be2ff257a6f15c8960bf9e46aed +assets/img/trophy_background.png,1580478899052,405df445d467db5a1c2bf395485a1203145711c2155d7a130526cfd4561deff5 +assets/img/vulture_tn.jpeg,1580478899052,065c139cc8b7220acd568fd5cf43b26bd47bce503fc8a6e912704de64c8cb305 +assets/img/treasuresea.png,1580478899051,93dd3f6c15afa79e95d9abc19860c3906ac2cf7fb55f00d3f424389d7dc6d779 +assets/img/sea_tn.png,1580478899042,4eb7ebc702f846d5ab901c0f01c73811102c7c7b8f5a24a7473b94de781cb64a +assets/img/whale-grey_tn.jpg,1580478899053,cab29413d82d8bdeed72895d0583612c6a5f958b755b202628866b52c7159284 +assets/img/whale_tn.jpg,1580478899052,a5231c48016888490f0790c1d473f8c587c561d00167fbd09096a47f78e068e0 +assets/img/white-husky_tn.jpeg,1580478899053,3e817e2c5604d5aad3a1f182b00a2a0baa721cbc498294e387b22d7470ed17c0 +assets/img/stress.png,1580478899048,d67f1e08664d9e67efc4e627854a115dbb4bf1b24ffeaf99db15febf389a1548 +assets/img/spatialmemoryphoto2.png,1580478899046,45a837dd9ebbcd893966149986fafa1ed563cf84256463f7642b68bdf40c2163 +assets/img/wolf_tn.jpeg,1580478899053,67cd7beaf31b902d3e379ef4da9e63ed0bdfb60d35a8cfca1ce6952541c290f1 +assets/img/wolf_tn.jpg,1580478899053,2a6159334dd9bc0a51001f7840933316eca474046ebcb3fb01b707eda3e9443b +assets/img/yellow1.png,1580478899053,82593ccb408f9fb723fd1c91bf77c006f384e9f0752e69f47e12992b39daeca7 +assets/img/yellow2.png,1580478899054,36814a6d0f08752af4d69295dd8494716c55da7f42713a52d886217e4cd4cace +assets/img/yellow3.png,1580478899054,cbec79d8d1ab5b1ec101b464f0ef938dd9994d4364fa46bab0f733928b52d640 +assets/img/silver.png,1580478899044,3b0fbb91fc3724dcb0163e4c4f3b3bae971a384d12f0d309a6bdf2fcb6d9844c +assets/img/yellow4.png,1580478899053,522715ec12844a0ae8d24d437da5a2abb2a10a79703cc57ce93f737c1a3bd3e5 +assets/img/yeti_tn.jpeg,1580478899053,812722ba757351ef9e4ab391efe892fd5859387f9a4565837c39cadfe5bee710 +assets/img/underwater.jpg,1580478899052,1069fd53254e22e4bece90a12bbc556e0925aa310de590ac82f6bf063b67a9ed +assets/img/sparrow_tn.jpg,1580478899046,c87e37d4f922c9f673c7bb359c1ebad41f890b05b0e574feaac6f98f27aa7bf0 +assets/img/aquarium_grey/achovies.png,1580478898969,ac25e7adf2d775b0f1ed7d5a94f65c29b716244ba1d74ee0b293436f07a12a98 +assets/img/aquarium_grey/angryfish.png,1580478898969,b2b5cfa60984a559b6b2ff606b2df4c583b01a1ccb610f9b574f8d0c38184b4d +assets/img/aquarium_grey/angelfish.png,1580478898970,a1144c261a748427c2d6a757b07d43231527e3b45308cb093af53f4095a204f4 +assets/img/aquarium_grey/betta.png,1580478898970,f3a2d8a3aea1ddba5614b7fd2bafbda41545b7bd0fa5ceb96ca2187c7d650dba +assets/img/aquarium_grey/bubbles.png,1580478898970,675ce93b92f2385a7ed169d15955fc7c9b8de86ff44bd00ab5d35ece9b1bf34c +assets/img/spatial_lifeinsight.gif,1580478899046,43bbb578178fc39c5871a26c0f733455f7bd1b5a33ecd8324c8fb9ab1fe1ed6d +assets/img/aquarium_grey/butterfly.png,1580478898970,0a8122648cd6abc5d182dfa803f9323430b4a3d4198b9499eb668b182496a155 +assets/img/trivia.png,1580478899052,ae3720eeee4f24000f9ae804b0a23fd771c6d4e4a3b8bacd6958a003e7952e67 +assets/img/aquarium_grey/clownfish.png,1580478898970,f1bbd90084e9bdfa60b6f10f06e75cfabe95c1c2ddd1e6979ae97fa46192b66c +assets/img/squirrel_tn.jpg,1580478899047,e7f9365e9d65525430443e116f5d0460f54621ab62c92c76b32ee84736bb5537 +assets/img/yeti_tn.jpg,1580478899054,9debb791947ef268603189c492880a8cd09246c17fd4353a6a840ae5aa41e6b5 +assets/img/aquarium_grey/crabfish.png,1580478898970,8cf8986a034f34441150f3c50c00f9a3fad5f46c0ff47c3d3286fb4ef4d31ae7 +assets/img/aquarium_grey/discus.png,1580478898970,185e1574a82e3b6d499ae3cf12c46e7e8441c5b87b74558dff5d89e2e2e74b08 +assets/img/snowglobe.png,1580478899046,6c181f7c4ca07abbcc965706974593d9aa01e8107072329b31d02b3c4123927e +assets/img/aquarium_grey/dolphin.png,1580478898970,06c2661ed16c9a27b27ef967cb83a365c57c8986198e93626f6a2a51e88dc9de +assets/img/aquarium_grey/goldfish.png,1580478898970,5bab179d98e9a589adf7118347d439e8d9554114d2673071f0fbd7ac9e1935ad +assets/img/aquarium_grey/greenfish.png,1580478898970,a4ff61ac63529609a8088528133043ea179618f6171e539301357cb28cd93256 +assets/img/aquarium_grey/greencrab.png,1580478898970,fec31edc4abbd8402461117fcf4f4d0e3cc16e7f068aec3e5dcf607834ff35f1 +assets/img/aquarium_grey/jellyfish.png,1580478898971,b32da538e66eea12c94322d392a6c57ada64236bee3f26e7fa440674d4dd3fc9 +assets/img/snowglobe_tn.jpg,1580478899045,6c181f7c4ca07abbcc965706974593d9aa01e8107072329b31d02b3c4123927e +assets/img/aquarium_grey/kitefish.png,1580478898971,e5e6a09e5963fe2b67f1d4a6069272e4b49d1bf69ae72fa3d117f5fb5c0bfa4b +assets/img/aquarium_grey/electricfish.png,1580478898970,4eac9636978873e95e19f19b6823664eb60535d24d7384fc8b7eb2da1eccce51 +assets/img/aquarium_grey/nemodori.png,1580478898971,24108629b7fec59f2214544a5aad9c87612151d9b909ad0c5a9c31f6793d3926 +assets/img/aquarium_grey/nemo.png,1580478898971,e48b203b904c3e1094713e403290e6bb5a8dcdf8b286bed9583bd0a9ee546a8a +assets/img/aquarium_grey/redcrab.png,1580478898971,b347bf60cde034a9ef5050163d2b6e144400cad98872b3aef001f224a0cbab1f +assets/img/aquarium_grey/guppy.png,1580478898971,98a64e661a6e32eca9c583c5594a799b8da7561b579263533bbb067806e875e0 +assets/img/aquarium_grey/seahorseyellow.png,1580478898972,029638904e8b4becfb10439c72006e3ac77ca7cd2620a964c380b5f56342e7bf +assets/img/aquarium_grey/shark.png,1580478898972,aa8873f9b9f74ffd7b37f93de7d6e2c771933f757ff825ade226751ec6aa0797 +assets/img/aquarium_grey/squid.png,1580478898972,69eb97e10f5c3136978ad8992c003e53a40925bded9243d787f675eef8c08af5 +assets/img/triceratops_tn.jpg,1580478899051,f7e72f535c898aee887ce6750f4d5206e0e402db72078f8df996f1faa3784f5b +assets/img/aquarium_grey/starfish.png,1580478898972,0b47c201a2bf55268fb8fd2a72e0760f1048f50da6c8259fffb2e20ac71e0af9 +assets/img/aquarium_grey/swordfish.png,1580478898972,9d69c83a8f511b08c43f8febffc188a5d3c8a1e99a80bc76ad77c76881a3a18d +assets/img/aquarium_grey/tigerbarb.png,1580478898972,ffdd19ef2561369b364f09737098cb87114069c0c064f26d78e1b211bc2feb68 +assets/img/vulture_tn.jpg,1580478899052,4db316fc118994c7549cccfb56b1424faba1d9e424f68e45c5208624c2afb068 +assets/img/aquarium_grey/whale.png,1580478898973,19273a9f663a5162b22f3536de1807cef6eef256b8d75cd8a0ae662ac83f1ae7 +assets/img/aquarium_grey/octopus.png,1580478898971,1e7a363a08d8150cf920b8dd5249b57254dc12613d14769add64aad72cc74dcf +assets/img/aquarium_grey/puffer.png,1580478898971,61f31e9fb5d99491002d0dcdfb38d62af14b2263da19e23d2bc09558f652d62f +assets/img/aquarium_grey/salmon.png,1580478898972,ceca09c875ebf2fbe002be4c8a104b838da021911c4d5f1695aaca316e352f88 +assets/img/engagementimages/bruce_lee.png,1580478898980,a523be1707575baf47c86ea45c52e8381104a828ccfc6c023d5bfbd6947ad23d +assets/img/engagementimages/2pac.png,1580478898979,d47bf177be6d417cf984a7a15bf4dde349f986e11ba3134495ca341004a87e8d +assets/img/engagementimages/Bryson_Tiller.png,1580478898981,033da434426d2dc5d9df9a66737c6dca7ae47853fe2879426e9cfb02af6506f8 +assets/img/engagementimages/Chance_the_Rapper.png,1580478898981,41e9546cb17007fc602e181353c3e5cd5af203809807d3468328fcc2de92e181 +assets/img/engagementimages/Allen_Iverson.png,1580478898980,3ff53ab4991d6bf63c2e29fdf923ce0be0fe5a39fa0a66496775c2e2c3faff3f +assets/img/engagementimages/Fifth_Harmony.png,1580478898981,15600011160233767fe15dc2b2df037ad17e81fa27e927c268af8931d643b768 +assets/img/engagementimages/Childish_Gambino.png,1580478898981,8c5f40ba742ac30c89e0dacc0f2a922ba087a15879cb401e0d3cec926adc98f2 +assets/img/engagementimages/Kendrick_Lamar.png,1580478898982,0a13cb82221d7fc0f8bd675f689095cfddc77c88a4c61e0dde98603750f13ba5 +assets/img/engagementimages/Luke_Bryan.png,1580478898983,870bb86154421d37d87751f31a0823ec947719e6e243cc2924d8c6d8a1fce6af +assets/img/engagementimages/j-cole.png,1580478898982,850e418f5377c990f50157fbc7329e2a9cfdb38a2071698527b26cc2564f8319 +assets/img/engagementimages/Shawn_Mendes.png,1580478898986,9800c4f913a00739f2dd317cc3947aa30232b24c3729acd04229159334adb692 +assets/img/engagementimages/Rascal_Flatts.png,1580478898984,454b80282f5255782484046c34f544b419baff5dc64e0c499e033a1e2754b207 +assets/img/engagementimages/beyonce.png,1580478898980,9665f4c48fc3a66fa0d0a4a65aeefae280dda1cb8879233187dc83108ccd00a5 +assets/img/engagementimages/big_sean.png,1580478898980,e8f66a69080cc83afa0d29d09c1a5e597be7e5a2b7dffb21aed1b1ddcdf52702 +assets/img/engagementimages/bige.png,1580478898980,1a2fbcaa4580653d45655a1d6c084cc473b63698537fd4ad38b59992724cbc3c +assets/img/engagementimages/derek.png,1580478898981,55d97e77265023ce56c11dc74e36c0ec75f498b384a8092f517a83959eb76c16 +assets/img/engagementimages/drake.png,1580478898981,8e9e5a06f5733683a95b2e3c0b2169bf8330f960e945a5d43c626ca487a30690 +assets/img/engagementimages/eminem.png,1580478898981,ce683d7ff5ab4b2d765389d094c4e2efe217f07f082797ba82efdbaeeac5d34a +assets/img/engagementimages/rhianna.png,1580478898986,80c40e48bc12658dd897ecef71600d7f0c0a488ef1b14c436e2a54ca4da70683 +assets/img/engagementimages/kanye.png,1580478898982,839f02c3a14ad35ae058918d0da645ba2b87b6b16fbd53af392a93e55d610f33 +assets/img/engagementimages/machine-gun-kelly.png,1580478898983,39f23e8bfba37060613818099a3ec1e941c5930ef835d4a6d2e163930ea003ae +assets/img/engagementimages/meghan.png,1580478898983,79f6996184c02d8288c717905d49add71e0c392a3bebfd38b08292de5b5d81b2 +assets/img/engagementimages/wale.png,1580478898987,fe00d628f53b6c7cb6909bce8ee2f53f5a41e0f56349637f59d27bc79663ad90 +assets/img/engagementimages/jayz.png,1580478898982,dc79a5d81db81ae5f1619fb5b202d92c5081a6a7a2f10fdb1ac3aeba60144411 +assets/img/engagementimages/nichi_minaj.png,1580478898983,aeb68c74493bfdffcf44c8f03b7b01a123cd25e3127095e442a00767b3816c24 +assets/img/engagementimages/serena.png,1580478898986,448ff7224325243e34ebe119109eec69b327240528d803570d9c52eb4e98d1a0 +assets/img/engagementimages/lady_gaga.png,1580478898983,af3c30b7f94bba2e28267d2e96ac60a3fe0296401ec1245898f71a856ee15229 +assets/img/engagementimages/justin_bieber.png,1580478898983,3a6ab5f67aed003bfd13db19c94bb1c69ae23815c4cbe45623c2666b7e2e47a2 +assets/img/engagementimages/michael_Scott.png,1580478898983,ec78afbdeffd76c0c27ba856c897c7b0695e89a01e2f95089e989da3384d5fee +assets/img/engagementimages/selena_gomez.png,1580478898986,be186a9bb1554823a8135fc75701065b1618733fd81e2956f1ecc94b56a7ec19 +assets/img/engagementimages/sia.png,1580478898987,fa4868252594479635972ad9e54e0961055a9e87e9a03c894a1c877e649f02d3 +assets/img/engagementimages/will_smith.png,1580478898987,c96b55c35a161202ca41ffa1b0f5fbcbeed03cf8b29d4a1f2f39e56f6bbb5cf9 +assets/img/engagementimages/sam_hunt.png,1580478898986,53b375f639a827a912f0f53b88f623a90b91c9a2a9f1679cf99e8e7dfe600a2a +assets/img/engagementimages/stallone.png,1580478898987,23d47095a1079c73060b753a0401b790713274ce9b485d1b0071276c5a9f5f06 +assets/img/engagementimages/shaq.png,1580478898986,7e0eaf351cd829cb169179a00f12b2c86c27c7ad4ba2a85a2967f650dc6e8b48 +assets/img/white-husky_tn.jpg,1580478899053,1ed87e4b0aa0ee1b183ae7d043068bc08e5d0aa1e82abd7a003e448ef7bb9b10 +assets/img/reinforcements/gifs/IG22.gif,1580478899023,98d3dfd02968f8972dd2af9c87d2e1c413ec15c8450fb61521f3e73f81348018 +assets/img/reinforcements/gifs/IG11.gif,1580478899017,99f6c9cc782aa334128fb69470689f3b55b169d16173a96a5eff651929af1f98 +assets/img/reinforcements/gifs/IG23.gif,1580478899023,fc0077ccffda26dbf21d53e145271d5c4aa59cb327128e08809bfdfa5b817191 +assets/img/underwaterbr.jpg,1580478899052,c2cb9c65ecd7ab2bb0123c7c16ece9de7f0d07976f0a8fb0b7590a3de3e8ca03 +assets/img/treasure_chest_rainforest.png,1580478899051,b388fe7c7ba81ef2020d840a85d0e346e9fe6fe5a1da808f7684176a3689a7c5 +assets/img/reinforcements/gifs/HG2.gif,1580478899011,fba286ea23def5744c2da92806a9a246dd796396f77c3ad123d521b46dd251f2 +assets/img/reinforcements/gifs/HG15.gif,1580478899007,d7fa5d7b1efae62183eb474962295d25712548c2d8d2856e48e74ef41085ed30 +assets/img/reinforcements/gifs/IG26.gif,1580478899023,8145cd65d266f823a25f6c4d2983c7cacfb2fe795878c9ed9e4240fd23f2a2e3 +assets/img/reinforcements/gifs/IG20.gif,1580478899021,c53c3b2de3dd46128e7377a6af854b87ca548b9cb005d76adc4dfe16e65282af +assets/img/reinforcements/gifs/HG23.gif,1580478899015,a3b8be8f749d96d085ffbe734da97b8ef2f3d74ee8e7b60f622ccff94c63450b +assets/img/reinforcements/gifs/IG27.gif,1580478899023,6165f073215f1691fe990afa15a87883ea48c5ad5987c1ffd496532030bec373 +assets/img/reinforcements/gifs/IG25.gif,1580478899023,e350c5191cc6822f7494645e46ee8f775addcce9da15f180c8ecbe46c69e0142 +assets/img/reinforcements/memes/HM11.jpg,1580478899027,d87f177bfd09a46aa74361f518f312a0e7d45d3acaf4faba3e010aef993a7e7f +assets/img/reinforcements/gifs/IG21.gif,1580478899023,69124f399454773a8c33b69731aae298abc1fd8ccdc3d2933c5e963d2e19fbbc +assets/img/reinforcements/memes/HM12.jpg,1580478899027,cc19e6e1552683227b58e39a7ea66a4436382bb1f9ba3581e7de530663fd9ebf +assets/img/reinforcements/gifs/IG29.gif,1580478899027,a1477c1386b72178ec76baeb1d5e40e2571d9e7fca2225d1373ef183c1c86a45 +assets/img/reinforcements/memes/HM16.png,1580478899029,1ebbab022506fe8d2ef200855677493bacf20154377ec287712d624497b6e224 +assets/img/reinforcements/memes/HM13.jpg,1580478899027,a3c6b57fe3040fa54d7ce52f8e8b645cc55a57c22f6f3c3dd5894ce1d9d11a48 +assets/img/reinforcements/memes/HM15.jpg,1580478899029,67e1671358f4aa15443dd942d63a55d5001a7161aac0a1a014fa2d147df78f57 +assets/img/reinforcements/memes/HM1.png,1580478899027,c9bc56c868e47ce83e0ce8dfb498befe17e652b8f44d9083843fd1e15a37f6fe +assets/img/reinforcements/gifs/HG8.gif,1580478899017,0311ae76db2d01c5db9d7f0200be850acce00c92adca835eb823e638078f4b68 +assets/img/reinforcements/memes/HM14.jpg,1580478899027,1909318722aa0f8a8d2252559d64fb6143fdb694e9455f7a01f58557de64dcaf +assets/img/reinforcements/gifs/HG5.gif,1580478899016,88572530a5aed3b776b6073f5d0e21b742cefd751cd8f9e5346456658c7e39bb +assets/img/reinforcements/gifs/HG18.gif,1580478899011,813a1d555e1c33f4237542f51af7787765f3f461f14655a647fecb8628f1fd95 +assets/img/reinforcements/memes/HM19.jpg,1580478899029,8c81a3f610473ea523d04b25717cc34132f7c987c53bcf30514e6311e54b4240 +assets/img/reinforcements/gifs/IG8.gif,1580478899026,796050c7e8e23a63e7ccc54383bec3c5e80811cddf3aff3f3b769d2b55507960 +assets/img/reinforcements/memes/HM22.jpg,1580478899029,1a3818cfa634be73b37214d2b3d720800a2b79a48d55393fa668e94b4c74a790 +assets/img/reinforcements/gifs/IG24.gif,1580478899023,09b360cf7735056609d7ac80504a9a5ee3b74e65bcebbe788597e173a7321c27 +assets/img/reinforcements/memes/HM2.jpg,1580478899029,c1c908f56c0de4cf28ed861fece596a2c11f76b62c64f67682e0ce146c685713 +assets/img/reinforcements/memes/HM24.jpg,1580478899029,25a57d5cfa3af2bfc1ac12b3aaeb0964c1f9532f9353389a33d5d73b982d010b +assets/img/reinforcements/gifs/IG30.gif,1580478899025,d93dbd23298de9738e3236dab95f42999cfb3cc05587db20f85c7975f9cc8fd3 +assets/img/reinforcements/memes/HM20.jpg,1580478899029,a3ef381e6411d1b8092b5c5ac6f19c83fd1a886215a82e9a33336f4ee0404e1e +assets/img/reinforcements/memes/HM10.png,1580478899026,7db9392b1df0d853d27b11beb1ff9972bd3a2c0898893dfc6ec54a1c7afca15b +assets/img/reinforcements/memes/HM18.jpg,1580478899029,4810bdfe31f5ff032cdd0364f3fbbd2cb4a5e046bd80cf159347f5149f894e31 +assets/img/reinforcements/gifs/IG19.gif,1580478899021,bfd15d41a458b744c2c63fd1e71b1a06a340770a08280885e4135729815dbc0e +assets/img/reinforcements/memes/HM23.jpg,1580478899030,566b6e27eebbe6645987e1215f56ed93768490ad32a158aa2bc27ebeff98e83d +assets/img/reinforcements/memes/HM25.jpg,1580478899030,842fa7adfbfe3b70feebb354e367a135c7ec18453b907b64e61917a8207f4c42 +assets/img/reinforcements/memes/HM30.jpg,1580478899031,fb45040405e8789acd0dea3cb706cb9f47db6eb8898087b2441569f99a79d94b +assets/img/reinforcements/gifs/HG21.gif,1580478899011,56f30ae257f661cfec314c81c14528a7f971d67a09f8fb2ac9e68ab5e247d2fa +assets/img/reinforcements/memes/HM6.jpg,1580478899031,272df36a51f4cb741dc005a067e6afdd18af25285c31913d5e3c0d62714960d3 +assets/img/reinforcements/memes/HM21.jpg,1580478899029,d39d9084eed6d3e31a0ddceb8c1dd2f00554f7445294dcd287736be5b7090a55 +assets/img/reinforcements/gifs/HG4.gif,1580478899016,7cbfeb902eaa795849dedbfcfaceb91e7a89e4aa443b977d8eacf9711f090ced +assets/img/reinforcements/memes/HM26.jpg,1580478899030,fc231bea24d6490d339f3697b39987a2562f16e515ded58a140ce92c3429b524 +assets/img/reinforcements/memes/HM29.jpg,1580478899031,9730717c151c989a06ddb61eececfaaf9bd70fb0cf1704f9006fe3de91202bba +assets/img/reinforcements/gifs/IG1.gif,1580478899017,c62d152a8844785048371ef845700eda836ca071d11da3acdf6036d12b8fee52 +assets/img/reinforcements/memes/HM27.jpg,1580478899030,730098d18383f127e657d20afa599a7081107d02145d95d030f2d946e000b365 +assets/img/reinforcements/gifs/IG3.gif,1580478899025,be98aa4f99b10dda8302a587541fe2f64b108506b8c1abf337c0ca691813cda1 +assets/img/reinforcements/gifs/IG9.gif,1580478899027,e83eb8ccf28ad8b180cd26c5392d7857ce6f82c28baa9e4fbf9f65f4597658c7 +assets/img/reinforcements/memes/IM1.jpg,1580478899031,900c66fd2f88a032419720bbd258e0fcca1d261eea050cd52327ce424931df2a +assets/img/reinforcements/memes/HM5.jpg,1580478899031,589dda2fdabcb8b6c2fe680d758f0800d10cfcc4e9b7d79425bd7ad6eed2ac0a +assets/img/reinforcements/memes/HM4.jpg,1580478899031,2c25152d9d3dd09220eb77ae0c14f9f97ef9a50ef7cdafc06e80e23f2c8bf144 +assets/img/18_Rev.jpg,1580478898968,6a5c5dc1fff3bd0b1ed0663807a66898d3dd0a568147ccc28c4dda7291e5c2e3 +assets/img/reinforcements/memes/IM10.jpg,1580478899031,172b7a7aa6fe18fab3be520d292318cf4f020541d1c1ddb9d2fc21276d0fc473 +assets/img/reinforcements/memes/IM11.jpg,1580478899032,9d43063d64ef0d68e41d69bbc795773cafdebd18b8ead647b0c150e0760b7c49 +assets/img/reinforcements/memes/HM9.jpg,1580478899031,eccaffcdfba55392f82bd17ecf1017ea5fbdcc976c35369438956ee9b90c5908 +assets/img/reinforcements/memes/HM3.jpg,1580478899031,5587f7555473d490626ef604566992d2c8c6f0171879abb519abca21fe998ead +assets/img/reinforcements/gifs/IG5.gif,1580478899026,5d565bb0d69f8b96083097b7f2a7c37d653970e7014e3cecd86b298ef7aef1b7 +assets/img/reinforcements/memes/HM7.jpg,1580478899031,f450672e224975184d47f7992af94d23e67c9525a024a2b75f15f68d0fd9427f +assets/img/reinforcements/gifs/IG10.gif,1580478899017,500d0c556eea5741d4ed46429cbfc3934e83620ac25e57045c80465d6842a06c +assets/img/reinforcements/memes/IM15.jpg,1580478899033,491a7cbf3bc90592050fac297df69cfda3e764ed5adad69acf7645af626c0241 +assets/img/reinforcements/gifs/IG18.gif,1580478899021,2d4bb7c3f58180696f708956ba793295f3118b7f6a7f67411cf48c326853e2fb +assets/img/reinforcements/memes/HM8.jpg,1580478899031,0850b6ade328d8bf425ca8747393dd47c38fb050cb283657f4a9c96e8570e60c +assets/img/reinforcements/memes/IM14.jpg,1580478899033,ac7434557b1bc0444bb621c0d5220b07ff07e068efa047b869aa95d686107e19 +assets/img/reinforcements/memes/HM17.jpg,1580478899029,01389a3fe0bd810f3cb1ebf3dff9211023440b704c8c6dcdb1ac259e9f33d1e1 +assets/img/reinforcements/memes/IM22.jpg,1580478899034,142c71a1c9d05a6d8f77a1084b33f784e5250c7544e585461f3c2dc33bd7c3ff +assets/img/reinforcements/memes/IM24.jpg,1580478899033,cda1967b37858eb5903442567cfdc3a14fd8ece67cdc760f4d416b7515e502b8 +assets/img/reinforcements/memes/IM21.jpg,1580478899033,7ccdfba2f229a4dac21e94f51025da193edaa8643eb7acf825150588573c851d +assets/img/reinforcements/memes/IM3.jpg,1580478899041,c7b3e603ce58c4400f3ba298ee32012e625d081e57f9251891544bb2010d7198 +assets/img/reinforcements/memes/IM25.jpg,1580478899034,995a12646c7606bec43aa9e2cac27f835397b3558aadf1a743380417831f76c9 +assets/img/reinforcements/memes/IM12.jpg,1580478899032,8e32d6ed9829ccc7c8de59d6ebc35bf761ac6285f3d087fd19726364e8139139 +assets/img/reinforcements/gifs/IG7.gif,1580478899026,b14f3a3e338f76ecf699d56ba4b3d4876feee17d81eff873ac12a22f3b86a59a +assets/img/reinforcements/memes/IM28.jpg,1580478899037,8901e2815c6dced0d6d017fcc737976c9a6092890872b1a94a937c34f97e9fc3 +assets/img/reinforcements/memes/IM29.jpg,1580478899040,972e53af3761a53f9b80f6a44a7b2d560aa6e871c7b6204b38869fbb6f434e3e +assets/img/reinforcements/memes/IM27.jpg,1580478899037,ddcf11738051d4b140029bb59843234f2db165d4b3ab13923fdb6e869fb5f778 +assets/img/reinforcements/memes/IM20.png,1580478899033,48582275e5fbfb1c9d3f38b3a2332478c3d46be6c2f9293a42ca2c2ab31d33a3 +assets/img/reinforcements/memes/IM23.jpg,1580478899034,012c6d4237864b0a479b67b8d5616f11a33283587cfb5624e245e34e2dbe08b3 +assets/img/reinforcements/memes/IM2.jpg,1580478899033,50bd5918c5fc8d332ef83fe03574ecba99c84384fac05c9d4e1ad6ab4b499369 +assets/img/reinforcements/memes/IM9.jpg,1580478899041,1ae2cc07e342339b53e849e3e0304ce687b7b0a510b8d740aad6caab71e1b674 +assets/img/reinforcements/gifs/HG13.gif,1580478899009,5a9556145bd7f7ef2573ebdb978add71c3d860d6d011ba56f629d55df15e2a78 +assets/img/reinforcements/memes/IM7.jpg,1580478899040,8fddec3c3d0b2896762759eddad37e093df68990e6d63d08402a22f2b1669f38 +assets/img/kylie_u_of_melbourne.png,1580478898998,5b2f81c93dc90c7cc54435adb7e064cd16f2a53091d6c2e66da66bf9809eb2b9 +assets/img/reinforcements/memes/IM30.jpeg,1580478899040,fe8e63ee56c420a19bd2b7bc8cc18e80594c9ab602d43976ebe115b66cf0a8e6 +assets/img/reinforcements/gifs/IG28.gif,1580478899024,e5501a37b9cd11215ee11421d20ce2357c750c0dd27bdacdc4b2ff83516bbd23 +assets/img/reinforcements/memes/IM17.png,1580478899033,2ea788f8ff224bf65979e80ff74d6e446703fbb81794faa5e4d14e8557c29e23 +assets/img/reinforcements/gifs/IG13.gif,1580478899018,09401d113b51e52e64241cc13b382fc57075d534682064b21217ef5facd3be0b +assets/img/reinforcements/memes/IM16.png,1580478899033,1caa8305e8bdc0f9717c00db50ac1aa36a573f50676a98c2819146c27a127f09 +assets/memes/13.jpg,1580478899054,da8c297b1e8b8972d64c7f4117c314b44224fdf539a98b1d396b7eca5c267def +assets/memes/15.jpg,1580478899054,571853579b64f0d2daa2c7e8fd7c821bbcb85c08646d52c19d90251cb85a5f3b +assets/img/reinforcements/gifs/IG15.gif,1580478899021,ac59b8c1fcb903e10261eca70f7fcd37d1247c785c60affda5626305c22bd5a2 +assets/memes/10.jpg,1580478899054,587e8d84f7ca7459a41ee73547d6cf02fc990f0483d04e94bd8c7d1a9d6d20c2 +assets/img/reinforcements/gifs/IG12.gif,1580478899017,2181352b35c4080c11a28db7ca43f35c4627190b3ac6d1da9a7dad459144a90f +assets/memes/21.jpg,1580478899056,c426b9a711f8ee479e8e6d387addba03ea476b56f57cb095aadde066cd33bd99 +assets/memes/25.jpg,1580478899056,94c5cfd534536c075b457636990daf45c18087aed8edb836cc5621b55dfe8e69 +assets/img/reinforcements/memes/IM8.png,1580478899041,e0a016f109680e8b9a0b89a728d4b66fa3040ac38186f45a521fd37171c92b74 +assets/memes/14.jpg,1580478899054,d98268fa85d14d99ec7283d2c21596d01d935cc6adaa971e8742081cf9c1eb34 +assets/img/reinforcements/gifs/HG1.gif,1580478899008,59a255a63e513a480f5e244b2ac3a791dd3847853b1a71c5862b6843d49e0a2b +assets/memes/16.jpg,1580478899055,d773ad217113e6318b9a229cda4dbe90e14c9ff6b6e23bcc590e90f33875f5a0 +assets/memes/18.jpg,1580478899055,fdf8a0fd219e65d8528e3376532bcd0818377be425b1eb88e06e100aff89d9cd +assets/memes/24.jpg,1580478899056,933a1d0554ff324fc4a904408b5e713ecd9546ce35192aa380b47eea3eb73d54 +assets/memes/12.jpg,1580478899054,5b224cbfea186d51e9d90b1b2ede1bf39d8343a86df65d74c257bd6976c70cfa +assets/img/reinforcements/gifs/HG3.gif,1580478899016,7b5851c593160c654f29fb257f0ff4715ab45ccb2c41966cffcc1040d9569cd7 +assets/memes/23.jpg,1580478899055,40cd88cb4cc1974ec1f7d5c17d48ba896fed750dc98436b32d621f021641e075 +assets/img/reinforcements/memes/IM19.png,1580478899034,50f86e0d65cb7a83d85b470a174700af01dc3b71db53ca465d24ef0acc20c7e4 +assets/memes/17.jpg,1580478899055,29d02f0f5159d1c3577461c318ec7a443e380eaf6cb3fb8db5721a4967417601 +assets/memes/1.jpg,1580478899053,faeb259dea7234102e6f93149317158cf5a05ba996f1a074a3e21bd66f8efdad +assets/memes/19.jpg,1580478899055,773c5e25a00a0ae4955a930d4ef167ac094e931832520f36a7e58eaf83398003 +assets/memes/29.jpg,1580478899058,0f333919f7467d8aac25bab94ce7be60792c2ed58587ad62fca5db587c21a953 +assets/img/reinforcements/memes/IM6.png,1580478899040,7a5835eebd6beb7063b968f174f551ea96d8d62b30057c276bf5592b6732ec72 +assets/memes/memefile.json,1580478899061,2b36240ec40d01eb78b09661be57135b6811535c8309c2fd4f83935dbb359c5e +assets/memes/4.jpg,1580478899059,99bad8aaf100d830b824426c6fe9a1729db762cbb57a32b4dd6fce889f7b167e +assets/memes/26.jpg,1580478899056,18c8355a7820acae012cef2356f6774cba3a0b67b11102ee664e55275938eb81 +svg/ios-add-circle-outline.svg,1580478898827,6cf7a70112218e2efc47f87edbf80bc1048623a5db0d07f6fcd65956d1ea9b29 +assets/img/reinforcements/gifs/HG19.gif,1580478899010,b77abb3953a3034aeede47e3c28d2dff9036e6ba1c577e4cc8932719a4cdc452 +assets/pics/affect_grid.png,1580478899061,94d285710fd02832c605fb8035d158a7204c4d2595cfc5f4cc2ad41ba299ae43 +svg/ios-add-circle.svg,1580478898828,9f0531aad8c5e10cba0baff2016d810d50d6c5587060f286acf08eac7344df80 +svg/ios-add.svg,1580478898829,9738f0129f0682f3749dca29998f010fb06cdcf3fad8ecf5cc20a9ef8c614d7d +assets/memes/28.jpg,1580478899057,81fb11a3347f189f73ac53b1013060d683c785a9a96064e2be7532b24770bb4e +svg/ios-airplane.svg,1580478898827,81cdc91f996f66db015f3f7365700fea192d6ff0fb0bd91f2e50c884e0c47001 +svg/ios-alarm.svg,1580478898827,3fa3d83316986b851357e31fdc51ecf18eadb2c3082a6f4a9dce3af5b66f0005 +svg/ios-albums.svg,1580478898827,1638f7538d885c700c39c6a32d09cde5dad972ed46b3c42451316d5d22526b37 +assets/memes/5.jpg,1580478899059,6033fc05263ed6da95af43166ce0a5a5a07568b778d7438ffe092dfeafe704be +assets/pics/rock1.png,1580478899062,50116e45ca77ddb3b81bb24c31e4e09f8142890f9318787ba644e960d67c25a9 +assets/memes/9.jpg,1580478899060,05086030590158743f33e4f8b9df56d2ababdfc8bd664d471235734302b4ac1e +assets/memes/22.jpg,1580478899056,1df5099069dfb9c2a8a82397e9d51b731bc871a0d80849135b5bc1658b2506a9 +assets/img/reinforcements/gifs/HG6.gif,1580478899017,535ecae4d9736eb1d90e20b1f2062d93d1a10ed6aa0236e5eaf70c508150d604 +assets/img/reinforcements/gifs/HG20.gif,1580478899012,a59f90c33ad9596ce1ec26bc386392bfc24db77d337fc4d08555b3ca03e1b094 +svg/ios-alert.svg,1580478898828,c735329777508a4c184be2045a48549d1c42326b9896f516946885fe2b550eca +svg/ios-american-football.svg,1580478898828,f02d2d305bf4d14a5e2f17d10b033c864df3cf938f58b9d3b0befce4c2b3f5ed +assets/pics/ra_einstein.png,1580478899062,a6261fcb509219fa5b89e0ca617f0fabdd33f6e4e7af99b6e99be27b9ba48011 +assets/memes/30.jpg,1580478899059,6e0d1a2f35b85a9522af341a1264900e75dcf0b6a4b4216003dd644334245589 +svg/ios-analytics.svg,1580478898829,d62676e5bf3e098f21a8437314f6ee18a0196d674abb87ac450d2e7cfc8665e3 +svg/ios-aperture.svg,1580478898829,8f6d78830c0355355efdfdc75703f9ecdc8d5470a82132729c0a9f74f43bdc00 +svg/ios-apps.svg,1580478898829,37fce2cf0bd4758ff110976cd2bc12df15ec1514256fe3699d2edd2855218c03 +svg/ios-appstore.svg,1580478898829,db06e504999fd2342becd25dff5fedce52ff848dc0a1d95b12cda666dda0e93a +svg/ios-archive.svg,1580478898829,a98fd4cc3b336845d467a023f7013a4c0932d40d6aad90819aecf7148d9fe902 +assets/pics/rock2.png,1580478899062,c089b1fc6594db88789bbf822922f3fab6cbe87e234882400ff7f10fe02324c8 +svg/ios-arrow-back.svg,1580478898829,3ae6c6f4f7f6f065927f84382df613b05c8ebb48aba18b0f6ba8e9fc99a3f940 +svg/ios-arrow-down.svg,1580478898829,f1639acbe190c72ff1447e3405b385814efae8c7b856ef65f2d2edf59d773fd1 +svg/ios-arrow-dropdown-circle.svg,1580478898829,6078d5b56bd7e59b667dab94bced147128a8c26b58e67776c37aac8d42e82574 +assets/memes/27.jpg,1580478899056,f6eff3a05702137884b8410b88c4ec75016ccec0caab5bca665f20187533483e +assets/pics/bg-tundra.png,1580478899062,02752cc02b5c80359ea5a191187ef26b56f5f1ab2410be7a3379c380fda2f754 +svg/ios-arrow-dropleft-circle.svg,1580478898830,31e282d4251e151b62f3aae2d2cf5bee220b7be5ddc6079ed755f90c0a6e5df7 +svg/ios-arrow-dropdown.svg,1580478898830,21cfda13dc61baa8392e3dc589ab85a9e98a547e8dff1fc302946a400043e27b +svg/ios-arrow-dropleft.svg,1580478898830,8562121eaf4633b02f16d84d392c3ef338d05c950e00a5686700c66058d26392 +svg/ios-arrow-dropright-circle.svg,1580478898830,3dd201977dc6ea1f16d4550322455495cec8400e184fe89225b4cfb86fcf647c +svg/ios-arrow-dropright.svg,1580478898830,477167d146093c2837aa532743b4421c0642a6b5e64e3c3be93f09755c81afd6 +svg/ios-arrow-dropup-circle.svg,1580478898831,097d28d3667a1dd2d4a2f1a9f82c4b30059991d126241322c55b15a279d6976a +svg/ios-arrow-dropup.svg,1580478898831,159b0e38b4b57c3377bd8f4e01ad148c02cced9a63cdeb2405dec0c41bc9be6a +svg/ios-arrow-forward.svg,1580478898831,9428a4f85e666e57f5d07a999d1282bfe04e0c7f8e9d40e38db695f4475f6f08 +svg/ios-arrow-round-back.svg,1580478898831,6ac75346c671c7ae2b1b819ff7872956bd692baccdf6bff69a8e90142845eeab +svg/ios-arrow-round-down.svg,1580478898831,fe3433472568b3ace7567cb64b8d51f3e39f818a0db89c2fd7c703dcc499deb3 +svg/ios-arrow-round-forward.svg,1580478898831,ad45b2a890bf53a4da2824f2775769867de8ba13c8a3f02469a25f404b43d45b +svg/ios-arrow-round-up.svg,1580478898831,058b3f81be97e30471178ab28d9e714b151d346bb526647d5cca4ce526c8c914 +svg/ios-arrow-up.svg,1580478898831,1ee5360419d889654a51fb3bd693abf07984b51d282b9a397e3a675fbcef65b3 +svg/ios-at.svg,1580478898831,639ed5929aa08f579f18993deb26abed699889379d44f589d6a860ba91c6c819 +svg/ios-attach.svg,1580478898831,051159472bb7dbc9b95d24551ca823b9e69b639f1acd4da5b34437ab3825cd60 +svg/ios-backspace.svg,1580478898833,586a3d32b2e8190aa5fc8b2cee9ed4e9e9fe05620c9f4dc800c56f6d4ea29952 +svg/ios-barcode.svg,1580478898832,399e1209cbcf0f638e219ff0ebdf7748d781b5fecb7cf9d9f086aa54fe18f7c7 +svg/ios-baseball.svg,1580478898833,01690b863639a8a61bf83be8a4397e2a44cb3b544a0be4e98da9e93ad592e76b +svg/ios-basket.svg,1580478898833,3157a4f8f712edbd9682cd63701d2b13c7683f0f85928f5ceb8554b87164f6ec +svg/ios-basketball.svg,1580478898834,c6857a914f472590456f57726e40361349ea9c4c5178a0807b8c72b77f3307aa +assets/img/reinforcements/memes/HM28.png,1580478899030,d59ab2556762f15eaa5744eda1592014ee39f3e0a8e4167e61d1e9d423994edf +svg/ios-battery-charging.svg,1580478898834,6f1bea6a04158dad70ec982a4dc340e6c418085802816762b84921919e5d9a2f +svg/ios-battery-dead.svg,1580478898834,22acfd04f9cfbc16c6ec5dc37757860bb9c330a30285d4a527299da0e4f62d0f +svg/ios-battery-full.svg,1580478898835,752284388dbc0ab9eca02766eb8552518e85eb85146ce6ebe45d9a562a0b364b +svg/ios-bed.svg,1580478898835,192679bdc02cab8e7f595a72cd925b8754b7d6542d60c7e928e12042631004bf +svg/ios-beaker.svg,1580478898835,bb1aa32c3235e950d780d61b96df89b878e1cd7e47da0e6792e17e5d49440fb0 +svg/ios-beer.svg,1580478898835,126bd75ea71f70b256f81ebc9f2094afd0812324ffc7793bf328667a7e844ded +assets/memes/31.jpg,1580478899059,ce2837014b9e80189fce1ee83780ff5f057e52debb08a88f0c8f95b1990d5d66 +assets/img/reinforcements/gifs/HG12.gif,1580478899008,b8675a395046e26c340969d8ac48efb06f076ff907f6c58931c720b974cad2aa +svg/ios-bicycle.svg,1580478898835,a3e6454487f89b095535dbf8cc643e1a07aa3dfd4ff741fe064f39fe31b2cf83 +svg/ios-bluetooth.svg,1580478898835,e6acf3ce8ea95b05eaa82e7fa830b5a75b87a0aa2d68dbd9fa7b5e48985d7d56 +svg/ios-boat.svg,1580478898835,cabf851e8eae40bc44f5a91adeedb79f8b42fd8ed97bb27990a1360b088a1337 +svg/ios-body.svg,1580478898836,e63da0578dc17005be1d43eb753960e99658bb009d6760e5649c8ee61442c53f +svg/ios-bonfire.svg,1580478898836,b6c99e369a0f69a5d4673868b60102f2708b89a8c0e3ac6a2257b1e8586b57d0 +svg/ios-book.svg,1580478898836,69251f087d256712bc485a3af243065464bce824228dd48fd08628124d8d15f4 +svg/ios-bookmark.svg,1580478898836,dc0ffa3e1c103c9422918f56186bd00721d70ea24587501ecd7f20ed313ce082 +svg/ios-bookmarks.svg,1580478898836,f43138f9d8e24212a45974591bd58ecc493bfe39eb96e502cf8cbe11f48aef1d +svg/ios-bowtie.svg,1580478898836,f5a99892fe2811f7fdcfd331228f0de6e32ec4b6986720739c2efafaa5359a4d +svg/ios-briefcase.svg,1580478898836,4f1f38a5687942719a4fbebbdfb67b31c92ce7ee85353f811ec06e8f067981b1 +svg/ios-browsers.svg,1580478898837,a1089a992110a3e3d24176907cbb8cf9c8c2f104c167f540d84e2dfe564ae603 +svg/ios-brush.svg,1580478898837,9a00f61c3d73774dff98b7cff3bba792bbd112be7f47091c4f41f719fd07f27a +svg/ios-bug.svg,1580478898836,953537fda3425bfa44d402c889937690630eae02057bb77fead9754296217962 +svg/ios-build.svg,1580478898837,366619eeb75bd5f83ebd5481deb19abb9001c2da5a07f4a7391276aef9b97782 +svg/ios-bulb.svg,1580478898837,9fd82e0318a0653020b6a998f4689e41a7fe0dd539887718db019002fb8ff89a +svg/ios-bus.svg,1580478898837,e2ecfe33bb6e46411159f2a989a4e9569d61f9805eaeec9e44f50dc8a9e0122f +svg/ios-business.svg,1580478898837,974b1a926627c216c300a4e6699fab945bad667438d59f09f3f5ecf77a2ef60d +assets/img/reinforcements/memes/IM26.jpg,1580478899040,4dc880a958c7ec09226a56266e066ad6d2c2cccac162d2742a560c18fbada444 +svg/ios-cafe.svg,1580478898837,78bc3a0dd316e77382c54f35f0cbf58b930f94849980b59afc524b5dbac8fdd5 +svg/ios-calculator.svg,1580478898838,e34bb570f2c5c104932dd1e1912ea6df6c873832a96b4ff85cb5dfedb677280d +svg/ios-call.svg,1580478898838,6744634ddba15d5b81da857a8a89a39ab9355bfe072d559bacd86fdf8c1e98c4 +svg/ios-camera.svg,1580478898840,883d9f242c82c5c9829e1b6d7026b3474599f49c850d9f7402750e43ee784230 +assets/img/reinforcements/gifs/HG29.gif,1580478899015,979bc19cd4309c913592b5c8ea156e29d0b813790f1fbf02497201ccaca0e649 +svg/ios-calendar.svg,1580478898838,132aa0ecf173440c643833fda9ea424e9605412f49d6ef2fe2994fc84f97feff +svg/ios-car.svg,1580478898840,f42a24d227c796b201aa521cb6041415479a77d756e26d22d768b96794e1dc3b +assets/img/reinforcements/gifs/HG7.gif,1580478899016,47b9bd9f15dcb346639b30ac5615c92062d041288e8f4a806fa24d02aef7196b +svg/ios-card.svg,1580478898841,e982096facf22ea6ee563f846de136eb9eecaf8b6bacf0e531eeb2785cc4275d +svg/ios-cart.svg,1580478898841,48e5d2dee2803c652a281437e947aa362532b4b8e016786dfdae2c2bd702e44e +svg/ios-cash.svg,1580478898841,0d868bc013a3c6c7bf09b16292a770a62032f8e1533a6e93cda44271646188e1 +svg/ios-cellular.svg,1580478898841,2de1cb349b91f4924374a9104cc3bc8879bef78f9aa9cf36244a6937affd9d3c +svg/ios-chatboxes.svg,1580478898842,0889f4ca30bae19dd5aa056c5881afb40a52c98a9410b99d41c208ca7c24355b +assets/img/reinforcements/memes/IM4.png,1580478899041,11e876ebfc6675a6ad892980a9bc9ce90f6afa09f668285662c99cfb78ec0cfe +svg/ios-chatbubbles.svg,1580478898842,a80be38ac4778ea2338d5ade7c0c60f4cafdecaf3fa01422bba57faf44483b30 +svg/ios-checkbox-outline.svg,1580478898842,e0b2b91877b2ea71957e91e0f54430a1fac27cfc955ab59ec20233f22681c1ae +svg/ios-checkbox.svg,1580478898842,48ac7ac0dd49d231f6ab13a75c4f2fade30f609dba6b611f437d2a70492158ed +svg/ios-checkmark-circle-outline.svg,1580478898843,8bfd4875cdaaf4bd9b329a765637701785c7cca74f02bff43fab469071a8b2cb +svg/ios-checkmark-circle.svg,1580478898843,a2610b2ee40c86596196a9f3b7deb3e456fd3ffe0d6a6a17ef372daead910415 +svg/ios-checkmark.svg,1580478898843,f1048fb0127acc44d37ae36184b4a4ada335b20c8ce29b0a2eec1cb85169cf96 +svg/ios-clipboard.svg,1580478898845,6996c470185981bf2ece4943c8d24ac1e9076289ba36249da6f523ef0744041d +svg/ios-close-circle-outline.svg,1580478898845,f1dd948e91351bb1a3c58e36733840fc47d67b3f5b2b2411b6c5b594a1be796f +svg/ios-clock.svg,1580478898845,89da7caef0e3eddb701076f6ffb2327d7db41b4e52df926853900c44940bb315 +svg/ios-close.svg,1580478898845,45e041c4824a9f3a2b27108a14bec1cedeff0bad5a1cb62c0b2cf5b166fe654a +svg/ios-close-circle.svg,1580478898845,dc7251d915294d1abbe68fed5781220a98914bcbd3537818a15f9cb09ba3228b +svg/ios-cloud-circle.svg,1580478898845,ab8c5eedd612e12a469c94025b67ff83150de768d1dea3195d003a1de8249e00 +svg/ios-cloud-done.svg,1580478898846,9f3d131119d9125270a3ebe335f8048843c97f286e7e39ad5ba06612d654a1ef +svg/ios-cloud-download.svg,1580478898846,9948baa190a75b73ac52ba6ff4f37c9578fb2cddb871c31d33fae35575c58733 +svg/ios-cloud-upload.svg,1580478898846,93b8568041e367bddbfe0f5fb98f71d8f3bff609fe96dfd34da7e84efada4b9a +svg/ios-cloud-outline.svg,1580478898847,57ff6c3217e53eba7d21367b29b281d6b54b41a9f94fd2f5b263c1e3bcddb5c4 +assets/img/reinforcements/memes/IM13.png,1580478899032,9b0f0cf9d927af623ad2620c575c97296fe3c49a950a9dd6494ca827c277c281 +svg/ios-cloud.svg,1580478898847,369d78e9c0891feb4c2cfac657baa1e44316e8b68674ffdff6910e1e8ad05c82 +svg/ios-cloudy-night.svg,1580478898847,329188b5d6fa9a315e4e1517639f48d8c1891ceafed7fe4be05e78cce5a39f2e +svg/ios-cloudy.svg,1580478898848,0d5ef3cf5e997aef14b8502a97c6e296204536548d8bd77b16d45b72b12daa33 +svg/ios-code-download.svg,1580478898848,e5a56531a958c929c43fc8b81f91a75e9c84d0c6746eefa76c6f3a037217eeae +svg/ios-code-working.svg,1580478898848,47576594f3a7d9b8ee05a6481262e6524575f3ee2d1f95a5367a6a67b463e668 +svg/ios-code.svg,1580478898848,165dfb2f00f0b2aff0a94e2a352d519f90ae4c1e5fb844d3a1669404ad8703d5 +svg/ios-cog.svg,1580478898848,d0db37f6062f4644da7d89438d8118be6d70df11a36f0c2534763a8485188e0d +svg/ios-color-fill.svg,1580478898848,c5b26a5a96c98791bfaa1f51207f3d76c94b9b7c0777d6db1a41e3034112f7fb +svg/ios-color-palette.svg,1580478898848,8034742a5dd7b39e8a607576e108a7fc7f799eda16ea8e80db0de052319faba3 +svg/ios-color-filter.svg,1580478898848,310686e506c90e23d285a06779f2fff9468c69f86fe9e9b86717f0188a7b2436 +svg/ios-color-wand.svg,1580478898848,5ace41373d5b612f1bfffe5385b8793ab23c2aa19eb0511b6192c807c220ec94 +svg/ios-compass.svg,1580478898848,c906079abb7665ea6b41f1b4b0bcb1ca18962f4b5b2d767c8a78f9ba7b4d81ab +svg/ios-construct.svg,1580478898848,08366f82f2144b8b471a10b8fce964e0bdb6e58504123d86ad9f32e8ec6b5262 +svg/ios-contact.svg,1580478898848,cece93a6b62b9b544fe3fda54ccfdbc11bbde45928e85f5eb9a37fcdb7d60e1b +svg/ios-contacts.svg,1580478898849,478692f979bc08e6fdb1f779a6790e63fba43239418ec484ef40d5f884f46090 +svg/ios-contract.svg,1580478898849,b45644f2b0750d54e7638ff5533fcd9ed35131be2670e6b9d33e267d48292007 +svg/ios-copy.svg,1580478898849,d10d27d3d2a7467235a98180bf4dd7e7646f8a5b79424a8b23f3227ddd9575b2 +svg/ios-contrast.svg,1580478898849,f2ddda16b149c0a24fbcea39bc3949adc304a16f3742762720431faa30549271 +svg/ios-create.svg,1580478898849,e2f465a49bd527a3e90cdd5b079d0cb9f5d215d03e9034a3189008d7e598c63a +svg/ios-crop.svg,1580478898849,79193a0284b44887576b9d7a27a34df384effe44beac64d5d5c4a5151a01e2b0 +svg/ios-cube.svg,1580478898849,e7970e3ebaf94808fca5531344e6bee468b19b2ba4d971deee70bcca3d8f0747 +svg/ios-cut.svg,1580478898849,84054e2533371ccc1d21bce41f8871ee2266d0376a96dbe10bf5ee6a01b23643 +svg/ios-desktop.svg,1580478898849,3418f456bc448650acc50c5d4fcf3e82c859fb1c321cb9397e7ef62f9b837748 +svg/ios-disc.svg,1580478898849,19a3539d41c218894b2ea6568c6eaeb9c9f74110e8270ef7b7f15f4005ef24ac +svg/ios-document.svg,1580478898850,e9ae2ac51318c83b390ec83570145e5527922ef5f5c9f384776504aa372ead2a +svg/ios-done-all.svg,1580478898850,4ee59ef60c26a4c69915a9b042bea2bbb6d60d1f3fea2d7dfd4c5a231d164fdd +svg/ios-download.svg,1580478898850,7c18407e7ca20784f45d4ef7ca6d2b624c08d8e5b4a8f8a4cb0df08a8b4bed66 +svg/ios-easel.svg,1580478898850,2a5837a6054aff606f1fdea6e0537764d6f1acbd4f4705c332288eb8be8d2f7d +svg/ios-egg.svg,1580478898850,8a4cd145bbc922aef4520536e2f3a5e033dfcd0870339efb8e7c1cfbf266b8fe +svg/ios-exit.svg,1580478898850,45dc4a22d153e87419f4c8e583d1fbdd3646d1e33f3e1bcb52811213449f5264 +svg/ios-expand.svg,1580478898850,960e7917184d4884687c2ded6071a9abb99d8818acabd5356e57cacdf8c47eb0 +svg/ios-eye.svg,1580478898851,6fad89b4b12a254e824ecab75f9d6661ee79aa0d59d8bb9e5ebefebcd78d0f1a +svg/ios-eye-off.svg,1580478898851,0ab9f52989eb6a4e154eb2d356d5812e9eac90116d8a57411461dce6b8dc2749 +svg/ios-fastforward.svg,1580478898851,8c98e2ee4c8ef8eecee96572d28d4df7c0db49fd5075d4e031877b0a05b30622 +svg/ios-female.svg,1580478898851,674510e8a3e5a1db74070b63a524b15f32431c7c0efa267763eae090809c8955 +svg/ios-filing.svg,1580478898851,d46259be0045aaccaf19facb72870bab211b1aaddbe4c1bc2aa204ccdcff6631 +svg/ios-film.svg,1580478898851,fd71062575bca9d6e43bda8137b607de081d8541f933531a3d847ba8f58cf473 +svg/ios-finger-print.svg,1580478898851,b5d3951d2191a91a7ea0ff791847c66c83d6d83b9b0cf0e2eaf90496837d6ef6 +svg/ios-fitness.svg,1580478898851,172b9df1a4d4a17d4e9d33872c9111296ea62c0c6ba82c37346a5382dc6a4d16 +svg/ios-flag.svg,1580478898851,0b8d57aea7eaf8d7038c3811fba94658391de4a118a76d58d6e41edc23f0abcb +svg/ios-flame.svg,1580478898851,05b1ef6af06d6a04396addaec33682e2a1e1b7da37c8347b4c11bac8046f7394 +svg/ios-flash-off.svg,1580478898852,6178d431db09e07ced8d78091e3bf045c30b3fae9843ca7332d43d635e638fd6 +svg/ios-flash.svg,1580478898852,749e7ba29adb1c7599dba4619bb0b949857b07efb7ed44e9a4d78a02893f9c44 +assets/img/reinforcements/memes/IM5.jpg,1580478899040,dfe260135b350062f5216c7c05db44b04df1ef24ed3ecc8d195066546c2e12ec +svg/ios-flashlight.svg,1580478898852,f9d05be8a8b9cab11b51e3b42db44482e73b7450e56a97a09b99194261e6f7ee +svg/ios-flask.svg,1580478898852,cd3c791784f4475b712d396d4c6fa98fec0c67459e084bbac7ab90ca23ef7a05 +svg/ios-flower.svg,1580478898852,07f32d498d994239a7d0a3007be83d51202dc2efe7325adeef10e55ea1dd59a3 +svg/ios-folder-open.svg,1580478898853,4f1eaec94c056b22f546dea3ef410eefbd9b31b8ba1c978e187b33b87a7a138f +svg/ios-folder.svg,1580478898852,14cdb2f609b1a40ab0a4a65f1e2011f1de1d72f698d6063a00fe688c7ab47b3d +assets/img/reinforcements/memes/IM18.png,1580478899033,e18a4a7a43db5675124bbd9b2517fd74fa8f3c6095529df0f8032ac0cfd836ef +svg/ios-football.svg,1580478898852,9379d7ee063a6b427d7d812a55ec52495faee6c462820d83ffe2a32f5425e101 +svg/ios-funnel.svg,1580478898852,663fc5aad404b53741bb79f2f5e726cb7315a563385c296a8959e5e0475b1dce +svg/ios-gift.svg,1580478898852,08597c84cafcf56d277f524d9e85bf8da4a92bce3bc4c50897764f1ddea8fa05 +svg/ios-git-branch.svg,1580478898853,575b3bc9ad707720aab7793a451a8b7a5050531a18cf0583ddda8cbfd80892b2 +svg/ios-git-commit.svg,1580478898853,29830686cdc27db8c8ba8091f807f78a658211ccdbbca30480a3f2d3672de314 +svg/ios-git-compare.svg,1580478898853,42331c36453d2b16a464a9ce18cfd3e5735f8d71444ac6ab4b3cceb79c1e7650 +svg/ios-git-merge.svg,1580478898853,c4398503b44233ce1d1737d03d0e12e7975a2eb3de371b5be5facf818bd24731 +svg/ios-git-network.svg,1580478898853,b17b26e99e8202b2b4cae90460d63ea560b8714a72c5368ef16f38594c6842d2 +svg/ios-git-pull-request.svg,1580478898853,ef0233220e40cd6e5702078b7d7588ddc710a8db036bfeae809b16bc007702a6 +svg/ios-grid.svg,1580478898853,8f370574914adb0dc56743af163bd3bf3e8d9d4b5386b6ea4141f419141f5a99 +svg/ios-hammer.svg,1580478898853,032fbc1961ce87f28f1b2377b5e838c5e93fdf5868c4a31051f0d319937bc4a3 +svg/ios-hand.svg,1580478898853,1657bc3c4b0b4707a88c468e92221c25c9ca6c6d91c89a962c329dffb20816f3 +svg/ios-globe.svg,1580478898854,d7692f13e8cc91fc731c6d10e5d6ee5c00ed854f175a48aa5edce8726f6f0283 +svg/ios-glasses.svg,1580478898853,cc8afbdb699f8886c69ba73df51a2cfb54c017e6294168095e0f0e453d04b411 +svg/ios-happy.svg,1580478898854,fb672144cade8cea47bdcb2ce003639a4590e9d9e5972b6f321aaf2bd72a195d +svg/ios-headset.svg,1580478898854,bc48f86f1703c12c37a1fd2fde739f3b56d07d7ebdf50cf0774dcd3090ae5bc1 +svg/ios-heart-dislike.svg,1580478898854,a8d7577e606c46b5680695178eee18cd692936c9ea6c762adcb31ea93462bf2c +svg/ios-heart-empty.svg,1580478898854,c58509119ef03be69db95266c61736eba4718a1c9127588ca598ffc9216e6421 +svg/ios-heart-half.svg,1580478898854,58219aa5a15edeff941a9e452a0c008977d39986fcfa3f4d4b6d7a941801ece6 +svg/ios-heart.svg,1580478898854,e50a4b6d709aef6f600a77188a5d5aaa79a36cbce795eccebb290ae128558292 +svg/ios-help-buoy.svg,1580478898855,e1ca13525d98e753015d397c62113ffea4d4051d436c83467acc459d90cecb83 +svg/ios-help-circle-outline.svg,1580478898855,998549d23f5b470cbaf1af109083209a7b6039a27100a9204d3d8d38df499c8b +svg/ios-home.svg,1580478898855,5c17dda5af0dceafec6611b3813ff6e7110ed000c33889b9a6f25dcb5475270f +svg/ios-help-circle.svg,1580478898855,566b5a858c21ae188a45c1c3018a1512fddf5d5e44832aad1c9ea65583d2b701 +svg/ios-help.svg,1580478898855,7d7a44b910490a6232ec216db10e0d9a0d87115112fcf85c4e25bd2208e7bc84 +svg/ios-hourglass.svg,1580478898855,796a4e7d02e1a5ee63885f96ce44a7245d72c68bccc819f51ab4e5349b40b3fc +svg/ios-image.svg,1580478898855,5900c8e141b27fb9e1bff2b5b039b349c9f3d94e5363c555a68ecabbb1aebd9f +svg/ios-ice-cream.svg,1580478898855,2a827b9e8b93244d457d6a5da6f14c3a132a5e18d0af724463577b9c46013b65 +svg/ios-infinite.svg,1580478898856,debb1f68c5442cf1786d70497c28766001a35a11625d4526893b8a81118260ec +svg/ios-images.svg,1580478898855,423c2d52c666df0bdb1b453961ded67265b4cd576f8eda332ab8ca328abf4f4c +svg/ios-information-circle-outline.svg,1580478898857,ab86d78adeb6f6812ea684ef5c024dfe73db5256200931e0218a2f72174a8303 +svg/ios-information-circle.svg,1580478898857,9ede143a2b9e90e834440a1f71431cb0904d9a997de795e0e9017d65fac1ddc7 +svg/ios-information.svg,1580478898857,bc0c1ffd42d9e1acf0ccf22eab0d90e012b953a919c52e0ee1ac350e634e0311 +svg/ios-jet.svg,1580478898857,15fd62c759da16706ef36badaf6282f947eb606a8a13d2fe79862cb94aac157a +svg/ios-journal.svg,1580478898858,69a6cd3d9df072e450e8bd558e3d2f42400df9c4d871b48d12d237dd825245d9 +svg/ios-key.svg,1580478898858,d3b49fe9c43f67f14c1ae33775994d207f89d257bdc597e890538bdbb4426cf7 +svg/ios-keypad.svg,1580478898858,0d8c70c813b462abd03094309e94d29224c3346ed967ac732ae5aad755f27e8a +svg/ios-laptop.svg,1580478898858,9870e8c4923772e60d9cd275b0b506000b03abd408d7221b07825974e6431a2b +svg/ios-leaf.svg,1580478898858,cdd49eafe60f0fbb7269f511813b56d31ef7f300066af7787e40e9ca093b865c +svg/ios-link.svg,1580478898858,5aa63efb1bf6419c4add82a353108aa7e6ea3152b6e2fcbe10cdbf24b04ef579 +svg/ios-list-box.svg,1580478898859,dd731fbcdb13f1e65cdab1626643016d0723cca6efcaa7c6cc85d23144eb56dd +svg/ios-lock.svg,1580478898858,a447e27c14e180f9e6f64f79225cb7a72d3e84d86c656a7f6d2bf919cb4219be +svg/ios-list.svg,1580478898859,1284672d86a7802bb46ea169a038b77854ed6b14d65b0baea056d4c41bae3077 +svg/ios-log-in.svg,1580478898859,6c25006505fac6c8e808213da30f9df38eb651b924faf96b56c8ad2988caebbb +svg/ios-locate.svg,1580478898859,0cb35f5156a15fed2d06880bb3827d85cfead671a66fddc722b34a6641495fa1 +svg/ios-log-out.svg,1580478898859,6ddc50ab4814bbde2e64834cd1689d68364681c6e81d7d0bf02fd65b27881677 +main.f193792533ce82edd123.js,1580478898801,740e2b9e95f00be1b96daf33afe721bd2d9e53137419f9fadfb440dcbeda3863 +svg/ios-magnet.svg,1580478898859,6dd2bfe55a6388384ddab473c9b12d2e849b4e5e2a9c8d3b90dc47d3c57c1e88 +svg/ios-mail-open.svg,1580478898859,e5bec084949c79f1104e7ba9e52ddc3cbb9a2242d956702805c33f8018720a45 +svg/ios-mail-unread.svg,1580478898859,6a0e543c335c28c34a36d7756cfd6ffbea3aa939dca2c32327ec25c7c45da098 +svg/ios-man.svg,1580478898860,60b809fee920a3091d48980cd92b04b4b67b299c6fb380f17881e50ce7a3d7be +svg/ios-mail.svg,1580478898860,d04d7d694add7d06f31551d0ea939bec358378c0209f158cb9f0d2c258828182 +svg/ios-male.svg,1580478898860,72ac8f7fe41d922d0eba623d7891bc9345582cd3c8e911d514b028f0dd1b806c +svg/ios-map.svg,1580478898860,eb6c474b34d94251b1a465d57d5385600c8cb26908aa8db7df8408369a84fe45 +svg/ios-medal.svg,1580478898860,4e7dd22a2c911ec9537f756a35dc8395bb570253f0dd83f3a6bdf15ba7fea810 +svg/ios-medical.svg,1580478898860,9044f740c9e45891d47318f8ff3dd82790b6a2a9323f8a2a44eb63f2c8a6408c +svg/ios-medkit.svg,1580478898860,b2e8dae71786a5a4376cae44afdc6a8ba6a7906cf2146eaa5cb8f9b2e5d02405 +svg/ios-megaphone.svg,1580478898860,7c2129507dc0d720051ffe7d52f80c1beed0817294c43ff87c6372dd36f5c93c +svg/ios-menu.svg,1580478898860,cd1222ea664aa2ce9b325f50985a222c4e518ccf300319c10575fdfce2479463 +svg/ios-mic-off.svg,1580478898860,8bafd70dc47aa13eb98fa881caa010d744ed9eb474248ad7602c7c3b68c39996 +svg/ios-mic.svg,1580478898860,cd0a4ae4bd58f48d43894988b887ed2baf6c8a0c2472a93e95e220954b989f7e +svg/ios-moon.svg,1580478898861,a06dbf40ecf25face5517c6d6b2ba147fc19b5007d8bdba054eb06da01acbfa7 +svg/ios-more.svg,1580478898861,f18bf122ff1aa689c1a4bf51bd7e3d8893dbfe8fd3f2821a3435d7b3964a1df8 +svg/ios-microphone.svg,1580478898861,87b2e5bac4dcfbcbd948342dd7b371db3a20ada8a23397409d67fd59100dbca6 +svg/ios-move.svg,1580478898862,1cc9891ad18bb608b6f8fa2229c80957a31d3a3ba28315831667f1f4e45c594d +svg/ios-musical-note.svg,1580478898862,8d77746074437e62150ed4be7c09a398c142fa1703ea961a6c7932d8ddeafd90 +assets/img/reinforcements/gifs/HG17.gif,1580478899009,e50d73f27e25021dfd94ff3923b1ab957abbf40e03c00cc5e7fd8d9a6b423374 +svg/ios-musical-notes.svg,1580478898862,668ad8091763e182af75ab3cdb6e6f3744a404dc562a6e0566e67c050450f2ff +svg/ios-navigate.svg,1580478898862,34875afc966061c09c349dfd57a9abe44a387ac0953dd4e36f7f4d2572ef73a3 +svg/ios-notifications-off.svg,1580478898862,567cef0fb823adfc8d0b68d5b5674b6253a4613d1d7fd87c01dd155c8e21dfdb +svg/ios-notifications-outline.svg,1580478898862,c65ef0e0c8caf07af569dbfb3c3f0c8531afb6c7771863d1eef263fbce8766da +svg/ios-notifications.svg,1580478898862,864d2c0dd51e2458c15db687c6a7393bb398d7ebd0b137f183e4aeb6b97e24d4 +svg/ios-nuclear.svg,1580478898862,f3336fb6da4901afb6f18327a7c7db9511baed42c9d9391a8525f4670c98756e +svg/ios-nutrition.svg,1580478898862,9fa777a57253f220c706e433b1a98dc889592a800e8b560361051a637034241f +svg/ios-open.svg,1580478898862,dfcd23d96c6d42ae3fb55b8d89be29ce885bbb79019ff29969d61b7a2d7d3e6a +svg/ios-options.svg,1580478898862,1411a4ffbfc67669445a2a75824a4d548affeb6098b99bafe531a4ef02593434 +svg/ios-outlet.svg,1580478898862,1bd893feeadf6b31974efabb0675f0adb814ae50f8baa4a4ee6fef56aaafb9bf +svg/ios-paper-plane.svg,1580478898862,a1f1e308b6d52d5b1374b95aef19dd27bf9c344f9bffe6a5edef50af3ddd1712 +svg/ios-partly-sunny.svg,1580478898863,29356225d38c7a3323dd37d1552aa100a179c0b7c8165270fe94d0bbae82b8e7 +svg/ios-paper.svg,1580478898863,7832c0a9f309adb6573d5b3120ac8564d004b9925d2629fd14f1bc66f30e1aa4 +svg/ios-pause.svg,1580478898863,709965a14e8e53d01c7662735ed145f9924bd57cd9eb1996e93ce1073362d632 +svg/ios-paw.svg,1580478898863,e30be7294a56da1c7728e659ada1e29db33ffd64152f4d7590349714b05c4e57 +svg/ios-people.svg,1580478898863,bddae8935052212d85183c197691da264de7f187df00931a07c7eceafa9411c0 +assets/img/reinforcements/gifs/HG24.gif,1580478899015,0f9697a6cc60df0a2505e0ab935320b56b4c5f45798f8478c0c42719a63a5734 +svg/ios-person-add.svg,1580478898863,8f610bbc8fe5bf5c2662b787258c1075f385c8178ddf21cb6f2de11499fa7d23 +svg/ios-person.svg,1580478898863,9d216c919aa610d856c304d154df0bdf2afeb9dea5e405db427ce1c9e65fbe7a +svg/ios-phone-landscape.svg,1580478898864,fc31a2ec731c58b2f57ceb1410925f85dddf81c8e39d2f748bd902d6c6c496d0 +svg/ios-phone-portrait.svg,1580478898864,c1c1241aec4fc30e582d83c3db30d8d72daa6470ababae175753d794ec8bcb54 +svg/ios-photos.svg,1580478898864,72c05f3297caaeaf20cfb1a3a301a1585a1fe49cca9df6bef0edb2b9c56acb14 +svg/ios-pie.svg,1580478898864,3f2606069642dec6e7cd19224b0561895ca3795984973cf667880beed610380c +svg/ios-pin.svg,1580478898864,b318d75efede37bb7d7255497600f0e1499fbb08f8123ee04a1cad1c25330009 +svg/ios-pint.svg,1580478898864,dc9b511f30aea99cf507506a7fee8d445241ad1fdcf80b5d2f529947ea00ac94 +svg/ios-pizza.svg,1580478898865,41786a70ba6b32b7ca053db8549feea7347a6155c55667de83510bcd2a93663f +svg/ios-planet.svg,1580478898865,503e4d76127d475d10e1ec5a8c18911ecf66c58c2587712d2a598da3c673cea4 +svg/ios-play-circle.svg,1580478898864,bf719d4bc56562b257721b35e03118266dce3cb8fd1d44f5f68124a0c777d520 +svg/ios-play.svg,1580478898865,2871a915071152706af1e455dcd1b076ff4236860a34c5d167fe99306f971736 +svg/ios-podium.svg,1580478898865,ee31c48b1c042a42aa3057c63604c20f0aad35843a23d2064a22babe8f446a3a +svg/ios-power.svg,1580478898865,26701c7fb395c63f1e40e18d61d64b66604403f71f9ef944d934887e4268be3e +svg/ios-pricetag.svg,1580478898865,86983ff68e49ef9d241c6a445227625923fb912326584792e1f23c614ae515a6 +svg/ios-pricetags.svg,1580478898865,94e9e07781249464c1da4a4a5ceaf94dad8784b070245bef051b8f625ea2c7a7 +svg/ios-print.svg,1580478898865,510097e339ee1934a8e2dd2559ddd58cad501db080c2d799fe442a83ccb6e054 +svg/ios-pulse.svg,1580478898865,8f5b471d7b525979ff6d4ec330bacd9c3444b64f27b81fa1c8cf55c117884fde +svg/ios-qr-scanner.svg,1580478898866,b3e1df339a446a7cc26eda2564cb3c5445d82b807a1e9e354d7f097d802ec56e +svg/ios-radio-button-off.svg,1580478898866,44cafda8f47eb5104070336a1d5eb6c83b2b43c33364a61e6c00e7ff8a38574b +svg/ios-quote.svg,1580478898866,6dab90407105ee7de9d983a2f2356282cc846961a93d5be4b650de440847c954 +svg/ios-radio-button-on.svg,1580478898866,f7f0de083018dcfa57cea6f8e7d138321b0c9b34a1ed1a1e8ba05b4a39bd721d +svg/ios-radio.svg,1580478898866,e42617a00930e909a180a9f8ea33b42ef7b3f6e0577dc12e75e29392375376b0 +svg/ios-rainy.svg,1580478898866,e915ced9c79300b9b423eba3d71909480af082c84f69f3d3fa38cfd6687cc2df +svg/ios-recording.svg,1580478898866,d6571a9065080e30096b951e2f348eabf73e8b39db88de92b2f271e75fdd1049 +svg/ios-redo.svg,1580478898867,cdec27fec27c2d65a408a1ed7ffa1e436b08fbd59ad67b20870ab7e9e153c08d +svg/ios-refresh-circle.svg,1580478898866,df28dbe98a3ac2cd3756dd13db8c867cae9d97d3fbc03897a1ff403b6ad7e4e5 +svg/ios-refresh.svg,1580478898866,ea874e96424b0b1c1807c54221495d68a55bb3ed1597840a17b0697f2f0544d6 +svg/ios-remove-circle-outline.svg,1580478898866,a08f3535818590f7b7f50216b0b28a53ddea720820070a631c411b8fb49fe4e4 +svg/ios-remove-circle.svg,1580478898867,11facfa498510934957ea554bf8a6e8921ebd56afd1aa04e56e3b4056434e2e3 +svg/ios-remove.svg,1580478898867,602f5c48f0186c4aa7455308d99df651899a9036e1ddfa87126f22d7c2abd916 +svg/ios-reorder.svg,1580478898867,98ae935b91f798eacf7de0045ee0462d01258a498b56a4972fdf59de7229e831 +svg/ios-repeat.svg,1580478898867,25cd0fed8aac381ac50beb83d908ea555659c0ec8884a5a23c6b55079e791aed +svg/ios-resize.svg,1580478898867,94955384676f29c3df8336073c31f6708586a7f052c4bed90e95b85997b1e782 +svg/ios-restaurant.svg,1580478898867,6055e3722bcdf2febed768aba8a3dcb98d99414685717b820815c1480878326f +svg/ios-return-left.svg,1580478898867,cfa0be54244015f4f0b0b6c357e14e021f2daf249e975c29afaeaa240f62b3e0 +svg/ios-return-right.svg,1580478898868,2d03f9526c91997ac6c02eee333e94d6835ffa8e42cbf58dec75af20d823d17f +svg/ios-ribbon.svg,1580478898868,cc5875323e1280690902badb909198931569ad0e49df39553b5693ee7c63e6e1 +svg/ios-reverse-camera.svg,1580478898868,f3473ab447f804ee46e6445b0400d2f7f2023f83e242541123fb726aa520751e +svg/ios-rewind.svg,1580478898868,3c0ec9c26c72808fffa78c27cd56c6fe267fba72e91f033f9d1f3e9ab41f6c3c +svg/ios-rocket.svg,1580478898868,04528b5dbe54e8638874c1c36e8bab54ea0bcf2e5e36fa7984d79619d0b11e54 +svg/ios-rose.svg,1580478898868,5f99963d3dcfdc84e19ef72865bb30c37e6643d6fad3264561a9015a52c4539c +svg/ios-sad.svg,1580478898868,749347ffaa64b2ff41b17d4386c5648f3001bf0cdf8c56db10dee3215c493bbc +svg/ios-save.svg,1580478898868,efab501d95dcebbf2d474da75400f1c04a23bec58210b2278dc45db7aecebf36 +svg/ios-school.svg,1580478898868,9e62c8577d63184786792f0542978e3eb71c47ef27c6f22f87d9a32c45bcaefe +svg/ios-search.svg,1580478898868,0b4d541c861c340a7a93ab55d5f1fc45fa610d0a5e9838c4da0ac74af935f44f +svg/ios-send.svg,1580478898869,1dbe1eb67b638fac9663504cae3623a2ce9522724d0d03d65b11bef97fd3c823 +svg/ios-settings.svg,1580478898869,fb269574be45c1995e47ab4aeedc76d3268253e341d400801083b669be92786b +svg/ios-share-alt.svg,1580478898869,a2faf7abf0e8b0431ad57ce3428f8c64d7382e75c6e1f177384c56a61d77a459 +svg/ios-share.svg,1580478898869,ed14aa42c7d4676a4cf6b229c72841602a7c6bc538913d5118db6ac8f7d1669d +svg/ios-shirt.svg,1580478898869,7a0d56a6d1cda06f11c64c7431b32e2112f07e24ce5202392e649dd3c4bc01ff +svg/ios-shuffle.svg,1580478898869,258402be440a49ac6decd9e38fa278c31d50cb7f3ea2aee769f5fc2e10e4bd8d +svg/ios-skip-backward.svg,1580478898870,1f4426e956ea755ca6d60b03b8d4dbb6354dd58a117febef495730982b3cdc4f +svg/ios-skip-forward.svg,1580478898869,ef244235a2d7e4b139ad0f3d77464f7682d709ae29981a7c2fdb8fe7a39e9c13 +svg/ios-snow.svg,1580478898870,6f3528318887a1eec993ec9fe778d52c7d7acab35247f5c6e69843713abe3810 +svg/ios-speedometer.svg,1580478898870,75127ebda0fc42b18ba8b611dd950e56387ee42b38aef464b9cd8c6dace7277c +svg/ios-square-outline.svg,1580478898870,f55e1c7388923f2b9598d9a99ab48deb2e7bb4addcc3243ea824b2a5c15bd3f1 +svg/ios-square.svg,1580478898870,c925bfd71a20c3c90cdcc2f2d40c9fa71333f241e2b08c4d8f8b8cb24cd824db +svg/ios-star-half.svg,1580478898870,fd4b6f0fb8b3cab3125acf9463ce67301560a2d8472c3014324af5147d8ea991 +svg/ios-star.svg,1580478898870,3a00fd8877381a09fffbc0414f334fbab3d85e4d1c7eb2101bd1e826e0d6c418 +svg/ios-star-outline.svg,1580478898870,bd2aa6327f680a721be993b4afb1d3a706e3e49dac6c6fe5dc24abbf881ec3fa +svg/ios-stats.svg,1580478898870,8be057c322316efd9643607454549efa3d15f7fc9e498b4e7d7fecbf07fa33e1 +svg/ios-stopwatch.svg,1580478898870,6b756b83bc8867ad93c625d2e69feec39b53829a22e972afc383f605848b5f28 +svg/ios-subway.svg,1580478898871,ca98dc64f525651e5de90d272b45c34e84fec53489add9781aede217c0d23265 +svg/ios-swap.svg,1580478898871,13c35c1cc48f7b259eab19b62ff558944dd335f8be972e9672c4874faeb3e3b1 +svg/ios-sunny.svg,1580478898871,3293274254e68ce05ead50720ce22f43fd69ce49926063e96984ca2f4d00a5ef +svg/ios-switch.svg,1580478898871,8c389ebe4ab27da75401f00acf1c4deb803c181ba7996b1ab446090be2d17f61 +svg/ios-tablet-landscape.svg,1580478898871,5e67df8b7a41a78bbdd09a6e07d554ac7ba33c0034a1c7090169e3fda23648de +svg/ios-sync.svg,1580478898871,c4c1faf36d6c6ab2f30d883aa5de79789a8e0c39e83c5e8795fe897b3312053b +svg/ios-tablet-portrait.svg,1580478898871,9d6a002e027db2f8172fc32644c2da628eeeefd2e25fac08d29e178b1906ccc1 +svg/ios-tennisball.svg,1580478898871,40a2d542c82c94e26fda65d5d1817995cc1eac00134a815d642658581dadec63 +svg/ios-thermometer.svg,1580478898871,a47733d59f3d4ee161bd8527e077ed6b82ed00c5005b4fbdf62d840b43851970 +svg/ios-text.svg,1580478898871,9073eab26a6d0db3eb43f0ecb7d247162a045df97887ef409016513f27aa0240 +svg/ios-thumbs-down.svg,1580478898872,e4564f56091813ccdfa69dee949d7e07ed9e9a2910fb71ea9e9acc96409782bb +svg/ios-thumbs-up.svg,1580478898872,a48ee91e8ddc8072d804fad10f86ab621ca4afe2ef2275746c83f65e6a2fecbb +svg/ios-thunderstorm.svg,1580478898872,6ce6a4d3a89c8c750659be1d22dc83400bcc1229b2b5c96a372fd4c4cfd18323 +svg/ios-time.svg,1580478898873,60a1f1da5843f3f97443634afa3fc0b5be549f61f8dfa0cc0eb5b2f7a0f74eaa +svg/ios-timer.svg,1580478898873,e233cfad35379e4fc525601abc7b52081cb873dd3ef632bbf7eb0148e6ec6555 +svg/ios-today.svg,1580478898873,79b33ecafcca3ed239e24afa93a8a323556335b72e593a9d1ce2084872024857 +svg/ios-train.svg,1580478898874,d4540f95699431bab985100a3cfa139238aed792a2261ed5619282d6d5707f9b +svg/ios-trash.svg,1580478898874,f13ab3aa4b547702bd56ac8fe93cac5b757fddd7ea96229125f0bcfdcfe2cffb +svg/ios-transgender.svg,1580478898873,836de4e75ee58e184a87855f2b66ed8503a6489eb7e6de27fe5663a0bde6d85d +svg/ios-trending-down.svg,1580478898874,a0c53e7b67e19dd90b3762bbc0e6da2d0d61286c928ee9d55d5a47a09df4962c +svg/ios-trending-up.svg,1580478898874,9e70e1815d8c41058d46ce51437ccb0b0b2f5262a7a7d3b3ee43f73c7e331c25 +svg/ios-trophy.svg,1580478898874,9b8b494ad5ec25f2d66468891893af4cf9a955a025a9e780b6be13a00e2baeb6 +svg/ios-tv.svg,1580478898874,99b352254d179fdd7a175ad5cea719546c5a09336c973323f2906122f390df1c +svg/ios-undo.svg,1580478898874,1089b68c45b594fe726813b317a1e1c823c487d376c05c965f3fe3b621cd2aca +svg/ios-umbrella.svg,1580478898874,df27f00b464ca29fc7786a0667c251c10a055dcc0b725c6e336e9b3f9c655a52 +svg/ios-unlock.svg,1580478898875,7c148ba10d85d1192e7bbbba8a851661309b6da325ac0fc15e7f4bfa81305758 +svg/ios-videocam.svg,1580478898875,8ba5e04d358d4851eed4d6f91e3909a8230e6291ac1313bf6c0217099ebdc26f +svg/ios-volume-low.svg,1580478898875,9221c1371b31d824598b780e58c28491d522955dbc60fff6f6dba77750fd204c +svg/ios-volume-high.svg,1580478898875,b09040b19870557aa14a6104d1ea45e91ec2cc2e405728cca695db96294733d3 +svg/ios-volume-mute.svg,1580478898876,07c7762f26cd44f1ea024d934738456a50fb1f5982e35b5e3095731e407d2896 +svg/ios-volume-off.svg,1580478898876,eb0548fb4860ccc226620181c7fde7cec28d5853c4eaf7487b12aedddd410888 +svg/ios-walk.svg,1580478898876,1f864f83d242eaaf54f99565b9d53cf477a8d4e0ce7a8fac9b7299d7b826d4c0 +svg/ios-wallet.svg,1580478898876,00fc1e6320990f267d552956ecc9b0fd9805554f656790cf53bdd840c88c3d2e +svg/ios-warning.svg,1580478898876,cf138aebea80d97ad8076de428ef02d14ad06aa7d3d8d4c386e1dd75ad9c9368 +svg/ios-watch.svg,1580478898876,cb3c7e932634f6affb0f745d9e3a863c34af3c4a996798b6a6d78d4125d575d0 +svg/ios-water.svg,1580478898876,e8ac219c7f5812f77f6e63cf5ff21a3832324a7d597ab6b56021118809f43448 +svg/ios-wifi.svg,1580478898876,0922f2ce10e25f660ad981fb5da4165839f923b7c36b71568de151f9e434a076 +svg/ios-wine.svg,1580478898876,547c2b9c55a6b4b50706b100ebb3ba7d2bfa646c49b801051df9e3f547bdea56 +svg/ios-woman.svg,1580478898876,34da97f4e023a92b2d438fbc54f1cb272e82fb130a7e36488724dad1483565a9 +svg/logo-angular.svg,1580478898877,96cafc1f1dbbd1f019d2c3f1ccceee2a8258e1d6ad048c4d5a059a9e743ee2e6 +svg/logo-android.svg,1580478898877,62346d07bd276524e6441ee06d5d04cc68e1ac12b9a59ff9889f46262290c515 +svg/logo-apple.svg,1580478898877,c5b39dc2d461662f2aa12e49a76bf9ead4badf5221be1409545fa3b72734d856 +svg/logo-bitbucket.svg,1580478898877,1687546d23c7a86709536944e6943170b9c5461a1e5251c6cb03a4a9c662d2f7 +svg/logo-bitcoin.svg,1580478898878,8d04963b4d191caf34cbee941024227aa2ec604ab0ba49a1b12f9bb752c9d426 +svg/logo-buffer.svg,1580478898878,8e3251c5051ec52ddb336d326f8f428a6c80584e4248bce4581596f177342969 +svg/logo-chrome.svg,1580478898877,02bed978e3cc70e8d8f27510b15213aec9c25dd2a3d750f84e1a22e87b894f18 +svg/logo-closed-captioning.svg,1580478898878,0aafef9ad43ded2eae46155dc2ba158382d24fdfa8244d8903b514cc85611388 +svg/logo-css3.svg,1580478898878,8312d290fd1a774a3f97aaa3dceacdd2da00f342174899b5b058f308d9c8b518 +svg/logo-codepen.svg,1580478898878,503640a45f1cc37834796ea53b66e14cfce9e2cf60df2312485258bad0e3f35f +svg/logo-designernews.svg,1580478898878,f84e9a0bf4f39ddfd4d9baeb84d23faa953d91216df55a0b120c58365fd62b1f +svg/logo-dropbox.svg,1580478898878,6482d1db49be600dc263a011dd40ad49b83d2cf8882491a6946fa6c8313a3e27 +svg/logo-dribbble.svg,1580478898878,fb5d9e2191811085371234f9188f0bc0c15ab70b4e9bee587c2f622d62b8472b +svg/logo-euro.svg,1580478898879,db572c17f57797de0903427aaca32dcccdcf811a1c2a345c9dec00b954cffea1 +svg/logo-facebook.svg,1580478898878,9243132b3304fcf978a0ce6e1dea7f3d9fbfc0f449f824822124735a6ce20271 +svg/logo-flickr.svg,1580478898879,d1b22bd0c2390d270ddc6ab818b0c92a3e7d5b45b2a11fc6f2a7acac3bd5ee9a +svg/logo-foursquare.svg,1580478898879,d81950922b3e800437617b2124fc896a2f896bedba1bc1a1ca5c558bebb76681 +svg/logo-freebsd-devil.svg,1580478898880,fe74c08b9f194bad2b15436d4123e7837013b25d36af6ed37c9bd269cd9a5ddf +svg/logo-game-controller-a.svg,1580478898880,458737ae6bc88b7141d79d7228bb9faabb8e8dec16534e31a89f08dd04a2f675 +svg/logo-game-controller-b.svg,1580478898880,a740ff32f5a884801db0914f1c532c3a124d43b3f9bea5df17d0e6597e9d0ded +svg/logo-github.svg,1580478898880,18b1027c61320f9e6316641ff5172f8d5165f7d556c48addccdfb732ede735d1 +svg/logo-google.svg,1580478898880,c0975a22f9dca041900b664a1f8bd92cf4769495e88e91ea01284350e1e23d4f +svg/logo-googleplus.svg,1580478898881,aa74def3b91a628a434a3f2ca95f40a4cb2c4c0147f67b7cb062aad52127188a +svg/logo-hackernews.svg,1580478898882,9cf561926a225b162cee362fbe838357c7c350deafb15a48404d557339008b16 +svg/logo-html5.svg,1580478898882,99f654eeff26a5c5fef78bb792d76f4e09f39bc24d1eafa46e4a19672d6331b0 +svg/logo-instagram.svg,1580478898882,21705de0696097a97697d7c9db517cd6c1c8e73e083a2d9d23dbc0b076e0e160 +svg/logo-ionic.svg,1580478898882,29418d0ca6f9dd504fdde36eac19dec61ee1589bc771baad4d56e89c9f20bca1 +svg/logo-ionitron.svg,1580478898882,54bb14b344100827248733e2685a25b3100162e33ade68d78092ed88cd9ba521 +svg/logo-linkedin.svg,1580478898882,8348b77f896a6a04f25aa5a59aab8f0b46cfbed0a4793e45c314055e3b488365 +svg/logo-javascript.svg,1580478898882,9696c4f0db88a42a4244f797db19cbfbc9493bb52883e535e7019d941eefcd5f +svg/logo-markdown.svg,1580478898882,d3b10ff8b5085c5b534bb955715031547405102ffae6fa1b10faa7bcf8ddd6db +svg/logo-model-s.svg,1580478898883,75992d1e400054603630d4909b6e41bc6de514edaa8c920d39daf896bc1c4a1f +svg/logo-no-smoking.svg,1580478898883,62af55079ecccd42081d6a7f2749dd3804a118a204fcdb5651f0d67c03e2820d +svg/logo-npm.svg,1580478898884,b4b1ae91d5a19c7165b74afc8fe2a276cfdaeb05bf961ad610855f6d2380ea40 +svg/logo-nodejs.svg,1580478898884,29cde0f981ac5c12036d37222d771fc1b97967a40d23f795b06757a78ed4e261 +svg/logo-octocat.svg,1580478898883,209ed01facb978339f399184af0b49be7bc8293eae5adbc03404cc195d1be985 +svg/logo-pinterest.svg,1580478898884,487cb3cc5f44d0350c4dee8f3748efad4a4d6c4fcff868b7ff121e92bb626516 +svg/logo-playstation.svg,1580478898884,04ddbd09c56f5e8308f48a25309b1281cb9acec93fdc033f98e8e0edc6371b7c +svg/logo-polymer.svg,1580478898884,3397b57c967867dbcab70e1478b952bb4a715fd1f74df3c347941598066cf37f +svg/logo-python.svg,1580478898884,c5f034d5dfb5ee657f88345eb31b779fa2e5a2a7b6a1f60a8b4979c6671580b6 +svg/logo-rss.svg,1580478898885,0bf1d3dde243cab3ee46e3cec4ff1286bcb3ee0f0cd50014986ba936224bb432 +svg/logo-reddit.svg,1580478898885,af8a93019e1942468e845cd14000d7812f7ee39de9b39af9fdcac2ccdfe243f9 +svg/logo-skype.svg,1580478898885,578f882959a2c069ebe0e50d77dee7f4bdad5c9002e58564d9ed0014e1559650 +svg/logo-sass.svg,1580478898885,a7d430578f456a05c2d3ff0252cc411fe66c564cccf692a32665c5251da37e31 +svg/logo-slack.svg,1580478898885,01da6a1caae396c079cf211e618a2a4b4e53b9cef78db9f46cbf58db0097ea92 +svg/logo-snapchat.svg,1580478898885,6ee21d2c3f35f8e4b6aa7c698a6e4255eeb4b5217f7d945e1eada831cc62b976 +svg/logo-steam.svg,1580478898886,6f5715f21651cd5cffe611af7e4be8b2c6a07fa10291240cc59ccbff836ed53b +svg/logo-tumblr.svg,1580478898886,6842b6d00ca33234b865747fa0d138d660df19b8f9d7fa306f85dd1bea5f22ea +svg/logo-tux.svg,1580478898886,f333f6110f575f5e9cf0799ebea0a4ab721377a1ea7c992428346cae39cd88d8 +svg/logo-twitch.svg,1580478898886,961fb90572e9f2d33b51bce8b5fe1a0a528c2a9bbb59ada0f1bfe68364a405e2 +svg/logo-twitter.svg,1580478898886,499662754f409df3d24a3a2dec5b3e51887aee637771883266e130f3d8ed2ae4 +svg/logo-vimeo.svg,1580478898887,6f5a8f6d471dbcac922a38414a5d0519d0bf9f8b5898ff788fee49a6ec073034 +svg/logo-usd.svg,1580478898887,8cfea4c4e48b4db665e9dfb46f8df2f45aa795ed290f4d5dab9bd2bfd90d1554 +svg/logo-vk.svg,1580478898887,64a0a159bb1a76c6a4763630adfbe4371e3fa8c89b6448b8026649ede8bf4cad +svg/logo-whatsapp.svg,1580478898887,91045bbd231791fab89fdb40377a3b24553b9b5d7c6a4e7082d64b4146c0a584 +svg/logo-windows.svg,1580478898887,c1684c91e9ee8a4868828b15521f785a6ad594421c90c60c7fbd0b35117e1f63 +svg/logo-wordpress.svg,1580478898887,5e93d50743f0ef1c0d07118a4ce274bd8f703d00a75c41466592236501ffffe5 +svg/logo-xbox.svg,1580478898887,453d508ff269d9721c2073103fe4fbed578b0173132972e5629b73ee03950295 +svg/logo-yahoo.svg,1580478898887,711e6d2c780f7a92d634d7d9116f67f9923e93c14fcc983779e3c70e1fa52f4a +svg/logo-xing.svg,1580478898887,d93e99294b40c101659f65c87366b854b4587b0d589344af2f311bc9cacc2aae +svg/logo-yen.svg,1580478898888,01882e6f31df21758a14d16771ff3e97c572351d630bdc07d978f61767a78347 +svg/logo-youtube.svg,1580478898888,d5aabf058aa5b0721789731fed1c8f5f0a5c048d815875f4af364fe8c5e8507d +svg/md-add-circle-outline.svg,1580478898888,07bba22786c63f8331a15f9e544bf94de66b0bb4a1be625a896b604db7012436 +svg/md-add-circle.svg,1580478898888,f80b4b1bb3e2a472874716a383831f418ee5f6c697d447365b80addfc74e8c0c +svg/md-add.svg,1580478898888,b6d88d169ab006bd0bf01a662c368ff02e5ba2336d241cd1755cc9557ee841cc +svg/md-airplane.svg,1580478898888,6d95ac8a55ff2d3c8d935e1484ad82a651141a8a24cc05dbf21f2b3009adbd7a +svg/md-alarm.svg,1580478898888,2fb45c5e36e6138d0268e634bb8e3377b740629f67e81915dc44412bf602b39a +svg/md-albums.svg,1580478898890,82b7141ead901e0c20b4f0ce3f4d03dbce88bd72eefdd932555390130b7e4dd1 +svg/md-alert.svg,1580478898888,ad58e61f70359003ab7c1ded8b967a99fff8ca53a4699b8b602ded9c0c01716a +svg/md-american-football.svg,1580478898888,beffc31649ffee2fc0d0389fedbe11e448f49277c805cb3f4e6f0e00e10442ef +assets/img/reinforcements/gifs/IG6.gif,1580478899026,ff157e62d8d32f95e85804d50ae8f352b4e6a25735d6522a31c6f68c5cdf978a +svg/md-analytics.svg,1580478898889,d7f722a7b262d1a7f5202fa66fa1683e0cebf9d5aae3ce912690d0b9bd2e6a0d +svg/md-aperture.svg,1580478898889,e6c8c6226c99b766dc3beae3839e3ae28fbc2720ac2d67df51cce14322d362c9 +svg/md-apps.svg,1580478898889,f3be3aa3a43e4dd1f02465db872f393c422d68fa15f59494985bd52f66c20006 +svg/md-appstore.svg,1580478898889,bea564fe899efd15f751d54e9752c3b9e8dbfed84442e1af7fb8a41c80915627 +svg/md-archive.svg,1580478898891,8c100ecfd0687117abd57b0d0eefd34058984240c124acf587a2a36a79ffb802 +svg/md-arrow-down.svg,1580478898891,e9baca4f9b7fc676ff546d1dad71e63245408ef8c433cfae7370338fde67e841 +svg/md-arrow-back.svg,1580478898891,8d8a02b3d051e8cbf4699b0f6f370648aff8655a93adba8c17d34fb76adc761c +svg/md-arrow-dropdown-circle.svg,1580478898891,8e60e374f086db673848d8042718ed0dfb6ec83f262e5f853938e2b4ea96fe62 +svg/md-arrow-dropdown.svg,1580478898892,417ee90f6f0534624b18f4c7a2cac26a4521b305d139f4d53c77d3956ee087b4 +svg/md-arrow-dropleft-circle.svg,1580478898892,289a7f56f5888d1ebd32377cfd4cb45f522d828ff4a3b678e3dfcea79ce6209f +svg/md-arrow-dropleft.svg,1580478898892,74fa1caa39a379880549b8bd35e6e19978139465fbafc13c642d2c842bb60102 +svg/md-arrow-dropright-circle.svg,1580478898892,9ec5b5ae838d7e8d2e3fe3f3e9bccc798d0598f5dec89793e6fcfc3bb685d8f9 +svg/md-arrow-dropright.svg,1580478898892,648e1a2b2859e40550823cf6b30ca7847cdb5fcceb4668fe11e24ca0e1791406 +svg/md-arrow-dropup-circle.svg,1580478898892,d6a18f67fbb62eacdb8e2b47c2bcff7dd77ca913d4954fc70912424876033bb6 +svg/md-arrow-dropup.svg,1580478898892,4303fa50cb289a870905f37574ae4be631e156da3535b7d6d23b21c8bfad1bd7 +svg/md-arrow-forward.svg,1580478898892,3c9132004b4d48c9ceae0012eae3e9b22ccaaed398e69c1116abcb8723e53f9b +svg/md-arrow-round-back.svg,1580478898892,c37fce6fb6e8de13ea22762c72369f15e06b8bae99a3782ded80696fd35fc66e +svg/md-arrow-round-down.svg,1580478898892,caefc3cc82b05a265333f9d4da4a977fc5940a633cad394f4ef41954592623d4 +svg/md-arrow-round-forward.svg,1580478898893,2855b629b5f2f9d2c3e4da700efb4467e6fb7c545d84b8122e27b9d6d5c21ff9 +svg/md-arrow-round-up.svg,1580478898893,62b7b34c9d7384debde1c4584564c2d8b212c91d62121703dc30be08ebf8ffd9 +svg/md-arrow-up.svg,1580478898893,12e9149ea346c98d313eb1899915581d8943aa7e5e899955475efa2cc6542826 +svg/md-at.svg,1580478898893,ca7ada4733c14158d6a7eef488574427d933c6aca4faee94097d8a9ef0717118 +svg/md-attach.svg,1580478898893,c1a25e731f7c42925ba0a805513a219ee5846fca5d8552683fc9611b0d7fd600 +svg/md-backspace.svg,1580478898894,2453af73ca1c43a72852e7ef0606dc2051d857a9ea46f84a97119a18f693f6db +svg/md-barcode.svg,1580478898894,9fd1cd9d331f977bdb8277b732873b03a3421f28ffa19a8845c3d50396ab06c9 +svg/md-baseball.svg,1580478898895,2d8e65a232199f039087107f595252162b759ecc3ee3460362d3bd667fbd4275 +svg/md-basket.svg,1580478898895,35b837b6e68ffcd765bceb4ec65cf91f30c47ed0f317161ac8f813b6292671ee +svg/md-basketball.svg,1580478898895,7b2ae745c88ead60c893cebf34ba8159a1c99813e06f40fa8cdebe103e196e65 +svg/md-battery-charging.svg,1580478898895,fb20bcaa994d422f51311c80ed7423fffeec0767f90401994a73d1afba1fa372 +svg/md-battery-dead.svg,1580478898895,e97a2ff7772dcd9790aeafeee6cac7dd239b44953f689c4afa3391e7ab0a419c +svg/md-battery-full.svg,1580478898895,b80a0fc08ab33d4b4d375c7454ca42dd8450c6fb60aa3309e84a9fc7a033b16c +assets/memes/2.png,1580478899055,3643d7a8b68ac3c891cb2761a468dc88fbbfacd08d4f6264383625f0386c84b3 +svg/md-beaker.svg,1580478898895,854f5738b72877a5f89dd3048de564e2429505e375db790a5730c16decc359fb +svg/md-bed.svg,1580478898895,4e8b19b19d3ed86030e022477000dd8c4b348b3875ebb094d934c7efdfb2ea9c +svg/md-beer.svg,1580478898895,8d7b34d97f81b8870cb9c0f55d6a29c792c47563453fd64d913f953a13fc1dc0 +svg/md-bicycle.svg,1580478898895,377b63d174d6961d7306319aa894e059684ddf9f349b4acd493d70011381b8ee +svg/md-bluetooth.svg,1580478898896,13d3633dbc0ff066ef6a77aa34fb1f29afee06ed7bacfb7f6bed5b43d28204e8 +svg/md-boat.svg,1580478898896,cc9d09c3ddd5811de9699b6afd0f1923189b990071c34b1090a575d3669f7866 +svg/md-body.svg,1580478898896,b316ae5745dff670a2a13a2e65a730d5ea0c68c27431c1d5d11464e8ad856105 +svg/md-book.svg,1580478898896,b045c674b3ad2e66832a1bcebe406cf3fa7bc6945d0f669c0a27986469e965c2 +svg/md-bonfire.svg,1580478898896,ac29985f599f529a23499057f74047445eac08eb4c1b018cde25e3b1958d7a52 +svg/md-bookmark.svg,1580478898896,fe363970b30cccbca19c74eef49114d2b68ba2206415604b609f822ecbc3bd58 +svg/md-bookmarks.svg,1580478898897,c1d2734b45c637e125ada2a38776041a20eae31c11284a9e9b272caea393b8c8 +svg/md-bowtie.svg,1580478898896,afb5ba9fc2a9e4fdc0933cd3381766a8e0f9cc680ef92db7fbe01cbe75ea459d +svg/md-briefcase.svg,1580478898897,3afe8c7fdc8346b596a1f37fff1f40e953a938d8d3fe19ef4d50d8c42520ccd4 +svg/md-browsers.svg,1580478898897,6a4e928ee0b815adc1fa4e96eb60729cccb631826e4400358a1ebd3975fc74f6 +svg/md-brush.svg,1580478898897,e9fdb28fbcfd2abd1e7f09c1cba4457f29c188e73d707650e8216760a7fd6b1e +svg/md-bug.svg,1580478898897,c18733408edf69d8338dbce156f6cf65f0a0cbb6b63599cb6871f290ac5a83f9 +svg/md-build.svg,1580478898897,43b3ce8d9f55d110a2105ef1df0e053e5773da3d262237b8c3b34b9b78987492 +svg/md-bulb.svg,1580478898897,bb57db7e48d827131a287196927f6b01e045334e4bb9f95fc22092f74230ffde +svg/md-bus.svg,1580478898897,e5f55023e68885b72217a5ef7da4b20178a460e86a11680f6b1c87cd0be2cdf5 +svg/md-business.svg,1580478898898,4134417c01cd4f591fe4cbf3b76e8cb87f8b91d6fc4465dfe8aff650ff1a8fd9 +svg/md-cafe.svg,1580478898897,2be1c0c43e2dffd78ae470b899b38436b844a59f18d2fd162a87a39a69d56da8 +svg/md-calculator.svg,1580478898898,b0e582c3d3d8859246ee7f714fe4c3e9e2965aaf841fa191f58d005aee27921d +svg/md-calendar.svg,1580478898898,b863640f04f5ca03b80efe77301ee8550cd8fb0468abddea5e1b68efea7d3685 +svg/md-call.svg,1580478898898,09965a2367da8e00c5f7675d2e8154cf8a45af6dca6c9556f456ddde6aebb6a6 +svg/md-camera.svg,1580478898898,649eb5393f4a33be4c6d4f7ef2491c8b7294e65c49ed41afed0788fbf3e8fd04 +svg/md-car.svg,1580478898898,017f226fc1619b83b03bda9e7fffef5c25eae32e7ce4599170a10ab97703c5f0 +svg/md-card.svg,1580478898898,092c676775b02ee4b73059780e38be37b404a4e8e3a3c2dae5fcdccf49732e9f +svg/md-cart.svg,1580478898899,528960a2bae064548a069885f63f8b1432c686320e09953b07fb3112fa094947 +assets/img/reinforcements/gifs/IG14.gif,1580478899022,a8317c2c96c163d360cc929a1f7882826f7ef7136c2fce118a585643f0577a3d +svg/md-cash.svg,1580478898898,ed46038e0de0a679f08d0c9ab70e29d47ad1e1c8b813ef81a5fd4956996af327 +svg/md-cellular.svg,1580478898898,4a2141130b4df92e5dc88a12b9478df51eabb5a252f7dc7ef43feb0a3b84de46 +svg/md-chatboxes.svg,1580478898899,09009dfe3003b74613f65fca24afc9a8b2302743eb98d1f823d674c95659883e +svg/md-chatbubbles.svg,1580478898899,6233bcb8f679b520422e195d1fc01d93f3a0064e1c2f0f4cdd6651f51b08d941 +svg/md-checkbox-outline.svg,1580478898899,1720b644baa588672f59fe2dc0554c9ed6984c8cb54b1ad3849ba466e7c0f869 +svg/md-checkbox.svg,1580478898899,8133fce39313a0a5fc62796c2d1bf2e9b8fd80c35f56b78f4c0b7ca7a809d71d +svg/md-checkmark-circle-outline.svg,1580478898899,150518a01fa595868765ea761ebfb33915a9a4438f2504b3797fc98a7e25f037 +svg/md-checkmark-circle.svg,1580478898900,9c3405e5b7534f13553eb92308f8673f4077799ae322ea66ac3bb42794a30440 +svg/md-checkmark.svg,1580478898900,fb8bc3833ed057a8bcc15bf709134c41b18b82da5f4d82e1eb0b0d302f9fa357 +svg/md-clipboard.svg,1580478898900,323a36eeae4479dc331d17e54143005f770693a8dacea8e06ff980552f09829d +svg/md-close-circle-outline.svg,1580478898900,6036a6573203daa19d0441e8c1b1baf4d766d2b7a3e9297f5d7243e324a7e16a +svg/md-close-circle.svg,1580478898900,54f467d2f66a068dd290522283a97f26295ab3c8499951407b8f344872381cd5 +svg/md-clock.svg,1580478898900,952f8db25cd0ee1111ee7a9e870c64797cb5815d027faa26e13e3703325259d9 +svg/md-close.svg,1580478898900,0a6c2d9a4eb952094fcfea0fcc56b776bc9fa4c65344899d06a711ed7d051358 +svg/md-cloud-circle.svg,1580478898901,172024df5287bedfd3775925f26d32b77d8ee9c1586161368216f54eae454922 +svg/md-cloud-done.svg,1580478898901,cbb9380a73d8305b1ac450ad5e89c6b1bfabb2101b741bd3798649758e208a31 +svg/md-cloud-download.svg,1580478898900,f48df2cb0f22f46da1c0ccc0ef528a3fab5b4e65dd3d768c17667e8badccf1b3 +svg/md-cloud-outline.svg,1580478898901,90831ea200276555738cdab0efa1a85044ff0da31c58fdd6a6dc55ed933aacc8 +svg/md-cloud-upload.svg,1580478898901,0d7755ee5e4aa135b144f568b6846fafbf8ff9838f8af059469630a81c9e3cee +svg/md-cloud.svg,1580478898901,9b61c23e4176790630900da670dc16517a82010bb24602657f595e420d1e68dd +svg/md-cloudy-night.svg,1580478898901,fc9e8d29bf8477125b63ebb39002900300dc01997bdbb128e7f45f3790b30719 +svg/md-cloudy.svg,1580478898902,2740d92f3971b0ab2e99cbaa8c9cb130080e1ca45a7260b5b64cabe3a1f87ba6 +svg/md-code-download.svg,1580478898902,24d92590c4ecf7ec7aab361f7cad91d11a257a238dab4653fe04650f919a9310 +svg/md-code-working.svg,1580478898902,af664224a7922831e767d047dfe82e9cbbd1c140fb1d35c6af776dcf9c12108b +svg/md-code.svg,1580478898902,08acb55f570c9aa0380e65eac2c4d2afffce088cf9430a00f1753e5eb5c9e8f3 +svg/md-color-fill.svg,1580478898902,00730e3a17b6f24429fed358c01d0ab7138b4c5f0c64196c2fc3de9f65d56749 +svg/md-cog.svg,1580478898902,e4c8fe6db683771ae15cf54f5c656ab27d8b76056ff9faed7f18e64859867cc6 +svg/md-color-palette.svg,1580478898902,84095f4b342324500a64ddb0cb8d18a1b98836a75ed8944bef3fa399c3414a0d +svg/md-color-filter.svg,1580478898902,d6dc62de49f01e69a979ae3b9601c2dbc67f767782976f87bb981303b51b0ef2 +svg/md-color-wand.svg,1580478898902,ee9b1f3d5d365f8a842d4b3bc148dd759352cf23575b8be173b14498a3e18055 +svg/md-compass.svg,1580478898902,601029cccb67c2e9e9de4e6004aeb423df630213f68ee49a75509950c6a84ce2 +svg/md-construct.svg,1580478898902,1a6bbe17c7a1de928e2ba4380104e535493009f0e0c9ce2c97dbad6cb04dd682 +svg/md-contact.svg,1580478898902,59187f5cfc6642a4475379db18c9b2da180055b55b14b9f80fa5f461917a6a3f +svg/md-contacts.svg,1580478898902,4e0b13767ac691de9acfba9c9bbc3f338b6ddf3c8db6bd4540f8baff430f5b1b +svg/md-contract.svg,1580478898902,80eabad4169b03691572a552db1a51123d98559d96121d2824c2a105e64347ec +svg/md-contrast.svg,1580478898903,467c18b62bd26cfa3baddd6fad7b29d62389aca035154733b767f70abb4b4298 +svg/md-copy.svg,1580478898903,4d6fe2d44b64997995d5a9c3ecb0ab7e24aeab827462dd00a5136a90637b1689 +svg/md-create.svg,1580478898903,cdbd6ebb2a37ea0b8ac8cc77c1b471a9f58545c459e94271bdc38cd127c0f32a +svg/md-crop.svg,1580478898903,194fcaf6c6705ad053be18bbe013a9cee118e603edbc960688ac09474bf77adc +svg/md-cube.svg,1580478898903,e47935fce04a5ab5af0fa24d0b48d6ac0a395a45b4bc755c71a87f5cde453dcc +svg/md-desktop.svg,1580478898903,742327888e65141145c068f90d7f7621b9d43691c93978a21a3ff4662b1bc61f +svg/md-cut.svg,1580478898903,ef0d54267ac28d2037f899dab180ceeaa139934cac00c6edf5b3990a78acee8c +svg/md-disc.svg,1580478898903,455b593417fbe0bfc8d75699ed2c3f1311a4efb6b116b1c2b91526c829853ac1 +svg/md-document.svg,1580478898903,9a423f72cd15029ce7f5ca3e2eee2bfe47ba157a926ddcef5c5c7604006632b8 +svg/md-done-all.svg,1580478898904,c0625031e380a7cd8fa13eba6bf368e9fb974523b470db533691e3564acaf83a +svg/md-download.svg,1580478898904,93871ad2cdd88772cddeb6a22dc3d061a3c7528272d64a5095ac9b2e71eea1b5 +svg/md-easel.svg,1580478898904,c1369444a77c0ea13155a32894e1fd75c99b98910c46b3861968728ebfea58f6 +svg/md-egg.svg,1580478898904,328b9461102012f7d19d5c039763f80e54bd51cc67bdbcc43cc8b7e37f10f12a +svg/md-exit.svg,1580478898904,519a8a53e9c48097b2ffb9878ab91ab3505edc0cf770bac27b916caa7ff2da9c +svg/md-expand.svg,1580478898904,354e3c83cf2a61b908e4a0653510a3ebb80e1aa4d6b0b34340bf035111714583 +svg/md-eye-off.svg,1580478898905,21f659bc2ed2c9a4f58413504d68903b782c011343a2a36c0fee0206d577a7f3 +svg/md-eye.svg,1580478898905,f5d5dcb0087144a740e75567f4b0bd139069d463e7f7d7f165292a063f51567b +svg/md-fastforward.svg,1580478898905,e1f4a87228c90219529c20035220ec478904c212afcb79861bc4bda97cfcf146 +svg/md-female.svg,1580478898905,1bd6eefe07ec2a93f4c8fbc9c91237c4c17ae33742d49af111ef0f9b4af8f036 +svg/md-filing.svg,1580478898905,94ffbf0b9270f3ad3be1bb2afc773166f3e372750799b45078cf58f7b9e30473 +svg/md-film.svg,1580478898905,c8431229b308d022066ab92148fdf06e7efda1e550116c946bc5600a635ca4ab +svg/md-finger-print.svg,1580478898905,34bf4c89bad13255dc67f8a28e9a0d57359b16a34007e7c77bc8c64805594f83 +svg/md-fitness.svg,1580478898905,922d5e897a16dd5bf2fdfe574a89e46be97d6bde86f589b2302126084efe5ad8 +svg/md-flag.svg,1580478898906,f49923a7c88a7dae370b368bcfb67ca37a2150c56feea197cb098ca4daf883d1 +svg/md-flame.svg,1580478898905,3ee215cc9ed591ae4cde006d49c2cf8b0b52119f721645cbc045318e856cdc38 +svg/md-flash.svg,1580478898906,3e020edf243435f5a57c57eb1713264a2a8a37a1c8567f6c360efc728dd12cd6 +svg/md-flash-off.svg,1580478898906,d9e80df161cf65f4d279cef943f6a6f7893c071115e6ab68724f0615d27b15c3 +svg/md-flashlight.svg,1580478898906,6fbf963c6a402c93483913c2dfc1981673cb62d49cf1b7eea89c7dd9624359c4 +svg/md-flask.svg,1580478898906,c20fe9b7a219db58f708a17908abead7bffd5935e68ab6eca4923e1c184ba7d0 +svg/md-flower.svg,1580478898906,28b4983f12cb32214f59393ad65fa7cd35404c6e25f705b250a7101dc28728da +svg/md-folder-open.svg,1580478898906,980f91bfce5982e42aa0cab458d39edc94e08c7d940adf56b301146b1a9fbd9d +svg/md-folder.svg,1580478898906,5044c2d38d6157f3f454e69869525ef95e207c672c25d6537b4dc79b2d47beea +svg/md-football.svg,1580478898907,9e366256c93f993c210cbd7328890c5eb8d1c539777e683890f7c5055fa7b315 +svg/md-funnel.svg,1580478898906,5e1b42ae13df9be6481a87e28231e63fe756f5b1bb05fc082c2967c6c3c3632c +svg/md-git-branch.svg,1580478898907,515cd452045109e1e3ff64bc2ac1ff7c83718e5e4ba0e12d19f53566701c8833 +svg/md-gift.svg,1580478898907,570b794618c697ea50bd6f826a69ed9f2687aaac0628f688bbf94d958ce6122f +svg/md-git-commit.svg,1580478898907,7074633502a3d4fc299a71442f0712f339a290b53e08873ce0c9c818c61c635f +svg/md-git-compare.svg,1580478898907,5379ed5f74234e6f70d0265f7571efe0894f3fac6f04314e8b2a76d8cac3d4e1 +svg/md-git-merge.svg,1580478898907,472d4d88572c49f54884cce089767d97883a4f05ac0b50b198548853f64c3df1 +svg/md-git-network.svg,1580478898907,792b9551dcfee091d08cc53d8c3b7565089c513b235c8c323350b5345e331f5d +svg/md-git-pull-request.svg,1580478898908,a9fa0296a70bc2056c2385fecb5c5aaa8549085e5d100743b836a533ab6d048c +svg/md-glasses.svg,1580478898908,06f2cb5d98a15c8c3e64104d5f1e935b3ed899943d9527916c9bfd96c9864e3e +svg/md-grid.svg,1580478898908,cc6e94c6b484067817c47c696ab688cbbb8ae7d76464f3bb59c532d358f49e92 +svg/md-globe.svg,1580478898908,e0ac437efd853a1c5e1c9f046a61079a1ac7e25fbeabfaa11f4f8f9e728bf500 +svg/md-hammer.svg,1580478898908,43fd948b22067ffb543695af4c6596519990fd377cbf80d42e88e5c579b3b9b2 +svg/md-hand.svg,1580478898908,3d64de9142338bb2e1c5fd4eb05509e68b8af854a19f502d4c701b56fcd36b9a +svg/md-happy.svg,1580478898908,0a76c8f243f3b541c0e0fb28463745887c2f95dd9babec5945b1bdd201db58da +svg/md-headset.svg,1580478898908,ac5f2021f4fe9ff860250b32ef49b1528c4047cbc8842771b687f4a18bcc2d87 +svg/md-heart-dislike.svg,1580478898908,07138a1edee968e6fc930adb00b8244e9295f909801abfc5e4cecd3dacab0b66 +svg/md-heart-half.svg,1580478898909,7781aa3afe6d53776a418501e78548b257a913fa3fb1d2194c436568d00b26d0 +svg/md-heart-empty.svg,1580478898909,ef61617b1b3782b3aff4ebb71d87f6983c81a4ea2ae47623472388e91c760640 +svg/md-heart.svg,1580478898909,b5dd1432035582bb09b7b94382b5308c7b7a3b5e8bc8122f72edbf176d6938f9 +assets/memes/3.png,1580478899058,912dbfe8b5ac59018f5de9b1fe176f014a3741df7a1d4b224058b8790ecd3a7f +svg/md-help-buoy.svg,1580478898909,25acf307dffa5e7f62d7da8b0c52be4e35ae492fece7eae4288e505b6a40c4c6 +svg/md-help-circle-outline.svg,1580478898909,b8e6d86f88c20b9bfddc417f1bdea3fb8d64c1adaf3c2589c78f83f95c38a19a +svg/md-help-circle.svg,1580478898910,07ef9bf15d1391e8dc071170611a0ad2530b11d8da71bb8873e5eedd31002cfc +assets/img/reinforcements/gifs/HG11.gif,1580478899009,37d03caabbfd920a7dca6459bfaee6095afeea3f0a708e59963b3a8bae85270a +svg/md-help.svg,1580478898910,9accc6b6a118f5f3d81db5c45b22c50d9537bbe0f92095dc4218cb5a002579a7 +assets/memes/11.png,1580478899054,3b212bebdf56c9ed3142b066c7350b5ca9e084ef895e4c877260b6dc10338eae +svg/md-home.svg,1580478898911,c857f435ec573ddc8d80e26a815248cc20ca76437f1a59cbc489ffd8089d535a +svg/md-hourglass.svg,1580478898911,ccfd18167cd0ee4db6a1402aef02a8e961aa26ca16e0e7c9dc68c659469699ab +svg/md-ice-cream.svg,1580478898910,db02964f311ee72564dce673ff40c1e16dfbb2ef0e56582ae0d8f333dd8dffeb +svg/md-image.svg,1580478898910,128a7d3a6a085766afa962c28c8ed161b09cc69119e70273f66b48de3d916039 +svg/md-images.svg,1580478898910,885d8d5e44f97012c8a91d6a74f358ad6c1691a3e4c338f905632783594cb135 +svg/md-infinite.svg,1580478898910,deda75651ac0bd0a9ed7b916bdf56eb604b5a721380b73940e7a008120bb0541 +svg/md-information-circle-outline.svg,1580478898911,f6138fafdd9a68b8ff4f4f199be3a5cc77b295c4065a7211173924317cca39f4 +svg/md-information-circle.svg,1580478898911,6e08901227bc4e9253789bc35886585b51e223f9b59358d6102ead6075292b05 +svg/md-information.svg,1580478898912,4b85ea046e797981d769d5bb1eaf0a682b2105c1b1488cef3aee0d5b202d0f99 +svg/md-jet.svg,1580478898911,669d2556ff12c9a18cc0144b1a78c55b287c539ee24f0ecc379a61abe77d0df8 +svg/md-journal.svg,1580478898911,84626f815521f685cada652b969813ede406550d09a7b3518f17c3e21c380e71 +svg/md-key.svg,1580478898912,9ee75662d1d3a3026148583089065814ec5d107440b3fdad0fc397d31501a9b7 +svg/md-laptop.svg,1580478898912,ca2f1036db16b0858397e9e51e82cd293b00522864c5b645ea184fc7202e55a7 +svg/md-keypad.svg,1580478898912,c1d3a2bb68d99c9389f84f09af2b8d238beb4db82c0df3f3d8450ed787ed257c +assets/memes/7.png,1580478899060,5d6d667eba89de22d90f218bed07d2b2b71a3398c4dc2e5ee8c63d9f09c8d77d +svg/md-leaf.svg,1580478898912,fb7526e716510b9dc91f3ad86284da1fb4bc5b3a25ccf50479aa98685fe1633a +svg/md-link.svg,1580478898912,9078bfbc09978959f5bf1931c0af830ad4ec1d33ffa0f1b97595e10f8b619e4a +svg/md-list-box.svg,1580478898912,27f6d30a5ee7ebdb451c61e436ac9aca58615e2adad0f847a0f31bedfbe9280c +svg/md-list.svg,1580478898913,254ca3c2fae89888252f96224f652d9d0bb7eeafa156f5df5cfa3ea2e00e26a0 +svg/md-locate.svg,1580478898913,d3586105c116819a6f48eb6b6e5ec58e43f9c30c8b2a0f12a8718a604b1eb61a +svg/md-lock.svg,1580478898913,82b9b0d1629006e9437254256689d755d16d37460ebfdf1ab262dd2d6457bebd +svg/md-log-in.svg,1580478898913,701e3606d9b672484f86b0d38a6ee85fc974485a007048eadc7e403b937f99e8 +svg/md-log-out.svg,1580478898913,e4076184d560757a149b7194b034ab26c259d16e45b1bebeb78df1a2eaccad04 +svg/md-magnet.svg,1580478898913,f21471012cf6940e8ce11d8f7431acfead2bdd16ef835c02468ce9cb3b7c6200 +svg/md-mail-open.svg,1580478898913,85423e2c63745422d2de1eacfbaaa13d1cc9dc0cc280fe3a7cc540347f5256e4 +svg/md-mail-unread.svg,1580478898913,4e33df423efad390d8983af15ea07d5aac6c193dae7c904d2ea122d19624fd26 +svg/md-mail.svg,1580478898913,828c8474a9cb933c16188d25510f969508c9f98f677b7a85c33e82f6efda5bbf +svg/md-male.svg,1580478898914,198d67051880839f16043e9a4168b2c8e7e5a3899256078fd52a3a998cd8dbb5 +svg/md-man.svg,1580478898914,1b06e95eca56fbbd01f29cc7fc7f6c2030e77483fda782a2ceff7b6610e8beb0 +svg/md-map.svg,1580478898914,f4e6cb89b8807605718d273837cdff052cb2254991401a373194e43a99453103 +svg/md-medal.svg,1580478898914,d15c41241b12de0f374cf9d1bb94c66ae52630d49c3ec2ef4b966a131a5a2d2c +assets/memes/6.png,1580478899061,91c4bbce93e6210116fe18bc2198ca6ee5c6a084308c373579013680071f99c1 +svg/md-medical.svg,1580478898914,80db560f97a0283c784af0cfa38227d0a116fa9dc8c37079285728e6cd0128ed +svg/md-medkit.svg,1580478898914,89a88fb4f770a2268b68ccabd5749c5188fa72cd183dd58b4946d72c5e77a2c1 +svg/md-menu.svg,1580478898914,baff87582434108d889ff0f8b0fd3723a04a703874ade979a045741bbc8d5102 +svg/md-megaphone.svg,1580478898914,0b2a38f09a793d90316389d77dc58f5aca22ef0fc238576338f87a5602f06fa6 +svg/md-mic-off.svg,1580478898914,9d208d5006d3173c80fa643652071efca855ae864cc1b9cd653695fa2e317d10 +svg/md-mic.svg,1580478898914,3e22c5c31c5f65f2aae5f38217ba44e8b8a46ede57a3099fd50e8cbdd1081b7f +svg/md-microphone.svg,1580478898915,e4871ff95fcd2261ac9004cbc2ca50de1b8ab274f3274650699bb9f98a802d9b +svg/md-moon.svg,1580478898915,a95d9bb9473eae6d40d6b41bb9b7f55b0c86fd15c57034720c35b830f744ba42 +svg/md-more.svg,1580478898915,3c84188bcf29e5369233f3fce92e3c2f0b7ff40d32fc568fbd1e66daebef7597 +svg/md-move.svg,1580478898915,84375dd81f6376994cef233c6841c8e342df2fc7d6efffaa14a74aa291b9ba0b +svg/md-musical-note.svg,1580478898915,b012ef7781177449e72ce14b90f191aff75ccfe7a976d6ed7e3e71e8c43ff2d6 +svg/md-musical-notes.svg,1580478898915,599eba377d51682bb5560d0dde50b379ecc1c9fea496fb8930a5ed094dc2e871 +svg/md-navigate.svg,1580478898916,fba61fd9e264be96a3a5780835541dfee386fac569c650b593fed5611b60598e +svg/md-notifications-off.svg,1580478898915,48d033f60f987a348e8166ad1ce66b61359e862da2ec199d704c55be58c95ebf +svg/md-notifications-outline.svg,1580478898915,4f0edb6d48adac6d5f12b16cab9274cec69d7b39ade56136803ae4fd9ee4ab58 +svg/md-notifications.svg,1580478898915,b886a35e09868c937bd822a76c92d52bf825fc15651073aa6446fa014314c918 +svg/md-nuclear.svg,1580478898916,95f42ae4c9086e1d1a0fce16c4b623a06fdd7625561ad4ac25f6c85500ab7ec1 +svg/md-nutrition.svg,1580478898916,6bfad426260b38dfc78f69c0954efc897f80b8670c9c54bc6736e38b2b93a27e +svg/md-open.svg,1580478898916,0eb90cfb2930c3d9ebcf592c9fbd688a4baca1e85d8b8ba59944cc7a668324fc +svg/md-options.svg,1580478898916,3edbbcf513775090753188d8195fdb91c262b2e37b827ae310aa2353f4c5eb1f +svg/md-outlet.svg,1580478898916,c4fa143dcdfa7380654160ac820d163f9cd9ee39a7fc581ac1c71f4717607f6a +assets/img/reinforcements/gifs/IG17.gif,1580478899022,63498cd6cbc7e923c21e03ae9ee31712d631bc28ec0cabd0a57cada2a40160f5 +svg/md-paper-plane.svg,1580478898916,376247b1749749c93632aa3bab1bf58567160a453b7f051909613bdbf9968874 +svg/md-paper.svg,1580478898916,6d3d96a81aa8a53924a074918a56f47857b91b3306ab9c6df69d037b292fc82a +svg/md-pause.svg,1580478898916,0d94e1455311df225a8d73537c1c4fc579c7db74220803861edf2deba5e08b2e +svg/md-partly-sunny.svg,1580478898916,0701ae60a4e7ccc366fb1efadfe31b83be84dc080ea2cd32d2fb890606863043 +svg/md-people.svg,1580478898917,9e0ba4a0aa4e69c7e392b1def5da00646c9900a66db424434b831559d1798171 +svg/md-paw.svg,1580478898917,552a8ff2b2506e763bcf4bdd386824a9c11849aa83a0f46818d6a233eedf0df2 +svg/md-person-add.svg,1580478898917,b940c532ebe80fec8afd241887292885a59dc258271ed9f4e93304d5aad13009 +svg/md-person.svg,1580478898917,4c706c5808f81da02812cfc961b20d0faafc851eddbf45c8b148f8e5fe3da9c3 +svg/md-phone-landscape.svg,1580478898917,6e81da9c91a9652b4aad23c5d04832a03bbd41b3aa150f24f8cb7039717bd9c5 +svg/md-phone-portrait.svg,1580478898917,f98dbcc4b956e2e44c430f59b92fa52441ca6c43790443ac5374ced47cdf47af +svg/md-photos.svg,1580478898917,7c6307ff443b15b7615fdd2a3d84b0ac999147f6c9a8354eaf2725c3cadd58de +svg/md-pie.svg,1580478898918,4cb1a7987340d21ffba27022aa923496a4b4e667ac41246ce4bcd6bec624d21d +svg/md-pin.svg,1580478898917,5881fc8bce5b1f0ba0a1d15e5ba58ff387e1d7ca0d18d60da07f76db77b67d34 +assets/img/reinforcements/gifs/IG2.gif,1580478899021,edaace981b9ba98e9dd598d656aab0e911723a814f886c6a5f630bc2bf6697f0 +svg/md-pint.svg,1580478898918,b633c7850f7575715482b7e8cac25da7b2c0c8a7e5125d4897a488b978b9b76d +svg/md-pizza.svg,1580478898918,ee2f1cde00ce3629a8223173504bb5bf024858e7461487d1d1cf2059930de2fb +svg/md-planet.svg,1580478898918,34aab41cdaca0cb39e196522fe461f317b3f2a80a553f4bd4992bf7cf1d08b24 +svg/md-play-circle.svg,1580478898918,d0e56be6b717c3eb3958b8cf7f569fd0de83081fa1ca7336d6e50af0e46b4989 +svg/md-play.svg,1580478898918,4619955d192a2c1fdac59068a576cb711538055064307dd5f45b9d9924689f0a +svg/md-podium.svg,1580478898919,52d39d899ef3a0742d7d04f2a2f660482e7dd81367baae9d0d6f98e2a1d63cec +svg/md-power.svg,1580478898919,5fac364bcf3ead204f2af759e28ff605383bdbe2fca8489981c698947e18b7c1 +svg/md-pricetag.svg,1580478898919,a511868fd0d8c18827492c4b26a4d9b564cbe48d5c4dd0806b7c75f73d650a8a +svg/md-pricetags.svg,1580478898919,32c0830af509ec8a63aa2caa7b7577d25cf31541583867526d83b086fd70a0ea +svg/md-print.svg,1580478898919,1a7740bfefd96e41ad8b626e9248608dc261302b12c9eead3c68ba42f5fbb9c6 +svg/md-pulse.svg,1580478898919,793af7f9c30a4da202a1821707eaed457207643fb4bfcddb804a9f1be1d83369 +svg/md-qr-scanner.svg,1580478898919,b9dfc4ad80caf6299d489152e427276999fd7f3d41ea6c8602fca2fa24322c32 +svg/md-radio-button-off.svg,1580478898920,d4c58d3d8a46c0e5b4dda62483f30a7592ac51096954658b26382cdb2e1fd0c5 +svg/md-quote.svg,1580478898919,d761903da0b88246f6fab8d56539418eac6a166ff32d62768b3daef2097be534 +svg/md-radio-button-on.svg,1580478898920,c29fa78841e284ecc2d47f14a9f0a8b913997bde76b2409c5bb19d24c569f2f5 +svg/md-radio.svg,1580478898920,2f8f51d92a311e2bd25368ae08b264bc409d8cc4908258e0a7a77b3aae3f11b3 +svg/md-rainy.svg,1580478898920,674bb1d7071a9806e0e6cf9c9af4cf3149c47be329456ed6991515d20a6047e2 +svg/md-recording.svg,1580478898920,ebf9012c9c4ec3f2cc86367a116bd36cc51e3de3ecd821d7df97679c00889d01 +svg/md-redo.svg,1580478898920,7b7ac5d20d6f3e2bf79ade2d892fbfcc7ce6253a8d711d9d02911d69040ed6b8 +svg/md-refresh-circle.svg,1580478898920,5d9338f4654fc274ab27b38912bb12c67fe1a7b37bc61ec83aa230b8f12205b1 +svg/md-refresh.svg,1580478898920,72c8c348c9391c4d1b2fd197a43ded45062b92fc11876bf2340c6d68f90045f7 +svg/md-remove-circle-outline.svg,1580478898920,0fc8c62efda05866baae1a5c9662413e8f9e796ffda563ff98b54af36407b440 +svg/md-remove-circle.svg,1580478898920,586b09387ed5061c3af4cc9cb8b4a1ec1ce76749459f3db9de2f1830ea1763a3 +svg/md-remove.svg,1580478898920,6d07da7e419918bfe19e5a24af39448dfccb06d11fadbc289ebe6d9dd08e6a5e +svg/md-reorder.svg,1580478898920,acc222cf096debfb5f1de47f25fb79794ae696ff0bfec41d42a7efdd414833bc +svg/md-repeat.svg,1580478898921,f23f169b2b2e529930cf8e6abcbfcacd413b8a56952b84bd5f882058bc43f5bb +svg/md-resize.svg,1580478898921,e7eaa1eea25a32364ac8350bba02312240aa3f8e45e21e09bc7c7d5de1359a0d +svg/md-restaurant.svg,1580478898921,5f02bfac620a9ad45e03e1d90a6554b771d5a0f401b8da71e1353f21d6d7b803 +svg/md-return-left.svg,1580478898921,d87c56fb851b9edc85a2a333694657ba963a11ee793b315fcd53f1dc4739c0f6 +svg/md-return-right.svg,1580478898921,bfe28a5109eda704b781694a3117c249723901d2698feab8e6bbd29d81cddc0c +svg/md-reverse-camera.svg,1580478898921,be8fcb6ff1f1ae54bbfb4a91c75fbde2e926a5324d4610bd43b704b2cc5b5d5b +svg/md-rewind.svg,1580478898921,4e677b9c82daf76c168f859fd33831e07cfa6d3cace0fcf8529c8321468f9c97 +svg/md-ribbon.svg,1580478898921,131509f9656ff8cfa8531177251fa1abf956681988d39057d2a645cf79030d0b +svg/md-rocket.svg,1580478898921,7a30d6a5671112ef4969d775c70bf5dccd86675c3bf7b22ddcca89e213ea6457 +svg/md-rose.svg,1580478898921,6091c827962dbfb685b2ccb7a854fdacee97cee16614f63dfb5f4b910f912ba3 +svg/md-sad.svg,1580478898921,8144b89fcf732f54fc45691c44439fa76ed7f93c5f11a35b906b51770adbc860 +svg/md-save.svg,1580478898922,bfd3399e7673330274118445996a0a44fe209715022ad271c561dcfead93ce9b +assets/img/reinforcements/gifs/HG22.gif,1580478899011,b1c1ae78db3f3e32482bc6d060bd9a1c53146ba268fb496212eaa34a9ca93f12 +svg/md-school.svg,1580478898921,64e8e220384f65374aea5d6ca848af6d9b7f69c36e93b35f15a63b70aa0adf9b +svg/md-send.svg,1580478898922,43cb0c18fa65757c33bd9fb933d1e9e49c33f1271ba0798232e4f17f1d098071 +svg/md-search.svg,1580478898922,77f534239a88aa05b11f504ab932735b5c41def82544d933b6b3612a008043e4 +svg/md-settings.svg,1580478898922,cf978fdfc7b8975e6ac09b5e24475351705525d885d397687a02f6be6852504b +svg/md-share-alt.svg,1580478898923,deedc3b78c424d89807df7d91389197f1f96df6158dbe8e4f6e5792599e93e7a +svg/md-share.svg,1580478898923,2de6ec7e56ad8aa503918550f5a48903cf088a752bba6882ca98f958828aeb54 +svg/md-shirt.svg,1580478898923,f63a65e83c1706f3ed6f5b0d8e5541dbe8fbc203e1e60471f5888c6137601b82 +svg/md-shuffle.svg,1580478898923,2791855bfa937cad38f2d1ad4f44d7291421b776d5e6c677632350912d45873b +svg/md-skip-backward.svg,1580478898923,550abc584f99d47c82974cd89c5e0bc3374dd65818ffa1ae9dacffc0e7ed0ef5 +svg/md-skip-forward.svg,1580478898923,c07848003ccfa66958ddc7b3f9d74527b68cc0cbf400eccd8dd167eb6d5a0444 +svg/md-snow.svg,1580478898923,76f416dd2c15e05863cdbd310bff3f264f33da639c07e6f0e61d0337d37f1f3f +svg/md-speedometer.svg,1580478898923,52d5c30a974b3d5092d2aaf11641d2512ccfd950d101c8ad005e67cdc3f7d9e5 +svg/md-square-outline.svg,1580478898923,8a6301130332762840a6e0eb8a5300340a22c82e26a9834a75286cb5f64fa770 +svg/md-square.svg,1580478898924,877270fe3dc9970e6a4b60ec0d0bf21f0fd38646d9415bce8b6b0cd817554191 +svg/md-star-half.svg,1580478898924,178ddb0b9894394ccfaed395ffd2ad9bedc55aa4b4c0f5076066e005e4b53702 +svg/md-star.svg,1580478898924,a88ec9ccb666cad2db92530ef28bd568484e639805242c52ec41bb65684796d6 +svg/md-star-outline.svg,1580478898924,68454e4138ff43d688cdad844bc9fbf5a0533e4d8aef5b7029882cb370819134 +svg/md-stats.svg,1580478898924,180af4824fb8f195e9cd82c8cb4d45353ccaf8a5252c1ac8d6bda9b462095d9a +svg/md-stopwatch.svg,1580478898924,654cc449cc18230d37904f1b8ec43ed9d188dd37368e3c441e29d603e6ca4a1f +svg/md-subway.svg,1580478898925,304207f3c637e0bc83e40340742c78390c667f0fd2958d157ce46a339aa884fd +svg/md-sunny.svg,1580478898925,ebae4b97889c557e245d15111437f1deb257f234dda02d55b7723427611e4fd6 +svg/md-swap.svg,1580478898925,bd195800d55827d4dba8581dd3b6f6428ea770fcc3fdd4d79a326bf6ccf0d5ec +svg/md-switch.svg,1580478898925,1856ebbb5632aece7d3c95f7194736029e53a39667f7d62fddb8c2be6952b06f +svg/md-sync.svg,1580478898925,987b08b84d0bc19443768f5d2a0492571ac07a60c8f9c709afd02cf4878c3b21 +svg/md-tablet-landscape.svg,1580478898925,34a0240f7a1299dce19e30d4e16e8538a061343e68bbb6553bed8f013691b8bf +svg/md-tablet-portrait.svg,1580478898925,5c82af65a91d8b2f832bd76f2d3e896526f1e97c3614796325b2848502965241 +svg/md-tennisball.svg,1580478898925,949305e9de6e4b8a2a47dda73e35b9f1299c04aac5ea69e4f9b7f4797bc76a0c +svg/md-text.svg,1580478898926,a40d202df4335861371b6257253f276f9dbd5f65fb7908ead7c2159407f66c85 +svg/md-thermometer.svg,1580478898926,960c5ba5a04dceb66f5be02bef306a3f0b307cd40d3a050c34e7204fcec3f339 +svg/md-thumbs-down.svg,1580478898926,0b25b103ab5d9b8a5953ace78e227729a9021d715f6f6cbad3927eddcab6ab8b +svg/md-thumbs-up.svg,1580478898926,a5b544ec0325eae199fd0f9aab2a34664a339d57425909ce8551caadc49b9da5 +assets/memes/8.png,1580478899060,46815f5cb6d191ebd6aac6b6420efef7c8ed6a5506b9ef1a0163fd83c033c790 +svg/md-thunderstorm.svg,1580478898926,c09b5fd44bc15f2d89b7d2d0b80b3c46aef78c8215885cfccd885c4acf142cfd +svg/md-time.svg,1580478898926,d1e605b30dd792d78ec6e8b18f0228eb004d6cacdb6b1acbc17e2698c8e689b3 +svg/md-timer.svg,1580478898926,5c348373eaa98af197dee8e7bd4698459a565f6bebd66bad0d5690ca9eee01b0 +svg/md-today.svg,1580478898926,aec65f2124885071a3468b9a8b26407ed053893b1e82735500b91300386fd9b4 +svg/md-train.svg,1580478898926,f3092e15140cd6fd099bc10aa9dcf8077b0f6abe2a2b2b91154b9bdf16fd7f43 +svg/md-transgender.svg,1580478898926,aca2f63ab204af82b80530b0c0b94c2589f03b06998a084a752c4f772b4fc36e +svg/md-trash.svg,1580478898927,2e6bf27e7497950c9e6aaf0ce6cc84c15fc0b5447330aa0c315c0399a9578047 +svg/md-trending-down.svg,1580478898927,7227b7f98d2f1d0333cf4614774b03d890ad01e1c6816960fb7f6d335cd1b9b3 +svg/md-trending-up.svg,1580478898927,9251f2f4cd7633025cd95dde0017d8dd5b04ae0176c78ef33f70c18c02173abe +svg/md-trophy.svg,1580478898927,ce6aeae493c31e324d0f25b5920cdfb03c3a180f4b723ff8aab90a1ae64307cd +svg/md-tv.svg,1580478898927,e39703cf9ef9be5fdb8b9c3c40c7f3ae92ff4cb34af1a1af939526400375d541 +svg/md-umbrella.svg,1580478898928,7429149076c0bd0196d59f17d791d66361804ada87162110f44d120e6a616ce2 +svg/md-undo.svg,1580478898928,d82192d14de7e2613e73b2b92b70695cee58d71cb14969461165d892355f2a29 +svg/md-unlock.svg,1580478898927,3dbce5971ac525de345d386022fd0d5a4a3081fcc5bd0ccf6bbd0cdbeae5209f +svg/md-videocam.svg,1580478898928,f172c97efe8d49987db729567b292d799e62b947508f993b583317a993a776d9 +svg/md-volume-high.svg,1580478898928,6c8ce75977611061dcfb47454ae17471c660c7615cc385bee4a9b23bfbab05f2 +svg/md-volume-low.svg,1580478898928,2657310fc8f4a8322df4930904ff0c9742449932eef3a734c012631270702269 +svg/md-volume-mute.svg,1580478898928,1f336a3dfa734cfee664086fe83f8e3de709669d298b2667ff7daf079f29cf65 +svg/md-volume-off.svg,1580478898928,16721f54d04ecdec03c6e39228df22f5118234876e54f4a6c0a2f62f021dc375 +svg/md-walk.svg,1580478898928,8f584515d337ff4665c94793a3d573e421f1049672633ec7b33639e2a3ef27f6 +svg/md-wallet.svg,1580478898928,e89a7e63860a26c5e80c03bbf6869557bd8d6da4f4b9d35347c8703dea7fed06 +svg/md-warning.svg,1580478898928,743c74c2fddc670b2fa1d8c953138414841351753458c2c58f85b6ebc93b8331 +svg/md-watch.svg,1580478898928,c525979d8ed5d9b54090defabfad47fb266ce20809a550585b3217b247879dd4 +svg/md-water.svg,1580478898929,7e15371397ff6f6bd008f9326c732694f54bdf5105955816dadbdd7d3f26348b +svg/md-wine.svg,1580478898930,2a44b87c7d0c7283ea685625174ed36d71d38f373b3399dc29865fbfc22b6593 +svg/md-wifi.svg,1580478898929,c5a2ec2f33e8db18a1a320bb0e5a5f24f68517087155edef348b924953cf374a +svg/md-woman.svg,1580478898930,f5f61f82a9a554c845f07fa1d62285433bb32771b4ac0c791e78112b9761d70d +assets/memes/20.png,1580478899056,919f63f213a12503da0d5c88413b5baeaffdafb50046519c639e3b406474d399 +assets/img/reinforcements/gifs/HG16.gif,1580478899012,601a5e36e9f4d098038c2b95e923f470fd3b829d034c2d69d56e40379b6012fa +assets/pics/bg-3.png,1580478899062,6ac07c3707f22a4696906a17e2dc8e7f1c6a8f9b547551e31db4179cc383f285 +assets/img/reinforcements/gifs/HG10.gif,1580478899010,a4de127176af14d2ed28b4f27fae5f0afdeacc9650f4815c8c49cafd3598806a diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 000000000..552be506f --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "adapts-73370" + } +} diff --git a/.gitignore b/.gitignore index 813b4c05b..693f4023e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,13 @@ node_modules/ +platforms/ +www/ +src/environments/environment.ts +src/environments/environment.chop.ts +src/environments/environment.prod.ts www/ platforms/ -plugins/ -src/environments/environment.ts \ No newline at end of file +copy_these_files/aws_scripts/aws_config.json +copy_these_files/adapts_scripts/adapts_flask/config.ini +aws_config.json +mysql_config.json +saraSqlConfig.json diff --git a/README.md b/README.md index 6ffa10426..1a5788594 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,81 @@ # SARAv2 -Substance Abuse Research Assistant V2 +Substance Abuse Research Assistant V2 +# Dropbox Folder +Associated documents: https://www.dropbox.com/sh/pnxm4ajpkag743a/AAArpb5AH0I-6UECaYVLc8zla?dl=0 +Now moved to google doc folder: https://drive.google.com/drive/folders/1P9y5-P4gLJZPHvsxDyvy7hDSVuf9W6I0?usp=sharing -## Survey Module -The survey module deals with creating survey. The surveys are defined using a JSON formatted file and the "dynamic-survey.component.ts" file converts the JSON into visual form. -You can see the links to the JSON file and "dynamic-survey.component.ts" below. We also created a sample survey in the link "\app\survey\sample-survey\sample-survey.component.ts" and "\app\survey\sample-survey\sample-survey.component.html". The "sample-survey.component.html" shows the 'one line code' that you can change to point to the survey you want to populate from "\assets\data\" directory. +# Project Description +SARA is a mobile health app to engage participants with ongoing self-reporting (e.g., completing a daily survey) using timely rewards thereby reinforcing participants for data input. [SARA version 1](https://github.com/StatisticalReinforcementLearningLab/SARA-Version1) was initially developed for adolescents and emerging adults at high-risk of substance abuse, and the reinforcement strategies were developmentally and culturally appropriate for target population. -1. Survey questions are stored in "\assets\data\questions.json" -2. "\app\survey\dynamic-survey\dynamic-survey.component.ts" generates -survey, uses services in storage module to encrpt data and upload to -cloud. +SARA version 2 is extending version 1 in a number of ways: (i) we are focusing on self-report-engagement problems for a range of health issues faced by youth. e.g., one project focuses on younger adults with cancer and we are using SARA to increase self-reports on factors related to medication adherence. (ii) we are creating a modularized and open-source version so that other research groups can take the code and easily adapt the code for their own research problems. (iii) we are focusing on developing and deploying reinforcement algorithms to develiver the right reward at the right time so that people stay engaged over extended period of time. -## Storage Module -The storage module is responsible to encrypt the data and send it to the server. Currently, the encryption uses AES-256 and we can save to firebase, Azure and AWS s3. +The current contributors of this project are Harvard University, University of Michigan, and Children Hospital of Philadelphia. + +For more details, please check out the paper linked below or contact mashfiqui.r.s@gmail.com + +

+ +

+ +For the SARA app: + +```tex +@article{rabbi2018toward, + title={Toward increasing engagement in substance use data collection: development of the Substance Abuse Research Assistant app and protocol for a microrandomized trial using adolescents and emerging adults}, + author={Rabbi, Mashfiqui and Kotov, Meredith Philyaw and Cunningham, Rebecca and Bonar, Erin E and Nahum-Shani, Inbal and Klasnja, Predrag and Walton, Maureen and Murphy, Susan}, + journal={JMIR research protocols}, + volume={7}, + number={7}, + year={2018}, + publisher={JMIR Publications Inc.} +} +``` + +If you are interested in causal inference with binary outcome in a time-varying setting then please cite: + +```tex +The manuscript is in preparation. For an early draft, please refer to https://arxiv.org/abs/1906.00528 or contact +mrabbi@fas.harvard.edu or qiantianchen.thu@gmail.com + +For an informal description of the method see the "analysis_code" folder at the following link + +https://github.com/StatisticalReinforcementLearningLab/SARA-Version1/tree/master/analysis_code. +``` + + + + + +# How to run this code +SARA version 2 uses Angular 8 and ionic 4. Ionic is a cross-platform language written in Javascript. The ionic [starter project guideline](https://ionicframework.com/getting-started) is excellent and it is great point start. + +Once you get used the ionic starter project, you can clone our repo and all you need to do is type the following command. A new browser window will open up with SARA running. + +``` +ionic serve +``` + + + + +# Code Description +SARA version 2 code is designed to be modular and extendible. The following diagram shows the different modules in SARA. Each module is described in detail in their respective readme files. + +

+ +

+ +Direct links to readme files for each of the modules are below: +- [Survey](https://github.com/StatisticalReinforcementLearningLab/SARAv2/tree/master/src/app/survey) +- [Incentive](https://github.com/StatisticalReinforcementLearningLab/SARAv2/tree/master/src/app/incentive) +- [Storage](https://github.com/StatisticalReinforcementLearningLab/SARAv2/tree/master/src/app/storage) + +Our code heavily uses modules, components and service architecture from Angular 2 or above. If you are new to this architecture, we found [this Udemy course](https://www.udemy.com/course/the-complete-angular-master-class/) to be very helpful. + + +# RL Algorithm Documentation +The documentation for the RL algorithm deployed on SARA version 2 can be found [here](https://hackmd.io/@NmVUyGhZTtGsYYlVWJx9uQ/BJangREBv). -1. Configuration for firebase, Azure and AWS s3 are all stored in -"\environments\environment.ts" -2. Encrypt data service: encrdecrservice.service.ts. -3. Upload the encrypted data to AWS s3, Azure or Firebase: -aws-s3.service.ts, azure.service.ts or -store-to-firebase.service.ts diff --git a/Sample Altair plots-FZ update.ipynb b/Sample Altair plots-FZ update.ipynb new file mode 100644 index 000000000..bf8da5d53 --- /dev/null +++ b/Sample Altair plots-FZ update.ipynb @@ -0,0 +1,707 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 314, + "metadata": {}, + "outputs": [], + "source": [ + "import altair as alt\n", + "import mysql.connector as mysql\n", + "from datetime import datetime\n", + "import time\n", + "import pandas as pd\n", + "import json\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 315, + "metadata": {}, + "outputs": [], + "source": [ + "fake_data = True #set this to false to use data from the DB\n", + "config_file = './saraSqlConfig.json'\n", + "username = 'mash_aya'\n", + "num_days = 14" + ] + }, + { + "cell_type": "code", + "execution_count": 316, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "//toggle scrolling for jupyter notebooks.\n", + "IPython.OutputArea.prototype._should_scroll = function(lines) {\n", + " return false;\n", + "}\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%javascript\n", + "//toggle scrolling for jupyter notebooks.\n", + "IPython.OutputArea.prototype._should_scroll = function(lines) {\n", + " return false;\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 317, + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "ename": "DatabaseError", + "evalue": "2003 (HY000): Can't connect to MySQL server on 'ec2-54-91-131-166.compute-1.amazonaws.com' (111)", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mMySQLInterfaceError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/home/sarah/snap/jupyter/common/lib/python3.7/site-packages/mysql/connector/connection_cext.py\u001b[0m in \u001b[0;36m_open_connection\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 232\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 233\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_cmysql\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconnect\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mcnx_kwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 234\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mMySQLInterfaceError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mexc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mMySQLInterfaceError\u001b[0m: Can't connect to MySQL server on 'ec2-54-91-131-166.compute-1.amazonaws.com' (111)", + "\nDuring handling of the above exception, another exception occurred:\n", + "\u001b[0;31mDatabaseError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[0muser\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmysqlConnectObject\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"DB_USER\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 26\u001b[0m \u001b[0mpasswd\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmysqlConnectObject\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"DB_PASSWORD\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 27\u001b[0;31m \u001b[0mdatabase\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"HarvardDev\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 28\u001b[0m )\n\u001b[1;32m 29\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/home/sarah/snap/jupyter/common/lib/python3.7/site-packages/mysql/connector/__init__.py\u001b[0m in \u001b[0;36mconnect\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 268\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 269\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mHAVE_CEXT\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0muse_pure\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 270\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mCMySQLConnection\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 271\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mMySQLConnection\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 272\u001b[0m \u001b[0mConnect\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mconnect\u001b[0m \u001b[0;31m# pylint: disable=C0103\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/home/sarah/snap/jupyter/common/lib/python3.7/site-packages/mysql/connector/connection_cext.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 84\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 85\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 86\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconnect\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 87\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 88\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_add_default_conn_attrs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/home/sarah/snap/jupyter/common/lib/python3.7/site-packages/mysql/connector/abstracts.py\u001b[0m in \u001b[0;36mconnect\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 983\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 984\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdisconnect\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 985\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_open_connection\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 986\u001b[0m \u001b[0;31m# Server does not allow to run any other statement different from ALTER\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 987\u001b[0m \u001b[0;31m# when user's password has been expired.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/home/sarah/snap/jupyter/common/lib/python3.7/site-packages/mysql/connector/connection_cext.py\u001b[0m in \u001b[0;36m_open_connection\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 234\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mMySQLInterfaceError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mexc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 235\u001b[0m raise errors.get_mysql_exception(msg=exc.msg, errno=exc.errno,\n\u001b[0;32m--> 236\u001b[0;31m sqlstate=exc.sqlstate)\n\u001b[0m\u001b[1;32m 237\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 238\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_do_handshake\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mDatabaseError\u001b[0m: 2003 (HY000): Can't connect to MySQL server on 'ec2-54-91-131-166.compute-1.amazonaws.com' (111)" + ] + } + ], + "source": [ + "def getSqlConfigFromJSON(configFileName):\n", + " \"\"\"\n", + " Loads full mysql connect object from database returns the value as a JSON object. Format of the JSON object \n", + " is the following:\n", + " \n", + " {\n", + " \"host\": \"hostname.com\",\n", + " \"port\": 99999,\n", + " \"user\": \"root\",\n", + " \"passwd\": \"password\",\n", + " \"database\": \"database_or_schema_name\"\n", + " }\n", + " \n", + " \"\"\"\n", + " \n", + " with open(configFileName) as f:\n", + " mysqlConnectObject = json.load(f)\n", + " \n", + " return mysqlConnectObject\n", + "\n", + "mysqlConnectObject = getSqlConfigFromJSON(config_file)\n", + "db = mysql.connect(\n", + " host = mysqlConnectObject[\"DB_HOST\"],\n", + " port = mysqlConnectObject[\"DB_PORT\"],\n", + " user = mysqlConnectObject[\"DB_USER\"],\n", + " passwd = mysqlConnectObject[\"DB_PASSWORD\"],\n", + " database = \"HarvardDev\",\n", + " )\n", + "\n", + "def get_SQL_data(command):\n", + " cursor = db.cursor()\n", + " cursor.execute(command)\n", + " returnedData = cursor.fetchall()\n", + " \n", + " return returnedData" + ] + }, + { + "cell_type": "code", + "execution_count": 318, + "metadata": {}, + "outputs": [ + { + "ename": "OperationalError", + "evalue": "MySQL Connection not available.", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mOperationalError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 80\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mgood_day\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mxdates\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 81\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 82\u001b[0;31m \u001b[0mget_good_day\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m\u001b[0m in \u001b[0;36mget_good_day\u001b[0;34m(username, num_days)\u001b[0m\n\u001b[1;32m 65\u001b[0m \u001b[0msql_command\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msql_command\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m\" order by survey_completion_time desc;\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 66\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 67\u001b[0;31m \u001b[0mreturnedData\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_SQL_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msql_command\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 68\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 69\u001b[0m \u001b[0mgood_day\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m\u001b[0m in \u001b[0;36mget_SQL_data\u001b[0;34m(command)\u001b[0m\n\u001b[1;32m 29\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 30\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mget_SQL_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcommand\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 31\u001b[0;31m \u001b[0mcursor\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcursor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 32\u001b[0m \u001b[0mcursor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexecute\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcommand\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 33\u001b[0m \u001b[0mreturnedData\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcursor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfetchall\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/home/sarah/snap/jupyter/common/lib/python3.7/site-packages/mysql/connector/connection_cext.py\u001b[0m in \u001b[0;36mcursor\u001b[0;34m(self, buffered, raw, prepared, cursor_class, dictionary, named_tuple)\u001b[0m\n\u001b[1;32m 556\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhandle_unread_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprepared\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 557\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_connected\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 558\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mOperationalError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"MySQL Connection not available.\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 559\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcursor_class\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 560\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0missubclass\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcursor_class\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mMySQLCursorAbstract\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mOperationalError\u001b[0m: MySQL Connection not available." + ] + } + ], + "source": [ + "#DB data\n", + "def get_mood(username = 'mash_aya', num_days = 7):\n", + " \n", + " sql_command = \"SELECT when_inserted, json_answer FROM HarvardDev.harvardSurvey \" \n", + " sql_command = sql_command + \"where user_id=\\\"\"+username +\"\\\" and when_inserted > NOW() - INTERVAL \" + str(num_days) + \" DAY \"\n", + " sql_command = sql_command + \" order by survey_completion_time desc;\"\n", + " \n", + " returnedData = get_SQL_data(sql_command)\n", + " \n", + " #reformat data\n", + " dates = []\n", + " mood1=[]\n", + " mood2=[]\n", + " for row in returnedData:\n", + " date = row[0]\n", + " row_json=json.loads(row[1])\n", + " try:\n", + " dates.append(date)\n", + " mood1.append(float(row_json['QMood'].split(\":\")[0]))\n", + " mood2.append(float(row_json['QMood'].split(\":\")[0]))\n", + " except:\n", + " print(str(date) + \" no mood\")\n", + " print(mood1) \n", + " return mood1,mood2,dates\n", + "\n", + "def get_conc(username = 'mash_aya', num_days = 7):\n", + "\n", + " sql_command = \"SELECT when_inserted, json_answer FROM HarvardDev.harvardSurvey \" \n", + " sql_command = sql_command + \"where user_id=\\\"\"+username +\"\\\" and when_inserted > NOW() - INTERVAL \" + str(num_days) + \" DAY \"\n", + " sql_command = sql_command + \" order by survey_completion_time desc;\"\n", + "\n", + " returnedData = get_SQL_data(sql_command)\n", + "\n", + " conc=[]\n", + " xdates = []\n", + " for row in returnedData:\n", + " date = row[0]\n", + " row_json=json.loads(row[1])\n", + " try:\n", + " conc.append(row_json['Q2'])\n", + " xdates.append(row[0])\n", + " except:\n", + " print(str(date) + \" no concentration level\")\n", + " \n", + " return conc, xdates\n", + "\n", + "def conc_to_int(arr): #from Philip; Convert labels to numerical\n", + " new_list=[]\n", + " for i in arr:\n", + " if i == ' Rarely/Never':\n", + " new_list.append(1)\n", + " elif i == ' Occasionally':\n", + " new_list.append(2)\n", + " elif i == ' Often':\n", + " new_list.append(3)\n", + " elif i == ' Almost Always/Always':\n", + " new_list.append(4)\n", + " return new_list \n", + "\n", + "\n", + "def get_good_day(username = 'mash_aya', num_days = 7):\n", + "\n", + " sql_command = \"SELECT when_inserted, json_answer FROM HarvardDev.harvardSurvey \" \n", + " sql_command = sql_command + \"where user_id=\\\"\"+username +\"\\\" and when_inserted > NOW() - INTERVAL \" + str(num_days) + \" DAY \"\n", + " sql_command = sql_command + \" order by survey_completion_time desc;\"\n", + "\n", + " returnedData = get_SQL_data(sql_command)\n", + "\n", + " good_day=[]\n", + " xdates = []\n", + " for row in returnedData:\n", + " date = row[0]\n", + " row_json=json.loads(row[1])\n", + " try:\n", + " good_day.append(row_json['Q5'])\n", + " xdates.append(row[0])\n", + " except:\n", + " print(str(date) + \" no good day given\")\n", + " \n", + " return good_day, xdates\n", + "\n", + "get_good_day()" + ] + }, + { + "cell_type": "code", + "execution_count": 319, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " good_day date short_date\n", + "0 No 2020-11-01 2020-11-01\n", + "1 Yes 2020-11-02 2020-11-02\n", + "2 Yes 2020-11-03 2020-11-03\n", + "3 Yes 2020-11-04 2020-11-04\n", + "4 Yes 2020-11-05 2020-11-05\n", + "5 Yes 2020-11-06 2020-11-06\n", + "6 Yes 2020-11-07 2020-11-07\n", + "7 No 2020-11-08 2020-11-08\n", + "8 No 2020-11-09 2020-11-09\n", + "9 No 2020-11-10 2020-11-10\n", + "10 Yes 2020-11-11 2020-11-11\n", + "11 No 2020-11-12 2020-11-12\n", + "12 No 2020-11-13 2020-11-13\n", + "13 Yes 2020-11-14 2020-11-14\n" + ] + } + ], + "source": [ + "if fake_data == True:\n", + " \n", + " #mood\n", + " mood1 = np.random.uniform(-5,5,num_days)\n", + " mood2 = np.random.uniform(-10,0,num_days) \n", + " mood_dates = pd.date_range(start='11/1/2020', periods=num_days)\n", + " \n", + " #concentration\n", + " concs_options = [' Often',' Rarely/Never',' Occasionally',' Almost Always/Always']\n", + " concs = np.random.choice(concs_options,num_days,replace=True)\n", + " conc_dates = mood_dates\n", + " \n", + " #good_day\n", + " gd_options = ['Yes', 'No']\n", + " gd_data = np.random.choice(gd_options, num_days, replace = True)\n", + " gd_dates = mood_dates\n", + " \n", + "else:\n", + " mood1,mood2,mood_dates = get_mood(username,num_days)\n", + " concs,conc_dates = get_conc(username = username, num_days = num_days)\n", + " gd_data, gd_dates = get_good_day(username = username, num_days = num_days)\n", + "\n", + "#make lists in to pandas df \n", + "mood_sum = [x+y for x,y in zip(mood2,mood2)]\n", + "mood_df = pd.DataFrame(list(zip(mood_dates,mood1,mood2,mood_sum)), \\\n", + " columns = ['date','mood1','mood2','mood_sum'])\n", + "xconc = conc_to_int(concs)\n", + "conc_df = pd.DataFrame({'conc':xconc,'conc_label':concs, 'date':conc_dates})\n", + "\n", + "gd_df = pd.DataFrame({'good_day': gd_data, 'date': gd_dates})\n", + " \n", + "#add column for reformatted date\n", + "if fake_data == True:\n", + " mood_df['short_date'] = mood_df['date'].dt.strftime('%Y-%m-%d') #reformat dates for labels\n", + " conc_df['short_date'] = conc_df['date'].dt.strftime('%Y-%m-%d') #reformat dates for labels\n", + " gd_df['short_date'] = gd_df['date'].dt.strftime('%Y-%m-%d') #reformat dates for labels\n", + "else:\n", + " mood_df['short_date'] = mood_df['date'].str.slice(0,10) \n", + " conc_df['short_date'] = mood_df['date'].str.slice(0,10) \n", + " gd_df['short_date'] = gd_df['date'].str.slice(0,10) \n", + " \n", + "print(gd_df) " + ] + }, + { + "cell_type": "code", + "execution_count": 320, + "metadata": {}, + "outputs": [], + "source": [ + "#color scheme for all plots \n", + "#https://htmlcolorcodes.com/color-picker/\n", + "\"\"\"\"\n", + "some options:\n", + "\n", + "background_col = 'aliceblue'\n", + "title_col = '#0D5F8A'\n", + "mark_col = '#335120'\n", + "background_text_col = '#6EC3C1'\n", + "\n", + "background_col = 'aliceblue'\n", + "title_col = '#238795'\n", + "mark_col = '#952387'\n", + "background_text_col = '#879523'\n", + "\n", + "background_col = 'aliceblue'\n", + "title_col = '#284E60'\n", + "mark_col = '#63AAC0'\n", + "background_text_col = '#F99B45'\n", + "\n", + "\"\"\"\n", + "\n", + "background_col = 'aliceblue'\n", + "title_col = '#004B99'\n", + "mark_col = '#99004B'\n", + "background_text_col = '#4B9900'" + ] + }, + { + "cell_type": "code", + "execution_count": 321, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.LayerChart(...)" + ] + }, + "execution_count": 321, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#color options https://altair-viz.github.io/user_guide/generated/core/altair.ColorName.html\n", + "#https://www.sessions.edu/color-calculator/\n", + "\n", + "chart = alt.Chart(mood_df,title=\"Mood this week\").mark_circle(size=60,color=mark_col).encode(\n", + " x=alt.X('mood1',title='Negative \\u21e8 Positive'), #change the axis title\n", + " y=alt.Y('mood2',title='Sleepy \\u21e8 Alert'), #have to use unicode symbols; \\u21e8 is thick right arrow\n", + ")\n", + "\n", + "#put text on background\n", + "watermark1 = alt.Chart(pd.DataFrame([1])).mark_text(\n", + " align='left', dx=-150, dy=-75, fontSize=30, text='Stress', color=background_text_col\n", + ").encode(\n", + " opacity=alt.value(0.5)\n", + ")\n", + "watermark2 = alt.Chart(pd.DataFrame([1])).mark_text(\n", + " align='right', dx=150, dy=-75, fontSize=30, text='Excitement', color=background_text_col\n", + ").encode(\n", + " opacity=alt.value(0.5)\n", + ")\n", + "watermark3 = alt.Chart(pd.DataFrame([1])).mark_text(\n", + " align='left', dx=-150, dy=75, fontSize=30, text='Depressed', color=background_text_col\n", + ").encode(\n", + " opacity=alt.value(0.5)\n", + ")\n", + "watermark4 = alt.Chart(pd.DataFrame([1])).mark_text(\n", + " align='right', dx=150, dy=75, fontSize=30, text='Relaxed', color=background_text_col\n", + ").encode(\n", + " opacity=alt.value(0.5)\n", + ")\n", + "\n", + "#combine plot and background text\n", + "final_chart = alt.layer(chart,watermark1,watermark2,watermark3,watermark4).configure(background=background_col).configure_axis(\n", + " titleFontSize=15,titleColor=title_col).configure_title(fontSize=25,color=title_col).properties(width=400,height=400)\n", + "final_chart" + ] + }, + { + "cell_type": "code", + "execution_count": 322, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.Chart(...)" + ] + }, + "execution_count": 322, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alt.Chart(mood_df,title=\"Mood this week\").mark_circle(size=100,color=mark_col).encode(\n", + " x=alt.X('short_date',title='Date'), #change the axis title\n", + " y=alt.Y('mood1',title='Mood')\n", + ").properties(width=400,height=400).configure(background=background_col).configure_title(\n", + " fontSize=25,color=title_col).configure_axis(\n", + " titleFontSize=15,titleColor=title_col)" + ] + }, + { + "cell_type": "code", + "execution_count": 323, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.Chart(...)" + ] + }, + "execution_count": 323, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#From Philip\n", + "\n", + "alt.Chart(conc_df,title=\"Concentration this week\").mark_line(color=mark_col).encode(\n", + " x=alt.X('short_date',title='Date'), #change the axis title\n", + " y=alt.Y(field='conc_label',type='nominal',sort=alt.EncodingSortField(field='conc',order='descending'),title='Concentration'),\n", + ").properties(width=400,height=400).configure(background=background_col).configure_title(\n", + " fontSize=25,color=title_col).configure_axis(\n", + " titleFontSize=15,titleColor=title_col)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 324, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.Chart(...)" + ] + }, + "execution_count": 324, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#From Frank\n", + "\"\"\"\n", + "alt.Chart(gd_df,title=\"Will I Have a Good Day Tomorrow?\").mark_line(color=mark_col).encode(\n", + " x=alt.X('short_date',title='Date'), #change the axis title\n", + " y=alt.Y(field='conc_label',type='nominal',sort=alt.EncodingSortField(field='conc',order='descending'),title='Concentration'),\n", + ").properties(width=400,height=400).configure(background=background_col).configure_title(\n", + " fontSize=25,color=title_col).configure_axis(\n", + " titleFontSize=15,titleColor=title_col)\n", + "\"\"\"\n", + "alt.Chart(gd_df, title = 'Response to \"Will I Have a Good Day Tomorrow?\"').mark_rect().encode(\n", + " x=alt.X('short_date',title='Date'),\n", + " y=alt.Y(field='good_day',type='nominal',sort=alt.EncodingSortField(field='conc',order='descending'),title='Good Day Tomorrow'),\n", + " color = alt.Color('good_day', legend = None, scale = alt.Scale(\n", + " domain=['Yes', 'No'],\n", + " range=['green', '#99004B']))\n", + ").properties(width=400,height=200).configure(background=background_col).configure_title(\n", + " fontSize=25,color=title_col).configure_axis(\n", + " titleFontSize=15,titleColor=title_col)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Sample Altair plots.ipynb b/Sample Altair plots.ipynb new file mode 100644 index 000000000..14d1edf8c --- /dev/null +++ b/Sample Altair plots.ipynb @@ -0,0 +1,556 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 269, + "metadata": {}, + "outputs": [], + "source": [ + "import altair as alt\n", + "import mysql.connector as mysql\n", + "from datetime import datetime\n", + "import time\n", + "import pandas as pd\n", + "import json\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 270, + "metadata": {}, + "outputs": [], + "source": [ + "fake_data = True #set this to false to use data from the DB\n", + "config_file = './saraSqlConfig.json'\n", + "username = 'mash_aya'\n", + "num_days = 7" + ] + }, + { + "cell_type": "code", + "execution_count": 271, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "//toggle scrolling for jupyter notebooks.\n", + "IPython.OutputArea.prototype._should_scroll = function(lines) {\n", + " return false;\n", + "}\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%javascript\n", + "//toggle scrolling for jupyter notebooks.\n", + "IPython.OutputArea.prototype._should_scroll = function(lines) {\n", + " return false;\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 272, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "def getSqlConfigFromJSON(configFileName):\n", + " \"\"\"\n", + " Loads full mysql connect object from database returns the value as a JSON object. Format of the JSON object \n", + " is the following:\n", + " \n", + " {\n", + " \"host\": \"hostname.com\",\n", + " \"port\": 99999,\n", + " \"user\": \"root\",\n", + " \"passwd\": \"passworkd\",\n", + " \"database\": \"database_or_schema_name\"\n", + " }\n", + " \n", + " \"\"\"\n", + " \n", + " with open(configFileName) as f:\n", + " mysqlConnectObject = json.load(f)\n", + " \n", + " return mysqlConnectObject\n", + "\n", + "mysqlConnectObject = getSqlConfigFromJSON(config_file)\n", + "db = mysql.connect(\n", + " host = mysqlConnectObject[\"DB_HOST\"], + " port = mysqlConnectObject[\"DB_PORT\"],\n", + " user = mysqlConnectObject[\"DB_USER\"],\n", + " passwd = mysqlConnectObject[\"DB_PASSWORD\"],\n", + " database = \"HarvardDev\"\n", + " )\n", + "\n", + "def get_SQL_data(command):\n", + " cursor = db.cursor()\n", + " cursor.execute(command)\n", + " returnedData = cursor.fetchall()\n", + " \n", + " return returnedData" + ] + }, + { + "cell_type": "code", + "execution_count": 273, + "metadata": {}, + "outputs": [], + "source": [ + "#DB data\n", + "def get_mood(username = 'mash_aya', num_days = 7):\n", + " \n", + " sql_command = \"SELECT when_inserted, json_answer FROM HarvardDev.harvardSurvey \" \n", + " sql_command = sql_command + \"where user_id=\\\"\"+username +\"\\\" and when_inserted > NOW() - INTERVAL \" + str(num_days) + \" DAY \"\n", + " sql_command = sql_command + \" order by survey_completion_time desc;\"\n", + " \n", + " returnedData = get_SQL_data(sql_command)\n", + " \n", + " #reformat data\n", + " dates = []\n", + " mood1=[]\n", + " mood2=[]\n", + " for row in returnedData:\n", + " date = row[0]\n", + " row_json=json.loads(row[1])\n", + " try:\n", + " dates.append(date)\n", + " mood1.append(float(row_json['QMood'].split(\":\")[0]))\n", + " mood2.append(float(row_json['QMood'].split(\":\")[0]))\n", + " except:\n", + " print(str(date) + \" no mood\")\n", + " print(mood1) \n", + " return mood1,mood2,dates\n", + "\n", + "def get_conc(username = 'mash_aya', num_days = 7):\n", + "\n", + " sql_command = \"SELECT when_inserted, json_answer FROM HarvardDev.harvardSurvey \" \n", + " sql_command = sql_command + \"where user_id=\\\"\"+username +\"\\\" and when_inserted > NOW() - INTERVAL \" + str(num_days) + \" DAY \"\n", + " sql_command = sql_command + \" order by survey_completion_time desc;\"\n", + "\n", + " returnedData = get_SQL_data(sql_command)\n", + "\n", + " conc=[]\n", + " xdates = []\n", + " for row in returnedData:\n", + " date = row[0]\n", + " row_json=json.loads(row[1])\n", + " try:\n", + " conc.append(row_json['Q2'])\n", + " xdates.append(row[0])\n", + " except:\n", + " print(str(date) + \" no concentration level\")\n", + " \n", + " return conc, xdates\n", + "\n", + "def conc_to_int(arr): #from Philip; Convert labels to numerical\n", + " new_list=[]\n", + " for i in arr:\n", + " if i == ' Rarely/Never':\n", + " new_list.append(1)\n", + " elif i == ' Occasionally':\n", + " new_list.append(2)\n", + " elif i == ' Often':\n", + " new_list.append(3)\n", + " elif i == ' Almost Always/Always':\n", + " new_list.append(4)\n", + " return new_list " + ] + }, + { + "cell_type": "code", + "execution_count": 274, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " date mood1 mood2 mood_sum short_date\n", + "0 2020-11-01 -3.473908 -4.842016 -9.684031 2020-11-01\n", + "1 2020-11-02 2.213152 -7.653109 -15.306218 2020-11-02\n", + "2 2020-11-03 2.604123 -4.964420 -9.928840 2020-11-03\n", + "3 2020-11-04 0.082301 -3.936359 -7.872718 2020-11-04\n", + "4 2020-11-05 -4.495837 -6.566010 -13.132020 2020-11-05\n", + "5 2020-11-06 -4.167070 -7.676515 -15.353030 2020-11-06\n", + "6 2020-11-07 -2.053819 -3.054818 -6.109636 2020-11-07\n" + ] + } + ], + "source": [ + "if fake_data == True:\n", + " \n", + " #mood\n", + " mood1 = np.random.uniform(-5,5,num_days)\n", + " mood2 = np.random.uniform(-10,0,num_days) \n", + " mood_dates = pd.date_range(start='11/1/2020', periods=num_days)\n", + " \n", + " #concentration\n", + " concs_options = [' Often',' Rarely/Never',' Occasionally',' Almost Always/Always']\n", + " concs = np.random.choice(concs_options,num_days,replace=True)\n", + " conc_dates = mood_dates\n", + " \n", + "else:\n", + " mood1,mood2,mood_dates = get_mood(username,num_days)\n", + " concs,conc_dates = get_conc(username = username, num_days = num_days)\n", + "\n", + "#make lists in to pandas df \n", + "mood_sum = [x+y for x,y in zip(mood2,mood2)]\n", + "mood_df = pd.DataFrame(list(zip(mood_dates,mood1,mood2,mood_sum)), \\\n", + " columns = ['date','mood1','mood2','mood_sum'])\n", + "xconc = conc_to_int(concs)\n", + "conc_df = pd.DataFrame({'conc':xconc,'conc_label':concs, 'date':conc_dates})\n", + " \n", + "#add column for reformatted date\n", + "if fake_data == True:\n", + " mood_df['short_date'] = mood_df['date'].dt.strftime('%Y-%m-%d') #reformat dates for labels\n", + " conc_df['short_date'] = conc_df['date'].dt.strftime('%Y-%m-%d') #reformat dates for labels\n", + "else:\n", + " mood_df['short_date'] = mood_df['date'].str.slice(0,10) \n", + " conc_df['short_date'] = mood_df['date'].str.slice(0,10) \n", + " \n", + "print(mood_df) " + ] + }, + { + "cell_type": "code", + "execution_count": 288, + "metadata": {}, + "outputs": [], + "source": [ + "#color scheme for all plots \n", + "#https://htmlcolorcodes.com/color-picker/\n", + "\"\"\"\"\n", + "some options:\n", + "\n", + "background_col = 'aliceblue'\n", + "title_col = '#0D5F8A'\n", + "mark_col = '#335120'\n", + "background_text_col = '#6EC3C1'\n", + "\n", + "background_col = 'aliceblue'\n", + "title_col = '#238795'\n", + "mark_col = '#952387'\n", + "background_text_col = '#879523'\n", + "\n", + "background_col = 'aliceblue'\n", + "title_col = '#284E60'\n", + "mark_col = '#63AAC0'\n", + "background_text_col = '#F99B45'\n", + "\n", + "\"\"\"\n", + "\n", + "background_col = 'aliceblue'\n", + "title_col = '#004B99'\n", + "mark_col = '#99004B'\n", + "background_text_col = '#4B9900'" + ] + }, + { + "cell_type": "code", + "execution_count": 289, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.LayerChart(...)" + ] + }, + "execution_count": 289, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#color options https://altair-viz.github.io/user_guide/generated/core/altair.ColorName.html\n", + "#https://www.sessions.edu/color-calculator/\n", + "\n", + "chart = alt.Chart(mood_df,title=\"Mood this week\").mark_circle(size=60,color=mark_col).encode(\n", + " x=alt.X('mood1',title='Negative \\u21e8 Positive'), #change the axis title\n", + " y=alt.Y('mood2',title='Sleepy \\u21e8 Alert'), #have to use unicode symbols; \\u21e8 is thick right arrow\n", + ")\n", + "\n", + "#put text on background\n", + "watermark1 = alt.Chart(pd.DataFrame([1])).mark_text(\n", + " align='left', dx=-150, dy=-75, fontSize=30, text='Stress', color=background_text_col\n", + ").encode(\n", + " opacity=alt.value(0.5)\n", + ")\n", + "watermark2 = alt.Chart(pd.DataFrame([1])).mark_text(\n", + " align='right', dx=150, dy=-75, fontSize=30, text='Excitement', color=background_text_col\n", + ").encode(\n", + " opacity=alt.value(0.5)\n", + ")\n", + "watermark3 = alt.Chart(pd.DataFrame([1])).mark_text(\n", + " align='left', dx=-150, dy=75, fontSize=30, text='Depressed', color=background_text_col\n", + ").encode(\n", + " opacity=alt.value(0.5)\n", + ")\n", + "watermark4 = alt.Chart(pd.DataFrame([1])).mark_text(\n", + " align='right', dx=150, dy=75, fontSize=30, text='Relaxed', color=background_text_col\n", + ").encode(\n", + " opacity=alt.value(0.5)\n", + ")\n", + "\n", + "#combine plot and background text\n", + "final_chart = alt.layer(chart,watermark1,watermark2,watermark3,watermark4).configure(background=background_col).configure_axis(\n", + " titleFontSize=15,titleColor=title_col).configure_title(fontSize=25,color=title_col).properties(width=400,height=400)\n", + "final_chart" + ] + }, + { + "cell_type": "code", + "execution_count": 290, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.Chart(...)" + ] + }, + "execution_count": 290, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "alt.Chart(mood_df,title=\"Mood this week\").mark_circle(size=100,color=mark_col).encode(\n", + " x=alt.X('short_date',title='Date'), #change the axis title\n", + " y=alt.Y('mood1',title='Mood')\n", + ").properties(width=400,height=400).configure(background=background_col).configure_title(\n", + " fontSize=25,color=title_col).configure_axis(\n", + " titleFontSize=15,titleColor=title_col)" + ] + }, + { + "cell_type": "code", + "execution_count": 291, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + "" + ], + "text/plain": [ + "alt.Chart(...)" + ] + }, + "execution_count": 291, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#From Philip\n", + "\n", + "alt.Chart(conc_df,title=\"Concentration this week\").mark_line(color=mark_col).encode(\n", + " x=alt.X('short_date',title='Date'), #change the axis title\n", + " y=alt.Y(field='conc_label',type='nominal',sort=alt.EncodingSortField(field='conc',order='descending'),title='Concentration'),\n", + ").properties(width=400,height=400).configure(background=background_col).configure_title(\n", + " fontSize=25,color=title_col).configure_axis(\n", + " titleFontSize=15,titleColor=title_col)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/angular.json b/angular.json index 8601ddb91..5d4d27168 100644 --- a/angular.json +++ b/angular.json @@ -39,9 +39,7 @@ "input": "src/global.scss" } ], - "scripts": [ - - ], + "scripts": [], "es5BrowserSupport": true }, "configurations": { @@ -49,23 +47,31 @@ "fileReplacements": [ { "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" + "with": "src/environments/environment.chop.ts" } ], "optimization": true, "outputHashing": "all", - "sourceMap": false, + "sourceMap": true, "extractCss": true, "namedChunks": false, - "aot": true, + "aot": false, "extractLicenses": true, "vendorChunk": false, - "buildOptimizer": true, + "buildOptimizer": false, "budgets": [ { "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" + "maximumWarning": "5mb", + "maximumError": "15mb" + } + ] + }, + "dev": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.dev.ts" } ] }, @@ -83,6 +89,9 @@ "production": { "browserTarget": "app:build:production" }, + "dev": { + "browserTarget": "app:build:dev" + }, "ci": { "progress": false } @@ -126,8 +135,13 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"], - "exclude": ["**/node_modules/**"] + "tsConfig": [ + "src/tsconfig.app.json", + "src/tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] } }, "ionic-cordova-build": { @@ -176,14 +190,16 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": "e2e/tsconfig.e2e.json", - "exclude": ["**/node_modules/**"] + "exclude": [ + "**/node_modules/**" + ] } } } } }, "cli": { - "defaultCollection": "@ionic/angular-toolkit" + "defaultCollection": "@ngrx/schematics" }, "schematics": { "@ionic/angular-toolkit:component": { @@ -193,4 +209,4 @@ "styleext": "scss" } } -} +} \ No newline at end of file diff --git a/config.xml b/config.xml index 3436ece25..c53826be8 100644 --- a/config.xml +++ b/config.xml @@ -1,10 +1,11 @@ - - MyApp + + SARA An awesome Ionic/Cordova app. Ionic Framework Team + @@ -13,19 +14,25 @@ + + - + + + + + @@ -46,8 +53,18 @@ + + + + + + + + + + @@ -82,12 +99,29 @@ + + + + + + + + + + + + + + + + + + - - + diff --git a/data_analysis_scripts/ReinforcementForEachIndividual.py b/data_analysis_scripts/ReinforcementForEachIndividual.py new file mode 100644 index 000000000..f28b4fa5b --- /dev/null +++ b/data_analysis_scripts/ReinforcementForEachIndividual.py @@ -0,0 +1,170 @@ +""" +Author: Mash +Date: Feb 18, 2021 + +This script takes a config file for data location in S3 and generates a list of survey responses per user. +The S3 should contain survey responses. This code can't handle wrong file types. + +""" +import subprocess +import json +import csv +import datetime +import pdb +from collections import OrderedDict +import boto3 +from prettytable import PrettyTable +from pathlib import Path + +# Look at getConfig.py to create config Json file. +from getConfig import ACCESS_KEY, SECRET_KEY +import os + + +class StudyDataCheck: + def __init__(self): + # Use Client to access s3 + self.s3client = boto3.client("s3", region_name="us-east-1", + aws_access_key_id=ACCESS_KEY, + aws_secret_access_key=SECRET_KEY) + + # start a sqlite3 client + + def append_to_file(self, directory, file_name, string_to_write, header_string): + """ + Appends the string to the filename in the specified directory. + + Fault tolerance: + 1. This function can create if directory doesn't exist (at least one level) + 2. Create filename if it doesn't exist. + + """ + + # make directory if it doesn't exist + if not os.path.exists(directory): + os.makedirs(directory) + + # add header to what to write if file doesn't exist + if not os.path.exists(directory + "/" + file_name): + #append header to file + data_to_write = header_string + "\n" + string_to_write + else: + data_to_write = string_to_write + + f=open(directory + "/" + file_name, "a+") # plus sign means fille will be created if it doesn't exist + f.write(data_to_write + "\n") + f.close() + + def remove_directory(self, dir_name): + dir_path = Path(dir_name) + try: + dir_path.rmdir() + except OSError as e: + print("Error: %s : %s" % (dir_path, e.strerror)) + + def get_all_s3_objects(self, s3, **base_kwargs): + continuation_token = None + while True: + list_kwargs = dict(MaxKeys=1000, **base_kwargs) + if continuation_token: + list_kwargs['ContinuationToken'] = continuation_token + response = s3.list_objects_v2(**list_kwargs) + yield from response.get('Contents', []) + if not response.get('IsTruncated'): # At the end of the list? + break + continuation_token = response.get('NextContinuationToken') + + + + def reinforcementData(self, bucketId, prefix): + """ + Takes a bucketId and prefix, and outputs the reinforcement data. + TODO: make the headers input to the function. + """ + + # remove directory + dir_name = "data/reinforcement" + self.remove_directory(dir_name) + + header = ["userName", "date", "day_count", "Prob", "isRandomized", "reward", + "reward_img_link", "Like", "unix_ts", "readable_ts", "appVersion"] + + reinforcementPrettyTable = PrettyTable() + reinforcementPrettyTable.field_names = header + + # get_last_modified = lambda obj: int(obj['LastModified'].strftime('%s')) + def get_last_modified(obj): return obj['LastModified'].timetuple() + + #resp = self.s3client.list_objects_v2(Bucket=bucketId, Prefix=prefix) + #objS3 = resp['Contents'] + #pdb.set_trace() + #sortedS3DataModified = [obj['Key'] for obj in sorted( + # objS3, key=get_last_modified, reverse=True)] + + objS3 = [] + for file in self.get_all_s3_objects(self.s3client, Bucket=bucketId, Prefix=prefix): + objS3.append(file) + sortedS3DataModified = [obj['Key'] for obj in sorted( + objS3, key=get_last_modified, reverse=True)] + + numberOfFilesProcessed = 0 + TOTAL_NUMBER_OF_RECORDS_TO_DISPLAY = 70 + + print('\n\n\n\n==========================================================================') + print("Reinforcement data for AYA") + print("Number of file processing: " + + str(len(sortedS3DataModified))) + print('==========================================================================') + + # pdb.set_trace() + + for filename in sortedS3DataModified: + + if("result" in filename): + + json_obj = self.s3client.get_object( + Bucket=bucketId, Key=filename) + json_data = json_obj['Body'].read().decode('utf-8') + # print(json_data) + each_json = json.loads(json_data) + + # modify the the deviceInfo + if "userName" not in each_json: + numberOfFilesProcessed = numberOfFilesProcessed + 1 + continue + + ordered = OrderedDict((key, each_json.get(key)) + for key in header) + + header_string = ','.join(header) + user_name = each_json["userName"] + if (user_name.startswith('caregiver') or user_name.startswith('Caregiver') or user_name.startswith('AYA') or user_name.startswith('aya')) : + # save to appropriate file + data_m = [str(data_point).replace(",", " ").strip() for data_point in ordered.values()] + data_m = ','.join(data_m) + self.append_to_file(dir_name, user_name + ".csv", data_m, header_string) + print(str(numberOfFilesProcessed+1) + " of " + str(len(sortedS3DataModified)) + ": is username, " + user_name + ", date: " + each_json["readable_ts"]) + else: + print(str(numberOfFilesProcessed+1) + " of " + str(len(sortedS3DataModified))) + + numberOfFilesProcessed = numberOfFilesProcessed + 1 + + print('\n') + print(reinforcementPrettyTable) + print('\n\n\n\n') + + + +if __name__ == "__main__": + studyDataCheck = StudyDataCheck() + + current_time = datetime.datetime.strftime(datetime.datetime.now(), "%Y-%m-%d %I:%M:%S%p %Z") + print("Generated on: " + current_time + "\n\n\n\n") + + # survey data check + # studyDataCheck.surveyDataCheckAYA('chop-sara', 'alex_survey_aya/') + + # studyDataCheck.surveyDataCheckCG('chop-sara', 'alex_survey_caregiver/') + + # reinforcement data check + studyDataCheck.reinforcementData('chop-sara', 'reinforcement_data/') \ No newline at end of file diff --git a/data_analysis_scripts/SurveyForEachIndividual.py b/data_analysis_scripts/SurveyForEachIndividual.py new file mode 100644 index 000000000..a9d0d5843 --- /dev/null +++ b/data_analysis_scripts/SurveyForEachIndividual.py @@ -0,0 +1,270 @@ +""" +Author: Mash +Date: Feb 18, 2021 + +This script takes a config file for data location in S3 and generates a list of survey responses per user. +The S3 should contain survey responses. This code can't handle wrong file types. + +""" +import subprocess +import json +import csv +import datetime +import pdb +from collections import OrderedDict +import boto3 +from prettytable import PrettyTable + +# Look at getConfig.py to create config Json file. +from getConfig import ACCESS_KEY, SECRET_KEY +import os + + +class StudyDataCheck: + def __init__(self): + # Use Client to access s3 + self.s3client = boto3.client("s3", region_name="us-east-1", + aws_access_key_id=ACCESS_KEY, + aws_secret_access_key=SECRET_KEY) + + # start a sqlite3 client + + def append_to_file(self, directory, file_name, string_to_write, header_string): + """ + Appends the string to the filename in the specified directory. + + Fault tolerance: + 1. This function can create if directory doesn't exist (at least one level) + 2. Create filename if it doesn't exist. + + """ + + # make directory if it doesn't exist + if not os.path.exists(directory): + os.makedirs(directory) + + # add header to what to write if file doesn't exist + if not os.path.exists(directory + "/" + file_name): + #append header to file + data_to_write = header_string + "\n" + string_to_write + else: + data_to_write = string_to_write + + f=open(directory + "/" + file_name, "a+") # plus sign means fille will be created if it doesn't exist + f.write(data_to_write + "\n") + f.close() + + def get_all_s3_objects(self, s3, **base_kwargs): + continuation_token = None + while True: + list_kwargs = dict(MaxKeys=1000, **base_kwargs) + if continuation_token: + list_kwargs['ContinuationToken'] = continuation_token + response = s3.list_objects_v2(**list_kwargs) + yield from response.get('Contents', []) + if not response.get('IsTruncated'): # At the end of the list? + break + continuation_token = response.get('NextContinuationToken') + + def surveyDataCheckAYA(self, bucketId, prefix): + """ + Takes a bucketId and prefix, and outputs the survey. + TODO: make the headers input to the function. + """ + + resp = self.s3client.list_objects_v2(Bucket=bucketId, Prefix=prefix) + + header = ["userName", "ts", "Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7", "Q8", + "Q9", "Q10", "Q11", "starttimeUTC", "endtimeUTC", "devicInfo", "appVersion"] + + key_order = ["userName", "ts", "Q1d", "Q2d", "Q3d", "Q4d", "Q5d", "Q6d", "Q7d", + "Q11", "Q8d", "Q9d", "Q10", "starttimeUTC", "endtimeUTC", "devicInfo", "appVersion"] + + surveyPrettyTable = PrettyTable() + surveyPrettyTable.field_names = header + + # get_last_modified = lambda obj: int(obj['LastModified'].strftime('%s')) + def get_last_modified(obj): return obj['LastModified'].timetuple() + objS3 = [] + for file in self.get_all_s3_objects(self.s3client, Bucket=bucketId, Prefix=prefix): + objS3.append(file) + sortedS3DataModified = [obj['Key'] for obj in sorted( + objS3, key=get_last_modified, reverse=True)] + + numberOfFilesProcessed = 0 + TOTAL_NUMBER_OF_RECORDS_TO_DISPLAY = 50 + + print('\n\n\n\n==========================================================================') + print("Survey data for AYA") + print("Number of file processing: " + + str(len(sortedS3DataModified))) + print('==========================================================================') + + for filename in sortedS3DataModified: + + if("result" in filename): + + # print("Processing file #" + str(numberOfFilesProcessed) + ": " + filename) + + json_obj = self.s3client.get_object( + Bucket=bucketId, Key=filename) + json_data = json_obj['Body'].read().decode('utf-8') + each_json = json.loads(json_data) + + # get encrypted obj and try to decrypt it. + #try: + encrypted_data = each_json['encrypted'] + decrypted_data = subprocess.check_output( + ["node", "decrypt.js", encrypted_data]) + decrypted_json = json.loads(decrypted_data) + + # modify the the deviceInfo + decrypted_json["devicInfo"] = decrypted_json["devicInfo"][0] + + # --- Pretty print + # print(json.dumps(decrypted_json, indent=4, sort_keys=True)) + + # ordered list of data. + if "Q1" in decrypted_json: + ordered = OrderedDict( + (key, decrypted_json.get(key)) for key in header) + else: # <---- older version + ordered = OrderedDict( + (key, decrypted_json.get(key)) for key in key_order) + + header_string = ','.join(header) + user_name = decrypted_json["userName"] + if (user_name.startswith('AYA') or user_name.startswith('aya')): + # save to appropriate file + # data_m = [str(data_point).strip().encode('ascii', 'ignore') for data_point in ordered.values()] + # data_m = [str(data_point).strip().encode('ascii', 'ignore') for data_point in ordered.values()] + data_m = [str(data_point).replace(",", " ").strip() for data_point in ordered.values()] + data_m = ','.join(data_m) + self.append_to_file("data/survey_aya", user_name + ".csv", data_m, header_string) + print(str(numberOfFilesProcessed+1) + " of " + str(len(sortedS3DataModified)) + ": is AYA, " + user_name + ", date: " + decrypted_json["ts"]) + else: + print(str(numberOfFilesProcessed+1) + " of " + str(len(sortedS3DataModified))) + numberOfFilesProcessed = numberOfFilesProcessed + 1 + + #except: + # print("An exception occurred") + + print('\n') + print(surveyPrettyTable) + print('\n\n\n\n') + + + + + def surveyDataCheckCG(self, bucketId, prefix): + """ + Takes a bucketId and prefix, and outputs the survey. + + TODO: make the headers input to the function. + """ + + resp = self.s3client.list_objects_v2(Bucket=bucketId, Prefix=prefix) + + # header=["Q1","Q2","Q3","Q4","Q5","Q6","Q7","Q8","Q9","Q10","Q11", + # "starttimeUTC","reponse_ts","endtimeUTC","userName","ts","devicInfo","appVersion"] + + header = ["userName", "ts", "Q1", "Q2", "Q3", "Q4", + "starttimeUTC", "endtimeUTC", "devicInfo", "appVersion"] + # "starttimeUTC","reponse_ts","endtimeUTC","userName","ts","devicInfo","appVersion"] + + # key_order=["Q1d","Q2d","Q3d","Q4d","Q5d","Q6d","Q7d","Q11","Q8d","Q9d","Q10", + # "starttimeUTC","reponse_ts","endtimeUTC","userName","ts","devicInfo","appVersion"] + key_order = ["userName", "ts", "Q1p", "Q7d", "Q9d", "Q10", + "starttimeUTC", "endtimeUTC", "devicInfo", "appVersion"] + + surveyPrettyTable = PrettyTable() + surveyPrettyTable.field_names = header + + # get_last_modified = lambda obj: int(obj['LastModified'].strftime('%s')) + def get_last_modified(obj): return obj['LastModified'].timetuple() + objS3 = resp['Contents'] + sortedS3DataModified = [obj['Key'] for obj in sorted( + objS3, key=get_last_modified, reverse=True)] + + numberOfFilesProcessed = 0 + TOTAL_NUMBER_OF_RECORDS_TO_DISPLAY = 50 + + print('\n\n\n\n==========================================================================') + print("Survey data for Caregivers") + print("Number of file processing: " + + str(len(sortedS3DataModified))) + print('==========================================================================') + + for filename in sortedS3DataModified: + + if("result" in filename): + + # print("Processing file #" + str(numberOfFilesProcessed) + ": " + filename) + # print(str(numberOfFilesProcessed+1)), + + json_obj = self.s3client.get_object( + Bucket=bucketId, Key=filename) + json_data = json_obj['Body'].read().decode('utf-8') + each_json = json.loads(json_data) + + # get encrypted obj and try to decrypt it. + try: + encrypted_data = each_json['encrypted'] + decrypted_data = subprocess.check_output( + ["node", "decrypt.js", encrypted_data]) + decrypted_json = json.loads(decrypted_data) + + # modify the the deviceInfo + decrypted_json["devicInfo"] = decrypted_json["devicInfo"][0] + + # --- Pretty print + # print(json.dumps(decrypted_json, indent=4, sort_keys=True)) + + # ordered list of data. + if "Q1" in decrypted_json: + ordered = OrderedDict( + (key, decrypted_json.get(key)) for key in header) + else: # <---- older version + ordered = OrderedDict( + (key, decrypted_json.get(key)) for key in key_order) + + # print([str(data_point).strip().encode('ascii', 'ignore') for data_point in ordered.values()]) + # surveyPrettyTable.add_row([str(data_point).strip().encode( + # 'ascii', 'ignore') for data_point in ordered.values()]) + + header_string = ','.join(header) + user_name = decrypted_json["userName"] + if (user_name.startswith('caregiver') or user_name.startswith('Caregiver')) : + # save to appropriate file + # data_m = [str(data_point).strip().encode('ascii', 'ignore') for data_point in ordered.values()] + # data_m = [str(data_point).strip().encode('ascii', 'ignore') for data_point in ordered.values()] + data_m = [str(data_point).replace(",", " ").strip() for data_point in ordered.values()] + data_m = ','.join(data_m) + self.append_to_file("data/survey_cg", user_name + ".csv", data_m, header_string) + print(str(numberOfFilesProcessed+1) + " of " + str(len(sortedS3DataModified)) + ": is CG, " + user_name + ", date: " + decrypted_json["ts"]) + else: + print(str(numberOfFilesProcessed+1) + " of " + str(len(sortedS3DataModified))) + + numberOfFilesProcessed = numberOfFilesProcessed + 1 + # if numberOfFilesProcessed == TOTAL_NUMBER_OF_RECORDS_TO_DISPLAY: + # break + + except: + pass + #print("Unexpected error:", sys.exc_info()[0]) + + print('\n') + print(surveyPrettyTable) + print('\n\n\n\n') + + +if __name__ == "__main__": + studyDataCheck = StudyDataCheck() + + current_time = datetime.datetime.strftime(datetime.datetime.now(), "%Y-%m-%d %I:%M:%S%p %Z") + print("Generated on: " + current_time + "\n\n\n\n") + + # survey data check + studyDataCheck.surveyDataCheckAYA('chop-sara', 'alex_survey_aya/') + + # studyDataCheck.surveyDataCheckCG('chop-sara', 'alex_survey_caregiver/') \ No newline at end of file diff --git a/data_analysis_scripts/__pycache__/getConfig.cpython-37.pyc b/data_analysis_scripts/__pycache__/getConfig.cpython-37.pyc new file mode 100644 index 000000000..a3a2516b2 Binary files /dev/null and b/data_analysis_scripts/__pycache__/getConfig.cpython-37.pyc differ diff --git a/data_analysis_scripts/aws_config_CHOP.json b/data_analysis_scripts/aws_config_CHOP.json new file mode 100644 index 000000000..3dd73f12d --- /dev/null +++ b/data_analysis_scripts/aws_config_CHOP.json @@ -0,0 +1,4 @@ +{ + "ACCESS_KEY":"AKIA35724R3PA37ZP56O", + "SECRET_KEY":"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" +} diff --git a/data_analysis_scripts/decrypt.js b/data_analysis_scripts/decrypt.js new file mode 100644 index 000000000..8d770285b --- /dev/null +++ b/data_analysis_scripts/decrypt.js @@ -0,0 +1,47 @@ + +//Install "crypto-js" in Command Prompt: npm install crypto-js + +var CryptoJS = require("crypto-js"); + + +//--- SHA256 +//var SHA256 = require("crypto-js/sha256"); +//console.log(SHA256("Message")); + + +// Encrypt +var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123'); +//console.log(ciphertext); + + +// Decrypt +//var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123'); +//var plaintext = bytes.toString(CryptoJS.enc.Utf8); + +//-- decrypt(encrypted, "+Xr?SwA?EJ7m+g$c"); +var pass = "+Xr?SwA?EJ7m+g$c"; +var transitmessage = process.argv[2]; //"e6d27bd148744db9db5906eb190c05fac371896da290ba938f70800aa7a9d1e4PLSAtufrEPBOWGSoVFwbFKk7cJ5Ar0A/+hfRcLkMc3teRFrPbJZktsK26fvh/RPibfv2Ppsuxkv+KELqrPdqnzJNLH+b1KI8reOuLJasUrBHbaYPB8zI8yggZuL9LkZlxmrZ8gDyTfw+jHlHsB8dNojmZGsUDnvhGNVhQ0KDHGVnVPAQJWoYf9RlYKGBWGGMJsASYHK1f8eHchiFuwmiIysiFlGNF8jxW5mDJo2B0o2Y4QNzxLf1RgXbSfut92CawDV6z41ichmC3g8gCQYp3c2sRwmIBaoAxlRBZxg9lcc1SkUNfScfuVe5BhryOoHnZyiiWTI8N5ylnX9ubOjOI+c4olt+RpP04TTDtU6h7prb+vt+TKve9E5wglMf74TDwyesNZ3gJk9gJqYcXjKPBNhY0yM5JtqZSl2UyHEoi6ssQDPzE/a9tdQaKKb65INuW/tmSeHdLlUj3VYItn/nPRKwF0K4qGEu+GSdsLSsZExTvZBtTyXBZjOq31bFECGaASWd5BJ05y3fbBLhJ336eqeQd2Z7G2hthaoORw9gP0NgQSs50R6oFh1ePwuCxER3zz9Gf0mBFzsByTgx+yVvl6KC0h49zoARAwCq5Yv0tZ38jvoj/uA1x2Hkoa4jcUxqyfI4jkEGbXFO3BLDUABShWJtb8wIdppd4HYxQeexnWQ1rgP9WZL1soahVLxDLxe78IGMHNUuebZbp7YhWFftrTWs/Pm0RBI8Ywu2AukBd06crU3wSAcMvLz2/BHhBK5meh1j8QYfycBg1Fji4lIHk/xqgVwUbShm22T1paVPcFp5tGk/EhRvpDB9uYMru2iumir2xcravvLxya69pCmgjBlPV+xUhI/13xmFflX1pZUb1rKJVzj0b0GBeMnJandy/0NtOscl9WgbTS7gNB8ZLOTPJOwAEcp2BzyILohQQWAuyui2lwHijOKOofcJdFRm/UMrDr8Y8NFheKH4rG4Y2jscnQwy6pbp9fOBpeLF5s8BPr/YZOCBY86CZmoXvKK2lASbNo/1VgDe1UW75aVwW43byfH9S8skkJ4K/1Xd3VU6Kk7heNC2Dwsb0TkAOmWBbP1hXTfJApdmWSeiXmLDdFKo1n26aJtNHJXCU/scOFnHysTmIUlZtFi0iQimzZCS2u9ly8Qp1e3DIyekDw94P0f3BBGIMwbFOY2pWX78YcWOqEffvPQDIuGXZ8oto6dyI8D9Yd3rv4CNUVLq85zfksNNiD5rE+L0NjJfos/U4MOWKPHMuneQmVV7VctSHrL/qcycq3yYLi2cx1X/4TP7TA=="; + + + +// Code goes here +var keySize = 256; +var ivSize = 128; +var iterations = 100; + +var salt = CryptoJS.enc.Hex.parse(transitmessage.substr(0, 32)); +var iv = CryptoJS.enc.Hex.parse(transitmessage.substr(32, 32)) +var encrypted = transitmessage.substring(64); + +var key = CryptoJS.PBKDF2(pass, salt, { + keySize: keySize / 32, + iterations: iterations +}); + +var decrypted = CryptoJS.AES.decrypt(encrypted, key, { + iv: iv, + padding: CryptoJS.pad.Pkcs7, + mode: CryptoJS.mode.CBC +}); + +console.log(decrypted.toString(CryptoJS.enc.Utf8)); diff --git a/data_analysis_scripts/getConfig.py b/data_analysis_scripts/getConfig.py new file mode 100644 index 000000000..06e0d015f --- /dev/null +++ b/data_analysis_scripts/getConfig.py @@ -0,0 +1,25 @@ +import json +import io + + +'''aws_config.json: +{ + "ACCESS_KEY": "......", + "SECRET_KEY": "......" +} +''' + +# Open the JSON File and create a StringIO buffer to hold data + +with open('./aws_config_CHOP.json', 'r') as datafile: + + # Load data into json file + config = json.load(datafile) + + # Build json strong + ACCESS_KEY = config['ACCESS_KEY'] + SECRET_KEY = config['SECRET_KEY'] + + # print(ACCESS_KEY) + # print(SECRET_KEY) + diff --git a/dist/out-tsc/e2e/src/app.e2e-spec.js b/dist/out-tsc/e2e/src/app.e2e-spec.js new file mode 100644 index 000000000..d9a30e9db --- /dev/null +++ b/dist/out-tsc/e2e/src/app.e2e-spec.js @@ -0,0 +1,12 @@ +import { AppPage } from './app.po'; +describe('new App', function () { + var page; + beforeEach(function () { + page = new AppPage(); + }); + it('should be blank', function () { + page.navigateTo(); + expect(page.getParagraphText()).toContain('The world is your oyster.'); + }); +}); +//# sourceMappingURL=app.e2e-spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/e2e/src/app.e2e-spec.js.map b/dist/out-tsc/e2e/src/app.e2e-spec.js.map new file mode 100644 index 000000000..9cb1dc8d2 --- /dev/null +++ b/dist/out-tsc/e2e/src/app.e2e-spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app.e2e-spec.js","sourceRoot":"","sources":["../../../../e2e/src/app.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,QAAQ,CAAC,SAAS,EAAE;IAClB,IAAI,IAAa,CAAC;IAElB,UAAU,CAAC;QACT,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iBAAiB,EAAE;QACpB,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/e2e/src/app.po.js b/dist/out-tsc/e2e/src/app.po.js new file mode 100644 index 000000000..97ed7706c --- /dev/null +++ b/dist/out-tsc/e2e/src/app.po.js @@ -0,0 +1,14 @@ +import { browser, by, element } from 'protractor'; +var AppPage = /** @class */ (function () { + function AppPage() { + } + AppPage.prototype.navigateTo = function () { + return browser.get('/'); + }; + AppPage.prototype.getParagraphText = function () { + return element(by.deepCss('app-root ion-content')).getText(); + }; + return AppPage; +}()); +export { AppPage }; +//# sourceMappingURL=app.po.js.map \ No newline at end of file diff --git a/dist/out-tsc/e2e/src/app.po.js.map b/dist/out-tsc/e2e/src/app.po.js.map new file mode 100644 index 000000000..c3d08fea3 --- /dev/null +++ b/dist/out-tsc/e2e/src/app.po.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app.po.js","sourceRoot":"","sources":["../../../../e2e/src/app.po.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAElD;IAAA;IAQA,CAAC;IAPC,4BAAU,GAAV;QACE,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,kCAAgB,GAAhB;QACE,OAAO,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC/D,CAAC;IACH,cAAC;AAAD,CAAC,AARD,IAQC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/SimpleLoadingStrategy.js b/dist/out-tsc/src/app/SimpleLoadingStrategy.js new file mode 100644 index 000000000..f8f1d95b8 --- /dev/null +++ b/dist/out-tsc/src/app/SimpleLoadingStrategy.js @@ -0,0 +1,11 @@ +import { of } from 'rxjs'; +var SimpleLoadingStrategy = /** @class */ (function () { + function SimpleLoadingStrategy() { + } + SimpleLoadingStrategy.prototype.preload = function (route, load) { + return route.data && route.data.preload ? load() : of(null); + }; + return SimpleLoadingStrategy; +}()); +export { SimpleLoadingStrategy }; +//# sourceMappingURL=SimpleLoadingStrategy.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/SimpleLoadingStrategy.js.map b/dist/out-tsc/src/app/SimpleLoadingStrategy.js.map new file mode 100644 index 000000000..e67040b49 --- /dev/null +++ b/dist/out-tsc/src/app/SimpleLoadingStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SimpleLoadingStrategy.js","sourceRoot":"","sources":["../../../../src/app/SimpleLoadingStrategy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,EAAE,EAAE,MAAM,MAAM,CAAC;AAEtC;IAAA;IAIA,CAAC;IAHC,uCAAO,GAAP,UAAQ,KAAY,EAAE,IAAc;QAClC,OAAO,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IACH,4BAAC;AAAD,CAAC,AAJD,IAIC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/animations/modal_enter.js b/dist/out-tsc/src/app/animations/modal_enter.js new file mode 100644 index 000000000..5bfc175a2 --- /dev/null +++ b/dist/out-tsc/src/app/animations/modal_enter.js @@ -0,0 +1,19 @@ +export function myEnterAnimation(AnimationC, baseEl) { + var baseAnimation = new AnimationC(); + var backdropAnimation = new AnimationC(); + backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')); + var wrapperAnimation = new AnimationC(); + wrapperAnimation.addElement(baseEl.querySelector('.modal-wrapper')); + wrapperAnimation + .fromTo('transform', 'scaleX(0.1) scaleY(0.1)', 'translateX(0%) scaleX(1) scaleY(1)') + .fromTo('opacity', 0, 1); + backdropAnimation.fromTo('opacity', 0.01, 0.4); + return Promise.resolve(baseAnimation + .addElement(baseEl) + .easing('cubic-bezier(0.36,0.66,0.04,1)') + .duration(400) + .beforeAddClass('show-modal') + .add(backdropAnimation) + .add(wrapperAnimation)); +} +//# sourceMappingURL=modal_enter.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/animations/modal_enter.js.map b/dist/out-tsc/src/app/animations/modal_enter.js.map new file mode 100644 index 000000000..d0f20d495 --- /dev/null +++ b/dist/out-tsc/src/app/animations/modal_enter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modal_enter.js","sourceRoot":"","sources":["../../../../../src/app/animations/modal_enter.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,UAAqB,EAAE,MAAmB;IAEvE,IAAM,aAAa,GAAG,IAAI,UAAU,EAAE,CAAC;IAEvC,IAAM,iBAAiB,GAAG,IAAI,UAAU,EAAE,CAAC;IAC3C,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC;IAEnE,IAAM,gBAAgB,GAAG,IAAI,UAAU,EAAE,CAAC;IAC1C,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEpE,gBAAgB;SACX,MAAM,CAAC,WAAW,EAAE,yBAAyB,EAAE,oCAAoC,CAAC;SACpF,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7B,iBAAiB,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;IAE/C,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa;SAC/B,UAAU,CAAC,MAAM,CAAC;SAClB,MAAM,CAAC,gCAAgC,CAAC;SACxC,QAAQ,CAAC,GAAG,CAAC;SACb,cAAc,CAAC,YAAY,CAAC;SAC5B,GAAG,CAAC,iBAAiB,CAAC;SACtB,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEhC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/animations/modal_leave.js b/dist/out-tsc/src/app/animations/modal_leave.js new file mode 100644 index 000000000..c44909520 --- /dev/null +++ b/dist/out-tsc/src/app/animations/modal_leave.js @@ -0,0 +1,21 @@ +//see blog -- https://www.joshmorony.com/create-a-custom-modal-page-transition-animation-in-ionic/ +export function myLeaveAnimation(AnimationC, baseEl) { + var baseAnimation = new AnimationC(); + var backdropAnimation = new AnimationC(); + backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')); + var wrapperAnimation = new AnimationC(); + var wrapperEl = baseEl.querySelector('.modal-wrapper'); + wrapperAnimation.addElement(wrapperEl); + var wrapperElRect = wrapperEl.getBoundingClientRect(); + wrapperAnimation + .fromTo('transform', 'scaleX(1) scaleY(1)', 'scaleX(0.1) scaleY(0.1)') + .fromTo('opacity', 1, 0); + backdropAnimation.fromTo('opacity', 0.4, 0.0); + return Promise.resolve(baseAnimation + .addElement(baseEl) + .easing('ease-out') + .duration(400) + .add(backdropAnimation) + .add(wrapperAnimation)); +} +//# sourceMappingURL=modal_leave.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/animations/modal_leave.js.map b/dist/out-tsc/src/app/animations/modal_leave.js.map new file mode 100644 index 000000000..801b1d808 --- /dev/null +++ b/dist/out-tsc/src/app/animations/modal_leave.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modal_leave.js","sourceRoot":"","sources":["../../../../../src/app/animations/modal_leave.ts"],"names":[],"mappings":"AAGA,kGAAkG;AAElG,MAAM,UAAU,gBAAgB,CAAC,UAAqB,EAAE,MAAmB;IAEvE,IAAM,aAAa,GAAG,IAAI,UAAU,EAAE,CAAC;IAEvC,IAAM,iBAAiB,GAAG,IAAI,UAAU,EAAE,CAAC;IAC3C,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC;IAEnE,IAAM,gBAAgB,GAAG,IAAI,UAAU,EAAE,CAAC;IAC1C,IAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACzD,gBAAgB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACvC,IAAM,aAAa,GAAG,SAAU,CAAC,qBAAqB,EAAE,CAAC;IAEzD,gBAAgB;SACb,MAAM,CAAC,WAAW,EAAE,qBAAqB,EAAE,yBAAyB,CAAC;SACrE,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAE3B,iBAAiB,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAE9C,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa;SACjC,UAAU,CAAC,MAAM,CAAC;SAClB,MAAM,CAAC,UAAU,CAAC;SAClB,QAAQ,CAAC,GAAG,CAAC;SACb,GAAG,CAAC,iBAAiB,CAAC;SACtB,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAE9B,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/app-routing.module.js b/dist/out-tsc/src/app/app-routing.module.js new file mode 100644 index 000000000..ddce23cab --- /dev/null +++ b/dist/out-tsc/src/app/app-routing.module.js @@ -0,0 +1,143 @@ +import * as tslib_1 from "tslib"; +import { NgModule } from '@angular/core'; +import { PreloadAllModules, RouterModule } from '@angular/router'; +import { AwardMemesComponent } from './incentive/award-memes/award-memes.component'; +import { DemoAquariumComponent } from './incentive/aquarium/demo-aquarium/demo-aquarium.component'; +//import { SelectiveLoadingStrategy } from './SelectiveLoadingStrategy'; +//import { InitiatedDrinkComponent } from './survey/initiated-drink/initiated-drink.component'; +//import { AwardComponent } from './incentive/award/award.component'; +//import { ActivetaskComponent } from './survey/activetask/activetask.component'; +//import { ActiveTask2Component } from './survey/active-task2/active-task2.component'; +//import { VisualizationComponent } from './incentive/visualization/visualization.component'; +//import { DynamicSurveyComponent } from './survey/dynamic-survey/dynamic-survey.component'; +//import { Q1MotivatedComponent } from './incentive/life-insights/q1-motivated/q1-motivated.component'; +//import { SampleSurveyComponent } from './survey/sample-survey/sample-survey.component'; +import { SampleLifeInsightsComponent } from './incentive/life-insights/sample-life-insights/sample-life-insights.component'; +import { TreasurechestComponent } from './incentive/treasurechest/treasurechest.component'; +import { SampleSurveyComponent } from './survey/sample-survey/sample-survey.component'; +import { AwardAltruismComponent } from './incentive/award-altruism/award-altruism.component'; +import { CheatpageComponent } from './incentive/aquarium/cheatpage/cheatpage.component'; +import { AyaSampleSurveyComponent } from './survey/aya-sample-survey/aya-sample-survey.component'; +import { AuthGuard } from './user/auth/auth.guard'; +import { AuthComponent } from './user/auth/auth.component'; +import { InfoPageComponent } from './incentive/info-page/info-page.component'; +import { ContactComponent } from './home/contact/contact.component'; +import { FishbowlComponent } from './incentive/aquarium/previews/fishbowl/fishbowl.component'; +import { SeaComponent } from './incentive/aquarium/previews/sea/sea.component'; +import { TundraComponent } from './incentive/aquarium/previews/tundra/tundra.component'; +import { RainforestComponent } from './incentive/aquarium/previews/rainforest/rainforest.component'; +var routes = [ + /* + { path: '', redirectTo: 'home', pathMatch: 'full' }, + { path: 'home', loadChildren: './home/home.module#HomePageModule' }, + { path: 'survey/initated-drink', component: InitiatedDrinkComponent }, + { path: 'survey/activetask', component: ActivetaskComponent }, + { path: 'survey/activetask2', component: ActiveTask2Component }, + { path: 'survey/dynamicsurvey', component: DynamicSurveyComponent }, + { path: 'survey/samplesurvey', component: SampleSurveyComponent }, + { path: 'incentive/award', component: AwardComponent }, + { path: 'incentive/award-memes', component: AwardMemesComponent }, + { path: 'incentive/visualization', component: VisualizationComponent}, + { path: 'incentive/aquariumone', component: DemoAquariumComponent }, + { path: 'life-insight/q1lifeinsight', component: Q1MotivatedComponent }, + */ + { path: '', redirectTo: 'home', pathMatch: 'full', canActivate: [AuthGuard] }, + { path: 'auth', component: AuthComponent }, + { path: 'home', loadChildren: './home/home.module#HomePageModule', canActivate: [AuthGuard] }, + //{ path: 'home', component: DemoAquariumComponent, canActivate: [AuthGuard]}, + { path: 'incentive/sample-life-insight', component: SampleLifeInsightsComponent, canActivate: [AuthGuard] }, + { path: 'incentive/treasurechest', component: TreasurechestComponent, canActivate: [AuthGuard] }, + { path: 'incentive/cheatpoints', component: CheatpageComponent, canActivate: [AuthGuard] }, + { path: 'survey/samplesurvey', component: SampleSurveyComponent, canActivate: [AuthGuard] }, + { path: 'survey/samplesurvey2', component: AyaSampleSurveyComponent, canActivate: [AuthGuard] }, + { path: 'incentive/aquariumone', component: DemoAquariumComponent, canActivate: [AuthGuard] }, + { path: 'incentive/award-memes', component: AwardMemesComponent, canActivate: [AuthGuard] }, + { path: 'incentive/award-altruism', component: AwardAltruismComponent, canActivate: [AuthGuard] }, + { path: 'contact-study-staff', component: ContactComponent, canActivate: [AuthGuard] }, + { path: 'incentive/infopage', component: InfoPageComponent, canActivate: [AuthGuard] }, + { path: 'preview/fishbowl', component: FishbowlComponent, canActivate: [AuthGuard] }, + { path: 'preview/sea', component: SeaComponent, canActivate: [AuthGuard] }, + { path: 'preview/tundra', component: TundraComponent, canActivate: [AuthGuard] }, + { path: 'preview/rainforest', component: RainforestComponent, canActivate: [AuthGuard] } + //{ path: 'incentive/award-memes', component: AwardMemesComponent }, + //{ path: 'incentive/aquariumone', component: DemoAquariumComponent }, + /* + { + path: 'survey', + //loadChildren: () => import('./survey/survey.module').then(mod => mod.SurveyModule) + loadChildren: './survey/survey.module#SurveyModule', + data: { + //name: 'survey' + preload: false + } + }, + */ + /* + { + path: 'incentive/aquarium', + loadChildren: './incentive/aquarium/aquarium.module#AquariumModule', + data: { + //name: 'survey' + preload: true + } + }, + */ + /* + { + path: 'incentive', + loadChildren: './incentive/incentive.module#IncentiveModule', + data: { + //name: 'survey' + preload: true + } + } + */ + // { path: 'incentive/life-insights', + // loadChildren: './incentive/life-insights/life-insights.module#LifeInsightsModule', + // data: { + // //name: 'life-insights' + // preload: true + // } + // }, +]; +var AppRoutingModule = /** @class */ (function () { + /* + @NgModule({ + providers: [ + SimpleLoadingStrategy + //SelectiveLoadingStrategy + ], + imports: [ + //RouterModule.forRoot(routes) + RouterModule.forRoot(routes, { preloadingStrategy: SimpleLoadingStrategy }) + ], + exports: [RouterModule] + }) + */ + function AppRoutingModule() { + } + AppRoutingModule = tslib_1.__decorate([ + NgModule({ + imports: [ + RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) + ], + exports: [RouterModule] + }) + /* + @NgModule({ + providers: [ + SimpleLoadingStrategy + //SelectiveLoadingStrategy + ], + imports: [ + //RouterModule.forRoot(routes) + RouterModule.forRoot(routes, { preloadingStrategy: SimpleLoadingStrategy }) + ], + exports: [RouterModule] + }) + */ + ], AppRoutingModule); + return AppRoutingModule; +}()); +export { AppRoutingModule }; +//# sourceMappingURL=app-routing.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/app-routing.module.js.map b/dist/out-tsc/src/app/app-routing.module.js.map new file mode 100644 index 000000000..19624ca53 --- /dev/null +++ b/dist/out-tsc/src/app/app-routing.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app-routing.module.js","sourceRoot":"","sources":["../../../../src/app/app-routing.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAU,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,wEAAwE;AACxE,+FAA+F;AAC/F,qEAAqE;AACrE,iFAAiF;AACjF,sFAAsF;AACtF,6FAA6F;AAC7F,4FAA4F;AAC5F,uGAAuG;AACvG,yFAAyF;AACzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+EAA+E,CAAC;AAC5H,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAC;AACxF,O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E,qBAAqB,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC,EAAC;IACrF,EAAE,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC,EAAC;IACrF,EAAE,IAAI,EAAE,kBAAkB,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC,EAAC;IACnF,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC,EAAC;IACzE,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC,EAAC;IAC/E,EAAE,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,mBAAmB,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC,EAAC;IAEvF,oEAAoE;IACpE,wEAAwE;IACxE;;;;;;;;;;MAUE;IACF;;;;;;;;;MASE;IACD;;;;;;;;;KASC;IAEF,sCAAsC;IACtC,uFAAuF;IACvF,YAAY;IACZ,8BAA8B;IAC9B,oBAAoB;IACpB,OAAO;IACP,MAAM;CAGP,CAAC;AAuBF;IAbA;;;;;;;;;;;;MAYE;IACF;IAAgC,CAAC;IAApB,gBAAgB;QApB5B,QAAQ,CAAC;YACR,OAAO,EAAE;gBACP,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;aACxE;YACD,OAAO,EAAE,CAAC,YAAY,CAAC;SACxB,CAAC;QAEF;;;;;;;;;;;;UAYE;OACW,gBAAgB,CAAI;IAAD,uBAAC;CAAA,AAAjC,IAAiC;SAApB,gBAAgB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/app.component.js b/dist/out-tsc/src/app/app.component.js new file mode 100644 index 000000000..9d4bb1e1c --- /dev/null +++ b/dist/out-tsc/src/app/app.component.js @@ -0,0 +1,200 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { Platform } from '@ionic/angular'; +import { SplashScreen } from '@ionic-native/splash-screen/ngx'; +import { StatusBar } from '@ionic-native/status-bar/ngx'; +import { OneSignalService } from './notification/one-signal.service'; +import { Router, RouteConfigLoadStart, RouteConfigLoadEnd, NavigationStart, NavigationEnd } from '@angular/router'; +import { LoadingController } from '@ionic/angular'; +import { UserProfileService } from './user/user-profile/user-profile.service'; +import { AuthService } from './user/auth/auth.service'; +var AppComponent = /** @class */ (function () { + function AppComponent(router, platform, splashScreen, statusBar, oneSignalService, authService, userProfileService, loadingController) { + var _this = this; + this.router = router; + this.platform = platform; + this.splashScreen = splashScreen; + this.statusBar = statusBar; + this.oneSignalService = oneSignalService; + this.authService = authService; + this.userProfileService = userProfileService; + this.loadingController = loadingController; + this.isLoading = true; + this.agreeToTerms = JSON.parse(localStorage.getItem("agreeToTerms")); + this.initializeApp(); + router.events.subscribe(function (event) { + //this.isShowingRouteLoadIndicator = false; + var asyncLoadCount = 0; + if (event instanceof RouteConfigLoadStart) { + asyncLoadCount++; + console.log("Routing started"); + //console.log(event); + //this.survey_text = "Loading Survey"; + console.log(event.route.path); + // if(event.route.path == "survey") + // this.showLaoding(); + } + else if (event instanceof RouteConfigLoadEnd) { + asyncLoadCount--; + console.log("Routing ended"); + console.log(event.route.path); + // if(event.route.path == "survey") + // this.dismissLoading(); + //console.log(event); + //this.survey_text = "Start survey"; + //console.log(this.router.url); + } + else if (event instanceof NavigationStart) { + console.log("Navigation started"); + //this.survey_text = "Start survey"; + } + else if (event instanceof NavigationEnd) { + asyncLoadCount--; + console.log("Navigation ended"); + //this.survey_text = "Start survey"; + } + // If there is at least one pending asynchronous config load request, + // then let's show the loading indicator. + // -- + // CAUTION: I'm using CSS to include a small delay such that this loading + // indicator won't be seen by people with sufficiently fast connections. + _this.isShowingRouteLoadIndicator = !!asyncLoadCount; + }); + } + AppComponent.prototype.ngOnInit = function () { + }; + AppComponent.prototype.ngOnDestroy = function () { + if (this.userSub) { + this.userSub.unsubscribe(); + } + }; + AppComponent.prototype.initializeApp = function () { + var _this = this; + this.authService.autoLogin(); + if (this.authService.isLoggedIn()) { + this.showLoading(); + this.userSub = this.userProfileService.initializeObs().subscribe(function () { + _this.dismissLoading(); + _this.isLoading = false; + console.log("successfully logged in"); + }); + // this.userProfileService.initialize(); + // if we can for things to wait to progress in here + // then, we'll only need to load user profile here and at login in Auth component + } + else { + console.log("log in unsuccessful."); + this.dismissLoading(); + this.isLoading = false; + } + this.platform.ready().then(function () { + //this.statusBar.styleDefault(); + // let status bar overlay webview + //this.statusBar.overlaysWebView(true); + // set status bar to white + //this.statusBar.backgroundColorByHexString('#ffffff'); + if (_this.platform.is('android')) { + _this.statusBar.styleLightContent(); + _this.statusBar.backgroundColorByHexString("#004166"); + } + _this.splashScreen.hide(); + _this.oneSignalService.initOneSignal(); + }); + //window.localStorage.setItem("TotalPoints", "0"); + // let status bar overlay webview + //this.statusBar.overlaysWebView(true); + // set status bar to white + //this.statusBar.backgroundColorByHexString('#ffffff'); + }; + AppComponent.prototype.showLoading = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var _a; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, this.loadingController.create({ + message: "Loading...", + spinner: "lines", + duration: 5000 + })]; + case 1: + _a.loading = _b.sent(); + this.loading.onDidDismiss(function () { + console.log('Dismissed loading after 5 seconds'); + }); + this.loading.present(); + return [2 /*return*/]; + } + }); + }); + }; + AppComponent.prototype.dismissLoading = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + this.loading.dismiss(); + return [2 /*return*/]; + }); + }); + }; + AppComponent.prototype.presentLoading = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var loading, _a, role, data; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, this.loadingController.create({ + message: 'Hellooo', + duration: 2000 + })]; + case 1: + loading = _b.sent(); + return [4 /*yield*/, loading.present()]; + case 2: + _b.sent(); + return [4 /*yield*/, loading.onDidDismiss()]; + case 3: + _a = _b.sent(), role = _a.role, data = _a.data; + console.log('Loading dismissed!'); + return [2 /*return*/]; + } + }); + }); + }; + AppComponent.prototype.presentLoadingWithOptions = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var loading; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.loadingController.create({ + spinner: null, + duration: 5000, + message: 'Please wait...', + translucent: true, + cssClass: 'custom-class custom-loading' + })]; + case 1: + loading = _a.sent(); + return [4 /*yield*/, loading.present()]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + AppComponent = tslib_1.__decorate([ + Component({ + selector: 'app-root', + templateUrl: 'app.component.html' + }), + tslib_1.__metadata("design:paramtypes", [Router, + Platform, + SplashScreen, + StatusBar, + OneSignalService, + AuthService, + UserProfileService, + LoadingController]) + ], AppComponent); + return AppComponent; +}()); +export { AppComponent }; +//# sourceMappingURL=app.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/app.component.js.map b/dist/out-tsc/src/app/app.component.js.map new file mode 100644 index 000000000..f74273373 --- /dev/null +++ b/dist/out-tsc/src/app/app.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app.component.js","sourceRoot":"","sources":["../../../../src/app/app.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAGrE,OAAO,EAAE,MAAM,EAAe,oBAAoB,EAAE,kBAAkB,EAAE,eAAe,E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AAE,SAAS;4BAClB,QAAQ,EAAE,IAAI;yBACf,CAAC,EAAA;;wBAHI,OAAO,GAAG,SAGd;wBACF,qBAAM,OAAO,CAAC,OAAO,EAAE,EAAA;;wBAAvB,SAAuB,CAAC;wBAED,qBAAM,OAAO,CAAC,YAAY,EAAE,EAAA;;wBAA7C,KAAiB,SAA4B,EAA3C,IAAI,UAAA,EAAE,IAAI,UAAA;wBAElB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;;;;;KACnC;IAEK,gDAAyB,GAA/B;;;;;4BACkB,qBAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;4BAClD,OAAO,EAAE,IAAI;4BACb,QAAQ,EAAE,IAAI;4BACd,OAAO,EAAE,gBAAgB;4BACzB,WAAW,EAAE,IAAI;4BACjB,QAAQ,EAAE,6BAA6B;yBACxC,CAAC,EAAA;;wBANI,OAAO,GAAG,SAMd;wBACK,qBAAM,OAAO,CAAC,OAAO,EAAE,EAAA;4BAA9B,sBAAO,SAAuB,EAAC;;;;KAChC;IApKU,YAAY;QAJxB,SAAS,CAAC;YACT,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,oBAAoB;SAClC,CAAC;iDAOkB,MAAM;YACJ,QAAQ;YACJ,YAAY;YACf,SAAS;YACF,gBAAgB;YACrB,WAAW;YACJ,kBAAkB;YACpB,iBAAiB;OAblC,YAAY,CAsKxB;IAAD,mBAAC;CAAA,AAtKD,IAsKC;SAtKY,YAAY"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/app.component.spec.js b/dist/out-tsc/src/app/app.component.spec.js new file mode 100644 index 000000000..e0829fcf3 --- /dev/null +++ b/dist/out-tsc/src/app/app.component.spec.js @@ -0,0 +1,48 @@ +var _this = this; +import * as tslib_1 from "tslib"; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { TestBed, async } from '@angular/core/testing'; +import { Platform } from '@ionic/angular'; +import { SplashScreen } from '@ionic-native/splash-screen/ngx'; +import { StatusBar } from '@ionic-native/status-bar/ngx'; +import { AppComponent } from './app.component'; +describe('AppComponent', function () { + var statusBarSpy, splashScreenSpy, platformReadySpy, platformSpy; + beforeEach(async(function () { + statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']); + splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']); + platformReadySpy = Promise.resolve(); + platformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy }); + TestBed.configureTestingModule({ + declarations: [AppComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + providers: [ + { provide: StatusBar, useValue: statusBarSpy }, + { provide: SplashScreen, useValue: splashScreenSpy }, + { provide: Platform, useValue: platformSpy }, + ], + }).compileComponents(); + })); + it('should create the app', function () { + var fixture = TestBed.createComponent(AppComponent); + var app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + }); + it('should initialize the app', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: + TestBed.createComponent(AppComponent); + expect(platformSpy.ready).toHaveBeenCalled(); + return [4 /*yield*/, platformReadySpy]; + case 1: + _a.sent(); + expect(statusBarSpy.styleDefault).toHaveBeenCalled(); + expect(splashScreenSpy.hide).toHaveBeenCalled(); + return [2 /*return*/]; + } + }); + }); }); + // TODO: add more tests! +}); +//# sourceMappingURL=app.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/app.component.spec.js.map b/dist/out-tsc/src/app/app.component.spec.js.map new file mode 100644 index 000000000..3bdb9ca6b --- /dev/null +++ b/dist/out-tsc/src/app/app.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app.component.spec.js","sourceRoot":"","sources":["../../../../src/app/app.component.spec.ts"],"names":[],"mappings":"AAAA,iBA+CA;;AA/CA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAA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,UAAU,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE;;;;oBAC9B,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;oBACtC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,gBAAgB,EAAE,CAAC;oBAC7C,qBAAM,gBAAgB,EAAA;;oBAAtB,SAAsB,CAAC;oBACvB,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,gBAAgB,EAAE,CAAC;oBACrD,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;;;;SACjD,CAAC,CAAC;IAEH,wBAAwB;AAE1B,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/app.module.js b/dist/out-tsc/src/app/app.module.js new file mode 100644 index 000000000..eacda955e --- /dev/null +++ b/dist/out-tsc/src/app/app.module.js @@ -0,0 +1,86 @@ +import * as tslib_1 from "tslib"; +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { RouteReuseStrategy } from '@angular/router'; +import { HttpClientModule } from '@angular/common/http'; +import { BlobModule } from 'angular-azure-blob-service'; +import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; +import { SplashScreen } from '@ionic-native/splash-screen/ngx'; +import { StatusBar } from '@ionic-native/status-bar/ngx'; +import { OneSignal } from '@ionic-native/onesignal/ngx'; +import { Injector } from '@angular/core'; +import { SQLitePorter } from '@ionic-native/sqlite-porter/ngx'; +import { SQLite } from '@ionic-native/sqlite/ngx'; +import { AppComponent } from './app.component'; +import { AppRoutingModule } from './app-routing.module'; +import { NotificationModule } from './notification/notification.module'; +import { IncentiveModule } from './incentive/incentive.module'; +import { LifeInsightsModule } from './incentive/life-insights/life-insights.module'; +import { SurveyModule } from './survey/survey.module'; +import { AquariumModule } from './incentive/aquarium/aquarium.module'; +import { FormsModule } from '@angular/forms'; +import { CheatpageComponent } from './incentive/aquarium/cheatpage/cheatpage.component'; +import { UserModule } from './user/user.module'; +import { HomePageModule } from './home/home.module'; +import { AwardDollarService } from './incentive/award-money/award-dollar.service'; +import { AppVersion } from '@ionic-native/app-version/ngx'; +import { StoreModule } from '@ngrx/store'; +import { reducers, metaReducers } from './reducers'; +import { StoreDevtoolsModule } from '@ngrx/store-devtools'; +import { environment } from '../environments/environment'; +import { EffectsModule } from '@ngrx/effects'; +var AppModule = /** @class */ (function () { + function AppModule(injector) { + this.injector = injector; + AppModule_1.injector = injector; + } + AppModule_1 = AppModule; + var AppModule_1; + AppModule = AppModule_1 = tslib_1.__decorate([ + NgModule({ + declarations: [AppComponent, CheatpageComponent], + entryComponents: [CheatpageComponent], + imports: [ + BrowserModule, + IonicModule.forRoot(), + AppRoutingModule, + SurveyModule, + IncentiveModule, + LifeInsightsModule, + NotificationModule, + HttpClientModule, + AquariumModule, + FormsModule, + UserModule, + HomePageModule, + BlobModule.forRoot(), + //this ngrx import + StoreModule.forRoot(reducers, { + metaReducers: metaReducers, + runtimeChecks: { + strictStateImmutability: true, + strictActionImmutability: true + } + }), + //dev tool maxAge 25 versions of the data + StoreDevtoolsModule.instrument({ maxAge: 25, logOnly: environment.production }), + EffectsModule.forRoot([]) + ], + providers: [ + StatusBar, + SplashScreen, + OneSignal, + AwardDollarService, + AppVersion, + SQLite, + SQLitePorter, + { provide: RouteReuseStrategy, useClass: IonicRouteStrategy } + ], + bootstrap: [AppComponent] + }), + tslib_1.__metadata("design:paramtypes", [Injector]) + ], AppModule); + return AppModule; +}()); +export { AppModule }; +//# sourceMappingURL=app.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/app.module.js.map b/dist/out-tsc/src/app/app.module.js.map new file mode 100644 index 000000000..fbab86468 --- /dev/null +++ b/dist/out-tsc/src/app/app.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../src/app/app.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,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ACN,YAAY;gBACZ,EAAE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAC;aAC7D;YACD,SAAS,EAAE,CAAC,YAAY,CAAC;SAC1B,CAAC;iDAI8B,QAAQ;OAF3B,SAAS,CAKrB;IAAD,gBAAC;CAAA,AALD,IAKC;SALY,SAAS"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/contact/contact.component.js b/dist/out-tsc/src/app/home/contact/contact.component.js new file mode 100644 index 000000000..5dc1b0ab1 --- /dev/null +++ b/dist/out-tsc/src/app/home/contact/contact.component.js @@ -0,0 +1,22 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { MenuController } from '@ionic/angular'; +var ContactComponent = /** @class */ (function () { + function ContactComponent(menuCtrl) { + this.menuCtrl = menuCtrl; + } + ContactComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + ContactComponent = tslib_1.__decorate([ + Component({ + selector: 'app-contact', + templateUrl: './contact.component.html', + styleUrls: ['./contact.component.css'] + }), + tslib_1.__metadata("design:paramtypes", [MenuController]) + ], ContactComponent); + return ContactComponent; +}()); +export { ContactComponent }; +//# sourceMappingURL=contact.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/contact/contact.component.js.map b/dist/out-tsc/src/app/home/contact/contact.component.js.map new file mode 100644 index 000000000..913db525e --- /dev/null +++ b/dist/out-tsc/src/app/home/contact/contact.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"contact.component.js","sourceRoot":"","sources":["../../../../../../src/app/home/contact/contact.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOhD;IAEE,0BAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAI,CAAC;IAEhD,mCAAQ,GAAR;QACE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IANU,gBAAgB;QAL5B,SAAS,CAAC;YACT,QAAQ,EAAE,aAAa;YACvB,WAAW,EAAE,0BAA0B;YACvC,SAAS,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC;iDAG6B,cAAc;OAFhC,gBAAgB,CAQ5B;IAAD,uBAAC;CAAA,AARD,IAQC;SARY,gBAAgB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/contact/contact.component.spec.js b/dist/out-tsc/src/app/home/contact/contact.component.spec.js new file mode 100644 index 000000000..ee55c5726 --- /dev/null +++ b/dist/out-tsc/src/app/home/contact/contact.component.spec.js @@ -0,0 +1,21 @@ +import { async, TestBed } from '@angular/core/testing'; +import { ContactComponent } from './contact.component'; +describe('ContactComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [ContactComponent] + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(ContactComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=contact.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/contact/contact.component.spec.js.map b/dist/out-tsc/src/app/home/contact/contact.component.spec.js.map new file mode 100644 index 000000000..0fae8e48a --- /dev/null +++ b/dist/out-tsc/src/app/home/contact/contact.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"contact.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/home/contact/contact.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,QAAQ,CAAC,kBAAkB,EAAE;IAC3B,IAAI,SAA2B,CAAC;IAChC,IAAI,OAA2C,CAAC;IAEhD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,gBAAgB,CAAE;SACnC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;QACpD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/header/header.component.js b/dist/out-tsc/src/app/home/header/header.component.js new file mode 100644 index 000000000..871dd9d30 --- /dev/null +++ b/dist/out-tsc/src/app/home/header/header.component.js @@ -0,0 +1,50 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { AuthService } from 'src/app/user/auth/auth.service'; +import { Router } from '@angular/router'; +var HeaderComponent = /** @class */ (function () { + function HeaderComponent(authService, router) { + this.authService = authService; + this.router = router; + this.isAuthenticated = false; + this.collapsed = true; + } + // onTestButtonClicked(){ + // this.userProfileService.initialize(); + // this.userProfileService.saveToServer(); + // } + HeaderComponent.prototype.onLogout = function () { + this.authService.logout(); + this.router.navigate(['/auth']); + }; + HeaderComponent.prototype.ngOnInit = function () { + var _this = this; + this.userSub = this.authService.loggedInUser.subscribe(function (loggedInUser) { + _this.isAuthenticated = _this.authService.isLoggedIn(); + console.log(!loggedInUser); + }); + this.authService.autoLogin(); + }; + HeaderComponent.prototype.ngOnDestroy = function () { + this.userSub.unsubscribe(); + }; + Object.defineProperty(HeaderComponent.prototype, "userName", { + get: function () { + return this.authService.loggedInUser.getValue(); + }, + enumerable: true, + configurable: true + }); + HeaderComponent = tslib_1.__decorate([ + Component({ + selector: 'app-header', + templateUrl: './header.component.html', + styleUrls: ['./header.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", [AuthService, + Router]) + ], HeaderComponent); + return HeaderComponent; +}()); +export { HeaderComponent }; +//# sourceMappingURL=header.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/header/header.component.js.map b/dist/out-tsc/src/app/home/header/header.component.js.map new file mode 100644 index 000000000..83645c54a --- /dev/null +++ b/dist/out-tsc/src/app/home/header/header.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.component.js","sourceRoot":"","sources":["../../../../../../src/app/home/header/header.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAOzC;IAKE,yBAAoB,WAAwB,EACxB,MAAc;QADd,gBAAW,GAAX,WAAW,CAAa;QACxB,WAAM,GAAN,MAAM,CAAQ;QALlC,oBAAe,GAAG,KAAK,CAAC;QAExB,cAAS,GAAG,IAAI,CAAC;IAGqB,CAAC;IAGvC,yBAAyB;IACzB,0CAA0C;IAC1C,4CAA4C;IAC5C,MAAM;IAEJ,kCAAQ,GAAR;QACE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,kCAAQ,GAAR;QAAA,iBAMC;QALC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,UAAA,YAAY;YACjE,KAAI,CAAC,eAAe,GAAG,KAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;YACrD,OAAO,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;IAC/B,CAAC;IAED,qCAAW,GAAX;QACE,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;IAED,sBAAI,qCAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAClD,CAAC;;;OAAA;IAjCQ,eAAe;QAL3B,SAAS,CAAC;YACT,QAAQ,EAAE,YAAY;YACtB,WAAW,EAAE,yBAAyB;YACtC,SAAS,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC;iDAMiC,WAAW;YAChB,MAAM;OANvB,eAAe,CAkC3B;IAAD,sBAAC;CAAA,AAlCD,IAkCC;SAlCY,eAAe"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/home-routing.module.js b/dist/out-tsc/src/app/home/home-routing.module.js new file mode 100644 index 000000000..9e0467338 --- /dev/null +++ b/dist/out-tsc/src/app/home/home-routing.module.js @@ -0,0 +1,56 @@ +import * as tslib_1 from "tslib"; +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { HomePage } from './home.page'; +import { AquariumComponent } from '../incentive/aquarium/aquarium.component'; +import { TreasurechestComponent } from '../incentive/treasurechest/treasurechest.component'; +import { UnlockedMemesComponent } from '../incentive/unlocked-memes/unlocked-memes.component'; +import { UnlockedAltuisticMessagesComponent } from '../incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component'; +import { AuthGuard } from '../user/auth/auth.guard'; +import { ContactComponent } from './contact/contact.component'; +var routes = [ + { + path: 'home', + component: HomePage, + children: [ + { + path: 'incentive', component: AquariumComponent, canActivate: [AuthGuard] + }, + { + path: 'unlocables', component: TreasurechestComponent, canActivate: [AuthGuard] + }, + { + path: 'memes', component: UnlockedMemesComponent, canActivate: [AuthGuard] + }, + { + path: 'thankyous', component: UnlockedAltuisticMessagesComponent, canActivate: [AuthGuard] + }, + { + path: 'contact', component: ContactComponent, canActivate: [AuthGuard] + }, + { + path: '', + redirectTo: '/home/incentive', + pathMatch: 'full' + } + ] + }, + { + path: '', + redirectTo: '/home/incentive', + pathMatch: 'full' + } +]; +var HomeRoutingModule = /** @class */ (function () { + function HomeRoutingModule() { + } + HomeRoutingModule = tslib_1.__decorate([ + NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] + }) + ], HomeRoutingModule); + return HomeRoutingModule; +}()); +export { HomeRoutingModule }; +//# sourceMappingURL=home-routing.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/home-routing.module.js.map b/dist/out-tsc/src/app/home/home-routing.module.js.map new file mode 100644 index 000000000..0a375a73e --- /dev/null +++ b/dist/out-tsc/src/app/home/home-routing.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"home-routing.module.js","sourceRoot":"","sources":["../../../../../src/app/home/home-routing.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAU,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAC;AACpI,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,IAAM,MAAM,GAAW;IACrB;QACE,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC;aAC1E;YACD;gBACE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC;aAChF;YACD;gBACE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC;aAC3E;YACD;gBACE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,kCAAkC,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC;aAC3F;YACD;gBACE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC;aACvE;YACD;gBACE,IAAI,EAAE,EAAE;gBACR,UAAU,EAAE,iBAAiB;gBAC7B,SAAS,EAAE,MAAM;aAClB;SACF;KACF;IACD;QACE,IAAI,EAAE,EAAE;QACR,UAAU,EAAE,iBAAiB;QAC7B,SAAS,EAAE,MAAM;KAClB;CACF,CAAC;AAMF;IAAA;IAAgC,CAAC;IAApB,iBAAiB;QAJ7B,QAAQ,CAAC;YACR,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACxC,OAAO,EAAE,CAAC,YAAY,CAAC;SACxB,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAA,AAAjC,IAAiC;SAApB,iBAAiB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/home.module.js b/dist/out-tsc/src/app/home/home.module.js new file mode 100644 index 000000000..be5b05946 --- /dev/null +++ b/dist/out-tsc/src/app/home/home.module.js @@ -0,0 +1,39 @@ +import * as tslib_1 from "tslib"; +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; +import { FormsModule } from '@angular/forms'; +import { RouterModule } from '@angular/router'; +import { HomePage } from './home.page'; +import { AquariumModule } from '../incentive/aquarium/aquarium.module'; +import { HeaderComponent } from './header/header.component'; +import { TermsOfServiceComponent } from './terms-of-service/terms-of-service.component'; +import { HomeRoutingModule } from './home-routing.module'; +import { ContactComponent } from './contact/contact.component'; +var HomePageModule = /** @class */ (function () { + function HomePageModule() { + } + HomePageModule = tslib_1.__decorate([ + NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + AquariumModule, + HomeRoutingModule, + RouterModule.forChild([ + { + path: '', + component: HomePage + } + ]) + ], + declarations: [HomePage, HeaderComponent, TermsOfServiceComponent, ContactComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + exports: [TermsOfServiceComponent] + }) + ], HomePageModule); + return HomePageModule; +}()); +export { HomePageModule }; +//# sourceMappingURL=home.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/home.module.js.map b/dist/out-tsc/src/app/home/home.module.js.map new file mode 100644 index 000000000..19ce1f3fa --- /dev/null +++ b/dist/out-tsc/src/app/home/home.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"home.module.js","sourceRoot":"","sources":["../../../../../src/app/home/home.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAoB/D;IAAA;IAA6B,CAAC;IAAjB,cAAc;QAlB1B,QAAQ,CAAC;YACR,OAAO,EAAE;gBACP,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,cAAc;gBACd,iBAAiB;gBACjB,YAAY,CAAC,QAAQ,CAAC;oBACpB;wBACE,IAAI,EAAE,EAAE;wBACR,SAAS,EAAE,QAAQ;qBACpB;iBACF,CAAC;aACH;YACD,YAAY,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,uBAAuB,EAAE,gBAAgB,CAAC;YACpF,OAAO,EAAE,CAAC,sBAAsB,CAAC;YACjC,OAAO,EAAC,CAAC,uBAAuB,CAAC;SAClC,CAAC;OACW,cAAc,CAAG;IAAD,qBAAC;CAAA,AAA9B,IAA8B;SAAjB,cAAc"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/home.page.js b/dist/out-tsc/src/app/home/home.page.js new file mode 100644 index 000000000..c0797bd63 --- /dev/null +++ b/dist/out-tsc/src/app/home/home.page.js @@ -0,0 +1,31 @@ +import * as tslib_1 from "tslib"; +import { Component, ViewChild } from '@angular/core'; +import { AquariumComponent } from '../incentive/aquarium/aquarium.component'; +var HomePage = /** @class */ (function () { + function HomePage() { + } + HomePage.prototype.ngOnInit = function () { + }; + HomePage.prototype.ionViewDidEnter = function () { + console.log("ionViewDidEnterFunction"); + //this.child.ionViewDidEnterFunction(); + }; + HomePage.prototype.ionViewDidLeave = function () { + console.log("ionViewDidLeaveFunction"); + //this.child.ionViewDidLeaveFunction(); + }; + tslib_1.__decorate([ + ViewChild(AquariumComponent, { static: true }), + tslib_1.__metadata("design:type", Object) + ], HomePage.prototype, "child", void 0); + HomePage = tslib_1.__decorate([ + Component({ + selector: 'app-home', + templateUrl: 'home.page.html', + styleUrls: ['home.page.scss'], + }) + ], HomePage); + return HomePage; +}()); +export { HomePage }; +//# sourceMappingURL=home.page.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/home.page.js.map b/dist/out-tsc/src/app/home/home.page.js.map new file mode 100644 index 000000000..5b42dfe2d --- /dev/null +++ b/dist/out-tsc/src/app/home/home.page.js.map @@ -0,0 +1 @@ +{"version":3,"file":"home.page.js","sourceRoot":"","sources":["../../../../../src/app/home/home.page.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,SAAS,EAAC,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAS7E;IAAA;IAkBA,CAAC;IAdC,2BAAQ,GAAR;IACA,CAAC;IAED,kCAAe,GAAf;QACE,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACvC,uCAAuC;IACzC,CAAC;IAGD,kCAAe,GAAf;QACE,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACvC,uCAAuC;IACzC,CAAC;IAd6C;QAA7C,SAAS,CAAC,iBAAiB,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC;;2CAAO;IAFzC,QAAQ;QANpB,SAAS,CAAC;YACT,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,gBAAgB;YAC7B,SAAS,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OAEW,QAAQ,CAkBpB;IAAD,eAAC;CAAA,AAlBD,IAkBC;SAlBY,QAAQ"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/home.page.spec.js b/dist/out-tsc/src/app/home/home.page.spec.js new file mode 100644 index 000000000..96961c537 --- /dev/null +++ b/dist/out-tsc/src/app/home/home.page.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { HomePage } from './home.page'; +describe('HomePage', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [HomePage], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(HomePage); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=home.page.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/home.page.spec.js.map b/dist/out-tsc/src/app/home/home.page.spec.js.map new file mode 100644 index 000000000..d031ca522 --- /dev/null +++ b/dist/out-tsc/src/app/home/home.page.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"home.page.spec.js","sourceRoot":"","sources":["../../../../../src/app/home/home.page.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,QAAQ,CAAC,UAAU,EAAE;IACnB,IAAI,SAAmB,CAAC;IACxB,IAAI,OAAmC,CAAC;IAExC,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,QAAQ,CAAE;YAC1B,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACC,iBAAiB,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC5C,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.js b/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.js new file mode 100644 index 000000000..cf6925cab --- /dev/null +++ b/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.js @@ -0,0 +1,24 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +// import { Router } from '@angular/router'; +var TermsOfServiceComponent = /** @class */ (function () { + function TermsOfServiceComponent() { + this.agreeToTerms = JSON.parse(localStorage.getItem("agreeToTerms")); + } + TermsOfServiceComponent.prototype.ngOnInit = function () { }; + TermsOfServiceComponent.prototype.onSubmit = function () { + localStorage.setItem("agreeToTerms", this.agreeToTerms.toString()); + location.reload(); + }; + TermsOfServiceComponent = tslib_1.__decorate([ + Component({ + selector: 'app-terms-of-service', + templateUrl: './terms-of-service.component.html', + styleUrls: ['./terms-of-service.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", []) + ], TermsOfServiceComponent); + return TermsOfServiceComponent; +}()); +export { TermsOfServiceComponent }; +//# sourceMappingURL=terms-of-service.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.js.map b/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.js.map new file mode 100644 index 000000000..ae58f5d8f --- /dev/null +++ b/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"terms-of-service.component.js","sourceRoot":"","sources":["../../../../../../src/app/home/terms-of-service/terms-of-service.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,4CAA4C;AAO5C;IAGE;QAFA,iBAAY,GAAY,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;IAEzD,CAAC;IAEjB,0CAAQ,GAAR,cAAY,CAAC;IAEb,0CAAQ,GAAR;QACE,YAAY,CAAC,OAAO,CAAC,cAAc,EAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;QAClE,QAAQ,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC;IAVU,uBAAuB;QALnC,SAAS,CAAC;YACT,QAAQ,EAAE,sBAAsB;YAChC,WAAW,EAAE,mCAAmC;YAChD,SAAS,EAAE,CAAC,mCAAmC,CAAC;SACjD,CAAC;;OACW,uBAAuB,CAWnC;IAAD,8BAAC;CAAA,AAXD,IAWC;SAXY,uBAAuB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.spec.js b/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.spec.js new file mode 100644 index 000000000..b676be330 --- /dev/null +++ b/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { TermsOfServiceComponent } from './terms-of-service.component'; +describe('TermsOfServiceComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [TermsOfServiceComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(TermsOfServiceComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=terms-of-service.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.spec.js.map b/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.spec.js.map new file mode 100644 index 000000000..779856d7e --- /dev/null +++ b/dist/out-tsc/src/app/home/terms-of-service/terms-of-service.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"terms-of-service.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/home/terms-of-service/terms-of-service.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,QAAQ,CAAC,yBAAyB,EAAE;IAClC,IAAI,SAAkC,CAAC;IACvC,IAAI,OAAkD,CAAC;IAEvD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,uBAAuB,CAAE;YACzC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;QAC3D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/action-types.js b/dist/out-tsc/src/app/incentive/action-types.js new file mode 100644 index 000000000..94b4a70f3 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/action-types.js @@ -0,0 +1,3 @@ +import * as IncentiveActions from './incentive.actions'; +export { IncentiveActions }; +//# sourceMappingURL=action-types.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/action-types.js.map b/dist/out-tsc/src/app/incentive/action-types.js.map new file mode 100644 index 000000000..ce33391aa --- /dev/null +++ b/dist/out-tsc/src/app/incentive/action-types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"action-types.js","sourceRoot":"","sources":["../../../../../src/app/incentive/action-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAC,gBAAgB,EAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.js b/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.js new file mode 100644 index 000000000..37d7bd2fb --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.js @@ -0,0 +1,373 @@ +import * as tslib_1 from "tslib"; +import { Component, ViewChild } from '@angular/core'; +import { DemoAquariumComponent } from '../../incentive/aquarium/demo-aquarium/demo-aquarium.component'; +import { Platform, AlertController, ModalController, NavController, MenuController } from '@ionic/angular'; +import * as moment from 'moment'; +import { Router, ActivatedRoute } from '@angular/router'; +import { UserProfileService } from '../../user/user-profile/user-profile.service'; +import { myEnterAnimation } from '../../animations/modal_enter'; +import { ModalUnlockedPageComponent } from '../../incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component'; +import { myLeaveAnimation } from '../../animations/modal_leave'; +import { Store, select } from '@ngrx/store'; +import { isIncentivesUnlockedForTheDay } from '../../incentive/incentive.selectors'; +import { unlockedScreenShownAlready } from '../incentive.actions'; +var AquariumComponent = /** @class */ (function () { + function AquariumComponent(platform, alertCtrl, router, route, modalController, store, navController, menu, userProfileService) { + var _this = this; + this.platform = platform; + this.alertCtrl = alertCtrl; + this.router = router; + this.route = route; + this.modalController = modalController; + this.store = store; + this.navController = navController; + this.menu = menu; + this.userProfileService = userProfileService; + this.money = 0; + this.modalObjectNavigationExtras = {}; + this.title = ""; + this.isIOS = false; + console.log("Constructor called"); + this.sub1$ = this.platform.pause.subscribe(function () { + console.log('****UserdashboardPage PAUSED****'); + _this.child.pauseGameRendering(); + }); + this.sub2$ = this.platform.resume.subscribe(function () { + console.log('****UserdashboardPage RESUMED****'); + _this.child.resumeGameRendering(); + }); + if (window.localStorage['AwardDollar'] == undefined) + this.money = 0; + else { + try { + this.money = parseInt(window.localStorage['AwardDollar']); + } + catch (error) { + window.localStorage.setItem("AwardDollar", "" + 0); + this.money = 0; + } + } + if (this.platform.is('ios')) { + this.isIOS = true; + } + this.sideMenu(); + } + Object.defineProperty(AquariumComponent.prototype, "isActive", { + get: function () { + //return false; + if (this.userProfileService == undefined) + return true; + else + return this.userProfileService.isActive; + }, + enumerable: true, + configurable: true + }); + AquariumComponent.prototype.startCheatPage = function () { + //this.router.navigate(['incentive/tundra']); + this.navController.navigateRoot(['incentive/cheatpoints']); + }; + AquariumComponent.prototype.startInfoPage = function () { + this.navController.navigateRoot(['incentive/infopage']); + }; + AquariumComponent.prototype.sideMenu = function () { + this.navigate = + [ + { + title: "Home", + url: "/home", + icon: "home" + }, + { + title: "Chat", + url: "/chat", + icon: "chatboxes" + }, + { + title: "Contacts", + url: "/contacts", + icon: "contacts" + }, + ]; + }; + //show side menu + AquariumComponent.prototype.showSideMenu = function () { + console.log("side menu called"); + this.menu.enable(true, 'first'); + this.menu.open('first'); + }; + AquariumComponent.prototype.ionViewDidLeaveFunction = function () { + this.child.ionViewDidLeaveFunction(); + //unsubscribe from model view. + this.modalDataSubscription$.unsubscribe(); + }; + AquariumComponent.prototype.ionViewDidLeave = function () { + console.log("ionDidLeave"); + this.ionViewDidLeaveFunction(); + }; + AquariumComponent.prototype.ionViewDidEnter = function () { + console.log("ionViewDidEnter"); + this.child.loadFunction(); + //decide if we want to show the modal view with unlockables. + this.subscribeForModalView(); + }; + AquariumComponent.prototype.ionViewWillUnload = function () { + }; + AquariumComponent.prototype.ngOnInit = function () { + /* + this.route.queryParams.subscribe(params => { + if (this.router.getCurrentNavigation().extras.state) { + //throw new Error("Method not implemented."); + //show modal on awards + this.modalObjectNavigationExtras = this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras; + console.log("home.page.ts --- modalObjectNavigationExtras: " + JSON.stringify(this.modalObjectNavigationExtras)); + if(this.modalObjectNavigationExtras['IsModalShownYet'] == false) + this.showModal(); + + + //this.date = this.router.getCurrentNavigation().extras.state.date; + //this.reinforcementObj['prob'] = this.router.getCurrentNavigation().extras.state.prob; + //this.reinforcement_data = this.router.getCurrentNavigation().extras.state.reinforcement_data; + //console.log("Inside AwardAltruism, date is: " +this.date+" prob is: "+this.reinforcementObj['prob']); + } + }); + */ + this.title = "ADAPTS"; + console.log("aquarium.component.ts --- start"); + //this.menu.enable(true); + }; + AquariumComponent.prototype.ngOnDestroy = function () { + this.sub1$.unsubscribe(); + this.sub2$.unsubscribe(); + this.ionViewDidLeaveFunction(); + console.log("aquarium.component.ts --- destroy"); + }; + AquariumComponent.prototype.subscribeForModalView = function () { + var _this = this; + //this.unlockedItems$ = + this.modalDataSubscription$ = this.store.pipe(select(isIncentivesUnlockedForTheDay)) + .subscribe(function (params) { + if (params == undefined) + console.log("---params: undefined---" + JSON.stringify(params)); + else { + console.log("---params: ---" + JSON.stringify(params)); + var unlockedIncentive = params; + //computeUnlockedReinforcements(currentPoints, previousPoints, awardedDollar) + if (unlockedIncentive["isUnlockedViewShown"] == false) + _this.computeUnlockedReinforcements(unlockedIncentive["current_point"], unlockedIncentive["current_point"] - unlockedIncentive["unlocked_points"], unlockedIncentive["unlocked_money"]); + } + }); + }; + AquariumComponent.prototype.startSurvey = function () { + console.log('start survey'); + var currentTime = moment(); + var startTime = moment({ hour: 18 }); // 6pm + var endTime = moment({ hour: 23, minute: 59 }); // 11:59pm + if (!currentTime.isBetween(startTime, endTime)) { + this.presentAlert('Please come back between 6 PM and midnight'); + } + else if (this.userProfileService.surveyTakenForCurrentDay()) { + this.presentAlert('You have already completed the survey for the day.'); + } + else { + if (this.userProfileService.isParent) { + this.navController.navigateRoot(['survey/samplesurvey']); //caregiversurvey + } + else { + this.navController.navigateRoot(['survey/samplesurvey2']); //aya + } + } + }; + AquariumComponent.prototype.openSurvey = function (location) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + this.navController.navigateRoot([location]); + return [2 /*return*/]; + }); + }); + }; + AquariumComponent.prototype.presentAlert = function (alertMessage) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var alert; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.alertCtrl.create({ + //
Thank you for completing the survey. You have unlocked a meme.
+ //header: '
Daily survey unavilable
', + header: 'Daily survey unavilable', + //subHeader: "Survey is not avaibable!", + message: alertMessage, + //defined in theme/variables.scss + //buttons: [{text: 'OK', cssClass: 'secondary'}] + buttons: [{ text: 'OK' }] + })]; + case 1: + alert = _a.sent(); + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + //---- + return [4 /*yield*/, alert.present()]; + case 2: + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + //---- + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + AquariumComponent.prototype.dispalySurveyPausedMsg = function () { + this.presentAlert('This account has been temporarily paused by the research administrators.'); + }; + AquariumComponent.prototype.showMemeDemo = function () { + this.router.navigate(['incentive/award-memes']); + }; + AquariumComponent.prototype.showAltruisticDemo = function () { + this.router.navigate(['incentive/award-altruism']); + }; + AquariumComponent.prototype.showModalDemo = function () { + var reinforcements = []; + reinforcements.push({ 'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?" }); + reinforcements.push({ 'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?" }); + reinforcements.push({ 'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?" }); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + this.presentModal(reinforcements); + }; + //show unlocked pages, using a modal + AquariumComponent.prototype.presentModal = function (reinforcements) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var modal; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.modalController.create({ + component: ModalUnlockedPageComponent, + componentProps: { + 'reinforcements': reinforcements + }, + enterAnimation: myEnterAnimation, + leaveAnimation: myLeaveAnimation, + //, + cssClass: 'my-default-2' + })]; + case 1: + modal = _a.sent(); + return [4 /*yield*/, modal.present()]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + AquariumComponent.prototype.showModal = function () { + //if(window.localStorage['IsModalShown'] == undefined) + // return; + //if(window.localStorage['IsModalShown'] == "false"){ + // + var todaysDate = moment().format('YYYYMMDD'); + var storedDate = this.modalObjectNavigationExtras["LastSurveyCompletionDate"]; + // + if (todaysDate == storedDate) { + //this.computeUnlockedReinforcements(); + } + // + //window.localStorage.setItem("IsModalShown", "true"); + //} + }; + AquariumComponent.prototype.isFirstDayInTheStudy = function () { + var daily_survey = this.userProfileService.userProfile.survey_data.daily_survey; + var first_date = moment().format('YYYYMMDD'); + var first_date_moment_js = moment(first_date, "YYYYMMDD"); + var key_moment_js; + for (var key in daily_survey) { + key_moment_js = moment(key, "YYYYMMDD"); + //takes the first day only. But it may not be the first date. + if (key_moment_js < first_date_moment_js) { + first_date = key; + first_date_moment_js = moment(first_date, "YYYYMMDD"); + } + } + var todays_date = moment().format('YYYYMMDD'); + if (todays_date == first_date) + return true; + else + return false; + }; + AquariumComponent.prototype.computeUnlockedReinforcements = function (currentPoints, previousPoints, awardedDollar) { + var _this = this; + //var currentPoints = this.modalObjectNavigationExtras["CurrentPoints"]; + //var previousPoints = this.modalObjectNavigationExtras["PreviousPoints"]; + //var awardedDollar = this.modalObjectNavigationExtras["AwardedDollar"]; + var reinforcements = []; + console.log("computeUnlockedReinforcements: called"); + //get if money is awarded. + if (awardedDollar > 0) { + if (this.isFirstDayInTheStudy()) + reinforcements.push({ 'img': 'assets/img/1dollar.jpg', 'header': 'You earned ' + awardedDollar + ' dollar(s)', 'text': 'Thanks for being a participant in the study. You earned 2 dollar.' }); + else + reinforcements.push({ 'img': 'assets/img/1dollar.jpg', 'header': 'You earned ' + awardedDollar + ' dollar(s)', 'text': 'You earned 1 dollar for completing surveys 3-days in a row' }); + } + //get if fish is alotted + previousPoints = currentPoints - 60; + console.log(currentPoints + ", " + previousPoints); + fetch('../../../assets/game/fishpoints.json').then(function (res) { return tslib_1.__awaiter(_this, void 0, void 0, function () { + var fish_data, img, header, text, i; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, res.json()]; + case 1: + fish_data = _a.sent(); + for (i = 0; i < fish_data.length; i++) { + if ((fish_data[i].points > previousPoints) && (fish_data[i].points <= currentPoints)) { + img = "assets/" + fish_data[i].img.substring(0, fish_data[i].img.length - 4) + '_tn.jpg'; + header = "You unlocked " + fish_data[i].name; + text = fish_data[i].trivia; + reinforcements.push({ 'img': img, 'header': header, 'text': text }); + } + } + console.log("reinforcements: " + JSON.stringify(reinforcements)); + if (reinforcements.length > 0) //means some rainforcement was provided. + this.presentModal(reinforcements); + return [2 /*return*/]; + } + }); + }); }); + //update the state reinforcement + this.store.dispatch(unlockedScreenShownAlready({ isUnlockedScreenShown: true })); + }; + tslib_1.__decorate([ + ViewChild(DemoAquariumComponent, { static: true }), + tslib_1.__metadata("design:type", Object) + ], AquariumComponent.prototype, "child", void 0); + AquariumComponent = tslib_1.__decorate([ + Component({ + selector: 'app-aquarium', + templateUrl: './aquarium.component.html', + styleUrls: ['./aquarium.component.css'] + }), + tslib_1.__metadata("design:paramtypes", [Platform, AlertController, + Router, + ActivatedRoute, + ModalController, + Store, + NavController, + MenuController, + UserProfileService]) + ], AquariumComponent); + return AquariumComponent; +}()); +export { AquariumComponent }; +//# sourceMappingURL=aquarium.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.js.map new file mode 100644 index 000000000..1206e2e13 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aquarium.component.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/aquarium/aquarium.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3G,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4EAA4E,CAAC;AACxH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEpF,OAAO,EAAE,0BAA0B,EAAE,MAA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I,EAAC,CAAC,CAAC,CAAC;IACjF,CAAC;IAlWiD;QAAjD,SAAS,CAAC,qBAAqB,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC;;oDAAO;IAP7C,iBAAiB;QAL7B,SAAS,CAAC;YACT,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE,2BAA2B;YACxC,SAAS,EAAE,CAAC,0BAA0B,CAAC;SACxC,CAAC;iDAmC8B,QAAQ,EAAqB,eAAe;YACxD,MAAM;YACP,cAAc;YACJ,eAAe;YACzB,KAAK;YACE,aAAa;YACrB,cAAc;YACA,kBAAkB;OAzCrC,iBAAiB,CA6W7B;IAAD,wBAAC;CAAA,AA7WD,IA6WC;SA7WY,iBAAiB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.spec.js new file mode 100644 index 000000000..eb6776e1c --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.spec.js @@ -0,0 +1,21 @@ +import { async, TestBed } from '@angular/core/testing'; +import { AquariumComponent } from './aquarium.component'; +describe('AquariumComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [AquariumComponent] + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(AquariumComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=aquarium.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.spec.js.map new file mode 100644 index 000000000..499c2bbfb --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/aquarium.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aquarium.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/aquarium/aquarium.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAQ,CAAC,mBAAmB,EAAE;IAC5B,IAAI,SAA4B,CAAC;IACjC,IAAI,OAA4C,CAAC;IAEjD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,iBAAiB,CAAE;SACpC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;QACrD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/aquarium.module.js b/dist/out-tsc/src/app/incentive/aquarium/aquarium.module.js new file mode 100644 index 000000000..9db86d7ee --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/aquarium.module.js @@ -0,0 +1,33 @@ +import * as tslib_1 from "tslib"; +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; +import { DemoAquariumComponent } from './demo-aquarium/demo-aquarium.component'; +import { SurveyModule } from '../../survey/survey.module'; +import { RouterModule } from '@angular/router'; +import { AquariumComponent } from './aquarium.component'; +var routes = [ + { path: 'aquariumone', component: DemoAquariumComponent } +]; +var AquariumModule = /** @class */ (function () { + function AquariumModule() { + } + AquariumModule = tslib_1.__decorate([ + NgModule({ + declarations: [DemoAquariumComponent, AquariumComponent], + imports: [ + CommonModule, + SurveyModule, + IonicModule.forRoot(), + RouterModule.forChild(routes) + ], + exports: [ + DemoAquariumComponent, AquariumComponent + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }) + ], AquariumModule); + return AquariumModule; +}()); +export { AquariumModule }; +//# sourceMappingURL=aquarium.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/aquarium.module.js.map b/dist/out-tsc/src/app/incentive/aquarium/aquarium.module.js.map new file mode 100644 index 000000000..1fa37d501 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/aquarium.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aquarium.module.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/aquarium/aquarium.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAU,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,IAAM,MAAM,GAAW;IAClB,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,qBAAqB,EAAE;CAC7D,CAAC;AAeF;IAAA;IAA8B,CAAC;IAAlB,cAAc;QAb1B,QAAQ,CAAC;YACR,YAAY,EAAE,CAAC,qBAAqB,EAAE,iBAAiB,CAAC;YACxD,OAAO,EAAE;gBACP,YAAY;gBACZ,YAAY;gBACZ,WAAW,CAAC,OAAO,EAAE;gBACrB,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;aAC9B;YACD,OAAO,EAAC;gBACN,qBAAqB,EAAE,iBAAiB;aACzC;YACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;OACW,cAAc,CAAI;IAAD,qBAAC;CAAA,AAA/B,IAA+B;SAAlB,cAAc"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.js b/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.js new file mode 100644 index 000000000..7028a8d02 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.js @@ -0,0 +1,50 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +var CheatpageComponent = /** @class */ (function () { + function CheatpageComponent(userProfileService) { + this.userProfileService = userProfileService; + } + CheatpageComponent.prototype.ngOnInit = function () { + /* + if(window.localStorage['TotalPoints'] == undefined) + this.currentPoints = 0; + else + this.currentPoints = parseInt(window.localStorage['TotalPoints']); + */ + this.currentPoints = this.userProfileService.points; + }; + CheatpageComponent.prototype.logChange = function (event) { + //console.log(event); + console.log("Total points: " + this.totalPoints); + }; + CheatpageComponent.prototype.resetPoint = function () { + console.log("Total points: " + this.totalPoints); + this.currentPoints = this.totalPoints; + // + /* + + if(window.localStorage['TotalPoints'] == undefined) + this.totalPoints = 0; + else + this.totalPoints = parseInt(window.localStorage['TotalPoints']); + */ + //this.totalPoints = 700;//this.totalPoints + 100; + //window.localStorage.setItem("TotalPoints", ""+this.totalPoints); + this.userProfileService.cheatPoints(this.totalPoints); + }; + CheatpageComponent.prototype.returnToAquarium = function () { + window.location.href = '/home'; + }; + CheatpageComponent = tslib_1.__decorate([ + Component({ + selector: 'app-cheatpage', + templateUrl: './cheatpage.component.html', + styleUrls: ['./cheatpage.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", [UserProfileService]) + ], CheatpageComponent); + return CheatpageComponent; +}()); +export { CheatpageComponent }; +//# sourceMappingURL=cheatpage.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.js.map new file mode 100644 index 000000000..495db3b8f --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cheatpage.component.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/cheatpage/cheatpage.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAOpF;IAME,4BAAoB,kBAAsC;QAAtC,uBAAkB,GAAlB,kBAAkB,CAAoB;IAAI,CAAC;IAE/D,qCAAQ,GAAR;QAEE;;;;;UAKE;QACF,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;IACtD,CAAC;IAED,sCAAS,GAAT,UAAU,KAAK;QACb,qBAAqB;QACrB,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IAED,uCAAU,GAAV;QAEE,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;QACjD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC;QAEtC,EAAE;QACF;;;;;;UAME;QACF,kDAAkD;QAClD,mEAAmE;QACnE,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACxD,CAAC;IAED,6CAAgB,GAAhB;QACE,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC;IACjC,CAAC;IA5CU,kBAAkB;QAL9B,SAAS,CAAC;YACT,QAAQ,EAAE,eAAe;YACzB,WAAW,EAAE,4BAA4B;YACzC,SAAS,EAAE,CAAC,4BAA4B,CAAC;SAC1C,CAAC;iDAOwC,kBAAkB;OAN/C,kBAAkB,CA8C9B;IAAD,yBAAC;CAAA,AA9CD,IA8CC;SA9CY,kBAAkB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.spec.js new file mode 100644 index 000000000..c1ab12c00 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { CheatpageComponent } from './cheatpage.component'; +describe('CheatpageComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [CheatpageComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(CheatpageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=cheatpage.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.spec.js.map new file mode 100644 index 000000000..e2628d7d2 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/cheatpage/cheatpage.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cheatpage.component.spec.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/cheatpage/cheatpage.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,QAAQ,CAAC,oBAAoB,EAAE;IAC7B,IAAI,SAA6B,CAAC;IAClC,IAAI,OAA6C,CAAC;IAElD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,kBAAkB,CAAE;YACpC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACtD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.js b/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.js new file mode 100644 index 000000000..19fe20463 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.js @@ -0,0 +1,387 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { BootL1 } from '../levels/FishBowlL1/Boot'; +import { PreloaderL1 } from '../levels/FishBowlL1/Preloader'; +import { FishBowlL1 } from '../levels/FishBowlL1/Game'; +import { BootL2 } from '../levels/FishBowlL2/Boot'; +import { PreloaderL2 } from '../levels/FishBowlL2/Preloader'; +import { FishBowlL2 } from '../levels/FishBowlL2/Game'; +import { BootL3 } from '../levels/SeaLevelL3/Boot'; +import { PreloaderL3 } from '../levels/SeaLevelL3/Preloader'; +import { SeaLevelL3 } from '../levels/SeaLevelL3/Game'; +import { BootL4 } from '../levels/SeaLevelL4/Boot'; +import { PreloaderL4 } from '../levels/SeaLevelL4/Preloader'; +import { SeaLevelL4 } from '../levels/SeaLevelL4/Game'; +import { BootGameOver } from '../levels/GameOver/Boot'; +import { PreloaderGameOver } from '../levels/GameOver/Preloader'; +import { GameOver } from '../levels/GameOver/GameOver'; +import { BootTundraL5 } from '../levels/TundraLevelL5/Boot'; +import { PreloaderTundraL5 } from '../levels/TundraLevelL5/Preloader'; +import { GameTundraL5 } from '../levels/TundraLevelL5/Game'; +import { BootTundraL51 } from '../levels/TundraLevelL51/Boot'; +import { PreloaderTundraL51 } from '../levels/TundraLevelL51/Preloader'; +import { GameTundraL51 } from '../levels/TundraLevelL51/Game'; +import { BootRainforestL6 } from '../levels/RainforestL6/Boot'; +import { PreloaderRainforestL6 } from '../levels/RainforestL6/Preloader'; +import { GameRainforestL6 } from '../levels/RainforestL6/Game'; +import { ActivatedRoute, Router } from '@angular/router'; +//import { PreLoad } from '../../../PreLoad'; +import { Platform, ModalController } from '@ionic/angular'; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +import * as moment from 'moment'; +import { AlertController } from '@ionic/angular'; +import { DatabaseService } from 'src/app/monitor/database.service'; +import { HttpClient } from '@angular/common/http'; + + +import { environment } from '../../environments/environment'; + +var DemoAquariumComponent = /** @class */ (function () { + /* get surveyPath(){ + if (this.userProfileService.isParent){ + return "survey/samplesurvey"; //"/survey/caregiversurvey" + } else{ + return "survey/samplesurvey2"; //"/survey/ayasurvey" + } + } */ + function DemoAquariumComponent(router, alertCtrl, modalController, + //private pickGameService: PickGameService, + platform, route, userProfileService, httpClient, db) { + this.router = router; + this.alertCtrl = alertCtrl; + this.modalController = modalController; + this.platform = platform; + this.route = route; + this.userProfileService = userProfileService; + this.httpClient = httpClient; + this.db = db; + this.isLoaded = false; + this.pageTitle = "Aquarium"; + console.log("Constructor called"); + /* + this.route.queryParams.subscribe(params => { + if (this.router.getCurrentNavigation().extras.state) { + this.totalPoints = this.router.getCurrentNavigation().extras.state.totalPoints; + console.log("Pass totalPoints: "+this.totalPoints); + } + }); + */ + this.survey_text = "Start Survey"; + //this.username = "test"; + } + Object.defineProperty(DemoAquariumComponent.prototype, "totalPoints", { + // totalPoints = 0; + get: function () { + return this.userProfileService.points; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DemoAquariumComponent.prototype, "username", { + get: function () { + if (this.userProfileService == undefined) + return "test"; + else { + //console.log("User profile -- username -- called from here"); + return this.userProfileService.username; + } + }, + enumerable: true, + configurable: true + }); + //Get total submitted survey + DemoAquariumComponent.prototype.getTotalSurveyCount = function () { + return Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length; + }; + /* Get last seven days of indicator for survey completion, + return an array of 7 elements like [0, 1, 0, 0, 0, 1, 0] + with 1 indicating submitted survey, 0 otherwise, the first + element is current day. */ + DemoAquariumComponent.prototype.getIndicatorForSurveyDone = function () { + var daily_survey = this.userProfileService.userProfile.survey_data.daily_survey; + console.log("daily_survey:"); + console.log(JSON.stringify(daily_survey)); + var indicatorArray = []; + for (var i = 0; i < 7; i++) { + var previousdate = moment().subtract(i, "days").format("YYYYMMDD"); + console.log(JSON.stringify(this.userProfileService.userProfile.survey_data.daily_survey)); + var indicator = 0; + if (previousdate in daily_survey) { + indicator = 1; + } + indicatorArray.push(indicator); + } + return indicatorArray; + }; + DemoAquariumComponent.prototype.showInfoModal = function (text) { + console.log("rewards page"); + this.presentAlert(text); + }; + DemoAquariumComponent.prototype.goToRewardsPage = function () { + console.log("rewards page"); + //this.router.navigate(['/home']); + this.router.navigate(['incentive/treasurechest']); + }; + //preload the images + DemoAquariumComponent.prototype.preload = function () { + console.log("Preload called"); + this.game.load.image('einstein', 'assets/pics/ra_einstein.png'); + }; + //gets executed after preload + DemoAquariumComponent.prototype.create = function () { + console.log(window.localStorage['TotalPoints']); + //this.totalPoints = parseInt(window.localStorage['TotalPoints'] || "0"); + /* + if(window.localStorage['TotalPoints'] == undefined) + this.totalPoints = 0; + else + this.totalPoints = parseInt(window.localStorage['TotalPoints']); + */ + console.log("Inside Aquarium totalPoints: " + this.totalPoints); + console.log("create called"); + var s = this.game.add.sprite(80, 9, 'einstein'); + s.rotation = 0.14; + }; + DemoAquariumComponent.prototype.ngOnInit = function () { + //this.loadFunction(); + this.sendUserIdToServerFor8PMNotification(); + }; + DemoAquariumComponent.prototype.sendUserIdToServerFor8PMNotification = function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var oneSignalPlayerId, username, currentTimeTs, currentTimeReadableTs, headers, body; + return tslib_1.__generator(this, function (_a) { + // Simple POST request with a JSON body and response type + console.log("--aquarium-- " + "sendUserIdToServerFor8PMNotification"); + oneSignalPlayerId = window.localStorage['oneSignalPlayerId']; + if (oneSignalPlayerId == "null" || oneSignalPlayerId == null || oneSignalPlayerId == undefined) { + console.log("oneSignalId is null, " + oneSignalPlayerId); + //return; + } + username = this.userProfileService.username; + currentTimeTs = Date.now(); + currentTimeReadableTs = moment().format("MMMM Do YYYY, h:mm:ss a Z"); + headers = { "Content-Type": "application/json;charset=UTF-8" }; + body = { "user_id": username, "oneSignalPlayerId": oneSignalPlayerId, "currentTimeTs": currentTimeTs, "currentTimeReadableTs": currentTimeReadableTs }; + /* + this.httpClient.post("http://ec2-54-91-131-166.compute-1.amazonaws.com:56733/store-onesignal-id", body, { headers }).subscribe({ + next: data => console.log(data), + error: error => console.error('There was an error!', error) + }); + */ + this.httpClient.post("http://ec2-54-91-131-166.compute-1.amazonaws.com:56733/store-onesignal-id", body) + .subscribe({ + next: function (data) { return console.log("--aquarium-- " + JSON.stringify(data)); }, + error: function (error) { return console.error('There was an error!', error); } + }); + return [2 /*return*/]; + }); + }); + }; + DemoAquariumComponent.prototype.ionViewDidEnter = function () { + //if(this.isLoaded == true) + // this.loadFunction(); + this.survey_text = "Start survey"; + }; + //this function gets called from the above the "aquarium.component.ts" + DemoAquariumComponent.prototype.loadFunction = function () { + //console.log(window.localStorage['TotalPoints']); + var _this = this; + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Enter", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + //this.totalPoints = parseInt(window.localStorage['TotalPoints'] || "0"); + /* + if(window.localStorage['TotalPoints'] == undefined) + this.totalPoints = 0; + else + this.totalPoints = parseInt(window.localStorage['TotalPoints']); + */ + //console.log("Inside Aquarium totalPoints: "+this.totalPoints); + //this.game.destroy(); + //height adjustment for different phone types + var GameApp = GameApp || {}; + GameApp.CANVAS_WIDTH = 382.0; + console.log("w: " + window.innerWidth + ", h: " + window.innerHeight + ", dp: " + window.devicePixelRatio); + if (window.innerWidth > GameApp.CANVAS_WIDTH) + GameApp.CANVAS_WIDTH = window.innerWidth; + GameApp.CANVAS_HEIGHT = window.innerHeight - 35; + //var game; + if (this.platform.is('ios')) { + if (GameApp.CANVAS_HEIGHT < 642.0) { //iphone SE fix. + GameApp.CANVAS_HEIGHT += 30; + GameApp.CANVAS_WIDTH = window.innerWidth; + } + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 32 * window.devicePixelRatio, Phaser.AUTO, 'gameDiv'); + } + else if (this.platform.is('android')) + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 74, Phaser.AUTO, 'gameDiv'); + else + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 100, Phaser.AUTO, 'gameDiv'); + //this.totalPoints = 2125; + if (this.totalPoints < 0) { + this.game.state.add('Boot', BootGameOver); + this.pickedGame = 'GameOver'; + var preLoader = new PreloaderGameOver(); + this.game.state.add('Preloader', preLoader); + var gameover = new GameOver(); + this.game.state.add('GameOver', gameover); + } + else if (this.totalPoints < 770 && this.totalPoints >= 0) { + this.game.state.add('Boot', BootL1); + this.pickedGame = 'FishBowlL1'; + var preLoader = new PreloaderL1(); + this.game.state.add('Preloader', preLoader); + var fishBowlL1 = new FishBowlL1(); + fishBowlL1.setTotalPoints(this.totalPoints); + this.game.state.add('FishBowlL1', fishBowlL1); + } + else if (this.totalPoints >= 770 && this.totalPoints < 1060) { + this.game.state.add('Boot', BootL2); + this.pickedGame = 'FishBowlL2'; + var preLoader = new PreloaderL2(); + this.game.state.add('Preloader', preLoader); + var fishBowlL2 = new FishBowlL2(); + fishBowlL2.setTotalPoints(this.totalPoints); + fishBowlL2.setSurveyHistory(this.getIndicatorForSurveyDone()); + this.game.state.add('FishBowlL2', fishBowlL2); + } + else if (this.totalPoints >= 1060 && this.totalPoints < 1710) { + this.game.state.add('Boot', BootL3); + this.pickedGame = 'SeaLevelL3'; + var preLoader = new PreloaderL3(); + this.game.state.add('Preloader', preLoader); + var seaLevelL3 = new SeaLevelL3(); + seaLevelL3.setTotalPoints(this.totalPoints); + this.game.state.add('SeaLevelL3', seaLevelL3); + } + else if (this.totalPoints >= 1710 && this.totalPoints < 2120) { + this.game.state.add('Boot', BootL4); + this.pickedGame = 'SeaLevelL4'; + var preLoader = new PreloaderL4(); + this.game.state.add('Preloader', preLoader); + var seaLevelL4 = new SeaLevelL4(); + seaLevelL4.setTotalPoints(this.totalPoints); + this.game.state.add('SeaLevelL4', seaLevelL4); + } + else if (this.totalPoints >= 2120 && this.totalPoints < 2720) { + this.game.state.add('Boot', BootTundraL5); + this.pickedGame = "TundraLevel1"; + var preLoader = new PreloaderTundraL5(); + this.game.state.add('Preloader', preLoader); + var level5 = new GameTundraL5(); + level5.setTotalPoints(this.totalPoints); + this.game.state.add('TundraLevel1', level5); + } + else if (this.totalPoints >= 2720 && this.totalPoints < 3020) { + this.game.state.add('Boot', BootTundraL51); + this.pickedGame = "TundraLevel2"; + var preLoader = new PreloaderTundraL51(); + this.game.state.add('Preloader', preLoader); + var level51 = new GameTundraL51(); + level51.setTotalPoints(this.totalPoints); + this.game.state.add('TundraLevel2', level51); + } + else if (this.totalPoints >= 3020) { + this.game.state.add('Boot', BootRainforestL6); + this.pickedGame = "RainforestLevel6"; + var preLoader = new PreloaderRainforestL6(); + this.game.state.add('Preloader', preLoader); + var level6 = new GameRainforestL6(); + level6.setTotalPoints(this.totalPoints); + this.game.state.add('RainforestLevel6', level6); + } + else { + //--- + var preLoader = new PreloaderL1(); + preLoader.setGameName(this.pickedGame = "GameOver"); + this.game.state.add('Preloader', preLoader); + } + //this.game.state.add('GameOver', GameOver); + this.game.state.start('Boot'); + //self = this; + this.game.state.states[this.pickedGame].assignscope(this); + //this.pickGameService.currentGame.subscribe(game => this.pickedGame = game) + }; + DemoAquariumComponent.prototype.ionViewDidLeaveFunction = function () { + var _this = this; + console.log("Aquarium, ionDidLeave"); + this.survey_text = "Start survey"; + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Leave", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + this.game.destroy(); + }; + DemoAquariumComponent.prototype.pauseGameRendering = function () { + this.game.state.states[this.pickedGame].yourGamePausedFunc(); + }; + DemoAquariumComponent.prototype.resumeGameRendering = function () { + this.game.state.states[this.pickedGame].yourGameResumedFunc(); + }; + DemoAquariumComponent.prototype.ngAfterViewInit = function () { + }; + DemoAquariumComponent.prototype.presentAlert = function (alertMessage) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var alert; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.alertCtrl.create({ + //
Thank you for completing the survey. You have unlocked a meme.
+ //header: '
Daily survey unavilable
', + header: 'Daily survey unavilable', + //subHeader: "Survey is not avaibable!", + message: alertMessage, + //defined in theme/variables.scss + //buttons: [{text: 'OK', cssClass: 'secondary'}] + buttons: [{ text: 'OK' }] + })]; + case 1: + alert = _a.sent(); + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + //---- + return [4 /*yield*/, alert.present()]; + case 2: + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + //---- + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + DemoAquariumComponent = tslib_1.__decorate([ + Component({ + selector: 'app-demo-aquarium', + templateUrl: './demo-aquarium.component.html', + styleUrls: ['./demo-aquarium.component.less'], + }) + //@PreLoad('survey') + , + tslib_1.__metadata("design:paramtypes", [Router, + AlertController, + ModalController, + Platform, + ActivatedRoute, + UserProfileService, + HttpClient, + DatabaseService]) + ], DemoAquariumComponent); + return DemoAquariumComponent; +}()); +export { DemoAquariumComponent }; +//# sourceMappingURL=demo-aquarium.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.js.map new file mode 100644 index 000000000..45131b2a4 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"demo-aquarium.component.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD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a/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.spec.js new file mode 100644 index 000000000..ba408a9c6 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { DemoAquariumComponent } from './demo-aquarium.component'; +describe('DemoAquariumComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [DemoAquariumComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(DemoAquariumComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=demo-aquarium.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.spec.js.map new file mode 100644 index 000000000..e297719af --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"demo-aquarium.component.spec.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,QAAQ,CAAC,uBAAuB,EAAE;IAChC,IAAI,SAAgC,CAAC;IACrC,IAAI,OAAgD,CAAC;IAErD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,qBAAqB,CAAE;YACvC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;QACzD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.js b/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.js new file mode 100644 index 000000000..acb89b2b0 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.js @@ -0,0 +1,35 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { Router } from '@angular/router'; +import { ReinforestLevel1 } from './ReinforestLevel1'; +var DemoReinforestComponent = /** @class */ (function () { + function DemoReinforestComponent(router) { + this.router = router; + console.log("Constructor called"); + this.game = new Phaser.Game(window.innerWidth, 515, Phaser.AUTO, 'gameDiv'); + this.game.state.add('ReinforestLevel1', ReinforestLevel1); + this.game.state.start('ReinforestLevel1'); + //self = this; + //this.game.state.states["GameSmall"].assignscope(this); + //this.game = new Phaser.Game(1000, 515, Phaser.CANVAS, 'phaser-example', { preload: this.preload, create: this.create }); + } + DemoReinforestComponent.prototype.ionViewDidLeave = function () { + this.game.destroy(); + }; + DemoReinforestComponent.prototype.goToRewardsPage = function () { + console.log("rewards page"); + this.router.navigate(['/home']); + }; + DemoReinforestComponent.prototype.ngOnInit = function () { }; + DemoReinforestComponent = tslib_1.__decorate([ + Component({ + selector: 'app-demo-reinforest', + templateUrl: './demo-reinforest.component.html', + styleUrls: ['./demo-reinforest.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", [Router]) + ], DemoReinforestComponent); + return DemoReinforestComponent; +}()); +export { DemoReinforestComponent }; +//# sourceMappingURL=demo-reinforest.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.js.map new file mode 100644 index 000000000..cb300f642 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"demo-reinforest.component.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAStD;IAKE,iCAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAChC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAGlC,IAAI,CAAC,IAAI,GAAI,IAAI,MAAM,CAAC,IAAI,CAC1B,MAAM,CAAC,UAAU,EAAE,GAAG,EACtB,MAAM,CAAC,IAAI,EACX,SAAS,CACV,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;QAC1D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAC1C,cAAc;QAEd,wDAAwD;QAGxD,2HAA2H;IAG7H,CAAC;IAED,iDAAe,GAAf;QACE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IAED,iDAAe,GAAf;QACE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAClC,CAAC;IAKD,0CAAQ,GAAR,cAAY,CAAC;IAvCF,uBAAuB;QALnC,SAAS,CAAC;YACT,QAAQ,EAAE,qBAAqB;YAC/B,WAAW,EAAE,kCAAkC;YAC/C,SAAS,EAAE,CAAC,kCAAkC,CAAC;SAChD,CAAC;iDAM4B,MAAM;OALvB,uBAAuB,CAyCnC;IAAD,8BAAC;CAAA,AAzCD,IAyCC;SAzCY,uBAAuB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.spec.js new file mode 100644 index 000000000..a6e595514 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { DemoReinforestComponent } from './demo-reinforest.component'; +describe('DemoReinforestComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [DemoReinforestComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(DemoReinforestComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=demo-reinforest.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.spec.js.map new file mode 100644 index 000000000..c16179d58 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"demo-reinforest.component.spec.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/demo-reinforest/demo-reinforest.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,QAAQ,CAAC,yBAAyB,EAAE;IAClC,IAAI,SAAkC,CAAC;IACvC,IAAI,OAAkD,CAAC;IAEvD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,uBAAuB,CAAE;YACzC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;QAC3D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.js b/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.js new file mode 100644 index 000000000..7da3d67e1 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.js @@ -0,0 +1,58 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { Router } from '@angular/router'; +import { TundraLevel1 } from './Tundra1'; +import { Platform } from '@ionic/angular'; +var DemoTundraComponent = /** @class */ (function () { + function DemoTundraComponent(platform, router) { + this.platform = platform; + this.router = router; + console.log("Constructor called"); + //this.game.destroy(); + } + DemoTundraComponent.prototype.ngOnInit = function () { + // + this.loadFunction(); + }; + DemoTundraComponent.prototype.loadFunction = function () { + //height adjustment for different phone types + var GameApp = GameApp || {}; + GameApp.CANVAS_WIDTH = 382.0; + console.log("w: " + window.innerWidth + ", h: " + window.innerHeight + ", dp: " + window.devicePixelRatio); + if (window.innerWidth > GameApp.CANVAS_WIDTH) + GameApp.CANVAS_WIDTH = window.innerWidth; + GameApp.CANVAS_HEIGHT = window.innerHeight; + //var game; + if (this.platform.is('ios')) { + if (GameApp.CANVAS_HEIGHT < 642.0) //iphone SE fix. + GameApp.CANVAS_HEIGHT += 60; + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 21 * window.devicePixelRatio, Phaser.AUTO, 'gameDiv'); + } + else if (this.platform.is('android')) + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 74, Phaser.AUTO, 'gameDiv'); + else + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 100, Phaser.AUTO, 'gameDiv'); + var tundraLevel1 = new TundraLevel1(); + this.game.state.add('Tundra1', tundraLevel1); + this.game.state.start('Tundra1'); + }; + DemoTundraComponent.prototype.goToRewardsPage = function () { + console.log("rewards page"); + this.router.navigate(['/home']); + }; + DemoTundraComponent.prototype.ionViewDidLeaveFunction = function () { + console.log("Tundra, ionDidLeave"); + this.game.destroy(); + }; + DemoTundraComponent = tslib_1.__decorate([ + Component({ + selector: 'app-demo-tundra', + templateUrl: './demo-tundra.component.html', + styleUrls: ['./demo-tundra.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", [Platform, Router]) + ], DemoTundraComponent); + return DemoTundraComponent; +}()); +export { DemoTundraComponent }; +//# sourceMappingURL=demo-tundra.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.js.map new file mode 100644 index 000000000..f6c010879 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"demo-tundra.component.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/demo-tundra/demo-tundra.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAS1C;IAIE,6BAAoB,QAAkB,EAAU,MAAc;QAA1C,aAAQ,GAAR,QAAQ,CAAU;QAAU,WAAM,GAAN,MAAM,CAAQ;QAE5D,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAClC,sBAAsB;IAGxB,CAAC;IAED,sCAAQ,GAAR;QACE,EAAE;QACF,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,0CAAY,GAAZ;QAEM,6CAA6C;QAC7C,IAAI,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QAC5B,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAC3G,IAAG,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,YAAY;YACvC,OAAO,CAAC,YAAY,GAAG,MAA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QACE,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IApDU,mBAAmB;QAL/B,SAAS,CAAC;YACT,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,8BAA8B;YAC3C,SAAS,EAAE,CAAC,8BAA8B,CAAC;SAC5C,CAAC;iDAK8B,QAAQ,EAAkB,MAAM;OAJnD,mBAAmB,CAwD/B;IAAD,0BAAC;CAAA,AAxDD,IAwDC;SAxDY,mBAAmB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.spec.js new file mode 100644 index 000000000..88f14edf8 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { DemoTundraComponent } from './demo-tundra.component'; +describe('DemoTundraComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [DemoTundraComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(DemoTundraComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=demo-tundra.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.spec.js.map new file mode 100644 index 000000000..79a980ae3 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/demo-tundra/demo-tundra.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"demo-tundra.component.spec.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/demo-tundra/demo-tundra.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,QAAQ,CAAC,qBAAqB,EAAE;IAC9B,IAAI,SAA8B,CAAC;IACnC,IAAI,OAA8C,CAAC;IAEnD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,mBAAmB,CAAE;YACrC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;QACvD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.js b/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.js new file mode 100644 index 000000000..fb836d460 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.js @@ -0,0 +1,36 @@ +import * as tslib_1 from "tslib"; +import { Component, Input } from '@angular/core'; +import { NavParams, ModalController } from '@ionic/angular'; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +var ModalUnlockedPageComponent = /** @class */ (function () { + function ModalUnlockedPageComponent(navParams, modalCtrl, userProfileService) { + this.modalCtrl = modalCtrl; + this.userProfileService = userProfileService; + // componentProps can also be accessed at construction time using NavParams + console.log(navParams.get('firstName')); + //this.reinforcements = [];//[{'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}]; + } + ModalUnlockedPageComponent.prototype.ngOnInit = function () { + }; + ModalUnlockedPageComponent.prototype.dismiss = function () { + //pass-data: https://ionicframework.com/docs/v3/api/components/modal/ModalController/ + //let data = { 'foo': 'bar' }; + //this.modalCtrl.dismiss(data); + this.modalCtrl.dismiss(); + }; + tslib_1.__decorate([ + Input(), + tslib_1.__metadata("design:type", Object) + ], ModalUnlockedPageComponent.prototype, "reinforcements", void 0); + ModalUnlockedPageComponent = tslib_1.__decorate([ + Component({ + selector: 'app-modal-unlocked-page', + templateUrl: './modal-unlocked-page.component.html', + styleUrls: ['./modal-unlocked-page.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", [NavParams, ModalController, UserProfileService]) + ], ModalUnlockedPageComponent); + return ModalUnlockedPageComponent; +}()); +export { ModalUnlockedPageComponent }; +//# sourceMappingURL=modal-unlocked-page.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.js.map new file mode 100644 index 000000000..2e4b1e4cf --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modal-unlocked-page.component.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,KAAK,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAOpF;IAKE,oCAAY,SAAoB,EAAS,SAA0B,EAAU,kBAAsC;QAA1E,cAAS,GAAT,SAAS,CAAiB;QAAU,uBAAkB,GAAlB,kBAAkB,CAAoB;QACjH,2EAA2E;QAC3E,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;QACxC,oOAAoO;IACtO,CAAC;IAED,6CAAQ,GAAR;IAEA,CAAC;IAGD,4CAAO,GAAP;QAEE,qFAAqF;QACrF,8BAA8B;QAC9B,+BAA+B;QAC/B,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IAE3B,CAAC;IApBQ;QAAR,KAAK,EAAE;;sEAAqB;IAHlB,0BAA0B;QALtC,SAAS,CAAC;YACT,QAAQ,EAAE,yBAAyB;YACnC,WAAW,EAAE,sCAAsC;YACnD,SAAS,EAAE,CAAC,sCAAsC,CAAC;SACpD,CAAC;iDAMuB,SAAS,EAAoB,eAAe,EAA8B,kBAAkB;OALxG,0BAA0B,CAyBtC;IAAD,iCAAC;CAAA,AAzBD,IAyBC;SAzBY,0BAA0B"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.spec.js new file mode 100644 index 000000000..859a122ad --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.spec.js @@ -0,0 +1,20 @@ +import { async, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; +import { ModalUnlockedPageComponent } from './modal-unlocked-page.component'; +describe('ModalUnlockedPageComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [ModalUnlockedPageComponent], + imports: [IonicModule.forRoot()] + }).compileComponents(); + fixture = TestBed.createComponent(ModalUnlockedPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=modal-unlocked-page.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.spec.js.map new file mode 100644 index 000000000..d7b44fdd0 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modal-unlocked-page.component.spec.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,QAAQ,CAAC,4BAA4B,EAAE;IACrC,IAAI,SAAqC,CAAC;IAC1C,IAAI,OAAqD,CAAC;IAE1D,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,0BAA0B,CAAE;YAC5C,OAAO,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;SACjC,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAEvB,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,0BAA0B,CAAC,CAAC;QAC9D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC,CAAC;IAEJ,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.js b/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.js new file mode 100644 index 000000000..d61195801 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.js @@ -0,0 +1,22 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { MenuController } from '@ionic/angular'; +var FishbowlComponent = /** @class */ (function () { + function FishbowlComponent(menuCtrl) { + this.menuCtrl = menuCtrl; + } + FishbowlComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + FishbowlComponent = tslib_1.__decorate([ + Component({ + selector: 'app-fishbowl', + templateUrl: './fishbowl.component.html', + styleUrls: ['./fishbowl.component.css'] + }), + tslib_1.__metadata("design:paramtypes", [MenuController]) + ], FishbowlComponent); + return FishbowlComponent; +}()); +export { FishbowlComponent }; +//# sourceMappingURL=fishbowl.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.js.map new file mode 100644 index 000000000..5c33b3d2d --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fishbowl.component.js","sourceRoot":"","sources":["../../../../../../../../src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOhD;IAEE,2BAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAI,CAAC;IAEhD,oCAAQ,GAAR;QACE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IANU,iBAAiB;QAL7B,SAAS,CAAC;YACT,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE,2BAA2B;YACxC,SAAS,EAAE,CAAC,0BAA0B,CAAC;SACxC,CAAC;iDAG6B,cAAc;OAFhC,iBAAiB,CAQ7B;IAAD,wBAAC;CAAA,AARD,IAQC;SARY,iBAAiB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.spec.js new file mode 100644 index 000000000..25f3c686a --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.spec.js @@ -0,0 +1,21 @@ +import { async, TestBed } from '@angular/core/testing'; +import { FishbowlComponent } from './fishbowl.component'; +describe('FishbowlComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [FishbowlComponent] + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(FishbowlComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=fishbowl.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.spec.js.map new file mode 100644 index 000000000..f27c740e8 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fishbowl.component.spec.js","sourceRoot":"","sources":["../../../../../../../../src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAQ,CAAC,mBAAmB,EAAE;IAC5B,IAAI,SAA4B,CAAC;IACjC,IAAI,OAA4C,CAAC;IAEjD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,iBAAiB,CAAE;SACpC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;QACrD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.js b/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.js new file mode 100644 index 000000000..ecfb650a7 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.js @@ -0,0 +1,22 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { MenuController } from '@ionic/angular'; +var RainforestComponent = /** @class */ (function () { + function RainforestComponent(menuCtrl) { + this.menuCtrl = menuCtrl; + } + RainforestComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + RainforestComponent = tslib_1.__decorate([ + Component({ + selector: 'app-rainforest', + templateUrl: './rainforest.component.html', + styleUrls: ['./rainforest.component.css'] + }), + tslib_1.__metadata("design:paramtypes", [MenuController]) + ], RainforestComponent); + return RainforestComponent; +}()); +export { RainforestComponent }; +//# sourceMappingURL=rainforest.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.js.map new file mode 100644 index 000000000..2dcb66167 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rainforest.component.js","sourceRoot":"","sources":["../../../../../../../../src/app/incentive/aquarium/previews/rainforest/rainforest.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOhD;IAEE,6BAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAI,CAAC;IAEhD,sCAAQ,GAAR;QACE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IANU,mBAAmB;QAL/B,SAAS,CAAC;YACT,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,6BAA6B;YAC1C,SAAS,EAAE,CAAC,4BAA4B,CAAC;SAC1C,CAAC;iDAG6B,cAAc;OAFhC,mBAAmB,CAS/B;IAAD,0BAAC;CAAA,AATD,IASC;SATY,mBAAmB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.spec.js new file mode 100644 index 000000000..a55550cb3 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.spec.js @@ -0,0 +1,21 @@ +import { async, TestBed } from '@angular/core/testing'; +import { RainforestComponent } from './rainforest.component'; +describe('RainforestComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [RainforestComponent] + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(RainforestComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=rainforest.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.spec.js.map new file mode 100644 index 000000000..4716b4154 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/rainforest/rainforest.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rainforest.component.spec.js","sourceRoot":"","sources":["../../../../../../../../src/app/incentive/aquarium/previews/rainforest/rainforest.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,QAAQ,CAAC,qBAAqB,EAAE;IAC9B,IAAI,SAA8B,CAAC;IACnC,IAAI,OAA8C,CAAC;IAEnD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,mBAAmB,CAAE;SACtC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;QACvD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.js b/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.js new file mode 100644 index 000000000..c94cbf323 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.js @@ -0,0 +1,22 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { MenuController } from '@ionic/angular'; +var SeaComponent = /** @class */ (function () { + function SeaComponent(menuCtrl) { + this.menuCtrl = menuCtrl; + } + SeaComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + SeaComponent = tslib_1.__decorate([ + Component({ + selector: 'app-sea', + templateUrl: './sea.component.html', + styleUrls: ['./sea.component.css'] + }), + tslib_1.__metadata("design:paramtypes", [MenuController]) + ], SeaComponent); + return SeaComponent; +}()); +export { SeaComponent }; +//# sourceMappingURL=sea.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.js.map new file mode 100644 index 000000000..51416222e --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sea.component.js","sourceRoot":"","sources":["../../../../../../../../src/app/incentive/aquarium/previews/sea/sea.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOhD;IAEE,sBAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAI,CAAC;IAEhD,+BAAQ,GAAR;QACE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IANU,YAAY;QALxB,SAAS,CAAC;YACT,QAAQ,EAAE,SAAS;YACnB,WAAW,EAAE,sBAAsB;YACnC,SAAS,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;iDAG6B,cAAc;OAFhC,YAAY,CAOxB;IAAD,mBAAC;CAAA,AAPD,IAOC;SAPY,YAAY"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.spec.js new file mode 100644 index 000000000..0ee7e0fd2 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.spec.js @@ -0,0 +1,21 @@ +import { async, TestBed } from '@angular/core/testing'; +import { SeaComponent } from './sea.component'; +describe('SeaComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [SeaComponent] + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(SeaComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=sea.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.spec.js.map new file mode 100644 index 000000000..b7a996116 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/sea/sea.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sea.component.spec.js","sourceRoot":"","sources":["../../../../../../../../src/app/incentive/aquarium/previews/sea/sea.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,QAAQ,CAAC,cAAc,EAAE;IACvB,IAAI,SAAuB,CAAC;IAC5B,IAAI,OAAuC,CAAC;IAE5C,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,YAAY,CAAE;SAC/B,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QAChD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.js b/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.js new file mode 100644 index 000000000..6db890615 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.js @@ -0,0 +1,22 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { MenuController } from '@ionic/angular'; +var TundraComponent = /** @class */ (function () { + function TundraComponent(menuCtrl) { + this.menuCtrl = menuCtrl; + } + TundraComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + TundraComponent = tslib_1.__decorate([ + Component({ + selector: 'app-tundra', + templateUrl: './tundra.component.html', + styleUrls: ['./tundra.component.css'] + }), + tslib_1.__metadata("design:paramtypes", [MenuController]) + ], TundraComponent); + return TundraComponent; +}()); +export { TundraComponent }; +//# sourceMappingURL=tundra.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.js.map b/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.js.map new file mode 100644 index 000000000..7b1fca608 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tundra.component.js","sourceRoot":"","sources":["../../../../../../../../src/app/incentive/aquarium/previews/tundra/tundra.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOhD;IAEE,yBAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAI,CAAC;IAEhD,kCAAQ,GAAR;QACE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IANU,eAAe;QAL3B,SAAS,CAAC;YACT,QAAQ,EAAE,YAAY;YACtB,WAAW,EAAE,yBAAyB;YACtC,SAAS,EAAE,CAAC,wBAAwB,CAAC;SACtC,CAAC;iDAG6B,cAAc;OAFhC,eAAe,CAQ3B;IAAD,sBAAC;CAAA,AARD,IAQC;SARY,eAAe"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.spec.js b/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.spec.js new file mode 100644 index 000000000..6146cc18f --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.spec.js @@ -0,0 +1,21 @@ +import { async, TestBed } from '@angular/core/testing'; +import { TundraComponent } from './tundra.component'; +describe('TundraComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [TundraComponent] + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(TundraComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=tundra.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.spec.js.map b/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.spec.js.map new file mode 100644 index 000000000..e9d2356d4 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/aquarium/previews/tundra/tundra.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tundra.component.spec.js","sourceRoot":"","sources":["../../../../../../../../src/app/incentive/aquarium/previews/tundra/tundra.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,QAAQ,CAAC,iBAAiB,EAAE;IAC1B,IAAI,SAA0B,CAAC;IAC/B,IAAI,OAA0C,CAAC;IAE/C,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,eAAe,CAAE;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;QACnD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.js b/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.js new file mode 100644 index 000000000..7f082ff86 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.js @@ -0,0 +1,337 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +import { AwsS3Service } from 'src/app/storage/aws-s3.service'; +import * as moment from 'moment'; +import { DatabaseService } from 'src/app/monitor/database.service'; +var AwardAltruismComponent = /** @class */ (function () { + function AwardAltruismComponent(route, userProfileService, awsS3Service, db, router) { + this.route = route; + this.userProfileService = userProfileService; + this.awsS3Service = awsS3Service; + this.db = db; + this.router = router; + this.reinforcementObj = {}; + this.reinforcement_data = {}; + this.modalObjectNavigationExtras = {}; + this.pageTitle = " Award_Altruism"; + this.HeartsBackground = { + heartHeight: 60, + heartWidth: 64, + hearts: [], + imageNames: ['valentinesheart.png', 'blueflower.png', 'yellowrose.png', 'redflower.png', 'yellowflower.png'], + heartImage: './assets/img/', + //heartImage: './assets/img/petal.png', + maxHearts: 60, + minScale: 0.4, + draw: function () { + //this.setCanvasSize(); + this.ctx.clearRect(0, 0, this.w, this.h); + //console.log("Hearts draw function called"); + var ctx = this.ctx; + for (var i = 0; i < this.hearts.length; i++) { + var heart = this.hearts[i]; + heart.image = new Image(); + heart.image.style.height = heart.height; + heart.image.src = this.heartImage; + ctx.drawImage(heart.image, heart.x, heart.y, heart.width, heart.height); + } + this.move(); + }, + move: function () { + //console.log("Move function called"); + for (var b = 0; b < this.hearts.length; b++) { + var heart = this.hearts[b]; + heart.y += heart.ys; + if (heart.y > this.h) { + //heart.x = Math.random() * this.w; + //heart.y = -1 * this.heartHeight; + } + } + }, + angularDraw: function () { + //this.setCanvasSize(); + this.ctx.clearRect(0, 0, this.w, this.h); + //console.log("Hearts draw function called"); + var ctx = this.ctx; + for (var i = 0; i < this.hearts.length; i++) { + var heart = this.hearts[i]; + /* + heart.image = new Image(); + heart.image.style.height = heart.height; + heart.image.src = this.heartImage; + */ + ctx.drawImage(heart.image, heart.angle_x, heart.angle_y, heart.width, heart.height); + } + this.angularMove(); + }, + angularMove: function () { + //console.log("Move function called"); + for (var b = 0; b < this.hearts.length; b++) { + var heart = this.hearts[b]; + //heart.y += heart.ys; + //console.log("" + heart.angle_x + "," + heart.angle_y); + //console.log(heart.angle); + //console.log("" + heart.angle_x + "," + heart.angle_y + ", " + heart.angle_deltax + ", " + heart.angle_deltay); + heart.angle_x += heart.angle_deltax; + heart.angle_y += heart.angle_deltay; + //console.log("" + heart.angle_x + "," + heart.angle_y); + if (heart.y > this.h) { + //heart.x = Math.random() * this.w; + //heart.y = -1 * this.heartHeight; + } + } + }, + setCanvasSize: function () { + this.canvas.width = window.innerWidth; + this.canvas.height = window.innerHeight - 170; + console.log("Set canvas size function called"); + this.w = this.canvas.width; + this.h = this.canvas.height; + }, + initialize: function () { + var _this = this; + console.log("Initialize hearts"); + this.canvas = document.getElementById("hearts_canvas"); //$('#canvas')[0]; hearts_canvas + if (!this.canvas.getContext) + return; + this.setCanvasSize(); + this.ctx = this.canvas.getContext('2d'); + this.canvas.addEventListener("touchstart", function (event) { event.preventDefault(); }); + this.canvas.addEventListener("touchmove", function (event) { event.preventDefault(); }); + this.canvas.addEventListener("touchend", function (event) { event.preventDefault(); }); + this.canvas.addEventListener("touchcancel", function (event) { event.preventDefault(); }); + // Attach an event handler to the document + //this.canvas.addEventListener("mousemove", function(event) {event.preventDefault()}); + for (var a = 0; a < this.maxHearts; a++) { + var scale = (Math.random() * (1 - this.minScale)) + this.minScale; + this.hearts.push({ + x: Math.random() * this.w, + y: Math.random() * this.h, + ys: Math.random() + 8, + height: scale * this.heartHeight, + width: scale * this.heartWidth, + angle_x: this.w / 2, + angle_y: this.h / 2, + angle_deltax: this.getRandomArbitraryMoreThanX(-10, 10, 6), + angle_deltay: this.getRandomArbitraryMoreThanX(-10, 10, 6), + opacity: scale + }); + } + //setInterval($.proxy(this.draw, this), 30); + //setTimeout(e => this.draw, 30); + //this.draw(); + var intervalVar; + if (Math.random() > 0.5) { + //intervalVar = setInterval(e => this.angularDraw(), 30); + this.heartImage = this.heartImage + 'valentinesheart.png'; + } + else { + //intervalVar = setInterval(e => this.draw(), 30); + //choose an heart image everytime + var randomElement = this.imageNames[Math.floor(Math.random() * this.imageNames.length)]; + this.heartImage = this.heartImage + randomElement; + } + var image = new Image(); + image.src = this.heartImage; + var hearts = this.hearts; + var self_this = this; + image.onload = function () { + for (var a = 0; a < hearts.length; a++) { + hearts[a].image = image; + hearts[a].image.style.height = hearts[a].height; + } + intervalVar = setInterval(function (e) { return self_this.angularDraw(); }, 15); + }; + setTimeout(function (e) { return _this.stopInterval(intervalVar); }, 800); + }, + stopInterval: function (intervalVar) { + this.ctx.clearRect(0, 0, this.w, this.h); + clearInterval(intervalVar); + }, + getRandomArbitrary: function (min, max) { + return Math.random() * (max - min) + min; + }, + getRandomArbitraryMoreThanX: function (min, max, X) { + var rand_var = this.getRandomArbitrary(min, max); + if (Math.abs(rand_var) < X) { + if (rand_var < X) + return rand_var - X; + if (rand_var > X) + return rand_var + X; + } + else { + return rand_var; + } + } + }; + this.reinforcementObj['ds'] = 1; + this.reinforcementObj['reward'] = 2; + this.reinforcementObj['reward_type'] = 'altruistic message'; + } + AwardAltruismComponent.prototype.ngOnInit = function () { + var _this = this; + this.route.queryParams.subscribe(function (params) { + if (_this.router.getCurrentNavigation().extras.state) { + _this.date = _this.router.getCurrentNavigation().extras.state.date; + _this.reinforcementObj['prob'] = _this.router.getCurrentNavigation().extras.state.prob; + _this.reinforcement_data = _this.router.getCurrentNavigation().extras.state.reinforcement_data; + _this.modalObjectNavigationExtras = _this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras; + console.log("Inside AwardAltruism, date is: " + _this.date + " prob is: " + _this.reinforcementObj['prob']); + } + }); + }; + AwardAltruismComponent.prototype.ngAfterViewInit = function () { + var _this = this; + fetch('./assets/altruism/altruism_list.json').then(function (res) { return tslib_1.__awaiter(_this, void 0, void 0, function () { + var _a; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, res.json()]; + case 1: + _a.altruism_data = _b.sent(); + this.showaltruism(); + return [2 /*return*/]; + } + }); + }); }); + }; + AwardAltruismComponent.prototype.ionViewDidEnter = function () { + var _this = this; + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Enter", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + }; + AwardAltruismComponent.prototype.ionViewDidLeave = function () { + var _this = this; + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Leave", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + }; + AwardAltruismComponent.prototype.showaltruism = function () { + var _this = this; + console.log('Altruism data: ' + JSON.stringify(this.altruism_data)); + this.altruism_data = this.shuffle(this.altruism_data); + //console.log('Altruism images suffled: ' + JSON.stringify(this.altruism_data)); + var picked_altruism_image = this.pick_altrusim(this.altruism_data); + //console.log('picked_altruism_image: ' + JSON.stringify(picked_altruism_image)); + var already_shown = window.localStorage["already_shown_alt_msg3"]; + if (already_shown == undefined) + already_shown = [{ "filename": "assets/altruism/altruism_1.png", "unlock_date": moment().format('MM/DD/YYYY') }]; + else + already_shown = JSON.parse(window.localStorage["already_shown_alt_msg3"]); + console.log("already_shown: " + already_shown); + already_shown.push({ "filename": "assets/altruism/" + picked_altruism_image[0]["filename"], "unlock_date": moment().format('MM/DD/YYYY') }); + window.localStorage["already_shown_alt_msg3"] = JSON.stringify(already_shown); + this.whichImage = "./assets/altruism/" + picked_altruism_image[0]["filename"]; + this.reinforcementObj['reward_img_link'] = "/altruism/" + picked_altruism_image[0]["filename"]; + this.reinforcement_data['reward_img_link'] = "/altruism/" + picked_altruism_image[0]["filename"]; + setTimeout(function (e) { return _this.drawImageOnCanvas(_this.whichImage); }, 200); + }; + AwardAltruismComponent.prototype.ratingChanged = function (rating) { + if (rating == 0) { + console.log("thumbs down"); + this.reinforcementObj['Like'] = "No"; + this.reinforcement_data['Like'] = "No"; + window.localStorage.setItem("Like", "No"); + this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); + } + else { + console.log("thumbs up"); + this.reinforcementObj['Like'] = "Yes"; + this.reinforcement_data['Like'] = "Yes"; + window.localStorage.setItem("Like", "Yes"); + this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); + } + this.userProfileService.addReinforcementData(this.date, this.reinforcementObj); + var navigationExtras = { + state: { + modalObjectNavigationExtras: this.modalObjectNavigationExtras + } + }; + this.router.navigate(['home'], navigationExtras); + }; + /** + * Shuffles array in place if it is not already shuffled + * @param {Array} a items An array containing the items. + */ + AwardAltruismComponent.prototype.shuffle = function (a) { + if (window.localStorage['altruism_shuffle6'] == undefined) { + // + var j, x, i; + for (i = a.length - 1; i > 0; i--) { + j = Math.floor(Math.random() * (i + 1)); + x = a[i]; + a[i] = a[j]; + a[j] = x; + } + // + window.localStorage['altruism_shuffle6'] = JSON.stringify(a); + return a; + } + else { + a = JSON.parse(window.localStorage['altruism_shuffle6']); + return a; + } + }; + /** + * Shuffles array in place if it is not already shuffled + * @param {Array} a items An array containing the items. + */ + AwardAltruismComponent.prototype.pick_altrusim = function (a) { + var picked_altruism = a.splice(0, 1); + a.push(picked_altruism[0]); + window.localStorage['altruism_shuffle6'] = JSON.stringify(a); + return picked_altruism; + }; + AwardAltruismComponent.prototype.drawImageOnCanvas = function (imageF_file_path) { + /* + // + var imageObj = new Image(); + imageObj.src = imageF_file_path; + + // + var drawingCanvas = document.getElementById("drawing_canvas"); + drawingCanvas.style.width = '100%'; + drawingCanvas.width = drawingCanvas.offsetWidth; + + var ctx = drawingCanvas.getContext('2d'); + + // + imageObj.onload = function () { + console.log("print: " + (imageObj.height/imageObj.width)); + drawingCanvas.height = Math.abs(drawingCanvas.width*(imageObj.height/imageObj.width)); + + ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle + 0, 0, drawingCanvas.width, drawingCanvas.height); // destination rectangle + + // + + } + */ + //this.HeartsBackground.initialize(drawingCanvas); + this.HeartsBackground.initialize(); + }; + AwardAltruismComponent = tslib_1.__decorate([ + Component({ + selector: 'app-award-altruism', + templateUrl: './award-altruism.component.html', + styleUrls: ['./award-altruism.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", [ActivatedRoute, + UserProfileService, + AwsS3Service, + DatabaseService, + Router]) + ], AwardAltruismComponent); + return AwardAltruismComponent; +}()); +export { AwardAltruismComponent }; +//# sourceMappingURL=award-altruism.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.js.map b/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.js.map new file mode 100644 index 000000000..c190b8990 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award-altruism.component.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/award-altruism/award-altruism.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,EAAoB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOnE;IAUE,gCACU,KAAqB,EACrB,kBAAsC,EACtC,YAA0B,EAC1B,EAAmB,EACnB,MAAc;QAJd,UAAK,GAAL,KAAK,CAAgB;QACrB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,OAAE,GAAF,EAAE,CAAiB;QACnB,WAAM,GAAN,MAAM,CAAQ;QAVxB,qBAAgB,GAAG,EAAE,CAAC;QACtB,uBAAkB,GAAG,EAAE,CAAC;QACxB,gCAA2B,GAAG,EAAE,CAAC;QACjC,cAAS,GAAG,iBAAiB,CAAC;QAwK5B,qBAAgB,GAAG;YACjB,WAAW,EAAE,EAAE;YACf,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,EAAE;YACV,UAAU,EAAE,CAAC,qBAAqB,EAAC,gBAAgB,EAAC,gBAAgB,EAAC,eAAe,EAAC,kBAAkB,CAAC;YACxG,UAAU,EAAE,eAAe;YAC3B,uCAAuC;YACvC,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE;gBACJ,uBAAuB;gBACvB,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CA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BAAgB,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC;IA5KQ,sBAAsB;QALlC,SAAS,CAAC;YACT,QAAQ,EAAE,oBAAoB;YAC9B,WAAW,EAAE,iCAAiC;YAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;SAC/C,CAAC;iDAYiB,cAAc;YACD,kBAAkB;YACxB,YAAY;YACtB,eAAe;YACX,MAAM;OAfb,sBAAsB,CA8UlC;IAAD,6BAAC;CAAA,AA9UD,IA8UC;SA9UY,sBAAsB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.spec.js b/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.spec.js new file mode 100644 index 000000000..d6dd42d1e --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { AwardAltruismComponent } from './award-altruism.component'; +describe('AwardAltruismComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [AwardAltruismComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(AwardAltruismComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=award-altruism.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.spec.js.map b/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.spec.js.map new file mode 100644 index 000000000..3ae4de4fd --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-altruism/award-altruism.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award-altruism.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/award-altruism/award-altruism.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,QAAQ,CAAC,wBAAwB,EAAE;IACjC,IAAI,SAAiC,CAAC;IACtC,IAAI,OAAiD,CAAC;IAEtD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,sBAAsB,CAAE;YACxC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;QAC1D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.js b/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.js new file mode 100644 index 000000000..a3e4cfdc0 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.js @@ -0,0 +1,309 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +import { AwsS3Service } from 'src/app/storage/aws-s3.service'; +import * as moment from 'moment'; +import { DatabaseService } from 'src/app/monitor/database.service'; +var AwardMemesComponent = /** @class */ (function () { + //src="{{whichImage}}" + function AwardMemesComponent(route, userProfileService, awsS3Service, db, router) { + this.route = route; + this.userProfileService = userProfileService; + this.awsS3Service = awsS3Service; + this.db = db; + this.router = router; + this.reinforcementObj = {}; + this.reinforcement_data = {}; + this.pageTitle = " Award_Meme"; + this.viewWidth = 512; + this.viewHeight = 350; + this.timeStep = (1 / 60); + this.modalObjectNavigationExtras = {}; + this.reinforcementObj['ds'] = 1; + this.reinforcementObj['reward'] = 1; + this.reinforcementObj['reward_type'] = 'meme'; + } + AwardMemesComponent.prototype.ngOnInit = function () { + var _this = this; + this.route.queryParams.subscribe(function (params) { + if (_this.router.getCurrentNavigation().extras.state) { + _this.date = _this.router.getCurrentNavigation().extras.state.date; + _this.reinforcementObj['prob'] = _this.router.getCurrentNavigation().extras.state.prob; + _this.reinforcement_data = _this.router.getCurrentNavigation().extras.state.reinforcement_data; + _this.modalObjectNavigationExtras = _this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras; + console.log("Inside AwardMemes, date is: " + _this.date + " prob is: " + _this.reinforcementObj['prob']); + } + }); + }; + AwardMemesComponent.prototype.ngAfterViewInit = function () { + var _this = this; + //var randomInt = Math.floor(Math.random() * 5) + 1; + //this.whichImage = "./assets/memes/"+randomInt+".jpg"; + //console.log('Reading local json files: ' + this.fileLink); + fetch('./assets/memes/memefile.json').then(function (res) { return tslib_1.__awaiter(_this, void 0, void 0, function () { + var _a; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, res.json()]; + case 1: + _a.meme_data = _b.sent(); + this.showmemes(); + return [2 /*return*/]; + } + }); + }); }); + }; + AwardMemesComponent.prototype.ionViewDidEnter = function () { + var _this = this; + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Enter", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + }; + AwardMemesComponent.prototype.ionViewDidLeave = function () { + var _this = this; + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Leave", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + }; + AwardMemesComponent.prototype.showmemes = function () { + var _this = this; + //window.localStorage['meme_shuffle5'] = "[]"; + //var randomInt = Math.floor(Math.random() * this.meme_data.length); + //this.whichImage = "./assets/memes/"+this.meme_data[randomInt]["filename"]; + //console.log('Meme data: ' + JSON.stringify(this.meme_data)); + this.meme_data = this.shuffle(this.meme_data); + //console.log('Meme suffled: ' + JSON.stringify(this.meme_data)); + var picked_meme = this.pick_meme(this.meme_data); + var already_shown = window.localStorage["already_shown_memes3"]; + if (already_shown == undefined) + already_shown = [{ "filename": "assets/memes/4.jpg", "unlock_date": moment().format('MM/DD/YYYY') }]; + else + already_shown = JSON.parse(window.localStorage["already_shown_memes3"]); + console.log("already_shown: " + already_shown); + already_shown.push({ "filename": "assets/memes/" + picked_meme[0]["filename"], "unlock_date": moment().format('MM/DD/YYYY') }); + window.localStorage["already_shown_memes3"] = JSON.stringify(already_shown); + this.whichImage = "./assets/memes/" + picked_meme[0]["filename"]; + this.reinforcementObj['reward_img_link'] = "/memes/" + picked_meme[0]["filename"]; + this.reinforcement_data['reward_img_link'] = "/memes/" + picked_meme[0]["filename"]; + setTimeout(function (e) { return _this.drawImageOnCanvas(_this.whichImage); }, 200); + }; + AwardMemesComponent.prototype.ratingChanged = function (rating) { + if (rating == 0) { + //console.log("thumbs down"); + this.reinforcementObj['Like'] = "No"; + this.reinforcement_data['Like'] = "No"; + window.localStorage.setItem("Like", "No"); + this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); + } + else { + //console.log("thumbs up"); + this.reinforcementObj['Like'] = "Yes"; + this.reinforcement_data['Like'] = "Yes"; + window.localStorage.setItem("Like", "Yes"); + this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); + } + this.userProfileService.addReinforcementData(this.date, this.reinforcementObj); + var navigationExtras = { + state: { + modalObjectNavigationExtras: this.modalObjectNavigationExtras + } + }; + this.router.navigate(['home'], navigationExtras); + }; + /** + * Shuffles array in place if it is not already shuffled + * @param {Array} a items An array containing the items. + */ + AwardMemesComponent.prototype.shuffle = function (a) { + // + //console.log(window.localStorage['meme_shuffle5']); + if (window.localStorage['meme_shuffle6'] == undefined) { + // + var j, x, i; + for (i = a.length - 1; i > 0; i--) { + j = Math.floor(Math.random() * (i + 1)); + x = a[i]; + a[i] = a[j]; + a[j] = x; + //console.log(JSON.stringify(a[i][0]) + "," + JSON.stringify(a[j][0])); + //console.log('Meme data: ' + i + ", " + JSON.stringify(a)); + } + // + window.localStorage['meme_shuffle6'] = JSON.stringify(a); + return a; + } + else { + a = JSON.parse(window.localStorage['meme_shuffle6']); + return a; + } + }; + /** + * Shuffles array in place if it is not already shuffled + * @param {Array} a items An array containing the items. + */ + AwardMemesComponent.prototype.pick_meme = function (a) { + var picked_meme = a.splice(0, 1); + a.push(picked_meme[0]); + window.localStorage['meme_shuffle6'] = JSON.stringify(a); + return picked_meme; + }; + // + AwardMemesComponent.prototype.initDrawingCanvas = function () { + /* + this.drawingCanvas.style.width = '100%'; + this.drawingCanvas.width = this.drawingCanvas.offsetWidth; + this.drawingCanvas.style.height = '90%'; + this.ctx = this.drawingCanvas.getContext('2d'); + */ + //createLoader(); + //createExploader(); + //createParticles(); + }; + AwardMemesComponent.prototype.drawImageOnCanvas = function (imageF_file_path) { + /* + // + var imageObj = new Image(); + imageObj.src = imageF_file_path; + + // + var drawingCanvas = document.getElementById("drawing_canvas"); + drawingCanvas.style.width = '100%'; + drawingCanvas.width = drawingCanvas.offsetWidth; + + var ctx = drawingCanvas.getContext('2d'); + + // + imageObj.onload = function () { + console.log("print: " + (imageObj.height/imageObj.width)); + drawingCanvas.height = Math.abs(drawingCanvas.width*(imageObj.height/imageObj.width)); + + ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle + 0, 0, drawingCanvas.width, drawingCanvas.height); // destination rectangle + + // + + } + */ + //this.HeartsBackground.initialize(drawingCanvas); + this.drawConfetti(); + }; + //draws confetti + AwardMemesComponent.prototype.drawConfetti = function () { + var canvas = document.getElementById("hearts_canvas"); //$('#canvas')[0]; hearts_canvas + //https://www.kirilv.com/canvas-confetti/ + // you should only initialize a canvas once, so save this function + // we'll save it to the canvas itself for the purpose of this demo + //@ts-ignore + canvas.confetti = canvas.confetti || confetti.create(canvas, { resize: true }); + canvas.width = window.innerWidth; + canvas.height = window.innerHeight - 170; + /* + canvas.confetti({ + angle: this.randomInRange(55, 125), + spread: this.randomInRange(50, 70), + particleCount: this.randomInRange(50, 100), + origin: { y: 0.6, x: 0.5 } + }); + */ + // + if (Math.random() > 0.5) + this.drawRealisticConfetti(canvas); + else + this.drawConfettiFireworks(canvas); + }; + AwardMemesComponent.prototype.drawConfettiFireworks = function (canvas) { + var duration = 1 * 1200; + var animationEnd = Date.now() + duration; + var defaults = { startVelocity: 30, spread: 100, ticks: 60, zIndex: 0 }; + function randomInRange(min, max) { + return Math.random() * (max - min) + min; + } + var interval = setInterval(function () { + var timeLeft = animationEnd - Date.now(); + if (timeLeft <= 0) { + return clearInterval(interval); + } + var particleCount = 50 * (timeLeft / duration); + // since particles fall down, start a bit higher than random + canvas.confetti(Object.assign({}, defaults, { particleCount: particleCount, origin: { x: randomInRange(0.2, 0.4), y: Math.random() - 0.0 } })); + canvas.confetti(Object.assign({}, defaults, { particleCount: particleCount, origin: { x: randomInRange(0.6, 0.8), y: Math.random() - 0.0 } })); + }, 250); + }; + AwardMemesComponent.prototype.drawConfettiVanillaDirection = function (canvas) { + canvas.confetti({ + particleCount: 100, + spread: 70, + origin: { y: 0.5, x: 0.5 } + }); + }; + AwardMemesComponent.prototype.drawConfettiRandomDirection = function (canvas) { + canvas.confetti({ + angle: this.randomInRange(55, 125), + spread: this.randomInRange(50, 70), + particleCount: this.randomInRange(50, 100), + origin: { y: 0.5, x: 0.5 } + }); + }; + AwardMemesComponent.prototype.drawRealisticConfetti = function (canvas) { + this.confettiFire(0.25, { + spread: 26, + startVelocity: 100, + }, canvas); + this.confettiFire(0.2, { + spread: 60, + }, canvas); + this.confettiFire(0.35, { + spread: 100, + decay: 0.99, + }, canvas); + this.confettiFire(0.1, { + spread: 120, + startVelocity: 100, + decay: 0.99, + }, canvas); + this.confettiFire(0.1, { + spread: 120, + startVelocity: 100, + }, canvas); + // + setTimeout(function () { + canvas.confetti.reset(); + }, 1200); + }; + AwardMemesComponent.prototype.confettiFire = function (particleRatio, opts, canvas) { + var count = 200; + var defaults = { + origin: { y: 0.8 } + }; + canvas.confetti(Object.assign({}, defaults, opts, { + particleCount: Math.floor(count * particleRatio) + })); + }; + AwardMemesComponent.prototype.randomInRange = function (min, max) { + return Math.random() * (max - min) + min; + }; + AwardMemesComponent = tslib_1.__decorate([ + Component({ + selector: 'app-award-memes', + templateUrl: './award-memes.component.html', + styleUrls: ['./award-memes.component.scss'], + }) + //declare let confetti: any; + , + tslib_1.__metadata("design:paramtypes", [ActivatedRoute, + UserProfileService, + AwsS3Service, + DatabaseService, + Router]) + ], AwardMemesComponent); + return AwardMemesComponent; +}()); +export { AwardMemesComponent }; +//# sourceMappingURL=award-memes.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.js.map b/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.js.map new file mode 100644 index 000000000..c0e36203d --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award-memes.component.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/award-memes/award-memes.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,EAAoB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAC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AAG,CAAC;QAChB,IAAI,QAAQ,GAAG;YACb,MAAM,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE;SACnB,CAAC;QACF,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAChD,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,aAAa,CAAC;SACjD,CAAC,CAAC,CAAC;IACN,CAAC;IACD,2CAAa,GAAb,UAAc,GAAG,EAAE,GAAG;QACpB,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;IAC3C,CAAC;IAjUU,mBAAmB;QAR/B,SAAS,CAAC;YACT,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,8BAA8B;YAC3C,SAAS,EAAE,CAAC,8BAA8B,CAAC;SAC5C,CAAC;QAEF,4BAA4B;;iDAoBT,cAAc;YACD,kBAAkB;YACxB,YAAY;YACtB,eAAe;YACX,MAAM;OAtBb,mBAAmB,CAkU/B;IAAD,0BAAC;CAAA,AAlUD,IAkUC;SAlUY,mBAAmB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.spec.js b/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.spec.js new file mode 100644 index 000000000..44077d3a4 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { AwardMemesComponent } from './award-memes.component'; +describe('AwardMemesComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [AwardMemesComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(AwardMemesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=award-memes.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.spec.js.map b/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.spec.js.map new file mode 100644 index 000000000..0a4bb9297 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-memes/award-memes.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award-memes.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/award-memes/award-memes.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,QAAQ,CAAC,qBAAqB,EAAE;IAC9B,IAAI,SAA8B,CAAC;IACnC,IAAI,OAA8C,CAAC;IAEnD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,mBAAmB,CAAE;YACrC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;QACvD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.js b/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.js new file mode 100644 index 000000000..790eee94b --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.js @@ -0,0 +1,94 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import * as moment from 'moment'; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +var AwardDollarService = /** @class */ (function () { + //userProfileService: UserProfileService;; + function AwardDollarService(userProfileService) { + this.userProfileService = userProfileService; + //this.userProfileService = userProfileService2; + } + AwardDollarService.prototype.getDollars = function () { + //---- load dollar amount from local storage, and if "undefined" then assign value to zero. + if (window.localStorage['AwardDollar'] == undefined) + this.awardDollar = 0; + else + this.awardDollar = parseInt(window.localStorage['AwardDollar']); + // + return this.awardDollar; + }; + AwardDollarService.prototype.giveDollars = function () { + var daily_survey = this.userProfileService.userProfile.survey_data.daily_survey; + //get the first date + var first_date = moment().format('YYYYMMDD'); + var first_date_moment_js = moment(first_date, "YYYYMMDD"); + var key_moment_js; + for (var key in daily_survey) { + key_moment_js = moment(key, "YYYYMMDD"); + //takes the first day only. But it may not be the first date. + if (key_moment_js < first_date_moment_js) { + first_date = key; + first_date_moment_js = moment(first_date, "YYYYMMDD"); + } + } + var todays_date = moment().format('YYYYMMDD'); + if (todays_date == first_date) { + this.awardDollar = 1; + //---- save the dollar ammount + window.localStorage.setItem("AwardDollar", "" + this.awardDollar); + return this.awardDollar; + } + //---- load dollar amount from local storage, and if "undefined" then assign value to zero. + if (window.localStorage['AwardDollar'] == undefined) + this.awardDollar = 0; + else + this.awardDollar = parseInt(window.localStorage['AwardDollar']); + //console.log(window.localStorage["AwardDollarDates"]); + this.awardDollarObj = window.localStorage["AwardDollarDates"]; + if ((this.awardDollarObj == undefined) || (JSON.parse(this.awardDollarObj) == null)) { + this.awardDollarObj = {}; + this.awardDollarObj['dates'] = [moment().format("DD-MM-YYYY")]; + window.localStorage.setItem("AwardDollarDates", JSON.stringify(this.awardDollarObj)); + } + else { + console.log(window.localStorage["AwardDollarDates"]); + this.awardDollarObj = JSON.parse(window.localStorage["AwardDollarDates"]); + if (this.awardDollarObj['dates'].length < 2) { + //compute previous date, and see if it exist + var previousdate = moment().subtract(1, "days").format("DD-MM-YYYY"); + var dates = this.awardDollarObj["dates"]; + var dateIndex = dates.indexOf(previousdate); + // + if (dateIndex > -1) { + //previous date exist, we will pushing the current date to the "survey-completed" dates. + this.awardDollarObj['dates'].push(moment().format("DD-MM-YYYY")); + } + else { + // if the date saved is not the previous day of today, remove it + // save current date to AwardDollarDates. This means a new streak has started. + this.awardDollarObj['dates'] = [moment().format("DD-MM-YYYY")]; + } + window.localStorage.setItem("AwardDollarDates", JSON.stringify(this.awardDollarObj)); + } + else { + //means a streak has been completed, so awad one dollar, remove all dates. + this.awardDollar = this.awardDollar + 1; + //next time, it will be undefined and we will start a new streak next time. + window.localStorage.removeItem('AwardDollarDates'); + } + } + console.log("awardDollarObj: " + JSON.stringify(this.awardDollarObj)); + //---- save the dollar ammount + window.localStorage.setItem("AwardDollar", "" + this.awardDollar); + return this.awardDollar; + }; + AwardDollarService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [UserProfileService]) + ], AwardDollarService); + return AwardDollarService; +}()); +export { AwardDollarService }; +//# sourceMappingURL=award-dollar.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.js.map b/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.js.map new file mode 100644 index 000000000..1985121c0 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award-dollar.service.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/award-money/award-dollar.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;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G,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;gBAE5C,EAAE;gBACF,IAAI,SAAS,GAAG,CAAC,CAAC,EAAE;oBAClB,wFAAwF;oBACxF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;iBAClE;qBAAM;oBACL,iEAAiE;oBACjE,8EAA8E;oBAC9E,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;iBAChE;gBACD,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;aACtF;iBAAM;gBACL,0EAA0E;gBAC1E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;gBACxC,2EAA2E;gBAC3E,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;aACpD;SACJ;QAGD,OAAO,CAAC,GAAG,CAAC,kBAAkB,GAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QAEpE,8BAA8B;QAC9B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,GAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEhE,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAjGU,kBAAkB;QAH9B,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;iDAOwC,kBAAkB;OAN/C,kBAAkB,CAkG9B;IAAD,yBAAC;CAAA,AAlGD,IAkGC;SAlGY,kBAAkB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.spec.js b/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.spec.js new file mode 100644 index 000000000..8b9cd424a --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { AwardDollarService } from './award-dollar.service'; +describe('AwardDollarService', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(AwardDollarService); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=award-dollar.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.spec.js.map b/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.spec.js.map new file mode 100644 index 000000000..b4497dfb4 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award-money/award-dollar.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award-dollar.service.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/award-money/award-dollar.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,QAAQ,CAAC,oBAAoB,EAAE;IAC7B,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAAuB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QACpE,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award/award.component.js b/dist/out-tsc/src/app/incentive/award/award.component.js new file mode 100644 index 000000000..6f81a0737 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award/award.component.js @@ -0,0 +1,18 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +var AwardComponent = /** @class */ (function () { + function AwardComponent() { + } + AwardComponent.prototype.ngOnInit = function () { }; + AwardComponent = tslib_1.__decorate([ + Component({ + selector: 'app-award', + templateUrl: './award.component.html', + styleUrls: ['./award.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", []) + ], AwardComponent); + return AwardComponent; +}()); +export { AwardComponent }; +//# sourceMappingURL=award.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award/award.component.js.map b/dist/out-tsc/src/app/incentive/award/award.component.js.map new file mode 100644 index 000000000..f23a74794 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award/award.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award.component.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/award/award.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAOlD;IAEE;IAAgB,CAAC;IAEjB,iCAAQ,GAAR,cAAY,CAAC;IAJF,cAAc;QAL1B,SAAS,CAAC;YACT,QAAQ,EAAE,WAAW;YACrB,WAAW,EAAE,wBAAwB;YACrC,SAAS,EAAE,CAAC,wBAAwB,CAAC;SACtC,CAAC;;OACW,cAAc,CAM1B;IAAD,qBAAC;CAAA,AAND,IAMC;SANY,cAAc"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award/award.component.spec.js b/dist/out-tsc/src/app/incentive/award/award.component.spec.js new file mode 100644 index 000000000..5e03f86e6 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award/award.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { AwardComponent } from './award.component'; +describe('AwardComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [AwardComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(AwardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=award.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/award/award.component.spec.js.map b/dist/out-tsc/src/app/incentive/award/award.component.spec.js.map new file mode 100644 index 000000000..7b4b3af67 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/award/award.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/award/award.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,QAAQ,CAAC,gBAAgB,EAAE;IACzB,IAAI,SAAyB,CAAC;IAC9B,IAAI,OAAyC,CAAC;IAE9C,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,cAAc,CAAE;YAChC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;QAClD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/incentive.actions.js b/dist/out-tsc/src/app/incentive/incentive.actions.js new file mode 100644 index 000000000..28a04e0f9 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/incentive.actions.js @@ -0,0 +1,4 @@ +import { createAction, props } from '@ngrx/store'; +export var surveyCompletedRegisterUnlocked = createAction("[Survey Page] Survey Completed. Register Unlocked.", props()); +export var unlockedScreenShownAlready = createAction("[Main Page] Survey already shown.", props()); +//# sourceMappingURL=incentive.actions.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/incentive.actions.js.map b/dist/out-tsc/src/app/incentive/incentive.actions.js.map new file mode 100644 index 000000000..8cf4e017d --- /dev/null +++ b/dist/out-tsc/src/app/incentive/incentive.actions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"incentive.actions.js","sourceRoot":"","sources":["../../../../../src/app/incentive/incentive.actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AAIhD,MAAM,CAAC,IAAM,+BAA+B,GAAG,YAAY,CACvD,oDAAoD,EACpD,KAAK,EAAqB,CAC7B,CAAC;AAEF,MAAM,CAAC,IAAM,0BAA0B,GAAG,YAAY,CAClD,mCAAmC,EACnC,KAAK,EAAoC,CAC5C,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/incentive.module.js b/dist/out-tsc/src/app/incentive/incentive.module.js new file mode 100644 index 000000000..f446c6ffa --- /dev/null +++ b/dist/out-tsc/src/app/incentive/incentive.module.js @@ -0,0 +1,52 @@ +import * as tslib_1 from "tslib"; +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; +//import { AwardComponent } from './award/award.component'; +import { AwardMemesComponent } from './award-memes/award-memes.component'; +//import { VisualizationComponent } from './visualization/visualization.component'; +//import { DemoAquariumComponent } from './aquarium/demo-aquarium/demo-aquarium.component'; +//import { SurveyModule } from '../survey/survey.module'; +import { RouterModule } from '@angular/router'; +import { TreasurechestComponent } from './treasurechest/treasurechest.component'; +import { AwardAltruismComponent } from './award-altruism/award-altruism.component'; +import { ModalUnlockedPageComponent } from './aquarium/modal-unlocked-page/modal-unlocked-page.component'; +import { InfoPageComponent } from './info-page/info-page.component'; +import { StoreModule } from '@ngrx/store'; +import { incentiveReducer } from './reducers'; +import { UnlockedMemesComponent } from './unlocked-memes/unlocked-memes.component'; +import { UnlockedAltuisticMessagesComponent } from './unlocked-altuistic-messages/unlocked-altuistic-messages.component'; +import { FishbowlComponent } from './aquarium/previews/fishbowl/fishbowl.component'; +import { SeaComponent } from './aquarium/previews/sea/sea.component'; +import { TundraComponent } from './aquarium/previews/tundra/tundra.component'; +import { RainforestComponent } from './aquarium/previews/rainforest/rainforest.component'; +var routes = [ + // { path: 'award', component: AwardComponent }, + { path: 'award-memes', component: AwardMemesComponent }, +]; +var IncentiveModule = /** @class */ (function () { + function IncentiveModule() { + } + IncentiveModule = tslib_1.__decorate([ + NgModule({ + declarations: [AwardMemesComponent, AwardAltruismComponent, TreasurechestComponent, ModalUnlockedPageComponent, InfoPageComponent, UnlockedMemesComponent, UnlockedAltuisticMessagesComponent, FishbowlComponent, SeaComponent, TundraComponent, RainforestComponent], + imports: [ + CommonModule, + IonicModule.forRoot(), + RouterModule.forChild(routes), + StoreModule.forFeature('incentive', incentiveReducer) + ], + exports: [ + //AwardComponent, + AwardMemesComponent, + AwardAltruismComponent + //VisualizationComponent + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + entryComponents: [ModalUnlockedPageComponent] + }) + ], IncentiveModule); + return IncentiveModule; +}()); +export { IncentiveModule }; +//# sourceMappingURL=incentive.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/incentive.module.js.map b/dist/out-tsc/src/app/incentive/incentive.module.js.map new file mode 100644 index 000000000..7a1a51434 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/incentive.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"incentive.module.js","sourceRoot":"","sources":["../../../../../src/app/incentive/incentive.module.ts"],"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BAAiB,EAAE,sBAAsB,EAAE,kCAAkC,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,CAAC;YACpQ,OAAO,EAAE;gBACP,YAAY;gBACZ,WAAW,CAAC,OAAO,EAAE;gBACrB,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAC7B,WAAW,CAAC,UAAU,CAAC,WAAW,EAAE,gBAAgB,CAAC;aACtD;YACD,OAAO,EAAC;gBACN,kBAAkB;gBAClB,mBAAmB;gBACnB,sBAAsB;gBACtB,wBAAwB;aACzB;YACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;YACjC,eAAe,EAAE,CAAC,0BAA0B,CAAC;SAC9C,CAAC;OACW,eAAe,CAAI;IAAD,sBAAC;CAAA,AAAhC,IAAgC;SAAnB,eAAe"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/incentive.selectors.js b/dist/out-tsc/src/app/incentive/incentive.selectors.js new file mode 100644 index 000000000..bb043657c --- /dev/null +++ b/dist/out-tsc/src/app/incentive/incentive.selectors.js @@ -0,0 +1,13 @@ +import { createFeatureSelector, createSelector } from '@ngrx/store'; +import * as moment from 'moment'; +export var selectAuthState = createFeatureSelector("incentive"); +export var isIncentivesUnlockedForTheDay = createSelector(selectAuthState, function (incentive) { + var currentDate = moment().format('YYYYMMDD'); + if (incentive["timeline"] == undefined) + return undefined; + else if (currentDate in incentive["timeline"]) + return incentive["timeline"][currentDate]; + else + return undefined; +}); +//# sourceMappingURL=incentive.selectors.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/incentive.selectors.js.map b/dist/out-tsc/src/app/incentive/incentive.selectors.js.map new file mode 100644 index 000000000..ccc3c043f --- /dev/null +++ b/dist/out-tsc/src/app/incentive/incentive.selectors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"incentive.selectors.js","sourceRoot":"","sources":["../../../../../src/app/incentive/incentive.selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAE,cAAc,EAAC,MAAM,aAAa,CAAC;AAElE,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAIjC,MAAM,CAAC,IAAM,eAAe,GACxB,qBAAqB,CAAyB,WAAW,CAAC,CAAC;AAG/D,MAAM,CAAC,IAAM,6BAA6B,GAAG,cAAc,CACvD,eAAe,EACf,UAAA,SAAS;IACL,IAAI,WAAW,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9C,IAAG,SAAS,CAAC,UAAU,CAAC,IAAI,SAAS;QACjC,OAAO,SAAS,CAAC;SAChB,IAAG,WAAW,IAAI,SAAS,CAAC,UAAU,CAAC;QACxC,OAAQ,SAAS,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,CAAC;;QAE3C,OAAO,SAAS,CAAC;AACzB,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/info-page/info-page.component.js b/dist/out-tsc/src/app/incentive/info-page/info-page.component.js new file mode 100644 index 000000000..2a32635a5 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/info-page/info-page.component.js @@ -0,0 +1,18 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +var InfoPageComponent = /** @class */ (function () { + function InfoPageComponent() { + } + InfoPageComponent.prototype.ngOnInit = function () { }; + InfoPageComponent = tslib_1.__decorate([ + Component({ + selector: 'app-info-page', + templateUrl: './info-page.component.html', + styleUrls: ['./info-page.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", []) + ], InfoPageComponent); + return InfoPageComponent; +}()); +export { InfoPageComponent }; +//# sourceMappingURL=info-page.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/info-page/info-page.component.js.map b/dist/out-tsc/src/app/incentive/info-page/info-page.component.js.map new file mode 100644 index 000000000..43c842693 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/info-page/info-page.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"info-page.component.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/info-page/info-page.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAOlD;IAEE;IAAgB,CAAC;IAEjB,oCAAQ,GAAR,cAAY,CAAC;IAJF,iBAAiB;QAL7B,SAAS,CAAC;YACT,QAAQ,EAAE,eAAe;YACzB,WAAW,EAAE,4BAA4B;YACzC,SAAS,EAAE,CAAC,4BAA4B,CAAC;SAC1C,CAAC;;OACW,iBAAiB,CAM7B;IAAD,wBAAC;CAAA,AAND,IAMC;SANY,iBAAiB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/info-page/info-page.component.spec.js b/dist/out-tsc/src/app/incentive/info-page/info-page.component.spec.js new file mode 100644 index 000000000..af203aba2 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/info-page/info-page.component.spec.js @@ -0,0 +1,20 @@ +import { async, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; +import { InfoPageComponent } from './info-page.component'; +describe('InfoPageComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [InfoPageComponent], + imports: [IonicModule.forRoot()] + }).compileComponents(); + fixture = TestBed.createComponent(InfoPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=info-page.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/info-page/info-page.component.spec.js.map b/dist/out-tsc/src/app/incentive/info-page/info-page.component.spec.js.map new file mode 100644 index 000000000..94a4c190c --- /dev/null +++ b/dist/out-tsc/src/app/incentive/info-page/info-page.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"info-page.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/info-page/info-page.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,QAAQ,CAAC,mBAAmB,EAAE;IAC5B,IAAI,SAA4B,CAAC;IACjC,IAAI,OAA4C,CAAC;IAEjD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,iBAAiB,CAAE;YACnC,OAAO,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;SACjC,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAEvB,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;QACrD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC,CAAC;IAEJ,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/life-insights.module.js b/dist/out-tsc/src/app/incentive/life-insights/life-insights.module.js new file mode 100644 index 000000000..461352fd6 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/life-insights.module.js @@ -0,0 +1,34 @@ +/* + The profile for questions is stored in /assets/data/life_insight.json +*/ +import * as tslib_1 from "tslib"; +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { IonicModule } from '@ionic/angular'; +import { Q1MotivatedComponent } from './q1-motivated/q1-motivated.component'; +import { SampleLifeInsightsComponent } from './sample-life-insights/sample-life-insights.component'; +import { RouterModule } from '@angular/router'; +import { FormsModule } from '@angular/forms'; +var routes = [ + { path: 'sample-life-insights', component: SampleLifeInsightsComponent } +]; +var LifeInsightsModule = /** @class */ (function () { + function LifeInsightsModule() { + } + LifeInsightsModule = tslib_1.__decorate([ + NgModule({ + declarations: [Q1MotivatedComponent, SampleLifeInsightsComponent], + imports: [ + CommonModule, + FormsModule, + IonicModule.forRoot(), + RouterModule.forChild(routes) + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + exports: [Q1MotivatedComponent, SampleLifeInsightsComponent] + }) + ], LifeInsightsModule); + return LifeInsightsModule; +}()); +export { LifeInsightsModule }; +//# sourceMappingURL=life-insights.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/life-insights.module.js.map b/dist/out-tsc/src/app/incentive/life-insights/life-insights.module.js.map new file mode 100644 index 000000000..505c03ccb --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/life-insights.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"life-insights.module.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/life-insights/life-insights.module.ts"],"names":[],"mappings":"AACA;;EAEE;;AAEF,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AACpG,OAAO,EAAU,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,IAAM,MAAM,GAAW;IACnB,EAAE,IAAI,EAAE,sBAAsB,EAAE,SAAS,EAAE,2BAA2B,EAAE;CAC3E,CAAC;AAaF;IAAA;IAAkC,CAAC;IAAtB,kBAAkB;QAX9B,QAAQ,CAAC;YACR,YAAY,EAAE,CAAC,oBAAoB,EAAC,2BAA2B,CAAC;YAChE,OAAO,EAAE;gBACP,YAAY;gBACZ,WAAW;gBACX,WAAW,CAAC,OAAO,EAAE;gBACrB,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;aAC9B;YACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;YACjC,OAAO,EAAC,CAAC,oBAAoB,EAAC,2BAA2B,CAAC;SAC3D,CAAC;OACW,kBAAkB,CAAI;IAAD,yBAAC;CAAA,AAAnC,IAAmC;SAAtB,kBAAkB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.js b/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.js new file mode 100644 index 000000000..4f747863f --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.js @@ -0,0 +1,122 @@ +import * as tslib_1 from "tslib"; +import { Component, ViewChild, ElementRef, Input } from '@angular/core'; +import { Chart } from 'chart.js'; +var Q1MotivatedComponent = /** @class */ (function () { + function Q1MotivatedComponent() { + } + Object.defineProperty(Q1MotivatedComponent.prototype, "jsonObj", { + get: function () { + // transform value for display + return this._jsonObj; + }, + set: function (jsonObj) { + console.log('prev _jsonObj: ', this._jsonObj); + console.log('got jsonObj: ', jsonObj); + this._jsonObj = jsonObj; + }, + enumerable: true, + configurable: true + }); + Q1MotivatedComponent.prototype.ngOnInit = function () { + //console.log(this.inputStr); + //this.jsonObj = JSON.parse(this.inputStr); + console.log("Q1MotivatedComponent " + JSON.stringify(this._jsonObj)); + this.imgloc = this._jsonObj.imgloc; + this.title = this._jsonObj.title; + this.subtext = this._jsonObj.subtext; + this.topSubtext = this._jsonObj.topSubtext; + this.bottomSubtext = this._jsonObj.bottomSubtext; + this.question = this._jsonObj.question; + this.data = this._jsonObj.data; + this.labels = this._jsonObj.labels; + this.qYaxis = this._jsonObj.qYaxis; + this.lineChart = new Chart(this.lineCanvas.nativeElement, { + type: "line", + data: { + labels: this.labels, + datasets: [ + { + label: "My First dataset", + fill: false, + lineTension: 0.1, + backgroundColor: "rgba(75,192,192,0.4)", + borderColor: "rgba(75,192,192,1)", + borderCapStyle: "butt", + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: "miter", + pointBorderColor: "rgba(75,192,192,1)", + pointBackgroundColor: "rgba(75,192,192,1)", + pointBorderWidth: 1, + pointHoverRadius: 5, + pointHoverBackgroundColor: "rgba(75,192,192,1)", + pointHoverBorderColor: "rgba(220,220,220,1)", + pointHoverBorderWidth: 2, + pointRadius: 4, + pointHitRadius: 10, + data: this.data, + spanGaps: false + } + ] + }, + options: { + tooltips: { enabled: false }, + hover: { mode: null }, + legend: { + display: false + }, + maintainAspectRatio: false, + layout: { + padding: { + left: 5, + right: 5, + top: 15, + bottom: 5 + } + }, + scales: { + yAxes: [{ + scaleLabel: { + display: true, + labelString: this.qYaxis, + fontColor: "#000" + }, + ticks: { + max: 4, + min: 0, + stepSize: 1, + display: true + } + }], + xAxes: [{ + scaleLabel: { + display: true, + labelString: 'Day', + fontColor: "#000" + } + }], + } + } + }); + }; + tslib_1.__decorate([ + ViewChild('lineCanvas', { static: true }), + tslib_1.__metadata("design:type", ElementRef) + ], Q1MotivatedComponent.prototype, "lineCanvas", void 0); + tslib_1.__decorate([ + Input(), + tslib_1.__metadata("design:type", Object), + tslib_1.__metadata("design:paramtypes", [Object]) + ], Q1MotivatedComponent.prototype, "jsonObj", null); + Q1MotivatedComponent = tslib_1.__decorate([ + Component({ + selector: 'app-q1-motivated', + templateUrl: './q1-motivated.component.html', + styleUrls: ['./q1-motivated.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", []) + ], Q1MotivatedComponent); + return Q1MotivatedComponent; +}()); +export { Q1MotivatedComponent }; +//# sourceMappingURL=q1-motivated.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.js.map b/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.js.map new file mode 100644 index 000000000..36c50149e --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"q1-motivated.component.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/life-insights/q1-motivated/q1-motivated.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAQjC;IAuBE;IACA,CAAC;IAED,sBAAI,yCAAO;aAAX;YACE,8BAA8B;YAC9B,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;aAGD,UAAY,OAAY;YACtB,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC9C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;YACtC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAC1B,CAAC;;;OAPA;IASD,uCAAQ,GAAR;QAEE,6BAA6B;QAC7B,2CAA2C;QAC3C,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;Q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iBACF;gBACD,MAAM,EAAE;oBACN,KAAK,EAAE,CAAC;4BACN,UAAU,EAAE;gCACV,OAAO,EAAE,IAAI;gCACb,WAAW,EAAE,IAAI,CAAC,MAAM;gCACxB,SAAS,EAAE,MAAM;6BAClB;4BACD,KAAK,EAAE;gCACL,GAAG,EAAE,CAAC;gCACN,GAAG,EAAE,CAAC;gCACN,QAAQ,EAAE,CAAC;gCACX,OAAO,EAAE,IAAI;6BACd;yBACF,CAAC;oBACF,KAAK,EAAE,CAAC;4BACN,UAAU,EAAE;gCACV,OAAO,EAAE,IAAI;gCACb,WAAW,EAAE,KAAK;gCAClB,SAAS,EAAE,MAAM;6BAClB;yBACF,CAAC;iBACH;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAzHwC;QAAxC,SAAS,CAAC,YAAY,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC;0CAAa,UAAU;4DAAiB;IA8BhF;QADC,KAAK,EAAE;;;uDAKP;IApCU,oBAAoB;QALhC,SAAS,CAAC;YACT,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,+BAA+B;YAC5C,SAAS,EAAE,CAAC,+BAA+B,CAAC;SAC7C,CAAC;;OACW,oBAAoB,CAyLhC;IAAD,2BAAC;CAAA,AAzLD,IAyLC;SAzLY,oBAAoB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.spec.js b/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.spec.js new file mode 100644 index 000000000..a196ef456 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { Q1MotivatedComponent } from './q1-motivated.component'; +describe('Q1MotivatedComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [Q1MotivatedComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(Q1MotivatedComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=q1-motivated.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.spec.js.map b/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.spec.js.map new file mode 100644 index 000000000..a7992f5e8 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/q1-motivated/q1-motivated.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"q1-motivated.component.spec.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/life-insights/q1-motivated/q1-motivated.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,QAAQ,CAAC,sBAAsB,EAAE;IAC/B,IAAI,SAA+B,CAAC;IACpC,IAAI,OAA+C,CAAC;IAEpD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,oBAAoB,CAAE;YACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC;QACxD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.js b/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.js new file mode 100644 index 000000000..256ceb660 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.js @@ -0,0 +1,191 @@ +import * as tslib_1 from "tslib"; +import { Component, ViewChild, ElementRef } from '@angular/core'; +import { Chart } from 'chart.js'; +import * as moment from 'moment'; +//import * as lifeInsightProfile from "../../../../assets/data/life_insight.json"; +//import { PreLoad } from '../../../PreLoad'; +var SampleLifeInsightsComponent = /** @class */ (function () { + function SampleLifeInsightsComponent() { + this.index = 0; + } + /* get jsonObj(): any { + // transform value for display + return this._jsonObj; + } + + @Input() + set jsonObj(jsonObj: any) { + console.log('prev _jsonObj: ', this._jsonObj); + console.log('got jsonObj: ', jsonObj); + this._jsonObj = jsonObj; + } */ + SampleLifeInsightsComponent.prototype.ngOnInit = function () { + this.init(this.index); + }; + SampleLifeInsightsComponent.prototype.init = function (index) { + //console.log(this.inputStr); + //this.jsonObj = JSON.parse(this.inputStr); + var lifeInsightProfile = { + "questions": ["Q3d", "Q4d", "Q5d", "Q8d"], + "qimgs": ["assets/img/stress.png", "assets/img/freetime.png", "assets/img/dance2.png", "assets/img/social.png"], + "lifeInsightsTitle": ["How much pain are you currently experiencing?", + "How much fatigue are you currently experiencing?", + "How much nausea are you currently experiencing?", + "How motivated are you to take 6MP today?"], + "qYaxis": ["Pain level", "Fatigue level", "Nausea level", "Degree of motivation"], + "qSubText": ["0 = low pain, 4 = severe pain", + "0 = low fatigue, 4 = severe fatigue", + "0 = low nausea, 4 = severe nausea", + "0 = less motivated, 4 = highly motivated"], + "lifeInsightsHighStress": [ + "Stressed ", + "Fatigued ", + "Nausea ", + "Motivated " + ], + "lifeInsightsLowStress": [ + "Relaxed ", + "Fatigued ", + "Nausea ", + "Motivated " + ] + }; + this.index = Math.floor(Math.random() * lifeInsightProfile.questions.length); + this.question = lifeInsightProfile.questions[this.index]; + this.imgloc = lifeInsightProfile.qimgs[this.index]; + this.title = lifeInsightProfile.lifeInsightsTitle[this.index]; + this.qYaxis = lifeInsightProfile.qYaxis[this.index]; + this.subtext = lifeInsightProfile.qSubText[this.index]; + this.topSubtext = lifeInsightProfile.lifeInsightsHighStress[this.index]; + this.bottomSubtext = lifeInsightProfile.lifeInsightsLowStress[this.index]; + this.qYaxisArray = lifeInsightProfile.qYaxis; + this.selectedValue = lifeInsightProfile.qYaxis[this.index]; + //read data from localStorage + if (window.localStorage.getItem("lifeInsight") == undefined) { + console.log("Undefined!"); + this.data = [0, 1, 3, 4, null, 3, 1]; + //this.inputString = JSON.stringify(this.inputJson); + } + else { + var lifeInsightObj = JSON.parse(window.localStorage.getItem("lifeInsight")); + console.log(JSON.stringify(lifeInsightObj)); + this.data = []; + this.labels = []; + for (var i = 6; i >= 0; i--) { + var currentdate = moment().subtract(i, "days").format("DD-MM-YYYY"); + //console.log("Inside loop: currentdate: "+currentdate); + if (i == 0) { + this.labels.push("Today"); + } + else { + this.labels.push(moment().subtract(i, "days").format("MM/DD")); + } + //console.log("Local Storage save: "+question+" "+JSON.stringify(lifeInsightObj[question])); + var dates = lifeInsightObj[this.question]["dates"]; + var dateIndex = dates.lastIndexOf(currentdate); + if (dateIndex > -1) { + this.data.push(lifeInsightObj[this.question]['data'][dateIndex]); + } + else { + this.data.push(null); + } + } + //this.data = [null, null, null, null, null, null, 1]; + console.log("Data, " + this.data); + } + this.lineChart = new Chart(this.lineCanvas.nativeElement, { + type: "line", + data: { + labels: this.labels, + datasets: [ + { + label: "My First dataset", + fill: false, + lineTension: 0.1, + backgroundColor: "rgba(75,192,192,0.4)", + borderColor: "rgba(75,192,192,1)", + borderCapStyle: "butt", + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: "miter", + pointBorderColor: "rgba(75,192,192,1)", + pointBackgroundColor: "rgba(75,192,192,1)", + pointBorderWidth: 1, + pointHoverRadius: 5, + pointHoverBackgroundColor: "rgba(75,192,192,1)", + pointHoverBorderColor: "rgba(220,220,220,1)", + pointHoverBorderWidth: 2, + pointRadius: 4, + pointHitRadius: 10, + data: this.data, + spanGaps: false + } + ] + }, + options: { + tooltips: { enabled: false }, + hover: { mode: null }, + legend: { + display: false + }, + maintainAspectRatio: false, + layout: { + padding: { + left: 5, + right: 5, + top: 15, + bottom: 5 + } + }, + scales: { + yAxes: [{ + scaleLabel: { + display: true, + labelString: this.qYaxis, + fontColor: "#000" + }, + ticks: { + max: 4, + min: 0, + stepSize: 1, + display: true + } + }], + xAxes: [{ + scaleLabel: { + display: true, + labelString: 'Day', + fontColor: "#000" + } + }], + } + } + }); + }; + SampleLifeInsightsComponent.prototype.ratingChanged = function (rating) { + if (rating == 0) + console.log("thumbs down"); + else + console.log("thumbs up"); + //this.router.navigate(['incentive/aquarium/aquariumone']); + //this.router.navigate(['/home']); + window.location.href = '/home'; + }; + tslib_1.__decorate([ + ViewChild('lineCanvas', { static: true }), + tslib_1.__metadata("design:type", ElementRef) + ], SampleLifeInsightsComponent.prototype, "lineCanvas", void 0); + SampleLifeInsightsComponent = tslib_1.__decorate([ + Component({ + selector: 'app-sample-life-insights', + templateUrl: './sample-life-insights.component.html', + styleUrls: ['./sample-life-insights.component.scss'], + }) + //@PreLoad('q1lifeinsight') + , + tslib_1.__metadata("design:paramtypes", []) + ], SampleLifeInsightsComponent); + return SampleLifeInsightsComponent; +}()); +export { SampleLifeInsightsComponent }; +//# sourceMappingURL=sample-life-insights.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.js.map b/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.js.map new file mode 100644 index 000000000..1fc3b9552 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sample-life-insights.component.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,kFAAkF;AAClF,6CAA6C;AAS7C;IA4BE;QARA,UAAK,GAAG,CAAC,CAAC;IASV,CAAC;IAEH;;;;;;;;;;UAUM;IAEJ,8CAAQ,GAAR;QACE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAExB,CAAC;IAED,0CAAI,GAAJ,UAAK,KAAa;QAChB,6BAA6B;QAC7B,2CAA2C;QAEzC,IAAI,kBAAkB,GAAG;YACvB,WAAW,EAAC,CAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,KAAK,CAAC;YACrC,OAAO,EAAE,CAAC,uBAAuB,EAAC,yBAAyB,EAAC,uBAAuB,EAAC,uBAAuB,CAAC;YAC5G,mBAAmB,EAAE,CAAC,sDAAsD;gBACxE,yDAAyD;gBACzD,wDAAwD;gBACxD,iDAAiD,CAAC;YACtD,QAAQ,EAAE,CAAC,YAAY,EAAC,eAAe,EAAC,cAAc,EAAC,sBAAsB,CAAC;YAC9E,UAAU,EAAE,CAAC,+BAA+B;gBACpC,qCAAqC;gBACrC,mCAAmC;gBACnC,0CAA0C,CAAC;YACnD,wBAAwB,EAAE;gBACtB,4EAA4E;gBAC5E,4EAA4E;gBAC5E,0EAA0E;gBAC1E,6EAA6E;aAAC;YAClF,uBAAuB,EAAE;gBACrB,oEAAoE;gBACpE,qEAAqE;gBACrE,mEAAmE;gBACnE,sEAAsE;aAAC;SAC9E,CAAC;QAEF,IAAI,CAAC,K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4BACD,KAAK,EAAE;gCACL,GAAG,EAAE,CAAC;gCACN,GAAG,EAAE,CAAC;gCACN,QAAQ,EAAE,CAAC;gCACX,OAAO,EAAE,IAAI;6BACd;yBACF,CAAC;oBACF,KAAK,EAAE,CAAC;4BACN,UAAU,EAAE;gCACV,OAAO,EAAE,IAAI;gCACb,WAAW,EAAE,KAAK;gCAClB,SAAS,EAAE,MAAM;6BAClB;yBACF,CAAC;iBACH;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,mDAAa,GAAb,UAAc,MAAM;QAClB,IAAG,MAAM,IAAE,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;;YAE3B,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAE3B,2DAA2D;QAC3D,kCAAkC;QAClC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC;IACjC,CAAC;IAxMwC;QAAxC,SAAS,CAAC,YAAY,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC;0CAAa,UAAU;mEAAiB;IAFrE,2BAA2B;QAPvC,SAAS,CAAC;YACT,QAAQ,EAAE,0BAA0B;YACpC,WAAW,EAAE,uCAAuC;YACpD,SAAS,EAAE,CAAC,uCAAuC,CAAC;SACrD,CAAC;QAEF,2BAA2B;;;OACd,2BAA2B,CAmNvC;IAAD,kCAAC;CAAA,AAnND,IAmNC;SAnNY,2BAA2B"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.spec.js b/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.spec.js new file mode 100644 index 000000000..f8c20a4da --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { SampleLifeInsightsComponent } from './sample-life-insights.component'; +describe('SampleLifeInsightsComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [SampleLifeInsightsComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(SampleLifeInsightsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=sample-life-insights.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.spec.js.map b/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.spec.js.map new file mode 100644 index 000000000..5ef45bf92 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sample-life-insights.component.spec.js","sourceRoot":"","sources":["../../../../../../../src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,QAAQ,CAAC,6BAA6B,EAAE;IACtC,IAAI,SAAsC,CAAC;IAC3C,IAAI,OAAsD,CAAC;IAE3D,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,2BAA2B,CAAE;YAC7C,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC;QAC/D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/model/unlocked-incentives.js b/dist/out-tsc/src/app/incentive/model/unlocked-incentives.js new file mode 100644 index 000000000..ee47efd44 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/model/unlocked-incentives.js @@ -0,0 +1 @@ +//# sourceMappingURL=unlocked-incentives.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/model/unlocked-incentives.js.map b/dist/out-tsc/src/app/incentive/model/unlocked-incentives.js.map new file mode 100644 index 000000000..f07ad0e5d --- /dev/null +++ b/dist/out-tsc/src/app/incentive/model/unlocked-incentives.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unlocked-incentives.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/model/unlocked-incentives.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/reducers/index.js b/dist/out-tsc/src/app/incentive/reducers/index.js new file mode 100644 index 000000000..f2cf39810 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/reducers/index.js @@ -0,0 +1,54 @@ +import * as tslib_1 from "tslib"; +import { createReducer, on } from '@ngrx/store'; +import { IncentiveActions } from '../action-types'; +import * as moment from 'moment'; +export var initialUnlockedIncentiveState = { + unlockedIncentives: undefined +}; +export var incentiveReducer = createReducer(initialUnlockedIncentiveState, on(IncentiveActions.surveyCompletedRegisterUnlocked, function (state, payload) { + console.log("Incentive State: " + JSON.stringify(state)); + console.log("Incentive payload: " + JSON.stringify(payload)); + var currentDate = moment().format('YYYYMMDD'); + var unlockedIncentiveObject = {}; + var new_state = {}; + var payload_data = payload["payload"]; + new_state['user_id'] = payload_data["user_id"]; + new_state['last_date'] = payload_data["last_date"]; + var currentIncentiveTimeline = Object.assign({}, state["timeline"]); + if (currentIncentiveTimeline == undefined) //means initial state with no timeline + currentIncentiveTimeline = {}; + var key = currentDate; + var value = { + unlocked_points: payload_data["unlocked_points"], + unlocked_money: payload_data["unlocked_money"], + current_point: payload_data["current_point"], + date: moment().format('YYYYMMDD'), + isUnlockedViewShown: payload_data["isUnlockedViewShown"], + }; + currentIncentiveTimeline[key] = value; + new_state["timeline"] = currentIncentiveTimeline; + console.log("Incentive State: " + JSON.stringify(new_state)); + return new_state; +}), on(IncentiveActions.unlockedScreenShownAlready, function (state, payload) { + var currentDate = moment().format('YYYYMMDD'); + //let clone = Object.assign({}, obj); + var currentIncentiveTimeline = Object.assign({}, state["timeline"]); + currentIncentiveTimeline[currentDate] = tslib_1.__assign({}, currentIncentiveTimeline[currentDate], { isUnlockedViewShown: true }); + return tslib_1.__assign({}, state, { timeline: currentIncentiveTimeline }); +}) +//this.store.dispatch(surveyCompletedRegisterUnlocked({unlockedIncentives})); +/* +on(AuthActions.login, (state, action) => { + return { + user: action.user + } +}), + +on(AuthActions.logout, (state, action) => { + return { + user: undefined + } +}) +*/ +); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/reducers/index.js.map b/dist/out-tsc/src/app/incentive/reducers/index.js.map new file mode 100644 index 000000000..6725aa946 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/reducers/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/reducers/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAOjC,MAAM,CAAC,IAAM,6BAA6B,GAA2B;IACjE,kBAAkB,EAAE,SAAS;CAChC,CAAA;AAGD,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AwB,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7D,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC,EAGF,EAAE,CAAC,gBAAgB,CAAC,0BAA0B,EAAE,UAAC,KAAK,EAAE,OAAO;IAC3D,IAAI,WAAW,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAE9C,qCAAqC;IACrC,IAAI,wBAAwB,GAAW,MAAM,CAAC,MAAM,CAAC,EAAE,EAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3E,wBAAwB,CAAC,WAAW,CAAC,wBAAO,wBAAwB,CAAC,WAAW,CAAC,IAC7E,mBAAmB,EAAE,IAAI,GAAC,CAAC;IAE/B,4BACO,KAAK,IACR,QAAQ,EAAE,wBAAwB,IACpC;AACN,CAAC,CAAC;AAGF,6EAA6E;AAE7E;;;;;;;;;;;;EAYE;CAIL,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.js b/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.js new file mode 100644 index 000000000..b404c55ba --- /dev/null +++ b/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.js @@ -0,0 +1,104 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +var TreasurechestComponent = /** @class */ (function () { + function TreasurechestComponent() { + this.amount_earned = "$0"; + this.pearlsAndGems = []; + this.pointsdata = []; + } + TreasurechestComponent.prototype.ngOnInit = function () { + var _this = this; + //load reward data + var badges; + //badges = JSON.parse(window.localStorage['badges'] || "{}"); + var user_data = JSON.parse(window.localStorage['user_data'] || "{}"); + badges = user_data['badges'] || {}; + if ('money' in badges) { //means things are empty. + } + else { + badges['daily_survey'] = [0, 0, 0, 0, 0, 0]; + badges['weekly_survey'] = [0, 0, 0, 0]; + badges['active_tasks'] = [0, 0, 0, 0, 0, 0]; + badges['money'] = 10; + } + //add the money + this.amount_earned = "$" + badges['money']; + // + if (window.localStorage['AwardDollar'] == undefined) + this.amount_earned = "$" + 0; + else + this.amount_earned = "$" + parseInt(window.localStorage['AwardDollar']); + //add the badges for daily survey + var daily_survey_tasks = [2, 1, 0, 3, 1, 1]; //badges['daily_survey']; + //daily_survey_tasks = [3,2,0,2,2,1]; + //daily_survey_tasks = [0,0,0,0,0]; + //badges['weekly_survey'] = [0,0,0,0]; + var daily_width = [50, 30, 42, 30, 42, 40, 46]; + var ds_tasks_badges = ['img/backgroud_daily.png', 'img/green.png', 'img/blue.png', 'img/red.png', 'img/bronze.png', 'img/silver.png', 'img/gold.png']; + for (var i = 1; i < ds_tasks_badges.length; i++) { + if (daily_survey_tasks[i - 1] > 0) { + for (var q = 0; q < daily_survey_tasks[i - 1]; q++) + this.pearlsAndGems.push({ "img": "assets/" + ds_tasks_badges[i], "count": daily_survey_tasks[i - 1], "width": daily_width[i] * 3 / 2 }); + } + } + fetch('../../../assets/game/fishpoints.json').then(function (res) { return tslib_1.__awaiter(_this, void 0, void 0, function () { + var data, current_points, survey_string, isNextAvailableStillMasked, i; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, res.json()]; + case 1: + data = _a.sent(); + current_points = 700; + survey_string = ""; + isNextAvailableStillMasked = false; + for (i = 0; i < data.length; i++) { + data[i].class = 'nonshade'; + data[i].img = "assets/" + data[i].img.substring(0, data[i].img.length - 4) + '_tn.jpg'; + data[i].fish_index = i; + data[i].show_trivia = 1; + /* + if(current_points < data[i].points){ + if(isNextAvailableStillMasked == false){ + // + data[i].img = data[i].img.substring(0, data[i].img.length-7) + '-grey_tn.jpg'; + isNextAvailableStillMasked = true; + //data[i].class = 'shade'; + } + else{ + data[i].img = 'assets/img/cryptocoin_tn.jpg'; + } + + data[i].show_trivia = 0; + } + + if(data[i].name === 'Sea environment'){ + data[i].show_trivia = 0; + } + */ + } + this.pointsdata = data; + return [2 /*return*/]; + } + }); + }); }); + //add the fish to be unlocked + }; + TreasurechestComponent.prototype.sum = function (arr) { + var total = 0; + for (var i in arr) { + total += arr[i]; + } + return total; + }; + TreasurechestComponent = tslib_1.__decorate([ + Component({ + selector: 'app-treasurechest', + templateUrl: './treasurechest.component.html', + styleUrls: ['./treasurechest.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", []) + ], TreasurechestComponent); + return TreasurechestComponent; +}()); +export { TreasurechestComponent }; +//# sourceMappingURL=treasurechest.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.js.map b/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.js.map new file mode 100644 index 000000000..721d2fa78 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"treasurechest.component.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/treasurechest/treasurechest.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAOlD;IAOE;QALA,kBAAa,GAAG,IAAI,CAAC;QACrB,kBAAa,GAAG,EAAE,CAAC;QACnB,eAAU,GAAG,EAAE,CAAC;IAKhB,CAAC;IAED,yCAAQ,GAAR;QAAA,iBA2FC;QAzFC,kBAAkB;QAClB,IAAI,MAAM,CAAC;QACX,6DAA6D;QAC7D,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC;QACrE,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,IAAG,OAAO,IAAI,MAAM,EAAC,EAAE,yBAAyB;SAC/C;aAAI;YACC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,CAAC,CAAC;YACvC,MAAM,CAAC,eAA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I,IAAI,CAAC,IAAI,GAAG,EAAC;YACf,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;SACjB;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IA9GU,sBAAsB;QALlC,SAAS,CAAC;YACT,QAAQ,EAAE,mBAAmB;YAC7B,WAAW,EAAE,gCAAgC;YAC7C,SAAS,EAAE,CAAC,gCAAgC,CAAC;SAC9C,CAAC;;OACW,sBAAsB,CAgHlC;IAAD,6BAAC;CAAA,AAhHD,IAgHC;SAhHY,sBAAsB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.spec.js b/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.spec.js new file mode 100644 index 000000000..57fc810f2 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { TreasurechestComponent } from './treasurechest.component'; +describe('TreasurechestComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [TreasurechestComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(TreasurechestComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=treasurechest.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.spec.js.map b/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.spec.js.map new file mode 100644 index 000000000..8cbbf4722 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/treasurechest/treasurechest.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"treasurechest.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/treasurechest/treasurechest.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,QAAQ,CAAC,wBAAwB,EAAE;IACjC,IAAI,SAAiC,CAAC;IACtC,IAAI,OAAiD,CAAC;IAEtD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,sBAAsB,CAAE;YACxC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;QAC1D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.js b/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.js new file mode 100644 index 000000000..ed78f5ad1 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.js @@ -0,0 +1,30 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import * as moment from 'moment'; +var UnlockedAltuisticMessagesComponent = /** @class */ (function () { + function UnlockedAltuisticMessagesComponent() { + } + UnlockedAltuisticMessagesComponent.prototype.ngOnInit = function () { + }; + UnlockedAltuisticMessagesComponent.prototype.ionViewDidEnter = function () { + this.already_shown_altruism_msgs = window.localStorage["already_shown_alt_msg3"]; + if (this.already_shown_altruism_msgs == undefined) + this.already_shown_altruism_msgs = [{ "filename": "assets/altruism/altruism_1.png", "unlock_date": moment().format('MM/DD/YYYY') }]; + else + this.already_shown_altruism_msgs = JSON.parse(window.localStorage["already_shown_alt_msg3"]); + this.unlockedAltMessagesCount = this.already_shown_altruism_msgs.length; + this.already_shown_altruism_msgs.reverse(); + console.log(this.already_shown_altruism_msgs); + }; + UnlockedAltuisticMessagesComponent = tslib_1.__decorate([ + Component({ + selector: 'app-unlocked-altuistic-messages', + templateUrl: './unlocked-altuistic-messages.component.html', + styleUrls: ['./unlocked-altuistic-messages.component.css'] + }), + tslib_1.__metadata("design:paramtypes", []) + ], UnlockedAltuisticMessagesComponent); + return UnlockedAltuisticMessagesComponent; +}()); +export { UnlockedAltuisticMessagesComponent }; +//# sourceMappingURL=unlocked-altuistic-messages.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.js.map b/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.js.map new file mode 100644 index 000000000..f62e3f572 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unlocked-altuistic-messages.component.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAOjC;IAKE;IAAgB,CAAC;IAEjB,qDAAQ,GAAR;IACA,CAAC;IAED,4DAAe,GAAf;QACE,IAAI,CAAC,2BAA2B,GAAG,MAAM,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;QAEjF,IAAG,IAAI,CAAC,2BAA2B,IAAI,SAAS;YAC5C,IAAI,CAAC,2BAA2B,GAAG,CAAC,EAAC,UAAU,EAAE,gCAAgC,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAC,CAAC,CAAA;;YAEjI,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAEjG,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC;QAExE,IAAI,CAAC,2BAA2B,CAAC,OAAO,EAAE,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAChD,CAAC;IAtBU,kCAAkC;QAL9C,SAAS,CAAC;YACT,QAAQ,EAAE,iCAAiC;YAC3C,WAAW,EAAE,8CAA8C;YAC3D,SAAS,EAAE,CAAC,6CAA6C,CAAC;SAC3D,CAAC;;OACW,kCAAkC,CAuB9C;IAAD,yCAAC;CAAA,AAvBD,IAuBC;SAvBY,kCAAkC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.spec.js b/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.spec.js new file mode 100644 index 000000000..ab3f184fb --- /dev/null +++ b/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.spec.js @@ -0,0 +1,21 @@ +import { async, TestBed } from '@angular/core/testing'; +import { UnlockedAltuisticMessagesComponent } from './unlocked-altuistic-messages.component'; +describe('UnlockedAltuisticMessagesComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [UnlockedAltuisticMessagesComponent] + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(UnlockedAltuisticMessagesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=unlocked-altuistic-messages.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.spec.js.map b/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.spec.js.map new file mode 100644 index 000000000..5e9578001 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unlocked-altuistic-messages.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAE7F,QAAQ,CAAC,oCAAoC,EAAE;IAC7C,IAAI,SAA6C,CAAC;IAClD,IAAI,OAA6D,CAAC;IAElE,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,kCAAkC,CAAE;SACrD,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,kCAAkC,CAAC,CAAC;QACtE,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.js b/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.js new file mode 100644 index 000000000..7143d8944 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.js @@ -0,0 +1,30 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import * as moment from 'moment'; +var UnlockedMemesComponent = /** @class */ (function () { + function UnlockedMemesComponent() { + } + UnlockedMemesComponent.prototype.ngOnInit = function () { + }; + UnlockedMemesComponent.prototype.ionViewDidEnter = function () { + this.already_shown_memes = window.localStorage["already_shown_memes3"]; + if (this.already_shown_memes == undefined) + this.already_shown_memes = [{ "filename": "assets/memes/4.jpg", "unlock_date": moment().format('MM/DD/YYYY') }]; + else + this.already_shown_memes = JSON.parse(window.localStorage["already_shown_memes3"]); + this.unlockedMemeCount = this.already_shown_memes.length; + this.already_shown_memes.reverse(); + console.log(this.already_shown_memes); + }; + UnlockedMemesComponent = tslib_1.__decorate([ + Component({ + selector: 'app-unlocked-memes', + templateUrl: './unlocked-memes.component.html', + styleUrls: ['./unlocked-memes.component.css'] + }), + tslib_1.__metadata("design:paramtypes", []) + ], UnlockedMemesComponent); + return UnlockedMemesComponent; +}()); +export { UnlockedMemesComponent }; +//# sourceMappingURL=unlocked-memes.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.js.map b/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.js.map new file mode 100644 index 000000000..baab461da --- /dev/null +++ b/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unlocked-memes.component.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/unlocked-memes/unlocked-memes.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAOjC;IAIE;IAAgB,CAAC;IAEjB,yCAAQ,GAAR;IACA,CAAC;IAED,gDAAe,GAAf;QAEE,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC;QAEvE,IAAG,IAAI,CAAC,mBAAmB,IAAI,SAAS;YACpC,IAAI,CAAC,mBAAmB,GAAG,CAAC,EAAC,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,EAAC,CAAC,CAAA;;YAE7G,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,sBAAsB,CAAC,CAAC,CAAC;QAEvF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC;QAEzD,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAExC,CAAC;IAvBU,sBAAsB;QALlC,SAAS,CAAC;YACT,QAAQ,EAAE,oBAAoB;YAC9B,WAAW,EAAE,iCAAiC;YAC9C,SAAS,EAAE,CAAC,gCAAgC,CAAC;SAC9C,CAAC;;OACW,sBAAsB,CAyBlC;IAAD,6BAAC;CAAA,AAzBD,IAyBC;SAzBY,sBAAsB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.spec.js b/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.spec.js new file mode 100644 index 000000000..2058b5f90 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.spec.js @@ -0,0 +1,21 @@ +import { async, TestBed } from '@angular/core/testing'; +import { UnlockedMemesComponent } from './unlocked-memes.component'; +describe('UnlockedMemesComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [UnlockedMemesComponent] + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(UnlockedMemesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=unlocked-memes.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.spec.js.map b/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.spec.js.map new file mode 100644 index 000000000..213034585 --- /dev/null +++ b/dist/out-tsc/src/app/incentive/unlocked-memes/unlocked-memes.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unlocked-memes.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/incentive/unlocked-memes/unlocked-memes.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,QAAQ,CAAC,wBAAwB,EAAE;IACjC,IAAI,SAAiC,CAAC;IACtC,IAAI,OAAiD,CAAC;IAEtD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,sBAAsB,CAAE;SACzC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;QAC1D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/monitor/database.service.js b/dist/out-tsc/src/app/monitor/database.service.js new file mode 100644 index 000000000..4e2faa2c2 --- /dev/null +++ b/dist/out-tsc/src/app/monitor/database.service.js @@ -0,0 +1,143 @@ +/* Installation: + +ionic install @ionic-native/sqlite @ionic-native/sqlite-porter +ionic cordova plugin add cordova-sqlite-storage +ionic cordova plugin add uk.co.workingedge.cordova.plugin.sqliteporter + +Follow reference: https://devdactic.com/ionic-4-sqlite-queries/ +*/ +import * as tslib_1 from "tslib"; +import { Platform } from '@ionic/angular'; +import { Injectable } from '@angular/core'; +import { SQLitePorter } from '@ionic-native/sqlite-porter/ngx'; +import { HttpClient } from '@angular/common/http'; +import { SQLite } from '@ionic-native/sqlite/ngx'; +import { BehaviorSubject } from 'rxjs'; +import * as moment from 'moment'; +var DatabaseService = /** @class */ (function () { + function DatabaseService(plt, sqlitePorter, sqlite, http) { + var _this = this; + this.plt = plt; + this.sqlitePorter = sqlitePorter; + this.sqlite = sqlite; + this.http = http; + this.dbReady = new BehaviorSubject(false); + this.tracks = new BehaviorSubject([]); + this.plt.ready().then(function () { + _this.sqlite.create({ + name: 'tracks.db', + location: 'default' + }).then(function (db) { + _this.database = db; + //this.dropTable(); + //console.log("table deleted!"); + _this.createDatabase(); + }); + }); + } + DatabaseService.prototype.createDatabase = function () { + var _this = this; + console.log("start seedDatabase!"); + return this.http.get('assets/track.sql', { responseType: 'text' }) + .subscribe(function (sql) { + _this.sqlitePorter.importSqlToDb(_this.database, sql) + .then(function (_) { + console.log('Before displayTracks'); + _this.displayTracks(); + console.log('Tracks displayed'); + _this.dbReady.next(true); + }) + .catch(function (e) { return console.error("In seedDatabase:" + e); }); + }); + }; + DatabaseService.prototype.getDatabaseState = function () { + return this.dbReady.asObservable(); + }; + DatabaseService.prototype.getTracks = function () { + return this.tracks.asObservable(); + }; + DatabaseService.prototype.dropTable = function () { + return this.database.executeSql('DROP TABLE IF EXISTS tracks').then(function (data) { + console.log('Table deleted!'); + }).catch(function (e) { + console.log("dropTable:" + JSON.stringify(e)); + //this.isTableExist(); + }); + }; + DatabaseService.prototype.isTableExist = function () { + console.log("Inside isTableEmpty:"); + //return this.database.executeSql('SELECT * FROM tracks', []).then(data => { + return this.database.executeSql("SELECT * FROM sqlite_master WHERE name ='tracks' and type='table'", []).then(function (data) { + var rowlength = data.rows.length; + console.log("isTableEmpty rowlength= " + rowlength); + return rowlength != 0; + }).catch(function (e) { + console.log("At isTableNotEmpty:" + JSON.stringify(e)); + }); + }; + DatabaseService.prototype.isTableEmpty = function () { + console.log("Inside isTableEmpty:"); + return this.database.executeSql('SELECT * FROM tracks', []).then(function (data) { + var rowlength = data.rows.length; + console.log("isTableEmpty rowlength= " + rowlength); + return rowlength == 0; + }).catch(function (e) { + console.log("At isTableNotEmpty:" + JSON.stringify(e)); + }); + }; + DatabaseService.prototype.addTrack = function (pageName, eventStatus, username, day_count) { + var currentTime = moment().format('MMMM Do YYYY, h:mm:ss a Z'); + var currentDate = moment().format('YYYYMMDD'); + var unix_ts = new Date().getTime(); + var data = [pageName, currentTime, currentDate, unix_ts, day_count, eventStatus, username]; + return this.database.executeSql('INSERT INTO tracks (pageName, eventTime, eventDate, unix_ts, day_count, eventStatus, username) VALUES (?, ?, ?, ?, ?, ?, ?)', data).then(function (data) { + console.log(pageName + ' Track added!'); + //this.displayTracks(); + }).catch(function (e) { return console.log("In addTrack:" + pageName + " " + JSON.stringify(e)); }); + }; + DatabaseService.prototype.displayTracks = function () { + //let query = 'SELECT product.name, product.id, developer.name AS creator FROM product JOIN developer ON developer.id = product.creatorId'; + return this.database.executeSql('SELECT * FROM tracks', []).then(function (data) { + var currentTracks = []; + var rowlength = data.rows.length; + console.log("data.rows= " + rowlength); + if (rowlength > 0) { + for (var i = 0; i < rowlength; i++) { + console.log("data.rows= " + rowlength); + console.log("displayTracks " + i + " pageName: " + data.rows.item(i).pageName); + console.log("displayTracks " + i + " time: " + data.rows.item(i).eventTime); + currentTracks.push({ + id: data.rows.item(i).id, + pageName: data.rows.item(i).pageName, + eventTime: data.rows.item(i).eventTime, + eventDate: data.rows.item(i).eventDate, + unix_ts: data.rows.item(i).unix_ts, + day_count: data.rows.item(i).day_count, + eventStatus: data.rows.item(i).eventStatus, + username: data.rows.item(i).username, + }); + } + //console.log("currentTracks length: "+currentTracks.length); + } + //this.tracks.next(currentTracks); announce new value to all subscribers + }).catch(function (e) { return console.log("In displayTracks:" + e); }); + }; + DatabaseService.prototype.exportDatabaseToJson = function () { + return this.sqlitePorter.exportDbToJson(this.database).then(function (res) { + console.log('Exported ' + JSON.stringify(res)); + return res; + }).catch(function (e) { return console.error(e); }); + }; + DatabaseService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [Platform, + SQLitePorter, + SQLite, + HttpClient]) + ], DatabaseService); + return DatabaseService; +}()); +export { DatabaseService }; +//# sourceMappingURL=database.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/monitor/database.service.js.map b/dist/out-tsc/src/app/monitor/database.service.js.map new file mode 100644 index 000000000..ce42d3780 --- /dev/null +++ b/dist/out-tsc/src/app/monitor/database.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"database.service.js","sourceRoot":"","sources":["../../../../../src/app/monitor/database.service.ts"],"names":[],"mappings":"AAAA;;;;;;;EAOE;;AAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAgB,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAgBjC;IAME,yBACU,GAAa,EACb,YAA0B,EAC1B,MAAc,EACd,IAAgB;QAJ1B,iBAgBG;QAfO,QAAG,GAAH,GAAG,CAAU;QACb,iBAAY,GAAZ,YAAY,CAAc;QAC1B,WAAM,GAAN,MAAM,CAAQ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AAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ;qBACpC,CAAC,CAAC;iBACL;gBACD,6DAA6D;aAC9D;YACD,yEAAyE;QAC3E,CAAC,CAAC,CAAC,KAAK,CAAC,UAAA,CAAC,IAAI,OAAA,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAC,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;IACpD,CAAC;IAED,8CAAoB,GAApB;QACE,OAAO,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YAC7D,OAAO,CAAC,GAAG,CAAC,WAAW,GAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7C,OAAO,GAAG,CAAC;QACb,CAAC,CAAC,CAAC,KAAK,CAAC,UAAA,CAAC,IAAI,OAAA,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAhB,CAAgB,CAAC,CAAC;IAElC,CAAC;IA9HQ,eAAe;QAH3B,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;iDAQe,QAAQ;YACC,YAAY;YAClB,MAAM;YACR,UAAU;OAVf,eAAe,CAgI3B;IAAD,sBAAC;CAAA,AAhID,IAgIC;SAhIY,eAAe"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/notification/notification.module.js b/dist/out-tsc/src/app/notification/notification.module.js new file mode 100644 index 000000000..6b5e8fcff --- /dev/null +++ b/dist/out-tsc/src/app/notification/notification.module.js @@ -0,0 +1,45 @@ +/* + +Install following, then this module shall work. +ionic cordova plugin add onesignal-cordova-plugin +npm install @ionic-native/onesignal + +This module can handle notificationReceive/Open when app is not killed. +otherwise: + +Implement in android/ios platform if need to receive notification +when app is killed. + +Copy MyNotificationExtenderBareBones.java file to src.io.ionic folder +add below to androidmanifest.xml + + + + + + + +*/ +import * as tslib_1 from "tslib"; +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { OneSignalService } from './one-signal.service'; +var NotificationModule = /** @class */ (function () { + function NotificationModule() { + } + NotificationModule = tslib_1.__decorate([ + NgModule({ + declarations: [], + imports: [ + CommonModule + ], + providers: [OneSignalService] + }) + ], NotificationModule); + return NotificationModule; +}()); +export { NotificationModule }; +//# sourceMappingURL=notification.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/notification/notification.module.js.map b/dist/out-tsc/src/app/notification/notification.module.js.map new file mode 100644 index 000000000..81661c1d6 --- /dev/null +++ b/dist/out-tsc/src/app/notification/notification.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"notification.module.js","sourceRoot":"","sources":["../../../../../src/app/notification/notification.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;EAwBE;;AAGF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAUxD;IAAA;IAAkC,CAAC;IAAtB,kBAAkB;QAR9B,QAAQ,CAAC;YACR,YAAY,EAAE,EAAE;YAChB,OAAO,EAAE;gBACP,YAAY;aACb;YACD,SAAS,EAAE,CAAE,gBAAgB,CAAE;SAEhC,CAAC;OACW,kBAAkB,CAAI;IAAD,yBAAC;CAAA,AAAnC,IAAmC;SAAtB,kBAAkB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/notification/one-signal.service.js b/dist/out-tsc/src/app/notification/one-signal.service.js new file mode 100644 index 000000000..d02050820 --- /dev/null +++ b/dist/out-tsc/src/app/notification/one-signal.service.js @@ -0,0 +1,100 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { OneSignal } from '@ionic-native/onesignal/ngx'; +import { AlertController } from '@ionic/angular'; +import * as moment from 'moment'; +import { environment } from 'src/environments/environment'; +import { HttpClient } from '@angular/common/http'; +import { UserProfileService } from '../user/user-profile/user-profile.service'; +var OneSignalService = /** @class */ (function () { + function OneSignalService(oneSignal, alertCtrl, http, userProfileService) { + this.oneSignal = oneSignal; + this.alertCtrl = alertCtrl; + this.http = http; + this.userProfileService = userProfileService; + } + OneSignalService.prototype.initOneSignal = function () { + //link for one signal tutorial ==========> https://devdactic.com/push-notifications-ionic-onesignal/ + var _this = this; + //this.oneSignal.startInit('YOUR ONESIGNAL APP ID', 'YOUR ANDROID ID'); + console.log("--Onesignal-- " + "init called"); + this.oneSignal.startInit(environment.oneSignalAppId, environment.firebaseConfig.messagingSenderId); + this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.None); + //this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.InAppAlert); + //Sets a notification received handler. Only called if the app is + //running in the foreground at the time the notification was received. + this.oneSignal.handleNotificationReceived().subscribe(function (data) { + _this.time = new Date().getTime(); + _this.formattedTime = moment().format('MMMM Do YYYY, h:mm:ss a Z'); + console.log("notification is received at: " + _this.time + " formatted: " + _this.formattedTime); + var title = data.payload.title; + var msg = data.payload.body; + //let additionalData = data.payload.additionalData; + //this.showAlert(title, msg, additionalData.task); + //this.showAlert(title+" "+msg, "notification is received at: "+this.time+" formatted: "+this.formattedTime); + }); + //Sets a notification opened handler. The instance will be called when + //a notification is tapped on from the notification shade (ANDROID) or + //notification center (iOS), or when closing an Alert notification shown in the app + //(if InAppAlert is enabled in inFocusDisplaying, below). + this.oneSignal.handleNotificationOpened().subscribe(function (data) { + // do something when a notification is opened + _this.time = new Date().getTime(); + _this.formattedTime = moment().format('MMMM Do YYYY, h:mm:ss a Z'); + console.log("notification is opened at: " + _this.time + " formatted: " + _this.formattedTime); + var additionalData = data.notification.payload.additionalData; + //this.showAlert('Notification opened', 'You already read this before', additionalData.task); + //this.showAlert('Notification opened', "notification is opened at: "+this.time+" formatted: "+this.formattedTime); + }); + //--- clearOneSignalNotifications + //--- https://documentation.onesignal.com/docs/cordova-sdk + this.oneSignal.endInit(); + this.oneSignal.getPermissionSubscriptionState().then(function (status) { + console.log("--Onesignal-- " + JSON.stringify(status)); + window.localStorage.setItem("oneSignalPlayerId", "" + status.subscriptionStatus.userId); + /* + this.userProfileService.userProfile.oneSignalPlayerId = status.subscriptionStatus.userId; + this.userProfileService.saveProfileToDevice(); + this.userProfileService.saveToServer(); + */ + }); + }; + OneSignalService.prototype.showAlert = function (title, msg) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var alert; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.alertCtrl.create({ + header: title, + subHeader: msg, + buttons: [ + 'OK' + /* { + text: `Action: ${task}`, + handler: () => { + // E.g: Navigate to a specific screen + } + } */ + ] + })]; + case 1: + alert = _a.sent(); + alert.present(); + return [2 /*return*/]; + } + }); + }); + }; + OneSignalService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [OneSignal, + AlertController, + HttpClient, + UserProfileService]) + ], OneSignalService); + return OneSignalService; +}()); +export { OneSignalService }; +//# sourceMappingURL=one-signal.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/notification/one-signal.service.js.map b/dist/out-tsc/src/app/notification/one-signal.service.js.map new file mode 100644 index 000000000..cb1c96a10 --- /dev/null +++ b/dist/out-tsc/src/app/notification/one-signal.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"one-signal.service.js","sourceRoot":"","sources":["../../../../../src/app/notification/one-signal.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAs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C;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;iDAMqB,SAAS;YACT,eAAe;YACpB,UAAU;YACI,kBAAkB;OARrC,gBAAgB,CAsF5B;IAAD,uBAAC;CAAA,AAtFD,IAsFC;SAtFY,gBAAgB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/notification/one-signal.service.spec.js b/dist/out-tsc/src/app/notification/one-signal.service.spec.js new file mode 100644 index 000000000..d12303674 --- /dev/null +++ b/dist/out-tsc/src/app/notification/one-signal.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { OneSignalService } from './one-signal.service'; +describe('OneSignalService', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(OneSignalService); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=one-signal.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/notification/one-signal.service.spec.js.map b/dist/out-tsc/src/app/notification/one-signal.service.spec.js.map new file mode 100644 index 000000000..188eaffcb --- /dev/null +++ b/dist/out-tsc/src/app/notification/one-signal.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"one-signal.service.spec.js","sourceRoot":"","sources":["../../../../../src/app/notification/one-signal.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,QAAQ,CAAC,kBAAkB,EAAE;IAC3B,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAAqB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAChE,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/reducers/index.js b/dist/out-tsc/src/app/reducers/index.js new file mode 100644 index 000000000..41747a79c --- /dev/null +++ b/dist/out-tsc/src/app/reducers/index.js @@ -0,0 +1,4 @@ +import { environment } from '../../environments/environment'; +export var reducers = {}; +export var metaReducers = !environment.production ? [] : []; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/reducers/index.js.map b/dist/out-tsc/src/app/reducers/index.js.map new file mode 100644 index 000000000..7ba38a547 --- /dev/null +++ b/dist/out-tsc/src/app/reducers/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/app/reducers/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAQ7D,MAAM,CAAC,IAAM,QAAQ,GAA+B,EAEnD,CAAC;AAGF,MAAM,CAAC,IAAM,YAAY,GAA4B,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/aws-s3.service.js b/dist/out-tsc/src/app/storage/aws-s3.service.js new file mode 100644 index 000000000..5e743a8ab --- /dev/null +++ b/dist/out-tsc/src/app/storage/aws-s3.service.js @@ -0,0 +1,125 @@ +// +//--- The goal of this file is to serve as base class for all storeage classes, +// for example, store to firebase, azure, aws s3. All common functions used +// to them will be added here in the future, +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { environment } from '../../environments/environment'; +import { StoreBaseService } from './storage-base.service'; +import { EncrDecrService } from './encrdecrservice.service'; +import { NetworkService, ConnectionStatus } from './network.service'; +import * as AWS from 'aws-sdk'; +var AwsS3Service = /** @class */ (function (_super) { + tslib_1.__extends(AwsS3Service, _super); + function AwsS3Service(networkSvc, EncrDecr) { + var _this = _super.call(this) || this; + _this.networkSvc = networkSvc; + _this.EncrDecr = EncrDecr; + return _this; + } + AwsS3Service.prototype.upload = function (subfolder, result) { + var _this = this; + this.bucketName = environment.awsConfig.bucketName; + var bucketRegion = environment.awsConfig.bucketRegion; + var IdentityPoolId = environment.awsConfig.IdentityPoolId; + //var accessKeyId = environment.awsConfig.accessKeyId; + //var secretAccessKey = environment.awsConfig.secretAccessKey; + //set properties after creating AWS.Config using the update method + AWS.config.update({ + region: bucketRegion, + credentials: new AWS.CognitoIdentityCredentials({ + IdentityPoolId: IdentityPoolId + }) + }); + //creates a new Amazon S3 service object + this.s3 = new AWS.S3({ + apiVersion: '2006-03-01', + params: { Bucket: this.bucketName } + }); + /*const myS3Credentials = { + accessKeyId: accessKeyId, + secretAcccessKey: secretAccessKey, + }; + + var s3 = new AWS.S3({ + apiVersion: '2006-03-01', + params: {Bucket: bucketName}, + accessKeyId: accessKeyId, + secretAccessKey: secretAccessKey + }); */ + //create a file from result passed as a JSONObject + var fileName = "result_" + (new Date().getTime()) + "_" + this.EncrDecr.getSHA256(localStorage.getItem('loggedInUser')) + ".json"; + this.currentFile = new File([JSON.stringify(result)], fileName, { type: "text/plain" }); + //upload currentFile to the subfolder in S3 bucket + this.STORAGE_REQ_KEY = subfolder + "_result"; + this.subfolder = subfolder; + // Upload data and data saved in local Storage to AWS when online, save data + // to local storage when offline. + if (this.networkSvc.getCurrentNetworkStatus() == ConnectionStatus.Online) { + if (window.localStorage.getItem(this.STORAGE_REQ_KEY) != undefined) + this.uploadLocalData(); + this.uploadToS3(subfolder + "/" + fileName, result).catch(function (err) { + if (err) { + console.log('Caught thrown error: ' + err.message); + _this.storeResultLocally(result); + } + }); + } + else { + this.storeResultLocally(result); + } + }; + AwsS3Service.prototype.uploadToS3 = function (key, result) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + this.s3.upload({ + Bucket: this.bucketName, + Key: key, + Body: JSON.stringify(result) + //Body: this.currentFile + }, function (err, data) { + if (err) { + console.log('There was an error uploading your file: ' + err.message); + throw new Error(err.message); + } + }); + return [2 /*return*/]; + }); + }); + }; + // upload data in local storage to AWS and clear local Data, if failed, save + // data in local storage. + AwsS3Service.prototype.uploadLocalData = function () { + var _this = this; + var storedObj = this.getLocalData(); + this.clearLocalData(); + if (storedObj.length > 0) { + var _loop_1 = function (op) { + console.log(JSON.stringify(op)); + fileName = "result_" + (new Date().getTime()) + "_" + this_1.EncrDecr.getSHA256(localStorage.getItem('loggedInUser')) + ".json"; + this_1.uploadToS3(this_1.subfolder + "/" + fileName, [op.data]).catch(function (err) { + if (err) { + console.log('Caught thrown error: ' + err.message); + _this.saveJsonObjLocally(op); + } + console.log('In uploadLocalData: update file successfully'); + }); + }; + var this_1 = this, fileName; + for (var _i = 0, storedObj_1 = storedObj; _i < storedObj_1.length; _i++) { + var op = storedObj_1[_i]; + _loop_1(op); + } + } + }; + AwsS3Service = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [NetworkService, + EncrDecrService]) + ], AwsS3Service); + return AwsS3Service; +}(StoreBaseService)); +export { AwsS3Service }; +//# sourceMappingURL=aws-s3.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/aws-s3.service.js.map b/dist/out-tsc/src/app/storage/aws-s3.service.js.map new file mode 100644 index 000000000..1f149441b --- /dev/null +++ b/dist/out-tsc/src/app/storage/aws-s3.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aws-s3.service.js","sourceRoot":"","sources":["../../../../../src/app/storage/aws-s3.service.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+CAA+C;;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc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out-tsc/src/app/storage/aws-s3.service.spec.js new file mode 100644 index 000000000..8cb5ff5c5 --- /dev/null +++ b/dist/out-tsc/src/app/storage/aws-s3.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { AwsS3Service } from './aws-s3.service'; +describe('AwsS3Service', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(AwsS3Service); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=aws-s3.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/aws-s3.service.spec.js.map b/dist/out-tsc/src/app/storage/aws-s3.service.spec.js.map new file mode 100644 index 000000000..eb729abff --- /dev/null +++ b/dist/out-tsc/src/app/storage/aws-s3.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aws-s3.service.spec.js","sourceRoot":"","sources":["../../../../../src/app/storage/aws-s3.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,QAAQ,CAAC,cAAc,EAAE;IACvB,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAAiB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACxD,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/azure.service.js b/dist/out-tsc/src/app/storage/azure.service.js new file mode 100644 index 000000000..27f2c7f0a --- /dev/null +++ b/dist/out-tsc/src/app/storage/azure.service.js @@ -0,0 +1,53 @@ +// +//--- The goal of this file is to upload a file to Azure, the configuration +//--- is at app/environments/environment.ts. +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { BlobService } from 'angular-azure-blob-service'; +import { environment } from '../../environments/environment'; +import { StoreBaseService } from './storage-base.service'; +// Get configuration +var Config = { + sas: environment.azureConfig.sas, + storageAccount: environment.azureConfig.storageAccount, + containerName: environment.azureConfig.containerName +}; +var AzureService = /** @class */ (function (_super) { + tslib_1.__extends(AzureService, _super); + function AzureService(blobsvc) { + var _this = _super.call(this) || this; + _this.blobsvc = blobsvc; + return _this; + } + AzureService.prototype.upload = function (result) { + var _this = this; + //create a file from result passed as a JSONObject + this.currentFile = new File([JSON.stringify(result)], "result-Azure.json", { type: "text/plain" }); + var baseUrl = this.blobsvc.generateBlobUrl(Config, this.currentFile.name); + this.config = { + baseUrl: baseUrl, + sasToken: Config.sas, + blockSize: 1024 * 64, + file: this.currentFile, + complete: function () { + console.log('Transfer completed !'); + }, + error: function (err) { + console.log('Error:', err); + }, + progress: function (percent) { + _this.percent = percent; + } + }; + this.blobsvc.upload(this.config); + }; + AzureService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [BlobService]) + ], AzureService); + return AzureService; +}(StoreBaseService)); +export { AzureService }; +//# sourceMappingURL=azure.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/azure.service.js.map b/dist/out-tsc/src/app/storage/azure.service.js.map new file mode 100644 index 000000000..2acbadee3 --- /dev/null +++ b/dist/out-tsc/src/app/storage/azure.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"azure.service.js","sourceRoot":"","sources":["../../../../../src/app/storage/azure.service.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,2EAA2E;AAC3E,6CAA6C;;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAA8B,MAAM,4BAA4B,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAA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UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;iDASmB,WAAW;OANnB,YAAY,CAiCxB;IAAD,mBAAC;CAAA,AAjCD,CAAkC,gBAAgB,GAiCjD;SAjCY,YAAY"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/azure.service.spec.js b/dist/out-tsc/src/app/storage/azure.service.spec.js new file mode 100644 index 000000000..99a8d77e3 --- /dev/null +++ b/dist/out-tsc/src/app/storage/azure.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { AzureService } from './azure.service'; +describe('AzureService', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(AzureService); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=azure.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/azure.service.spec.js.map b/dist/out-tsc/src/app/storage/azure.service.spec.js.map new file mode 100644 index 000000000..9ef791a70 --- /dev/null +++ b/dist/out-tsc/src/app/storage/azure.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"azure.service.spec.js","sourceRoot":"","sources":["../../../../../src/app/storage/azure.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,QAAQ,CAAC,cAAc,EAAE;IACvB,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAAiB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACxD,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/encrdecrservice.service.js b/dist/out-tsc/src/app/storage/encrdecrservice.service.js new file mode 100644 index 000000000..7806c9e69 --- /dev/null +++ b/dist/out-tsc/src/app/storage/encrdecrservice.service.js @@ -0,0 +1,85 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import * as CryptoJS from 'crypto-js'; +var EncrDecrService = /** @class */ (function () { + function EncrDecrService() { + } + //The set method is use for encrypt the value. + EncrDecrService.prototype.set = function (keys, value) { + var key = CryptoJS.enc.Utf8.parse(keys); + var iv = CryptoJS.enc.Utf8.parse(keys); + var encrypted = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(value.toString()), key, { + keySize: 128 / 8, + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }); + return encrypted.toString(); + }; + //The get method is use for decrypt the value. + EncrDecrService.prototype.get = function (keys, value) { + var key = CryptoJS.enc.Utf8.parse(keys); + var iv = CryptoJS.enc.Utf8.parse(keys); + var decrypted = CryptoJS.AES.decrypt(value, key, { + keySize: 128 / 8, + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }); + return decrypted.toString(CryptoJS.enc.Utf8); + }; + EncrDecrService.prototype.encrypt = function (msg, pass) { + // Code goes here + var keySize = 256; + var ivSize = 128; + var iterations = 100; + //var message = "Hello World"; + //var password = "Secret Password"; + var salt = CryptoJS.lib.WordArray.random(128 / 8); + var key = CryptoJS.PBKDF2(pass, salt, { + keySize: keySize / 32, + iterations: iterations + }); + var iv = CryptoJS.lib.WordArray.random(128 / 8); + var encrypted = CryptoJS.AES.encrypt(msg, key, { + iv: iv, + padding: CryptoJS.pad.Pkcs7, + mode: CryptoJS.mode.CBC + }); + // salt, iv will be hex 32 in length + // append them to the ciphertext for use in decryption + var transitmessage = salt.toString() + iv.toString() + encrypted.toString(); + return transitmessage; + }; + EncrDecrService.prototype.decrypt = function (transitmessage, pass) { + // Code goes here + var keySize = 256; + var ivSize = 128; + var iterations = 100; + var salt = CryptoJS.enc.Hex.parse(transitmessage.substr(0, 32)); + var iv = CryptoJS.enc.Hex.parse(transitmessage.substr(32, 32)); + var encrypted = transitmessage.substring(64); + var key = CryptoJS.PBKDF2(pass, salt, { + keySize: keySize / 32, + iterations: iterations + }); + var decrypted = CryptoJS.AES.decrypt(encrypted, key, { + iv: iv, + padding: CryptoJS.pad.Pkcs7, + mode: CryptoJS.mode.CBC + }); + return decrypted.toString(CryptoJS.enc.Utf8); + }; + EncrDecrService.prototype.getSHA256 = function (inputStr) { + return CryptoJS.SHA256(inputStr); + }; + EncrDecrService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", []) + ], EncrDecrService); + return EncrDecrService; +}()); +export { EncrDecrService }; +//# sourceMappingURL=encrdecrservice.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/encrdecrservice.service.js.map b/dist/out-tsc/src/app/storage/encrdecrservice.service.js.map new file mode 100644 index 000000000..4480af418 --- /dev/null +++ b/dist/out-tsc/src/app/storage/encrdecrservice.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encrdecrservice.service.js","sourceRoot":"","sources":["../../../../../src/app/storage/encrdecrservice.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAKtC;IACE;IAAgB,CAAC;IAEjB,8CAA8C;IAC9C,6BAAG,GAAH,UAAI,IAAI,EAAE,KAAK;QACb,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,C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;YACrB,UAAU,EAAE,UAAU;SACzB,CAAC,CAAC;QAEH,IAAI,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE;YACjD,EAAE,EAAE,EAAE;YACN,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK;YAC3B,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG;SAC1B,CAAC,CAAC;QACH,OAAO,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,mCAAS,GAAT,UAAU,QAAQ;QAChB,OAAO,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IA1FU,eAAe;QAH3B,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;;OACW,eAAe,CA6F3B;IAAD,sBAAC;CAAA,AA7FD,IA6FC;SA7FY,eAAe"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/encrdecrservice.service.spec.js b/dist/out-tsc/src/app/storage/encrdecrservice.service.spec.js new file mode 100644 index 000000000..a8428f18d --- /dev/null +++ b/dist/out-tsc/src/app/storage/encrdecrservice.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { EncrdecrserviceService } from './encrdecrservice.service'; +describe('EncrdecrserviceService', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(EncrdecrserviceService); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=encrdecrservice.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/encrdecrservice.service.spec.js.map b/dist/out-tsc/src/app/storage/encrdecrservice.service.spec.js.map new file mode 100644 index 000000000..3f3228ae9 --- /dev/null +++ b/dist/out-tsc/src/app/storage/encrdecrservice.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encrdecrservice.service.spec.js","sourceRoot":"","sources":["../../../../../src/app/storage/encrdecrservice.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,QAAQ,CAAC,wBAAwB,EAAE;IACjC,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAA2B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;QAC5E,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/network.service.js b/dist/out-tsc/src/app/storage/network.service.js new file mode 100644 index 000000000..7f15a27a5 --- /dev/null +++ b/dist/out-tsc/src/app/storage/network.service.js @@ -0,0 +1,72 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { Network } from '@ionic-native/network/ngx'; +import { BehaviorSubject } from 'rxjs'; +import { ToastController, Platform } from '@ionic/angular'; +export var ConnectionStatus; +(function (ConnectionStatus) { + ConnectionStatus[ConnectionStatus["Online"] = 0] = "Online"; + ConnectionStatus[ConnectionStatus["Offline"] = 1] = "Offline"; +})(ConnectionStatus || (ConnectionStatus = {})); +var NetworkService = /** @class */ (function () { + function NetworkService(network, toastController, plt) { + var _this = this; + this.network = network; + this.toastController = toastController; + this.plt = plt; + this.status = new BehaviorSubject(ConnectionStatus.Offline); + this.plt.ready().then(function () { + _this.initializeNetworkEvents(); + var status = _this.network.type !== 'none' ? ConnectionStatus.Online : ConnectionStatus.Offline; + _this.status.next(status); + }); + } + NetworkService.prototype.initializeNetworkEvents = function () { + var _this = this; + this.network.onDisconnect().subscribe(function () { + if (_this.status.getValue() === ConnectionStatus.Online) { + console.log('WE ARE OFFLINE'); + _this.updateNetworkStatus(ConnectionStatus.Offline); + } + }); + this.network.onConnect().subscribe(function () { + if (_this.status.getValue() === ConnectionStatus.Offline) { + console.log('WE ARE ONLINE'); + _this.updateNetworkStatus(ConnectionStatus.Online); + } + }); + }; + NetworkService.prototype.updateNetworkStatus = function (status) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var connection, toast; + return tslib_1.__generator(this, function (_a) { + this.status.next(status); + connection = status == ConnectionStatus.Offline ? 'Offline' : 'Online'; + toast = this.toastController.create({ + message: "You are now " + connection, + duration: 3000, + position: 'bottom' + }); + toast.then(function (toast) { return toast.present(); }); + return [2 /*return*/]; + }); + }); + }; + NetworkService.prototype.onNetworkChange = function () { + return this.status.asObservable(); + }; + NetworkService.prototype.getCurrentNetworkStatus = function () { + return this.status.getValue(); + }; + NetworkService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [Network, + ToastController, + Platform]) + ], NetworkService); + return NetworkService; +}()); +export { NetworkService }; +//# sourceMappingURL=network.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/network.service.js.map b/dist/out-tsc/src/app/storage/network.service.js.map new file mode 100644 index 000000000..574b19f51 --- /dev/null +++ b/dist/out-tsc/src/app/storage/network.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"network.service.js","sourceRoot":"","sources":["../../../../../src/app/storage/network.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,2DAAM,CAAA;IACN,6DAAO,CAAA;AACT,CAAC,EAHW,gBAAgB,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AAjC,UAAkC,MAAwB;;;;gBACxD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAErB,UAAU,GAAG,MAAM,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;gBACvE,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;oBACtC,OAAO,EAAE,iBAAe,UAAY;oBACpC,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,QAAQ;iBACnB,CAAC,CAAC;gBACH,KAAK,CAAC,IAAI,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,OAAO,EAAE,EAAf,CAAe,CAAC,CAAC;;;;KACtC;IAEM,wCAAe,GAAtB;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;IACpC,CAAC;IAEM,gDAAuB,GAA9B;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IAChC,CAAC;IAjDU,cAAc;QAH1B,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;iDAKmB,OAAO;YACC,eAAe;YAC3B,QAAQ;OANZ,cAAc,CAmD1B;IAAD,qBAAC;CAAA,AAnDD,IAmDC;SAnDY,cAAc"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/storage-base.service.js b/dist/out-tsc/src/app/storage/storage-base.service.js new file mode 100644 index 000000000..aeedfa87f --- /dev/null +++ b/dist/out-tsc/src/app/storage/storage-base.service.js @@ -0,0 +1,48 @@ +// +//--- The goal of this file is to serve as base class for all storeage classes, +// for example, store to firebase, azure, aws s3. All common functions used +// to them will be added here in the future, +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import * as moment from 'moment'; +var StoreBaseService = /** @class */ (function () { + function StoreBaseService() { + } + StoreBaseService.prototype.storeResultLocally = function (surveyResult) { + var obj = { + date: moment().format('YYYYMMDD'), + data: surveyResult + }; + console.log("Before saveJsonObjLocally: " + this.STORAGE_REQ_KEY); + if (window.localStorage.getItem(this.STORAGE_REQ_KEY) == undefined) { + var storedObj = [obj]; + window.localStorage.setItem(this.STORAGE_REQ_KEY, JSON.stringify(storedObj)); + } + else { + this.saveJsonObjLocally(obj); + } + }; + StoreBaseService.prototype.saveJsonObjLocally = function (obj) { + var storedObj = this.getLocalData(); + console.log("before push survey to local storage: " + JSON.stringify(storedObj)); + storedObj.push(obj); + console.log("after push survey to loca storage: " + JSON.stringify(storedObj)); + // Save old & new local transactions back to Storage + window.localStorage.setItem(this.STORAGE_REQ_KEY, JSON.stringify(storedObj)); + }; + StoreBaseService.prototype.getLocalData = function () { + return JSON.parse(window.localStorage.getItem(this.STORAGE_REQ_KEY)); + }; + StoreBaseService.prototype.clearLocalData = function () { + window.localStorage.removeItem(this.STORAGE_REQ_KEY); + }; + StoreBaseService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", []) + ], StoreBaseService); + return StoreBaseService; +}()); +export { StoreBaseService }; +//# sourceMappingURL=storage-base.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/storage-base.service.js.map b/dist/out-tsc/src/app/storage/storage-base.service.js.map new file mode 100644 index 000000000..a935f2789 --- /dev/null +++ b/dist/out-tsc/src/app/storage/storage-base.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"storage-base.service.js","sourceRoot":"","sources":["../../../../../src/app/storage/storage-base.service.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+CAA+C;;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAWjC;IAGI;IACA,CAAC;IAES,6CAAkB,GAA5B,UAA6B,YAAY;QACrC,IAAI,GAAG,GAAa;YAChB,IAAI,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC;YACjC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AsC5B;IAAD,uBAAC;CAAA,AAtCD,IAsCC;SAtCY,gBAAgB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/storage.module.js b/dist/out-tsc/src/app/storage/storage.module.js new file mode 100644 index 000000000..96c70b239 --- /dev/null +++ b/dist/out-tsc/src/app/storage/storage.module.js @@ -0,0 +1,28 @@ +import * as tslib_1 from "tslib"; +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { StoreToFirebaseService } from './store-to-firebase.service'; +import { AngularFireModule } from '@angular/fire'; +import { environment } from '../../environments/environment'; +import { AngularFirestoreModule } from '@angular/fire/firestore'; +import { EncrDecrService } from './encrdecrservice.service'; +import { AwsS3Service } from './aws-s3.service'; +import { Network } from '@ionic-native/network/ngx'; +var StorageModule = /** @class */ (function () { + function StorageModule() { + } + StorageModule = tslib_1.__decorate([ + NgModule({ + declarations: [], + imports: [ + CommonModule, + AngularFireModule.initializeApp(environment.firebaseConfig), + AngularFirestoreModule + ], + providers: [StoreToFirebaseService, EncrDecrService, AwsS3Service, Network] + }) + ], StorageModule); + return StorageModule; +}()); +export { StorageModule }; +//# sourceMappingURL=storage.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/storage.module.js.map b/dist/out-tsc/src/app/storage/storage.module.js.map new file mode 100644 index 000000000..616fd5894 --- /dev/null +++ b/dist/out-tsc/src/app/storage/storage.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"storage.module.js","sourceRoot":"","sources":["../../../../../src/app/storage/storage.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAWpD;IAAA;IAA6B,CAAC;IAAjB,aAAa;QATzB,QAAQ,CAAC;YACR,YAAY,EAAE,EAAE;YAChB,OAAO,EAAE;gBACP,YAAY;gBACZ,iBAAiB,CAAC,aAAa,CAAC,WAAW,CAAC,cAAc,CAAC;gBAC3D,sBAAsB;aACvB;YACD,SAAS,EAAE,CAAE,sBAAsB,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,CAAC;SAC7E,CAAC;OACW,aAAa,CAAI;IAAD,oBAAC;CAAA,AAA9B,IAA8B;SAAjB,aAAa"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/store-to-firebase.service.js b/dist/out-tsc/src/app/storage/store-to-firebase.service.js new file mode 100644 index 000000000..d213abb50 --- /dev/null +++ b/dist/out-tsc/src/app/storage/store-to-firebase.service.js @@ -0,0 +1,37 @@ +// +//--- The goal of this file is to upload an object to firebase, the configuration +//--- is at app/environments/environment.ts. At app/storage/storage.module.ts, +//--- we load the environment configuration and setup our module to use the +//--- AngularFire package +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { AngularFirestore } from '@angular/fire/firestore'; +import { StoreBaseService } from './storage-base.service'; +var StoreToFirebaseService = /** @class */ (function (_super) { + tslib_1.__extends(StoreToFirebaseService, _super); + function StoreToFirebaseService(afs) { + var _this = _super.call(this) || this; + _this.afs = afs; + return _this; + } + //upload obj to path in firebase + StoreToFirebaseService.prototype.addSurvey = function (path, obj) { + var _this = this; + console.log("Start to addSurvey!"); + return new Promise(function (resolve, reject) { + _this.afs.collection(path).add(obj) + .then(function (res) { + resolve(res); + }, function (err) { return reject(err); }); + }); + }; + StoreToFirebaseService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root', + }), + tslib_1.__metadata("design:paramtypes", [AngularFirestore]) + ], StoreToFirebaseService); + return StoreToFirebaseService; +}(StoreBaseService)); +export { StoreToFirebaseService }; +//# sourceMappingURL=store-to-firebase.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/store-to-firebase.service.js.map b/dist/out-tsc/src/app/storage/store-to-firebase.service.js.map new file mode 100644 index 000000000..ba3e4e474 --- /dev/null +++ b/dist/out-tsc/src/app/storage/store-to-firebase.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"store-to-firebase.service.js","sourceRoot":"","sources":["../../../../../src/app/storage/store-to-firebase.service.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,iFAAiF;AACjF,+EAA+E;AAC/E,4EAA4E;AAC5E,0BAA0B;;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM1D;IAA4C,kDAAgB;IAE1D,gCACU,GAAqB;QAD/B,YAGE,iBAAO,SACR;QAHS,SAAG,GAAH,GAAG,CAAkB;;IAG/B,CAAC;IAED,gCAAgC;IAChC,0CAAS,GAAT,UAAU,IAAI,EAAE,GAAW;QAA3B,iBAWC;QAVC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QACnC,OAAO,IAAI,OAAO,CAAM,UAAC,OAAO,EAAE,MAAM;YACtC,KAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;iBACjC,IAAI,CACH,UAAC,GAAG;gBACF,OAAO,CAAC,GAAG,CAAC,CAAA;YACd,CAAC,EACD,UAAA,GAAG,IAAI,OAAA,MAAM,CAAC,GAAG,CAAC,EAAX,CAAW,CACnB,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IApBU,sBAAsB;QAHlC,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;iDAIe,gBAAgB;OAHpB,sBAAsB,CAsBlC;IAAD,6BAAC;CAAA,AAtBD,CAA4C,gBAAgB,GAsB3D;SAtBY,sBAAsB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/store-to-firebase.service.spec.js b/dist/out-tsc/src/app/storage/store-to-firebase.service.spec.js new file mode 100644 index 000000000..d5df50a65 --- /dev/null +++ b/dist/out-tsc/src/app/storage/store-to-firebase.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { StoreToFirebaseService } from './store-to-firebase.service'; +describe('StoreToFirebaseService', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(StoreToFirebaseService); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=store-to-firebase.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/store-to-firebase.service.spec.js.map b/dist/out-tsc/src/app/storage/store-to-firebase.service.spec.js.map new file mode 100644 index 000000000..2a433f779 --- /dev/null +++ b/dist/out-tsc/src/app/storage/store-to-firebase.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"store-to-firebase.service.spec.js","sourceRoot":"","sources":["../../../../../src/app/storage/store-to-firebase.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,QAAQ,CAAC,wBAAwB,EAAE;IACjC,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAA2B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;QAC5E,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/userdata/userdata.actions.js b/dist/out-tsc/src/app/storage/userdata/userdata.actions.js new file mode 100644 index 000000000..0d658178d --- /dev/null +++ b/dist/out-tsc/src/app/storage/userdata/userdata.actions.js @@ -0,0 +1,21 @@ +// Section 2 +export var ADD_POINT = '[POINT] Add'; +export var ADD_MONEY = '[Money] Add'; +// Section 3 +var AddPoints = /** @class */ (function () { + function AddPoints(payload) { + this.payload = payload; + this.type = ADD_POINT; + } + return AddPoints; +}()); +export { AddPoints }; +var AddMoney = /** @class */ (function () { + function AddMoney(payload) { + this.payload = payload; + this.type = ADD_MONEY; + } + return AddMoney; +}()); +export { AddMoney }; +//# sourceMappingURL=userdata.actions.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/userdata/userdata.actions.js.map b/dist/out-tsc/src/app/storage/userdata/userdata.actions.js.map new file mode 100644 index 000000000..e66e44bbf --- /dev/null +++ b/dist/out-tsc/src/app/storage/userdata/userdata.actions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"userdata.actions.js","sourceRoot":"","sources":["../../../../../../src/app/storage/userdata/userdata.actions.ts"],"names":[],"mappings":"AAMA,YAAY;AACZ,MAAM,CAAC,IAAM,SAAS,GAAM,aAAa,CAAA;AACzC,MAAM,CAAC,IAAM,SAAS,GAAM,aAAa,CAAA;AAEzC,YAAY;AACZ;IAGI,mBAAmB,OAAiB;QAAjB,YAAO,GAAP,OAAO,CAAU;QAF3B,SAAI,GAAG,SAAS,CAAA;IAEc,CAAC;IAC5C,gBAAC;AAAD,CAAC,AAJD,IAIC;;AAED;IAGI,kBAAmB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QAFzB,SAAI,GAAG,SAAS,CAAA;IAEY,CAAC;IAC1C,eAAC;AAAD,CAAC,AAJD,IAIC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/userdata/userdata.model.js b/dist/out-tsc/src/app/storage/userdata/userdata.model.js new file mode 100644 index 000000000..a20510bd5 --- /dev/null +++ b/dist/out-tsc/src/app/storage/userdata/userdata.model.js @@ -0,0 +1 @@ +//# sourceMappingURL=userdata.model.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/userdata/userdata.model.js.map b/dist/out-tsc/src/app/storage/userdata/userdata.model.js.map new file mode 100644 index 000000000..021cb4032 --- /dev/null +++ b/dist/out-tsc/src/app/storage/userdata/userdata.model.js.map @@ -0,0 +1 @@ +{"version":3,"file":"userdata.model.js","sourceRoot":"","sources":["../../../../../../src/app/storage/userdata/userdata.model.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/userdata/userdata.module.js b/dist/out-tsc/src/app/storage/userdata/userdata.module.js new file mode 100644 index 000000000..b84b1e27e --- /dev/null +++ b/dist/out-tsc/src/app/storage/userdata/userdata.module.js @@ -0,0 +1,18 @@ +import * as tslib_1 from "tslib"; +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +var UserdataModule = /** @class */ (function () { + function UserdataModule() { + } + UserdataModule = tslib_1.__decorate([ + NgModule({ + declarations: [], + imports: [ + CommonModule + ] + }) + ], UserdataModule); + return UserdataModule; +}()); +export { UserdataModule }; +//# sourceMappingURL=userdata.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/userdata/userdata.module.js.map b/dist/out-tsc/src/app/storage/userdata/userdata.module.js.map new file mode 100644 index 000000000..be11ddfe8 --- /dev/null +++ b/dist/out-tsc/src/app/storage/userdata/userdata.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"userdata.module.js","sourceRoot":"","sources":["../../../../../../src/app/storage/userdata/userdata.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQ/C;IAAA;IAA8B,CAAC;IAAlB,cAAc;QAN1B,QAAQ,CAAC;YACR,YAAY,EAAE,EAAE;YAChB,OAAO,EAAE;gBACP,YAAY;aACb;SACF,CAAC;OACW,cAAc,CAAI;IAAD,qBAAC;CAAA,AAA/B,IAA+B;SAAlB,cAAc"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/userdata/userdata.reducers.js b/dist/out-tsc/src/app/storage/userdata/userdata.reducers.js new file mode 100644 index 000000000..6d07bd8d0 --- /dev/null +++ b/dist/out-tsc/src/app/storage/userdata/userdata.reducers.js @@ -0,0 +1,22 @@ +// Section 1 +var initialState = { + name: 'Initial Tutorial', + url: 'http://google.com', + points: 100 +}; +// Section 2 +export function reducer(state, action) { + if (state === void 0) { state = [initialState]; } + // Section 3 + switch (action.type) { + /* + case UserDataActions.ADD_MONEY: + return [...state, action.payload]; + case UserDataActions.ADD_MONEY: + return [...state, action.payload]; + default: + return state; + */ + } +} +//# sourceMappingURL=userdata.reducers.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/storage/userdata/userdata.reducers.js.map b/dist/out-tsc/src/app/storage/userdata/userdata.reducers.js.map new file mode 100644 index 000000000..892b1da1a --- /dev/null +++ b/dist/out-tsc/src/app/storage/userdata/userdata.reducers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"userdata.reducers.js","sourceRoot":"","sources":["../../../../../../src/app/storage/userdata/userdata.reducers.ts"],"names":[],"mappings":"AAIA,YAAY;AACZ,IAAM,YAAY,GAAa;IAC3B,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,mBAAmB;IACxB,MAAM,EAAE,GAAG;CACd,CAAA;AAED,YAAY;AACZ,MAAM,UAAU,OAAO,CAAC,KAAkC,EAAE,MAA+B;IAAnE,sBAAA,EAAA,SAAqB,YAAY,CAAC;IAEtD,YAAY;IACZ,QAAO,MAAM,CAAC,IAAI,EAAE;QAChB;;;;;;;UAOE;KACL;AACL,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/action-types.js b/dist/out-tsc/src/app/survey/action-types.js new file mode 100644 index 000000000..c62d63c33 --- /dev/null +++ b/dist/out-tsc/src/app/survey/action-types.js @@ -0,0 +1,3 @@ +import * as SurveyActions from './survey.actions'; +export { SurveyActions }; +//# sourceMappingURL=action-types.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/action-types.js.map b/dist/out-tsc/src/app/survey/action-types.js.map new file mode 100644 index 000000000..16fd412b5 --- /dev/null +++ b/dist/out-tsc/src/app/survey/action-types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"action-types.js","sourceRoot":"","sources":["../../../../../src/app/survey/action-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAC,aAAa,EAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/award-dollar.service.js b/dist/out-tsc/src/app/survey/award-dollar.service.js new file mode 100644 index 000000000..325b3945e --- /dev/null +++ b/dist/out-tsc/src/app/survey/award-dollar.service.js @@ -0,0 +1,51 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import * as moment from 'moment'; +var AwardDollarService = /** @class */ (function () { + function AwardDollarService() { + } + AwardDollarService.prototype.getDollars = function () { + if (window.localStorage['AwardDollar'] == undefined) + this.awardDollar = 0; + else + this.awardDollar = parseInt(window.localStorage['AwardDollar']); + if (window.localStorage['AwardDollarDates'] == undefined) { + this.awardDollarObj = {}; + this.awardDollarObj['dates'] = [moment().format("DD-MM-YYYY")]; + window.localStorage.setItem("AwardDollarDates", JSON.stringify(this.awardDollarObj)); + } + else { + this.awardDollarObj = JSON.parse(window.localStorage["AwardDollarDates"]); + if (this.awardDollarObj['dates'].length < 2) { + var previousdate = moment().subtract(1, "days").format("DD-MM-YYYY"); + var dates = this.awardDollarObj["dates"]; + var dateIndex = dates.indexOf(previousdate); + if (dateIndex > -1) { + this.awardDollarObj['dates'].push(moment().format("DD-MM-YYYY")); + } + else { + // if the date saved is not the previous day of today, remove it + // save current date to AwardDollarDates + this.awardDollarObj['dates'] = [moment().format("DD-MM-YYYY")]; + } + window.localStorage.setItem("AwardDollarDates", JSON.stringify(this.awardDollarObj)); + } + else { + this.awardDollar = this.awardDollar + 1; + window.localStorage.removeItem('AwardDollarDates'); + } + } + console.log("awardDollarObj: " + JSON.stringify(this.awardDollarObj)); + window.localStorage.setItem("AwardDollar", "" + this.awardDollar); + return this.awardDollar; + }; + AwardDollarService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", []) + ], AwardDollarService); + return AwardDollarService; +}()); +export { AwardDollarService }; +//# sourceMappingURL=award-dollar.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/award-dollar.service.js.map b/dist/out-tsc/src/app/survey/award-dollar.service.js.map new file mode 100644 index 000000000..565d49d69 --- /dev/null +++ b/dist/out-tsc/src/app/survey/award-dollar.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"award-dollar.service.js","sourceRoot":"","sources":["../../../../../src/app/survey/award-dollar.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAKjC;IAKE;IAAgB,CAAC;IAEjB,uCAAU,GAAV;QACE,IAAG,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,SAAS;YAChD,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;;YAErB,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC;QAElE,IAAG,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC,IAAI,SAAS,EAAE;YAErD,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;YACzB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;YAC/D,MAAM,CAAC,YAAY,CA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;QACpE,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,GAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEhE,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAhDU,kBAAkB;QAH9B,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;;OACW,kBAAkB,CAiD9B;IAAD,yBAAC;CAAA,AAjDD,IAiDC;SAjDY,kBAAkB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.js b/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.js new file mode 100644 index 000000000..e13e93738 --- /dev/null +++ b/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.js @@ -0,0 +1,42 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { DatabaseService } from 'src/app/monitor/database.service'; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +var AyaSampleSurveyComponent = /** @class */ (function () { + function AyaSampleSurveyComponent(userProfileService, db) { + this.userProfileService = userProfileService; + this.db = db; + this.pageTitle = "Survey_aya"; + } + AyaSampleSurveyComponent.prototype.ngOnInit = function () { + }; + AyaSampleSurveyComponent.prototype.ionViewDidEnter = function () { + var _this = this; + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Enter", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + }; + AyaSampleSurveyComponent.prototype.ionViewDidLeave = function () { + var _this = this; + console.log(this.pageTitle + ": ionViewDidLeave"); + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Leave", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + }; + AyaSampleSurveyComponent = tslib_1.__decorate([ + Component({ + selector: 'app-aya-sample-survey', + templateUrl: './aya-sample-survey.component.html', + styleUrls: ['./aya-sample-survey.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", [UserProfileService, + DatabaseService]) + ], AyaSampleSurveyComponent); + return AyaSampleSurveyComponent; +}()); +export { AyaSampleSurveyComponent }; +//# sourceMappingURL=aya-sample-survey.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.js.map b/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.js.map new file mode 100644 index 000000000..002ba2d89 --- /dev/null +++ b/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aya-sample-survey.component.js","sourceRoot":"","sources":["../../../../../../src/app/survey/aya-sample-survey/aya-sample-survey.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAOpF;IAGE,kCACU,kBAAsC,EACtC,EAAmB;QADnB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,OAAE,GAAF,EAAE,CAAiB;QAJ7B,cAAS,GAAG,YAAY,CAAC;IAIQ,CAAC;IAElC,2CAAQ,GAAR;IAEA,CAAC;IAED,kDAAe,GAAf;QAAA,iBAMA;QALE,IAAI,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,SAAS,CAAC,UAAA,GAAG;YACvC,IAAI,GAAG,EAAE;gBACP,KAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAI,CAAC,SAAS,EAAE,OAAO,EAAE,KAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;aAC/J;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,kDAAe,GAAf;QAAA,iBAOC;QANA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,GAAC,mBAAmB,CAAC,CAAC;QAChD,IAAI,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,SAAS,CAAC,UAAA,GAAG;YACrC,IAAI,GAAG,EAAE;gBACP,KAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAI,CAAC,SAAS,EAAE,OAAO,EAAE,KAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;aAC/J;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IA1BW,wBAAwB;QALpC,SAAS,CAAC;YACT,QAAQ,EAAE,uBAAuB;YACjC,WAAW,EAAE,oCAAoC;YACjD,SAAS,EAAE,CAAC,oCAAoC,CAAC;SAClD,CAAC;iDAK8B,kBAAkB;YAClC,eAAe;OALlB,wBAAwB,CA4BpC;IAAD,+BAAC;CAAA,AA5BD,IA4BC;SA5BY,wBAAwB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.spec.js b/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.spec.js new file mode 100644 index 000000000..deb1ecdaa --- /dev/null +++ b/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { AyaSampleSurveyComponent } from './aya-sample-survey.component'; +describe('AyaSampleSurveyComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [AyaSampleSurveyComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(AyaSampleSurveyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=aya-sample-survey.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.spec.js.map b/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.spec.js.map new file mode 100644 index 000000000..d6fbe1f68 --- /dev/null +++ b/dist/out-tsc/src/app/survey/aya-sample-survey/aya-sample-survey.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aya-sample-survey.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/survey/aya-sample-survey/aya-sample-survey.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,QAAQ,CAAC,0BAA0B,EAAE;IACnC,IAAI,SAAmC,CAAC;IACxC,IAAI,OAAmD,CAAC;IAExD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,wBAAwB,CAAE;YAC1C,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC;QAC5D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.js b/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.js new file mode 100644 index 000000000..8463481b7 --- /dev/null +++ b/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.js @@ -0,0 +1,609 @@ +// +//--- The goal of this file is to dynamically generate a survey from a JSON file. +//--- Example JSON files are located in assets/survey folder. +// +//--- At a high level, this file does the following: +// (i) reads a JSON file in the "ngAfterViewInit" +// (ii) calls the "generateSurvey" function to create html codes for the survey +// (iii) creates a component dynamically and attached it to the "vc" component. +import * as tslib_1 from "tslib"; +import { Component, ViewChild, ViewContainerRef, NgModule, Compiler, Injector, NgModuleRef, Input, ChangeDetectorRef } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { AwsS3Service } from '../../storage/aws-s3.service'; +import { EncrDecrService } from '../../storage/encrdecrservice.service'; +import { Platform, AlertController } from '@ionic/angular'; +import { Router } from '@angular/router'; +import * as moment from 'moment'; +import { AppVersion } from '@ionic-native/app-version/ngx'; +//import * as lifeInsightProfile from "../../../assets/data/life_insight.json"; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +import { AwardDollarService } from 'src/app/incentive/award-money/award-dollar.service'; +import { environment } from '../../../environments/environment'; +import { Store } from '@ngrx/store'; +import { surveyCompleted } from '../survey.actions'; +import { surveyCompletedRegisterUnlocked } from 'src/app/incentive/incentive.actions'; +var DynamicSurveyComponent = /** @class */ (function () { + function DynamicSurveyComponent(_compiler, _injector, _m, awsS3Service, + //private storeToFirebaseService: StoreToFirebaseService, + EncrDecr, router, changeDetector, appVersion, alertCtrl, plt, userProfileService, store, awardDollarService) { + var _this = this; + this._compiler = _compiler; + this._injector = _injector; + this._m = _m; + this.awsS3Service = awsS3Service; + this.EncrDecr = EncrDecr; + this.router = router; + this.changeDetector = changeDetector; + this.appVersion = appVersion; + this.alertCtrl = alertCtrl; + this.plt = plt; + this.userProfileService = userProfileService; + this.store = store; + this.awardDollarService = awardDollarService; + this.title = "mash is here"; + this.isLoading = true; + this.loadingComplete = false; + this.survey_string = ""; + this.survey = {}; + this.appVersion.getVersionNumber().then(function (value) { + _this.versionNumber = value; + console.log("VersionNumber: " + _this.versionNumber); + }).catch(function (err) { + console.log(err); + }); + } + DynamicSurveyComponent.prototype.ngOnInit = function () { }; + DynamicSurveyComponent.prototype.ngAfterViewInit = function () { + var _this = this; + console.log('Reading local json files: ' + this.fileLink); + //fetch JSON file and once the file is fetched called "generateSurvey" to create the survey. + fetch('../../../assets/data/' + this.fileLink + '.json').then(function (res) { return tslib_1.__awaiter(_this, void 0, void 0, function () { + var _a; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, res.json()]; + case 1: + _a.survey_data = _b.sent(); + this.generateSurvey(); + return [2 /*return*/]; + } + }); + }); }); + }; + DynamicSurveyComponent.prototype.generateSurvey = function () { + var _this = this; + //go through the questions + this.survey = {}; + for (var i = 0; i < this.survey_data.length; i++) { + var obj = this.survey_data[i]; + //console.log("Done " + obj.text); + this.survey[obj.name] = ""; + this.survey_string = this.process_survey(obj, this.survey_string, obj.name); + } + this.survey_string = this.survey_string + '
'; + //--- + //--- Generate a survey component dynamically from the "survey_string." + //--- The "survey_string" contains all the HTML for the template for dynamic component + //--- + var surveyComponent = Component({ template: this.survey_string })(/** @class */ (function () { + function class_1() { + this.survey2 = {}; + this.isQuestionIncomplete = {}; + this.lifeInsightObj = {}; + this.totalPoints = 0; + this.survey_data = []; + } + class_1.prototype.ngOnInit = function () { + this.survey2['starttimeUTC'] = new Date().getTime(); + this.survey2['reponse_ts'] = {}; + for (var i = 0; i < this.survey_data.length; i++) { + var obj = this.survey_data[i]; + this.isQuestionIncomplete[obj.name] = { "tag": obj.tag }; + } + }; + class_1.prototype.ngAfterViewInit = function () { + var _this = this; + setTimeout(function (e) { return _this.drawMoodGrid(_this); }, 200); + }; + class_1.prototype.drawMoodGrid = function (self2) { + var c = document.getElementById("myCanvas"); + if (c == null) { + console.log("is null"); + return; + } + c.style.width = '100%'; + c.width = c.offsetWidth; + c.height = c.width; + var ctx = c.getContext("2d"); + var imageObj = new Image(); + imageObj.src = 'assets/pics/affect_grid.png'; + imageObj.onload = function () { + ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle + 0, 0, c.width, c.height); // destination rectangle + }; + //corner points + var top_x = (42.0 / 354.0) * c.width; + var top_y = (32.0 / 354.0) * c.height; + var bottom_x = (320.0 / 354.0) * c.width; + var bottom_y = (320.0 / 354.0) * c.height; + c.addEventListener("click", function (e) { + //drawing = true; + var rect = c.getBoundingClientRect(); + var lastPos = { + x: e.clientX - rect.left, + y: e.clientY - rect.top + }; + //console.log("x:" + lastPos.x + ", y:" + lastPos.y + ":::: " + c.width + "," + c.height); + var x = -1; + var y = -1; + if ((lastPos.x >= top_x) && (lastPos.y >= top_y) && (lastPos.x <= bottom_x) && (lastPos.y <= bottom_y)) { + x = 10 * (lastPos.x - top_x) / (bottom_x - top_x) - 5; + y = 5 - 10 * (lastPos.y - top_y) / (bottom_y - top_y) - 5; + console.log("x:" + x + ", y:" + y); + self2.survey2['QMood'] = "" + x + ":" + y; + // + self2.inputchanged("QMood"); + } + else { + return; + } + var rect = c.getBoundingClientRect(); + ctx.beginPath(); + ctx.clearRect(0, 0, rect.right - rect.left, rect.bottom - rect.top); + ctx.closePath(); + // + ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle + 0, 0, c.width, c.height); // destination rectangle + //ctx.drawImage(imageObj, 0, 0); + ctx.beginPath(); + ctx.arc(lastPos.x, lastPos.y, 10, 0, 2 * Math.PI); + ctx.fillStyle = 'red'; + ctx.fill(); + ctx.lineWidth = 1; + ctx.strokeStyle = 'red'; + ctx.stroke(); + }, false); + }; + //This function tracks if users clicked on a survey question + class_1.prototype.modelChanged = function (newObj) { + console.log('holla' + newObj); + }; + //This function tracks if users clicked on a survey question and reacts. + class_1.prototype.inputchanged = function (questions) { + //console.log('holla: ' + questions); + this.survey2['reponse_ts'][questions] = {}; + this.survey2['reponse_ts'][questions].ts = Date.now(); + this.survey2['reponse_ts'][questions].readable_ts = moment().format("MMMM Do YYYY, h:mm:ss a Z"); + delete this.isQuestionIncomplete[questions]; //remove the key from isQuestionIncomplete + //console.log(JSON.stringify(this.survey2)); + }; + class_1.prototype.submitSurvey = function () { + if (this.isEmpty(this.isQuestionIncomplete)) //means all questions have been removed + this.storeData(); + else { + var incompleteQuestions = ""; + for (var prop in this.isQuestionIncomplete) { + incompleteQuestions = incompleteQuestions + " " + this.isQuestionIncomplete[prop]["tag"] + ","; + } + incompleteQuestions = incompleteQuestions.substring(0, incompleteQuestions.length - 1); + this.presentAlert("You haven't completed questions:" + incompleteQuestions); + } + }; + class_1.prototype.presentAlert = function (alertMessage) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var alert; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.alertCtrl.create({ + //
Thank you for completing the survey. You have unlocked a meme.
+ //header: '
Daily survey unavilable
', + header: 'Daily survey unavilable', + //subHeader: "Survey is not avaibable!", + message: alertMessage, + //defined in theme/variables.scss + buttons: [{ text: 'OK', cssClass: 'secondary' }] + })]; + case 1: + alert = _a.sent(); + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + return [4 /*yield*/, alert.present()]; + case 2: + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + class_1.prototype.isEmpty = function (obj) { + return JSON.stringify(obj) === JSON.stringify({}); + }; + class_1.prototype.storeData = function () { + //console.log("Inside storeData"); + //console.log(JSON.stringify(this.survey2)); + var endTime = new Date().getTime(); + var readable_time = moment().format('MMMM Do YYYY, h:mm:ss a Z'); + this.survey2['endtimeUTC'] = endTime; + this.survey2['userName'] = this.userProfileService.username; + this.survey2['ts'] = readable_time; + this.survey2['devicInfo'] = this.plt.platforms(); + //Store app version number + this.survey2['appVersion'] = this.versionNumber; + this.userProfileService.versionNumber = this.versionNumber; + var encrypted = this.EncrDecr.encrypt(JSON.stringify(this.survey2), environment.encyptString); + //var encrypted = this.EncrDecr.encrypt("holla", "Z&wz=BGw;%q49/<)"); + var decrypted = this.EncrDecr.decrypt(encrypted, environment.encyptString); + var survey3 = {}; + survey3['encrypted'] = encrypted; + //console.log('Encrypted :' + encrypted); + //console.log('Decrypted :' + decrypted); + this.survey2['encrypted'] = encrypted; + //compute and store "TotalPoints" to localStorage + if (window.localStorage['TotalPoints'] == undefined) + this.totalPoints = 0; + else + this.totalPoints = parseInt(window.localStorage['TotalPoints']); + this.totalPoints = this.totalPoints + 60; + window.localStorage.setItem("TotalPoints", "" + this.totalPoints); + //get "awardDollars" + var pastDollars = this.awardDollarService.getDollars(); + var dollars = this.awardDollarService.giveDollars(); + //console.log("Dollars: " + dollars); + this.userProfileService.surveyCompleted(); + //Save 7-day date and value for each question in localStorage to generate lifeInsight chart + var lifeInsightProfile = { + "questions": ["Q3d", "Q4d", "Q5d", "Q8d"], + "qimgs": ["assets/img/stress.png", "assets/img/freetime.png", "assets/img/dance2.png", "assets/img/social.png"], + "lifeInsightsTitle": ["How much pain are you currently experiencing?", + "How much fatigue are you currently experiencing?", + "How much nausea are you currently experiencing?", + "How motivated are you to take 6MP today?"], + "qYaxis": ["Pain level", "Fatigue level", "Nausea level", "Degree of motivation"], + "qSubText": ["0 = low pain, 4 = severe pain", + "0 = low fatigue, 4 = severe fatigue", + "0 = low nausea, 4 = severe nausea", + "0 = less motivated, 4 = highly motivated"], + "lifeInsightsHighStress": [ + "Stressed ", + "Fatigued ", + "Nausea ", + "Motivated " + ], + "lifeInsightsLowStress": [ + "Relaxed ", + "Fatigued ", + "Nausea ", + "Motivated " + ] + }; + var questionsArray = lifeInsightProfile.questions; //["Q3d","Q4d","Q5d","Q8d"] + if (window.localStorage['lifeInsight'] == undefined) { + for (var _i = 0, questionsArray_1 = questionsArray; _i < questionsArray_1.length; _i++) { + var question = questionsArray_1[_i]; + this.lifeInsightObj[question] = {}; + this.lifeInsightObj[question]['dates'] = [moment().format("DD-MM-YYYY")]; + if (this.survey2.hasOwnProperty(question)) { + this.lifeInsightObj[question]['data'] = [parseInt(this.survey2[question])]; + } + else { + this.lifeInsightObj[question]['data'] = [null]; + } + } + } + else { + this.lifeInsightObj = JSON.parse(window.localStorage["lifeInsight"]); + for (var _a = 0, questionsArray_2 = questionsArray; _a < questionsArray_2.length; _a++) { + var question = questionsArray_2[_a]; + var dateslength = this.lifeInsightObj[question]['dates'].length; + if (dateslength == 7) { + this.lifeInsightObj[question]['dates'].shift(); + this.lifeInsightObj[question]['data'].shift(); + } + var currentdate = moment().format("DD-MM-YYYY"); + var dates = this.lifeInsightObj[question]["dates"]; + var dateIndex = dates.indexOf(currentdate); + console.log("Current date exist? " + dateIndex); + if (dateIndex > -1) { + this.lifeInsightObj[question]['dates'][dateIndex] = currentdate; + if (this.survey2.hasOwnProperty(question)) { + this.lifeInsightObj[question]['data'][dateIndex] = (parseInt(this.survey2[question])); + } + else { + this.lifeInsightObj[question][dateIndex] = null; + } + } + else { + this.lifeInsightObj[question]['dates'].push(currentdate); + if (this.survey2.hasOwnProperty(question)) { + this.lifeInsightObj[question]['data'].push(parseInt(this.survey2[question])); + } + else { + this.lifeInsightObj[question]['data'].push(null); + } + } + } + } + //console.log("lifeInsightObj: "+JSON.stringify(this.lifeInsightObj)); + window.localStorage.setItem("lifeInsight", JSON.stringify(this.lifeInsightObj)); + //save to Amazon AWS S3 + this.awsS3Service.upload(this.fileLink, survey3); + //console.log("End of storeData"); + //navigate to award-memes/award-altruism with equal probability after submit survey + var currentProb = Math.random(); + window.localStorage.setItem("Prob", "" + currentProb); + var currentDate = moment().format('YYYYMMDD'); + var navigationExtras = { + state: { + date: currentDate, + prob: currentProb + } + }; + //prepare reinforcement data to upload to AWS S3 + var reinforcement_data = {}; + reinforcement_data['userName'] = this.userProfileService.username; + reinforcement_data['appVersion'] = this.versionNumber; + reinforcement_data['Prob'] = currentProb; + reinforcement_data['day_count'] = Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length; + reinforcement_data['isRandomized'] = 1; //what is this one?? + reinforcement_data['unix_ts'] = endTime; + reinforcement_data['readable_ts'] = readable_time; + reinforcement_data['date'] = currentDate; + //save to Amazon AWS S3 + //add for the modal object + var modalObjectNavigationExtras = {}; + modalObjectNavigationExtras["LastSurveyCompletionDate"] = moment().format('YYYYMMDD'); + modalObjectNavigationExtras["CurrentPoints"] = this.userProfileService.points; + modalObjectNavigationExtras["PreviousPoints"] = this.userProfileService.points - 60; + modalObjectNavigationExtras["AwardedDollar"] = dollars - pastDollars; + modalObjectNavigationExtras["IsModalShownYet"] = false; + //currentProb = 0.8; + if (this.fileLink.includes('caregiver') || currentProb <= 0.4) { + var reinforcementObj = {}; + reinforcementObj['ds'] = 1; + reinforcementObj['reward'] = 0; + reinforcementObj['prob'] = currentProb; + reinforcement_data['reward'] = "No push"; + reinforcement_data['reward_img_link'] = ""; + reinforcement_data['Like'] = ""; + this.awsS3Service.upload('reinforcement_data', reinforcement_data); + this.userProfileService.addReinforcementData(currentDate, reinforcementObj); + navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras; + this.router.navigate(['home'], navigationExtras); + } + else if ((currentProb > 0.4) && (currentProb <= 0.7)) { + reinforcement_data['reward'] = "Meme"; + navigationExtras['state']['reinforcement_data'] = reinforcement_data; + navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras; + this.router.navigate(['incentive/award-memes'], navigationExtras); + } + else if (currentProb > 0.7) { + reinforcement_data['reward'] = "Altruistic message"; + navigationExtras['state']['reinforcement_data'] = reinforcement_data; + navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras; + this.router.navigate(['incentive/award-altruism'], navigationExtras); + } + var surveyTimeline = { user_id: this.userProfileService.username, + timeline: [{ dateOfCompletion: currentDate, timestamp: endTime, readableTimestamp: readable_time }] }; + this.store.dispatch(surveyCompleted({ surveyTimeline: surveyTimeline })); + var payload = { user_id: this.userProfileService.username, + last_date: moment().format('YYYYMMDD'), + unlocked_points: 60, + unlocked_money: dollars - pastDollars, + current_point: this.userProfileService.points, + date: moment().format('YYYYMMDD'), + isUnlockedViewShown: false }; + this.store.dispatch(surveyCompletedRegisterUnlocked({ payload: payload })); + }; + return class_1; + }())); + var tmpModule = NgModule({ declarations: [surveyComponent], imports: [FormsModule] })(/** @class */ (function () { + function class_2() { + } + return class_2; + }())); + this._compiler.compileModuleAndAllComponentsAsync(tmpModule) + .then(function (factories) { + _this.isLoading = false; + _this.loadingComplete = true; + //setTimeout(function(){ console.log("holla") }, 3000); + _this.changeDetector.detectChanges(); + var f = factories.componentFactories[0]; + var cmpRef = _this.vc.createComponent(f); + cmpRef.instance.awsS3Service = _this.awsS3Service; + cmpRef.instance.survey2 = _this.survey; + cmpRef.instance.fileLink = _this.fileLink; + cmpRef.instance.versionNumber = _this.versionNumber; + cmpRef.instance.survey_data = _this.survey_data; + //cmpRef.instance.storeToFirebaseService = this.storeToFirebaseService; + cmpRef.instance.alertCtrl = _this.alertCtrl; + cmpRef.instance.userProfileService = _this.userProfileService; + cmpRef.instance.awardDollarService = _this.awardDollarService; + cmpRef.instance.EncrDecr = _this.EncrDecr; + cmpRef.instance.plt = _this.plt; + cmpRef.instance.router = _this.router; // Router, + cmpRef.instance.store = _this.store; + cmpRef.instance.name = 'dynamic'; + //console.log('called'); + }); + }; + DynamicSurveyComponent.prototype.getTitle = function () { + return this.title; + }; + // process survey if obj type is radiobutton + DynamicSurveyComponent.prototype.process_survey_radiobutton = function (obj, survey_string, i) { + //------------------------------------------------------ + //radio button, vertical + //------------------------------------------------------ + if (obj.extra.orientation == "vertical") { + survey_string = survey_string + '
    '; + for (var j = 0; j < obj.extra.choices.length; j++) { + survey_string = [survey_string, + '
  • ', + '', + '
  • ' + ].join(" "); + } + //if(this.choices == undefined) this.choices = {}; + //this.choices[obj.name]= obj.extra.choices; + survey_string = survey_string + '
'; + } + //------------------------------------------------------ + //radio button, horizontal + //------------------------------------------------------ + //console.log("Here: " + JSON.stringify(obj.extra.orientation) + ", " + obj.extra.choices.length); + if (obj.extra.orientation == "horizontal") { + survey_string = survey_string + '
    '; + //starting text + survey_string = survey_string + '
  • ' + obj.extra.choices[0] + '

  • '; + //middle text + for (var j = 0; j < obj.extra.levels; j++) { + survey_string = [survey_string, + '
  • ', + '', + '
  • ' + ].join(" "); + //console.log("" + j + ", " + obj.extra.choices.length); + } + //ending text + survey_string = survey_string + '
  • ' + obj.extra.choices[obj.extra.choices.length - 1] + '

  • '; + survey_string = survey_string + '
'; + } + return survey_string; + }; + // + // process survey for all types of objects + // Our current questionaire only has radio buttons. We have codes for other types of inputs, which we will gradually add. + // + DynamicSurveyComponent.prototype.process_survey = function (obj, survey_string, i) { + survey_string = [survey_string, + '
', + obj.text, + '
' + ].join(" "); + if (obj.type == 'random') { + //this.process_survey_random(obj, survey_string, i); + } + else { + // + if (obj.type == "captcha") { + //survey_string = this.process_survey_captcha(obj, survey_string); + } + //------------------------------------------------------ + //text box + //------------------------------------------------------ + if (obj.type == "textbox") { + //survey_string = this.process_survey_textbox(survey_string, i); + } + //------------------------------------------------------ + //time picker + //------------------------------------------------------ + if (obj.type == "timepicker") { + //survey_string = this.process_survey_timepicker(survey_string, i); + } + //------------------------------------------------------ + //paragraph + //------------------------------------------------------ + if (obj.type == "comment") { + //survey_string = this.process_survey_comment(survey_string); + } + //------------------------------------------------------ + //image + //------------------------------------------------------ + if (obj.type == "image") { + //survey_string = this.process_survey_image(obj, survey_string); + } + //------------------------------------------------------ + // mood + //------------------------------------------------------ + if (obj.type == 'mood') { + //survey_string = this.process_survey_mood(survey_string, i); + } + //------------------------------------------------------ + // mood-grid + //------------------------------------------------------ + if (obj.type == 'moodgrid') { + //survey_string = this.process_survey_moodgrid(survey_string, i); + } + if (obj.type == "moodgrid2") { + //survey_string = this.process_survey_moodgrid2(survey_string); + } + //------------------------------------------------------ + // Autocomplete + //------------------------------------------------------ + // 'component-id="Q' + i + '" ' + + if (obj.type == 'autocomplete') { + //survey_string = this.process_survey_autocomplete(obj, survey_string, i); + } + //------------------------------------------------------ + // radio button + //------------------------------------------------------ + if (obj.type == "radiobutton") { + survey_string = this.process_survey_radiobutton(obj, survey_string, i); + } + //------------------------------------------------------ + // range + //------------------------------------------------------ + if (obj.type == "range") { + //survey_string = this.process_survey_range(obj, survey_string, i); + } + if (obj.type == "range2") { + //survey_string = this.process_survey_range2(obj, survey_string, i); + } + //------------------------------------------------------ + //checkbox + //------------------------------------------------------ + if (obj.type == "checkbox") { + //survey_string = this.process_survey_checkbox(obj, survey_string, i); + } + survey_string = survey_string + '
'; + } + return survey_string; + }; + tslib_1.__decorate([ + Input(), + tslib_1.__metadata("design:type", String) + ], DynamicSurveyComponent.prototype, "fileLink", void 0); + tslib_1.__decorate([ + ViewChild('vc', { read: ViewContainerRef, static: false }), + tslib_1.__metadata("design:type", ViewContainerRef) + ], DynamicSurveyComponent.prototype, "vc", void 0); + DynamicSurveyComponent = tslib_1.__decorate([ + Component({ + selector: 'app-dynamic-survey', + templateUrl: './dynamic-survey.component.html', + styleUrls: ['./dynamic-survey.component.scss'] + }) + //@PreLoad('life-insights') + , + tslib_1.__metadata("design:paramtypes", [Compiler, + Injector, + NgModuleRef, + AwsS3Service, + EncrDecrService, + Router, + ChangeDetectorRef, + AppVersion, + AlertController, + Platform, + UserProfileService, + Store, + AwardDollarService]) + ], DynamicSurveyComponent); + return DynamicSurveyComponent; +}()); +export { DynamicSurveyComponent }; +//# sourceMappingURL=dynamic-survey.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.js.map b/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.js.map new file mode 100644 index 000000000..89e9a7911 --- /dev/null +++ b/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-survey.component.js","sourceRoot":"","sources":["../../../../../../src/app/survey/dynamic-survey/dynamic-survey.component.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,kFAAkF;AAClF,8DAA8D;AAC9D,EAAE;AACF,oDAAoD;AACpD,uDAAuD;AACvD,oFAAoF;AACpF,oFAAoF;;AAEpF,OAAO,EAAE,SAAS,EAAU,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAc,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAChK,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAmB,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,+EAA+E;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAStF;IAiBE,gCAAoB,SAAmB,EAC7B,SAAmB,EACnB,EAAoB,EACpB,YAA0B;IAClC,yDAAyD;IACjD,QAAyB,EACzB,MAAc,EACd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ACD,OAAO,aAAa,CAAC;IAC3B,CAAC;IAlnBQ;QAAR,KAAK,EAAE;;4DAAkB;IAYiC;QAA1D,SAAS,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAC,CAAC;0CAAK,gBAAgB;sDAAC;IAfrE,sBAAsB;QAPlC,SAAS,CAAC;YACT,QAAQ,EAAE,oBAAoB;YAC9B,WAAW,EAAE,iCAAiC;YAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;SAC/C,CAAC;QAEF,2BAA2B;;iDAkBM,QAAQ;YAClB,QAAQ;YACf,WAAW;YACD,YAAY;YAEhB,eAAe;YACjB,MAAM;YACG,iBAAiB;YACtB,UAAU;YACX,eAAe;YACtB,QAAQ;YACQ,kBAAkB;YAC/B,KAAK;YACO,kBAAkB;OA9BpC,sBAAsB,CAunBlC;IAAD,6BAAC;CAAA,AAvnBD,IAunBC;SAvnBY,sBAAsB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.spec.js b/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.spec.js new file mode 100644 index 000000000..1efa1d149 --- /dev/null +++ b/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { DynamicSurveyComponent } from './dynamic-survey.component'; +describe('DynamicSurveyComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [DynamicSurveyComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(DynamicSurveyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=dynamic-survey.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.spec.js.map b/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.spec.js.map new file mode 100644 index 000000000..9979bad67 --- /dev/null +++ b/dist/out-tsc/src/app/survey/dynamic-survey/dynamic-survey.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dynamic-survey.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/survey/dynamic-survey/dynamic-survey.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,QAAQ,CAAC,wBAAwB,EAAE;IACjC,IAAI,SAAiC,CAAC;IACtC,IAAI,OAAiD,CAAC;IAEtD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,sBAAsB,CAAE;YACxC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;QAC1D,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/model/surveyTimeline.js b/dist/out-tsc/src/app/survey/model/surveyTimeline.js new file mode 100644 index 000000000..d1cd3c00e --- /dev/null +++ b/dist/out-tsc/src/app/survey/model/surveyTimeline.js @@ -0,0 +1 @@ +//# sourceMappingURL=surveyTimeline.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/model/surveyTimeline.js.map b/dist/out-tsc/src/app/survey/model/surveyTimeline.js.map new file mode 100644 index 000000000..83a71fec6 --- /dev/null +++ b/dist/out-tsc/src/app/survey/model/surveyTimeline.js.map @@ -0,0 +1 @@ +{"version":3,"file":"surveyTimeline.js","sourceRoot":"","sources":["../../../../../../src/app/survey/model/surveyTimeline.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/question.js b/dist/out-tsc/src/app/survey/question.js new file mode 100644 index 000000000..7daab0372 --- /dev/null +++ b/dist/out-tsc/src/app/survey/question.js @@ -0,0 +1,18 @@ +var Question = /** @class */ (function () { + function Question(options) { + if (options === void 0) { options = {}; } + this.ID = options.ID; + this.label = options.label || ''; + this.result1 = !!options.result1; + this.result2 = !!options.result2; + } + Question.prototype.getData = function () { + var _this = this; + var result = {}; + Object.keys(this).map(function (key) { return result[key] = _this[key]; }); + return result; + }; + return Question; +}()); +export { Question }; +//# sourceMappingURL=question.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/question.js.map b/dist/out-tsc/src/app/survey/question.js.map new file mode 100644 index 000000000..412a61a63 --- /dev/null +++ b/dist/out-tsc/src/app/survey/question.js.map @@ -0,0 +1 @@ +{"version":3,"file":"question.js","sourceRoot":"","sources":["../../../../../src/app/survey/question.ts"],"names":[],"mappings":"AAAA;IAMI,kBAAY,OAKJ;QALI,wBAAA,EAAA,YAKJ;QACN,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACnC,CAAC;IAED,0BAAO,GAAP;QAAA,iBAIC;QAHG,IAAM,MAAM,GAAG,EAAE,CAAC;QAClB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,MAAM,CAAC,GAAG,CAAC,GAAG,KAAI,CAAC,GAAG,CAAC,EAAvB,CAAuB,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC;IAClB,CAAC;IACH,eAAC;AAAD,CAAC,AAvBH,IAuBG"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/reducers/index.js b/dist/out-tsc/src/app/survey/reducers/index.js new file mode 100644 index 000000000..ec0474add --- /dev/null +++ b/dist/out-tsc/src/app/survey/reducers/index.js @@ -0,0 +1,27 @@ +import { createReducer, on } from '@ngrx/store'; +import { SurveyActions } from '../action-types'; +import * as moment from 'moment'; +export var initialSurveyState = { + surveyTimeLine: undefined +}; +export var surveyReducer = createReducer(initialSurveyState, on(SurveyActions.surveyCompleted, function (state, action) { + var currentDate = moment().format('YYYYMMDD'); + var surveyObject = {}; + surveyObject[currentDate] = action.surveyTimeline; + return surveyObject; +}) +/* +on(AuthActions.login, (state, action) => { + return { + user: action.user + } +}), + +on(AuthActions.logout, (state, action) => { + return { + user: undefined + } +}) +*/ +); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/reducers/index.js.map b/dist/out-tsc/src/app/survey/reducers/index.js.map new file mode 100644 index 000000000..71eee28bf --- /dev/null +++ b/dist/out-tsc/src/app/survey/reducers/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/app/survey/reducers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAOjC,MAAM,CAAC,IAAM,kBAAkB,GAAgB;IAC3C,cAAc,EAAE,SAAS;CAC5B,CAAA;AAGD,MAAM,CAAC,IAAM,aAAa,GAAG,aAAa,CAEtC,kBAAkB,EAClB,EAAE,CAAC,aAAa,CAAC,eAAe,EAAE,UAAC,KAAK,EAAE,MAAM;IAC5C,IAAI,WAAW,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9C,IAAI,YAAY,GAAG,EAAE,CAAC;IACtB,YAAY,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC;IAClD,OAAO,YAAY,CAAC;AACxB,CAAC,CAAC;AAEF;;;;;;;;;;;;EAYE;CAIL,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.js b/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.js new file mode 100644 index 000000000..6002b3e86 --- /dev/null +++ b/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.js @@ -0,0 +1,45 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +//import { PreLoad } from '../../PreLoad'; +import { DatabaseService } from 'src/app/monitor/database.service'; +import { UserProfileService } from 'src/app/user/user-profile/user-profile.service'; +var SampleSurveyComponent = /** @class */ (function () { + function SampleSurveyComponent(userProfileService, db) { + this.userProfileService = userProfileService; + this.db = db; + this.pageTitle = "Survey_caregiver"; + } + SampleSurveyComponent.prototype.ngOnInit = function () { + }; + SampleSurveyComponent.prototype.ionViewDidEnter = function () { + var _this = this; + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Enter", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + }; + SampleSurveyComponent.prototype.ionViewDidLeave = function () { + var _this = this; + console.log(this.pageTitle + ": ionViewDidLeave"); + this.db.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + _this.db.addTrack(_this.pageTitle, "Leave", _this.userProfileService.username, Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + }; + SampleSurveyComponent = tslib_1.__decorate([ + Component({ + selector: 'app-sample-survey', + templateUrl: './sample-survey.component.html', + styleUrls: ['./sample-survey.component.scss'], + }) + //@PreLoad('life-insights') + , + tslib_1.__metadata("design:paramtypes", [UserProfileService, + DatabaseService]) + ], SampleSurveyComponent); + return SampleSurveyComponent; +}()); +export { SampleSurveyComponent }; +//# sourceMappingURL=sample-survey.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.js.map b/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.js.map new file mode 100644 index 000000000..2f00df54d --- /dev/null +++ b/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sample-survey.component.js","sourceRoot":"","sources":["../../../../../../src/app/survey/sample-survey/sample-survey.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,eAAe,CAAC;AAClD,0CAA0C;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AASpF;IAGE,+BACU,kBAAsC,EACtC,EAAmB;QADnB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,OAAE,GAAF,EAAE,CAAiB;QAJ7B,cAAS,GAAG,kBAAkB,CAAC;IAK3B,CAAC;IAEL,wCAAQ,GAAR;IAEA,CAAC;IAED,+CAAe,GAAf;QAAA,iBAMA;QALE,IAAI,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,SAAS,CAAC,UAAA,GAAG;YACvC,IAAI,GAAG,EAAE;gBACP,KAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAI,CAAC,SAAS,EAAE,OAAO,EAAE,KAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;aAC/J;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,+CAAe,GAAf;QAAA,iBAOC;QANC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,GAAC,mBAAmB,CAAC,CAAC;QAChD,IAAI,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,SAAS,CAAC,UAAA,GAAG;YACtC,IAAI,GAAG,EAAE;gBACP,KAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAI,CAAC,SAAS,EAAE,OAAO,EAAE,KAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;aAC/J;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IA3BW,qBAAqB;QAPjC,SAAS,CAAC;YACT,QAAQ,EAAE,mBAAmB;YAC7B,WAAW,EAAE,gCAAgC;YAC7C,SAAS,EAAE,CAAC,gCAAgC,CAAC;SAC9C,CAAC;QAEF,2BAA2B;;iDAKK,kBAAkB;YAClC,eAAe;OALlB,qBAAqB,CA6BjC;IAAD,4BAAC;CAAA,AA7BD,IA6BC;SA7BY,qBAAqB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.spec.js b/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.spec.js new file mode 100644 index 000000000..bbfd6288c --- /dev/null +++ b/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { SampleSurveyComponent } from './sample-survey.component'; +describe('SampleSurveyComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [SampleSurveyComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(SampleSurveyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=sample-survey.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.spec.js.map b/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.spec.js.map new file mode 100644 index 000000000..aa408ff59 --- /dev/null +++ b/dist/out-tsc/src/app/survey/sample-survey/sample-survey.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sample-survey.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/survey/sample-survey/sample-survey.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,QAAQ,CAAC,uBAAuB,EAAE;IAChC,IAAI,SAAgC,CAAC;IACrC,IAAI,OAAgD,CAAC;IAErD,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,qBAAqB,CAAE;YACvC,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;QACzD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/save-data.service.js b/dist/out-tsc/src/app/survey/save-data.service.js new file mode 100644 index 000000000..719f143dc --- /dev/null +++ b/dist/out-tsc/src/app/survey/save-data.service.js @@ -0,0 +1,23 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { Router } from '@angular/router'; +var SaveDataService = /** @class */ (function () { + function SaveDataService(router) { + this.router = router; + } + SaveDataService.prototype.saveData = function (key, obj) { + localStorage.setItem(key, obj); + }; + SaveDataService.prototype.browseToReward = function (path) { + this.router.navigateByUrl(path); + }; + SaveDataService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [Router]) + ], SaveDataService); + return SaveDataService; +}()); +export { SaveDataService }; +//# sourceMappingURL=save-data.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/save-data.service.js.map b/dist/out-tsc/src/app/survey/save-data.service.js.map new file mode 100644 index 000000000..eb8e515ee --- /dev/null +++ b/dist/out-tsc/src/app/survey/save-data.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"save-data.service.js","sourceRoot":"","sources":["../../../../../src/app/survey/save-data.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKzC;IAEE,yBACU,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAClB,CAAC;IAEP,kCAAQ,GAAR,UAAS,GAAG,EAAE,GAAG;QACf,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,wCAAc,GAAd,UAAe,IAAI;QACf,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAZU,eAAe;QAH3B,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;iDAIkB,MAAM;OAHb,eAAe,CAe3B;IAAD,sBAAC;CAAA,AAfD,IAeC;SAfY,eAAe"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/save-data.service.spec.js b/dist/out-tsc/src/app/survey/save-data.service.spec.js new file mode 100644 index 000000000..876832103 --- /dev/null +++ b/dist/out-tsc/src/app/survey/save-data.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { SaveDataService } from './save-data.service'; +describe('SaveDataService', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(SaveDataService); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=save-data.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/save-data.service.spec.js.map b/dist/out-tsc/src/app/survey/save-data.service.spec.js.map new file mode 100644 index 000000000..ac2f7b835 --- /dev/null +++ b/dist/out-tsc/src/app/survey/save-data.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"save-data.service.spec.js","sourceRoot":"","sources":["../../../../../src/app/survey/save-data.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,QAAQ,CAAC,iBAAiB,EAAE;IAC1B,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAAoB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAC9D,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/survey.actions.js b/dist/out-tsc/src/app/survey/survey.actions.js new file mode 100644 index 000000000..d2bf35cbb --- /dev/null +++ b/dist/out-tsc/src/app/survey/survey.actions.js @@ -0,0 +1,3 @@ +import { createAction, props } from '@ngrx/store'; +export var surveyCompleted = createAction("[Survey Page] Survey Completed", props()); +//# sourceMappingURL=survey.actions.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/survey.actions.js.map b/dist/out-tsc/src/app/survey/survey.actions.js.map new file mode 100644 index 000000000..284035613 --- /dev/null +++ b/dist/out-tsc/src/app/survey/survey.actions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"survey.actions.js","sourceRoot":"","sources":["../../../../../src/app/survey/survey.actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,KAAK,EAAC,MAAM,aAAa,CAAC;AAIhD,MAAM,CAAC,IAAM,eAAe,GAAG,YAAY,CACvC,gCAAgC,EAChC,KAAK,EAAoC,CAC5C,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/survey.effects.js b/dist/out-tsc/src/app/survey/survey.effects.js new file mode 100644 index 000000000..28d7e7fc4 --- /dev/null +++ b/dist/out-tsc/src/app/survey/survey.effects.js @@ -0,0 +1,57 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { Actions, createEffect, ofType } from '@ngrx/effects'; +import { tap } from 'rxjs/operators'; +import { Router } from '@angular/router'; +import { SurveyActions } from './action-types'; +import { UserProfileService } from '../user/user-profile/user-profile.service'; +import { HttpClient } from '@angular/common/http'; +import * as moment from 'moment'; +import { environment } from '../../environments/environment'; + + +var SurveyEffects = /** @class */ (function () { + function SurveyEffects(actions$, router, userProfileService, httpClient) { + var _this = this; + this.actions$ = actions$; + this.router = router; + this.userProfileService = userProfileService; + this.httpClient = httpClient; + this.flaskServerAPIEndpoint = environment.flaskServerForIncentives; + + this.login$ = createEffect(function () { + return _this.actions$.pipe(ofType(SurveyActions.surveyCompleted), tap(function (action) { + //store on a server + localStorage.setItem('surveyTimeline', JSON.stringify(action.surveyTimeline)); + // + var username = _this.userProfileService.username; + var currentTimeTs = Date.now(); + var currentTimeReadableTs = moment().format("MMMM Do YYYY, h:mm:ss a Z"); + var dataString = moment().format("YYYYMMDD"); + var headers = { "Content-Type": "application/json;charset=UTF-8" }; + var body = { "user_id": username, "dataString": dataString, "whenCompletedTs": currentTimeTs, "whenCompletedReadableTs": currentTimeReadableTs }; + /* + this.httpClient.post("http://ec2-54-91-131-166.compute-1.amazonaws.com:56733/store-onesignal-id", body, { headers }).subscribe({ + next: data => console.log(data), + error: error => console.error('There was an error!', error) + }); + */ + _this.httpClient.post(this.flaskServerAPIEndpoint + "/store-survey-completed", body) + .subscribe({ + next: function (data) { return console.log("--survey_completed-- " + JSON.stringify(data)); }, + error: function (error) { return console.error('There was an error!', error); } + }); + })); + }, { dispatch: false }); + } + SurveyEffects = tslib_1.__decorate([ + Injectable(), + tslib_1.__metadata("design:paramtypes", [Actions, + Router, + UserProfileService, + HttpClient]) + ], SurveyEffects); + return SurveyEffects; +}()); +export { SurveyEffects }; +//# sourceMappingURL=survey.effects.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/survey.effects.js.map b/dist/out-tsc/src/app/survey/survey.effects.js.map new file mode 100644 index 000000000..7e946e7c8 --- /dev/null +++ b/dist/out-tsc/src/app/survey/survey.effects.js.map @@ -0,0 +1 @@ +{"version":3,"file":"survey.effects.js","sourceRoot":"","sources":["../../../../../src/app/survey/survey.effects.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAA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C,GAAG,CAAC,uBAAuB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAA3D,CAA2D;oBACzE,KAAK,EAAE,UAAA,KAAK,IAAI,OAAA,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,EAA3C,CAA2C;iBAC9D,CAAC,CAAC;YACP,CAAC,CAAC,CACL;QA3BL,CA2BK,EAET,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAC;IAQnB,CAAC;IAxCQ,aAAa;QADzB,UAAU,EAAE;iDAoCqB,OAAO;YACT,MAAM;YACM,kBAAkB;YAC1B,UAAU;OAtCjC,aAAa,CA0CzB;IAAD,oBAAC;CAAA,AA1CD,IA0CC;SA1CY,aAAa"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/survey.module.js b/dist/out-tsc/src/app/survey/survey.module.js new file mode 100644 index 000000000..ecae41841 --- /dev/null +++ b/dist/out-tsc/src/app/survey/survey.module.js @@ -0,0 +1,64 @@ +import * as tslib_1 from "tslib"; +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +//import { PromptedSurveyComponent } from './prompted-survey/prompted-survey.component'; +//import { MorningReportComponent } from './morning-report/morning-report.component'; +//import { InitiatedDrinkComponent } from './initiated-drink/initiated-drink.component'; +import { IonicModule } from '@ionic/angular'; +import { FormsModule } from '@angular/forms'; +import { StorageModule } from '../storage/storage.module'; +//import { ActivetaskComponent } from './activetask/activetask.component'; +//import { ActiveTask2Component } from './active-task2/active-task2.component'; +import { DynamicSurveyComponent } from './dynamic-survey/dynamic-survey.component'; +import { SampleSurveyComponent } from './sample-survey/sample-survey.component'; +import { RouterModule } from '@angular/router'; +import { IncentiveModule } from '../incentive/incentive.module'; +import { AyaSampleSurveyComponent } from './aya-sample-survey/aya-sample-survey.component'; +import { StoreModule } from '@ngrx/store'; +import { surveyReducer } from './reducers'; +import { EffectsModule } from '@ngrx/effects'; +import { SurveyEffects } from './survey.effects'; +var routes = [ + { path: 'samplesurvey', component: SampleSurveyComponent } +]; +var SurveyModule = /** @class */ (function () { + function SurveyModule() { + } + SurveyModule = tslib_1.__decorate([ + NgModule({ + declarations: [ + //InitiatedDrinkComponent, + //MorningReportComponent, + //PromptedSurveyComponent, + //ActivetaskComponent, + DynamicSurveyComponent, + AyaSampleSurveyComponent, + //ActiveTask2Component, + SampleSurveyComponent + ], + imports: [ + CommonModule, + IonicModule.forRoot(), + FormsModule, + StorageModule, + IncentiveModule, + RouterModule.forChild(routes), + StoreModule.forFeature('survey', surveyReducer), + EffectsModule.forFeature([SurveyEffects]) + ], + exports: [ + //InitiatedDrinkComponent, + //MorningReportComponent, + //PromptedSurveyComponent, + //ActivetaskComponent, + //ActiveTask2Component, + DynamicSurveyComponent, + SampleSurveyComponent, + AyaSampleSurveyComponent + ] + }) + ], SurveyModule); + return SurveyModule; +}()); +export { SurveyModule }; +//# sourceMappingURL=survey.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/survey/survey.module.js.map b/dist/out-tsc/src/app/survey/survey.module.js.map new file mode 100644 index 000000000..7ecc62106 --- /dev/null +++ b/dist/out-tsc/src/app/survey/survey.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"survey.module.js","sourceRoot":"","sources":["../../../../../src/app/survey/survey.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,wFAAwF;AACxF,qFAAqF;AACrF,wFAAwF;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,0EAA0E;AAC1E,+EAA+E;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,M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/src/app/user/auth/auth.component.js new file mode 100644 index 000000000..cff2c2eed --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.component.js @@ -0,0 +1,115 @@ +//this component will register/login a user +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +import { AuthService } from './auth.service'; +import { Router } from '@angular/router'; +import { environment } from 'src/environments/environment'; +import { UserProfileService } from '../user-profile/user-profile.service'; +import { tap } from 'rxjs/operators'; +import { OneSignal } from '@ionic-native/onesignal/ngx'; +var AuthComponent = /** @class */ (function () { + function AuthComponent(authService, router, userProfileService, oneSignal) { + this.authService = authService; + this.router = router; + this.userProfileService = userProfileService; + this.oneSignal = oneSignal; + this.isLoginMode = true; + this.isLoading = false; + this.error = null; + } + // was used to switch mode between login and register + // onSwitchMode(){ + // this.isLoginMode = !this.isLoginMode; + // } + AuthComponent.prototype.ngOnInit = function () { + console.log(environment.userServer); + }; + //login button was clicked + AuthComponent.prototype.onSubmit = function (form) { + var _this = this; + console.log("auth.component.ts - onSubmit method - begin"); + if (!form.valid) { + console.log('invalid'); + return; + } + var userName = form.value.userName; + var password = form.value.password; + var authObs; + this.isLoading = true; + // if(this.isLoginMode){ + // login returns an observable + authObs = this.authService.login(userName, password); + // }else{ + // authObs = this.authService.signup(userName, password); + // } + this.authSub = authObs.subscribe(function (resData) { + console.log("auth.component.ts - onSubmit method - authService.login response: " + JSON.stringify(resData)); + if (resData.hasOwnProperty('access_token') && resData.hasOwnProperty('refresh_token')) { + // the response contains an access token and refresh token + console.log("auth.component.ts - onSubmit method - has access token"); + // userProfileService.initializeObs returns an observable, + // then below we can get the OneSignal Player id when UserProfile has been intialized + _this.userSub = _this.userProfileService.initializeObs() + .pipe(tap(function () { + _this.oneSignal.getIds().then(function (id) { return tslib_1.__awaiter(_this, void 0, void 0, function () { + var playerId; + return tslib_1.__generator(this, function (_a) { + playerId = id.userId; + this.userProfileService.userProfile.oneSignalPlayerId = id.userId; + console.log("onesignal player id: " + id); + this.userProfileService.saveProfileToDevice(); + this.userProfileService.saveToServer(); + return [2 /*return*/]; + }); + }); }); + })) + .subscribe(function () { + //this.router.navigateByUrl('/home'); + _this.router.navigate(['home']); + _this.isLoading = false; + }); + } + else { + _this.isLoading = false; + _this.authService.loggedInUser.next(null); + //for testing purposes. + // this.router.navigateByUrl('/home'); + // console.log("log in did not succeed"); + if (resData.hasOwnProperty('message')) { + _this.error = resData.message; + } + else { + _this.error = "Unknown error\n" + JSON.stringify(resData); + } + } + // console.log(resData); + }, function (errorMessage) { + console.log(errorMessage); + _this.error = errorMessage; + _this.isLoading = false; + }); + form.reset(); + }; + AuthComponent.prototype.ngOnDestroy = function () { + if (this.userSub) { + this.userSub.unsubscribe(); + } + if (this.authSub) { + this.authSub.unsubscribe(); + } + }; + AuthComponent = tslib_1.__decorate([ + Component({ + selector: 'app-auth', + templateUrl: './auth.component.html', + styleUrls: ['./auth.component.scss'], + }), + tslib_1.__metadata("design:paramtypes", [AuthService, + Router, + UserProfileService, + OneSignal]) + ], AuthComponent); + return AuthComponent; +}()); +export { AuthComponent }; +//# sourceMappingURL=auth.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.component.js.map b/dist/out-tsc/src/app/user/auth/auth.component.js.map new file mode 100644 index 000000000..57f0ba115 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.component.js","sourceRoot":"","sources":["../../../../../../src/app/user/auth/auth.component.ts"],"names":[],"mappings":"AAAA,2CAA2C;;AAE3C,OAAO,EAAE,SAAS,EAAqB,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,M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,KAAK,GAAG,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;iBAC1D;aACF;YACD,wBAAwB;QAC1B,CAAC,EAAE,UAAA,YAAY;YACb,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YAC1B,KAAI,CAAC,KAAK,GAAG,YAAY,CAAC;YAC1B,KAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACzB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAGD,mCAAW,GAAX;QACE,IAAG,IAAI,CAAC,OAAO,EAAC;YACd,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;SAC5B;QACD,IAAG,IAAI,CAAC,OAAO,EAAC;YACd,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;SAC5B;IACH,CAAC;IA5GU,aAAa;QALzB,SAAS,CAAC;YACT,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,uBAAuB;YACpC,SAAS,EAAE,CAAC,uBAAuB,CAAC;SACrC,CAAC;iDAQiC,WAAW;YAC1B,MAAM;YACM,kBAAkB;YAC3B,SAAS;OAVnB,aAAa,CA6GzB;IAAD,oBAAC;CAAA,AA7GD,IA6GC;SA7GY,aAAa"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.component.spec.js b/dist/out-tsc/src/app/user/auth/auth.component.spec.js new file mode 100644 index 000000000..5a2aaee01 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.component.spec.js @@ -0,0 +1,23 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, TestBed } from '@angular/core/testing'; +import { AuthComponent } from './auth.component'; +describe('AuthComponent', function () { + var component; + var fixture; + beforeEach(async(function () { + TestBed.configureTestingModule({ + declarations: [AuthComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + beforeEach(function () { + fixture = TestBed.createComponent(AuthComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + it('should create', function () { + expect(component).toBeTruthy(); + }); +}); +//# sourceMappingURL=auth.component.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.component.spec.js.map b/dist/out-tsc/src/app/user/auth/auth.component.spec.js.map new file mode 100644 index 000000000..ea5a63504 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.component.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/user/auth/auth.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAQ,CAAC,eAAe,EAAE;IACxB,IAAI,SAAwB,CAAC;IAC7B,IAAI,OAAwC,CAAC;IAE7C,UAAU,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,sBAAsB,CAAC;YAC7B,YAAY,EAAE,CAAE,aAAa,CAAE;YAC/B,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;aACD,iBAAiB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC;QACT,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;QACjD,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACtC,OAAO,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;QAClB,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.guard.js b/dist/out-tsc/src/app/user/auth/auth.guard.js new file mode 100644 index 000000000..45382c302 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.guard.js @@ -0,0 +1,37 @@ +import * as tslib_1 from "tslib"; +import { Router } from '@angular/router'; +import { Injectable } from '@angular/core'; +import { AuthService } from './auth.service'; +import { map, take } from 'rxjs/operators'; +var AuthGuard = /** @class */ (function () { + function AuthGuard(authService, router) { + this.authService = authService; + this.router = router; + } + AuthGuard.prototype.canActivate = function (route, router) { + //This using reactive programming + //--- pipe: is a series of operation to be executed when the observables "loggedInUser" state changes + //--- take: an observable can emit a series of values. take(1) means only the first value will be used + //--- map: function takes an observable, do some transformation and returns a observable. + //--- search documentation here: https://rxjs-dev.firebaseapp.com/ + var _this = this; + return this.authService.loggedInUser.pipe(take(1), map(function (loggedInUser) { + var isAuth = !!loggedInUser; + if (isAuth) { + console.log("auth.guard.ts - (isAuth): true"); + return true; + } + else { + console.log("auth.guard.ts - (isAuth): false"); + return _this.router.createUrlTree(['auth']); + } + })); + }; + AuthGuard = tslib_1.__decorate([ + Injectable({ providedIn: 'root' }), + tslib_1.__metadata("design:paramtypes", [AuthService, Router]) + ], AuthGuard); + return AuthGuard; +}()); +export { AuthGuard }; +//# sourceMappingURL=auth.guard.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.guard.js.map b/dist/out-tsc/src/app/user/auth/auth.guard.js.map new file mode 100644 index 000000000..db574bf1b --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.guard.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../../../../../src/app/user/auth/auth.guard.ts"],"names":[],"mappings":";AAAA,OAAO,EAA4D,MAAM,EAAW,MAAM,iBAAiB,CAAC;AAC5G,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C;IACE,mBAAoB,WAAwB,EAAU,MAAc;QAAhD,gBAAW,GAAX,WAAW,CAAa;QAAU,WAAM,GAAN,MAAM,CAAQ;IAAE,CAAC;IAEvE,+BAAW,GAAX,UAAY,KAA6B,EAAE,MAA2B;QAEpE,iCAAiC;QACjC,qGAAqG;QACrG,sGAAsG;QACtG,yFAAyF;QACzF,kEAAkE;QANpE,iBAkBC;QAVC,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,GAAG,CAAC,UAAA,YAAY;YAChE,IAAM,MAAM,GAAG,CAAC,CAAC,YAAY,CAAC;YAC9B,IAAG,MAAM,EAAC;gBACR,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;gBAC9C,OAAO,IAAI,CAAC;aACb;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;gBAC/C,OAAO,KAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;aAC5C;QACH,CAAC,CAAC,CAAC,CAAC;IACN,CAAC;IArBU,SAAS;QADrB,UAAU,CAAC,EAAC,UAAU,EAAE,MAAM,EAAC,CAAC;iDAEE,WAAW,EAAkB,MAAM;OADzD,SAAS,CAsBrB;IAAD,gBAAC;CAAA,AAtBD,IAsBC;SAtBY,SAAS"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.service.js b/dist/out-tsc/src/app/user/auth/auth.service.js new file mode 100644 index 000000000..0722814e6 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.service.js @@ -0,0 +1,169 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { HttpClient, HttpHeaders } from '@angular/common/http'; +import { catchError, tap } from 'rxjs/operators'; +import { throwError, BehaviorSubject } from 'rxjs'; +// import { User } from './user.model'; +import { Router } from '@angular/router'; +// import { AngularFireAuth } from '@angular/fire/auth'; +import { environment } from 'src/environments/environment'; +var AuthService = /** @class */ (function () { + function AuthService(http, router) { + this.http = http; + this.router = router; + //new + this.loggedInUser = new BehaviorSubject(localStorage.getItem('loggedInUser')); //localStorage.getItem('loggedInUser') + this.userSub = this.loggedInUser.subscribe(function (loggedInUser) { + if (loggedInUser === null) { + localStorage.removeItem('loggedInUser'); + localStorage.removeItem('userProfile'); + } + else { + localStorage.setItem('loggedInUser', loggedInUser); + } + }); + this.ACCESS_TOKEN = 'ACCESS_TOKEN'; + this.ACCESS_TOKEN_EXPIRATION = 'ACCESS_TOKEN_EXPIRATION'; + this.REFRESH_TOKEN = 'REFRESH_TOKEN'; + this.REFRESH_TOKEN_EXPIRATION = 'REFRESH_TOKEN_EXPIRATION'; + } + // used to register new user + AuthService.prototype.signup = function (userName, password) { + var _this = this; + return this.http + .post(environment.userServer + '/registration', { + username: userName, + password: password + }).pipe(catchError(this.handleError), tap(function (resData) { + _this.loggedInUser.next(userName); + _this.storeAccessToken(resData.access_token, resData.access_expires); + _this.storeRefreshToken(resData.refresh_token, resData.refresh_expires); + console.log("resData: " + JSON.stringify(resData)); + })); + }; + // initializes loggedinUsder + AuthService.prototype.autoLogin = function () { + console.log("auth.service.ts - autoLogin method - begin"); + var loggedInUser = localStorage.getItem('loggedInUser'); + if (loggedInUser === null) { + console.log("auth.service.ts - autoLogin method - (loggedInUser===null)"); + return; + } + else { + console.log("auth.service.ts - autoLogin method - (sending saved observable)"); + this.loggedInUser.next(loggedInUser); + } + }; + AuthService.prototype.logout = function () { + this.loggedInUser.next(null); + this.router.navigate(['/home']); + localStorage.removeItem('loggedInUser'); + this.removeTokens(); + }; + //may not need + // autoLogout(expirationDuration: number){ + // console.log(expirationDuration); + // this.tokenExpirationTimer= setTimeout(() => { + // this.logout(); + // },expirationDuration); + // } + AuthService.prototype.login = function (userName, password) { + var _this = this; + console.log("auth.service.ts -login method - begin"); + return this.http + .post(environment.userServer + '/login', { + username: userName, + password: password + }).pipe(catchError(this.handleError), tap(function (resData) { + _this.loggedInUser.next(userName); + _this.storeAccessToken(resData.access_token, resData.access_token); + _this.storeRefreshToken(resData.refresh_token, resData.refresh_expires); + console.log("auth.service.ts -login method - loggedInUser: " + _this.loggedInUser.getValue()); + console.log("auth.service.ts -login method - resData: " + JSON.stringify(resData)); + })); + }; + AuthService.prototype.handleError = function (errorRes) { + console.log("auth.service.ts - handleError method - begin"); + var errorMessage = 'An unknown error occurred!!!! \n' + JSON.stringify(errorRes); + if (!errorRes.error || !errorRes.error.error) { + return throwError(errorMessage); + } + switch (errorRes.error.error.message) { + case 'EMAIL_EXISTS': + errorMessage = 'This email exists already!'; + break; + case 'EMAIL_NOT_FOUND': + errorMessage = 'Email address not found!'; + break; + case 'INVALID_PASSWORD': + errorMessage = 'This password is not correct.'; + break; + } + return throwError(errorMessage); + }; + //use refresh token to get a new access token + AuthService.prototype.refreshToken = function () { + var _this = this; + console.log("auth.service.ts - refreshToken method - begin"); + var token = this.getRefreshToken(); + var httpOptions = { + headers: new HttpHeaders({ + 'Authorization': "Bearer " + token + }) + }; + return this.http.post(environment.userServer + "/token/refresh", { + 'refreshToken': this.getRefreshToken() + }, httpOptions).pipe(tap(function (resData) { + _this.storeAccessToken(resData.access_token, resData.access_expires); + })); + }; + // private removeUser(){ + // localStorage.removeItem('user'); + // } + // check if loggedInUser has a value and in which case, the user is logged in + AuthService.prototype.isLoggedIn = function () { + console.log("auth.service.ts - isLoggedIn method - begin"); + return !!this.loggedInUser.getValue(); + }; + AuthService.prototype.getAccessToken = function () { + console.log("auth.service.ts - getAccessToken method - begin"); + return localStorage.getItem(this.ACCESS_TOKEN); + }; + AuthService.prototype.doLogoutUser = function () { + this.loggedInUser = null; + this.removeTokens(); + }; + AuthService.prototype.getRefreshToken = function () { + console.log("auth.service.ts - getRefreshToken method - begin"); + return localStorage.getItem(this.REFRESH_TOKEN); + }; + AuthService.prototype.storeAccessToken = function (token, expires) { + console.log("auth.service.ts - storeAccessToken method - begin"); + localStorage.setItem(this.ACCESS_TOKEN, token); + var expirationDate = new Date(new Date().getTime() + +expires * 1000); + localStorage.ACCESS_TOKEN_EXPIRATION = expirationDate; + }; + AuthService.prototype.storeRefreshToken = function (token, expires) { + console.log("auth.service.ts - storeRefreshToken method - begin"); + localStorage.setItem(this.REFRESH_TOKEN, token); + var expirationDate = new Date(new Date().getTime() + +expires * 1000); + localStorage.REFRESH_TOKEN_EXPIRATION = expirationDate; + }; + AuthService.prototype.removeTokens = function () { + console.log("auth.service.ts - removeTokens method - begin"); + localStorage.removeItem(this.ACCESS_TOKEN); + localStorage.removeItem(this.ACCESS_TOKEN_EXPIRATION); + localStorage.removeItem(this.REFRESH_TOKEN); + localStorage.removeItem(this.REFRESH_TOKEN_EXPIRATION); + }; + AuthService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [HttpClient, + Router]) + ], AuthService); + return AuthService; +}()); +export { AuthService }; +//# sourceMappingURL=auth.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.service.js.map b/dist/out-tsc/src/app/user/auth/auth.service.js.map new file mode 100644 index 000000000..6a178626c --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../../../../src/app/user/auth/auth.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAqB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAW,eAAe,EAA4B,MAAM,MAAM,CAAC;AACtF,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,wDAAwD;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAe3D;IAqBE,qBAAoB,IAAgB,EAChB,M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G,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;QACxE,YAAY,CAAC,uBAAuB,GAAG,cAAc,CAAC;IACxD,CAAC;IAEO,uCAAiB,GAAzB,UAA0B,KAAa,EAAE,OAAe;QACtD,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;QAClE,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAChD,IAAM,cAAc,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;QACxE,YAAY,CAAC,wBAAwB,GAAG,cAAc,CAAC;IACzD,CAAC;IAEO,kCAAY,GAApB;QACE,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;QAC7D,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3C,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACtD,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5C,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAEzD,CAAC;IA/KY,WAAW;QAHvB,UAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;iDAsB0B,UAAU;YACR,MAAM;OAtBvB,WAAW,CAiLvB;IAAD,kBAAC;CAAA,AAjLD,IAiLC;SAjLY,WAAW"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.service.spec.js b/dist/out-tsc/src/app/user/auth/auth.service.spec.js new file mode 100644 index 000000000..8873cf955 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { AuthService } from './auth.service'; +describe('AuthService', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(AuthService); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=auth.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/auth.service.spec.js.map b/dist/out-tsc/src/app/user/auth/auth.service.spec.js.map new file mode 100644 index 000000000..06c754d98 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/auth.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.service.spec.js","sourceRoot":"","sources":["../../../../../../src/app/user/auth/auth.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,QAAQ,CAAC,aAAa,EAAE;IACtB,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAAgB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACtD,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/loading-spinner/loading-spinner.component.js b/dist/out-tsc/src/app/user/auth/loading-spinner/loading-spinner.component.js new file mode 100644 index 000000000..cb2063171 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/loading-spinner/loading-spinner.component.js @@ -0,0 +1,16 @@ +import * as tslib_1 from "tslib"; +import { Component } from '@angular/core'; +var LoadingSpinnerComponent = /** @class */ (function () { + function LoadingSpinnerComponent() { + } + LoadingSpinnerComponent = tslib_1.__decorate([ + Component({ + selector: 'app-loading-spinner', + template: '
Facebook
', + styleUrls: ['./loading-spinner.component.css'] + }) + ], LoadingSpinnerComponent); + return LoadingSpinnerComponent; +}()); +export { LoadingSpinnerComponent }; +//# sourceMappingURL=loading-spinner.component.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/loading-spinner/loading-spinner.component.js.map b/dist/out-tsc/src/app/user/auth/loading-spinner/loading-spinner.component.js.map new file mode 100644 index 000000000..f76ffd951 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/loading-spinner/loading-spinner.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"loading-spinner.component.js","sourceRoot":"","sources":["../../../../../../../src/app/user/auth/loading-spinner/loading-spinner.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAO1C;IAAA;IAAqC,CAAC;IAAzB,uBAAuB;QALnC,SAAS,CAAC;YACT,QAAQ,EAAE,qBAAqB;YAC/B,QAAQ,EAAE,mDAAmD;YAC7D,SAAS,EAAE,CAAC,iCAAiC,CAAC;SAC/C,CAAC;OACW,uBAAuB,CAAE;IAAD,8BAAC;CAAA,AAAtC,IAAsC;SAAzB,uBAAuB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/token.interceptor.js b/dist/out-tsc/src/app/user/auth/token.interceptor.js new file mode 100644 index 000000000..6bd256106 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/token.interceptor.js @@ -0,0 +1,67 @@ +// logic borrowed from https://angular-academy.com/angular-jwt/ +// all http requests will be intercepted by this token interceptor +// which adds the access token to the request, unless URL contains refresh +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { HttpErrorResponse } from '@angular/common/http'; +import { throwError, BehaviorSubject } from 'rxjs'; +import { catchError, filter, take, switchMap } from 'rxjs/operators'; +import { AuthService } from './auth.service'; +var TokenInterceptor = /** @class */ (function () { + function TokenInterceptor(authService) { + this.authService = authService; + this.isRefreshing = false; + this.refreshTokenSubject = new BehaviorSubject(null); + } + TokenInterceptor.prototype.intercept = function (request, next) { + var _this = this; + console.log("token.interceptorts - intercept method - begin"); + if (this.authService.loggedInUser.getValue()) { + //if it's a refresh request, don't overwrite the token since it was already added + if (request.url.indexOf('refresh') < 0) { + request = this.addToken(request, this.authService.getAccessToken()); + } + } + return next.handle(request).pipe(catchError(function (error) { + if (error instanceof HttpErrorResponse && error.status === 401) { + return _this.handle401Error(request, next); + } + else { + return throwError(error); + } + })); + }; + TokenInterceptor.prototype.addToken = function (request, token) { + console.log("token.interceptorts - addToken method - begin"); + return request.clone({ + setHeaders: { + 'Authorization': "Bearer " + token + } + }); + }; + TokenInterceptor.prototype.handle401Error = function (request, next) { + var _this = this; + console.log("token.interceptorts - handle401Error method - begin"); + if (!this.isRefreshing) { + this.isRefreshing = true; + this.refreshTokenSubject.next(null); + return this.authService.refreshToken().pipe(switchMap(function (token) { + _this.isRefreshing = false; + _this.refreshTokenSubject.next(token.access_token); + return next.handle(_this.addToken(request, token.access_token)); + })); + } + else { + return this.refreshTokenSubject.pipe(filter(function (token) { return token != null; }), take(1), switchMap(function (access_token) { + return next.handle(_this.addToken(request, access_token)); + })); + } + }; + TokenInterceptor = tslib_1.__decorate([ + Injectable(), + tslib_1.__metadata("design:paramtypes", [AuthService]) + ], TokenInterceptor); + return TokenInterceptor; +}()); +export { TokenInterceptor }; +//# sourceMappingURL=token.interceptor.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/token.interceptor.js.map b/dist/out-tsc/src/app/user/auth/token.interceptor.js.map new file mode 100644 index 000000000..06749623e --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/token.interceptor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"token.interceptor.js","sourceRoot":"","sources":["../../../../../../src/app/user/auth/token.interceptor.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,kEAAkE;AAClE,0EAA0E;;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAwD,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE/G,OAAO,EAAc,UAAU,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC/D,OAAO,EAAE,UAAU,EA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Ac,GAAtB,UAAuB,OAAyB,EAAE,IAAiB;QAAnE,iBAqBC;QApBC,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QACnE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACtB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAEpC,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,IAAI,CACzC,SAAS,CAAC,UAAC,KAAU;gBACnB,KAAI,CAAC,YAAY,GAAG,KAAK,CAAC;gBAC1B,KAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;gBAClD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;YACjE,CAAC,CAAC,CAAC,CAAC;SAEP;aAAM;YACL,OAAO,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAClC,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,IAAI,IAAI,EAAb,CAAa,CAAC,EAC9B,IAAI,CAAC,CAAC,CAAC,EACP,SAAS,CAAC,UAAA,YAAY;gBACpB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;YAC3D,CAAC,CAAC,CAAC,CAAC;SACP;IACH,CAAC;IAxDU,gBAAgB;QAD5B,UAAU,EAAE;iDAMqB,WAAW;OALhC,gBAAgB,CAyD5B;IAAD,uBAAC;CAAA,AAzDD,IAyDC;SAzDY,gBAAgB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/user.model.js b/dist/out-tsc/src/app/user/auth/user.model.js new file mode 100644 index 000000000..5ed373642 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/user.model.js @@ -0,0 +1,28 @@ +var User = /** @class */ (function () { + function User(userName, _accessToken, _refreshToken, _accessTokenExpirationDate, _refreshTokenExpirationDate) { + this.userName = userName; + this._accessToken = _accessToken; + this._refreshToken = _refreshToken; + this._accessTokenExpirationDate = _accessTokenExpirationDate; + this._refreshTokenExpirationDate = _refreshTokenExpirationDate; + } + User.prototype.setAccessToken = function (token, expirationDate) { + this._accessToken = token; + this._accessTokenExpirationDate = expirationDate; + }; + User.prototype.getAccessToken = function () { + if (!this._accessTokenExpirationDate || new Date() > this._accessTokenExpirationDate) { + return null; + } + return this._accessToken; + }; + User.prototype.getRefreshToken = function () { + if (!this._refreshTokenExpirationDate || new Date() > this._refreshTokenExpirationDate) { + return null; + } + return this._refreshToken; + }; + return User; +}()); +export { User }; +//# sourceMappingURL=user.model.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/auth/user.model.js.map b/dist/out-tsc/src/app/user/auth/user.model.js.map new file mode 100644 index 000000000..4dc693758 --- /dev/null +++ b/dist/out-tsc/src/app/user/auth/user.model.js.map @@ -0,0 +1 @@ +{"version":3,"file":"user.model.js","sourceRoot":"","sources":["../../../../../../src/app/user/auth/user.model.ts"],"names":[],"mappings":"AAAA;IACE,cACS,QAAgB,EACf,YAAoB,EACpB,aAAqB,EACrB,0BAAgC,EAChC,2BAAiC;QAJlC,aAAQ,GAAR,QAAQ,CAAQ;QACf,iBAAY,GAAZ,YAAY,CAAQ;QACpB,kBAAa,GAAb,aAAa,CAAQ;QACrB,+BAA0B,GAA1B,0BAA0B,CAAM;QAChC,gCAA2B,GAA3B,2BAA2B,CAAM;IAAE,CAAC;IAE5C,6BAAc,GAAd,UAAe,KAAa,EAAE,cAAoB;QAChD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,0BAA0B,GAAG,cAAc,CAAC;IACnD,CAAC;IAED,6BAAc,GAAd;QACE,IAAG,CAAC,IAAI,CAAC,0BAA0B,IAAI,IAAI,IAAI,EAAE,GAAG,IAAI,CAAC,0BAA0B,EAAC;YAClF,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD,8BAAe,GAAf;QACE,IAAG,CAAC,IAAI,CAAC,2BAA2B,IAAI,IAAI,IAAI,EAAE,GAAG,IAAI,CAAC,2BAA2B,EAAC;YACpF,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IACL,WAAC;AAAD,CAAC,AA3BD,IA2BC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/user-profile/user-profile.model.js b/dist/out-tsc/src/app/user/user-profile/user-profile.model.js new file mode 100644 index 000000000..dcf1dffd3 --- /dev/null +++ b/dist/out-tsc/src/app/user/user-profile/user-profile.model.js @@ -0,0 +1,34 @@ +//contains the two classes UserProfile and UserProfileFixed +var UserProfile = /** @class */ (function () { + // created constructor to initialize UserProfile - early on + function UserProfile(username, datesTaken, points, badgeCount, lastupdate, readable_ts) { + this.badges = { 'daily_survey': [], + 'money': 0, + }; + this.daily_streak = {}; + this.imei = "0"; + this.dollars = 0; + this.life_insights = { "daily_survey": {} }; + this.reinfrocement_data = {}; + this.survey_data = { + 'daily_survey': {}, + 'points': 0, + 'weekly_survey': {} + }; + this.username = username; + this.datesTaken = datesTaken; + this.points = points; + this.badgeCount = badgeCount; + this.lastupdate = lastupdate; + this.readable_ts = readable_ts; + } + return UserProfile; +}()); +export { UserProfile }; +var UserProfileFixed = /** @class */ (function () { + function UserProfileFixed() { + } + return UserProfileFixed; +}()); +export { UserProfileFixed }; +//# sourceMappingURL=user-profile.model.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/user-profile/user-profile.model.js.map b/dist/out-tsc/src/app/user/user-profile/user-profile.model.js.map new file mode 100644 index 000000000..d27a12ae9 --- /dev/null +++ b/dist/out-tsc/src/app/user/user-profile/user-profile.model.js.map @@ -0,0 +1 @@ +{"version":3,"file":"user-profile.model.js","sourceRoot":"","sources":["../../../../../../src/app/user/user-profile/user-profile.model.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAE3D;IA6BI,2DAA2D;IAC3D,qBAAY,QAAgB,EAChB,UAAoB,EACpB,MAAc,EACd,UAAkB,EAClB,UAAkB,EAClB,WAAmB;QAlCxB,WAAM,GAAG,EAAE,cAAc,EAAE,EAAE;YACnB,OAAO,EAAE,CAAC;SACT,CAAC;QACZ,iBAAY,GAAE,EAAE,CAAC;QACjB,SAAI,GAAU,GAAG,CAAC;QAClB,YAAO,GAAW,CAAC,CAAE;QAErB,kBAAa,GAAG,EAAC,cAAc,EAAE,EAAE,EAAC,CAAC;QACrC,uBAAkB,GAAG,EAAE,CAAC;QAOxB,gBAAW,GAAG;YACjB,cAAc,EAAC,EAAE;YACjB,QAAQ,EAAE,CAAC;YACX,eAAe,EAAC,EAAE;SACrB,CAAC;QAgBE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IACL,kBAAC;AAAD,CAAC,AA3CD,IA2CC;;AAED;IAAA;IAGA,CAAC;IAAD,uBAAC;AAAD,CAAC,AAHD,IAGC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/user-profile/user-profile.service.js b/dist/out-tsc/src/app/user/user-profile/user-profile.service.js new file mode 100644 index 000000000..0e6303ef4 --- /dev/null +++ b/dist/out-tsc/src/app/user/user-profile/user-profile.service.js @@ -0,0 +1,325 @@ +import * as tslib_1 from "tslib"; +import { Injectable } from '@angular/core'; +import { UserProfile } from './user-profile.model'; +import { HttpClient } from '@angular/common/http'; +import { environment } from 'src/environments/environment'; +import { BehaviorSubject, forkJoin } from 'rxjs'; +import { tap } from 'rxjs/operators'; +import * as moment from 'moment'; +var UserProfileService = /** @class */ (function () { + function UserProfileService(http) { + this.http = http; + this.me = this; + this.initialLoading = new BehaviorSubject(true); + } + //returns Observable that we can subsrbie to so as to trigger an action after + //user profile has been initialized + UserProfileService.prototype.initializeObs = function () { + var _this = this; + //get profile from server + // + console.log("user-profile.service.ts - initializeObs method"); + var getProfile = this.http.post(environment.userServer + '/userinfo', { "empty": "empty" }); + var getProfileFixed = this.http.get(environment.userServer + '/userinfofixed'); + // forkJoin will return an observable that waits till both http requests have received responses + return forkJoin([getProfile, getProfileFixed]) + .pipe(tap(function (response) { + console.log("in response of forkjoin"); + var response1 = response[0]; + var response2 = response[1]; + console.log("initializeObs response1: " + JSON.stringify(response1)); + console.log("initializeObs response2: " + JSON.stringify(response2)); + console.log("initializeOb - response1.username: " + response1.username); + console.log("initializeOb - !response1.username: " + !response1.username); + console.log("initializeOb - !response1.hasOwnProperty('username'): " + !response1.hasOwnProperty('username')); + if (!response1.username || !response1.hasOwnProperty('username')) { + console.log("blank or empty user_name"); + var username = localStorage.getItem('loggedInUser'); + var currenttime = new Date(); + var dateString = moment(currenttime).format('MMMM Do YYYY, h:mm:ss a Z'); + _this.userProfile = new UserProfile(username, [], 0, 0, currenttime.getTime(), dateString); + } + else { + _this.userProfile = response1; + if (_this.userProfile.hasOwnProperty("AwardDollarDates")) { + localStorage.setItem("AwardDollarDates", JSON.stringify(_this.userProfile.AwardDollarDates)); + } + localStorage.setItem("AwardDollar", JSON.stringify(_this.userProfile.dollars)); + } + _this.userProfileFixed = response2; + _this.saveProfileToDevice(); + _this.initialLoading.next(false); + })); + }; + /* + addReinforcementData returns true if successful at adding the element (it doesn't already exist for the given date) + date is a string of the format YYYYMMDD (e.g. "20170430") + + reinforcementObj is an object of the form: + { + "ds": 1, //means participants completed the survey + "prob": 0.23, + "Like": "yes", //no if participants hated it. + "reward": 1, //0 means users were not randomized + "reward_type": "meme", //'altruistic message' + "reward_img_link": "img/reinforcements/memes/IM25.jpg" + } + */ + UserProfileService.prototype.addReinforcementData = function (date, reinforcementObj) { + if (!(date in this.userProfile.reinfrocement_data)) { + this.userProfile.reinfrocement_data[date] = reinforcementObj; + return true; + } + else { + return false; + } + }; + // not currenlty using below method (wich calcs dollars based on days survey is taken in UserProfile) + // instead allowing award-dollar.service to calc streaks + UserProfileService.prototype.calcDollars = function () { + //this method calculates the number of three day streaks + //then sets dollars = to number of three day streaks + var previousDate = new Date("1970-01-01"); + var numStreaks = 0; + var streak = 1; + // console.log("calcDollars, # dates: " + this.userProfile.datesTaken.length); + for (var i = 0; i < this.userProfile.datesTaken.length; i++) { + var currentDateStr = this.userProfile.datesTaken[i]; + var currentDate = new Date(currentDateStr.substr(0, 4) + "-" + currentDateStr.substr(4, 2) + "-" + currentDateStr.substr(6, 2)); + // console.log("calcDollars: " + currentDate); + var daysDiff = Math.round((currentDate.getTime() - previousDate.getTime()) / (1000 * 60 * 60 * 24)); + if (daysDiff == 0) { + continue; + } + if (daysDiff == 1) { + streak++; + // console.log("streak: "+ streak); + if (streak == 3) { + numStreaks++; + // reset + previousDate = new Date("1970-01-01"); //set previousDate to 1970-01-01 + streak = 1; + } + } + else { + //reset + streak = 1; + } + previousDate = currentDate; + } + console.log("numStreaks: " + numStreaks); + this.userProfile.dollars = numStreaks; + }; + Object.defineProperty(UserProfileService.prototype, "isActive", { + get: function () { + //console.log("user-profile.service.ts - isActive getter - begin"); + return this.userProfileFixed.isActive; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "isParent", { + get: function () { + console.log("user-profile.service.ts - isParent getter - begin"); + return this.userProfileFixed.isParent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "points", { + get: function () { + console.log("user-profile.service.ts - points getter - begin"); + if (this.userProfile == undefined) + this.loadProfileFromDevice(); + return this.userProfile.points; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "username", { + get: function () { + //console.log("user-profile.service.ts - username getter - begin"); + if (this.userProfile == undefined) + this.loadProfileFromDevice(); + return this.userProfile.username; + }, + set: function (username) { + console.log("user-profile.service.ts - isActive setter - begin"); + this.userProfile.username = username; + this.saveProfileToDevice(); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "versionNumber", { + get: function () { + if (this.userProfile == undefined) + this.loadProfileFromDevice(); + return this.userProfile.versionNumber; + }, + set: function (versionNumber) { + this.userProfile.versionNumber = versionNumber; + this.saveProfileToDevice(); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "oneSignalPlayerId", { + get: function () { + return this.userProfile.oneSignalPlayerId; + }, + enumerable: true, + configurable: true + }); + UserProfileService.prototype.saveToServer = function () { + this.loadProfileFromDevice(); + var userProfile = this.userProfile; + this.http + .post(environment.userServer + '/setuserinfo', userProfile) + .subscribe(function (response) { + console.log(response); + }); + console.log("saveToServer userProfile: " + JSON.stringify(userProfile)); + }; + UserProfileService.prototype.retrieve = function (userID) { + }; + UserProfileService.prototype.getProfile = function () { + }; + UserProfileService.prototype.initTestProfile = function () { + var currenttime = new Date(); + var dateString = moment(currenttime).format('MMMM Do YYYY, h:mm:ss a Z'); + var userProfile = new UserProfile('testy', [], 0, 3, currenttime.getTime(), dateString); + this.userProfile = userProfile; + this.saveProfileToDevice(); + //STORE ON DEVICE + }; + UserProfileService.prototype.saveProfileToDevice = function () { + localStorage.setItem('userProfile', JSON.stringify(this.userProfile)); + // maybe use this logic in case it's undefined: https://stackoverflow.com/questions/37417012/unexpected-token-u-in-json-at-position-0 + localStorage.setItem('userProfileFixed', JSON.stringify(this.userProfileFixed)); + }; + UserProfileService.prototype.profileIsOnDevice = function () { + if (localStorage.getItem('userProfile') !== null) { + return true; + } + else { + return false; + } + }; + UserProfileService.prototype.loadProfileFromDevice = function () { + this.userProfile = JSON.parse(localStorage.getItem('userProfile')); + //temporarily commenting out below line (see other instance for more info) + // this.userProfileFixed = JSON.parse(localStorage.getItem('userProfileFixed')); + }; + // below method can be called when a survey has been completed + // it does all the needed accounting + // adds current date to dict (and array) + UserProfileService.prototype.surveyCompleted = function () { + console.log("user-profile.service.ts - surveyCompleted method - begin"); + var username = localStorage.getItem('loggedInUser'); //this.authService.loggedInUser.getValue() + // check if survey has already been take for the current day or admin is contained in the username + // console.log('surveyCompleted - before if loop'); + if (!this.surveyTakenForCurrentDay() || username.indexOf('admin') >= 0) { + // console.log('surveyCompleted - in if loop'); + this.addDateTaken(); + this.addSurveyPoints(); + //this.calcDollars(); + this.userProfile.lastupdate = this.numericCurrenDateTime; + var dateString = moment(this.userProfile.lastupdate).format('MMMM Do YYYY, h:mm:ss a Z'); + this.userProfile.readable_ts = dateString; + // console.log("in SurveyCompleted, AwardDollarDates: "+ localStorage.getItem("AwardDollarDates")); + this.userProfile.AwardDollarDates = JSON.parse(localStorage.getItem("AwardDollarDates")); //fetch AwardDollarDates from local storage and add it to the UserProfile + try { + this.userProfile.dollars = JSON.parse(localStorage.getItem("AwardDollar")); + } + catch (error) { + window.localStorage.setItem("AwardDollar", "" + 0); + this.userProfile.dollars = 0; + } + this.saveProfileToDevice(); + this.saveToServer(); + } + }; + Object.defineProperty(UserProfileService.prototype, "stringCurrenDate", { + get: function () { + console.log("user-profile.service.ts - stringCurrenDate getter - begin"); + //shift hours back by 2, so that 2am, will register as 12am + var hoursShift = 2; + var currentDateTime = new Date(); + currentDateTime.setHours(currentDateTime.getHours() - hoursShift); + //now, set hours, min, sec to zero + currentDateTime.setHours(0, 0, 0, 0); + return currentDateTime.getFullYear() + + "" + ('0' + (currentDateTime.getMonth() + 1)).slice(-2) + + "" + ('0' + currentDateTime.getDate()).slice(-2); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "numericCurrenDateTime", { + get: function () { + console.log("user-profile.service.ts - numericCurrenDateTime getter - begin"); + //shift hours back by 2, so that 2am, will register as 12am + var hoursShift = 2; + var currentDateTime = new Date(); + currentDateTime.setHours(currentDateTime.getHours() - hoursShift); + //now, set hours, min, sec to zero + currentDateTime.setHours(0, 0, 0, 0); + return currentDateTime.getTime(); + }, + enumerable: true, + configurable: true + }); + UserProfileService.prototype.addDateTaken = function () { + console.log("user-profile.service.ts - addDateTaken method - begin"); + this.loadProfileFromDevice(); + var stringCurrenDate = this.stringCurrenDate; + this.userProfile.datesTaken.push(stringCurrenDate); + this.userProfile.survey_data.daily_survey[stringCurrenDate] = 1; + this.saveProfileToDevice(); + }; + // boolean function, checks if survey has been taken for the current date. + UserProfileService.prototype.surveyTakenForCurrentDay = function () { + console.log("user-profile.service.ts - surveyTakenForCurrentDay method - begin"); + this.loadProfileFromDevice(); + //check if date already exists in dict of dates, otherwise add the date to dict + // var hasMatch = false; + if (this.stringCurrenDate in this.userProfile.survey_data.daily_survey) { + return true; + } + else { + return false; + } + }; + UserProfileService.prototype.addSurveyPoints = function () { + console.log("user-profile.service.ts - addSurveyPoints method - begin"); + var pointsPerSurvey = 60; + this.addPoints(pointsPerSurvey); + }; + UserProfileService.prototype.addPoints = function (points) { + console.log("user-profile.service.ts - addPoints method - begin"); + this.userProfile.points += points; + this.userProfile.survey_data.points += points; + this.saveProfileToDevice(); + this.saveToServer(); + }; + UserProfileService.prototype.cheatPoints = function (points) { + console.log("user-profile.service.ts - cheatPoints method - begin"); + this.userProfile.points = points; + this.userProfile.survey_data.points = points; + this.saveProfileToDevice(); + this.saveToServer(); + }; + UserProfileService.prototype.removeUserProfile = function () { + localStorage.removeItem('userProfile'); + }; + UserProfileService = tslib_1.__decorate([ + Injectable({ + providedIn: 'root' + }), + tslib_1.__metadata("design:paramtypes", [HttpClient]) + ], UserProfileService); + return UserProfileService; +}()); +export { UserProfileService }; +//# sourceMappingURL=user-profile.service.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/user-profile/user-profile.service.js.map b/dist/out-tsc/src/app/user/user-profile/user-profile.service.js.map new file mode 100644 index 000000000..47909aa3e --- /dev/null +++ b/dist/out-tsc/src/app/user/user-profile/user-profile.service.js.map @@ -0,0 +1 @@ +{"version":3,"file":"user-profile.service.js","sourceRoot":"","sources":["../../../../../../src/app/user/user-profile/user-profile.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAoB,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,EAAE,GAAG,EAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAKjC;IAME,4BAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QAHpC,OAAE,GAAG,IAAI,CAAC;QACV,mBAAc,GAAI,IAAI,eAAe,CAAU,IAAI,CAAC,CAAC;IAEb,CAAC;IAEzC,8EAA8E;IAC9E,mCAAmC;IACnC,0CAAa,GAAb;QAAA,iBAwCC;QAvCC,yBAAyB;QACzB,GAAG;QACH,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;QAC9D,IAAI,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAM,WAAW,CAAC,UAAU,GAAC,WAAW,EAAC,EAAC,OAAO,EAAC,OAAO,EAAC,CAAC,CAAC;QAC3F,IAAI,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAM,WAAW,CAAC,UAAU,GAAC,gBAAgB,CAAC,CAAC;QAElF,gGAAgG;QAChG,OAAO,QAAQ,CAAC,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;aAC3C,IAAI,CAAC,GAAG,CACP,UAAA,QAAQ;YAEN,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACvC,IAAI,SAAS,GAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;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CAAC;iDAO0B,UAAU;OANzB,kBAAkB,CA0T9B;IAAD,yBAAC;CAAA,AA1TD,IA0TC;SA1TY,kBAAkB"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/user-profile/user-profile.service.spec.js b/dist/out-tsc/src/app/user/user-profile/user-profile.service.spec.js new file mode 100644 index 000000000..762821837 --- /dev/null +++ b/dist/out-tsc/src/app/user/user-profile/user-profile.service.spec.js @@ -0,0 +1,10 @@ +import { TestBed } from '@angular/core/testing'; +import { UserProfileService } from './user-profile.service'; +describe('UserProfileService', function () { + beforeEach(function () { return TestBed.configureTestingModule({}); }); + it('should be created', function () { + var service = TestBed.get(UserProfileService); + expect(service).toBeTruthy(); + }); +}); +//# sourceMappingURL=user-profile.service.spec.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/user-profile/user-profile.service.spec.js.map b/dist/out-tsc/src/app/user/user-profile/user-profile.service.spec.js.map new file mode 100644 index 000000000..6697034d6 --- /dev/null +++ b/dist/out-tsc/src/app/user/user-profile/user-profile.service.spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"user-profile.service.spec.js","sourceRoot":"","sources":["../../../../../../src/app/user/user-profile/user-profile.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,QAAQ,CAAC,oBAAoB,EAAE;IAC7B,UAAU,CAAC,cAAM,OAAA,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,OAAO,GAAuB,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QACpE,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/user.module.js b/dist/out-tsc/src/app/user/user.module.js new file mode 100644 index 000000000..5a9689dd2 --- /dev/null +++ b/dist/out-tsc/src/app/user/user.module.js @@ -0,0 +1,40 @@ +import * as tslib_1 from "tslib"; +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AuthComponent } from './auth/auth.component'; +import { FormsModule } from '@angular/forms'; +import { IonicModule } from '@ionic/angular'; +import { AngularFireAuthModule } from '@angular/fire/auth'; +import { HTTP_INTERCEPTORS } from '@angular/common/http'; +import { TokenInterceptor } from './auth/token.interceptor'; +import { LoadingSpinnerComponent } from './auth/loading-spinner/loading-spinner.component'; +var UserModule = /** @class */ (function () { + function UserModule() { + } + UserModule = tslib_1.__decorate([ + NgModule({ + declarations: [AuthComponent, LoadingSpinnerComponent], + imports: [ + CommonModule, + FormsModule, + IonicModule.forRoot(), + // AngularFireModule.initializeApp(environment.firebase), + AngularFireAuthModule + ], + exports: [AuthComponent], + providers: [ + { + provide: HTTP_INTERCEPTORS, + useClass: TokenInterceptor, + multi: true + } + // , UserProfile + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }) + ], UserModule); + return UserModule; +}()); +export { UserModule }; +export { UserProfile } from './user-profile/user-profile.model'; +//# sourceMappingURL=user.module.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/app/user/user.module.js.map b/dist/out-tsc/src/app/user/user.module.js.map new file mode 100644 index 000000000..5d5b2ec96 --- /dev/null +++ b/dist/out-tsc/src/app/user/user.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"user.module.js","sourceRoot":"","sources":["../../../../../src/app/user/user.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAG,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAuB3F;IAAA;IAA0B,CAAC;IAAd,UAAU;QArBtB,QAAQ,CAAC;YACR,YAAY,EAAE,CAAC,aAAa,EAAE,uBAAuB,CAAC;YACtD,OAAO,EAAE;gBACP,YAAY;gBACZ,WAAW;gBACX,WAAW,CAAC,OAAO,EAAE;gBACrB,yDAAyD;gBACzD,qBAAqB;aAEtB;YACD,OAAO,EAAE,CAAC,aAAa,CAAC;YACxB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,iBAAiB;oBAC1B,QAAQ,EAAE,gBAAgB;oBAC1B,KAAK,EAAE,IAAI;iBACZ;gBACD,gBAAgB;aACjB;YACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;SAClC,CAAC;OACW,UAAU,CAAI;IAAD,iBAAC;CAAA,AAA3B,IAA2B;SAAd,UAAU;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/environments/environment.chop.js b/dist/out-tsc/src/environments/environment.chop.js new file mode 100644 index 000000000..bbc2f3409 --- /dev/null +++ b/dist/out-tsc/src/environments/environment.chop.js @@ -0,0 +1,56 @@ +export var environment = { + production: true, + userServer: "http://adaptsdata.research.chop.edu:5000", + oneSignalAppId: "f9c4370d-cbcb-4e6f-ab1f-25d1c41b8f3a", + firebaseConfig: { + apiKey: "AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0", + authDomain: "sarav2-6a033.firebaseapp.com", + databaseURL: "https://sarav2-6a033.firebaseio.com", + projectId: "sarav2-6a033", + storageBucket: "sarav2-6a033.appspot.com", + messagingSenderId: "110945766941", + appId: "1:489827689493:web:7f72eb7033e9acf5" + }, + azureConfig: { + sas: '?sv=2018-03-28&ss=b&srt=sco&sp=rwl&st=2019-06-27T18%3A15%3A56Z&se=2020-06-28T18%3A15%3A00Z&sig=vccYOEN3SG%2BErA4%2FzmDNn0w4qOn%2FT4tB8jGnEIJoXh4%3D', + storageAccount: 'securebloblyh', + containerName: 'mycontainer' + }, + awsConfig: { + // CHOP + bucketName: 'chop-sara', + bucketRegion: 'us-east-1', + IdentityPoolId: 'us-east-1:667b1ad5-ccdc-4d90-b94f-300732b55448' + }, + googleAnalytic: { + id: 'UA-152399644-1' + }, + encyptString: "+Xr?SwA?EJ7m+g$c" + // firebase: { + // apiKey: "AIzaSyDM8d1yG2rNPc8AotB0NoN3Q2wMq4HDooo", + // authDomain: "adapts-331ee.firebaseapp.com", + // databaseURL: "https://adapts-331ee.firebaseio.com", + // projectId: "adapts-331ee", + // storageBucket: "adapts-331ee.appspot.com", + // messagingSenderId: "110945766941", + // appId: "1:110945766941:web:7c940aefa53553c39bc0f4", + // measurementId: "G-TL8MFZNE2M" + // // apiKey: "AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0", + // // authDomain: "sarav2-6a033.firebaseapp.com", + // // databaseURL: "https://sarav2-6a033.firebaseio.com", + // // projectId: "sarav2-6a033", + // // storageBucket: "sarav2-6a033.appspot.com", + // // messagingSenderId: "489827689493", + // // appId: "1:489827689493:web:7f72eb7033e9acf5" + // }, + // firebaseConfig: { + // // apiKey: "AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0", + // // authDomain: "sarav2-6a033.firebaseapp.com", + // // databaseURL: "https://sarav2-6a033.firebaseio.com", + // // projectId: "sarav2-6a033", + // // storageBucket: "sarav2-6a033.appspot.com", + // // messagingSenderId: "489827689493", + // // appId: "1:489827689493:web:7f72eb7033e9acf5" + // } +}; +//# sourceMappingURL=environment.chop.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/environments/environment.chop.js.map b/dist/out-tsc/src/environments/environment.chop.js.map new file mode 100644 index 000000000..d92ff3a4b --- /dev/null +++ b/dist/out-tsc/src/environments/environment.chop.js.map @@ -0,0 +1 @@ +{"version":3,"file":"environment.chop.js","sourceRoot":"","sources":["../../../../src/environments/environment.chop.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAC,0CAA0C;IACrD,cAAc,EAAE,sCAAsC;IAEtD,cAAc,EAAE;QACd,MAAM,EAAE,yCAAyC;QACjD,UAAU,EAAE,8BAA8B;QAC1C,WAAW,EAAE,qCAAqC;QAClD,SAAS,EAAE,cAAc;QACzB,aAAa,EAAE,0BAA0B;QACzC,iBAAiB,EAAE,cAAc;QACjC,KAAK,EAAE,qCAAqC;KAC7C;IAED,WAAW,EAAE;QACX,GAAG,EAAE,qJAAqJ;QAC1J,cAAc,EAAE,eAAe;QAC/B,aAAa,EAAE,aAAa;KAC7B;IAED,SAAS,EAAE;QACT,OAAO;QACP,UAAU,EAAE,WAAW;QACvB,YAAY,EAAE,WAAW;QACzB,cAAc,EAAE,gDAAgD;KACjE;IAED,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;KACrB;IAED,YAAY,EAAE,kBAAkB;IAIhC,cAAc;IACd,uDAAuD;IACvD,gDAAgD;IAChD,wDAAwD;IACxD,+BAA+B;IAC/B,+CAA+C;IAC/C,uCAAuC;IACvC,wDAAwD;IACxD,kCAAkC;IAClC,0DAA0D;IAC1D,mDAAmD;IACnD,2DAA2D;IAC3D,kCAAkC;IAClC,kDAAkD;IAClD,0CAA0C;IAC1C,oDAAoD;IACpD,KAAK;IAEL,oBAAoB;IACpB,8DAA8D;IAC9D,mDAAmD;IACnD,2DAA2D;IAC3D,kCAAkC;IAClC,kDAAkD;IAClD,0CAA0C;IAC1C,oDAAoD;IAEpD,IAAI;CACL,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/environments/environment.dev.js.map b/dist/out-tsc/src/environments/environment.dev.js.map new file mode 100644 index 000000000..a2a985417 --- /dev/null +++ b/dist/out-tsc/src/environments/environment.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"environment.dev.js","sourceRoot":"","sources":["../../../../src/environments/environment.dev.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAC,0CAA0C;IACrD,cAAc,EAAE,sCAAsC;IAEtD,cAAc,EAAE;QACd,MAAM,EAAE,yCAAyC;QACjD,UAAU,EAAE,8BAA8B;QAC1C,WAAW,EAAE,qCAAqC;QAClD,SAAS,EAAE,cAAc;QACzB,aAAa,EAAE,0BAA0B;QACzC,iBAAiB,EAAE,cAAc;QACjC,KAAK,EAAE,qCAAqC;KAC7C;IAED,WAAW,EAAE;QACX,GAAG,EAAE,qJAAqJ;QAC1J,cAAc,EAAE,eAAe;QAC/B,aAAa,EAAE,aAAa;KAC7B;IAED,SAAS,EAAE;QACT,UAAU,EAAE,YAAY;QACxB,YAAY,EAAC,WAAW;QACxB,cAAc,EAAE,gDAAgD;QAChE,WAAW,EAAE,sBAAsB;QACnC,eAAe,EAAE,0CAA0C;KAE5D;IAED,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;KACrB;IAID,cAAc;IACd,uDAAuD;IACvD,gDAAgD;IAChD,wDAAwD;IACxD,+BAA+B;IAC/B,+CAA+C;IAC/C,uCAAuC;IACvC,wDAAwD;IACxD,kCAAkC;IAClC,0DAA0D;IAC1D,mDAAmD;IACnD,2DAA2D;IAC3D,kCAAkC;IAClC,kDAAkD;IAClD,0CAA0C;IAC1C,oDAAoD;IACpD,KAAK;IAEL,oBAAoB;IACpB,8DAA8D;IAC9D,mDAAmD;IACnD,2DAA2D;IAC3D,kCAAkC;IAClC,kDAAkD;IAClD,0CAA0C;IAC1C,oDAAoD;IAEpD,IAAI;CACL,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/environments/environment.js.map b/dist/out-tsc/src/environments/environment.js.map new file mode 100644 index 000000000..9b1254969 --- /dev/null +++ b/dist/out-tsc/src/environments/environment.js.map @@ -0,0 +1 @@ +{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/environments/environment.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0EAA0E;AAC1E,gEAAgE;AAGhE,MAAM,CAAC,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAC,0CAA0C;IACrD,cAAc,EAAE,sCAAsC;IACtD,YAAY,EAAE,kBAAkB;IAEhC,cAAc,EAAE;QACd,MAAM,EAAE,yCAAyC;QACjD,UAAU,EAAE,8BAA8B;QAC1C,WAAW,EAAE,qCAAqC;QAClD,SAAS,EAAE,cAAc;QACzB,aAAa,EAAE,0BAA0B;QACzC,iBAAiB,EAAE,cAAc;QACjC,KAAK,EAAE,qCAAqC;KAC7C;IAED,WAAW,EAAE;QACX,GAAG,EAAE,qJAAqJ;QAC1J,cAAc,EAAE,eAAe;QAC/B,aAAa,EAAE,aAAa;KAC7B;IAED,SAAS,EAAE;QACV,OAAO;QACP,UAAU,EAAE,WAAW;QACvB,YAAY,EAAE,WAAW;QACzB,cAAc,EAAE,gDAAgD;KAChE;IAED,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;KACrB;CACD,CAAA;AAMF,+BAA+B;AAC/B,uBAAuB;AACvB,8CAA8C;AAC9C,wCAAwC;AAExC,gBAAgB;AAChB,yDAAyD;AACzD,kDAAkD;AAClD,0DAA0D;AAC1D,iCAAiC;AACjC,iDAAiD;AACjD,yCAAyC;AACzC,0DAA0D;AAC1D,oCAAoC;AACpC,4DAA4D;AAC5D,qDAAqD;AACrD,6DAA6D;AAC7D,oCAAoC;AACpC,oDAAoD;AACpD,4CAA4C;AAC5C,sDAAsD;AACtD,OAAO;AAEP,sBAAsB;AACtB,gEAAgE;AAChE,qDAAqD;AACrD,6DAA6D;AAC7D,oCAAoC;AACpC,oDAAoD;AACpD,0CAA0C;AAC1C,sDAAsD;AAEtD,MAAM;AAEN,KAAK;AAKL;;;;;;GAMG;AACH,mEAAmE"} \ No newline at end of file diff --git a/dist/out-tsc/src/environments/environment.prod.js b/dist/out-tsc/src/environments/environment.prod.js new file mode 100644 index 000000000..9b1297f4c --- /dev/null +++ b/dist/out-tsc/src/environments/environment.prod.js @@ -0,0 +1,28 @@ +export var environment = { + production: true, + firebaseConfig: { + apiKey: "AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0", + authDomain: "sarav2-6a033.firebaseapp.com", + databaseURL: "https://sarav2-6a033.firebaseio.com", + projectId: "sarav2-6a033", + storageBucket: "sarav2-6a033.appspot.com", + messagingSenderId: "489827689493", + appId: "1:489827689493:web:7f72eb7033e9acf5" + }, + azureConfig: { + sas: '?sv=2018-03-28&ss=b&srt=sco&sp=rwl&st=2019-06-27T18%3A15%3A56Z&se=2020-06-28T18%3A15%3A00Z&sig=vccYOEN3SG%2BErA4%2FzmDNn0w4qOn%2FT4tB8jGnEIJoXh4%3D', + storageAccount: 'securebloblyh', + containerName: 'mycontainer' + }, + awsConfig: { + bucketName: 'sara-testv', + bucketRegion: 'us-east-2', + IdentityPoolId: 'us-east-2:c9617754-1d3e-4058-bfa4-d54230cb72cf', + accessKeyId: 'AKIA5U5F73RGDIYD6DUQ', + secretAccessKey: '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' + }, + googleAnalytic: { + id: 'UA-152399644-1' + } +}; +//# sourceMappingURL=environment.prod.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/environments/environment.prod.js.map b/dist/out-tsc/src/environments/environment.prod.js.map new file mode 100644 index 000000000..761f79cda --- /dev/null +++ b/dist/out-tsc/src/environments/environment.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"environment.prod.js","sourceRoot":"","sources":["../../../../src/environments/environment.prod.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GAAG;IACzB,UAAU,EAAE,IAAI;IAChB,cAAc,EAAE;QACd,MAAM,EAAE,yCAAyC;QACjD,UAAU,EAAE,8BAA8B;QAC1C,WAAW,EAAE,qCAAqC;QAClD,SAAS,EAAE,cAAc;QACzB,aAAa,EAAE,0BAA0B;QACzC,iBAAiB,EAAE,cAAc;QACjC,KAAK,EAAE,qCAAqC;KAC7C;IAED,WAAW,EAAE;QACX,GAAG,EAAE,qJAAqJ;QAC1J,cAAc,EAAE,eAAe;QAC/B,aAAa,EAAE,aAAa;KAC7B;IAED,SAAS,EAAE;QACT,UAAU,EAAE,YAAY;QACxB,YAAY,EAAC,WAAW;QACxB,cAAc,EAAE,gDAAgD;QAChE,WAAW,EAAE,sBAAsB;QACnC,eAAe,EAAE,0CAA0C;KAC5D;IAED,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;KACrB;CACF,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/main.js b/dist/out-tsc/src/main.js new file mode 100644 index 000000000..619dee409 --- /dev/null +++ b/dist/out-tsc/src/main.js @@ -0,0 +1,11 @@ +import './polyfills.ts'; +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; +if (environment.production) { + enableProdMode(); +} +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(function (err) { return console.log(err); }); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/main.js.map b/dist/out-tsc/src/main.js.map new file mode 100644 index 000000000..25c269bab --- /dev/null +++ b/dist/out-tsc/src/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/main.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,IAAI,WAAW,CAAC,UAAU,EAAE;IAC1B,cAAc,EAAE,CAAC;CAClB;AAED,sBAAsB,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC;KAChD,KAAK,CAAC,UAAA,GAAG,IAAI,OAAA,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAhB,CAAgB,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/polyfills.js b/dist/out-tsc/src/polyfills.js new file mode 100644 index 000000000..22a2151d3 --- /dev/null +++ b/dist/out-tsc/src/polyfills.js @@ -0,0 +1,60 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ +/*************************************************************************************************** + * BROWSER POLYFILLS + */ +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. +/** + * Web Animations `@angular/platform-browser/animations` + * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. + * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). + */ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags.ts'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * + */ +import './zone-flags.ts'; +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. +/*************************************************************************************************** + * APPLICATION IMPORTS + */ +// aws-sdk requires global to exist +window.global = window; +//# sourceMappingURL=polyfills.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/polyfills.js.map b/dist/out-tsc/src/polyfills.js.map new file mode 100644 index 000000000..55cb3f6a7 --- /dev/null +++ b/dist/out-tsc/src/polyfills.js.map @@ -0,0 +1 @@ +{"version":3,"file":"polyfills.js","sourceRoot":"","sources":["../../../src/polyfills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AAEH,+EAA+E;AAC/E,oEAAoE;AAEpE;;;;GAIG;AACH,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,iBAAiB,CAAC;AAEzB;;GAEG;AAEH,OAAO,mBAAmB,CAAC,CAAE,6BAA6B;AAG1D;;GAEG;AAEF,mCAAmC;AACnC,MAAc,CAAC,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/test.js b/dist/out-tsc/src/test.js new file mode 100644 index 000000000..68ff3b6c8 --- /dev/null +++ b/dist/out-tsc/src/test.js @@ -0,0 +1,11 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); +// Then we find all the tests. +var context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/test.js.map b/dist/out-tsc/src/test.js.map new file mode 100644 index 000000000..ca058ca90 --- /dev/null +++ b/dist/out-tsc/src/test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../src/test.ts"],"names":[],"mappings":"AAAA,iGAAiG;AAEjG,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,2CAA2C,CAAC;AAInD,qDAAqD;AACrD,UAAU,EAAE,CAAC,mBAAmB,CAC9B,2BAA2B,EAC3B,6BAA6B,EAAE,CAChC,CAAC;AACF,8BAA8B;AAC9B,IAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;AAC3D,wBAAwB;AACxB,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/out-tsc/src/zone-flags.js b/dist/out-tsc/src/zone-flags.js new file mode 100644 index 000000000..65ae35e99 --- /dev/null +++ b/dist/out-tsc/src/zone-flags.js @@ -0,0 +1,6 @@ +/** + * Prevents Angular change detection from + * running with certain Web Component callbacks + */ +window.__Zone_disable_customElements = true; +//# sourceMappingURL=zone-flags.js.map \ No newline at end of file diff --git a/dist/out-tsc/src/zone-flags.js.map b/dist/out-tsc/src/zone-flags.js.map new file mode 100644 index 000000000..3bd6922d1 --- /dev/null +++ b/dist/out-tsc/src/zone-flags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zone-flags.js","sourceRoot":"","sources":["../../../src/zone-flags.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACF,MAAc,CAAC,6BAA6B,GAAG,IAAI,CAAC"} \ No newline at end of file diff --git a/firebase-debug.log b/firebase-debug.log new file mode 100644 index 000000000..d9ab8f36d --- /dev/null +++ b/firebase-debug.log @@ -0,0 +1,20 @@ +[debug] [2020-02-02T00:22:01.327Z] ---------------------------------------------------------------------- +[debug] [2020-02-02T00:22:01.328Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy +[debug] [2020-02-02T00:22:01.328Z] CLI Version: 7.12.1 +[debug] [2020-02-02T00:22:01.328Z] Platform: darwin +[debug] [2020-02-02T00:22:01.328Z] Node Version: v10.16.0 +[debug] [2020-02-02T00:22:01.329Z] Time: Sat Feb 01 2020 16:22:01 GMT-0800 (Pacific Standard Time) +[debug] [2020-02-02T00:22:01.329Z] ---------------------------------------------------------------------- +[debug] [2020-02-02T00:22:01.329Z] +[debug] [2020-02-02T00:22:01.343Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] +[debug] [2020-02-02T00:22:01.344Z] > authorizing via signed-in user +[debug] [2020-02-02T00:22:01.344Z] [iam] checking project adapts-73370 for permissions ["firebase.projects.get","firebasehosting.sites.update"] +[debug] [2020-02-02T00:22:01.345Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"] +[debug] [2020-02-02T00:22:01.346Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token + +[debug] [2020-02-02T00:22:01.534Z] <<< HTTP RESPONSE 200 +[debug] [2020-02-02T00:22:01.559Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/adapts-73370:testIamPermissions + +[debug] [2020-02-02T00:22:01.814Z] <<< HTTP RESPONSE 200 +[debug] [2020-02-02T00:22:01.815Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/adapts-73370 + diff --git a/firebase.json b/firebase.json new file mode 100644 index 000000000..45041e03a --- /dev/null +++ b/firebase.json @@ -0,0 +1,16 @@ +{ + "hosting": { + "public": "www", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +} diff --git a/my-release-key.keystore b/my-release-key.keystore new file mode 100644 index 000000000..cbe640c81 Binary files /dev/null and b/my-release-key.keystore differ diff --git a/package-lock.json b/package-lock.json index a55ad8f37..72536fe77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,19 +5,19 @@ "requires": true, "dependencies": { "@angular-devkit/architect": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.13.9.tgz", - "integrity": "sha512-EAFtCs9dsGhpMRC45PoYsrkiExpWz9Ax15qXfzwdDRacz5DmdOVt+QpkLW1beUOwiyj/bhFyj23eaONK2RTn/w==", + "version": "0.801.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.801.3.tgz", + "integrity": "sha512-gg6ZyJMiRYuzzmbpuDszrsE/hpwzoUnlOVoLNNzbACGBSDiqelC1mvGHb9JQM56Sy8gSjZn6RT0K2/Og79GoSg==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.9", - "rxjs": "6.3.3" + "@angular-devkit/core": "8.1.3", + "rxjs": "6.4.0" }, "dependencies": { "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -26,78 +26,119 @@ } }, "@angular-devkit/build-angular": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.13.9.tgz", - "integrity": "sha512-onh07LhdxotDFjja0KKsDWNCwgpM/ymuRr5h0e+vT4AgklP2Uioz1CpzVOgxPIKkdVdGR9QgDinVsWAmY90J8g==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.13.9", - "@angular-devkit/build-optimizer": "0.13.9", - "@angular-devkit/build-webpack": "0.13.9", - "@angular-devkit/core": "7.3.9", - "@ngtools/webpack": "7.3.9", - "ajv": "6.9.1", - "autoprefixer": "9.4.6", + "version": "0.801.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.801.3.tgz", + "integrity": "sha512-BmN48xepRzQN2h2L7k9MhEWSAmEJj8celtD9Tu9Gn2DeM0yh2TFW9OKFKJlqyF3vGd3at24bqHOXI4MtDeltQQ==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.801.3", + "@angular-devkit/build-optimizer": "0.801.3", + "@angular-devkit/build-webpack": "0.801.3", + "@angular-devkit/core": "8.1.3", + "@ngtools/webpack": "8.1.3", + "ajv": "6.10.0", + "autoprefixer": "9.6.0", + "browserslist": "4.6.3", + "caniuse-lite": "1.0.30000979", "circular-dependency-plugin": "5.0.2", "clean-css": "4.2.1", - "copy-webpack-plugin": "4.6.0", - "file-loader": "3.0.1", - "glob": "7.1.3", + "copy-webpack-plugin": "5.0.3", + "core-js": "3.1.4", + "file-loader": "4.0.0", + "glob": "7.1.4", "istanbul-instrumenter-loader": "3.0.1", - "karma-source-map-support": "1.3.0", + "karma-source-map-support": "1.4.0", "less": "3.9.0", - "less-loader": "4.1.0", - "license-webpack-plugin": "2.1.0", + "less-loader": "5.0.0", + "license-webpack-plugin": "2.1.1", "loader-utils": "1.2.3", - "mini-css-extract-plugin": "0.5.0", + "mini-css-extract-plugin": "0.7.0", "minimatch": "3.0.4", - "node-sass": "4.12.0", - "open": "6.0.0", + "open": "6.4.0", "parse5": "4.0.0", - "postcss": "7.0.14", + "postcss": "7.0.17", "postcss-import": "12.0.1", "postcss-loader": "3.0.0", "raw-loader": "1.0.0", - "rxjs": "6.3.3", + "rxjs": "6.4.0", + "sass": "1.22.2", "sass-loader": "7.1.0", - "semver": "5.6.0", + "semver": "6.2.0", "source-map-loader": "0.2.4", - "source-map-support": "0.5.10", + "source-map-support": "0.5.12", "speed-measure-webpack-plugin": "1.3.1", - "stats-webpack-plugin": "0.7.0", "style-loader": "0.23.1", "stylus": "0.54.5", "stylus-loader": "3.0.2", - "terser-webpack-plugin": "1.2.2", + "terser-webpack-plugin": "1.3.0", "tree-kill": "1.2.1", - "webpack": "4.29.0", - "webpack-dev-middleware": "3.5.1", - "webpack-dev-server": "3.1.14", + "webpack": "4.35.2", + "webpack-dev-middleware": "3.7.0", + "webpack-dev-server": "3.7.2", "webpack-merge": "4.2.1", "webpack-sources": "1.3.0", - "webpack-subresource-integrity": "1.1.0-rc.6" + "webpack-subresource-integrity": "1.1.0-rc.6", + "worker-plugin": "3.1.0" }, "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "core-js": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", + "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==", + "dev": true + }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { "tslib": "^1.9.0" } + }, + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "dev": true } } }, "@angular-devkit/build-optimizer": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.13.9.tgz", - "integrity": "sha512-GQtCntthQHSBv5l1ZY5p00JOECb/WcE1qUBo5kFjp84z0fszDkhOy52M1kcWCX4PFzJaY4DKk58hbUE/2UN0jw==", + "version": "0.801.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.801.3.tgz", + "integrity": "sha512-5wyzek1Ls7T9bh24yGDC/3Ss1YePpnOyBu0D8mJkByjPJjQr0xXR6UPx/7Idq6Y8BMeGO/+MiMOLZoUTPTIa0w==", "dev": true, "requires": { "loader-utils": "1.2.3", "source-map": "0.5.6", - "typescript": "3.2.4", + "typescript": "3.4.5", "webpack-sources": "1.3.0" }, "dependencies": { @@ -106,30 +147,25 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", "dev": true - }, - "typescript": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", - "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", - "dev": true } } }, "@angular-devkit/build-webpack": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.13.9.tgz", - "integrity": "sha512-6ypu6pzNmQxzATF4rTWEhGSl5hyGQ8a/3aCZF/ux+XGc3d4hi2HW+NWlDm1UEna6ZjNtgEPlgfP4q8BKrjRmfA==", + "version": "0.801.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.801.3.tgz", + "integrity": "sha512-IuR1WKldZwrAQWlKCLv+MnNeR1tWFCSJ9wXAgKqvlAPiYHEvTvazRVbWerxgVFvL4MCOt2wYVz/AqQWVYAhwlQ==", "dev": true, "requires": { - "@angular-devkit/architect": "0.13.9", - "@angular-devkit/core": "7.3.9", - "rxjs": "6.3.3" + "@angular-devkit/architect": "0.801.3", + "@angular-devkit/core": "8.1.3", + "rxjs": "6.4.0", + "webpack-merge": "4.2.1" }, "dependencies": { "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -138,22 +174,34 @@ } }, "@angular-devkit/core": { - "version": "7.3.9", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-7.3.9.tgz", - "integrity": "sha512-SaxD+nKFW3iCBKsxNR7+66J30EexW/y7tm8m5AvUH+GwSAgIj0ZYmRUzFEPggcaLVA4WnE/YWqIXZMJW5dT7gw==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-8.1.3.tgz", + "integrity": "sha512-Vj5fowuz27J+S74U1+MrSrJ7vI+OZC5HBOp4m7rrh/GcYlujcX3BUu0Bxi7LI1v90yDsr0s/iEAKsff05ByXiw==", "dev": true, "requires": { - "ajv": "6.9.1", - "chokidar": "2.0.4", + "ajv": "6.10.0", "fast-json-stable-stringify": "2.0.0", - "rxjs": "6.3.3", + "magic-string": "0.25.3", + "rxjs": "6.4.0", "source-map": "0.7.3" }, "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -162,19 +210,19 @@ } }, "@angular-devkit/schematics": { - "version": "7.3.9", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-7.3.9.tgz", - "integrity": "sha512-xzROGCYp7aQbeJ3V6YC0MND7wKEAdWqmm/GaCufEk0dDS8ZGe0sQhcM2oBRa2nQqGQNeThFIH51kx+FayrJP0w==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-8.1.3.tgz", + "integrity": "sha512-nz3b0uXu3w3PPLq4D+ersjeX/AyW3Amq7UwXa8lZFoJ0oc8cPjXW+h4D56rNw2GbOGZX7aaNe/Cxd9SBt0wF2A==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.9", - "rxjs": "6.3.3" + "@angular-devkit/core": "8.1.3", + "rxjs": "6.4.0" }, "dependencies": { "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -183,47 +231,81 @@ } }, "@angular/cli": { - "version": "7.3.9", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.3.9.tgz", - "integrity": "sha512-7oJj7CKDlFUbQav1x1CV4xKKcbt0pnxY4unKcm7Q1tVXhu8bU2bc3cDA0aJnbofcYb6TJcd/C2qHgCt78q7edA==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-8.1.3.tgz", + "integrity": "sha512-8BuN+UW1etRGS2U8rnxLagcA/zCxAmrtH6cB943CecPkr3p9+VUlVXtrRU8lkQE/wdrGmJjS5qkG9TybTIPRwg==", "dev": true, "requires": { - "@angular-devkit/architect": "0.13.9", - "@angular-devkit/core": "7.3.9", - "@angular-devkit/schematics": "7.3.9", - "@schematics/angular": "7.3.9", - "@schematics/update": "0.13.9", + "@angular-devkit/architect": "0.801.3", + "@angular-devkit/core": "8.1.3", + "@angular-devkit/schematics": "8.1.3", + "@schematics/angular": "8.1.3", + "@schematics/update": "0.801.3", "@yarnpkg/lockfile": "1.1.0", + "ansi-colors": "4.1.0", + "debug": "^4.1.1", "ini": "1.3.5", - "inquirer": "6.2.1", + "inquirer": "6.4.1", "npm-package-arg": "6.1.0", - "open": "6.0.0", - "pacote": "9.4.0", - "semver": "5.6.0", - "symbol-observable": "1.2.0" + "open": "6.4.0", + "pacote": "9.5.1", + "read-package-tree": "5.3.1", + "semver": "6.2.0", + "symbol-observable": "1.2.0", + "universal-analytics": "^0.4.20", + "uuid": "^3.3.2" + }, + "dependencies": { + "ansi-colors": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.0.tgz", + "integrity": "sha512-3NkLpm6I6kEgC8J0I9EZ0fouXc/mm5J9zqJFCgA2jGqmsL0O64I7Uvi3AmUMnnRqc6u7uLgVVnY4pyBQ03nCiw==", + "dev": true + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "dev": true + } } }, "@angular/common": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-7.2.15.tgz", - "integrity": "sha512-2b5JY2HWVHCf3D1GZjmde7jdAXSTXkYtmjLtA9tQkjOOTr80eHpNSujQqnzb97dk9VT9OjfjqTQd7K3pxZz8jw==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-8.1.3.tgz", + "integrity": "sha512-AnTlYV+Y3HYjJsAIt2AkIJ63qphvu9RNIJSZS61zQ4YBty29aslAJ/jh3PSWD0Yj9UT/AgzquJhfhhNEuImDRw==", "requires": { "tslib": "^1.9.0" } }, "@angular/compiler": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-7.2.15.tgz", - "integrity": "sha512-5yb4NcLk8GuXkYf7Dcor4XkGueYp4dgihzDmMjYDUrV0NPhubKlr+SwGtLOtzgRBWJ1I2bO0S3zwa0q0OgIPOw==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.1.3.tgz", + "integrity": "sha512-mKeRkpPy/iBPGBCVQIPF9x4f1S68ilEYaQTTfHoLR0OfivEQsyGuf2GEegwbTosEBX3JF+0JHfCNvsAE1zI5Og==", "dev": true, "requires": { "tslib": "^1.9.0" } }, "@angular/compiler-cli": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-7.2.15.tgz", - "integrity": "sha512-+AsfyKawmj/sa+m4Pz8VSRFbCfx/3IOjAuuEjhopbyr154YpPDSu8NTbcwzq3yfbVcPwK4/4exmbQzpsndaCTg==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-8.1.3.tgz", + "integrity": "sha512-rzlKU/xo6AzSPBLnJ/jeSwgojn/MaByTaGFG4THLRUizfGPqAsmppQ12Nmqr9faIiuG0k/izGSoWmppCJEK8FA==", "dev": true, "requires": { "canonical-path": "1.0.0", @@ -233,10 +315,9 @@ "magic-string": "^0.25.0", "minimist": "^1.2.0", "reflect-metadata": "^0.1.2", - "shelljs": "^0.8.1", "source-map": "^0.6.1", "tslib": "^1.9.0", - "yargs": "9.0.1" + "yargs": "13.1.0" }, "dependencies": { "ansi-regex": { @@ -246,15 +327,15 @@ "dev": true }, "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -271,31 +352,40 @@ "upath": "^1.1.1" } }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + } } }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", @@ -303,33 +393,15 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "load-json-file": { + "lcid": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "invert-kv": "^2.0.0" } }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -337,52 +409,22 @@ "dev": true }, "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" } }, - "path-type": { + "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -390,13 +432,31 @@ "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, "strip-ansi": { @@ -408,73 +468,54 @@ "ansi-regex": "^3.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, "yargs": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", - "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.1.0.tgz", + "integrity": "sha512-1UhJbXfzHiPqkfXNHYhiz79qM/kZqjTE8yGlEjZa85Q+3+OwcV6NRkV7XOV1W2Eom2bzILeUn55pQYffjVOLAg==", "dev": true, "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", + "cliui": "^4.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" + "y18n": "^4.0.0", + "yargs-parser": "^13.0.0" } }, "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } }, "@angular/core": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-7.2.15.tgz", - "integrity": "sha512-XsuYm0jEU/mOqwDOk2utThv8J9kESkAerfuCHClE9rB2TtHUOGCfekF7lJWqjjypu6/J9ygoPFo7hdAE058ZGg==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-8.1.3.tgz", + "integrity": "sha512-45ocymDkXhmgluhaIX/O6IgqGPCLOlSYEXYpJ660QS1JgprKU7Ae9mWiNSmbBmT0OGV/sKKF8SNMQAGOHgio6Q==", "requires": { "tslib": "^1.9.0" } }, "@angular/fire": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@angular/fire/-/fire-5.2.1.tgz", - "integrity": "sha512-pS4zWhLLANzMbYVIKNtebDQKhm9+KANUDvDV6DwKP24XHzkZdvazKe1HC6uXWlf7QmDxSPFleCSBkn0tnQQzdQ==" + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@angular/fire/-/fire-5.4.2.tgz", + "integrity": "sha512-QzB5d1wtqr9jxfsVNv2+569MlfK4/QrrpNy0IngOHdxS4FBbXqMOcx37iv1m2mzJv9zlGUddUX44IZP5Xfb3cw==" }, "@angular/forms": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-7.2.15.tgz", - "integrity": "sha512-p0kcIQLtBBC1qeTA6M3nOuXf/k91E80FKquVM9zEsO2kDjI0oZJVfFYL2UMov5samlJOPN+t6lRHEIUa7ApPsw==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-8.1.3.tgz", + "integrity": "sha512-NabNiUsR1XgrI1/T8hFwbTH0BMqhKd1riSTU+xyJ3qVbdmORq1xnf6/dLbljNGxViMU28P8hBXvyf1BoTS+HyQ==", "requires": { "tslib": "^1.9.0" } @@ -488,31 +529,31 @@ } }, "@angular/language-service": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-7.2.15.tgz", - "integrity": "sha512-Ig5Jr7mnDelaZvSbUd9YhI5am3q1ku9xelAuwvtyDKvQJeKQj3BtTagcOgWrnQBfrJ/FsA/M5Zo48ncSsV0tqQ==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-8.1.3.tgz", + "integrity": "sha512-9s2LWlRlBhUXZ0oWh5ojYKnQgXgYH/VifEXteRWmEJ0dlwDApgw5Jk6usstDhv09XQvLdoumMQwOXf07zjcJrQ==", "dev": true }, "@angular/platform-browser": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-7.2.15.tgz", - "integrity": "sha512-aYgmPsbC9Tvp9vmKWD8voeAp4crwCay7/D6lM3ClEe2EeK934LuEXq3/uczMrFVbnIX7BBIo8fh03Tl7wbiGPw==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-8.1.3.tgz", + "integrity": "sha512-ihjoJd3OCmn/LBpYEDeCYnYJ1JRzeY6xYySNBEHNHLc07FX0TTiNwiZJHjbKoxdjr7qe6cj6gpT51M77pRlKKw==", "requires": { "tslib": "^1.9.0" } }, "@angular/platform-browser-dynamic": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.2.15.tgz", - "integrity": "sha512-UL2PqhzXMD769NQ6Lh6pxlBDKvN9Qol3XLRFil80lwJ1GRW16ITeYbCamcafIH2GOyd88IhmYcbMfUQ/6q4MMQ==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.1.3.tgz", + "integrity": "sha512-tsZWp8aFZNvbJ1TgP75GEfrwLe4SFW02kzEF12o7XlGU/iwnMjEs356rGHeueJZuWMFGS8PLL4mqPic7R5p53Q==", "requires": { "tslib": "^1.9.0" } }, "@angular/router": { - "version": "7.2.15", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-7.2.15.tgz", - "integrity": "sha512-qAubRJRQanguUqJQ76J9GSZ4JFtoyhJKRmX5P23ANZJXpB6YLzF2fJmOGi+E6cV8F0tKBMEq1pjxFTisx0MXwQ==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-8.1.3.tgz", + "integrity": "sha512-MOalKqqWcTaosHLNE5nmk5rsLRp3jE1PobGaFtbUJKTTZW0vS4rcr6iiRg2bZRv/srGixDXvNLenvYjTpzzTdw==", "requires": { "tslib": "^1.9.0" } @@ -880,6 +921,21 @@ "protobufjs": "^6.8.6" } }, + "@ionic-native/app-version": { + "version": "5.21.6", + "resolved": "https://registry.npmjs.org/@ionic-native/app-version/-/app-version-5.21.6.tgz", + "integrity": "sha512-kqZNfzmfa8pKTv7RAlNVE25K9odpU0JQPBUJuUAhZUGZEa9dRxUeZt1zp3WuG0gx+U6Jt1rwZK2TgMWppdAvEw==", + "requires": { + "@types/cordova": "^0.0.34" + }, + "dependencies": { + "@types/cordova": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", + "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" + } + } + }, "@ionic-native/core": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-5.5.1.tgz", @@ -888,18 +944,40 @@ "@types/cordova": "^0.0.34" } }, - "@ionic-native/file": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ionic-native/file/-/file-5.6.1.tgz", - "integrity": "sha512-hEbVJW8ZTbLQuN5jUEt8tzmuMvG9zyYvV4GMZ7DkXTHAHvypWdFLcNOmW3cGK7NKN9qkTrdwv1WtrKrZsb81/Q==", + "@ionic-native/in-app-browser": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@ionic-native/in-app-browser/-/in-app-browser-5.29.0.tgz", + "integrity": "sha512-bZEmpwekxdZs1G00J3D4LtKnp55TaXydgVa2h5oGHVI3pZI9zNtKCBuedXgYhMG27RBm1llFcIxCdaGZalc+MQ==", + "requires": { + "@types/cordova": "^0.0.34" + }, + "dependencies": { + "@types/cordova": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", + "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" + } + } + }, + "@ionic-native/mobile-accessibility": { + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@ionic-native/mobile-accessibility/-/mobile-accessibility-5.26.0.tgz", + "integrity": "sha512-joyLFsrtxie/hNTdkArpm/37O/P1IxHlZMa5NgyGgd26xlJB5Yjx2L+wQu05RHlyZwsIg/nmjZmoMNAIcSUYhg==", "requires": { "@types/cordova": "^0.0.34" + }, + "dependencies": { + "@types/cordova": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", + "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" + } } }, - "@ionic-native/google-analytics": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@ionic-native/google-analytics/-/google-analytics-5.17.0.tgz", - "integrity": "sha512-JZt02Jo7g0Kssia8ZNXrS8kiRMXPQ0xYeaY64BRe586PrMEpN9QoFTfO9pVZd/OosxNli/vPIX6Lv9jE9o6zvQ==", + "@ionic-native/network": { + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@ionic-native/network/-/network-5.23.0.tgz", + "integrity": "sha512-7JVOKV+U6PTo1X4fEeyy8mDGXSbzIrQpWb9s4soiGZgGD07+GC+AuDETFUxlvlLAnSTcGH+s/2H/13MkVEl+uw==", "requires": { "@types/cordova": "^0.0.34" }, @@ -912,9 +990,9 @@ } }, "@ionic-native/onesignal": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@ionic-native/onesignal/-/onesignal-5.12.0.tgz", - "integrity": "sha512-XGTWXYbF824oW+MRlhdRh6e1AiY3HfCs2rYgNAVyje/X3CDr+2ZEEQ6xxcV4OmVAEUOsoyLirjfkvNIuRlNphQ==", + "version": "5.21.5", + "resolved": "https://registry.npmjs.org/@ionic-native/onesignal/-/onesignal-5.21.5.tgz", + "integrity": "sha512-aBVGtNmBVusptR+8MKvzQD5kYgcAsNNEk/7K34P1FUrs/BbJ21Lczh6j7DP+Q52T6Q805KHOG7Ku9+4woiDS+Q==", "requires": { "@types/cordova": "^0.0.34" }, @@ -934,6 +1012,36 @@ "@types/cordova": "^0.0.34" } }, + "@ionic-native/sqlite": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@ionic-native/sqlite/-/sqlite-5.24.0.tgz", + "integrity": "sha512-JsiHLYjwyAzMULflTg6S55lQlFGWBF7vFnAxUGcxv2LQ5nYEO87/8VZfFfZL64QZNMeb+SCxcabtOOhEVvaQrA==", + "requires": { + "@types/cordova": "^0.0.34" + }, + "dependencies": { + "@types/cordova": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", + "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" + } + } + }, + "@ionic-native/sqlite-porter": { + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@ionic-native/sqlite-porter/-/sqlite-porter-5.24.0.tgz", + "integrity": "sha512-P6r4uDFxa9PH5Cwu5om168QFnNQOufLggRp6fOQ+ylrH2ACLy4PbeB6VTeiKxc2kmEM3wOcHkfZazl0ji+rDIA==", + "requires": { + "@types/cordova": "^0.0.34" + }, + "dependencies": { + "@types/cordova": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", + "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" + } + } + }, "@ionic-native/status-bar": { "version": "5.17.0", "resolved": "https://registry.npmjs.org/@ionic-native/status-bar/-/status-bar-5.17.0.tgz", @@ -950,32 +1058,23 @@ } }, "@ionic/angular": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-4.4.0.tgz", - "integrity": "sha512-Lk54hBi36mhiPx3uW2GQTyPCpfgpPEiNuSM2oKEhwCwH/OjYPj2TNr/BOQaO5Uk+QDj+Y7J9W7eQPRBKkQgFdQ==", + "version": "4.11.10", + "resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-4.11.10.tgz", + "integrity": "sha512-wdi4LJLUEfGK7jxYLNH+8Q2nMPBFCGaheRmQV4hQLQDx3RjVMFJKCsqAmgXXkLtUJfSDBY68r/dvWeYO645HaQ==", "requires": { - "@ionic/core": "4.4.0", + "@ionic/core": "4.11.10", "tslib": "^1.9.3" } }, "@ionic/angular-toolkit": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@ionic/angular-toolkit/-/angular-toolkit-1.5.1.tgz", - "integrity": "sha512-B5LHuzEv/lgFP7yxfOA3/wggDM/X1mDkWFX8rZtaBRZBbC0vtZwdwDu73RnkfFZ0jTFyIgtoBW8qTrrCyd5MLA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ionic/angular-toolkit/-/angular-toolkit-2.1.2.tgz", + "integrity": "sha512-TLb/wQMdhgUe4X98TZgiue/6VqEFPiXkg3a0diVTwtrsHj2cWNXUaIlQtnEqxBhyml81mrpkSgAoUFH3JJfaXw==", "dev": true, "requires": { - "@schematics/angular": "^7.0.3", + "@schematics/angular": "^8.0.0", "tslib": "^1.9.0", - "typescript": "~3.3.3333", - "ws": "^6.1.4" - }, - "dependencies": { - "typescript": { - "version": "3.3.4000", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz", - "integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA==", - "dev": true - } + "ws": "^7.0.1" } }, "@ionic/cli-framework": { @@ -1137,11 +1236,19 @@ } }, "@ionic/core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-4.4.0.tgz", - "integrity": "sha512-GKu2qwapAG7dipvBG9RdzSxt/CmQXzO7eIa6Wg6uxuNmGE0WSc6fPZmE0YlFD1dkgvhzSY23XBiWVZMgnH/Wdg==", + "version": "4.11.10", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-4.11.10.tgz", + "integrity": "sha512-PeonKl5E+VOTBeKDr83y0N/1wbfkZ5jV3PSJTsVPE3Q15LxGEO0GzBvVMgkmkssuqOI3WJPXxYWZVL8ejzSFOQ==", "requires": { - "ionicons": "4.5.6" + "ionicons": "^4.6.3", + "tslib": "^1.10.0" + }, + "dependencies": { + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + } } }, "@ionic/lab": { @@ -1425,28 +1532,43 @@ } } }, + "@ngrx/effects": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@ngrx/effects/-/effects-9.1.1.tgz", + "integrity": "sha512-HWeAAxsQugwUDTJAwJaxFcznylFFGCtF3jEbIqh08BJp22y+eoyx+UxWm1I4/k0LSJKKay2MvGhm7+gdPXXjmg==" + }, + "@ngrx/schematics": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@ngrx/schematics/-/schematics-9.1.0.tgz", + "integrity": "sha512-CYfBFP/jCNFFQkV+Afc4kPCRf3Ye2NlNIEwU5urtZMt8WV8RWFbzsbL0O9UMH6zshPvwoZoBqU/5ZftZupxcHA==" + }, "@ngrx/store": { "version": "8.5.2", "resolved": "https://registry.npmjs.org/@ngrx/store/-/store-8.5.2.tgz", "integrity": "sha512-JPlc23Aw3rlEKt6LCkg3a0zlo0tEgkohH3CDHVbUIYSgg3DWOnmNfwztbz4pa2u2wua5PfFCovC7HKTNmapx/w==" }, + "@ngrx/store-devtools": { + "version": "8.5.2", + "resolved": "https://registry.npmjs.org/@ngrx/store-devtools/-/store-devtools-8.5.2.tgz", + "integrity": "sha512-3GrAAX3/J39u0AcREgWBiUwuNkZhgei+2K6/bulkAu/BHw+PJaZqq5+c+uQFvi0/aq+/8+9wjNhhCWS4Entk/Q==" + }, "@ngtools/webpack": { - "version": "7.3.9", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.3.9.tgz", - "integrity": "sha512-+ROpqfCXLdQwfP+UNDLk4p959ZrocpStkdd2Iy9CeOJ8yDkityqpstTwQC3oHzzu/95BiyZ0hrHbM6AsPPIvJg==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-8.1.3.tgz", + "integrity": "sha512-gSsLMdCJsQp7ZKF5Tl/yfns1eMtmc89J+yoWiOLoSHb8cupP2G4o7DL8wGkylsyALu5eomF/RSnivC9SGvdxYQ==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.9", + "@angular-devkit/core": "8.1.3", "enhanced-resolve": "4.1.0", - "rxjs": "6.3.3", + "rxjs": "6.4.0", "tree-kill": "1.2.1", "webpack-sources": "1.3.0" }, "dependencies": { "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -1509,337 +1631,247 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@schematics/angular": { - "version": "7.3.9", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-7.3.9.tgz", - "integrity": "sha512-B3lytFtFeYNLfWdlrIzvy3ulFRccD2/zkoL0734J+DAGfUz7vbysJ50RwYL46sQUcKdZdvb48ktfu1S8yooP6Q==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-8.1.3.tgz", + "integrity": "sha512-DsR/LDC7Vifw78pDew4HhUYvhKM5gyY8muvJqqfAU9DLq4yZ5ixus7jpqWXNeL3ZalFcH1/yQW20nzLQiLETkA==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.9", - "@angular-devkit/schematics": "7.3.9", - "typescript": "3.2.4" - }, - "dependencies": { - "typescript": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", - "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", - "dev": true - } + "@angular-devkit/core": "8.1.3", + "@angular-devkit/schematics": "8.1.3" } }, "@schematics/update": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.13.9.tgz", - "integrity": "sha512-4MQcaKFxhMzZyE//+DknDh3h3duy3avg2oxSHxdwXlCZ8Q92+4lpegjJcSRiqlEwO4qeJ5XnrjrvzfIiaIZOmA==", + "version": "0.801.3", + "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.801.3.tgz", + "integrity": "sha512-Y4HlG1eMUMlu62Kw2ic1+hF9+kKJlP35o+DO4t2LHKe/Kw+P+HJUeEpr/jocUxV56LDxF43BT3hkc9yJGIQ/Yw==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.9", - "@angular-devkit/schematics": "7.3.9", + "@angular-devkit/core": "8.1.3", + "@angular-devkit/schematics": "8.1.3", "@yarnpkg/lockfile": "1.1.0", "ini": "1.3.5", - "pacote": "9.4.0", - "rxjs": "6.3.3", - "semver": "5.6.0", + "pacote": "9.5.1", + "rxjs": "6.4.0", + "semver": "6.2.0", "semver-intersect": "1.4.0" }, "dependencies": { "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", "dev": true, "requires": { "tslib": "^1.9.0" } + }, + "semver": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", + "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "dev": true } } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, - "@types/cordova": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", - "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" - }, - "@types/crypto-js": { - "version": "3.1.43", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.43.tgz", - "integrity": "sha512-EHe/YKctU3IYNBsDmSOPX/7jLHPRlx8WaiDKSY9JCTnJ8XJeM4c0ZJvx+9Gxmr2s2ihI92R+3U/gNL1sq5oRuQ==" - }, - "@types/d3": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/@types/d3/-/d3-5.7.2.tgz", - "integrity": "sha512-7/wClB8ycneWGy3jdvLfXKTd5SoTg9hji7IdJ0RuO9xTY54YpJ8zlcFADcXhY1J3kCBwxp+/1jeN6a5OMwgYOw==", - "dev": true, - "requires": { - "@types/d3-array": "^1", - "@types/d3-axis": "*", - "@types/d3-brush": "*", - "@types/d3-chord": "*", - "@types/d3-collection": "*", - "@types/d3-color": "*", - "@types/d3-contour": "*", - "@types/d3-dispatch": "*", - "@types/d3-drag": "*", - "@types/d3-dsv": "*", - "@types/d3-ease": "*", - "@types/d3-fetch": "*", - "@types/d3-force": "*", - "@types/d3-format": "*", - "@types/d3-geo": "*", - "@types/d3-hierarchy": "*", - "@types/d3-interpolate": "*", - "@types/d3-path": "*", - "@types/d3-polygon": "*", - "@types/d3-quadtree": "*", - "@types/d3-random": "*", - "@types/d3-scale": "*", - "@types/d3-scale-chromatic": "*", - "@types/d3-selection": "*", - "@types/d3-shape": "*", - "@types/d3-time": "*", - "@types/d3-time-format": "*", - "@types/d3-timer": "*", - "@types/d3-transition": "*", - "@types/d3-voronoi": "*", - "@types/d3-zoom": "*" - } - }, - "@types/d3-array": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-1.2.7.tgz", - "integrity": "sha512-51vHWuUyDOi+8XuwPrTw3cFqyh2Slg9y8COYkRfjCPG9TfYqY0hoNPzv/8BrcAy0FeQBzqEo/D/8Nk2caOQJnA==", - "dev": true - }, - "@types/d3-axis": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-1.0.12.tgz", - "integrity": "sha512-BZISgSD5M8TgURyNtcPAmUB9sk490CO1Thb6/gIn0WZTt3Y50IssX+2Z0vTccoqZksUDTep0b+o4ofXslvNbqg==", - "dev": true, - "requires": { - "@types/d3-selection": "*" - } - }, - "@types/d3-brush": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-1.0.10.tgz", - "integrity": "sha512-J8jREATIrfJaAfhJivqaEKPnJsRlwwrOPje+ABqZFgamADjll+q9zaDXnYyjiGPPsiJEU+Qq9jQi5rECxIOfhg==", - "dev": true, + "@sentry/browser": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.17.0.tgz", + "integrity": "sha512-++pXpCHtdek1cRUwVeLvlxUJ2w1s+eiC9qN1N+7+HdAjHpBz2/tA1sKBCqwwVQZ490Cf2GLll9Ao7fuPPmveRQ==", "requires": { - "@types/d3-selection": "*" + "@sentry/core": "5.17.0", + "@sentry/types": "5.17.0", + "@sentry/utils": "5.17.0", + "tslib": "^1.9.3" } }, - "@types/d3-chord": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-1.0.9.tgz", - "integrity": "sha512-UA6lI9CVW5cT5Ku/RV4hxoFn4mKySHm7HEgodtfRthAj1lt9rKZEPon58vyYfk+HIAm33DtJJgZwMXy2QgyPXw==", - "dev": true - }, - "@types/d3-collection": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-collection/-/d3-collection-1.0.8.tgz", - "integrity": "sha512-y5lGlazdc0HNO0F3UUX2DPE7OmYvd9Kcym4hXwrJcNUkDaypR5pX+apuMikl9LfTxKItJsY9KYvzBulpCKyvuQ==", - "dev": true - }, - "@types/d3-color": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-1.2.2.tgz", - "integrity": "sha512-6pBxzJ8ZP3dYEQ4YjQ+NVbQaOflfgXq/JbDiS99oLobM2o72uAST4q6yPxHv6FOTCRC/n35ktuo8pvw/S4M7sw==", - "dev": true - }, - "@types/d3-contour": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-1.3.0.tgz", - "integrity": "sha512-AUCUIjEnC5lCGBM9hS+MryRaFLIrPls4Rbv6ktqbd+TK/RXZPwOy9rtBWmGpbeXcSOYCJTUDwNJuEnmYPJRxHQ==", - "dev": true, + "@sentry/cli": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-1.54.0.tgz", + "integrity": "sha512-021X1UbkSLlMTK3iivbf+hzJkL1gaVYbL6fpAPa4BU9GHy89OVU1w1E3SX/Nr3uJlAF3dF7HfYm95UCMuVFkLw==", "requires": { - "@types/d3-array": "*", - "@types/geojson": "*" + "https-proxy-agent": "^5.0.0", + "mkdirp": "^0.5.5", + "node-fetch": "^2.6.0", + "progress": "^2.0.3", + "proxy-from-env": "^1.1.0" + }, + "dependencies": { + "agent-base": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz", + "integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==", + "requires": { + "debug": "4" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + } } }, - "@types/d3-dispatch": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-1.0.7.tgz", - "integrity": "sha512-M+z84G7UKwK6hEPnGCSccOg8zJ3Nk2hgDQ9sCstHXgsFU0sMxlIZVKqKB5oxUDbALqQG6ucg0G9e8cmOSlishg==", - "dev": true - }, - "@types/d3-drag": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-1.2.3.tgz", - "integrity": "sha512-rWB5SPvkYVxW3sqUxHOJUZwifD0KqvKwvt1bhNqcLpW6Azsd0BJgRNcyVW8GAferaAk5r8dzeZnf9zKlg9+xMQ==", - "dev": true, + "@sentry/core": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.17.0.tgz", + "integrity": "sha512-Kfx4rGKDC7V1YJjTGJXyl12VVHxM8Cjpu61YOyF8kXoXXg9u06C3n0G1dmfzLQERKXasUVMtXRBdKx/OjYpl1g==", "requires": { - "@types/d3-selection": "*" + "@sentry/hub": "5.17.0", + "@sentry/minimal": "5.17.0", + "@sentry/types": "5.17.0", + "@sentry/utils": "5.17.0", + "tslib": "^1.9.3" } }, - "@types/d3-dsv": { - "version": "1.0.36", - "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-1.0.36.tgz", - "integrity": "sha512-jbIWQ27QJcBNMZbQv0NSQMHnBDCmxghAxePxgyiPH1XPCRkOsTBei7jcdi3fDrUCGpCV3lKrSZFSlOkhUQVClA==", - "dev": true - }, - "@types/d3-ease": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-1.0.8.tgz", - "integrity": "sha512-VRf8czVWHSJPoUWxMunzpePK02//wHDAswknU8QWzcyrQn6pqe46bHRYi2smSpw5VjsT2CG8k/QeWIdWPS3Bmg==", - "dev": true - }, - "@types/d3-fetch": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-1.1.5.tgz", - "integrity": "sha512-o9c0ItT5/Gl3wbNuVpzRnYX1t3RghzeWAjHUVLuyZJudiTxC4f/fC0ZPFWLQ2lVY8pAMmxpV8TJ6ETYCgPeI3A==", - "dev": true, + "@sentry/hub": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.17.0.tgz", + "integrity": "sha512-lyUbEmshwaMYdAzy4iwgizgvKODVVloB2trnefpq90AuWCdvzcxMLIGULx1ou+KohccqdNorYICKWeuRscKq5A==", "requires": { - "@types/d3-dsv": "*" + "@sentry/types": "5.17.0", + "@sentry/utils": "5.17.0", + "tslib": "^1.9.3" } }, - "@types/d3-force": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-1.2.1.tgz", - "integrity": "sha512-jqK+I36uz4kTBjyk39meed5y31Ab+tXYN/x1dn3nZEus9yOHCLc+VrcIYLc/aSQ0Y7tMPRlIhLetulME76EiiA==", - "dev": true - }, - "@types/d3-format": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-1.3.1.tgz", - "integrity": "sha512-KAWvReOKMDreaAwOjdfQMm0HjcUMlQG47GwqdVKgmm20vTd2pucj0a70c3gUSHrnsmo6H2AMrkBsZU2UhJLq8A==", - "dev": true - }, - "@types/d3-geo": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-1.11.1.tgz", - "integrity": "sha512-Ox8WWOG3igDRoep/dNsGbOiSJYdUG3ew/6z0ETvHyAtXZVBjOE0S96zSSmzgl0gqQ3RdZjn2eeJOj9oRcMZPkQ==", - "dev": true, + "@sentry/minimal": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.17.0.tgz", + "integrity": "sha512-v8xfkySXKrliZO6er6evlVe/ViUcqN0O8BhGyauK28Mf+KnKEOs5W6oWbt4qCDIttw9ynKIYyRrkAl/9oUR76A==", "requires": { - "@types/geojson": "*" + "@sentry/hub": "5.17.0", + "@sentry/types": "5.17.0", + "tslib": "^1.9.3" } }, - "@types/d3-hierarchy": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-1.1.6.tgz", - "integrity": "sha512-vvSaIDf/Ov0o3KwMT+1M8+WbnnlRiGjlGD5uvk83a1mPCTd/E5x12bUJ/oP55+wUY/4Kb5kc67rVpVGJ2KUHxg==", - "dev": true + "@sentry/types": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.17.0.tgz", + "integrity": "sha512-1z8EXzvg8GcsBNnSXgB5/G7mz2PwmMt9mjOrVG1jhtSGH1c7WvB32F5boqoMcjIJmy5MrBGaaXwrF/RRJrwUQg==" }, - "@types/d3-interpolate": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-1.3.1.tgz", - "integrity": "sha512-z8Zmi08XVwe8e62vP6wcA+CNuRhpuUU5XPEfqpG0hRypDE5BWNthQHB1UNWWDB7ojCbGaN4qBdsWp5kWxhT1IQ==", - "dev": true, + "@sentry/utils": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.17.0.tgz", + "integrity": "sha512-qn8WgZcSkV/rx0ezp9q/xFjP7aMaYZO1/JYLXV4o6pYrQ9tvMmmwAZT39FpJunhhbkR36WNEuRB9C2K250cb/A==", "requires": { - "@types/d3-color": "*" + "@sentry/types": "5.17.0", + "tslib": "^1.9.3" } }, - "@types/d3-path": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.8.tgz", - "integrity": "sha512-AZGHWslq/oApTAHu9+yH/Bnk63y9oFOMROtqPAtxl5uB6qm1x2lueWdVEjsjjV3Qc2+QfuzKIwIR5MvVBakfzA==", - "dev": true - }, - "@types/d3-polygon": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-1.0.7.tgz", - "integrity": "sha512-Xuw0eSjQQKs8jTiNbntWH0S+Xp+JyhqxmQ0YAQ3rDu6c3kKMFfgsaGN7Jv5u3zG6yVX/AsLP/Xs/QRjmi9g43Q==", - "dev": true - }, - "@types/d3-quadtree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-1.0.7.tgz", - "integrity": "sha512-0ajFawWicfjsaCLh6NzxOyVDYhQAmMFbsiI3MPGLInorauHFEh9/Cl6UHNf+kt/J1jfoxKY/ZJaKAoDpbvde5Q==", - "dev": true - }, - "@types/d3-random": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-1.1.2.tgz", - "integrity": "sha512-Jui+Zn28pQw/3EayPKaN4c/PqTvqNbIPjHkgIIFnxne1FdwNjfHtAIsZIBMKlquQNrrMjFzCrlF2gPs3xckqaA==", - "dev": true - }, - "@types/d3-scale": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-2.1.1.tgz", - "integrity": "sha512-kNTkbZQ+N/Ip8oX9PByXfDLoCSaZYm+VUOasbmsa6KD850/ziMdYepg/8kLg2plHzoLANdMqPoYQbvExevLUHg==", - "dev": true, + "@sentry/wizard": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@sentry/wizard/-/wizard-1.1.4.tgz", + "integrity": "sha512-xVpL0lnQK2bbEwUKKjs3dKhy27va8HW75Q8r1vaR63iBCpB5LpP4Q4NN5G/VEWdYnH8rcazsOA207716E1cm4g==", "requires": { - "@types/d3-time": "*" + "@sentry/cli": "^1.52.4", + "chalk": "^2.4.1", + "glob": "^7.1.3", + "inquirer": "^6.2.0", + "lodash": "^4.17.15", + "opn": "^5.4.0", + "r2": "^2.0.1", + "read-env": "^1.3.0", + "xcode": "2.0.0", + "yargs": "^12.0.2" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "xcode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xcode/-/xcode-2.0.0.tgz", + "integrity": "sha512-5xF6RCjAdDEiEsbbZaS/gBRt3jZ/177otZcpoLCjGN/u1LrfgH7/Sgeeavpr/jELpyDqN2im3AKosl2G2W8hfw==", + "requires": { + "simple-plist": "^1.0.0", + "uuid": "^3.3.2" + } + } } }, - "@types/d3-scale-chromatic": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-1.3.1.tgz", - "integrity": "sha512-Ny3rLbV5tnmqgW7w/poCcef4kXP8mHPo/p8EjTS5d9OUk8MlqAeRaM8eF7Vyv7QMLiIXNE94Pa1cMLSPkXQBoQ==", - "dev": true + "@types/clone": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/clone/-/clone-2.1.0.tgz", + "integrity": "sha512-d/aS/lPOnUSruPhgNtT8jW39fHRVTLQy9sodysP1kkG8EdAtdZu1vt8NJaYA8w/6Z9j8izkAsx1A/yJhcYR1CA==" }, - "@types/d3-selection": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-1.4.1.tgz", - "integrity": "sha512-bv8IfFYo/xG6dxri9OwDnK3yCagYPeRIjTlrcdYJSx+FDWlCeBDepIHUpqROmhPtZ53jyna0aUajZRk0I3rXNA==", + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, - "@types/d3-shape": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.1.tgz", - "integrity": "sha512-usqdvUvPJ7AJNwpd2drOzRKs1ELie53p2m2GnPKr076/ADM579jVTJ5dPsoZ5E/CMNWk8lvPWYQSvilpp6jjwg==", - "dev": true, - "requires": { - "@types/d3-path": "*" - } - }, - "@types/d3-time": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-1.0.10.tgz", - "integrity": "sha512-aKf62rRQafDQmSiv1NylKhIMmznsjRN+MnXRXTqHoqm0U/UZzVpdrtRnSIfdiLS616OuC1soYeX1dBg2n1u8Xw==", - "dev": true + "@types/cordova": { + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz", + "integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ=" }, - "@types/d3-time-format": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.1.1.tgz", - "integrity": "sha512-tJSyXta8ZyJ52wDDHA96JEsvkbL6jl7wowGmuf45+fAkj5Y+SQOnz0N7/H68OWmPshPsAaWMQh+GAws44IzH3g==", - "dev": true + "@types/crypto-js": { + "version": "3.1.43", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.43.tgz", + "integrity": "sha512-EHe/YKctU3IYNBsDmSOPX/7jLHPRlx8WaiDKSY9JCTnJ8XJeM4c0ZJvx+9Gxmr2s2ihI92R+3U/gNL1sq5oRuQ==" }, - "@types/d3-timer": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-1.0.9.tgz", - "integrity": "sha512-WvfJ3LFxBbWjqRGz9n7GJt08RrTHPJDVsIwwoCMROlqF+iDacYiAFjf9oqnq0mXpb2juA2N/qjKP+MKdal3YNQ==", + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", "dev": true }, - "@types/d3-transition": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-1.1.4.tgz", - "integrity": "sha512-/vsmKVUIXEyCcIXYAlw7bnYkIs9/J/nZbptRJFKUN3FdXq/dF6j9z9xXzerkyU6TDHLrMrwx9eGwdKyTIy/j9w==", - "dev": true, - "requires": { - "@types/d3-selection": "*" - } - }, - "@types/d3-voronoi": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@types/d3-voronoi/-/d3-voronoi-1.1.9.tgz", - "integrity": "sha512-DExNQkaHd1F3dFPvGA/Aw2NGyjMln6E9QzsiqOcBgnE+VInYnFBHBBySbZQts6z6xD+5jTfKCP7M4OqMyVjdwQ==", - "dev": true + "@types/fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ==" }, - "@types/d3-zoom": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-1.7.4.tgz", - "integrity": "sha512-5jnFo/itYhJeB2khO/lKe730kW/h2EbKMOvY0uNp3+7NdPm4w63DwPEMxifQZ7n902xGYK5DdU67FmToSoy4VA==", + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", "dev": true, "requires": { - "@types/d3-interpolate": "*", - "@types/d3-selection": "*" + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" } }, - "@types/geojson": { - "version": "7946.0.7", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz", - "integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==", - "dev": true - }, "@types/jasmine": { - "version": "2.8.16", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.16.tgz", - "integrity": "sha512-056oRlBBp7MDzr+HoU5su099s/s7wjZ3KcHxLfv+Byqb9MwdLUvsfLgw1VS97hsh3ddxSPyQu+olHMnoVTUY6g==", + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.3.16.tgz", + "integrity": "sha512-Nveep4zKGby8uIvG2AEUyYOwZS8uVeHK9TgbuWYSawUDDdIgfhCKz28QzamTo//Jk7Ztt9PO3f+vzlB6a4GV1Q==", "dev": true }, "@types/jasminewd2": { @@ -1856,10 +1888,16 @@ "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, "@types/node": { - "version": "12.0.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.10.tgz", - "integrity": "sha512-LcsGbPomWsad6wmMNv7nBLw7YYYyfdYcz6xryKYQhx89c3XXan+8Q6AJ43G5XDIaklaVkK3mE4fCb0SBvMiPSQ==", + "version": "8.10.59", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.59.tgz", + "integrity": "sha512-8RkBivJrDCyPpBXhVZcjh7cQxVBSmRk9QM7hOketZzp6Tg79c0N8kkpAIito9bnJ3HCVCHVYz+KHTEbfQNfeVQ==", "dev": true }, "@types/q": { @@ -1881,9 +1919,9 @@ "dev": true }, "@types/webpack-sources": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.5.tgz", - "integrity": "sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.6.tgz", + "integrity": "sha512-FtAWR7wR5ocJ9+nP137DV81tveD/ZgB1sadnJ/axUGM3BUVfRPx8oQNMtv3JNfTeHx3VP7cXiyfR/jmtEsVHsQ==", "dev": true, "requires": { "@types/node": "*", @@ -1900,175 +1938,179 @@ } }, "@webassemblyjs/ast": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.11.tgz", - "integrity": "sha512-ZEzy4vjvTzScC+SH8RBssQUawpaInUdMTYwYYLh54/s8TuT0gBLuyUnppKsVyZEi876VmmStKsUs28UxPgdvrA==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", + "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11" + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.11.tgz", - "integrity": "sha512-zY8dSNyYcgzNRNT666/zOoAyImshm3ycKdoLsyDw/Bwo6+/uktb7p4xyApuef1dwEBo/U/SYQzbGBvV+nru2Xg==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", + "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.11.tgz", - "integrity": "sha512-7r1qXLmiglC+wPNkGuXCvkmalyEstKVwcueZRP2GNC2PAvxbLYwLLPr14rcdJaE4UtHxQKfFkuDFuv91ipqvXg==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", + "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.11.tgz", - "integrity": "sha512-MynuervdylPPh3ix+mKZloTcL06P8tenNH3sx6s0qE8SLR6DdwnfgA7Hc9NSYeob2jrW5Vql6GVlsQzKQCa13w==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", + "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", "dev": true }, "@webassemblyjs/helper-code-frame": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.11.tgz", - "integrity": "sha512-T8ESC9KMXFTXA5urJcyor5cn6qWeZ4/zLPyWeEXZ03hj/x9weSokGNkVCdnhSabKGYWxElSdgJ+sFa9G/RdHNw==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", + "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.7.11" + "@webassemblyjs/wast-printer": "1.8.5" } }, "@webassemblyjs/helper-fsm": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.11.tgz", - "integrity": "sha512-nsAQWNP1+8Z6tkzdYlXT0kxfa2Z1tRTARd8wYnc/e3Zv3VydVVnaeePgqUzFrpkGUyhUUxOl5ML7f1NuT+gC0A==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", + "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", "dev": true }, "@webassemblyjs/helper-module-context": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.11.tgz", - "integrity": "sha512-JxfD5DX8Ygq4PvXDucq0M+sbUFA7BJAv/GGl9ITovqE+idGX+J3QSzJYz+LwQmL7fC3Rs+utvWoJxDb6pmC0qg==", - "dev": true + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", + "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "mamacro": "^0.0.3" + } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.11.tgz", - "integrity": "sha512-cMXeVS9rhoXsI9LLL4tJxBgVD/KMOKXuFqYb5oCJ/opScWpkCMEz9EJtkonaNcnLv2R3K5jIeS4TRj/drde1JQ==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", + "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.11.tgz", - "integrity": "sha512-8ZRY5iZbZdtNFE5UFunB8mmBEAbSI3guwbrsCl4fWdfRiAcvqQpeqd5KHhSWLL5wuxo53zcaGZDBU64qgn4I4Q==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", + "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5" } }, "@webassemblyjs/ieee754": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.11.tgz", - "integrity": "sha512-Mmqx/cS68K1tSrvRLtaV/Lp3NZWzXtOHUW2IvDvl2sihAwJh4ACE0eL6A8FvMyDG9abes3saB6dMimLOs+HMoQ==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", + "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.11.tgz", - "integrity": "sha512-vuGmgZjjp3zjcerQg+JA+tGOncOnJLWVkt8Aze5eWQLwTQGNgVLcyOTqgSCxWTR4J42ijHbBxnuRaL1Rv7XMdw==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", + "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", "dev": true, "requires": { - "@xtuc/long": "4.2.1" + "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.11.tgz", - "integrity": "sha512-C6GFkc7aErQIAH+BMrIdVSmW+6HSe20wg57HEC1uqJP8E/xpMjXqQUxkQw07MhNDSDcGpxI9G5JSNOQCqJk4sA==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", + "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.11.tgz", - "integrity": "sha512-FUd97guNGsCZQgeTPKdgxJhBXkUbMTY6hFPf2Y4OedXd48H97J+sOY2Ltaq6WGVpIH8o/TGOVNiVz/SbpEMJGg==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", + "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/helper-wasm-section": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-opt": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "@webassemblyjs/wast-printer": "1.7.11" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/helper-wasm-section": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-opt": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "@webassemblyjs/wast-printer": "1.8.5" } }, "@webassemblyjs/wasm-gen": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.11.tgz", - "integrity": "sha512-U/KDYp7fgAZX5KPfq4NOupK/BmhDc5Kjy2GIqstMhvvdJRcER/kUsMThpWeRP8BMn4LXaKhSTggIJPOeYHwISA==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", + "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" } }, "@webassemblyjs/wasm-opt": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.11.tgz", - "integrity": "sha512-XynkOwQyiRidh0GLua7SkeHvAPXQV/RxsUeERILmAInZegApOUAIJfRuPYe2F7RcjOC9tW3Cb9juPvAC/sCqvg==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", + "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5" } }, "@webassemblyjs/wasm-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.11.tgz", - "integrity": "sha512-6lmXRTrrZjYD8Ng8xRyvyXQJYUQKYSXhJqXOBLw24rdiXsHAOlvw5PhesjdcaMadU/pyPQOJ5dHreMjBxwnQKg==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", + "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" } }, "@webassemblyjs/wast-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.11.tgz", - "integrity": "sha512-lEyVCg2np15tS+dm7+JJTNhNWq9yTZvi3qEhAIIOaofcYlUp0UR5/tVqOwa/gXYr3gjwSZqw+/lS9dscyLelbQ==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", + "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/floating-point-hex-parser": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-code-frame": "1.7.11", - "@webassemblyjs/helper-fsm": "1.7.11", - "@xtuc/long": "4.2.1" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/floating-point-hex-parser": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-code-frame": "1.8.5", + "@webassemblyjs/helper-fsm": "1.8.5", + "@xtuc/long": "4.2.2" } }, "@webassemblyjs/wast-printer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.11.tgz", - "integrity": "sha512-m5vkAsuJ32QpkdkDOUPGSltrg8Cuk3KBx4YrmAGQwCZPRdUHXxG4phIOuuycLemHFr74sWL9Wthqss4fzdzSwg==", + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", + "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11", - "@xtuc/long": "4.2.1" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5", + "@xtuc/long": "4.2.2" } }, "@xtuc/ieee754": { @@ -2078,9 +2120,9 @@ "dev": true }, "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, "@yarnpkg/lockfile": { @@ -2102,9 +2144,7 @@ "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true, - "optional": true + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "accepts": { "version": "1.3.7", @@ -2117,9 +2157,9 @@ } }, "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", + "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", "dev": true }, "acorn-dynamic-import": { @@ -2177,9 +2217,9 @@ "dev": true }, "ajv-keywords": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", - "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", "dev": true }, "amdefine": { @@ -2188,6 +2228,14 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, + "android-versions": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.5.0.tgz", + "integrity": "sha512-/GWUAqa2OJNlDF5VGSe3SR1QMHEPXxx54Ur56r0qQC0H9FlBr7kyBF2SgVEhzFCPbrW4UcYgVuWrq/2Ty3QvXg==", + "requires": { + "semver": "^5.4.1" + } + }, "angular-azure-blob-service": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/angular-azure-blob-service/-/angular-azure-blob-service-1.1.0.tgz", @@ -2211,6 +2259,11 @@ } } }, + "ansi": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=" + }, "ansi-colors": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", @@ -2220,8 +2273,7 @@ "ansi-escapes": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" }, "ansi-html": { "version": "0.0.7", @@ -2238,7 +2290,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -2271,26 +2322,17 @@ "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, "are-we-there-yet": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "optional": true, "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" } }, - "arg": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", - "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", - "dev": true - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -2318,12 +2360,10 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true, - "optional": true + "array-flat-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz", + "integrity": "sha512-hfJmKupmQN0lwi0xG6FQ5U8Rd97RnIERplymOv/qpq8AoNKPPAnxJadjFA23FNWm88wykh9HmpLJUUwUtNU/iw==" }, "array-flatten": { "version": "2.1.2", @@ -2331,6 +2371,11 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=" + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -2368,8 +2413,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true, - "optional": true + "dev": true }, "ascli": { "version": "1.0.1", @@ -2460,13 +2504,6 @@ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true, - "optional": true - }, "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", @@ -2486,28 +2523,28 @@ "dev": true }, "autoprefixer": { - "version": "9.4.6", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.6.tgz", - "integrity": "sha512-Yp51mevbOEdxDUy5WjiKtpQaecqYq9OqZSL04rSoCiry7Tc5I9FEyo3bfxiTJc1DfHeKwSFCUYbBAiOQ2VGfiw==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.0.tgz", + "integrity": "sha512-kuip9YilBqhirhHEGHaBTZKXL//xxGnzvsD0FtBQa6z+A69qZD6s/BAX9VzDF1i9VKDquTJDQaPLSEhOnL6FvQ==", "dev": true, "requires": { - "browserslist": "^4.4.1", - "caniuse-lite": "^1.0.30000929", + "browserslist": "^4.6.1", + "caniuse-lite": "^1.0.30000971", + "chalk": "^2.4.2", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.13", + "postcss": "^7.0.16", "postcss-value-parser": "^3.3.1" } }, "aws-sdk": { - "version": "2.480.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.480.0.tgz", - "integrity": "sha512-X6xOgBeg8ZZJPnL4/wHXFIP6QF2SBABqw/F5l5zT/vEPUfmrIg24LVSUwPXmV6ZMh4hwsuuOjO910MbjNoHXXg==", - "dev": true, + "version": "2.619.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.619.0.tgz", + "integrity": "sha512-qujQf27p3mrGZGCL+C+vXCEB08AMm6gS1572fgHrVLBXfy6SjhV4dzEYtt+ZptQm+8z0zuHsDqghJuBCcdpxqQ==", "requires": { "buffer": "4.9.1", "events": "1.1.1", - "ieee754": "1.1.8", + "ieee754": "1.1.13", "jmespath": "0.15.0", "querystring": "0.2.0", "sax": "1.2.1", @@ -2519,32 +2556,22 @@ "events": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", - "dev": true + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" }, "sax": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", - "dev": true + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" }, "url": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", - "dev": true, "requires": { "punycode": "1.3.2", "querystring": "0.2.0" @@ -2768,8 +2795,7 @@ "base64-js": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, "base64id": { "version": "1.0.0", @@ -2801,6 +2827,11 @@ "callsite": "1.0.0" } }, + "big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" + }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -2819,16 +2850,6 @@ "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", "dev": true }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "dev": true, - "optional": true, - "requires": { - "inherits": "~2.0.0" - } - }, "blocking-proxy": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", @@ -2882,6 +2903,22 @@ "multicast-dns-service-types": "^1.1.0" } }, + "bplist-creator": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz", + "integrity": "sha512-Za9JKzD6fjLC16oX2wsXfc+qBEhJBJB1YPInoAQpMLhDuj5aVOv1baGeIQSq1Fr3OCqzvsoQcSBSwGId/Ja2PA==", + "requires": { + "stream-buffers": "~2.2.0" + } + }, + "bplist-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", + "requires": { + "big-integer": "^1.6.7" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2998,14 +3035,14 @@ } }, "browserslist": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.6.tgz", - "integrity": "sha512-o/hPOtbU9oX507lIqon+UvPYqpx3mHc8cV3QemSBTXwkG8gSQSK6UKvXcE/DcleU3+A59XTUHyCvZ5qGy8xVAg==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.3.tgz", + "integrity": "sha512-CNBqTCq22RKM8wKJNowcqihHJ4SkI8CGeK7KOR9tPboXUuS5Zk5lQgzzTbs4oxD8x+6HUshZUa2OyNI9lR93bQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000963", - "electron-to-chromium": "^1.3.127", - "node-releases": "^1.1.17" + "caniuse-lite": "^1.0.30000975", + "electron-to-chromium": "^1.3.164", + "node-releases": "^1.1.23" } }, "browserstack": { @@ -3021,7 +3058,6 @@ "version": "4.9.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4", @@ -3108,69 +3144,120 @@ "dev": true }, "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", + "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", "dev": true, "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "dependencies": { + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", "dev": true, - "optional": true, "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "caller-callsite": "^2.0.0" } }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", + "dev": true + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, "caniuse-lite": { - "version": "1.0.30000967", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000967.tgz", - "integrity": "sha512-rUBIbap+VJfxTzrM4akJ00lkvVb5/n5v3EGXfWzSH5zT8aJmGzjA8HWhJ4U6kCpzxozUSnB+yvAYDRPY6mRpgQ==", + "version": "1.0.30000979", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000979.tgz", + "integrity": "sha512-gcu45yfq3B7Y+WB05fOMfr0EiSlq+1u+m6rPHyJli/Wy3PVQNGaU7VA4bZE5qw+AU2UVOBR/N5g1bzADUqdvFw==", "dev": true }, "canonical-path": { @@ -3179,17 +3266,37 @@ "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", "dev": true }, + "canvas": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.6.1.tgz", + "integrity": "sha512-S98rKsPcuhfTcYbtF53UIJhcbgIAK533d1kJKMwsMwAIFgfd58MOyxRud3kktlzWiEkFliaJtvyZCBtud/XVEA==", + "requires": { + "nan": "^2.14.0", + "node-pre-gyp": "^0.11.0", + "simple-get": "^3.0.3" + }, + "dependencies": { + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + } + } + }, + "canvas-confetti": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/canvas-confetti/-/canvas-confetti-1.1.2.tgz", + "integrity": "sha512-M8aOcw4Agmu4xxNwpNgveCLUsnluWtStPYYvxrj5qMr9yEC2xCF265T0vRRKzpcSgWkLmm3Da0UIiXqdG98apg==" + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3200,7 +3307,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -3210,8 +3316,7 @@ "chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, "chart.js": { "version": "2.9.3", @@ -3261,15 +3366,14 @@ } }, "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", + "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -3335,7 +3439,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, "requires": { "restore-cursor": "^2.0.0" } @@ -3343,8 +3446,7 @@ "cli-width": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" }, "cliui": { "version": "3.2.0", @@ -3359,8 +3461,7 @@ "clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" }, "clone-deep": { "version": "2.0.2", @@ -3467,6 +3568,15 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, + "compare-func": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^3.0.0" + } + }, "compare-versions": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.4.0.tgz", @@ -3492,12 +3602,20 @@ "dev": true }, "compressible": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", - "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { - "mime-db": ">= 1.40.0 < 2" + "mime-db": ">= 1.43.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "dev": true + } } }, "compression": { @@ -3574,20 +3692,15 @@ "dev": true }, "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, "constants-browserify": { "version": "1.0.0", @@ -3608,9 +3721,9 @@ "dev": true }, "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, "requires": { "safe-buffer": "~5.1.1" @@ -3649,285 +3762,165 @@ "dev": true }, "copy-webpack-plugin": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.6.0.tgz", - "integrity": "sha512-Y+SQCF+0NoWQryez2zXn5J5knmr9z/9qSQt7fbL78u83rxmigOy8X5+BFn8CFSuX+nKT8gpYwJX68ekqtQt6ZA==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.0.3.tgz", + "integrity": "sha512-PlZRs9CUMnAVylZq+vg2Juew662jWtwOXOqH4lbQD9ZFhRG9R7tVStOgHt21CBGVq7k5yIJaz8TXDLSjV+Lj8Q==", "dev": true, "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", + "cacache": "^11.3.2", + "find-cache-dir": "^2.1.0", + "glob-parent": "^3.1.0", "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", + "is-glob": "^4.0.1", + "loader-utils": "^1.2.3", "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" + "normalize-path": "^3.0.0", + "p-limit": "^2.2.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.7.0", + "webpack-log": "^2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } } }, "cordova-android": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.4.tgz", - "integrity": "sha512-Rtvu002I83uzfVyCsE6p2krFKVHt9TSAqZUATes+zH+o9cdxYGrLHY+PKCQo4SLCdSMdrkIHCDnQPTYTp/d7+g==", - "requires": { - "abbrev": "*", - "android-versions": "1.4.0", - "ansi": "*", - "balanced-match": "*", - "base64-js": "1.2.0", - "big-integer": "1.6.32", - "bplist-parser": "*", - "brace-expansion": "*", - "concat-map": "*", - "cordova-common": "2.2.5", - "cordova-registry-mapper": "*", - "elementtree": "0.1.6", - "glob": "5.0.15", - "inflight": "*", - "inherits": "*", - "minimatch": "*", - "nopt": "3.0.1", - "once": "*", - "path-is-absolute": "1.0.1", - "plist": "2.1.0", - "properties-parser": "0.2.3", - "q": "1.4.1", - "sax": "0.3.5", - "semver": "5.5.0", - "shelljs": "0.5.3", - "underscore": "*", - "unorm": "*", - "wrappy": "*", - "xmlbuilder": "8.2.2", - "xmldom": "*" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-8.1.0.tgz", + "integrity": "sha512-eAY6g9q3raJ4P03wNdSWC5MOW1EfxoomWNXsPhi7T6Q9yAqmxqn0sLEUjLL1Ib0LCH3nKQWBXdxapQ5LgbHu+g==", + "requires": { + "android-versions": "^1.4.0", + "compare-func": "^1.3.2", + "cordova-common": "^3.2.0", + "nopt": "^4.0.1", + "properties-parser": "^0.3.1", + "q": "^1.5.1", + "shelljs": "^0.5.3" }, "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "android-versions": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.4.0.tgz", - "integrity": "sha512-GnomfYsBq+nZh3c3UH/4r9Jt6FuTxdhUJbeHIdYOH5xBhQ8I0ZzC2/RM5IFFIjrzuNWSHb8JWP1lPK0/a26jrg==", - "requires": { - "semver": "^5.4.1" - } - }, - "ansi": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", - "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", - "integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=" - }, - "big-integer": { - "version": "1.6.32", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.32.tgz", - "integrity": "sha512-ljKJdR3wk9thHfLj4DtrNiOSTxvGFaMjWrG4pW75juXC4j7+XuKJVFdg4kgFMYp85PVkO05dFMj2dk2xVsH4xw==" - }, - "bplist-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", - "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", - "requires": { - "big-integer": "^1.6.7" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "cordova-common": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-2.2.5.tgz", - "integrity": "sha1-+TzvKtSUz8v1bEbj1hKqqctfzDI=", - "requires": { - "ansi": "^0.3.1", - "bplist-parser": "^0.1.0", - "cordova-registry-mapper": "^1.1.8", - "elementtree": "0.1.6", - "glob": "^5.0.13", - "minimatch": "^3.0.0", - "plist": "^2.1.0", - "q": "^1.4.1", - "shelljs": "^0.5.3", - "underscore": "^1.8.3", - "unorm": "^1.3.3" - } - }, - "cordova-registry-mapper": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz", - "integrity": "sha1-4kS5GFuBdUc7/2B5MkkFEV+D3Hw=" - }, - "elementtree": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", - "integrity": "sha1-KsTEbqMFFsjEy9teOsdBjlkt4gw=", - "requires": { - "sax": "0.3.5" - } - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "nopt": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.1.tgz", - "integrity": "sha1-vOXEJEajKR9HYio3CrvxWPu6y/0=", - "requires": { - "abbrev": "1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + } + } + }, + "cordova-common": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-3.2.1.tgz", + "integrity": "sha512-xg0EnjnA6EipxXG8cupdlYQYeDA6+ghbN+Pjq88xN1LInwP6Bo7IyGBdSV5QnfjOvzShF9BBwSxBAv0FOO0C2Q==", + "requires": { + "ansi": "^0.3.1", + "bplist-parser": "^0.1.0", + "cross-spawn": "^6.0.5", + "elementtree": "0.1.7", + "endent": "^1.1.1", + "fs-extra": "^8.0.0", + "glob": "^7.1.2", + "minimatch": "^3.0.0", + "plist": "^3.0.1", + "q": "^1.4.1", + "strip-bom": "^3.0.0", + "underscore": "^1.8.3", + "which": "^1.3.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "requires": { - "wrappy": "1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "plist": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/plist/-/plist-2.1.0.tgz", - "integrity": "sha1-V8zbeggh3yGDEhejytVOPhRqECU=", + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "requires": { - "base64-js": "1.2.0", - "xmlbuilder": "8.2.2", - "xmldom": "0.1.x" + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "properties-parser": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz", - "integrity": "sha1-91kSVfcHq7/yJ8e1a2N9uwNzoQ8=" + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + } + } + }, + "cordova-ios": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-5.1.1.tgz", + "integrity": "sha512-asZMCj44JMe/PMrDIRC97GStPCH+GpaMNVe8hdmu8WWXJzMzRNRRJ339YYU89jitWf9ZKMdyBgrnSnQi5bJ/ZQ==", + "requires": { + "cordova-common": "^3.1.0", + "ios-sim": "^8.0.1", + "nopt": "^4.0.1", + "plist": "^3.0.1", + "q": "^1.5.1", + "semver": "^6.3.0", + "shelljs": "^0.5.3", + "unorm": "^1.4.1", + "xcode": "^2.0.0", + "xml-escape": "^1.1.0" + }, + "dependencies": { "q": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" - }, - "sax": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.3.5.tgz", - "integrity": "sha1-iPz8H3PAyLvVt8d2ttPzUB7tBz0=" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "shelljs": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" - }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" - }, - "unorm": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz", - "integrity": "sha1-NkIA1fE2RsqLzURJAnEzVhR5IwA=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xmlbuilder": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", - "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=" - }, - "xmldom": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", - "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" } } }, + "cordova-plugin-app-version": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/cordova-plugin-app-version/-/cordova-plugin-app-version-0.1.9.tgz", + "integrity": "sha1-nbBgeGMzenEEiTAuX1CpBPFEm9s=" + }, "cordova-plugin-device": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/cordova-plugin-device/-/cordova-plugin-device-2.0.2.tgz", "integrity": "sha1-/Ajzci5n7ve2xnv8mag99q3Quro=" }, "cordova-plugin-file": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-6.0.1.tgz", - "integrity": "sha1-SWBrjBWlaI1HKPkuSnMloGHeB/U=" - }, - "cordova-plugin-google-analytics": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/cordova-plugin-google-analytics/-/cordova-plugin-google-analytics-1.8.6.tgz", - "integrity": "sha512-shg8e3ris1MzmhC8roraScc2GEcfe7sVlbKkvrO3wZUAlYr31sf+4wxZr/VQB6tEcPsmTAkoNjGr1zMwoYjMeg==" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-6.0.2.tgz", + "integrity": "sha512-m7cughw327CjONN/qjzsTpSesLaeybksQh420/gRuSXJX5Zt9NfgsSbqqKDon6jnQ9Mm7h7imgyO2uJ34XMBtA==" }, "cordova-plugin-ionic-keyboard": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-keyboard/-/cordova-plugin-ionic-keyboard-2.1.3.tgz", - "integrity": "sha512-6ucQ6FdlLdBm8kJfFnzozmBTjru/0xekHP/dAhjoCZggkGRlgs8TsUJFkxa/bV+qi7Dlo50JjmpE4UMWAO+aOQ==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-keyboard/-/cordova-plugin-ionic-keyboard-2.2.0.tgz", + "integrity": "sha512-yDUG+9ieKVRitq5mGlNxjaZh/MgEhFFIgTIPhqSbUaQ8UuZbawy5mhJAVClqY97q8/rcQtL6dCDa7x2sEtCLcA==" }, "cordova-plugin-ionic-webview": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-webview/-/cordova-plugin-ionic-webview-4.0.1.tgz", - "integrity": "sha512-rJf7jFQNw7l0U4Y7P6DjxwmO/qQgS7xqiTgwDbNFS4z4+FZ3EZyupll7/cFEDnxGRNMgWsMKDhIABUo5mIDaUQ==" + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-webview/-/cordova-plugin-ionic-webview-4.2.1.tgz", + "integrity": "sha512-7KrmqLaOGq1RP8N2z1ezN1kqkWFzTwwMvQ3/qAkd+exxFZuOe3DIN4eaU1gdNphsxdirI8Ajnr9q4So5vQbWqw==" + }, + "cordova-plugin-network-information": { + "version": "git+https://github.com/apache/cordova-plugin-network-information.git#310b38f42b26b26f493d89f4e83aad6b98568e54", + "from": "git+https://github.com/apache/cordova-plugin-network-information.git" }, "cordova-plugin-splashscreen": { "version": "5.0.2", @@ -3940,9 +3933,22 @@ "integrity": "sha1-/B+9wNjXAzp+jh8ff/FnrJvU+vY=" }, "cordova-plugin-whitelist": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.3.tgz", - "integrity": "sha1-tehezbv+Wu3tQKG/TuI3LmfZb7Q=" + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.4.tgz", + "integrity": "sha512-EYC5eQFVkoYXq39l7tYKE6lEjHJ04mvTmKXxGL7quHLdFPfJMNzru/UYpn92AOfpl3PQaZmou78C7EgmFOwFQQ==" + }, + "cordova-sqlite-storage": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cordova-sqlite-storage/-/cordova-sqlite-storage-4.0.0.tgz", + "integrity": "sha512-/n5KT3TyRAC7QRe9A4Sn7bMpdsBJ6aMmHat2PsMxFZBot45SOxbAEgfGmXtq0e7OEdVzk573sIn42bLS6lNLjQ==", + "requires": { + "cordova-sqlite-storage-dependencies": "2.1.1" + } + }, + "cordova-sqlite-storage-dependencies": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cordova-sqlite-storage-dependencies/-/cordova-sqlite-storage-dependencies-2.1.1.tgz", + "integrity": "sha512-1lV5Pg1FttjBmGO8z4gxtuA4BbPKtgTfUEh1Vx4boa41inizyxaowRyTeaaqEhi5gmYAaX8sRTABm9U/XckRFg==" }, "core-js": { "version": "2.6.5", @@ -3952,31 +3958,18 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cosmiconfig": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz", - "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "dev": true, "requires": { + "import-fresh": "^2.0.0", "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0", - "require-from-string": "^2.0.1" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" } }, "create-ecdh": { @@ -4017,13 +4010,14 @@ } }, "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", - "dev": true, - "optional": true, + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "requires": { - "lru-cache": "^4.0.1", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", "which": "^1.2.9" } }, @@ -4083,16 +4077,6 @@ "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", "dev": true }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "optional": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, "custom-event": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", @@ -4100,274 +4084,138 @@ "dev": true }, "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "d3": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/d3/-/d3-5.9.2.tgz", - "integrity": "sha512-ydrPot6Lm3nTWH+gJ/Cxf3FcwuvesYQ5uk+j/kXEH/xbuYWYWTMAHTJQkyeuG8Y5WM5RSEYB41EctUrXQQytRQ==", - "requires": { - "d3-array": "1", - "d3-axis": "1", - "d3-brush": "1", - "d3-chord": "1", - "d3-collection": "1", - "d3-color": "1", - "d3-contour": "1", - "d3-dispatch": "1", - "d3-drag": "1", - "d3-dsv": "1", - "d3-ease": "1", - "d3-fetch": "1", - "d3-force": "1", - "d3-format": "1", - "d3-geo": "1", - "d3-hierarchy": "1", - "d3-interpolate": "1", - "d3-path": "1", - "d3-polygon": "1", - "d3-quadtree": "1", - "d3-random": "1", - "d3-scale": "2", - "d3-scale-chromatic": "1", - "d3-selection": "1", - "d3-shape": "1", - "d3-time": "1", - "d3-time-format": "2", - "d3-timer": "1", - "d3-transition": "1", - "d3-voronoi": "1", - "d3-zoom": "1" - } + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true }, "d3-array": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz", - "integrity": "sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==" - }, - "d3-axis": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-1.0.12.tgz", - "integrity": "sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ==" - }, - "d3-brush": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-1.0.6.tgz", - "integrity": "sha512-lGSiF5SoSqO5/mYGD5FAeGKKS62JdA1EV7HPrU2b5rTX4qEJJtpjaGLJngjnkewQy7UnGstnFd3168wpf5z76w==", - "requires": { - "d3-dispatch": "1", - "d3-drag": "1", - "d3-interpolate": "1", - "d3-selection": "1", - "d3-transition": "1" - } - }, - "d3-chord": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-1.0.6.tgz", - "integrity": "sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA==", - "requires": { - "d3-array": "1", - "d3-path": "1" - } - }, - "d3-collection": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.7.tgz", - "integrity": "sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A==" + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.9.0.tgz", + "integrity": "sha512-yOokB8GozB6GAubW9n7phLdRugC8TgEjF6V1cX/q78L80d2tLirUnc0jvDSSF622JJJTmtnJOe9+WKs+yS5GFQ==" }, "d3-color": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.2.3.tgz", - "integrity": "sha512-x37qq3ChOTLd26hnps36lexMRhNXEtVxZ4B25rL0DVdDsGQIJGB18S7y9XDwlDD6MD/ZBzITCf4JjGMM10TZkw==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz", + "integrity": "sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ==" }, - "d3-contour": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-1.3.2.tgz", - "integrity": "sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg==", + "d3-delaunay": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-5.3.0.tgz", + "integrity": "sha512-amALSrOllWVLaHTnDLHwMIiz0d1bBu9gZXd1FiLfXf8sHcX9jrcj81TVZOqD4UX7MgBZZ07c8GxzEgBpJqc74w==", "requires": { - "d3-array": "^1.1.1" + "delaunator": "4" } }, "d3-dispatch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.5.tgz", - "integrity": "sha512-vwKx+lAqB1UuCeklr6Jh1bvC4SZgbSqbkGBLClItFBIYH4vqDJCA7qfoy14lXmJdnBOdxndAMxjCbImJYW7e6g==" - }, - "d3-drag": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.2.3.tgz", - "integrity": "sha512-8S3HWCAg+ilzjJsNtWW1Mutl74Nmzhb9yU6igspilaJzeZVFktmY6oO9xOh5TDk+BM2KrNFjttZNoJJmDnkjkg==", - "requires": { - "d3-dispatch": "1", - "d3-selection": "1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-2.0.0.tgz", + "integrity": "sha512-S/m2VsXI7gAti2pBoLClFFTMOO1HTtT0j99AuXLoGFKO6deHDdnv6ZGTxSTTUTgO1zVcv82fCOtDjYK4EECmWA==" }, "d3-dsv": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.1.1.tgz", - "integrity": "sha512-1EH1oRGSkeDUlDRbhsFytAXU6cAmXFzc52YUe6MRlPClmWb85MP1J5x+YJRzya4ynZWnbELdSAvATFW/MbxaXw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-2.0.0.tgz", + "integrity": "sha512-E+Pn8UJYx9mViuIUkoc93gJGGYut6mSDKy2+XaPwccwkRGlR+LO97L2VCCRjQivTwLHkSnAJG7yo00BWY6QM+w==", "requires": { "commander": "2", "iconv-lite": "0.4", "rw": "1" } }, - "d3-ease": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.5.tgz", - "integrity": "sha512-Ct1O//ly5y5lFM9YTdu+ygq7LleSgSE4oj7vUt9tPLHUi8VCV7QoizGpdWRWAwCO9LdYzIrQDg97+hGVdsSGPQ==" - }, - "d3-fetch": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-1.1.2.tgz", - "integrity": "sha512-S2loaQCV/ZeyTyIF2oP8D1K9Z4QizUzW7cWeAOAS4U88qOt3Ucf6GsmgthuYSdyB2HyEm4CeGvkQxWsmInsIVA==", - "requires": { - "d3-dsv": "1" - } - }, "d3-force": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.2.1.tgz", - "integrity": "sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-2.1.1.tgz", + "integrity": "sha512-nAuHEzBqMvpFVMf9OX75d00OxvOXdxY+xECIXjW6Gv8BRrXu6gAWbv/9XKrvfJ5i5DCokDW7RYE50LRoK092ew==", "requires": { - "d3-collection": "1", - "d3-dispatch": "1", - "d3-quadtree": "1", - "d3-timer": "1" + "d3-dispatch": "1 - 2", + "d3-quadtree": "1 - 2", + "d3-timer": "1 - 2" } }, "d3-format": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.3.2.tgz", - "integrity": "sha512-Z18Dprj96ExragQ0DeGi+SYPQ7pPfRMtUXtsg/ChVIKNBCzjO8XYJvRTC1usblx52lqge56V5ect+frYTQc8WQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-2.0.0.tgz", + "integrity": "sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA==" }, "d3-geo": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.11.6.tgz", - "integrity": "sha512-z0J8InXR9e9wcgNtmVnPTj0TU8nhYT6lD/ak9may2PdKqXIeHUr8UbFLoCtrPYNsjv6YaLvSDQVl578k6nm7GA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-2.0.1.tgz", + "integrity": "sha512-M6yzGbFRfxzNrVhxDJXzJqSLQ90q1cCyb3EWFZ1LF4eWOBYxFypw7I/NFVBNXKNqxv1bqLathhYvdJ6DC+th3A==", "requires": { - "d3-array": "1" + "d3-array": ">=2.5" + } + }, + "d3-geo-projection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-geo-projection/-/d3-geo-projection-3.0.0.tgz", + "integrity": "sha512-1JE+filVbkEX2bT25dJdQ05iA4QHvUwev6o0nIQHOSrNlHCAKfVss/U10vEM3pA4j5v7uQoFdQ4KLbx9BlEbWA==", + "requires": { + "commander": "2", + "d3-array": "1 - 2", + "d3-geo": "1.12.0 - 2", + "resolve": "^1.1.10" } }, "d3-hierarchy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-1.1.8.tgz", - "integrity": "sha512-L+GHMSZNwTpiq4rt9GEsNcpLa4M96lXMR8M/nMG9p5hBE0jy6C+3hWtyZMenPQdwla249iJy7Nx0uKt3n+u9+w==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-2.0.0.tgz", + "integrity": "sha512-SwIdqM3HxQX2214EG9GTjgmCc/mbSx4mQBn+DuEETubhOw6/U3fmnji4uCVrmzOydMHSO1nZle5gh6HB/wdOzw==" }, "d3-interpolate": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.3.2.tgz", - "integrity": "sha512-NlNKGopqaz9qM1PXh9gBF1KSCVh+jSFErrSlD/4hybwoNX/gt1d8CDbDW+3i+5UOHhjC6s6nMvRxcuoMVNgL2w==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-2.0.1.tgz", + "integrity": "sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ==", "requires": { - "d3-color": "1" + "d3-color": "1 - 2" } }, "d3-path": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.7.tgz", - "integrity": "sha512-q0cW1RpvA5c5ma2rch62mX8AYaiLX0+bdaSM2wxSU9tXjU4DNvkx9qiUvjkuWCj3p22UO/hlPivujqMiR9PDzA==" - }, - "d3-polygon": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-1.0.5.tgz", - "integrity": "sha512-RHhh1ZUJZfhgoqzWWuRhzQJvO7LavchhitSTHGu9oj6uuLFzYZVeBzaWTQ2qSO6bz2w55RMoOCf0MsLCDB6e0w==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-2.0.0.tgz", + "integrity": "sha512-ZwZQxKhBnv9yHaiWd6ZU4x5BtCQ7pXszEV9CU6kRgwIQVQGLMv1oiL4M+MK/n79sYzsj+gcgpPQSctJUsLN7fA==" }, "d3-quadtree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.6.tgz", - "integrity": "sha512-NUgeo9G+ENQCQ1LsRr2qJg3MQ4DJvxcDNCiohdJGHt5gRhBW6orIB5m5FJ9kK3HNL8g9F4ERVoBzcEwQBfXWVA==" - }, - "d3-random": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-1.1.2.tgz", - "integrity": "sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-2.0.0.tgz", + "integrity": "sha512-b0Ed2t1UUalJpc3qXzKi+cPGxeXRr4KU9YSlocN74aTzp6R/Ud43t79yLLqxHRWZfsvWXmbDWPpoENK1K539xw==" }, "d3-scale": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-2.2.2.tgz", - "integrity": "sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw==", - "requires": { - "d3-array": "^1.2.0", - "d3-collection": "1", - "d3-format": "1", - "d3-interpolate": "1", - "d3-time": "1", - "d3-time-format": "2" - } - }, - "d3-scale-chromatic": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-1.3.3.tgz", - "integrity": "sha512-BWTipif1CimXcYfT02LKjAyItX5gKiwxuPRgr4xM58JwlLocWbjPLI7aMEjkcoOQXMkYsmNsvv3d2yl/OKuHHw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz", + "integrity": "sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g==", "requires": { - "d3-color": "1", - "d3-interpolate": "1" + "d3-array": "^2.3.0", + "d3-format": "1 - 2", + "d3-interpolate": "1.2.0 - 2", + "d3-time": "1 - 2", + "d3-time-format": "2 - 3" } }, - "d3-selection": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.4.0.tgz", - "integrity": "sha512-EYVwBxQGEjLCKF2pJ4+yrErskDnz5v403qvAid96cNdCMr8rmCYfY5RGzWz24mdIbxmDf6/4EAH+K9xperD5jg==" - }, "d3-shape": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.5.tgz", - "integrity": "sha512-VKazVR3phgD+MUCldapHD7P9kcrvPcexeX/PkMJmkUov4JM8IxsSg1DvbYoYich9AtdTsa5nNk2++ImPiDiSxg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-2.0.0.tgz", + "integrity": "sha512-djpGlA779ua+rImicYyyjnOjeubyhql1Jyn1HK0bTyawuH76UQRWXd+pftr67H6Fa8hSwetkgb/0id3agKWykw==", "requires": { - "d3-path": "1" + "d3-path": "1 - 2" } }, "d3-time": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-1.0.11.tgz", - "integrity": "sha512-Z3wpvhPLW4vEScGeIMUckDW7+3hWKOQfAWg/U7PlWBnQmeKQ00gCUsTtWSYulrKNA7ta8hJ+xXc6MHrMuITwEw==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-2.0.0.tgz", + "integrity": "sha512-2mvhstTFcMvwStWd9Tj3e6CEqtOivtD8AUiHT8ido/xmzrI9ijrUUihZ6nHuf/vsScRBonagOdj0Vv+SEL5G3Q==" }, "d3-time-format": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.1.3.tgz", - "integrity": "sha512-6k0a2rZryzGm5Ihx+aFMuO1GgelgIz+7HhB4PH4OEndD5q2zGn1mDfRdNrulspOfR6JXkb2sThhDK41CSK85QA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-3.0.0.tgz", + "integrity": "sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag==", "requires": { - "d3-time": "1" + "d3-time": "1 - 2" } }, "d3-timer": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.9.tgz", - "integrity": "sha512-rT34J5HnQUHhcLvhSB9GjCkN0Ddd5Y8nCwDBG2u6wQEeYxT/Lf51fTFFkldeib/sE/J0clIe0pnCfs6g/lRbyg==" - }, - "d3-transition": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.2.0.tgz", - "integrity": "sha512-VJ7cmX/FPIPJYuaL2r1o1EMHLttvoIuZhhuAlRoOxDzogV8iQS6jYulDm3xEU3TqL80IZIhI551/ebmCMrkvhw==", - "requires": { - "d3-color": "1", - "d3-dispatch": "1", - "d3-ease": "1", - "d3-interpolate": "1", - "d3-selection": "^1.1.0", - "d3-timer": "1" - } - }, - "d3-voronoi": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.4.tgz", - "integrity": "sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg==" - }, - "d3-zoom": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-1.7.3.tgz", - "integrity": "sha512-xEBSwFx5Z9T3/VrwDkMt+mr0HCzv7XjpGURJ8lWmIC8wxe32L39eWHIasEe/e7Ox8MPU4p1hvH8PKN2olLzIBg==", - "requires": { - "d3-dispatch": "1", - "d3-drag": "1", - "d3-interpolate": "1", - "d3-selection": "1", - "d3-transition": "1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-2.0.0.tgz", + "integrity": "sha512-TO4VLh0/420Y/9dO3+f9abDEFYeCUr2WZRlxJvbp4HPTQcSylXNiL6yZa9FIUvV1yRiFufl1bszTCLDqv9PWNA==" }, "dashdash": { "version": "1.14.1", @@ -4384,12 +4232,6 @@ "integrity": "sha512-M6UqVvZVgFYqZL1SfHsRGIQSz3ZL+qgbsV5Lp1Vj61LZVYuEwcMXYay7DRDtYs2HQQBK5hQtQ0fD9aEJ89V0LA==", "dev": true }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -4399,6 +4241,12 @@ "ms": "2.0.0" } }, + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "dev": true + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -4410,19 +4258,45 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "requires": { + "mimic-response": "^2.0.0" + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" + }, "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, "default-gateway": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz", - "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", "dev": true, "requires": { - "execa": "^0.10.0", + "execa": "^1.0.0", "ip-regex": "^2.1.0" } }, @@ -4443,6 +4317,14 @@ } } }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -4484,18 +4366,24 @@ } } }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", "dev": true, "requires": { + "@types/glob": "^7.1.1", "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" }, "dependencies": { "globby": { @@ -4518,9 +4406,38 @@ "dev": true } } + }, + "is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true + }, + "is-path-in-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, + "requires": { + "is-path-inside": "^2.1.0" + } + }, + "is-path-inside": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, + "requires": { + "path-is-inside": "^1.0.2" + } } } }, + "delaunator": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-4.0.1.tgz", + "integrity": "sha512-WNPWi1IRKZfCt/qIDMfERkDp93+iZEmOxN2yy4Jg+Xhv8SLk2UTqqbe1sfiipn0and9QrE914/ihdx82Y/Giag==" + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4530,9 +4447,7 @@ "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, "depd": { "version": "1.1.2", @@ -4547,9 +4462,9 @@ "dev": true }, "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -4571,12 +4486,27 @@ "repeating": "^2.0.0" } }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, "detect-node": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", "dev": true }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, "di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", @@ -4657,6 +4587,22 @@ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "requires": { + "is-obj": "^1.0.0" + } + }, + "dotignore": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", + "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", + "requires": { + "minimatch": "^3.0.4" + } + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -4686,15 +4632,30 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.133", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.133.tgz", - "integrity": "sha512-lyoC8aoqbbDqsprb6aPdt9n3DpOZZzdz/T4IZKsR0/dkZIxnJVUjjcpOSwA66jPRIOyDAamCTAUqweU05kKNSg==", + "version": "1.3.351", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.351.tgz", + "integrity": "sha512-L8zhV8k7Znp2q3wWXYDzCyfTBeGauEX0rX/FtgmnDgmvHRqwu9NVN614wOkXx9sDZmJZpNMBaEFMXTu/vbr+Kg==", "dev": true }, + "elementtree": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz", + "integrity": "sha1-mskb5uUvtuYkTE5UpKw+2K6OKcA=", + "requires": { + "sax": "1.1.4" + }, + "dependencies": { + "sax": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz", + "integrity": "sha1-dLbTPJrh4AFRDxeakRaFiPGu2qk=" + } + } + }, "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -4733,14 +4694,23 @@ } }, "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "requires": { "once": "^1.4.0" } }, + "endent": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/endent/-/endent-1.3.0.tgz", + "integrity": "sha512-C8AryqPPwtydqcpO5AF6k9Bd1EpFkQtvsefJqS3y3n8TG13Jy63MascDxTOULZYqrUde+dK6BjNc6LIMr3iI2A==", + "requires": { + "dedent": "^0.7.0", + "fast-json-parse": "^1.0.3", + "objectorarray": "^1.0.3" + } + }, "engine.io": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", @@ -4878,6 +4848,42 @@ "is-arrayish": "^0.2.1" } }, + "error-stack-parser": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz", + "integrity": "sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==", + "requires": { + "stackframe": "^1.1.1" + } + }, + "es-abstract": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz", + "integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "es6-promise": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", @@ -4893,6 +4899,11 @@ "es6-promise": "^4.0.3" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -4902,8 +4913,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint-scope": { "version": "4.0.3", @@ -4931,9 +4941,9 @@ } }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { @@ -4955,9 +4965,9 @@ "dev": true }, "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", + "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==", "dev": true }, "eventsource": { @@ -4980,33 +4990,17 @@ } }, "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "requires": { "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", + "get-stream": "^4.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } } }, "exit": { @@ -5124,10 +5118,9 @@ } }, "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "requires": { "chardet": "^0.7.0", "iconv-lite": "^0.4.24", @@ -5138,7 +5131,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -5222,6 +5214,11 @@ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, + "fast-json-parse": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz", + "integrity": "sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==" + }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", @@ -5253,18 +5250,17 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } }, "file-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", - "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-4.0.0.tgz", + "integrity": "sha512-roAbL6IdSGczwfXxhMi6Zq+jD4IfUpL0jWHD7fvmjdOVb7xBfdRUHe4LpBgO23VtVK5AW1OlWZo0p34Jvx3iWg==", "dev": true, "requires": { - "loader-utils": "^1.0.2", + "loader-utils": "^1.2.2", "schema-utils": "^1.0.0" } }, @@ -5317,23 +5313,22 @@ } }, "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "dev": true, "requires": { "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" } }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "requires": { - "locate-path": "^2.0.0" + "locate-path": "^3.0.0" } }, "firebase": { @@ -5397,6 +5392,14 @@ } } }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -5481,12 +5484,11 @@ } }, "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "dev": true, + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", "requires": { - "minipass": "^2.2.1" + "minipass": "^2.6.0" } }, "fs-write-stream-atomic": { @@ -6054,25 +6056,15 @@ } } }, - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "optional": true, "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -6084,16 +6076,6 @@ "wide-align": "^1.1.0" } }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "optional": true, - "requires": { - "globule": "^1.0.0" - } - }, "genfun": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", @@ -6103,21 +6085,15 @@ "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true, - "optional": true + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } }, "get-value": { "version": "2.0.6", @@ -6186,25 +6162,20 @@ "ignore": "^3.3.5", "pify": "^3.0.0", "slash": "^1.0.0" - } - }, - "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", - "dev": true, - "optional": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.10", - "minimatch": "~3.0.2" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" }, "grpc": { "version": "1.20.3", @@ -6664,22 +6635,35 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "dev": true, "requires": { + "minimist": "^1.2.5", "neo-async": "^2.6.0", - "optimist": "^0.6.1", "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" }, "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true } } }, @@ -6699,6 +6683,14 @@ "har-schema": "^2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -6734,15 +6726,17 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, "has-value": { "version": "1.0.0", @@ -6808,9 +6802,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "hpack.js": { @@ -6893,15 +6887,15 @@ } }, "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", "dev": true, "requires": { - "http-proxy": "^1.16.2", + "http-proxy": "^1.17.0", "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" + "lodash": "^4.17.11", + "micromatch": "^3.1.10" } }, "http-signature": { @@ -6973,8 +6967,7 @@ "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, "iferr": { "version": "0.1.5", @@ -6989,10 +6982,9 @@ "dev": true }, "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "dev": true, + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", "requires": { "minimatch": "^3.0.4" } @@ -7019,6 +7011,16 @@ "import-from": "^2.1.0" } }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, "import-from": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", @@ -7036,60 +7038,6 @@ "requires": { "pkg-dir": "^3.0.0", "resolve-cwd": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - } } }, "imurmurhash": { @@ -7098,23 +7046,6 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true, - "optional": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "optional": true, - "requires": { - "repeating": "^2.0.0" - } - }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", @@ -7138,47 +7069,42 @@ "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz", - "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", - "dev": true, + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.4.1.tgz", + "integrity": "sha512-/Jw+qPZx4EDYsaT6uz7F4GJRNFMRdKNeUZw3ZnKV8lyuUgz/YWRCSUAJMZSVhSq4Ec0R2oYnyi6b3d4JXcL5Nw==", "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^3.0.0", + "external-editor": "^3.0.3", "figures": "^2.0.0", - "lodash": "^4.17.10", + "lodash": "^4.17.11", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rxjs": "^6.1.0", + "rxjs": "^6.4.0", "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", + "strip-ansi": "^5.1.0", "through": "^2.3.6" }, "dependencies": { "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -7188,7 +7114,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, "requires": { "ansi-regex": "^3.0.0" } @@ -7199,7 +7124,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, "requires": { "ansi-regex": "^4.1.0" }, @@ -7207,29 +7131,22 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" } } } } }, "internal-ip": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz", - "integrity": "sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", + "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", "dev": true, "requires": { - "default-gateway": "^2.6.0", - "ipaddr.js": "^1.5.2" + "default-gateway": "^4.2.0", + "ipaddr.js": "^1.9.0" } }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true - }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -7245,9 +7162,35 @@ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, "ionicons": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-4.5.6.tgz", - "integrity": "sha512-/F3U/rxdLPGl8eUW5dMouhBBoJuUPrlFO6rkoz4VNuw1lxP6l+bFtsDA8MaVM1dHABp+gIHxtpt+IhwmB3oIfA==" + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-4.6.3.tgz", + "integrity": "sha512-cgP+VIr2cTJpMfFyVHTerq6n2jeoiGboVoe3GlaAo5zoSBDAEXORwUZhv6m+lCyxlsHCS3nqPUE+MKyZU71t8Q==" + }, + "ios-sim": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz", + "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==", + "requires": { + "bplist-parser": "^0.0.6", + "nopt": "1.0.9", + "plist": "^3.0.1", + "simctl": "^2" + }, + "dependencies": { + "bplist-parser": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", + "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=" + }, + "nopt": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", + "integrity": "sha1-O8DXy6e/sNWmdtvtfA6+SKT9RU4=", + "requires": { + "abbrev": "1" + } + } + } }, "ip": { "version": "1.1.5", @@ -7287,6 +7230,11 @@ } } }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -7308,6 +7256,11 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -7328,6 +7281,11 @@ } } }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -7366,13 +7324,10 @@ "dev": true }, "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -7411,6 +7366,11 @@ } } }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" + }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -7435,6 +7395,12 @@ "path-is-inside": "^1.0.1" } }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -7447,26 +7413,33 @@ "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "requires": { + "has": "^1.0.3" + } }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "requires": { + "has-symbols": "^1.0.1" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true, - "optional": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-windows": { "version": "1.0.2", @@ -7477,14 +7450,12 @@ "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isbinaryfile": { "version": "3.0.3", @@ -7498,8 +7469,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", @@ -7795,9 +7765,9 @@ } }, "jasmine-core": { - "version": "2.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", - "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.4.0.tgz", + "integrity": "sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg==", "dev": true }, "jasmine-spec-reporter": { @@ -7818,15 +7788,7 @@ "jmespath": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", - "dev": true - }, - "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", - "dev": true, - "optional": true + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" }, "js-tokens": { "version": "3.0.2", @@ -7862,6 +7824,12 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -7874,6 +7842,11 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "json-stringify-pretty-compact": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz", + "integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==" + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -7881,9 +7854,9 @@ "dev": true }, "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", + "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", "dev": true }, "json5": { @@ -7899,7 +7872,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -8004,24 +7976,24 @@ } }, "karma-jasmine": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.2.tgz", - "integrity": "sha1-OU8rJf+0pkS5rabyLUQ+L9CIhsM=", - "dev": true - }, - "karma-jasmine-html-reporter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", - "integrity": "sha1-SKjl7xiAdhfuK14zwRlMNbQ5Ukw=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-2.0.1.tgz", + "integrity": "sha512-iuC0hmr9b+SNn1DaUD2QEYtUxkS1J+bSJSn7ejdEexs7P8EYvA1CWkEdrDQ+8jVH3AgWlCNwjYsT1chjcNW9lA==", "dev": true, "requires": { - "karma-jasmine": "^1.0.2" + "jasmine-core": "^3.3" } }, + "karma-jasmine-html-reporter": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.5.2.tgz", + "integrity": "sha512-ILBPsXqQ3eomq+oaQsM311/jxsypw5/d0LnZXj26XkfThwq7jZ55A2CFSKJVA5VekbbOGvMyv7d3juZj0SeTxA==", + "dev": true + }, "karma-source-map-support": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.3.0.tgz", - "integrity": "sha512-HcPqdAusNez/ywa+biN4EphGz62MmQyPggUsDfsHqa7tSe4jdsxgvTKuDfIazjL+IOxpVWyT7Pr4dhAV+sxX5Q==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz", + "integrity": "sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==", "dev": true, "requires": { "source-map-support": "^0.5.5" @@ -8074,20 +8046,20 @@ } }, "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz", - "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-5.0.0.tgz", + "integrity": "sha512-bquCU89mO/yWLaUq0Clk7qCsKhsF/TZpJUzETRvJa9KSVEL9SO3ovCvdEHISBhrC81OwC8QSVX7E0bzElZj9cg==", "dev": true, "requires": { "clone": "^2.1.1", "loader-utils": "^1.1.0", - "pify": "^3.0.0" + "pify": "^4.0.1" } }, "license-webpack-plugin": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.1.0.tgz", - "integrity": "sha512-vDiBeMWxjE9n6TabQ9J4FH8urFdsRK0Nvxn1cit9biCiR9aq1zBR0X2BlAkEiIG6qPamLeU0GzvIgLkrFc398A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.1.1.tgz", + "integrity": "sha512-TiarZIg5vkQ2rGdYJn2+5YxO/zqlqjpK5IVglr7OfmrN1sBCakS+PQrsP2uC5gtve1ZDb9WMSUMlmHDQ0FoW4w==", "dev": true, "requires": { "@types/webpack-sources": "^0.1.5", @@ -8103,29 +8075,6 @@ "immediate": "~3.0.5" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "optional": true - } - } - }, "loader-runner": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", @@ -8144,20 +8093,18 @@ } }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "requires": { - "p-locate": "^2.0.0", + "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, "lodash.camelcase": { "version": "4.3.0", @@ -8274,9 +8221,9 @@ } }, "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.7.tgz", + "integrity": "sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==", "dev": true }, "long": { @@ -8293,17 +8240,6 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "optional": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, "lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -8315,21 +8251,22 @@ } }, "magic-string": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", - "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", + "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==", "dev": true, "requires": { "sourcemap-codec": "^1.4.4" } }, "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "^4.0.1", + "semver": "^5.6.0" } }, "make-error": { @@ -8339,17 +8276,17 @@ "dev": true }, "make-fetch-happen": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz", - "integrity": "sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.2.tgz", + "integrity": "sha512-YMJrAjHSb/BordlsDEcVcPyTbiJKkzqMf48N8dAJZT9Zjctrkb6Yg4TY9Sq2AwSIQJFn5qBBKVTYt3vP5FMIHA==", "dev": true, "requires": { "agentkeepalive": "^3.4.1", - "cacache": "^11.0.1", + "cacache": "^11.3.3", "http-cache-semantics": "^3.8.1", "http-proxy-agent": "^2.1.0", "https-proxy-agent": "^2.2.1", - "lru-cache": "^4.1.2", + "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "node-fetch-npm": "^2.0.2", "promise-retry": "^1.1.1", @@ -8357,89 +8294,33 @@ "ssri": "^6.0.0" }, "dependencies": { - "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - } - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" + "yallist": "^3.0.2" } }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, "requires": { "p-defer": "^1.0.0" } @@ -8450,13 +8331,6 @@ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true, - "optional": true - }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", @@ -8487,7 +8361,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", @@ -8504,25 +8377,6 @@ "readable-stream": "^2.0.1" } }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "optional": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -8570,8 +8424,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "optional": true + "dev": true }, "mime-db": { "version": "1.40.0", @@ -8591,16 +8444,21 @@ "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" }, "mini-css-extract-plugin": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz", - "integrity": "sha512-IuaLjruM0vMKhUUT51fQdQzBYTX49dLj8w68ALEAe2A4iYNpIC4eMac67mt3NzycvjOlf07/kYxJDc0RTl1Wqw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.7.0.tgz", + "integrity": "sha512-RQIw6+7utTYn8DBGsf/LpRgZCJMpZt+kuawJ/fju0KiOL6nAaTBNmCJwS7HtwSCXfS47gCkmtBFS7HdsquhdxQ==", "dev": true, "requires": { "loader-utils": "^1.1.0", + "normalize-url": "1.9.1", "schema-utils": "^1.0.0", "webpack-sources": "^1.1.0" } @@ -8628,40 +8486,36 @@ "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", - "dev": true, + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" }, "dependencies": { "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } }, "minizlib": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", - "dev": true, + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", "requires": { - "minipass": "^2.2.1" + "minipass": "^2.9.0" } }, "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", "dev": true, "requires": { "concat-stream": "^1.5.0", @@ -8670,7 +8524,7 @@ "flush-write-stream": "^1.0.0", "from2": "^2.1.0", "parallel-transform": "^1.1.0", - "pump": "^2.0.1", + "pump": "^3.0.0", "pumpify": "^1.3.3", "stream-each": "^1.1.0", "through2": "^2.0.0" @@ -8719,7 +8573,6 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, "requires": { "minimist": "0.0.8" }, @@ -8727,8 +8580,7 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, @@ -8776,8 +8628,7 @@ "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, "nan": { "version": "2.13.2", @@ -8803,6 +8654,36 @@ "to-regex": "^3.0.1" } }, + "needle": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz", + "integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==", + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + } + } + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", @@ -8818,8 +8699,7 @@ "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-fetch": { "version": "1.7.3", @@ -8831,9 +8711,9 @@ } }, "node-fetch-npm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", - "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", + "integrity": "sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==", "dev": true, "requires": { "encoding": "^0.1.11", @@ -8842,45 +8722,15 @@ } }, "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", + "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", "dev": true }, - "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", - "dev": true, - "optional": true, - "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true, - "optional": true - } - } - }, "node-libs-browser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", - "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", "dev": true, "requires": { "assert": "^1.1.1", @@ -8893,7 +8743,7 @@ "events": "^3.0.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", + "path-browserify": "0.0.1", "process": "^0.11.10", "punycode": "^1.2.4", "querystring-es3": "^0.2.0", @@ -8905,7 +8755,7 @@ "tty-browserify": "0.0.0", "url": "^0.11.0", "util": "^0.11.0", - "vm-browserify": "0.0.4" + "vm-browserify": "^1.0.1" }, "dependencies": { "punycode": { @@ -8916,79 +8766,47 @@ } } }, - "node-releases": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.18.tgz", - "integrity": "sha512-/mnVgm6u/8OwlIsoyRXtTI0RfQcxZoAZbdwyXap0EeWwcOpDDymyCHM2/aR9XKmHXrvizHoPAOs0pcbiJ6RUaA==", - "dev": true, + "node-pre-gyp": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", + "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==", "requires": { - "semver": "^5.3.0" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, - "node-sass": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", - "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", + "node-releases": { + "version": "1.1.49", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.49.tgz", + "integrity": "sha512-xH8t0LS0disN0mtRCh+eByxFPie+msJUBL/lJDBuap53QGiYPa9joh83K4pCZgWJ+2L4b9h88vCVdXQ60NO2bg==", "dev": true, - "optional": true, "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash": "^4.17.11", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.13.2", - "node-gyp": "^3.8.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" + "semver": "^6.3.0" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "optional": true + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "optional": true, + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "requires": { - "abbrev": "1" + "abbrev": "1", + "osenv": "^0.1.4" } }, "normalize-package-data": { @@ -9018,11 +8836,30 @@ "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", "dev": true }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, "npm-bundled": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", + "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" }, "npm-package-arg": { "version": "6.1.0", @@ -9037,13 +8874,13 @@ } }, "npm-packlist": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", - "dev": true, + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", "requires": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" } }, "npm-pick-manifest": { @@ -9058,24 +8895,40 @@ } }, "npm-registry-fetch": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.9.0.tgz", - "integrity": "sha512-srwmt8YhNajAoSAaDWndmZgx89lJwIZ1GWxOuckH4Coek4uHv5S+o/l9FLQe/awA+JwTnj4FJHldxhlXdZEBmw==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.9.1.tgz", + "integrity": "sha512-VQCEZlydXw4AwLROAXWUR7QDfe2Y8Id/vpAgp6TI1/H78a4SiQ1kQrKZALm5/zxM5n4HIi+aYb+idUAV/RuY0Q==", "dev": true, "requires": { "JSONStream": "^1.3.4", "bluebird": "^3.5.1", "figgy-pudding": "^3.4.1", - "lru-cache": "^4.1.3", - "make-fetch-happen": "^4.0.1", + "lru-cache": "^5.1.1", + "make-fetch-happen": "^4.0.2", "npm-package-arg": "^6.1.0" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } } }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, "requires": { "path-key": "^2.0.0" } @@ -9084,8 +8937,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "optional": true, "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -9119,8 +8970,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-component": { "version": "0.0.3", @@ -9159,6 +9009,21 @@ } } }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" + }, + "object-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", + "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -9168,6 +9033,27 @@ "isobject": "^3.0.0" } }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -9177,6 +9063,14 @@ "isobject": "^3.0.1" } }, + "objectorarray": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/objectorarray/-/objectorarray-1.0.3.tgz", + "integrity": "sha512-kPoflSYkAf/Onvjr4ZLaq37vDuOXjVzfwLCRuORRzYGdXkHa/vacPT0RgR+KmtkwOYFcxTMM62BRrZk8GGKHjw==", + "requires": { + "tape": "^4.8.0" + } + }, "obuf": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", @@ -9207,15 +9101,14 @@ } }, "onesignal-cordova-plugin": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/onesignal-cordova-plugin/-/onesignal-cordova-plugin-2.7.0.tgz", - "integrity": "sha512-ZkvF9uus+WdX+9Nh2p0OlZ6gUJHqKI88IQz78wW1Dat0kPmQvi8bYFi+MI8LYTkg2IFza6W0IbVVkEw7ye58cw==" + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/onesignal-cordova-plugin/-/onesignal-cordova-plugin-2.8.2.tgz", + "integrity": "sha512-T9SuN9YhCQtEm3rFsg7UFIHA9E4dOQxEpkKQq4ww07lXtRV1zLWFxBfwmrG23hOLlnzgJwGMdIMWIUYp9YExtw==" }, "onetime": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, "requires": { "mimic-fn": "^1.0.0" }, @@ -9223,15 +9116,14 @@ "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" } } }, "open": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/open/-/open-6.0.0.tgz", - "integrity": "sha512-/yb5mVZBz7mHLySMiSj2DcLtMBbFPJk5JBKEkHVZFxZAPzeg3L026O0T+lbdz1B2nyDnkClRSwRQJdeVUIF7zw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", + "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", "dev": true, "requires": { "is-wsl": "^1.1.0" @@ -9241,7 +9133,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "dev": true, "requires": { "is-wsl": "^1.1.0" } @@ -9287,8 +9178,7 @@ "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { "version": "1.4.0", @@ -9301,14 +9191,12 @@ "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "osenv": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -9317,55 +9205,58 @@ "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, "p-is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "requires": { - "p-try": "^1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.0.0" } }, "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true }, + "p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "dev": true, + "requires": { + "retry": "^0.12.0" + } + }, "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "pacote": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz", - "integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.1.tgz", + "integrity": "sha512-Zqvczvf/zZ7QNosdE9uTC7SRuvSs9tFqRkF6cJl+2HH7COBnx4BRAGpeXJlrbN+mM0CMHpbi620xdEHhCflghA==", "dev": true, "requires": { "bluebird": "^3.5.3", @@ -9397,37 +9288,6 @@ "which": "^1.3.1" }, "dependencies": { - "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -9437,62 +9297,10 @@ "yallist": "^3.0.2" } }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", - "dev": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -9504,20 +9312,20 @@ "dev": true }, "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", "dev": true, "requires": { - "cyclist": "~0.2.2", + "cyclist": "^1.0.1", "inherits": "^2.0.3", "readable-stream": "^2.1.5" } }, "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", "dev": true, "requires": { "asn1.js": "^4.0.0", @@ -9529,12 +9337,13 @@ } }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "parse5": { @@ -9574,9 +9383,9 @@ "dev": true }, "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", "dev": true }, "path-dirname": { @@ -9588,8 +9397,7 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", @@ -9605,14 +9413,12 @@ "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-to-regexp": { "version": "0.1.7", @@ -9627,6 +9433,14 @@ "dev": true, "requires": { "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "pbkdf2": { @@ -9648,10 +9462,15 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "phonegap-plugin-mobile-accessibility": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/phonegap-plugin-mobile-accessibility/-/phonegap-plugin-mobile-accessibility-1.0.5.tgz", + "integrity": "sha1-lah1TRJ1CLxuGuJZpTznZYNurAM=" + }, "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pinkie": { @@ -9670,29 +9489,48 @@ } }, "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, "requires": { - "find-up": "^2.1.0" + "find-up": "^3.0.0" + } + }, + "plist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", + "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "requires": { + "base64-js": "^1.2.3", + "xmlbuilder": "^9.0.7", + "xmldom": "0.1.x" } }, "portfinder": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", - "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", + "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", "dev": true, "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.1" }, "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } @@ -9704,9 +9542,9 @@ "dev": true }, "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -9735,12 +9573,12 @@ } }, "postcss-load-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.0.0.tgz", - "integrity": "sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.0.tgz", + "integrity": "sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q==", "dev": true, "requires": { - "cosmiconfig": "^4.0.0", + "cosmiconfig": "^5.0.0", "import-cwd": "^2.0.0" } }, @@ -9762,6 +9600,12 @@ "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", "dev": true }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -9771,8 +9615,12 @@ "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "promise": { "version": "7.3.1", @@ -9803,6 +9651,22 @@ "requires": { "err-code": "^1.0.0", "retry": "^0.10.0" + }, + "dependencies": { + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + } + } + }, + "properties-parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.3.1.tgz", + "integrity": "sha1-ExbpU5/7/ZOEXjabIRAiq9R4dxo=", + "requires": { + "string.prototype.codepointat": "^0.2.0" } }, "protobufjs": { @@ -9970,6 +9834,11 @@ "ipaddr.js": "1.9.0" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -10003,10 +9872,9 @@ } }, "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -10021,6 +9889,18 @@ "duplexify": "^3.6.0", "inherits": "^2.0.3", "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } } }, "punycode": { @@ -10032,8 +9912,7 @@ "q": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", - "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", - "dev": true + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=" }, "qjobs": { "version": "1.2.0", @@ -10047,11 +9926,20 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, "querystring-es3": { "version": "0.2.1", @@ -10065,6 +9953,23 @@ "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", "dev": true }, + "r2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/r2/-/r2-2.0.1.tgz", + "integrity": "sha512-EEmxoxYCe3LHzAUhRIRxdCKERpeRNmlLj6KLUSORqnK6dWl/K5ShmDGZqM2lRZQeqJgF+wyqk0s1M7SWUveNOQ==", + "requires": { + "caseless": "^0.12.0", + "node-fetch": "^2.0.0-alpha.8", + "typedarray-to-buffer": "^3.1.2" + }, + "dependencies": { + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + } + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -10112,6 +10017,17 @@ "schema-utils": "^1.0.0" } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -10129,78 +10045,48 @@ } } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "optional": true, + "read-env": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/read-env/-/read-env-1.3.0.tgz", + "integrity": "sha512-DbCgZ8oHwZreK/E2E27RGk3EUPapMhYGSGIt02k9sX6R3tCFc4u4tkltKvkCvzEQ3SOLUaiYHAnGb+TdsnPp0A==", "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "camelcase": "5.0.0" }, "dependencies": { - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "optional": true + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==" } } }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "read-package-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", + "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", "dev": true, - "optional": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "optional": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "optional": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, + "read-package-tree": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", + "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", + "dev": true, + "requires": { + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "util-promisify": "^2.1.0" } }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -10211,6 +10097,18 @@ "util-deprecate": "~1.0.1" } }, + "readdir-scoped-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -10222,26 +10120,6 @@ "readable-stream": "^2.0.2" } }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "optional": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, "reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -10270,6 +10148,15 @@ "safe-regex": "^1.1.0" } }, + "regexp.prototype.flags": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, "regexpu-core": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", @@ -10362,20 +10249,12 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, "requires-port": { "version": "1.0.0", @@ -10384,10 +10263,9 @@ "dev": true }, "resolve": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", - "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", - "dev": true, + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "requires": { "path-parse": "^1.0.6" } @@ -10417,12 +10295,19 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, "requires": { "onetime": "^2.0.0", "signal-exit": "^3.0.2" } }, + "resumer": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", + "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", + "requires": { + "through": "~2.3.4" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -10430,9 +10315,9 @@ "dev": true }, "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true }, "rfdc": { @@ -10445,7 +10330,6 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -10464,7 +10348,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, "requires": { "is-promise": "^2.1.0" } @@ -10494,8 +10377,7 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", @@ -10511,17 +10393,13 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "sass": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.22.2.tgz", + "integrity": "sha512-enuQuy/CbfrZLA2vOy9tB7CK7pP5bZllnMbr5nPGWCFelwt0EMUVGC11gsv9rybkWc8pp/NKVY/c5+AKyjbnXg==", "dev": true, - "optional": true, "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "chokidar": ">=2.0.0 <4.0.0" } }, "sass-loader": { @@ -10536,6 +10414,14 @@ "neo-async": "^2.5.0", "pify": "^3.0.0", "semver": "^5.5.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "saucelabs": { @@ -10564,29 +10450,6 @@ "ajv-keywords": "^3.1.0" } }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", - "dev": true, - "optional": true, - "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -10617,19 +10480,18 @@ } }, "selfsigned": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz", - "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", + "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", "dev": true, "requires": { - "node-forge": "0.7.5" + "node-forge": "0.9.0" } }, "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" }, "semver-dsl": { "version": "1.0.1", @@ -10678,10 +10540,82 @@ } } }, + "sentry-cordova": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/sentry-cordova/-/sentry-cordova-0.17.0.tgz", + "integrity": "sha512-vBBCjQiauZxw9+fs4njR2F+YuVIhSdWDeUBFCUOtOgTq6SrDq/mZZoFUeZkgq4NITGTcbRcJaDzMP3ezHzeynQ==", + "requires": { + "@sentry/browser": "~5.6.3", + "@sentry/core": "~5.6.2", + "@sentry/minimal": "~5.6.1", + "@sentry/types": "~5.6.1", + "@sentry/utils": "~5.6.1", + "@sentry/wizard": "^1.0.0" + }, + "dependencies": { + "@sentry/browser": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.6.3.tgz", + "integrity": "sha512-bP1LTbcKPOkkmfJOAM6c7WZ0Ov0ZEW6B9keVZ9wH9fw/lBPd9UyDMDCwJ+FAYKz9M9S5pxQeJ4Ebd7WUUrGVAQ==", + "requires": { + "@sentry/core": "5.6.2", + "@sentry/types": "5.6.1", + "@sentry/utils": "5.6.1", + "tslib": "^1.9.3" + } + }, + "@sentry/core": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.6.2.tgz", + "integrity": "sha512-grbjvNmyxP5WSPR6UobN2q+Nss7Hvz+BClBT8QTr7VTEG5q89TwNddn6Ej3bGkaUVbct/GpVlI3XflWYDsnU6Q==", + "requires": { + "@sentry/hub": "5.6.1", + "@sentry/minimal": "5.6.1", + "@sentry/types": "5.6.1", + "@sentry/utils": "5.6.1", + "tslib": "^1.9.3" + } + }, + "@sentry/hub": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.6.1.tgz", + "integrity": "sha512-m+OhkIV5yTAL3R1+XfCwzUQka0UF/xG4py8sEfPXyYIcoOJ2ZTX+1kQJLy8QQJ4RzOBwZA+DzRKP0cgzPJ3+oQ==", + "requires": { + "@sentry/types": "5.6.1", + "@sentry/utils": "5.6.1", + "tslib": "^1.9.3" + } + }, + "@sentry/minimal": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.6.1.tgz", + "integrity": "sha512-ercCKuBWHog6aS6SsJRuKhJwNdJ2oRQVWT2UAx1zqvsbHT9mSa8ZRjdPHYOtqY3DoXKk/pLUFW/fkmAnpdMqRw==", + "requires": { + "@sentry/hub": "5.6.1", + "@sentry/types": "5.6.1", + "tslib": "^1.9.3" + } + }, + "@sentry/types": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.6.1.tgz", + "integrity": "sha512-Kub8TETefHpdhvtnDj3kKfhCj0u/xn3Zi2zIC7PB11NJHvvPXENx97tciz4roJGp7cLRCJsFqCg4tHXniqDSnQ==" + }, + "@sentry/utils": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.6.1.tgz", + "integrity": "sha512-rfgha+UsHW816GqlSRPlniKqAZylOmQWML2JsujoUP03nPu80zdN43DK9Poy/d9OxBxv0gd5K2n+bFdM2kqLQQ==", + "requires": { + "@sentry/types": "5.6.1", + "tslib": "^1.9.3" + } + } + } + }, "serialize-javascript": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", - "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", "dev": true }, "serve-index": { @@ -10714,8 +10648,7 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-immediate-shim": { "version": "1.0.1", @@ -10791,7 +10724,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, "requires": { "shebang-regex": "^1.0.0" } @@ -10799,25 +10731,68 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", + "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "simctl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.0.tgz", + "integrity": "sha512-5rB7rN4N3b0z0nFdy9eczVssXqrv2aAgdVRksPVqVoiDtvXmfzNvebp3EMdId2sAUzXIflarQlx4P0hjVQEzKQ==", + "requires": { + "shelljs": "^0.2.6", + "tail": "^0.4.0" + }, + "dependencies": { + "shelljs": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz", + "integrity": "sha1-kEktcv/MgVmXa6umL7D2iE8MM3g=" + } + } + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + }, + "simple-get": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", + "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", + "requires": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "simple-plist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.1.0.tgz", + "integrity": "sha512-2i5Tc0BYAqppM7jVzmNrI+aEUntPolIq4fDgji6WuNNn1D/qYdn2KwoLhZdzQkE04lu9L5tUoeJsjuJAvd+lFg==", + "requires": { + "bplist-creator": "0.0.8", + "bplist-parser": "0.2.0", + "plist": "^3.0.1" + }, + "dependencies": { + "bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "requires": { + "big-integer": "^1.6.44" + } + } + } }, "slash": { "version": "1.0.0", @@ -10845,9 +10820,9 @@ } }, "smart-buffer": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.2.tgz", - "integrity": "sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", "dev": true }, "snapdragon": { @@ -11101,30 +11076,30 @@ } }, "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", "dev": true, "requires": { "websocket-driver": ">=0.5.1" } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, "socks": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.2.tgz", - "integrity": "sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", + "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", "dev": true, "requires": { - "ip": "^1.1.5", - "smart-buffer": "4.0.2" + "ip": "1.1.5", + "smart-buffer": "^4.1.0" } }, "socks-proxy-agent": { @@ -11137,6 +11112,15 @@ "socks": "~2.3.2" } }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", @@ -11173,9 +11157,9 @@ } }, "source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -11197,15 +11181,15 @@ "dev": true }, "sourcemap-codec": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", - "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -11213,15 +11197,15 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -11229,15 +11213,15 @@ } }, "spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", + "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", "dev": true }, "spdy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.0.tgz", - "integrity": "sha512-ot0oEGT/PGUpzf/6uk4AWLqkq+irlqHXkrdbk51oWONh3bxQmBuljxPNl66zlRRcIJStWq0QkLUCPOPjgjvU0Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", + "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", "dev": true, "requires": { "debug": "^4.1.0", @@ -11257,9 +11241,9 @@ } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } @@ -11288,15 +11272,15 @@ } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -11348,12 +11332,51 @@ } }, "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { - "safe-buffer": "^5.1.1" + "figgy-pudding": "^3.5.1" + } + }, + "stack-generator": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-2.0.5.tgz", + "integrity": "sha512-/t1ebrbHkrLrDuNMdeAcsvynWgoH/i4o8EGGfX7dEYDoTXOYVAkEpFdtshlvabzc6JlJ8Kf9YdFEoz7JkzGN9Q==", + "requires": { + "stackframe": "^1.1.1" + } + }, + "stackframe": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz", + "integrity": "sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==" + }, + "stacktrace-gps": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-3.0.4.tgz", + "integrity": "sha512-qIr8x41yZVSldqdqe6jciXEaSCKw1U8XTXpjDuy0ki/apyTn/r3w9hDAAQOhZdxvsC93H+WwwEu5cq5VemzYeg==", + "requires": { + "source-map": "0.5.6", + "stackframe": "^1.1.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" + } + } + }, + "stacktrace-js": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-2.0.2.tgz", + "integrity": "sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==", + "requires": { + "error-stack-parser": "^2.0.6", + "stack-generator": "^2.0.5", + "stacktrace-gps": "^3.0.4" } }, "static-extend": { @@ -11377,31 +11400,12 @@ } } }, - "stats-webpack-plugin": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/stats-webpack-plugin/-/stats-webpack-plugin-0.7.0.tgz", - "integrity": "sha512-NT0YGhwuQ0EOX+uPhhUcI6/+1Sq/pMzNuSCBVT4GbFl/ac6I/JZefBcjlECNfAb1t3GOx5dEj1Z7x0cAxeeVLQ==", - "dev": true, - "requires": { - "lodash": "^4.17.4" - } - }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", "dev": true }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, "stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", @@ -11412,6 +11416,11 @@ "readable-stream": "^2.0.2" } }, + "stream-buffers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", + "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=" + }, "stream-each": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", @@ -11436,9 +11445,9 @@ } }, "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, "streamroller": { @@ -11471,6 +11480,12 @@ } } }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -11481,11 +11496,43 @@ "strip-ansi": "^3.0.0" } }, + "string.prototype.codepointat": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz", + "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==" + }, + "string.prototype.trim": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.1.tgz", + "integrity": "sha512-MjGFEeqixw47dAMFMtgUro/I0+wNqZB5GKXGt1fFr24u3TzDXCPu7J9Buppzoe3r/LqkSDLDDJzE15RGWDGAVw==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimleft": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "requires": { "safe-buffer": "~5.1.0" } @@ -11498,31 +11545,15 @@ "ansi-regex": "^2.0.0" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "optional": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "optional": true, - "requires": { - "get-stdin": "^4.0.1" - } + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, "style-loader": { "version": "0.23.1", @@ -11599,33 +11630,110 @@ "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", "dev": true }, + "tail": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", + "integrity": "sha1-0p3nJ1DMmdseBTr/E8NZ7PtxMAI=" + }, "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", "dev": true }, + "tape": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.13.0.tgz", + "integrity": "sha512-J/hvA+GJnuWJ0Sj8Z0dmu3JgMNU+MmusvkCT7+SN4/2TklW18FNCp/UuHIEhPZwHfy4sXfKYgC7kypKg4umbOw==", + "requires": { + "deep-equal": "~1.1.1", + "defined": "~1.0.0", + "dotignore": "~0.1.2", + "for-each": "~0.3.3", + "function-bind": "~1.1.1", + "glob": "~7.1.6", + "has": "~1.0.3", + "inherits": "~2.0.4", + "is-regex": "~1.0.5", + "minimist": "~1.2.0", + "object-inspect": "~1.7.0", + "resolve": "~1.14.2", + "resumer": "~0.0.0", + "string.prototype.trim": "~1.2.1", + "through": "~2.3.8" + }, + "dependencies": { + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "resolve": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz", + "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, "tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", - "dev": true, - "optional": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } } }, "terser": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", - "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.3.tgz", + "integrity": "sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==", "dev": true, "requires": { - "commander": "^2.19.0", + "commander": "^2.20.0", "source-map": "~0.6.1", - "source-map-support": "~0.5.10" + "source-map-support": "~0.5.12" }, "dependencies": { "source-map": { @@ -11637,187 +11745,35 @@ } }, "terser-webpack-plugin": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz", - "integrity": "sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz", + "integrity": "sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg==", "dev": true, "requires": { - "cacache": "^11.0.2", + "cacache": "^11.3.2", "find-cache-dir": "^2.0.0", + "is-wsl": "^1.1.0", + "loader-utils": "^1.2.3", "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", + "serialize-javascript": "^1.7.0", "source-map": "^0.6.1", - "terser": "^3.16.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" + "terser": "^4.0.0", + "webpack-sources": "^1.3.0", + "worker-farm": "^1.7.0" }, "dependencies": { - "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true } } }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { "version": "2.0.5", @@ -11830,15 +11786,15 @@ } }, "thunky": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", - "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", "dev": true, "requires": { "setimmediate": "^1.0.4" @@ -11848,7 +11804,6 @@ "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, "requires": { "os-tmpdir": "~1.0.2" } @@ -11913,6 +11868,20 @@ "repeat-string": "^1.6.1" } }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "topojson-client": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz", + "integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==", + "requires": { + "commander": "2" + } + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -11937,40 +11906,26 @@ "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", "dev": true }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true, - "optional": true - }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", + "ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", "dev": true, - "optional": true, "requires": { - "glob": "^7.1.2" - } - }, - "ts-node": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.1.0.tgz", - "integrity": "sha512-34jpuOrxDuf+O6iW1JpgTRDFynUZ1iEqtYruBqh35gICNjN8x+LpVcPAcwzLPi9VU6mdA3ym+x233nZmZp445A==", - "dev": true, - "requires": { - "arg": "^4.1.0", + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", "diff": "^3.1.0", "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", "source-map-support": "^0.5.6", - "yn": "^3.0.0" + "yn": "^2.0.0" } }, "tslib": { @@ -11979,12 +11934,12 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, "tslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz", - "integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz", + "integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "babel-code-frame": "^6.22.0", "builtin-modules": "^1.1.1", "chalk": "^2.3.0", "commander": "^2.12.1", @@ -12049,15 +12004,14 @@ "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, "requires": { "is-typedarray": "^1.0.0" } }, "typescript": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz", - "integrity": "sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==", + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", + "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", "dev": true }, "uglify-js": { @@ -12080,12 +12034,22 @@ } } }, + "uk.co.workingedge.cordova.plugin.sqliteporter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/uk.co.workingedge.cordova.plugin.sqliteporter/-/uk.co.workingedge.cordova.plugin.sqliteporter-1.1.1.tgz", + "integrity": "sha512-VlIZNbZ+RFMZmAc8r2EnR+JPnlIBrvNaer78xh8EPSpgZqPlyVgIFuxnXMsVck84nMAbgQteh4H/4hVK+yc/Lw==" + }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", "dev": true }, + "underscore": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz", + "integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==" + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -12131,19 +12095,89 @@ } }, "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, "requires": { "imurmurhash": "^0.1.4" } }, + "universal-analytics": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/universal-analytics/-/universal-analytics-0.4.23.tgz", + "integrity": "sha512-lgMIH7XBI6OgYn1woDEmxhGdj8yDefMKg7GkWdeATAlQZFrMrNyxSkpDzY57iY0/6fdlzTbBV03OawvvzG+q7A==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "request": "^2.88.2", + "uuid": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unorm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", + "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==" }, "unpipe": { "version": "1.0.0", @@ -12274,8 +12308,16 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util-promisify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz", + "integrity": "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3" + } }, "utils-merge": { "version": "1.0.1", @@ -12286,8 +12328,7 @@ "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "validate-npm-package-license": { "version": "3.0.4", @@ -12314,453 +12355,1092 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, + "vega": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/vega/-/vega-5.17.0.tgz", + "integrity": "sha512-2Rm9aS3cSMXE55YgjfkuOmvSBMtiM/85/qX/WHLc+YiJacKGiwY9yzeC+w2Ft50JUs3nKZc1KB90ePgf5mfo0Q==", + "requires": { + "vega-crossfilter": "~4.0.5", + "vega-dataflow": "~5.7.3", + "vega-encode": "~4.8.3", + "vega-event-selector": "~2.0.6", + "vega-expression": "~3.0.0", + "vega-force": "~4.0.7", + "vega-format": "~1.0.4", + "vega-functions": "~5.8.0", + "vega-geo": "~4.3.7", + "vega-hierarchy": "~4.0.9", + "vega-label": "~1.0.0", + "vega-loader": "~4.4.0", + "vega-parser": "~6.1.0", + "vega-projection": "~1.4.5", + "vega-regression": "~1.0.9", + "vega-runtime": "~6.1.3", + "vega-scale": "~7.1.1", + "vega-scenegraph": "~4.9.2", + "vega-statistics": "~1.7.9", + "vega-time": "~2.0.4", + "vega-transforms": "~4.9.3", + "vega-typings": "~0.19.0", + "vega-util": "~1.16.0", + "vega-view": "~5.9.0", + "vega-view-transforms": "~4.5.8", + "vega-voronoi": "~4.1.5", + "vega-wordcloud": "~4.1.3" + } + }, + "vega-canvas": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/vega-canvas/-/vega-canvas-1.2.6.tgz", + "integrity": "sha512-rgeYUpslYn/amIfnuv3Sw6n4BGns94OjjZNtUc9IDji6b+K8LGS/kW+Lvay8JX/oFqtulBp8RLcHN6QjqPLA9Q==" + }, + "vega-cli": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/vega-cli/-/vega-cli-5.17.0.tgz", + "integrity": "sha512-IMsPOtAnagoKK0czFoVdeVfDsGAKb8fPyDON68kEeWp9Jql71QAninG1ZqdjR2yHQy66szfP7ou9ksIIWyKGJw==", "requires": { - "indexof": "0.0.1" + "canvas": "^2.6.1", + "vega": "5.17.0", + "yargs": "16" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } } }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", - "dev": true - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, + "vega-crossfilter": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/vega-crossfilter/-/vega-crossfilter-4.0.5.tgz", + "integrity": "sha512-yF+iyGP+ZxU7Tcj5yBsMfoUHTCebTALTXIkBNA99RKdaIHp1E690UaGVLZe6xde2n5WaYpho6I/I6wdAW3NXcg==", "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" + "d3-array": "^2.7.1", + "vega-dataflow": "^5.7.3", + "vega-util": "^1.15.2" } }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, + "vega-dataflow": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/vega-dataflow/-/vega-dataflow-5.7.3.tgz", + "integrity": "sha512-2ipzKgQUmbSXcQBH+9XF0BYbXyZrHvjlbJ8ifyRWYQk78w8kMvE6wy/rcdXYK6iVZ6aAbEDDT7jTI+rFt3tGLA==", "requires": { - "minimalistic-assert": "^1.0.0" + "vega-format": "^1.0.4", + "vega-loader": "^4.3.2", + "vega-util": "^1.15.2" } }, - "webdriver-js-extender": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", - "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", - "dev": true, + "vega-encode": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/vega-encode/-/vega-encode-4.8.3.tgz", + "integrity": "sha512-JoRYtaV2Hs8spWLzTu/IjR7J9jqRmuIOEicAaWj6T9NSZrNWQzu2zF3IVsX85WnrIDIRUDaehXaFZvy9uv9RQg==", "requires": { - "@types/selenium-webdriver": "^3.0.0", - "selenium-webdriver": "^3.0.1" + "d3-array": "^2.7.1", + "d3-interpolate": "^2.0.1", + "vega-dataflow": "^5.7.3", + "vega-scale": "^7.0.3", + "vega-util": "^1.15.2" } }, - "webpack": { - "version": "4.29.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.0.tgz", - "integrity": "sha512-pxdGG0keDBtamE1mNvT5zyBdx+7wkh6mh7uzMOo/uRQ/fhsdj5FXkh/j5mapzs060forql1oXqXN9HJGju+y7w==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/wasm-edit": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "^6.0.5", - "acorn-dynamic-import": "^4.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.1.0", - "terser-webpack-plugin": "^1.1.0", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" - }, - "dependencies": { - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - } - } + "vega-event-selector": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/vega-event-selector/-/vega-event-selector-2.0.6.tgz", + "integrity": "sha512-UwCu50Sqd8kNZ1X/XgiAY+QAyQUmGFAwyDu7y0T5fs6/TPQnDo/Bo346NgSgINBEhEKOAMY1Nd/rPOk4UEm/ew==" }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, + "vega-expression": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/vega-expression/-/vega-expression-3.0.0.tgz", + "integrity": "sha512-/ObjIOK94MB+ziTuh8HZt2eWlKUPT/piRJLal5tx5QL1sQbfRi++7lHKTaKMLXLqc4Xqp9/DewE3PqQ6tYzaUA==", "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } + "vega-util": "^1.15.2" } }, - "webpack-dev-middleware": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.5.1.tgz", - "integrity": "sha512-4dwCh/AyMOYAybggUr8fiCkRnjVDp+Cqlr9c+aaNB3GJYgRGYQWJ1YX/WAKUNA9dPNHZ6QSN2lYDKqjKSI8Vqw==", - "dev": true, + "vega-force": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/vega-force/-/vega-force-4.0.7.tgz", + "integrity": "sha512-pyLKdwXSZ9C1dVIqdJOobvBY29rLvZjvRRTla9BU/nMwAiAGlGi6WKUFdRGdneyGe3zo2nSZDTZlZM/Z5VaQNA==", "requires": { - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==", - "dev": true - } + "d3-force": "^2.1.1", + "vega-dataflow": "^5.7.3", + "vega-util": "^1.15.2" } }, - "webpack-dev-server": { - "version": "3.1.14", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz", - "integrity": "sha512-mGXDgz5SlTxcF3hUpfC8hrQ11yhAttuUQWf1Wmb+6zo3x6rb7b9mIfuQvAPLdfDRCGRGvakBWHdHOa0I9p/EVQ==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", - "import-local": "^2.0.0", - "internal-ip": "^3.0.1", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "schema-utils": "^1.0.0", - "selfsigned": "^1.9.1", - "semver": "^5.6.0", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^4.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "3.4.0", - "webpack-log": "^2.0.0", - "yargs": "12.0.2" + "vega-format": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vega-format/-/vega-format-1.0.4.tgz", + "integrity": "sha512-oTAeub3KWm6nKhXoYCx1q9G3K43R6/pDMXvqDlTSUtjoY7b/Gixm8iLcir5S9bPjvH40n4AcbZsPmNfL/Up77A==", + "requires": { + "d3-array": "^2.7.1", + "d3-format": "^2.0.0", + "d3-time-format": "^3.0.0", + "vega-time": "^2.0.3", + "vega-util": "^1.15.2" + } + }, + "vega-functions": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/vega-functions/-/vega-functions-5.8.0.tgz", + "integrity": "sha512-xaUqWZHEX+EuJuKfN0Biux3rrCHDEHmMbW7LHYyyEqguR0i6+zhtOSUEWmYqDfzB/+BlIwCk5Vif6q6/mzJxbQ==", + "requires": { + "d3-array": "^2.7.1", + "d3-color": "^2.0.0", + "d3-geo": "^2.0.1", + "vega-dataflow": "^5.7.3", + "vega-expression": "^3.0.0", + "vega-scale": "^7.1.1", + "vega-scenegraph": "^4.9.2", + "vega-selections": "^5.1.4", + "vega-statistics": "^1.7.9", + "vega-time": "^2.0.4", + "vega-util": "^1.15.2" + } + }, + "vega-geo": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/vega-geo/-/vega-geo-4.3.7.tgz", + "integrity": "sha512-5HC1D9Z/WYuM1Gmlk8PxuRKgeN8snNWsfKO4E9PTmR7wo7tuU/2SGlRoE27aTsgwMMpBIrpRbSgKtgh5l/fMUQ==", + "requires": { + "d3-array": "^2.7.1", + "d3-color": "^2.0.0", + "d3-geo": "^2.0.1", + "vega-canvas": "^1.2.5", + "vega-dataflow": "^5.7.3", + "vega-projection": "^1.4.5", + "vega-statistics": "^1.7.9", + "vega-util": "^1.15.2" + } + }, + "vega-hierarchy": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/vega-hierarchy/-/vega-hierarchy-4.0.9.tgz", + "integrity": "sha512-4XaWK6V38/QOZ+vllKKTafiwL25m8Kd+ebHmDV+Q236ONHmqc/gv82wwn9nBeXPEfPv4FyJw2SRoqa2Jol6fug==", + "requires": { + "d3-hierarchy": "^2.0.0", + "vega-dataflow": "^5.7.3", + "vega-util": "^1.15.2" + } + }, + "vega-label": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vega-label/-/vega-label-1.0.0.tgz", + "integrity": "sha512-hCdm2pcHgkKgxnzW9GvX5JmYNiUMlOXOibtMmBzvFBQHX3NiV9giQ5nsPiQiFbV08VxEPtM+VYXr2HyrIcq5zQ==", + "requires": { + "vega-canvas": "^1.2.5", + "vega-dataflow": "^5.7.3", + "vega-scenegraph": "^4.9.2", + "vega-util": "^1.15.2" + } + }, + "vega-lite": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/vega-lite/-/vega-lite-4.17.0.tgz", + "integrity": "sha512-MO2XsaVZqx6iWWmVA5vwYFamvhRUsKfVp7n0pNlkZ2/21cuxelSl92EePZ2YGmzL6z4/3K7r/45zaG8p+qNHeg==", + "requires": { + "@types/clone": "~2.1.0", + "@types/fast-json-stable-stringify": "^2.0.0", + "array-flat-polyfill": "^1.0.1", + "clone": "~2.1.2", + "fast-deep-equal": "~3.1.3", + "fast-json-stable-stringify": "~2.1.0", + "json-stringify-pretty-compact": "~2.0.0", + "tslib": "~2.0.3", + "vega-event-selector": "~2.0.6", + "vega-expression": "~3.0.0", + "vega-util": "~1.16.0", + "yargs": "~16.0.3" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.3.tgz", + "integrity": "sha512-Gj3QHTkVMPKqwP3f7B4KPkBZRMR9r4rfi5bXFpg1a+Svvj8l7q5CnkBkVQzfxT5DFSsGk2+PascOgL0JYkL2kw==", "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "color-name": "~1.1.4" } }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "requires": { - "ms": "^2.1.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + }, + "yargs": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.0.3.tgz", + "integrity": "sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==", + "requires": { + "cliui": "^7.0.0", + "escalade": "^3.0.2", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.1", + "yargs-parser": "^20.0.0" + } + }, + "yargs-parser": { + "version": "20.2.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.3.tgz", + "integrity": "sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww==" + } + } + }, + "vega-loader": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/vega-loader/-/vega-loader-4.4.0.tgz", + "integrity": "sha512-e5enQECdau7rJob0NFB5pGumh3RaaSWWm90+boxMy3ay2b4Ki/3XIvo+C4F1Lx04qSxvQF7tO2LJcklRm6nqRA==", + "requires": { + "d3-dsv": "^2.0.0", + "node-fetch": "^2.6.1", + "topojson-client": "^3.1.0", + "vega-format": "^1.0.4", + "vega-util": "^1.16.0" + }, + "dependencies": { + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + } + } + }, + "vega-parser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/vega-parser/-/vega-parser-6.1.0.tgz", + "integrity": "sha512-u14bHXV8vtcuMIJkMNoDAJ4Xu3lwKIkep+YEkPumWvlwl3fClWy26EAcwTneeM3rXu2F6ZJI6W3ddu/If8u13w==", + "requires": { + "vega-dataflow": "^5.7.3", + "vega-event-selector": "^2.0.6", + "vega-functions": "^5.8.0", + "vega-scale": "^7.1.1", + "vega-util": "^1.15.2" + } + }, + "vega-projection": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/vega-projection/-/vega-projection-1.4.5.tgz", + "integrity": "sha512-85kWcPv0zrrNfxescqHtSYpRknilrS0K3CVRZc7IYQxnLtL1oma9WEbrSr1LCmDoCP5hl2Z1kKbomPXkrQX5Ag==", + "requires": { + "d3-geo": "^2.0.1", + "d3-geo-projection": "^3.0.0" + } + }, + "vega-regression": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/vega-regression/-/vega-regression-1.0.9.tgz", + "integrity": "sha512-KSr3QbCF0vJEAWFVY2MA9X786oiJncTTr3gqRMPoaLr/Yo3f7OPKXRoUcw36RiWa0WCOEMgTYtM28iK6ZuSgaA==", + "requires": { + "d3-array": "^2.7.1", + "vega-dataflow": "^5.7.3", + "vega-statistics": "^1.7.9", + "vega-util": "^1.15.2" + } + }, + "vega-runtime": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/vega-runtime/-/vega-runtime-6.1.3.tgz", + "integrity": "sha512-gE+sO2IfxMUpV0RkFeQVnHdmPy3K7LjHakISZgUGsDI/ZFs9y+HhBf8KTGSL5pcZPtQsZh3GBQ0UonqL1mp9PA==", + "requires": { + "vega-dataflow": "^5.7.3", + "vega-util": "^1.15.2" + } + }, + "vega-scale": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/vega-scale/-/vega-scale-7.1.1.tgz", + "integrity": "sha512-yE0to0prA9E5PBJ/XP77TO0BMkzyUVyt7TH5PAwj+CZT7PMsMO6ozihelRhoIiVcP0Ae/ByCEQBUQkzN5zJ0ZA==", + "requires": { + "d3-array": "^2.7.1", + "d3-interpolate": "^2.0.1", + "d3-scale": "^3.2.2", + "vega-time": "^2.0.4", + "vega-util": "^1.15.2" + } + }, + "vega-scenegraph": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/vega-scenegraph/-/vega-scenegraph-4.9.2.tgz", + "integrity": "sha512-epm1CxcB8AucXQlSDeFnmzy0FCj+HV2k9R6ch2lfLRln5lPLEfgJWgFcFhVf5jyheY0FSeHH52Q5zQn1vYI1Ow==", + "requires": { + "d3-path": "^2.0.0", + "d3-shape": "^2.0.0", + "vega-canvas": "^1.2.5", + "vega-loader": "^4.3.3", + "vega-scale": "^7.1.1", + "vega-util": "^1.15.2" + } + }, + "vega-selections": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/vega-selections/-/vega-selections-5.1.4.tgz", + "integrity": "sha512-L7CHwcIjVf90GoW2tS2x5O496O5Joaerp5A1KM6VJ1uo4z6KfqxY6M/328a/uaAs0LC5qbQgXT3htFbtUrPW/A==", + "requires": { + "vega-expression": "^3.0.0", + "vega-util": "^1.15.2" + } + }, + "vega-statistics": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/vega-statistics/-/vega-statistics-1.7.9.tgz", + "integrity": "sha512-T0sd2Z08k/mHxr1Vb4ajLWytPluLFYnsYqyk4SIS5czzUs4errpP2gUu63QJ0B7CKNu33vnS9WdOMOo/Eprr/Q==", + "requires": { + "d3-array": "^2.7.1" + } + }, + "vega-time": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vega-time/-/vega-time-2.0.4.tgz", + "integrity": "sha512-U314UDR9+ZlWrD3KBaeH+j/c2WSMdvcZq5yJfFT0yTg1jsBKAQBYFGvl+orackD8Zx3FveHOxx3XAObaQeDX+Q==", + "requires": { + "d3-array": "^2.7.1", + "d3-time": "^2.0.0", + "vega-util": "^1.15.2" + } + }, + "vega-transforms": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/vega-transforms/-/vega-transforms-4.9.3.tgz", + "integrity": "sha512-PdqQd5oPlRyD405M2w+Sz9Bo+i7Rwi8o03SVK7RaeQsJC2FffKGJ6acIaSEgOq+yD1Q2k/1SePmCXcmLUlIiEA==", + "requires": { + "d3-array": "^2.7.1", + "vega-dataflow": "^5.7.3", + "vega-statistics": "^1.7.9", + "vega-time": "^2.0.4", + "vega-util": "^1.15.2" + } + }, + "vega-typings": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/vega-typings/-/vega-typings-0.19.1.tgz", + "integrity": "sha512-OSyNYwMJ8FayTTNU/gohprbt1EFQBpoiMPP9p2vqo1O9z45XVnotQ92jYHAhraI6gWiMIIfo4OjPbSe/GX7etg==", + "requires": { + "vega-util": "^1.15.2" + } + }, + "vega-util": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/vega-util/-/vega-util-1.16.0.tgz", + "integrity": "sha512-6mmz6mI+oU4zDMeKjgvE2Fjz0Oh6zo6WGATcvCfxH2gXBzhBHmy5d25uW5Zjnkc6QBXSWPLV9Xa6SiqMsrsKog==" + }, + "vega-view": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/vega-view/-/vega-view-5.9.0.tgz", + "integrity": "sha512-HqRFuqO2OwoPHHK+CVt8vB8fu2L8GjQerLpmEpglWtCPDns5+gn5B6F7M8Ah8v24WlfqW7cLrY81t9OloPZOyw==", + "requires": { + "d3-array": "^2.7.1", + "d3-timer": "^2.0.0", + "vega-dataflow": "^5.7.3", + "vega-format": "^1.0.4", + "vega-functions": "^5.8.0", + "vega-runtime": "^6.1.3", + "vega-scenegraph": "^4.9.2", + "vega-util": "^1.15.2" + } + }, + "vega-view-transforms": { + "version": "4.5.8", + "resolved": "https://registry.npmjs.org/vega-view-transforms/-/vega-view-transforms-4.5.8.tgz", + "integrity": "sha512-966m7zbzvItBL8rwmF2nKG14rBp7q+3sLCKWeMSUrxoG+M15Smg5gWEGgwTG3A/RwzrZ7rDX5M1sRaAngRH25g==", + "requires": { + "vega-dataflow": "^5.7.3", + "vega-scenegraph": "^4.9.2", + "vega-util": "^1.15.2" + } + }, + "vega-voronoi": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/vega-voronoi/-/vega-voronoi-4.1.5.tgz", + "integrity": "sha512-950IkgCFLj0zG33EWLAm1hZcp+FMqWcNQliMYt+MJzOD5S4MSpZpZ7K4wp2M1Jktjw/CLKFL9n38JCI0i3UonA==", + "requires": { + "d3-delaunay": "^5.3.0", + "vega-dataflow": "^5.7.3", + "vega-util": "^1.15.2" + } + }, + "vega-wordcloud": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vega-wordcloud/-/vega-wordcloud-4.1.3.tgz", + "integrity": "sha512-is4zYn9FMAyp9T4SAcz2P/U/wqc0Lx3P5YtpWKCbOH02a05vHjUQrQ2TTPOuvmMfAEDCSKvbMSQIJMOE018lJA==", + "requires": { + "vega-canvas": "^1.2.5", + "vega-dataflow": "^5.7.3", + "vega-scale": "^7.1.1", + "vega-statistics": "^1.7.9", + "vega-util": "^1.15.2" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "dev": true + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "webdriver-js-extender": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", + "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", + "dev": true, + "requires": { + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" + } + }, + "webpack": { + "version": "4.35.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.35.2.tgz", + "integrity": "sha512-TZAmorNymV4q66gAM/h90cEjG+N3627Q2MnkSgKlX/z3DlNVKUtqy57lz1WmZU2+FUZwzM+qm7cGaO95PyrX5A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/wasm-edit": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.0", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^1.0.0", + "tapable": "^1.1.0", + "terser-webpack-plugin": "^1.1.0", + "watchpack": "^1.5.0", + "webpack-sources": "^1.3.0" + } + }, + "webpack-core": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", + "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", + "dev": true, + "requires": { + "source-list-map": "~0.1.7", + "source-map": "~0.4.1" + }, + "dependencies": { + "source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "xregexp": "4.0.0" + "amdefine": ">=0.0.4" } + } + } + }, + "webpack-dev-middleware": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.0.tgz", + "integrity": "sha512-qvDesR1QZRIAZHOE3iQ4CXLZZSQ1lAUsSpnQmlB1PBfoN/xdRjmge3Dok0W4IdaVLJOGJy3sGI4sZHwjRU0PCA==", + "dev": true, + "requires": { + "memory-fs": "^0.4.1", + "mime": "^2.4.2", + "range-parser": "^1.2.1", + "webpack-log": "^2.0.0" + }, + "dependencies": { + "mime": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "dev": true }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + } + } + }, + "webpack-dev-server": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.7.2.tgz", + "integrity": "sha512-mjWtrKJW2T9SsjJ4/dxDC2fkFVUw8jlpemDERqV0ZJIkjjjamR2AbQlr3oz+j4JLhYCHImHnXZK5H06P2wvUew==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "bonjour": "^3.5.0", + "chokidar": "^2.1.6", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.2.1", + "http-proxy-middleware": "^0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "killable": "^1.0.1", + "loglevel": "^1.6.3", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.20", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.4", + "semver": "^6.1.1", + "serve-index": "^1.9.1", + "sockjs": "0.3.19", + "sockjs-client": "1.3.0", + "spdy": "^4.0.0", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.0", + "webpack-log": "^2.0.0", + "yargs": "12.0.5" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" } }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", "dev": true, "requires": { - "pump": "^3.0.0" + "safe-buffer": "5.1.2" } }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "invert-kv": "^2.0.0" + "ms": "^2.1.1" } }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, - "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "dev": true, "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "dev": true, "requires": { - "p-try": "^2.0.0" + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" } }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "safer-buffer": ">= 2.1.2 < 3" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "pump": { + "normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", "dev": true, "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" }, "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "webpack-dev-middleware": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz", - "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==", + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", "dev": true, "requires": { - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", "dev": true }, - "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^2.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true } } }, @@ -12839,24 +13519,19 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, "requires": { "isexe": "^2.0.0" } }, "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true, - "optional": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "optional": true, "requires": { "string-width": "^1.0.2 || 2" } @@ -12881,6 +13556,15 @@ "errno": "~0.1.7" } }, + "worker-plugin": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/worker-plugin/-/worker-plugin-3.1.0.tgz", + "integrity": "sha512-iQ9KTTmmN5fhfc2KMR7CcDblvcrg1QQ4pXymqZ3cRZF8L0890YLBcEqlIsGPdxoFwghyN8RA1pCEhCKuTF4Lkw==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0" + } + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -12908,19 +13592,29 @@ } }, "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "dev": true, + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.1.tgz", + "integrity": "sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A==", + "dev": true + }, + "xcode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/xcode/-/xcode-2.1.0.tgz", + "integrity": "sha512-uCrmPITrqTEzhn0TtT57fJaNaw8YJs1aCzs+P/QqxsDbvPZSv7XMPPwXrKvHtD6pLjBM/NaVwraWJm8q83Y4iQ==", "requires": { - "async-limiter": "~1.0.0" + "simple-plist": "^1.0.0", + "uuid": "^3.3.2" } }, + "xml-escape": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", + "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ=" + }, "xml2js": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "dev": true, "requires": { "sax": ">=0.6.0", "xmlbuilder": "~9.0.1" @@ -12929,16 +13623,19 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" } } }, "xmlbuilder": { "version": "9.0.7", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, + "xmldom": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", + "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" }, "xmlhttprequest": { "version": "1.8.0", @@ -12951,23 +13648,16 @@ "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", "dev": true }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", - "dev": true - }, "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yallist": { "version": "2.1.2", @@ -12976,59 +13666,99 @@ "dev": true }, "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "optional": true, + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" }, "dependencies": { - "camelcase": { + "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true, - "optional": true + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true, - "optional": true + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } } } }, "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "optional": true, + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "requires": { - "camelcase": "^3.0.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" }, "dependencies": { "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true, - "optional": true + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" } } }, @@ -13039,15 +13769,15 @@ "dev": true }, "yn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", - "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", "dev": true }, "zone.js": { - "version": "0.8.29", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.29.tgz", - "integrity": "sha512-mla2acNCMkWXBD+c+yeUrBUrzOxYMNFdQ6FGfigGGtEVBPJx07BQeJekjt9DmH1FtZek4E9rE1eRR9qQpxACOQ==" + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.9.1.tgz", + "integrity": "sha512-GkPiJL8jifSrKReKaTZ5jkhrMEgXbXYC+IPo1iquBjayRa0q86w3Dipjn8b415jpitMExe9lV8iTsv8tk3DGag==" } } } diff --git a/package.json b/package.json index f23a40572..b59d22f51 100644 --- a/package.json +++ b/package.json @@ -13,93 +13,120 @@ }, "private": true, "dependencies": { - "@angular/common": "^7.2.2", - "@angular/core": "^7.2.2", - "@angular/fire": "^5.2.1", - "@angular/forms": "^7.2.2", + "@angular/common": "~8.1.2", + "@angular/core": "~8.1.2", + "@angular/fire": "^5.3.0", + "@angular/forms": "~8.1.2", "@angular/http": "^7.2.2", - "@angular/platform-browser": "^7.2.2", - "@angular/platform-browser-dynamic": "^7.2.2", - "@angular/router": "^7.2.2", + "@angular/platform-browser": "~8.1.2", + "@angular/platform-browser-dynamic": "~8.1.2", + "@angular/router": "~8.1.2", + "@ionic-native/app-version": "^5.21.5", "@ionic-native/core": "^5.0.0", - "@ionic-native/file": "^5.6.1", - "@ionic-native/google-analytics": "^5.16.0", - "@ionic-native/onesignal": "^5.12.0", + "@ionic-native/in-app-browser": "^5.29.0", + "@ionic-native/mobile-accessibility": "^5.26.0", + "@ionic-native/network": "^5.21.6", + "@ionic-native/onesignal": "^5.19.1", "@ionic-native/splash-screen": "^5.0.0", + "@ionic-native/sqlite": "^5.24.0", + "@ionic-native/sqlite-porter": "^5.24.0", "@ionic-native/status-bar": "^5.17.0", - "@ionic/angular": "^4.1.0", + "@ionic/angular": "^4.7.1", + "@ngrx/effects": "^9.1.1", + "@ngrx/schematics": "^9.1.0", "@ngrx/store": "^8.5.2", + "@ngrx/store-devtools": "^8.5.2", + "@sentry/browser": "^5.17.0", + "@sentry/wizard": "^1.1.4", "@types/crypto-js": "^3.1.43", "angular-azure-blob-service": "^1.1.0", "angularfire2": "^5.1.3", - "chart.js": "^2.8.0", - "cordova-android": "7.1.4", + "aws-sdk": "^2.608.0", + "canvas": "^2.6.1", + "canvas-confetti": "^1.1.2", + "chart.js": "^2.9.3", + "cordova-android": "^8.1.0", + "cordova-ios": "^5.1.1", + "cordova-plugin-app-version": "^0.1.9", "cordova-plugin-device": "^2.0.2", - "cordova-plugin-file": "6.0.1", - "cordova-plugin-google-analytics": "^1.8.6", - "cordova-plugin-ionic-keyboard": "^2.1.3", - "cordova-plugin-ionic-webview": "^4.0.1", + "cordova-plugin-file": "^6.0.2", + "cordova-plugin-ionic-keyboard": "^2.2.0", + "cordova-plugin-ionic-webview": "^4.2.1", + "cordova-plugin-network-information": "git+https://github.com/apache/cordova-plugin-network-information.git", "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", - "cordova-plugin-whitelist": "^1.3.3", + "cordova-plugin-whitelist": "^1.3.4", + "cordova-sqlite-storage": "^4.0.0", "core-js": "^2.5.4", + "core-util-is": "^1.0.2", "crypto-js": "^3.1.9-1", - "d3": "^5.9.2", "firebase": "^6.1.0", "moment": "^2.24.0", - "onesignal-cordova-plugin": "^2.6.0", + "onesignal-cordova-plugin": "^2.8.2", + "phonegap-plugin-mobile-accessibility": "^1.0.5", "rxjs": "~6.5.1", + "sentry-cordova": "^0.17.0", + "stacktrace-js": "^2.0.2", "tslib": "^1.9.0", - "zone.js": "~0.8.29" + "uk.co.workingedge.cordova.plugin.sqliteporter": "^1.1.1", + "vega-cli": "^5.17.0", + "vega-lite": "^4.17.0", + "zone.js": "~0.9.1" }, "devDependencies": { - "@angular-devkit/architect": "~0.13.8", - "@angular-devkit/build-angular": "~0.13.8", - "@angular-devkit/core": "~7.3.8", - "@angular-devkit/schematics": "~7.3.8", - "@angular/cli": "~7.3.8", - "@angular/compiler": "~7.2.2", - "@angular/compiler-cli": "~7.2.2", - "@angular/language-service": "~7.2.2", - "@ionic/angular-toolkit": "~1.5.1", + "@angular-devkit/architect": "~0.801.2", + "@angular-devkit/build-angular": "~0.801.2", + "@angular-devkit/core": "~8.1.2", + "@angular-devkit/schematics": "~8.1.2", + "@angular/cli": "8.1.3", + "@angular/compiler": "~8.1.2", + "@angular/compiler-cli": "~8.1.2", + "@angular/language-service": "~8.1.2", + "@ionic/angular-toolkit": "^2.1.1", "@ionic/lab": "2.0.15", - "@types/d3": "5.7.2", - "@types/jasmine": "~2.8.8", + "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", - "@types/node": "^12.0.10", - "aws-sdk": "^2.480.0", + "@types/node": "^8.9.5", "codelyzer": "~4.5.0", - "jasmine-core": "~2.99.1", + "jasmine-core": "~3.4.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", - "karma-jasmine": "~1.1.2", - "karma-jasmine-html-reporter": "^0.2.2", + "karma-jasmine": "~2.0.1", + "karma-jasmine-html-reporter": "^1.4.0", "protractor": "~5.4.0", - "ts-node": "~8.1.0", - "tslint": "~5.16.0", - "typescript": "~3.1.6" + "ts-node": "~7.0.0", + "tslint": "~5.15.0", + "typescript": "~3.4.3" }, "description": "An Ionic project", + "config": { + "ionic_generate_source_map": "true" + }, "cordova": { "plugins": { "cordova-plugin-whitelist": {}, "cordova-plugin-statusbar": {}, "cordova-plugin-device": {}, "cordova-plugin-splashscreen": {}, + "cordova-plugin-ionic-keyboard": {}, + "onesignal-cordova-plugin": {}, + "cordova-plugin-app-version": {}, + "cordova-sqlite-storage": {}, + "uk.co.workingedge.cordova.plugin.sqliteporter": {}, + "cordova-plugin-network-information": {}, "cordova-plugin-ionic-webview": { "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" }, - "cordova-plugin-ionic-keyboard": {}, - "cordova-plugin-file": {}, - "onesignal-cordova-plugin": {}, - "cordova-plugin-google-analytics": { - "GMS_VERSION": "11.0.1" - } + "sentry-cordova": { + "SENTRY_ANDROID_SDK_VERSION": "1+" + }, + "phonegap-plugin-mobile-accessibility": {} }, "platforms": [ - "android" + "android", + "ios" ] } -} +} \ No newline at end of file diff --git a/platforms/android/app/src/main/AndroidManifest.xml b/platforms/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..fc59fa917 --- /dev/null +++ b/platforms/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/platforms/android/app/src/main/res/xml/config.xml b/platforms/android/app/src/main/res/xml/config.xml new file mode 100644 index 000000000..ae4b3ffe2 --- /dev/null +++ b/platforms/android/app/src/main/res/xml/config.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SARA + An awesome Ionic/Cordova app. + Ionic Framework Team + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/platforms/ios/SARA.xcworkspace/xcuserdata/mash2.xcuserdatad/UserInterfaceState.xcuserstate b/platforms/ios/SARA.xcworkspace/xcuserdata/mash2.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 000000000..8543110e6 Binary files /dev/null and b/platforms/ios/SARA.xcworkspace/xcuserdata/mash2.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/platforms/ios/SARA/SARA-Info.plist b/platforms/ios/SARA/SARA-Info.plist new file mode 100644 index 000000000..53d670b35 --- /dev/null +++ b/platforms/ios/SARA/SARA-Info.plist @@ -0,0 +1,74 @@ + + + + + CFBundleDevelopmentRegion + en_US + CFBundleDisplayName + SARA + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSExceptionDomains + + cnn.com/* + + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSMainNibFile + + NSMainNibFile~ipad + + UIBackgroundModes + + remote-notification + + UIInterfaceOrientation + + UIInterfaceOrientationPortrait + + UILaunchStoryboardName + CDVLaunchScreen + UIRequiresFullScreen + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + + diff --git a/platforms/ios/SARA/config.xml b/platforms/ios/SARA/config.xml new file mode 100755 index 000000000..3c835f25a --- /dev/null +++ b/platforms/ios/SARA/config.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SARA + An awesome Ionic/Cordova app. + Ionic Framework Team + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/platforms/ios/www/main.js b/platforms/ios/www/main.js new file mode 100644 index 000000000..02518bdb0 --- /dev/null +++ b/platforms/ios/www/main.js @@ -0,0 +1,22281 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{ + +/***/ "./node_modules/@ionic/core/dist/esm-es5 lazy recursive ^\\.\\/.*\\.entry\\.js$ include: \\.entry\\.js$ exclude: \\.system\\.entry\\.js$": +/*!*********************************************************************************************************************************************!*\ + !*** ./node_modules/@ionic/core/dist/esm-es5 lazy ^\.\/.*\.entry\.js$ include: \.entry\.js$ exclude: \.system\.entry\.js$ namespace object ***! + \*********************************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var map = { + "./ion-action-sheet-controller_8.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-action-sheet-controller_8.entry.js", + "common", + 2 + ], + "./ion-action-sheet-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-action-sheet-ios.entry.js", + "common", + 3 + ], + "./ion-action-sheet-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-action-sheet-md.entry.js", + "common", + 4 + ], + "./ion-alert-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-alert-ios.entry.js", + "common", + 5 + ], + "./ion-alert-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-alert-md.entry.js", + "common", + 6 + ], + "./ion-app_8-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-app_8-ios.entry.js", + 0, + "common", + 7 + ], + "./ion-app_8-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-app_8-md.entry.js", + 0, + "common", + 8 + ], + "./ion-avatar_3-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-avatar_3-ios.entry.js", + "common", + 9 + ], + "./ion-avatar_3-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-avatar_3-md.entry.js", + "common", + 10 + ], + "./ion-back-button-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-back-button-ios.entry.js", + "common", + 11 + ], + "./ion-back-button-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-back-button-md.entry.js", + "common", + 12 + ], + "./ion-backdrop-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-backdrop-ios.entry.js", + 13 + ], + "./ion-backdrop-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-backdrop-md.entry.js", + 14 + ], + "./ion-button_2-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-button_2-ios.entry.js", + "common", + 15 + ], + "./ion-button_2-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-button_2-md.entry.js", + "common", + 16 + ], + "./ion-card_5-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-card_5-ios.entry.js", + "common", + 17 + ], + "./ion-card_5-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-card_5-md.entry.js", + "common", + 18 + ], + "./ion-checkbox-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-checkbox-ios.entry.js", + "common", + 19 + ], + "./ion-checkbox-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-checkbox-md.entry.js", + "common", + 20 + ], + "./ion-chip-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-chip-ios.entry.js", + "common", + 21 + ], + "./ion-chip-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-chip-md.entry.js", + "common", + 22 + ], + "./ion-col_3.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-col_3.entry.js", + 23 + ], + "./ion-datetime_3-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-datetime_3-ios.entry.js", + "common", + 24 + ], + "./ion-datetime_3-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-datetime_3-md.entry.js", + "common", + 25 + ], + "./ion-fab_3-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-fab_3-ios.entry.js", + "common", + 26 + ], + "./ion-fab_3-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-fab_3-md.entry.js", + "common", + 27 + ], + "./ion-img.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-img.entry.js", + 28 + ], + "./ion-infinite-scroll_2-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-infinite-scroll_2-ios.entry.js", + "common", + 29 + ], + "./ion-infinite-scroll_2-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-infinite-scroll_2-md.entry.js", + "common", + 30 + ], + "./ion-input-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-input-ios.entry.js", + "common", + 31 + ], + "./ion-input-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-input-md.entry.js", + "common", + 32 + ], + "./ion-item-option_3-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-item-option_3-ios.entry.js", + "common", + 33 + ], + "./ion-item-option_3-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-item-option_3-md.entry.js", + "common", + 34 + ], + "./ion-item_8-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-item_8-ios.entry.js", + "common", + 35 + ], + "./ion-item_8-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-item_8-md.entry.js", + "common", + 36 + ], + "./ion-loading-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-loading-ios.entry.js", + "common", + 37 + ], + "./ion-loading-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-loading-md.entry.js", + "common", + 38 + ], + "./ion-menu_4-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-menu_4-ios.entry.js", + "common", + 39 + ], + "./ion-menu_4-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-menu_4-md.entry.js", + "common", + 40 + ], + "./ion-modal-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-modal-ios.entry.js", + 0, + "common", + 41 + ], + "./ion-modal-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-modal-md.entry.js", + 0, + "common", + 42 + ], + "./ion-nav_5.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-nav_5.entry.js", + 0, + "common", + 43 + ], + "./ion-popover-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-popover-ios.entry.js", + 0, + "common", + 44 + ], + "./ion-popover-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-popover-md.entry.js", + 0, + "common", + 45 + ], + "./ion-progress-bar-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-progress-bar-ios.entry.js", + "common", + 46 + ], + "./ion-progress-bar-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-progress-bar-md.entry.js", + "common", + 47 + ], + "./ion-radio_2-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-radio_2-ios.entry.js", + "common", + 48 + ], + "./ion-radio_2-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-radio_2-md.entry.js", + "common", + 49 + ], + "./ion-range-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-range-ios.entry.js", + "common", + 50 + ], + "./ion-range-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-range-md.entry.js", + "common", + 51 + ], + "./ion-refresher_2-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-refresher_2-ios.entry.js", + "common", + 52 + ], + "./ion-refresher_2-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-refresher_2-md.entry.js", + "common", + 53 + ], + "./ion-reorder_2-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-reorder_2-ios.entry.js", + "common", + 54 + ], + "./ion-reorder_2-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-reorder_2-md.entry.js", + "common", + 55 + ], + "./ion-ripple-effect.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-ripple-effect.entry.js", + 56 + ], + "./ion-route_4.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-route_4.entry.js", + "common", + 57 + ], + "./ion-searchbar-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-searchbar-ios.entry.js", + "common", + 58 + ], + "./ion-searchbar-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-searchbar-md.entry.js", + "common", + 59 + ], + "./ion-segment_2-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-segment_2-ios.entry.js", + "common", + 60 + ], + "./ion-segment_2-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-segment_2-md.entry.js", + "common", + 61 + ], + "./ion-select_3-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-select_3-ios.entry.js", + "common", + 62 + ], + "./ion-select_3-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-select_3-md.entry.js", + "common", + 63 + ], + "./ion-slide_2-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-slide_2-ios.entry.js", + 64 + ], + "./ion-slide_2-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-slide_2-md.entry.js", + 65 + ], + "./ion-spinner.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-spinner.entry.js", + "common", + 66 + ], + "./ion-split-pane-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-split-pane-ios.entry.js", + 67 + ], + "./ion-split-pane-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-split-pane-md.entry.js", + 68 + ], + "./ion-tab-bar_2-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-tab-bar_2-ios.entry.js", + "common", + 69 + ], + "./ion-tab-bar_2-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-tab-bar_2-md.entry.js", + "common", + 70 + ], + "./ion-tab_2.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-tab_2.entry.js", + 1 + ], + "./ion-text.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-text.entry.js", + "common", + 71 + ], + "./ion-textarea-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-textarea-ios.entry.js", + "common", + 72 + ], + "./ion-textarea-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-textarea-md.entry.js", + "common", + 73 + ], + "./ion-toast-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-toast-ios.entry.js", + "common", + 74 + ], + "./ion-toast-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-toast-md.entry.js", + "common", + 75 + ], + "./ion-toggle-ios.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-toggle-ios.entry.js", + "common", + 76 + ], + "./ion-toggle-md.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-toggle-md.entry.js", + "common", + 77 + ], + "./ion-virtual-scroll.entry.js": [ + "./node_modules/@ionic/core/dist/esm-es5/ion-virtual-scroll.entry.js", + 78 + ] +}; +function webpackAsyncContext(req) { + if(!__webpack_require__.o(map, req)) { + return Promise.resolve().then(function() { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }); + } + + var ids = map[req], id = ids[0]; + return Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() { + return __webpack_require__(id); + }); +} +webpackAsyncContext.keys = function webpackAsyncContextKeys() { + return Object.keys(map); +}; +webpackAsyncContext.id = "./node_modules/@ionic/core/dist/esm-es5 lazy recursive ^\\.\\/.*\\.entry\\.js$ include: \\.entry\\.js$ exclude: \\.system\\.entry\\.js$"; +module.exports = webpackAsyncContext; + +/***/ }), + +/***/ "./node_modules/moment/locale sync recursive ^\\.\\/.*$": +/*!**************************************************!*\ + !*** ./node_modules/moment/locale sync ^\.\/.*$ ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var map = { + "./af": "./node_modules/moment/locale/af.js", + "./af.js": "./node_modules/moment/locale/af.js", + "./ar": "./node_modules/moment/locale/ar.js", + "./ar-dz": "./node_modules/moment/locale/ar-dz.js", + "./ar-dz.js": "./node_modules/moment/locale/ar-dz.js", + "./ar-kw": "./node_modules/moment/locale/ar-kw.js", + "./ar-kw.js": "./node_modules/moment/locale/ar-kw.js", + "./ar-ly": "./node_modules/moment/locale/ar-ly.js", + "./ar-ly.js": "./node_modules/moment/locale/ar-ly.js", + "./ar-ma": "./node_modules/moment/locale/ar-ma.js", + "./ar-ma.js": "./node_modules/moment/locale/ar-ma.js", + "./ar-sa": "./node_modules/moment/locale/ar-sa.js", + "./ar-sa.js": "./node_modules/moment/locale/ar-sa.js", + "./ar-tn": "./node_modules/moment/locale/ar-tn.js", + "./ar-tn.js": "./node_modules/moment/locale/ar-tn.js", + "./ar.js": "./node_modules/moment/locale/ar.js", + "./az": "./node_modules/moment/locale/az.js", + "./az.js": "./node_modules/moment/locale/az.js", + "./be": "./node_modules/moment/locale/be.js", + "./be.js": "./node_modules/moment/locale/be.js", + "./bg": "./node_modules/moment/locale/bg.js", + "./bg.js": "./node_modules/moment/locale/bg.js", + "./bm": "./node_modules/moment/locale/bm.js", + "./bm.js": "./node_modules/moment/locale/bm.js", + "./bn": "./node_modules/moment/locale/bn.js", + "./bn.js": "./node_modules/moment/locale/bn.js", + "./bo": "./node_modules/moment/locale/bo.js", + "./bo.js": "./node_modules/moment/locale/bo.js", + "./br": "./node_modules/moment/locale/br.js", + "./br.js": "./node_modules/moment/locale/br.js", + "./bs": "./node_modules/moment/locale/bs.js", + "./bs.js": "./node_modules/moment/locale/bs.js", + "./ca": "./node_modules/moment/locale/ca.js", + "./ca.js": "./node_modules/moment/locale/ca.js", + "./cs": "./node_modules/moment/locale/cs.js", + "./cs.js": "./node_modules/moment/locale/cs.js", + "./cv": "./node_modules/moment/locale/cv.js", + "./cv.js": "./node_modules/moment/locale/cv.js", + "./cy": "./node_modules/moment/locale/cy.js", + "./cy.js": "./node_modules/moment/locale/cy.js", + "./da": "./node_modules/moment/locale/da.js", + "./da.js": "./node_modules/moment/locale/da.js", + "./de": "./node_modules/moment/locale/de.js", + "./de-at": "./node_modules/moment/locale/de-at.js", + "./de-at.js": "./node_modules/moment/locale/de-at.js", + "./de-ch": "./node_modules/moment/locale/de-ch.js", + "./de-ch.js": "./node_modules/moment/locale/de-ch.js", + "./de.js": "./node_modules/moment/locale/de.js", + "./dv": "./node_modules/moment/locale/dv.js", + "./dv.js": "./node_modules/moment/locale/dv.js", + "./el": "./node_modules/moment/locale/el.js", + "./el.js": "./node_modules/moment/locale/el.js", + "./en-SG": "./node_modules/moment/locale/en-SG.js", + "./en-SG.js": "./node_modules/moment/locale/en-SG.js", + "./en-au": "./node_modules/moment/locale/en-au.js", + "./en-au.js": "./node_modules/moment/locale/en-au.js", + "./en-ca": "./node_modules/moment/locale/en-ca.js", + "./en-ca.js": "./node_modules/moment/locale/en-ca.js", + "./en-gb": "./node_modules/moment/locale/en-gb.js", + "./en-gb.js": "./node_modules/moment/locale/en-gb.js", + "./en-ie": "./node_modules/moment/locale/en-ie.js", + "./en-ie.js": "./node_modules/moment/locale/en-ie.js", + "./en-il": "./node_modules/moment/locale/en-il.js", + "./en-il.js": "./node_modules/moment/locale/en-il.js", + "./en-nz": "./node_modules/moment/locale/en-nz.js", + "./en-nz.js": "./node_modules/moment/locale/en-nz.js", + "./eo": "./node_modules/moment/locale/eo.js", + "./eo.js": "./node_modules/moment/locale/eo.js", + "./es": "./node_modules/moment/locale/es.js", + "./es-do": "./node_modules/moment/locale/es-do.js", + "./es-do.js": "./node_modules/moment/locale/es-do.js", + "./es-us": "./node_modules/moment/locale/es-us.js", + "./es-us.js": "./node_modules/moment/locale/es-us.js", + "./es.js": "./node_modules/moment/locale/es.js", + "./et": "./node_modules/moment/locale/et.js", + "./et.js": "./node_modules/moment/locale/et.js", + "./eu": "./node_modules/moment/locale/eu.js", + "./eu.js": "./node_modules/moment/locale/eu.js", + "./fa": "./node_modules/moment/locale/fa.js", + "./fa.js": "./node_modules/moment/locale/fa.js", + "./fi": "./node_modules/moment/locale/fi.js", + "./fi.js": "./node_modules/moment/locale/fi.js", + "./fo": "./node_modules/moment/locale/fo.js", + "./fo.js": "./node_modules/moment/locale/fo.js", + "./fr": "./node_modules/moment/locale/fr.js", + "./fr-ca": "./node_modules/moment/locale/fr-ca.js", + "./fr-ca.js": "./node_modules/moment/locale/fr-ca.js", + "./fr-ch": "./node_modules/moment/locale/fr-ch.js", + "./fr-ch.js": "./node_modules/moment/locale/fr-ch.js", + "./fr.js": "./node_modules/moment/locale/fr.js", + "./fy": "./node_modules/moment/locale/fy.js", + "./fy.js": "./node_modules/moment/locale/fy.js", + "./ga": "./node_modules/moment/locale/ga.js", + "./ga.js": "./node_modules/moment/locale/ga.js", + "./gd": "./node_modules/moment/locale/gd.js", + "./gd.js": "./node_modules/moment/locale/gd.js", + "./gl": "./node_modules/moment/locale/gl.js", + "./gl.js": "./node_modules/moment/locale/gl.js", + "./gom-latn": "./node_modules/moment/locale/gom-latn.js", + "./gom-latn.js": "./node_modules/moment/locale/gom-latn.js", + "./gu": "./node_modules/moment/locale/gu.js", + "./gu.js": "./node_modules/moment/locale/gu.js", + "./he": "./node_modules/moment/locale/he.js", + "./he.js": "./node_modules/moment/locale/he.js", + "./hi": "./node_modules/moment/locale/hi.js", + "./hi.js": "./node_modules/moment/locale/hi.js", + "./hr": "./node_modules/moment/locale/hr.js", + "./hr.js": "./node_modules/moment/locale/hr.js", + "./hu": "./node_modules/moment/locale/hu.js", + "./hu.js": "./node_modules/moment/locale/hu.js", + "./hy-am": "./node_modules/moment/locale/hy-am.js", + "./hy-am.js": "./node_modules/moment/locale/hy-am.js", + "./id": "./node_modules/moment/locale/id.js", + "./id.js": "./node_modules/moment/locale/id.js", + "./is": "./node_modules/moment/locale/is.js", + "./is.js": "./node_modules/moment/locale/is.js", + "./it": "./node_modules/moment/locale/it.js", + "./it-ch": "./node_modules/moment/locale/it-ch.js", + "./it-ch.js": "./node_modules/moment/locale/it-ch.js", + "./it.js": "./node_modules/moment/locale/it.js", + "./ja": "./node_modules/moment/locale/ja.js", + "./ja.js": "./node_modules/moment/locale/ja.js", + "./jv": "./node_modules/moment/locale/jv.js", + "./jv.js": "./node_modules/moment/locale/jv.js", + "./ka": "./node_modules/moment/locale/ka.js", + "./ka.js": "./node_modules/moment/locale/ka.js", + "./kk": "./node_modules/moment/locale/kk.js", + "./kk.js": "./node_modules/moment/locale/kk.js", + "./km": "./node_modules/moment/locale/km.js", + "./km.js": "./node_modules/moment/locale/km.js", + "./kn": "./node_modules/moment/locale/kn.js", + "./kn.js": "./node_modules/moment/locale/kn.js", + "./ko": "./node_modules/moment/locale/ko.js", + "./ko.js": "./node_modules/moment/locale/ko.js", + "./ku": "./node_modules/moment/locale/ku.js", + "./ku.js": "./node_modules/moment/locale/ku.js", + "./ky": "./node_modules/moment/locale/ky.js", + "./ky.js": "./node_modules/moment/locale/ky.js", + "./lb": "./node_modules/moment/locale/lb.js", + "./lb.js": "./node_modules/moment/locale/lb.js", + "./lo": "./node_modules/moment/locale/lo.js", + "./lo.js": "./node_modules/moment/locale/lo.js", + "./lt": "./node_modules/moment/locale/lt.js", + "./lt.js": "./node_modules/moment/locale/lt.js", + "./lv": "./node_modules/moment/locale/lv.js", + "./lv.js": "./node_modules/moment/locale/lv.js", + "./me": "./node_modules/moment/locale/me.js", + "./me.js": "./node_modules/moment/locale/me.js", + "./mi": "./node_modules/moment/locale/mi.js", + "./mi.js": "./node_modules/moment/locale/mi.js", + "./mk": "./node_modules/moment/locale/mk.js", + "./mk.js": "./node_modules/moment/locale/mk.js", + "./ml": "./node_modules/moment/locale/ml.js", + "./ml.js": "./node_modules/moment/locale/ml.js", + "./mn": "./node_modules/moment/locale/mn.js", + "./mn.js": "./node_modules/moment/locale/mn.js", + "./mr": "./node_modules/moment/locale/mr.js", + "./mr.js": "./node_modules/moment/locale/mr.js", + "./ms": "./node_modules/moment/locale/ms.js", + "./ms-my": "./node_modules/moment/locale/ms-my.js", + "./ms-my.js": "./node_modules/moment/locale/ms-my.js", + "./ms.js": "./node_modules/moment/locale/ms.js", + "./mt": "./node_modules/moment/locale/mt.js", + "./mt.js": "./node_modules/moment/locale/mt.js", + "./my": "./node_modules/moment/locale/my.js", + "./my.js": "./node_modules/moment/locale/my.js", + "./nb": "./node_modules/moment/locale/nb.js", + "./nb.js": "./node_modules/moment/locale/nb.js", + "./ne": "./node_modules/moment/locale/ne.js", + "./ne.js": "./node_modules/moment/locale/ne.js", + "./nl": "./node_modules/moment/locale/nl.js", + "./nl-be": "./node_modules/moment/locale/nl-be.js", + "./nl-be.js": "./node_modules/moment/locale/nl-be.js", + "./nl.js": "./node_modules/moment/locale/nl.js", + "./nn": "./node_modules/moment/locale/nn.js", + "./nn.js": "./node_modules/moment/locale/nn.js", + "./pa-in": "./node_modules/moment/locale/pa-in.js", + "./pa-in.js": "./node_modules/moment/locale/pa-in.js", + "./pl": "./node_modules/moment/locale/pl.js", + "./pl.js": "./node_modules/moment/locale/pl.js", + "./pt": "./node_modules/moment/locale/pt.js", + "./pt-br": "./node_modules/moment/locale/pt-br.js", + "./pt-br.js": "./node_modules/moment/locale/pt-br.js", + "./pt.js": "./node_modules/moment/locale/pt.js", + "./ro": "./node_modules/moment/locale/ro.js", + "./ro.js": "./node_modules/moment/locale/ro.js", + "./ru": "./node_modules/moment/locale/ru.js", + "./ru.js": "./node_modules/moment/locale/ru.js", + "./sd": "./node_modules/moment/locale/sd.js", + "./sd.js": "./node_modules/moment/locale/sd.js", + "./se": "./node_modules/moment/locale/se.js", + "./se.js": "./node_modules/moment/locale/se.js", + "./si": "./node_modules/moment/locale/si.js", + "./si.js": "./node_modules/moment/locale/si.js", + "./sk": "./node_modules/moment/locale/sk.js", + "./sk.js": "./node_modules/moment/locale/sk.js", + "./sl": "./node_modules/moment/locale/sl.js", + "./sl.js": "./node_modules/moment/locale/sl.js", + "./sq": "./node_modules/moment/locale/sq.js", + "./sq.js": "./node_modules/moment/locale/sq.js", + "./sr": "./node_modules/moment/locale/sr.js", + "./sr-cyrl": "./node_modules/moment/locale/sr-cyrl.js", + "./sr-cyrl.js": "./node_modules/moment/locale/sr-cyrl.js", + "./sr.js": "./node_modules/moment/locale/sr.js", + "./ss": "./node_modules/moment/locale/ss.js", + "./ss.js": "./node_modules/moment/locale/ss.js", + "./sv": "./node_modules/moment/locale/sv.js", + "./sv.js": "./node_modules/moment/locale/sv.js", + "./sw": "./node_modules/moment/locale/sw.js", + "./sw.js": "./node_modules/moment/locale/sw.js", + "./ta": "./node_modules/moment/locale/ta.js", + "./ta.js": "./node_modules/moment/locale/ta.js", + "./te": "./node_modules/moment/locale/te.js", + "./te.js": "./node_modules/moment/locale/te.js", + "./tet": "./node_modules/moment/locale/tet.js", + "./tet.js": "./node_modules/moment/locale/tet.js", + "./tg": "./node_modules/moment/locale/tg.js", + "./tg.js": "./node_modules/moment/locale/tg.js", + "./th": "./node_modules/moment/locale/th.js", + "./th.js": "./node_modules/moment/locale/th.js", + "./tl-ph": "./node_modules/moment/locale/tl-ph.js", + "./tl-ph.js": "./node_modules/moment/locale/tl-ph.js", + "./tlh": "./node_modules/moment/locale/tlh.js", + "./tlh.js": "./node_modules/moment/locale/tlh.js", + "./tr": "./node_modules/moment/locale/tr.js", + "./tr.js": "./node_modules/moment/locale/tr.js", + "./tzl": "./node_modules/moment/locale/tzl.js", + "./tzl.js": "./node_modules/moment/locale/tzl.js", + "./tzm": "./node_modules/moment/locale/tzm.js", + "./tzm-latn": "./node_modules/moment/locale/tzm-latn.js", + "./tzm-latn.js": "./node_modules/moment/locale/tzm-latn.js", + "./tzm.js": "./node_modules/moment/locale/tzm.js", + "./ug-cn": "./node_modules/moment/locale/ug-cn.js", + "./ug-cn.js": "./node_modules/moment/locale/ug-cn.js", + "./uk": "./node_modules/moment/locale/uk.js", + "./uk.js": "./node_modules/moment/locale/uk.js", + "./ur": "./node_modules/moment/locale/ur.js", + "./ur.js": "./node_modules/moment/locale/ur.js", + "./uz": "./node_modules/moment/locale/uz.js", + "./uz-latn": "./node_modules/moment/locale/uz-latn.js", + "./uz-latn.js": "./node_modules/moment/locale/uz-latn.js", + "./uz.js": "./node_modules/moment/locale/uz.js", + "./vi": "./node_modules/moment/locale/vi.js", + "./vi.js": "./node_modules/moment/locale/vi.js", + "./x-pseudo": "./node_modules/moment/locale/x-pseudo.js", + "./x-pseudo.js": "./node_modules/moment/locale/x-pseudo.js", + "./yo": "./node_modules/moment/locale/yo.js", + "./yo.js": "./node_modules/moment/locale/yo.js", + "./zh-cn": "./node_modules/moment/locale/zh-cn.js", + "./zh-cn.js": "./node_modules/moment/locale/zh-cn.js", + "./zh-hk": "./node_modules/moment/locale/zh-hk.js", + "./zh-hk.js": "./node_modules/moment/locale/zh-hk.js", + "./zh-tw": "./node_modules/moment/locale/zh-tw.js", + "./zh-tw.js": "./node_modules/moment/locale/zh-tw.js" +}; + + +function webpackContext(req) { + var id = webpackContextResolve(req); + return __webpack_require__(id); +} +function webpackContextResolve(req) { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = "./node_modules/moment/locale sync recursive ^\\.\\/.*$"; + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/app.component.html": +/*!**************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/app.component.html ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = " \n \n\n\n \n \n \n \n \n \n
\n \n \n \n

{{username}}

\n
\n
\n\n \n\n \n \n \n   How this app works\n \n\n \n \n   Arc Apps\n \n\n \n\n

Preview/review levels

\n \n \n \n Level 1: Fishbowl\n \n \n \n \n Level 2: Sea\n

Unlocks at 1060 points

\n
\n
\n \n \n \n Level 3: Tundra\n

Unlocks at 2120 points

\n
\n
\n \n \n Level 4: Rainforest\n

Unlocks at 3020 points

\n
\n
\n \n
\n
\n
\n \n\n \n
\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/home/contact/contact.component.html": +/*!*******************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/home/contact/contact.component.html ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Contact study staff\n \n \n\n\n\n\n

Annisa Ahmed

\n
\n

Phone: (267) 634-4490

\n

Email: ayaadapts@email.chop.edu

\n\n\n \n   Call\n \n \n   SMS\n \n \n   Email\n \n \n\n\n
" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/home/header/header.component.html": +/*!*****************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/home/header/header.component.html ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n\n \n \n\n \n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/home/home.page.html": +/*!***************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/home/home.page.html ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n\n\n\n \n \n \n \n Home\n \n\n \n \n Quotes\n \n\n \n \n Memes\n \n\n\n \n \n Thank yous\n \n\n \n \n Insights\n \n\n \n \n Contact\n \n\n\n\n \n \n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/home/terms-of-service/terms-of-service.component.html": +/*!*************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/home/terms-of-service/terms-of-service.component.html ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n SARA\n \n\n\n

Terms of Service

\n
\n

# Released under MIT License

\n

Copyright 2020 Harvard University

\n

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

\n

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

\n

THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

\n
\n \n Agree to terms\n \n \n
\n\n\n Submit\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/aquarium.component.html": +/*!**************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/aquarium/aquarium.component.html ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n\n \n \n\n \n \n\n \n\n\n \n ${{money}}\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{title}}\n \n \n \n \n \n \n \n \n \n\n \n\n \n\n Aware id: {{aware_id}}\n
\n\n \n \n
\n \n " + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/cheatpage/cheatpage.component.html": +/*!*************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/aquarium/cheatpage/cheatpage.component.html ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Cheat points\n \n\n\n\n \n \n \n
\n Current points: {{currentPoints}}\n

\n Cheat\n

\n Return\n \n
\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.html": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.html ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "
\n\n \n\n \n


You unlocked the following animals in this level so far


\n
\n \n \n \n \n \n \n

{{item.fishName}}

\n

{{item.funFact}}

\n
\n
\n\n \n
\n\n \n\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.html": +/*!*********************************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.html ***! + \*********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n\n Congratulations!!!\n\n\n\n \n \n \n \n \n \n

{{reinforcement.header}}

\n

{{reinforcement.text}}

\n
\n
\n
\n
\n\n\n Close\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.html": +/*!********************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.html ***! + \********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n\n \n \n \n \n Level 1: Fishbowl\n \n\n\n\n \n \n A preview of Level 1: Fishbowl\n This level is the first level.\n \n \n \n \n \n\n\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/previews/rainforest/rainforest.component.html": +/*!************************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/aquarium/previews/rainforest/rainforest.component.html ***! + \************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n \n \n Level 4: Rainforest\n \n\n\n\n \n \n \n \n A preview of Level 4: Rainforest\n This level will be unlocked at 3020 points.\n \n \n \n \n \n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/previews/sea/sea.component.html": +/*!**********************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/aquarium/previews/sea/sea.component.html ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Level 2: Sea\n \n\n\n\n \n \n \n \n A preview of Level 2: Sea\n This level will be unlocked at 1060 points.\n \n \n \n \n \n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/previews/tundra/tundra.component.html": +/*!****************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/aquarium/previews/tundra/tundra.component.html ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n\n \n \n \n \n Level 3: Tundra\n \n\n\n\n \n \n \n \n A preview of Level 3: Tundra\n This level will be unlocked at 2120 points.\n \n \n \n \n \n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/award-altruism/award-altruism.component.html": +/*!**************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/award-altruism/award-altruism.component.html ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n You unlocked a thank you message\n \n\n \n\n\n\n
\n \n \n
\n\n\n\n\n\n\n
\n\n \n \n \n \n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/award-memes/award-memes.component.html": +/*!********************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/award-memes/award-memes.component.html ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n You unlocked a meme\n \n \n \n\n\n \n
\n \n \n
\n \n\n\n\n\n
\n\n \n \n \n \n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/info-page/info-page.component.html": +/*!****************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/info-page/info-page.component.html ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n How the app works?\n \n\n\n\n\n \n\n\n \n \n \n \n \n

Complete survey and get rewarded

\n

Every day complete a survey between 6PM and midnight, and receive a variety of different rewards described below.

\n
\n
\n\n
\n\n\n \n \n \n \n \n

Money

\n

Earn one dollar for completing a 3-day streak of your daily survey and two dollars for completing the 1st survey of every new month.

\n
\n
\n\n
\n\n \n \n \n \n \n

Point

\n

Each survey you complete = 60 points!

\n
\n
\n\n
\n\n \n \n \n \n \n

Animals

\n

More points = more animals in your environment!

\n

You can unlock 62 different animals and fish!!

\n
\n
\n\n
\n\n \n \n \n \n \n

Survey completion bar

\n

Shows the number of surveys you have completed in the past week (shown as green) and the ones you missed (shown as gray).

\n
\n
\n\n
\n\n \n \n

Progress bars

\n

Next Animal (top): Shows how far you are to unlock the next animal.

\n

Level up (bottom): Shows how far until you “level up†until the next environment

\n
\n \n \n \n
\n\n
\n \n
\n\n\n \n\n
\n

You will sometimes get thank you messages or memes for completing the surveys.

\n
\n \n
\n
\n\n\n
\n\n\n\n
" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.html": +/*!************************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.html ***! + \************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Sample life-insight (demo)\n \n\n\n\n
\n
Congratulations!!
\n
You unlocked a life-insight
\n
\n\n
\n
\n \n
\n
\n \n

{{subtext}}

\n
\n\n
\n \n
\n \n\n
\n \n \n
\n \n
\n \n
\n \n \n\n
\n
\n\n\n\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.html": +/*!****************************************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.html ***! + \****************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n\n\n\n\n \n \n \n \n Aquarium\n \n \n \n \n
\n
Congratulations!!
\n
You unlocked a life-insight
\n
\n \n
\n \n
\n
\n \n
\n
\n \n

{{subtext}}

\n
\n \n
\n \n
\n \n \n
\n \n \n
\n \n
\n \n
\n \n
\n
\n\n \n \n \n \n \n \n \n " + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.html": +/*!************************************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.html ***! + \************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Python sample life insight\n \n\n\n\n \n\n

Mood

\n
\n \n
\n \n\n

Concentration level

\n
\n \n
\n\n

Good day tomorrow

\n
\n \n
\n\n\n\n\n\n
" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/treasurechest/treasurechest.component.html": +/*!************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/treasurechest/treasurechest.component.html ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Unlockables\n \n\n\n\n\n
\n

You have so far earned

\n

{{amount_earned}}

\n
\n\n
\n

Animals/Fish to unlock

\n \n \n
\n\n \n\n
\n\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.html": +/*!****************************************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.html ***! + \****************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Thank you messages\n \n\n \n \n\n \n \n {{unlockedAltMessagesCount}} out of 21 thank you messages unlocked\n \n \n \n \n \n \n \n \n \n \n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.html": +/*!********************************************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.html ***! + \********************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Inspirational quotes\n \n\n\n\n\n \n \n You received the following inspirational quotes\n \n \n\n \n \n \n \n \n \n\n\n

\n {{item.author}}\n\n

\n \n

\n {{item.quote_text}}\n

\n
\n
\n
\n\n
" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/unlocked-memes/unlocked-memes.component.html": +/*!**************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/unlocked-memes/unlocked-memes.component.html ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Memes\n \n\n \n \n\n \n \n {{unlockedMemeCount}} out of 31 memes unlocked\n \n \n \n \n \n \n \n \n \n \n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/incentive/video-info-page/video-info-page.component.html": +/*!****************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/incentive/video-info-page/video-info-page.component.html ***! + \****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Video tutorials\n \n \n\n\n \n\n \n \n \n 4PM and 6PM notifications\n \n
\n \n
\n\n
\n
" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/intervention/harvard-arc-apps/front-page/front-page.component.html": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/intervention/harvard-arc-apps/front-page/front-page.component.html ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n \n \n\n Arc apps\n \n\n\n\n\n \n \n Time Management Apps\n \n\n \n \n \n \n \n \n

\n {{item.name}}\n

\n

\n {{item.description}}\n

\n
\n \n \n Visit\n \n \n
\n
\n
\n \n\n \n \n Time Management Apps\n \n \n {{app.name}}\n \n \n Internet Blocking Tools\n \n \n {{app.name}}\n \n \n Managing Tasks and Priorities\n \n \n {{app.name}}\n \n >\n
" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/survey/aya-sample-survey/aya-sample-survey.component.html": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/survey/aya-sample-survey/aya-sample-survey.component.html ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Survey\n \n\n\n\n\n \n \n \n\n\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/survey/dynamic-survey/dynamic-survey.component.html": +/*!***********************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/survey/dynamic-survey/dynamic-survey.component.html ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "
\n

Loading survey...

\n
\n
\n \n
\n\n\n\n \n\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/survey/harvard-survey/harvard-survey.component.html": +/*!***********************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/survey/harvard-survey/harvard-survey.component.html ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Survey\n \n\n\n\n \n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/survey/sample-survey/sample-survey.component.html": +/*!*********************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/survey/sample-survey/sample-survey.component.html ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Survey\n \n\n\n\n \n \n\n \n \n \n\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/survey/sleep-survey/sleep-survey.component.html": +/*!*******************************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/survey/sleep-survey/sleep-survey.component.html ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n \n \n \n Sleep survey\n \n \n \n \n \n\n \n\n\n\n\n \n \n \n Phone lock/ublock history\n \n \n \n The graph shows a dot when you locked or unlocked your phone last night and this morning. You most likely slept between the last time you \n locked the phone last night to the first time you unlocked the phone this morning.\n \n \n \n \n \n\n\n" + +/***/ }), + +/***/ "./node_modules/raw-loader/index.js!./src/app/user/auth/auth.component.html": +/*!*************************************************************************!*\ + !*** ./node_modules/raw-loader!./src/app/user/auth/auth.component.html ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n \n SARA\n \n\n\n \n \n \n \n \n \n \n \n
\n

{{error}}

\n
\n\n \n
\n \n \n
\n\n
\n \n Username\n \n \n \n Password\n \n \n
\n {{isLoginMode ? 'Login' : 'Sign Up'}} \n \n
\n
\n
\n
\n
\n
\n" + +/***/ }), + +/***/ "./node_modules/zone.js/dist/zone.js": +/*!*******************************************!*\ + !*** ./node_modules/zone.js/dist/zone.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @license +* Copyright Google Inc. All Rights Reserved. +* +* Use of this source code is governed by an MIT-style license that can be +* found in the LICENSE file at https://angular.io/license +*/ +(function (global, factory) { + true ? factory() : + undefined; +}(this, (function () { 'use strict'; + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +var Zone$1 = (function (global) { + var performance = global['performance']; + function mark(name) { + performance && performance['mark'] && performance['mark'](name); + } + function performanceMeasure(name, label) { + performance && performance['measure'] && performance['measure'](name, label); + } + mark('Zone'); + var checkDuplicate = global[('__zone_symbol__forceDuplicateZoneCheck')] === true; + if (global['Zone']) { + // if global['Zone'] already exists (maybe zone.js was already loaded or + // some other lib also registered a global object named Zone), we may need + // to throw an error, but sometimes user may not want this error. + // For example, + // we have two web pages, page1 includes zone.js, page2 doesn't. + // and the 1st time user load page1 and page2, everything work fine, + // but when user load page2 again, error occurs because global['Zone'] already exists. + // so we add a flag to let user choose whether to throw this error or not. + // By default, if existing Zone is from zone.js, we will not throw the error. + if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') { + throw new Error('Zone already loaded.'); + } + else { + return global['Zone']; + } + } + var Zone = /** @class */ (function () { + function Zone(parent, zoneSpec) { + this._parent = parent; + this._name = zoneSpec ? zoneSpec.name || 'unnamed' : ''; + this._properties = zoneSpec && zoneSpec.properties || {}; + this._zoneDelegate = + new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec); + } + Zone.assertZonePatched = function () { + if (global['Promise'] !== patches['ZoneAwarePromise']) { + throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' + + 'has been overwritten.\n' + + 'Most likely cause is that a Promise polyfill has been loaded ' + + 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' + + 'If you must load one, do so before loading zone.js.)'); + } + }; + Object.defineProperty(Zone, "root", { + get: function () { + var zone = Zone.current; + while (zone.parent) { + zone = zone.parent; + } + return zone; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Zone, "current", { + get: function () { + return _currentZoneFrame.zone; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Zone, "currentTask", { + get: function () { + return _currentTask; + }, + enumerable: true, + configurable: true + }); + Zone.__load_patch = function (name, fn) { + if (patches.hasOwnProperty(name)) { + if (checkDuplicate) { + throw Error('Already loaded patch: ' + name); + } + } + else if (!global['__Zone_disable_' + name]) { + var perfName = 'Zone:' + name; + mark(perfName); + patches[name] = fn(global, Zone, _api); + performanceMeasure(perfName, perfName); + } + }; + Object.defineProperty(Zone.prototype, "parent", { + get: function () { + return this._parent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Zone.prototype, "name", { + get: function () { + return this._name; + }, + enumerable: true, + configurable: true + }); + Zone.prototype.get = function (key) { + var zone = this.getZoneWith(key); + if (zone) + return zone._properties[key]; + }; + Zone.prototype.getZoneWith = function (key) { + var current = this; + while (current) { + if (current._properties.hasOwnProperty(key)) { + return current; + } + current = current._parent; + } + return null; + }; + Zone.prototype.fork = function (zoneSpec) { + if (!zoneSpec) + throw new Error('ZoneSpec required!'); + return this._zoneDelegate.fork(this, zoneSpec); + }; + Zone.prototype.wrap = function (callback, source) { + if (typeof callback !== 'function') { + throw new Error('Expecting function got: ' + callback); + } + var _callback = this._zoneDelegate.intercept(this, callback, source); + var zone = this; + return function () { + return zone.runGuarded(_callback, this, arguments, source); + }; + }; + Zone.prototype.run = function (callback, applyThis, applyArgs, source) { + _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; + try { + return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); + } + finally { + _currentZoneFrame = _currentZoneFrame.parent; + } + }; + Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) { + if (applyThis === void 0) { applyThis = null; } + _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; + try { + try { + return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); + } + catch (error) { + if (this._zoneDelegate.handleError(this, error)) { + throw error; + } + } + } + finally { + _currentZoneFrame = _currentZoneFrame.parent; + } + }; + Zone.prototype.runTask = function (task, applyThis, applyArgs) { + if (task.zone != this) { + throw new Error('A task can only be run in the zone of creation! (Creation: ' + + (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')'); + } + // https://github.com/angular/zone.js/issues/778, sometimes eventTask + // will run in notScheduled(canceled) state, we should not try to + // run such kind of task but just return + if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) { + return; + } + var reEntryGuard = task.state != running; + reEntryGuard && task._transitionTo(running, scheduled); + task.runCount++; + var previousTask = _currentTask; + _currentTask = task; + _currentZoneFrame = { parent: _currentZoneFrame, zone: this }; + try { + if (task.type == macroTask && task.data && !task.data.isPeriodic) { + task.cancelFn = undefined; + } + try { + return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs); + } + catch (error) { + if (this._zoneDelegate.handleError(this, error)) { + throw error; + } + } + } + finally { + // if the task's state is notScheduled or unknown, then it has already been cancelled + // we should not reset the state to scheduled + if (task.state !== notScheduled && task.state !== unknown) { + if (task.type == eventTask || (task.data && task.data.isPeriodic)) { + reEntryGuard && task._transitionTo(scheduled, running); + } + else { + task.runCount = 0; + this._updateTaskCount(task, -1); + reEntryGuard && + task._transitionTo(notScheduled, running, notScheduled); + } + } + _currentZoneFrame = _currentZoneFrame.parent; + _currentTask = previousTask; + } + }; + Zone.prototype.scheduleTask = function (task) { + if (task.zone && task.zone !== this) { + // check if the task was rescheduled, the newZone + // should not be the children of the original zone + var newZone = this; + while (newZone) { + if (newZone === task.zone) { + throw Error("can not reschedule task to " + this.name + " which is descendants of the original zone " + task.zone.name); + } + newZone = newZone.parent; + } + } + task._transitionTo(scheduling, notScheduled); + var zoneDelegates = []; + task._zoneDelegates = zoneDelegates; + task._zone = this; + try { + task = this._zoneDelegate.scheduleTask(this, task); + } + catch (err) { + // should set task's state to unknown when scheduleTask throw error + // because the err may from reschedule, so the fromState maybe notScheduled + task._transitionTo(unknown, scheduling, notScheduled); + // TODO: @JiaLiPassion, should we check the result from handleError? + this._zoneDelegate.handleError(this, err); + throw err; + } + if (task._zoneDelegates === zoneDelegates) { + // we have to check because internally the delegate can reschedule the task. + this._updateTaskCount(task, 1); + } + if (task.state == scheduling) { + task._transitionTo(scheduled, scheduling); + } + return task; + }; + Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) { + return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined)); + }; + Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) { + return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel)); + }; + Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) { + return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel)); + }; + Zone.prototype.cancelTask = function (task) { + if (task.zone != this) + throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' + + (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')'); + task._transitionTo(canceling, scheduled, running); + try { + this._zoneDelegate.cancelTask(this, task); + } + catch (err) { + // if error occurs when cancelTask, transit the state to unknown + task._transitionTo(unknown, canceling); + this._zoneDelegate.handleError(this, err); + throw err; + } + this._updateTaskCount(task, -1); + task._transitionTo(notScheduled, canceling); + task.runCount = 0; + return task; + }; + Zone.prototype._updateTaskCount = function (task, count) { + var zoneDelegates = task._zoneDelegates; + if (count == -1) { + task._zoneDelegates = null; + } + for (var i = 0; i < zoneDelegates.length; i++) { + zoneDelegates[i]._updateTaskCount(task.type, count); + } + }; + Zone.__symbol__ = __symbol__; + return Zone; + }()); + var DELEGATE_ZS = { + name: '', + onHasTask: function (delegate, _, target, hasTaskState) { return delegate.hasTask(target, hasTaskState); }, + onScheduleTask: function (delegate, _, target, task) { + return delegate.scheduleTask(target, task); + }, + onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) { + return delegate.invokeTask(target, task, applyThis, applyArgs); + }, + onCancelTask: function (delegate, _, target, task) { return delegate.cancelTask(target, task); } + }; + var ZoneDelegate = /** @class */ (function () { + function ZoneDelegate(zone, parentDelegate, zoneSpec) { + this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 }; + this.zone = zone; + this._parentDelegate = parentDelegate; + this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS); + this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt); + this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate.zone); + this._interceptZS = + zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS); + this._interceptDlgt = + zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt); + this._interceptCurrZone = + zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate.zone); + this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS); + this._invokeDlgt = + zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt); + this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate.zone); + this._handleErrorZS = + zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS); + this._handleErrorDlgt = + zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt); + this._handleErrorCurrZone = + zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate.zone); + this._scheduleTaskZS = + zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS); + this._scheduleTaskDlgt = zoneSpec && + (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt); + this._scheduleTaskCurrZone = + zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate.zone); + this._invokeTaskZS = + zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS); + this._invokeTaskDlgt = + zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt); + this._invokeTaskCurrZone = + zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate.zone); + this._cancelTaskZS = + zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS); + this._cancelTaskDlgt = + zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt); + this._cancelTaskCurrZone = + zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate.zone); + this._hasTaskZS = null; + this._hasTaskDlgt = null; + this._hasTaskDlgtOwner = null; + this._hasTaskCurrZone = null; + var zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask; + var parentHasTask = parentDelegate && parentDelegate._hasTaskZS; + if (zoneSpecHasTask || parentHasTask) { + // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such + // a case all task related interceptors must go through this ZD. We can't short circuit it. + this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS; + this._hasTaskDlgt = parentDelegate; + this._hasTaskDlgtOwner = this; + this._hasTaskCurrZone = zone; + if (!zoneSpec.onScheduleTask) { + this._scheduleTaskZS = DELEGATE_ZS; + this._scheduleTaskDlgt = parentDelegate; + this._scheduleTaskCurrZone = this.zone; + } + if (!zoneSpec.onInvokeTask) { + this._invokeTaskZS = DELEGATE_ZS; + this._invokeTaskDlgt = parentDelegate; + this._invokeTaskCurrZone = this.zone; + } + if (!zoneSpec.onCancelTask) { + this._cancelTaskZS = DELEGATE_ZS; + this._cancelTaskDlgt = parentDelegate; + this._cancelTaskCurrZone = this.zone; + } + } + } + ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) { + return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) : + new Zone(targetZone, zoneSpec); + }; + ZoneDelegate.prototype.intercept = function (targetZone, callback, source) { + return this._interceptZS ? + this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) : + callback; + }; + ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) { + return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) : + callback.apply(applyThis, applyArgs); + }; + ZoneDelegate.prototype.handleError = function (targetZone, error) { + return this._handleErrorZS ? + this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) : + true; + }; + ZoneDelegate.prototype.scheduleTask = function (targetZone, task) { + var returnTask = task; + if (this._scheduleTaskZS) { + if (this._hasTaskZS) { + returnTask._zoneDelegates.push(this._hasTaskDlgtOwner); + } + returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task); + if (!returnTask) + returnTask = task; + } + else { + if (task.scheduleFn) { + task.scheduleFn(task); + } + else if (task.type == microTask) { + scheduleMicroTask(task); + } + else { + throw new Error('Task is missing scheduleFn.'); + } + } + return returnTask; + }; + ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) { + return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) : + task.callback.apply(applyThis, applyArgs); + }; + ZoneDelegate.prototype.cancelTask = function (targetZone, task) { + var value; + if (this._cancelTaskZS) { + value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task); + } + else { + if (!task.cancelFn) { + throw Error('Task is not cancelable'); + } + value = task.cancelFn(task); + } + return value; + }; + ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) { + // hasTask should not throw error so other ZoneDelegate + // can still trigger hasTask callback + try { + this._hasTaskZS && + this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty); + } + catch (err) { + this.handleError(targetZone, err); + } + }; + ZoneDelegate.prototype._updateTaskCount = function (type, count) { + var counts = this._taskCounts; + var prev = counts[type]; + var next = counts[type] = prev + count; + if (next < 0) { + throw new Error('More tasks executed then were scheduled.'); + } + if (prev == 0 || next == 0) { + var isEmpty = { + microTask: counts['microTask'] > 0, + macroTask: counts['macroTask'] > 0, + eventTask: counts['eventTask'] > 0, + change: type + }; + this.hasTask(this.zone, isEmpty); + } + }; + return ZoneDelegate; + }()); + var ZoneTask = /** @class */ (function () { + function ZoneTask(type, source, callback, options, scheduleFn, cancelFn) { + this._zone = null; + this.runCount = 0; + this._zoneDelegates = null; + this._state = 'notScheduled'; + this.type = type; + this.source = source; + this.data = options; + this.scheduleFn = scheduleFn; + this.cancelFn = cancelFn; + this.callback = callback; + var self = this; + // TODO: @JiaLiPassion options should have interface + if (type === eventTask && options && options.useG) { + this.invoke = ZoneTask.invokeTask; + } + else { + this.invoke = function () { + return ZoneTask.invokeTask.call(global, self, this, arguments); + }; + } + } + ZoneTask.invokeTask = function (task, target, args) { + if (!task) { + task = this; + } + _numberOfNestedTaskFrames++; + try { + task.runCount++; + return task.zone.runTask(task, target, args); + } + finally { + if (_numberOfNestedTaskFrames == 1) { + drainMicroTaskQueue(); + } + _numberOfNestedTaskFrames--; + } + }; + Object.defineProperty(ZoneTask.prototype, "zone", { + get: function () { + return this._zone; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ZoneTask.prototype, "state", { + get: function () { + return this._state; + }, + enumerable: true, + configurable: true + }); + ZoneTask.prototype.cancelScheduleRequest = function () { + this._transitionTo(notScheduled, scheduling); + }; + ZoneTask.prototype._transitionTo = function (toState, fromState1, fromState2) { + if (this._state === fromState1 || this._state === fromState2) { + this._state = toState; + if (toState == notScheduled) { + this._zoneDelegates = null; + } + } + else { + throw new Error(this.type + " '" + this.source + "': can not transition to '" + toState + "', expecting state '" + fromState1 + "'" + (fromState2 ? ' or \'' + fromState2 + '\'' : '') + ", was '" + this._state + "'."); + } + }; + ZoneTask.prototype.toString = function () { + if (this.data && typeof this.data.handleId !== 'undefined') { + return this.data.handleId.toString(); + } + else { + return Object.prototype.toString.call(this); + } + }; + // add toJSON method to prevent cyclic error when + // call JSON.stringify(zoneTask) + ZoneTask.prototype.toJSON = function () { + return { + type: this.type, + state: this.state, + source: this.source, + zone: this.zone.name, + runCount: this.runCount + }; + }; + return ZoneTask; + }()); + ////////////////////////////////////////////////////// + ////////////////////////////////////////////////////// + /// MICROTASK QUEUE + ////////////////////////////////////////////////////// + ////////////////////////////////////////////////////// + var symbolSetTimeout = __symbol__('setTimeout'); + var symbolPromise = __symbol__('Promise'); + var symbolThen = __symbol__('then'); + var _microTaskQueue = []; + var _isDrainingMicrotaskQueue = false; + var nativeMicroTaskQueuePromise; + function scheduleMicroTask(task) { + // if we are not running in any task, and there has not been anything scheduled + // we must bootstrap the initial task creation by manually scheduling the drain + if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) { + // We are not running in Task, so we need to kickstart the microtask queue. + if (!nativeMicroTaskQueuePromise) { + if (global[symbolPromise]) { + nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0); + } + } + if (nativeMicroTaskQueuePromise) { + var nativeThen = nativeMicroTaskQueuePromise[symbolThen]; + if (!nativeThen) { + // native Promise is not patchable, we need to use `then` directly + // issue 1078 + nativeThen = nativeMicroTaskQueuePromise['then']; + } + nativeThen.call(nativeMicroTaskQueuePromise, drainMicroTaskQueue); + } + else { + global[symbolSetTimeout](drainMicroTaskQueue, 0); + } + } + task && _microTaskQueue.push(task); + } + function drainMicroTaskQueue() { + if (!_isDrainingMicrotaskQueue) { + _isDrainingMicrotaskQueue = true; + while (_microTaskQueue.length) { + var queue = _microTaskQueue; + _microTaskQueue = []; + for (var i = 0; i < queue.length; i++) { + var task = queue[i]; + try { + task.zone.runTask(task, null, null); + } + catch (error) { + _api.onUnhandledError(error); + } + } + } + _api.microtaskDrainDone(); + _isDrainingMicrotaskQueue = false; + } + } + ////////////////////////////////////////////////////// + ////////////////////////////////////////////////////// + /// BOOTSTRAP + ////////////////////////////////////////////////////// + ////////////////////////////////////////////////////// + var NO_ZONE = { name: 'NO ZONE' }; + var notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown'; + var microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask'; + var patches = {}; + var _api = { + symbol: __symbol__, + currentZoneFrame: function () { return _currentZoneFrame; }, + onUnhandledError: noop, + microtaskDrainDone: noop, + scheduleMicroTask: scheduleMicroTask, + showUncaughtError: function () { return !Zone[__symbol__('ignoreConsoleErrorUncaughtError')]; }, + patchEventTarget: function () { return []; }, + patchOnProperties: noop, + patchMethod: function () { return noop; }, + bindArguments: function () { return []; }, + patchThen: function () { return noop; }, + patchMacroTask: function () { return noop; }, + setNativePromise: function (NativePromise) { + // sometimes NativePromise.resolve static function + // is not ready yet, (such as core-js/es6.promise) + // so we need to check here. + if (NativePromise && typeof NativePromise.resolve === 'function') { + nativeMicroTaskQueuePromise = NativePromise.resolve(0); + } + }, + patchEventPrototype: function () { return noop; }, + isIEOrEdge: function () { return false; }, + getGlobalObjects: function () { return undefined; }, + ObjectDefineProperty: function () { return noop; }, + ObjectGetOwnPropertyDescriptor: function () { return undefined; }, + ObjectCreate: function () { return undefined; }, + ArraySlice: function () { return []; }, + patchClass: function () { return noop; }, + wrapWithCurrentZone: function () { return noop; }, + filterProperties: function () { return []; }, + attachOriginToPatched: function () { return noop; }, + _redefineProperty: function () { return noop; }, + patchCallbacks: function () { return noop; } + }; + var _currentZoneFrame = { parent: null, zone: new Zone(null, null) }; + var _currentTask = null; + var _numberOfNestedTaskFrames = 0; + function noop() { } + function __symbol__(name) { + return '__zone_symbol__' + name; + } + performanceMeasure('Zone', 'Zone'); + return global['Zone'] = Zone; +})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global); + +var __values = (undefined && undefined.__values) || function (o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; +}; +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Zone.__load_patch('ZoneAwarePromise', function (global, Zone, api) { + var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + var ObjectDefineProperty = Object.defineProperty; + function readableObjectToString(obj) { + if (obj && obj.toString === Object.prototype.toString) { + var className = obj.constructor && obj.constructor.name; + return (className ? className : '') + ': ' + JSON.stringify(obj); + } + return obj ? obj.toString() : Object.prototype.toString.call(obj); + } + var __symbol__ = api.symbol; + var _uncaughtPromiseErrors = []; + var symbolPromise = __symbol__('Promise'); + var symbolThen = __symbol__('then'); + var creationTrace = '__creationTrace__'; + api.onUnhandledError = function (e) { + if (api.showUncaughtError()) { + var rejection = e && e.rejection; + if (rejection) { + console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined); + } + else { + console.error(e); + } + } + }; + api.microtaskDrainDone = function () { + while (_uncaughtPromiseErrors.length) { + var _loop_1 = function () { + var uncaughtPromiseError = _uncaughtPromiseErrors.shift(); + try { + uncaughtPromiseError.zone.runGuarded(function () { + throw uncaughtPromiseError; + }); + } + catch (error) { + handleUnhandledRejection(error); + } + }; + while (_uncaughtPromiseErrors.length) { + _loop_1(); + } + } + }; + var UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler'); + function handleUnhandledRejection(e) { + api.onUnhandledError(e); + try { + var handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL]; + if (handler && typeof handler === 'function') { + handler.call(this, e); + } + } + catch (err) { + } + } + function isThenable(value) { + return value && value.then; + } + function forwardResolution(value) { + return value; + } + function forwardRejection(rejection) { + return ZoneAwarePromise.reject(rejection); + } + var symbolState = __symbol__('state'); + var symbolValue = __symbol__('value'); + var symbolFinally = __symbol__('finally'); + var symbolParentPromiseValue = __symbol__('parentPromiseValue'); + var symbolParentPromiseState = __symbol__('parentPromiseState'); + var source = 'Promise.then'; + var UNRESOLVED = null; + var RESOLVED = true; + var REJECTED = false; + var REJECTED_NO_CATCH = 0; + function makeResolver(promise, state) { + return function (v) { + try { + resolvePromise(promise, state, v); + } + catch (err) { + resolvePromise(promise, false, err); + } + // Do not return value or you will break the Promise spec. + }; + } + var once = function () { + var wasCalled = false; + return function wrapper(wrappedFunction) { + return function () { + if (wasCalled) { + return; + } + wasCalled = true; + wrappedFunction.apply(null, arguments); + }; + }; + }; + var TYPE_ERROR = 'Promise resolved with itself'; + var CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace'); + // Promise Resolution + function resolvePromise(promise, state, value) { + var onceWrapper = once(); + if (promise === value) { + throw new TypeError(TYPE_ERROR); + } + if (promise[symbolState] === UNRESOLVED) { + // should only get value.then once based on promise spec. + var then = null; + try { + if (typeof value === 'object' || typeof value === 'function') { + then = value && value.then; + } + } + catch (err) { + onceWrapper(function () { + resolvePromise(promise, false, err); + })(); + return promise; + } + // if (value instanceof ZoneAwarePromise) { + if (state !== REJECTED && value instanceof ZoneAwarePromise && + value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) && + value[symbolState] !== UNRESOLVED) { + clearRejectedNoCatch(value); + resolvePromise(promise, value[symbolState], value[symbolValue]); + } + else if (state !== REJECTED && typeof then === 'function') { + try { + then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false))); + } + catch (err) { + onceWrapper(function () { + resolvePromise(promise, false, err); + })(); + } + } + else { + promise[symbolState] = state; + var queue = promise[symbolValue]; + promise[symbolValue] = value; + if (promise[symbolFinally] === symbolFinally) { + // the promise is generated by Promise.prototype.finally + if (state === RESOLVED) { + // the state is resolved, should ignore the value + // and use parent promise value + promise[symbolState] = promise[symbolParentPromiseState]; + promise[symbolValue] = promise[symbolParentPromiseValue]; + } + } + // record task information in value when error occurs, so we can + // do some additional work such as render longStackTrace + if (state === REJECTED && value instanceof Error) { + // check if longStackTraceZone is here + var trace = Zone.currentTask && Zone.currentTask.data && + Zone.currentTask.data[creationTrace]; + if (trace) { + // only keep the long stack trace into error when in longStackTraceZone + ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace }); + } + } + for (var i = 0; i < queue.length;) { + scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]); + } + if (queue.length == 0 && state == REJECTED) { + promise[symbolState] = REJECTED_NO_CATCH; + try { + // try to print more readable error log + throw new Error('Uncaught (in promise): ' + readableObjectToString(value) + + (value && value.stack ? '\n' + value.stack : '')); + } + catch (err) { + var error_1 = err; + error_1.rejection = value; + error_1.promise = promise; + error_1.zone = Zone.current; + error_1.task = Zone.currentTask; + _uncaughtPromiseErrors.push(error_1); + api.scheduleMicroTask(); // to make sure that it is running + } + } + } + } + // Resolving an already resolved promise is a noop. + return promise; + } + var REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler'); + function clearRejectedNoCatch(promise) { + if (promise[symbolState] === REJECTED_NO_CATCH) { + // if the promise is rejected no catch status + // and queue.length > 0, means there is a error handler + // here to handle the rejected promise, we should trigger + // windows.rejectionhandled eventHandler or nodejs rejectionHandled + // eventHandler + try { + var handler = Zone[REJECTION_HANDLED_HANDLER]; + if (handler && typeof handler === 'function') { + handler.call(this, { rejection: promise[symbolValue], promise: promise }); + } + } + catch (err) { + } + promise[symbolState] = REJECTED; + for (var i = 0; i < _uncaughtPromiseErrors.length; i++) { + if (promise === _uncaughtPromiseErrors[i].promise) { + _uncaughtPromiseErrors.splice(i, 1); + } + } + } + } + function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) { + clearRejectedNoCatch(promise); + var promiseState = promise[symbolState]; + var delegate = promiseState ? + (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution : + (typeof onRejected === 'function') ? onRejected : forwardRejection; + zone.scheduleMicroTask(source, function () { + try { + var parentPromiseValue = promise[symbolValue]; + var isFinallyPromise = chainPromise && symbolFinally === chainPromise[symbolFinally]; + if (isFinallyPromise) { + // if the promise is generated from finally call, keep parent promise's state and value + chainPromise[symbolParentPromiseValue] = parentPromiseValue; + chainPromise[symbolParentPromiseState] = promiseState; + } + // should not pass value to finally callback + var value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? + [] : + [parentPromiseValue]); + resolvePromise(chainPromise, true, value); + } + catch (error) { + // if error occurs, should always return this error + resolvePromise(chainPromise, false, error); + } + }, chainPromise); + } + var ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }'; + var ZoneAwarePromise = /** @class */ (function () { + function ZoneAwarePromise(executor) { + var promise = this; + if (!(promise instanceof ZoneAwarePromise)) { + throw new Error('Must be an instanceof Promise.'); + } + promise[symbolState] = UNRESOLVED; + promise[symbolValue] = []; // queue; + try { + executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED)); + } + catch (error) { + resolvePromise(promise, false, error); + } + } + ZoneAwarePromise.toString = function () { + return ZONE_AWARE_PROMISE_TO_STRING; + }; + ZoneAwarePromise.resolve = function (value) { + return resolvePromise(new this(null), RESOLVED, value); + }; + ZoneAwarePromise.reject = function (error) { + return resolvePromise(new this(null), REJECTED, error); + }; + ZoneAwarePromise.race = function (values) { + var e_1, _a; + var resolve; + var reject; + var promise = new this(function (res, rej) { + resolve = res; + reject = rej; + }); + function onResolve(value) { + resolve(value); + } + function onReject(error) { + reject(error); + } + try { + for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) { + var value = values_1_1.value; + if (!isThenable(value)) { + value = this.resolve(value); + } + value.then(onResolve, onReject); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1); + } + finally { if (e_1) throw e_1.error; } + } + return promise; + }; + ZoneAwarePromise.all = function (values) { + var e_2, _a; + var resolve; + var reject; + var promise = new this(function (res, rej) { + resolve = res; + reject = rej; + }); + // Start at 2 to prevent prematurely resolving if .then is called immediately. + var unresolvedCount = 2; + var valueIndex = 0; + var resolvedValues = []; + var _loop_2 = function (value) { + if (!isThenable(value)) { + value = this_1.resolve(value); + } + var curValueIndex = valueIndex; + value.then(function (value) { + resolvedValues[curValueIndex] = value; + unresolvedCount--; + if (unresolvedCount === 0) { + resolve(resolvedValues); + } + }, reject); + unresolvedCount++; + valueIndex++; + }; + var this_1 = this; + try { + for (var values_2 = __values(values), values_2_1 = values_2.next(); !values_2_1.done; values_2_1 = values_2.next()) { + var value = values_2_1.value; + _loop_2(value); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (values_2_1 && !values_2_1.done && (_a = values_2.return)) _a.call(values_2); + } + finally { if (e_2) throw e_2.error; } + } + // Make the unresolvedCount zero-based again. + unresolvedCount -= 2; + if (unresolvedCount === 0) { + resolve(resolvedValues); + } + return promise; + }; + Object.defineProperty(ZoneAwarePromise.prototype, Symbol.toStringTag, { + get: function () { + return 'Promise'; + }, + enumerable: true, + configurable: true + }); + ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) { + var chainPromise = new this.constructor(null); + var zone = Zone.current; + if (this[symbolState] == UNRESOLVED) { + this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected); + } + else { + scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected); + } + return chainPromise; + }; + ZoneAwarePromise.prototype.catch = function (onRejected) { + return this.then(null, onRejected); + }; + ZoneAwarePromise.prototype.finally = function (onFinally) { + var chainPromise = new this.constructor(null); + chainPromise[symbolFinally] = symbolFinally; + var zone = Zone.current; + if (this[symbolState] == UNRESOLVED) { + this[symbolValue].push(zone, chainPromise, onFinally, onFinally); + } + else { + scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally); + } + return chainPromise; + }; + return ZoneAwarePromise; + }()); + // Protect against aggressive optimizers dropping seemingly unused properties. + // E.g. Closure Compiler in advanced mode. + ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve; + ZoneAwarePromise['reject'] = ZoneAwarePromise.reject; + ZoneAwarePromise['race'] = ZoneAwarePromise.race; + ZoneAwarePromise['all'] = ZoneAwarePromise.all; + var NativePromise = global[symbolPromise] = global['Promise']; + var ZONE_AWARE_PROMISE = Zone.__symbol__('ZoneAwarePromise'); + var desc = ObjectGetOwnPropertyDescriptor(global, 'Promise'); + if (!desc || desc.configurable) { + desc && delete desc.writable; + desc && delete desc.value; + if (!desc) { + desc = { configurable: true, enumerable: true }; + } + desc.get = function () { + // if we already set ZoneAwarePromise, use patched one + // otherwise return native one. + return global[ZONE_AWARE_PROMISE] ? global[ZONE_AWARE_PROMISE] : global[symbolPromise]; + }; + desc.set = function (NewNativePromise) { + if (NewNativePromise === ZoneAwarePromise) { + // if the NewNativePromise is ZoneAwarePromise + // save to global + global[ZONE_AWARE_PROMISE] = NewNativePromise; + } + else { + // if the NewNativePromise is not ZoneAwarePromise + // for example: after load zone.js, some library just + // set es6-promise to global, if we set it to global + // directly, assertZonePatched will fail and angular + // will not loaded, so we just set the NewNativePromise + // to global[symbolPromise], so the result is just like + // we load ES6 Promise before zone.js + global[symbolPromise] = NewNativePromise; + if (!NewNativePromise.prototype[symbolThen]) { + patchThen(NewNativePromise); + } + api.setNativePromise(NewNativePromise); + } + }; + ObjectDefineProperty(global, 'Promise', desc); + } + global['Promise'] = ZoneAwarePromise; + var symbolThenPatched = __symbol__('thenPatched'); + function patchThen(Ctor) { + var proto = Ctor.prototype; + var prop = ObjectGetOwnPropertyDescriptor(proto, 'then'); + if (prop && (prop.writable === false || !prop.configurable)) { + // check Ctor.prototype.then propertyDescriptor is writable or not + // in meteor env, writable is false, we should ignore such case + return; + } + var originalThen = proto.then; + // Keep a reference to the original method. + proto[symbolThen] = originalThen; + Ctor.prototype.then = function (onResolve, onReject) { + var _this = this; + var wrapped = new ZoneAwarePromise(function (resolve, reject) { + originalThen.call(_this, resolve, reject); + }); + return wrapped.then(onResolve, onReject); + }; + Ctor[symbolThenPatched] = true; + } + api.patchThen = patchThen; + function zoneify(fn) { + return function () { + var resultPromise = fn.apply(this, arguments); + if (resultPromise instanceof ZoneAwarePromise) { + return resultPromise; + } + var ctor = resultPromise.constructor; + if (!ctor[symbolThenPatched]) { + patchThen(ctor); + } + return resultPromise; + }; + } + if (NativePromise) { + patchThen(NativePromise); + var fetch_1 = global['fetch']; + if (typeof fetch_1 == 'function') { + global[api.symbol('fetch')] = fetch_1; + global['fetch'] = zoneify(fetch_1); + } + } + // This is not part of public API, but it is useful for tests, so we expose it. + Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors; + return ZoneAwarePromise; +}); + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/** + * Suppress closure compiler errors about unknown 'Zone' variable + * @fileoverview + * @suppress {undefinedVars,globalThis,missingRequire} + */ +// issue #989, to reduce bundle size, use short name +/** Object.getOwnPropertyDescriptor */ +var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +/** Object.defineProperty */ +var ObjectDefineProperty = Object.defineProperty; +/** Object.getPrototypeOf */ +var ObjectGetPrototypeOf = Object.getPrototypeOf; +/** Object.create */ +var ObjectCreate = Object.create; +/** Array.prototype.slice */ +var ArraySlice = Array.prototype.slice; +/** addEventListener string const */ +var ADD_EVENT_LISTENER_STR = 'addEventListener'; +/** removeEventListener string const */ +var REMOVE_EVENT_LISTENER_STR = 'removeEventListener'; +/** zoneSymbol addEventListener */ +var ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR); +/** zoneSymbol removeEventListener */ +var ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR); +/** true string const */ +var TRUE_STR = 'true'; +/** false string const */ +var FALSE_STR = 'false'; +/** __zone_symbol__ string const */ +var ZONE_SYMBOL_PREFIX = '__zone_symbol__'; +function wrapWithCurrentZone(callback, source) { + return Zone.current.wrap(callback, source); +} +function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) { + return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel); +} +var zoneSymbol = Zone.__symbol__; +var isWindowExists = typeof window !== 'undefined'; +var internalWindow = isWindowExists ? window : undefined; +var _global = isWindowExists && internalWindow || typeof self === 'object' && self || global; +var REMOVE_ATTRIBUTE = 'removeAttribute'; +var NULL_ON_PROP_VALUE = [null]; +function bindArguments(args, source) { + for (var i = args.length - 1; i >= 0; i--) { + if (typeof args[i] === 'function') { + args[i] = wrapWithCurrentZone(args[i], source + '_' + i); + } + } + return args; +} +function patchPrototype(prototype, fnNames) { + var source = prototype.constructor['name']; + var _loop_1 = function (i) { + var name_1 = fnNames[i]; + var delegate = prototype[name_1]; + if (delegate) { + var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name_1); + if (!isPropertyWritable(prototypeDesc)) { + return "continue"; + } + prototype[name_1] = (function (delegate) { + var patched = function () { + return delegate.apply(this, bindArguments(arguments, source + '.' + name_1)); + }; + attachOriginToPatched(patched, delegate); + return patched; + })(delegate); + } + }; + for (var i = 0; i < fnNames.length; i++) { + _loop_1(i); + } +} +function isPropertyWritable(propertyDesc) { + if (!propertyDesc) { + return true; + } + if (propertyDesc.writable === false) { + return false; + } + return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined'); +} +var isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope); +// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify +// this code. +var isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' && + {}.toString.call(_global.process) === '[object process]'); +var isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']); +// we are in electron of nw, so we are both browser and nodejs +// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify +// this code. +var isMix = typeof _global.process !== 'undefined' && + {}.toString.call(_global.process) === '[object process]' && !isWebWorker && + !!(isWindowExists && internalWindow['HTMLElement']); +var zoneSymbolEventNames = {}; +var wrapFn = function (event) { + // https://github.com/angular/zone.js/issues/911, in IE, sometimes + // event will be undefined, so we need to use window.event + event = event || _global.event; + if (!event) { + return; + } + var eventNameSymbol = zoneSymbolEventNames[event.type]; + if (!eventNameSymbol) { + eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type); + } + var target = this || event.target || _global; + var listener = target[eventNameSymbol]; + var result; + if (isBrowser && target === internalWindow && event.type === 'error') { + // window.onerror have different signiture + // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror + // and onerror callback will prevent default when callback return true + var errorEvent = event; + result = listener && + listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error); + if (result === true) { + event.preventDefault(); + } + } + else { + result = listener && listener.apply(this, arguments); + if (result != undefined && !result) { + event.preventDefault(); + } + } + return result; +}; +function patchProperty(obj, prop, prototype) { + var desc = ObjectGetOwnPropertyDescriptor(obj, prop); + if (!desc && prototype) { + // when patch window object, use prototype to check prop exist or not + var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop); + if (prototypeDesc) { + desc = { enumerable: true, configurable: true }; + } + } + // if the descriptor not exists or is not configurable + // just return + if (!desc || !desc.configurable) { + return; + } + var onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched'); + if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) { + return; + } + // A property descriptor cannot have getter/setter and be writable + // deleting the writable and value properties avoids this error: + // + // TypeError: property descriptors must not specify a value or be writable when a + // getter or setter has been specified + delete desc.writable; + delete desc.value; + var originalDescGet = desc.get; + var originalDescSet = desc.set; + // substr(2) cuz 'onclick' -> 'click', etc + var eventName = prop.substr(2); + var eventNameSymbol = zoneSymbolEventNames[eventName]; + if (!eventNameSymbol) { + eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName); + } + desc.set = function (newValue) { + // in some of windows's onproperty callback, this is undefined + // so we need to check it + var target = this; + if (!target && obj === _global) { + target = _global; + } + if (!target) { + return; + } + var previousValue = target[eventNameSymbol]; + if (previousValue) { + target.removeEventListener(eventName, wrapFn); + } + // issue #978, when onload handler was added before loading zone.js + // we should remove it with originalDescSet + if (originalDescSet) { + originalDescSet.apply(target, NULL_ON_PROP_VALUE); + } + if (typeof newValue === 'function') { + target[eventNameSymbol] = newValue; + target.addEventListener(eventName, wrapFn, false); + } + else { + target[eventNameSymbol] = null; + } + }; + // The getter would return undefined for unassigned properties but the default value of an + // unassigned property is null + desc.get = function () { + // in some of windows's onproperty callback, this is undefined + // so we need to check it + var target = this; + if (!target && obj === _global) { + target = _global; + } + if (!target) { + return null; + } + var listener = target[eventNameSymbol]; + if (listener) { + return listener; + } + else if (originalDescGet) { + // result will be null when use inline event attribute, + // such as + // because the onclick function is internal raw uncompiled handler + // the onclick will be evaluated when first time event was triggered or + // the property is accessed, https://github.com/angular/zone.js/issues/525 + // so we should use original native get to retrieve the handler + var value = originalDescGet && originalDescGet.call(this); + if (value) { + desc.set.call(this, value); + if (typeof target[REMOVE_ATTRIBUTE] === 'function') { + target.removeAttribute(prop); + } + return value; + } + } + return null; + }; + ObjectDefineProperty(obj, prop, desc); + obj[onPropPatchedSymbol] = true; +} +function patchOnProperties(obj, properties, prototype) { + if (properties) { + for (var i = 0; i < properties.length; i++) { + patchProperty(obj, 'on' + properties[i], prototype); + } + } + else { + var onProperties = []; + for (var prop in obj) { + if (prop.substr(0, 2) == 'on') { + onProperties.push(prop); + } + } + for (var j = 0; j < onProperties.length; j++) { + patchProperty(obj, onProperties[j], prototype); + } + } +} +var originalInstanceKey = zoneSymbol('originalInstance'); +// wrap some native API on `window` +function patchClass(className) { + var OriginalClass = _global[className]; + if (!OriginalClass) + return; + // keep original class in global + _global[zoneSymbol(className)] = OriginalClass; + _global[className] = function () { + var a = bindArguments(arguments, className); + switch (a.length) { + case 0: + this[originalInstanceKey] = new OriginalClass(); + break; + case 1: + this[originalInstanceKey] = new OriginalClass(a[0]); + break; + case 2: + this[originalInstanceKey] = new OriginalClass(a[0], a[1]); + break; + case 3: + this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]); + break; + case 4: + this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]); + break; + default: + throw new Error('Arg list too long.'); + } + }; + // attach original delegate to patched function + attachOriginToPatched(_global[className], OriginalClass); + var instance = new OriginalClass(function () { }); + var prop; + for (prop in instance) { + // https://bugs.webkit.org/show_bug.cgi?id=44721 + if (className === 'XMLHttpRequest' && prop === 'responseBlob') + continue; + (function (prop) { + if (typeof instance[prop] === 'function') { + _global[className].prototype[prop] = function () { + return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments); + }; + } + else { + ObjectDefineProperty(_global[className].prototype, prop, { + set: function (fn) { + if (typeof fn === 'function') { + this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop); + // keep callback in wrapped function so we can + // use it in Function.prototype.toString to return + // the native one. + attachOriginToPatched(this[originalInstanceKey][prop], fn); + } + else { + this[originalInstanceKey][prop] = fn; + } + }, + get: function () { + return this[originalInstanceKey][prop]; + } + }); + } + }(prop)); + } + for (prop in OriginalClass) { + if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) { + _global[className][prop] = OriginalClass[prop]; + } + } +} +function copySymbolProperties(src, dest) { + if (typeof Object.getOwnPropertySymbols !== 'function') { + return; + } + var symbols = Object.getOwnPropertySymbols(src); + symbols.forEach(function (symbol) { + var desc = Object.getOwnPropertyDescriptor(src, symbol); + Object.defineProperty(dest, symbol, { + get: function () { + return src[symbol]; + }, + set: function (value) { + if (desc && (!desc.writable || typeof desc.set !== 'function')) { + // if src[symbol] is not writable or not have a setter, just return + return; + } + src[symbol] = value; + }, + enumerable: desc ? desc.enumerable : true, + configurable: desc ? desc.configurable : true + }); + }); +} +var shouldCopySymbolProperties = false; + +function patchMethod(target, name, patchFn) { + var proto = target; + while (proto && !proto.hasOwnProperty(name)) { + proto = ObjectGetPrototypeOf(proto); + } + if (!proto && target[name]) { + // somehow we did not find it, but we can see it. This happens on IE for Window properties. + proto = target; + } + var delegateName = zoneSymbol(name); + var delegate = null; + if (proto && !(delegate = proto[delegateName])) { + delegate = proto[delegateName] = proto[name]; + // check whether proto[name] is writable + // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob + var desc = proto && ObjectGetOwnPropertyDescriptor(proto, name); + if (isPropertyWritable(desc)) { + var patchDelegate_1 = patchFn(delegate, delegateName, name); + proto[name] = function () { + return patchDelegate_1(this, arguments); + }; + attachOriginToPatched(proto[name], delegate); + if (shouldCopySymbolProperties) { + copySymbolProperties(delegate, proto[name]); + } + } + } + return delegate; +} +// TODO: @JiaLiPassion, support cancel task later if necessary +function patchMacroTask(obj, funcName, metaCreator) { + var setNative = null; + function scheduleTask(task) { + var data = task.data; + data.args[data.cbIdx] = function () { + task.invoke.apply(this, arguments); + }; + setNative.apply(data.target, data.args); + return task; + } + setNative = patchMethod(obj, funcName, function (delegate) { return function (self, args) { + var meta = metaCreator(self, args); + if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') { + return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask); + } + else { + // cause an error by calling it directly. + return delegate.apply(self, args); + } + }; }); +} + +function attachOriginToPatched(patched, original) { + patched[zoneSymbol('OriginalDelegate')] = original; +} +var isDetectedIEOrEdge = false; +var ieOrEdge = false; +function isIE() { + try { + var ua = internalWindow.navigator.userAgent; + if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) { + return true; + } + } + catch (error) { + } + return false; +} +function isIEOrEdge() { + if (isDetectedIEOrEdge) { + return ieOrEdge; + } + isDetectedIEOrEdge = true; + try { + var ua = internalWindow.navigator.userAgent; + if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) { + ieOrEdge = true; + } + } + catch (error) { + } + return ieOrEdge; +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// override Function.prototype.toString to make zone.js patched function +// look like native function +Zone.__load_patch('toString', function (global) { + // patch Func.prototype.toString to let them look like native + var originalFunctionToString = Function.prototype.toString; + var ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate'); + var PROMISE_SYMBOL = zoneSymbol('Promise'); + var ERROR_SYMBOL = zoneSymbol('Error'); + var newFunctionToString = function toString() { + if (typeof this === 'function') { + var originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL]; + if (originalDelegate) { + if (typeof originalDelegate === 'function') { + return originalFunctionToString.call(originalDelegate); + } + else { + return Object.prototype.toString.call(originalDelegate); + } + } + if (this === Promise) { + var nativePromise = global[PROMISE_SYMBOL]; + if (nativePromise) { + return originalFunctionToString.call(nativePromise); + } + } + if (this === Error) { + var nativeError = global[ERROR_SYMBOL]; + if (nativeError) { + return originalFunctionToString.call(nativeError); + } + } + } + return originalFunctionToString.call(this); + }; + newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString; + Function.prototype.toString = newFunctionToString; + // patch Object.prototype.toString to let them look like native + var originalObjectToString = Object.prototype.toString; + var PROMISE_OBJECT_TO_STRING = '[object Promise]'; + Object.prototype.toString = function () { + if (this instanceof Promise) { + return PROMISE_OBJECT_TO_STRING; + } + return originalObjectToString.call(this); + }; +}); + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/** + * @fileoverview + * @suppress {missingRequire} + */ +var passiveSupported = false; +if (typeof window !== 'undefined') { + try { + var options = Object.defineProperty({}, 'passive', { + get: function () { + passiveSupported = true; + } + }); + window.addEventListener('test', options, options); + window.removeEventListener('test', options, options); + } + catch (err) { + passiveSupported = false; + } +} +// an identifier to tell ZoneTask do not create a new invoke closure +var OPTIMIZED_ZONE_EVENT_TASK_DATA = { + useG: true +}; +var zoneSymbolEventNames$1 = {}; +var globalSources = {}; +var EVENT_NAME_SYMBOL_REGX = /^__zone_symbol__(\w+)(true|false)$/; +var IMMEDIATE_PROPAGATION_SYMBOL = ('__zone_symbol__propagationStopped'); +function patchEventTarget(_global, apis, patchOptions) { + var ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR; + var REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR; + var LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners'; + var REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners'; + var zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER); + var ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':'; + var PREPEND_EVENT_LISTENER = 'prependListener'; + var PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':'; + var invokeTask = function (task, target, event) { + // for better performance, check isRemoved which is set + // by removeEventListener + if (task.isRemoved) { + return; + } + var delegate = task.callback; + if (typeof delegate === 'object' && delegate.handleEvent) { + // create the bind version of handleEvent when invoke + task.callback = function (event) { return delegate.handleEvent(event); }; + task.originalDelegate = delegate; + } + // invoke static task.invoke + task.invoke(task, target, [event]); + var options = task.options; + if (options && typeof options === 'object' && options.once) { + // if options.once is true, after invoke once remove listener here + // only browser need to do this, nodejs eventEmitter will cal removeListener + // inside EventEmitter.once + var delegate_1 = task.originalDelegate ? task.originalDelegate : task.callback; + target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate_1, options); + } + }; + // global shared zoneAwareCallback to handle all event callback with capture = false + var globalZoneAwareCallback = function (event) { + // https://github.com/angular/zone.js/issues/911, in IE, sometimes + // event will be undefined, so we need to use window.event + event = event || _global.event; + if (!event) { + return; + } + // event.target is needed for Samsung TV and SourceBuffer + // || global is needed https://github.com/angular/zone.js/issues/190 + var target = this || event.target || _global; + var tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]]; + if (tasks) { + // invoke all tasks which attached to current target with given event.type and capture = false + // for performance concern, if task.length === 1, just invoke + if (tasks.length === 1) { + invokeTask(tasks[0], target, event); + } + else { + // https://github.com/angular/zone.js/issues/836 + // copy the tasks array before invoke, to avoid + // the callback will remove itself or other listener + var copyTasks = tasks.slice(); + for (var i = 0; i < copyTasks.length; i++) { + if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) { + break; + } + invokeTask(copyTasks[i], target, event); + } + } + } + }; + // global shared zoneAwareCallback to handle all event callback with capture = true + var globalZoneAwareCaptureCallback = function (event) { + // https://github.com/angular/zone.js/issues/911, in IE, sometimes + // event will be undefined, so we need to use window.event + event = event || _global.event; + if (!event) { + return; + } + // event.target is needed for Samsung TV and SourceBuffer + // || global is needed https://github.com/angular/zone.js/issues/190 + var target = this || event.target || _global; + var tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]]; + if (tasks) { + // invoke all tasks which attached to current target with given event.type and capture = false + // for performance concern, if task.length === 1, just invoke + if (tasks.length === 1) { + invokeTask(tasks[0], target, event); + } + else { + // https://github.com/angular/zone.js/issues/836 + // copy the tasks array before invoke, to avoid + // the callback will remove itself or other listener + var copyTasks = tasks.slice(); + for (var i = 0; i < copyTasks.length; i++) { + if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) { + break; + } + invokeTask(copyTasks[i], target, event); + } + } + } + }; + function patchEventTargetMethods(obj, patchOptions) { + if (!obj) { + return false; + } + var useGlobalCallback = true; + if (patchOptions && patchOptions.useG !== undefined) { + useGlobalCallback = patchOptions.useG; + } + var validateHandler = patchOptions && patchOptions.vh; + var checkDuplicate = true; + if (patchOptions && patchOptions.chkDup !== undefined) { + checkDuplicate = patchOptions.chkDup; + } + var returnTarget = false; + if (patchOptions && patchOptions.rt !== undefined) { + returnTarget = patchOptions.rt; + } + var proto = obj; + while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) { + proto = ObjectGetPrototypeOf(proto); + } + if (!proto && obj[ADD_EVENT_LISTENER]) { + // somehow we did not find it, but we can see it. This happens on IE for Window properties. + proto = obj; + } + if (!proto) { + return false; + } + if (proto[zoneSymbolAddEventListener]) { + return false; + } + var eventNameToString = patchOptions && patchOptions.eventNameToString; + // a shared global taskData to pass data for scheduleEventTask + // so we do not need to create a new object just for pass some data + var taskData = {}; + var nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER]; + var nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] = + proto[REMOVE_EVENT_LISTENER]; + var nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] = + proto[LISTENERS_EVENT_LISTENER]; + var nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] = + proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER]; + var nativePrependEventListener; + if (patchOptions && patchOptions.prepend) { + nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] = + proto[patchOptions.prepend]; + } + function checkIsPassive(task) { + if (!passiveSupported && typeof taskData.options !== 'boolean' && + typeof taskData.options !== 'undefined' && taskData.options !== null) { + // options is a non-null non-undefined object + // passive is not supported + // don't pass options as object + // just pass capture as a boolean + task.options = !!taskData.options.capture; + taskData.options = task.options; + } + } + var customScheduleGlobal = function (task) { + // if there is already a task for the eventName + capture, + // just return, because we use the shared globalZoneAwareCallback here. + if (taskData.isExisting) { + return; + } + checkIsPassive(task); + return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options); + }; + var customCancelGlobal = function (task) { + // if task is not marked as isRemoved, this call is directly + // from Zone.prototype.cancelTask, we should remove the task + // from tasksList of target first + if (!task.isRemoved) { + var symbolEventNames = zoneSymbolEventNames$1[task.eventName]; + var symbolEventName = void 0; + if (symbolEventNames) { + symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR]; + } + var existingTasks = symbolEventName && task.target[symbolEventName]; + if (existingTasks) { + for (var i = 0; i < existingTasks.length; i++) { + var existingTask = existingTasks[i]; + if (existingTask === task) { + existingTasks.splice(i, 1); + // set isRemoved to data for faster invokeTask check + task.isRemoved = true; + if (existingTasks.length === 0) { + // all tasks for the eventName + capture have gone, + // remove globalZoneAwareCallback and remove the task cache from target + task.allRemoved = true; + task.target[symbolEventName] = null; + } + break; + } + } + } + } + // if all tasks for the eventName + capture have gone, + // we will really remove the global event callback, + // if not, return + if (!task.allRemoved) { + return; + } + return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options); + }; + var customScheduleNonGlobal = function (task) { + checkIsPassive(task); + return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options); + }; + var customSchedulePrepend = function (task) { + return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options); + }; + var customCancelNonGlobal = function (task) { + return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options); + }; + var customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal; + var customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal; + var compareTaskCallbackVsDelegate = function (task, delegate) { + var typeOfDelegate = typeof delegate; + return (typeOfDelegate === 'function' && task.callback === delegate) || + (typeOfDelegate === 'object' && task.originalDelegate === delegate); + }; + var compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate; + var blackListedEvents = Zone[Zone.__symbol__('BLACK_LISTED_EVENTS')]; + var makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget, prepend) { + if (returnTarget === void 0) { returnTarget = false; } + if (prepend === void 0) { prepend = false; } + return function () { + var target = this || _global; + var eventName = arguments[0]; + var delegate = arguments[1]; + if (!delegate) { + return nativeListener.apply(this, arguments); + } + if (isNode && eventName === 'uncaughtException') { + // don't patch uncaughtException of nodejs to prevent endless loop + return nativeListener.apply(this, arguments); + } + // don't create the bind delegate function for handleEvent + // case here to improve addEventListener performance + // we will create the bind delegate when invoke + var isHandleEvent = false; + if (typeof delegate !== 'function') { + if (!delegate.handleEvent) { + return nativeListener.apply(this, arguments); + } + isHandleEvent = true; + } + if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) { + return; + } + var options = arguments[2]; + if (blackListedEvents) { + // check black list + for (var i = 0; i < blackListedEvents.length; i++) { + if (eventName === blackListedEvents[i]) { + return nativeListener.apply(this, arguments); + } + } + } + var capture; + var once = false; + if (options === undefined) { + capture = false; + } + else if (options === true) { + capture = true; + } + else if (options === false) { + capture = false; + } + else { + capture = options ? !!options.capture : false; + once = options ? !!options.once : false; + } + var zone = Zone.current; + var symbolEventNames = zoneSymbolEventNames$1[eventName]; + var symbolEventName; + if (!symbolEventNames) { + // the code is duplicate, but I just want to get some better performance + var falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR; + var trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR; + var symbol = ZONE_SYMBOL_PREFIX + falseEventName; + var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; + zoneSymbolEventNames$1[eventName] = {}; + zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol; + zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture; + symbolEventName = capture ? symbolCapture : symbol; + } + else { + symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR]; + } + var existingTasks = target[symbolEventName]; + var isExisting = false; + if (existingTasks) { + // already have task registered + isExisting = true; + if (checkDuplicate) { + for (var i = 0; i < existingTasks.length; i++) { + if (compare(existingTasks[i], delegate)) { + // same callback, same capture, same event name, just return + return; + } + } + } + } + else { + existingTasks = target[symbolEventName] = []; + } + var source; + var constructorName = target.constructor['name']; + var targetSource = globalSources[constructorName]; + if (targetSource) { + source = targetSource[eventName]; + } + if (!source) { + source = constructorName + addSource + + (eventNameToString ? eventNameToString(eventName) : eventName); + } + // do not create a new object as task.data to pass those things + // just use the global shared one + taskData.options = options; + if (once) { + // if addEventListener with once options, we don't pass it to + // native addEventListener, instead we keep the once setting + // and handle ourselves. + taskData.options.once = false; + } + taskData.target = target; + taskData.capture = capture; + taskData.eventName = eventName; + taskData.isExisting = isExisting; + var data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined; + // keep taskData into data to allow onScheduleEventTask to access the task information + if (data) { + data.taskData = taskData; + } + var task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn); + // should clear taskData.target to avoid memory leak + // issue, https://github.com/angular/angular/issues/20442 + taskData.target = null; + // need to clear up taskData because it is a global object + if (data) { + data.taskData = null; + } + // have to save those information to task in case + // application may call task.zone.cancelTask() directly + if (once) { + options.once = true; + } + if (!(!passiveSupported && typeof task.options === 'boolean')) { + // if not support passive, and we pass an option object + // to addEventListener, we should save the options to task + task.options = options; + } + task.target = target; + task.capture = capture; + task.eventName = eventName; + if (isHandleEvent) { + // save original delegate for compare to check duplicate + task.originalDelegate = delegate; + } + if (!prepend) { + existingTasks.push(task); + } + else { + existingTasks.unshift(task); + } + if (returnTarget) { + return target; + } + }; + }; + proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget); + if (nativePrependEventListener) { + proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true); + } + proto[REMOVE_EVENT_LISTENER] = function () { + var target = this || _global; + var eventName = arguments[0]; + var options = arguments[2]; + var capture; + if (options === undefined) { + capture = false; + } + else if (options === true) { + capture = true; + } + else if (options === false) { + capture = false; + } + else { + capture = options ? !!options.capture : false; + } + var delegate = arguments[1]; + if (!delegate) { + return nativeRemoveEventListener.apply(this, arguments); + } + if (validateHandler && + !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) { + return; + } + var symbolEventNames = zoneSymbolEventNames$1[eventName]; + var symbolEventName; + if (symbolEventNames) { + symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR]; + } + var existingTasks = symbolEventName && target[symbolEventName]; + if (existingTasks) { + for (var i = 0; i < existingTasks.length; i++) { + var existingTask = existingTasks[i]; + if (compare(existingTask, delegate)) { + existingTasks.splice(i, 1); + // set isRemoved to data for faster invokeTask check + existingTask.isRemoved = true; + if (existingTasks.length === 0) { + // all tasks for the eventName + capture have gone, + // remove globalZoneAwareCallback and remove the task cache from target + existingTask.allRemoved = true; + target[symbolEventName] = null; + } + existingTask.zone.cancelTask(existingTask); + if (returnTarget) { + return target; + } + return; + } + } + } + // issue 930, didn't find the event name or callback + // from zone kept existingTasks, the callback maybe + // added outside of zone, we need to call native removeEventListener + // to try to remove it. + return nativeRemoveEventListener.apply(this, arguments); + }; + proto[LISTENERS_EVENT_LISTENER] = function () { + var target = this || _global; + var eventName = arguments[0]; + var listeners = []; + var tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName); + for (var i = 0; i < tasks.length; i++) { + var task = tasks[i]; + var delegate = task.originalDelegate ? task.originalDelegate : task.callback; + listeners.push(delegate); + } + return listeners; + }; + proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () { + var target = this || _global; + var eventName = arguments[0]; + if (!eventName) { + var keys = Object.keys(target); + for (var i = 0; i < keys.length; i++) { + var prop = keys[i]; + var match = EVENT_NAME_SYMBOL_REGX.exec(prop); + var evtName = match && match[1]; + // in nodejs EventEmitter, removeListener event is + // used for monitoring the removeListener call, + // so just keep removeListener eventListener until + // all other eventListeners are removed + if (evtName && evtName !== 'removeListener') { + this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName); + } + } + // remove removeListener listener finally + this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener'); + } + else { + var symbolEventNames = zoneSymbolEventNames$1[eventName]; + if (symbolEventNames) { + var symbolEventName = symbolEventNames[FALSE_STR]; + var symbolCaptureEventName = symbolEventNames[TRUE_STR]; + var tasks = target[symbolEventName]; + var captureTasks = target[symbolCaptureEventName]; + if (tasks) { + var removeTasks = tasks.slice(); + for (var i = 0; i < removeTasks.length; i++) { + var task = removeTasks[i]; + var delegate = task.originalDelegate ? task.originalDelegate : task.callback; + this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options); + } + } + if (captureTasks) { + var removeTasks = captureTasks.slice(); + for (var i = 0; i < removeTasks.length; i++) { + var task = removeTasks[i]; + var delegate = task.originalDelegate ? task.originalDelegate : task.callback; + this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options); + } + } + } + } + if (returnTarget) { + return this; + } + }; + // for native toString patch + attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener); + attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener); + if (nativeRemoveAllListeners) { + attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners); + } + if (nativeListeners) { + attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners); + } + return true; + } + var results = []; + for (var i = 0; i < apis.length; i++) { + results[i] = patchEventTargetMethods(apis[i], patchOptions); + } + return results; +} +function findEventTasks(target, eventName) { + var foundTasks = []; + for (var prop in target) { + var match = EVENT_NAME_SYMBOL_REGX.exec(prop); + var evtName = match && match[1]; + if (evtName && (!eventName || evtName === eventName)) { + var tasks = target[prop]; + if (tasks) { + for (var i = 0; i < tasks.length; i++) { + foundTasks.push(tasks[i]); + } + } + } + } + return foundTasks; +} +function patchEventPrototype(global, api) { + var Event = global['Event']; + if (Event && Event.prototype) { + api.patchMethod(Event.prototype, 'stopImmediatePropagation', function (delegate) { return function (self, args) { + self[IMMEDIATE_PROPAGATION_SYMBOL] = true; + // we need to call the native stopImmediatePropagation + // in case in some hybrid application, some part of + // application will be controlled by zone, some are not + delegate && delegate.apply(self, args); + }; }); + } +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +function patchCallbacks(api, target, targetName, method, callbacks) { + var symbol = Zone.__symbol__(method); + if (target[symbol]) { + return; + } + var nativeDelegate = target[symbol] = target[method]; + target[method] = function (name, opts, options) { + if (opts && opts.prototype) { + callbacks.forEach(function (callback) { + var source = targetName + "." + method + "::" + callback; + var prototype = opts.prototype; + if (prototype.hasOwnProperty(callback)) { + var descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback); + if (descriptor && descriptor.value) { + descriptor.value = api.wrapWithCurrentZone(descriptor.value, source); + api._redefineProperty(opts.prototype, callback, descriptor); + } + else if (prototype[callback]) { + prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source); + } + } + else if (prototype[callback]) { + prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source); + } + }); + } + return nativeDelegate.call(target, name, opts, options); + }; + api.attachOriginToPatched(target[method], nativeDelegate); +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/* + * This is necessary for Chrome and Chrome mobile, to enable + * things like redefining `createdCallback` on an element. + */ +var zoneSymbol$1 = Zone.__symbol__; +var _defineProperty = Object[zoneSymbol$1('defineProperty')] = Object.defineProperty; +var _getOwnPropertyDescriptor = Object[zoneSymbol$1('getOwnPropertyDescriptor')] = + Object.getOwnPropertyDescriptor; +var _create = Object.create; +var unconfigurablesKey = zoneSymbol$1('unconfigurables'); +function propertyPatch() { + Object.defineProperty = function (obj, prop, desc) { + if (isUnconfigurable(obj, prop)) { + throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj); + } + var originalConfigurableFlag = desc.configurable; + if (prop !== 'prototype') { + desc = rewriteDescriptor(obj, prop, desc); + } + return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag); + }; + Object.defineProperties = function (obj, props) { + Object.keys(props).forEach(function (prop) { + Object.defineProperty(obj, prop, props[prop]); + }); + return obj; + }; + Object.create = function (obj, proto) { + if (typeof proto === 'object' && !Object.isFrozen(proto)) { + Object.keys(proto).forEach(function (prop) { + proto[prop] = rewriteDescriptor(obj, prop, proto[prop]); + }); + } + return _create(obj, proto); + }; + Object.getOwnPropertyDescriptor = function (obj, prop) { + var desc = _getOwnPropertyDescriptor(obj, prop); + if (desc && isUnconfigurable(obj, prop)) { + desc.configurable = false; + } + return desc; + }; +} +function _redefineProperty(obj, prop, desc) { + var originalConfigurableFlag = desc.configurable; + desc = rewriteDescriptor(obj, prop, desc); + return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag); +} +function isUnconfigurable(obj, prop) { + return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop]; +} +function rewriteDescriptor(obj, prop, desc) { + // issue-927, if the desc is frozen, don't try to change the desc + if (!Object.isFrozen(desc)) { + desc.configurable = true; + } + if (!desc.configurable) { + // issue-927, if the obj is frozen, don't try to set the desc to obj + if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) { + _defineProperty(obj, unconfigurablesKey, { writable: true, value: {} }); + } + if (obj[unconfigurablesKey]) { + obj[unconfigurablesKey][prop] = true; + } + } + return desc; +} +function _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) { + try { + return _defineProperty(obj, prop, desc); + } + catch (error) { + if (desc.configurable) { + // In case of errors, when the configurable flag was likely set by rewriteDescriptor(), let's + // retry with the original flag value + if (typeof originalConfigurableFlag == 'undefined') { + delete desc.configurable; + } + else { + desc.configurable = originalConfigurableFlag; + } + try { + return _defineProperty(obj, prop, desc); + } + catch (error) { + var descJson = null; + try { + descJson = JSON.stringify(desc); + } + catch (error) { + descJson = desc.toString(); + } + console.log("Attempting to configure '" + prop + "' with descriptor '" + descJson + "' on object '" + obj + "' and got error, giving up: " + error); + } + } + else { + throw error; + } + } +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/** + * @fileoverview + * @suppress {globalThis} + */ +var globalEventHandlersEventNames = [ + 'abort', + 'animationcancel', + 'animationend', + 'animationiteration', + 'auxclick', + 'beforeinput', + 'blur', + 'cancel', + 'canplay', + 'canplaythrough', + 'change', + 'compositionstart', + 'compositionupdate', + 'compositionend', + 'cuechange', + 'click', + 'close', + 'contextmenu', + 'curechange', + 'dblclick', + 'drag', + 'dragend', + 'dragenter', + 'dragexit', + 'dragleave', + 'dragover', + 'drop', + 'durationchange', + 'emptied', + 'ended', + 'error', + 'focus', + 'focusin', + 'focusout', + 'gotpointercapture', + 'input', + 'invalid', + 'keydown', + 'keypress', + 'keyup', + 'load', + 'loadstart', + 'loadeddata', + 'loadedmetadata', + 'lostpointercapture', + 'mousedown', + 'mouseenter', + 'mouseleave', + 'mousemove', + 'mouseout', + 'mouseover', + 'mouseup', + 'mousewheel', + 'orientationchange', + 'pause', + 'play', + 'playing', + 'pointercancel', + 'pointerdown', + 'pointerenter', + 'pointerleave', + 'pointerlockchange', + 'mozpointerlockchange', + 'webkitpointerlockerchange', + 'pointerlockerror', + 'mozpointerlockerror', + 'webkitpointerlockerror', + 'pointermove', + 'pointout', + 'pointerover', + 'pointerup', + 'progress', + 'ratechange', + 'reset', + 'resize', + 'scroll', + 'seeked', + 'seeking', + 'select', + 'selectionchange', + 'selectstart', + 'show', + 'sort', + 'stalled', + 'submit', + 'suspend', + 'timeupdate', + 'volumechange', + 'touchcancel', + 'touchmove', + 'touchstart', + 'touchend', + 'transitioncancel', + 'transitionend', + 'waiting', + 'wheel' +]; +var documentEventNames = [ + 'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange', + 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror', + 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange', + 'visibilitychange', 'resume' +]; +var windowEventNames = [ + 'absolutedeviceorientation', + 'afterinput', + 'afterprint', + 'appinstalled', + 'beforeinstallprompt', + 'beforeprint', + 'beforeunload', + 'devicelight', + 'devicemotion', + 'deviceorientation', + 'deviceorientationabsolute', + 'deviceproximity', + 'hashchange', + 'languagechange', + 'message', + 'mozbeforepaint', + 'offline', + 'online', + 'paint', + 'pageshow', + 'pagehide', + 'popstate', + 'rejectionhandled', + 'storage', + 'unhandledrejection', + 'unload', + 'userproximity', + 'vrdisplyconnected', + 'vrdisplaydisconnected', + 'vrdisplaypresentchange' +]; +var htmlElementEventNames = [ + 'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend', + 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend', + 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend' +]; +var mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend']; +var ieElementEventNames = [ + 'activate', + 'afterupdate', + 'ariarequest', + 'beforeactivate', + 'beforedeactivate', + 'beforeeditfocus', + 'beforeupdate', + 'cellchange', + 'controlselect', + 'dataavailable', + 'datasetchanged', + 'datasetcomplete', + 'errorupdate', + 'filterchange', + 'layoutcomplete', + 'losecapture', + 'move', + 'moveend', + 'movestart', + 'propertychange', + 'resizeend', + 'resizestart', + 'rowenter', + 'rowexit', + 'rowsdelete', + 'rowsinserted', + 'command', + 'compassneedscalibration', + 'deactivate', + 'help', + 'mscontentzoom', + 'msmanipulationstatechanged', + 'msgesturechange', + 'msgesturedoubletap', + 'msgestureend', + 'msgesturehold', + 'msgesturestart', + 'msgesturetap', + 'msgotpointercapture', + 'msinertiastart', + 'mslostpointercapture', + 'mspointercancel', + 'mspointerdown', + 'mspointerenter', + 'mspointerhover', + 'mspointerleave', + 'mspointermove', + 'mspointerout', + 'mspointerover', + 'mspointerup', + 'pointerout', + 'mssitemodejumplistitemremoved', + 'msthumbnailclick', + 'stop', + 'storagecommit' +]; +var webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror']; +var formEventNames = ['autocomplete', 'autocompleteerror']; +var detailEventNames = ['toggle']; +var frameEventNames = ['load']; +var frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror']; +var marqueeEventNames = ['bounce', 'finish', 'start']; +var XMLHttpRequestEventNames = [ + 'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend', + 'readystatechange' +]; +var IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close']; +var websocketEventNames = ['close', 'error', 'open', 'message']; +var workerEventNames = ['error', 'message']; +var eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames); +function filterProperties(target, onProperties, ignoreProperties) { + if (!ignoreProperties || ignoreProperties.length === 0) { + return onProperties; + } + var tip = ignoreProperties.filter(function (ip) { return ip.target === target; }); + if (!tip || tip.length === 0) { + return onProperties; + } + var targetIgnoreProperties = tip[0].ignoreProperties; + return onProperties.filter(function (op) { return targetIgnoreProperties.indexOf(op) === -1; }); +} +function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) { + // check whether target is available, sometimes target will be undefined + // because different browser or some 3rd party plugin. + if (!target) { + return; + } + var filteredProperties = filterProperties(target, onProperties, ignoreProperties); + patchOnProperties(target, filteredProperties, prototype); +} +function propertyDescriptorPatch(api, _global) { + if (isNode && !isMix) { + return; + } + if (Zone[api.symbol('patchEvents')]) { + // events are already been patched by legacy patch. + return; + } + var supportsWebSocket = typeof WebSocket !== 'undefined'; + var ignoreProperties = _global['__Zone_ignore_on_properties']; + // for browsers that we can patch the descriptor: Chrome & Firefox + if (isBrowser) { + var internalWindow = window; + var ignoreErrorProperties = isIE ? [{ target: internalWindow, ignoreProperties: ['error'] }] : []; + // in IE/Edge, onProp not exist in window object, but in WindowPrototype + // so we need to pass WindowPrototype to check onProp exist or not + patchFilteredProperties(internalWindow, eventNames.concat(['messageerror']), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow)); + patchFilteredProperties(Document.prototype, eventNames, ignoreProperties); + if (typeof internalWindow['SVGElement'] !== 'undefined') { + patchFilteredProperties(internalWindow['SVGElement'].prototype, eventNames, ignoreProperties); + } + patchFilteredProperties(Element.prototype, eventNames, ignoreProperties); + patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties); + patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties); + patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties); + patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties); + patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties); + patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties); + var HTMLMarqueeElement_1 = internalWindow['HTMLMarqueeElement']; + if (HTMLMarqueeElement_1) { + patchFilteredProperties(HTMLMarqueeElement_1.prototype, marqueeEventNames, ignoreProperties); + } + var Worker_1 = internalWindow['Worker']; + if (Worker_1) { + patchFilteredProperties(Worker_1.prototype, workerEventNames, ignoreProperties); + } + } + var XMLHttpRequest = _global['XMLHttpRequest']; + if (XMLHttpRequest) { + // XMLHttpRequest is not available in ServiceWorker, so we need to check here + patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties); + } + var XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget']; + if (XMLHttpRequestEventTarget) { + patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties); + } + if (typeof IDBIndex !== 'undefined') { + patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties); + patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties); + patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties); + patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties); + patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties); + patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties); + } + if (supportsWebSocket) { + patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties); + } +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +Zone.__load_patch('util', function (global, Zone, api) { + api.patchOnProperties = patchOnProperties; + api.patchMethod = patchMethod; + api.bindArguments = bindArguments; + api.patchMacroTask = patchMacroTask; + // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to + // define which events will not be patched by `Zone.js`. + // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep + // the name consistent with angular repo. + // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for + // backwards compatibility. + var SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS'); + var SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS'); + if (global[SYMBOL_UNPATCHED_EVENTS]) { + global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS]; + } + if (global[SYMBOL_BLACK_LISTED_EVENTS]) { + Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] = + global[SYMBOL_BLACK_LISTED_EVENTS]; + } + api.patchEventPrototype = patchEventPrototype; + api.patchEventTarget = patchEventTarget; + api.isIEOrEdge = isIEOrEdge; + api.ObjectDefineProperty = ObjectDefineProperty; + api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor; + api.ObjectCreate = ObjectCreate; + api.ArraySlice = ArraySlice; + api.patchClass = patchClass; + api.wrapWithCurrentZone = wrapWithCurrentZone; + api.filterProperties = filterProperties; + api.attachOriginToPatched = attachOriginToPatched; + api._redefineProperty = _redefineProperty; + api.patchCallbacks = patchCallbacks; + api.getGlobalObjects = function () { return ({ + globalSources: globalSources, + zoneSymbolEventNames: zoneSymbolEventNames$1, + eventNames: eventNames, + isBrowser: isBrowser, + isMix: isMix, + isNode: isNode, + TRUE_STR: TRUE_STR, + FALSE_STR: FALSE_STR, + ZONE_SYMBOL_PREFIX: ZONE_SYMBOL_PREFIX, + ADD_EVENT_LISTENER_STR: ADD_EVENT_LISTENER_STR, + REMOVE_EVENT_LISTENER_STR: REMOVE_EVENT_LISTENER_STR + }); }; +}); + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +function eventTargetLegacyPatch(_global, api) { + var _a = api.getGlobalObjects(), eventNames = _a.eventNames, globalSources = _a.globalSources, zoneSymbolEventNames = _a.zoneSymbolEventNames, TRUE_STR = _a.TRUE_STR, FALSE_STR = _a.FALSE_STR, ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX; + var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video'; + var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket' + .split(','); + var EVENT_TARGET = 'EventTarget'; + var apis = []; + var isWtf = _global['wtf']; + var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(','); + if (isWtf) { + // Workaround for: https://github.com/google/tracing-framework/issues/555 + apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET); + } + else if (_global[EVENT_TARGET]) { + apis.push(EVENT_TARGET); + } + else { + // Note: EventTarget is not available in all browsers, + // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget + apis = NO_EVENT_TARGET; + } + var isDisableIECheck = _global['__Zone_disable_IE_check'] || false; + var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false; + var ieOrEdge = api.isIEOrEdge(); + var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:'; + var FUNCTION_WRAPPER = '[object FunctionWrapper]'; + var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }'; + // predefine all __zone_symbol__ + eventName + true/false string + for (var i = 0; i < eventNames.length; i++) { + var eventName = eventNames[i]; + var falseEventName = eventName + FALSE_STR; + var trueEventName = eventName + TRUE_STR; + var symbol = ZONE_SYMBOL_PREFIX + falseEventName; + var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; + zoneSymbolEventNames[eventName] = {}; + zoneSymbolEventNames[eventName][FALSE_STR] = symbol; + zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture; + } + // predefine all task.source string + for (var i = 0; i < WTF_ISSUE_555.length; i++) { + var target = WTF_ISSUE_555_ARRAY[i]; + var targets = globalSources[target] = {}; + for (var j = 0; j < eventNames.length; j++) { + var eventName = eventNames[j]; + targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName; + } + } + var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) { + if (!isDisableIECheck && ieOrEdge) { + if (isEnableCrossContextCheck) { + try { + var testString = delegate.toString(); + if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) { + nativeDelegate.apply(target, args); + return false; + } + } + catch (error) { + nativeDelegate.apply(target, args); + return false; + } + } + else { + var testString = delegate.toString(); + if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) { + nativeDelegate.apply(target, args); + return false; + } + } + } + else if (isEnableCrossContextCheck) { + try { + delegate.toString(); + } + catch (error) { + nativeDelegate.apply(target, args); + return false; + } + } + return true; + }; + var apiTypes = []; + for (var i = 0; i < apis.length; i++) { + var type = _global[apis[i]]; + apiTypes.push(type && type.prototype); + } + // vh is validateHandler to check event handler + // is valid or not(for security check) + api.patchEventTarget(_global, apiTypes, { vh: checkIEAndCrossContext }); + Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET]; + return true; +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +// we have to patch the instance since the proto is non-configurable +function apply(api, _global) { + var _a = api.getGlobalObjects(), ADD_EVENT_LISTENER_STR = _a.ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR = _a.REMOVE_EVENT_LISTENER_STR; + var WS = _global.WebSocket; + // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener + // On older Chrome, no need since EventTarget was already patched + if (!_global.EventTarget) { + api.patchEventTarget(_global, [WS.prototype]); + } + _global.WebSocket = function (x, y) { + var socket = arguments.length > 1 ? new WS(x, y) : new WS(x); + var proxySocket; + var proxySocketProto; + // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance + var onmessageDesc = api.ObjectGetOwnPropertyDescriptor(socket, 'onmessage'); + if (onmessageDesc && onmessageDesc.configurable === false) { + proxySocket = api.ObjectCreate(socket); + // socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror' + // but proxySocket not, so we will keep socket as prototype and pass it to + // patchOnProperties method + proxySocketProto = socket; + [ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) { + proxySocket[propName] = function () { + var args = api.ArraySlice.call(arguments); + if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) { + var eventName = args.length > 0 ? args[0] : undefined; + if (eventName) { + var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName); + socket[propertySymbol] = proxySocket[propertySymbol]; + } + } + return socket[propName].apply(socket, args); + }; + }); + } + else { + // we can patch the real socket + proxySocket = socket; + } + api.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto); + return proxySocket; + }; + var globalWebSocket = _global['WebSocket']; + for (var prop in WS) { + globalWebSocket[prop] = WS[prop]; + } +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/** + * @fileoverview + * @suppress {globalThis} + */ +function propertyDescriptorLegacyPatch(api, _global) { + var _a = api.getGlobalObjects(), isNode = _a.isNode, isMix = _a.isMix; + if (isNode && !isMix) { + return; + } + if (!canPatchViaPropertyDescriptor(api, _global)) { + var supportsWebSocket = typeof WebSocket !== 'undefined'; + // Safari, Android browsers (Jelly Bean) + patchViaCapturingAllTheEvents(api); + api.patchClass('XMLHttpRequest'); + if (supportsWebSocket) { + apply(api, _global); + } + Zone[api.symbol('patchEvents')] = true; + } +} +function canPatchViaPropertyDescriptor(api, _global) { + var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix; + if ((isBrowser || isMix) && + !api.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') && + typeof Element !== 'undefined') { + // WebKit https://bugs.webkit.org/show_bug.cgi?id=134364 + // IDL interface attributes are not configurable + var desc = api.ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick'); + if (desc && !desc.configurable) + return false; + // try to use onclick to detect whether we can patch via propertyDescriptor + // because XMLHttpRequest is not available in service worker + if (desc) { + api.ObjectDefineProperty(Element.prototype, 'onclick', { + enumerable: true, + configurable: true, + get: function () { + return true; + } + }); + var div = document.createElement('div'); + var result = !!div.onclick; + api.ObjectDefineProperty(Element.prototype, 'onclick', desc); + return result; + } + } + var XMLHttpRequest = _global['XMLHttpRequest']; + if (!XMLHttpRequest) { + // XMLHttpRequest is not available in service worker + return false; + } + var ON_READY_STATE_CHANGE = 'onreadystatechange'; + var XMLHttpRequestPrototype = XMLHttpRequest.prototype; + var xhrDesc = api.ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE); + // add enumerable and configurable here because in opera + // by default XMLHttpRequest.prototype.onreadystatechange is undefined + // without adding enumerable and configurable will cause onreadystatechange + // non-configurable + // and if XMLHttpRequest.prototype.onreadystatechange is undefined, + // we should set a real desc instead a fake one + if (xhrDesc) { + api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, { + enumerable: true, + configurable: true, + get: function () { + return true; + } + }); + var req = new XMLHttpRequest(); + var result = !!req.onreadystatechange; + // restore original desc + api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {}); + return result; + } + else { + var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = api.symbol('fake'); + api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, { + enumerable: true, + configurable: true, + get: function () { + return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1]; + }, + set: function (value) { + this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value; + } + }); + var req = new XMLHttpRequest(); + var detectFunc = function () { }; + req.onreadystatechange = detectFunc; + var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc; + req.onreadystatechange = null; + return result; + } +} +// Whenever any eventListener fires, we check the eventListener target and all parents +// for `onwhatever` properties and replace them with zone-bound functions +// - Chrome (for now) +function patchViaCapturingAllTheEvents(api) { + var eventNames = api.getGlobalObjects().eventNames; + var unboundKey = api.symbol('unbound'); + var _loop_1 = function (i) { + var property = eventNames[i]; + var onproperty = 'on' + property; + self.addEventListener(property, function (event) { + var elt = event.target, bound, source; + if (elt) { + source = elt.constructor['name'] + '.' + onproperty; + } + else { + source = 'unknown.' + onproperty; + } + while (elt) { + if (elt[onproperty] && !elt[onproperty][unboundKey]) { + bound = api.wrapWithCurrentZone(elt[onproperty], source); + bound[unboundKey] = elt[onproperty]; + elt[onproperty] = bound; + } + elt = elt.parentElement; + } + }, true); + }; + for (var i = 0; i < eventNames.length; i++) { + _loop_1(i); + } +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +function registerElementPatch(_global, api) { + var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix; + if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) { + return; + } + var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback']; + api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks); +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/** + * @fileoverview + * @suppress {missingRequire} + */ +(function (_global) { + _global['__zone_symbol__legacyPatch'] = function () { + var Zone = _global['Zone']; + Zone.__load_patch('registerElement', function (global, Zone, api) { + registerElementPatch(global, api); + }); + Zone.__load_patch('EventTargetLegacy', function (global, Zone, api) { + eventTargetLegacyPatch(global, api); + propertyDescriptorLegacyPatch(api, global); + }); + }; +})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global); + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/** + * @fileoverview + * @suppress {missingRequire} + */ +var taskSymbol = zoneSymbol('zoneTask'); +function patchTimer(window, setName, cancelName, nameSuffix) { + var setNative = null; + var clearNative = null; + setName += nameSuffix; + cancelName += nameSuffix; + var tasksByHandleId = {}; + function scheduleTask(task) { + var data = task.data; + function timer() { + try { + task.invoke.apply(this, arguments); + } + finally { + // issue-934, task will be cancelled + // even it is a periodic task such as + // setInterval + if (!(task.data && task.data.isPeriodic)) { + if (typeof data.handleId === 'number') { + // in non-nodejs env, we remove timerId + // from local cache + delete tasksByHandleId[data.handleId]; + } + else if (data.handleId) { + // Node returns complex objects as handleIds + // we remove task reference from timer object + data.handleId[taskSymbol] = null; + } + } + } + } + data.args[0] = timer; + data.handleId = setNative.apply(window, data.args); + return task; + } + function clearTask(task) { + return clearNative(task.data.handleId); + } + setNative = + patchMethod(window, setName, function (delegate) { return function (self, args) { + if (typeof args[0] === 'function') { + var options = { + isPeriodic: nameSuffix === 'Interval', + delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 : + undefined, + args: args + }; + var task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask); + if (!task) { + return task; + } + // Node.js must additionally support the ref and unref functions. + var handle = task.data.handleId; + if (typeof handle === 'number') { + // for non nodejs env, we save handleId: task + // mapping in local cache for clearTimeout + tasksByHandleId[handle] = task; + } + else if (handle) { + // for nodejs env, we save task + // reference in timerId Object for clearTimeout + handle[taskSymbol] = task; + } + // check whether handle is null, because some polyfill or browser + // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame + if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' && + typeof handle.unref === 'function') { + task.ref = handle.ref.bind(handle); + task.unref = handle.unref.bind(handle); + } + if (typeof handle === 'number' || handle) { + return handle; + } + return task; + } + else { + // cause an error by calling it directly. + return delegate.apply(window, args); + } + }; }); + clearNative = + patchMethod(window, cancelName, function (delegate) { return function (self, args) { + var id = args[0]; + var task; + if (typeof id === 'number') { + // non nodejs env. + task = tasksByHandleId[id]; + } + else { + // nodejs env. + task = id && id[taskSymbol]; + // other environments. + if (!task) { + task = id; + } + } + if (task && typeof task.type === 'string') { + if (task.state !== 'notScheduled' && + (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) { + if (typeof id === 'number') { + delete tasksByHandleId[id]; + } + else if (id) { + id[taskSymbol] = null; + } + // Do not cancel already canceled functions + task.zone.cancelTask(task); + } + } + else { + // cause an error by calling it directly. + delegate.apply(window, args); + } + }; }); +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +function patchCustomElements(_global, api) { + var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix; + if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) { + return; + } + var callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback']; + api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks); +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +function eventTargetPatch(_global, api) { + if (Zone[api.symbol('patchEventTarget')]) { + // EventTarget is already patched. + return; + } + var _a = api.getGlobalObjects(), eventNames = _a.eventNames, zoneSymbolEventNames = _a.zoneSymbolEventNames, TRUE_STR = _a.TRUE_STR, FALSE_STR = _a.FALSE_STR, ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX; + // predefine all __zone_symbol__ + eventName + true/false string + for (var i = 0; i < eventNames.length; i++) { + var eventName = eventNames[i]; + var falseEventName = eventName + FALSE_STR; + var trueEventName = eventName + TRUE_STR; + var symbol = ZONE_SYMBOL_PREFIX + falseEventName; + var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; + zoneSymbolEventNames[eventName] = {}; + zoneSymbolEventNames[eventName][FALSE_STR] = symbol; + zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture; + } + var EVENT_TARGET = _global['EventTarget']; + if (!EVENT_TARGET || !EVENT_TARGET.prototype) { + return; + } + api.patchEventTarget(_global, [EVENT_TARGET && EVENT_TARGET.prototype]); + return true; +} +function patchEvent$1(global, api) { + api.patchEventPrototype(global, api); +} + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ +/** + * @fileoverview + * @suppress {missingRequire} + */ +Zone.__load_patch('legacy', function (global) { + var legacyPatch = global[Zone.__symbol__('legacyPatch')]; + if (legacyPatch) { + legacyPatch(); + } +}); +Zone.__load_patch('timers', function (global) { + var set = 'set'; + var clear = 'clear'; + patchTimer(global, set, clear, 'Timeout'); + patchTimer(global, set, clear, 'Interval'); + patchTimer(global, set, clear, 'Immediate'); +}); +Zone.__load_patch('requestAnimationFrame', function (global) { + patchTimer(global, 'request', 'cancel', 'AnimationFrame'); + patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame'); + patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame'); +}); +Zone.__load_patch('blocking', function (global, Zone) { + var blockingMethods = ['alert', 'prompt', 'confirm']; + for (var i = 0; i < blockingMethods.length; i++) { + var name_1 = blockingMethods[i]; + patchMethod(global, name_1, function (delegate, symbol, name) { + return function (s, args) { + return Zone.current.run(delegate, global, args, name); + }; + }); + } +}); +Zone.__load_patch('EventTarget', function (global, Zone, api) { + patchEvent$1(global, api); + eventTargetPatch(global, api); + // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener + var XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget']; + if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) { + api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]); + } + patchClass('MutationObserver'); + patchClass('WebKitMutationObserver'); + patchClass('IntersectionObserver'); + patchClass('FileReader'); +}); +Zone.__load_patch('on_property', function (global, Zone, api) { + propertyDescriptorPatch(api, global); + propertyPatch(); +}); +Zone.__load_patch('customElements', function (global, Zone, api) { + patchCustomElements(global, api); +}); +Zone.__load_patch('XHR', function (global, Zone) { + // Treat XMLHttpRequest as a macrotask. + patchXHR(global); + var XHR_TASK = zoneSymbol('xhrTask'); + var XHR_SYNC = zoneSymbol('xhrSync'); + var XHR_LISTENER = zoneSymbol('xhrListener'); + var XHR_SCHEDULED = zoneSymbol('xhrScheduled'); + var XHR_URL = zoneSymbol('xhrURL'); + var XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled'); + function patchXHR(window) { + var XMLHttpRequest = window['XMLHttpRequest']; + if (!XMLHttpRequest) { + // XMLHttpRequest is not available in service worker + return; + } + var XMLHttpRequestPrototype = XMLHttpRequest.prototype; + function findPendingTask(target) { + return target[XHR_TASK]; + } + var oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER]; + var oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; + if (!oriAddListener) { + var XMLHttpRequestEventTarget_1 = window['XMLHttpRequestEventTarget']; + if (XMLHttpRequestEventTarget_1) { + var XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget_1.prototype; + oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER]; + oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; + } + } + var READY_STATE_CHANGE = 'readystatechange'; + var SCHEDULED = 'scheduled'; + function scheduleTask(task) { + var data = task.data; + var target = data.target; + target[XHR_SCHEDULED] = false; + target[XHR_ERROR_BEFORE_SCHEDULED] = false; + // remove existing event listener + var listener = target[XHR_LISTENER]; + if (!oriAddListener) { + oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER]; + oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; + } + if (listener) { + oriRemoveListener.call(target, READY_STATE_CHANGE, listener); + } + var newListener = target[XHR_LISTENER] = function () { + if (target.readyState === target.DONE) { + // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with + // readyState=4 multiple times, so we need to check task state here + if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) { + // check whether the xhr has registered onload listener + // if that is the case, the task should invoke after all + // onload listeners finish. + var loadTasks = target['__zone_symbol__loadfalse']; + if (loadTasks && loadTasks.length > 0) { + var oriInvoke_1 = task.invoke; + task.invoke = function () { + // need to load the tasks again, because in other + // load listener, they may remove themselves + var loadTasks = target['__zone_symbol__loadfalse']; + for (var i = 0; i < loadTasks.length; i++) { + if (loadTasks[i] === task) { + loadTasks.splice(i, 1); + } + } + if (!data.aborted && task.state === SCHEDULED) { + oriInvoke_1.call(task); + } + }; + loadTasks.push(task); + } + else { + task.invoke(); + } + } + else if (!data.aborted && target[XHR_SCHEDULED] === false) { + // error occurs when xhr.send() + target[XHR_ERROR_BEFORE_SCHEDULED] = true; + } + } + }; + oriAddListener.call(target, READY_STATE_CHANGE, newListener); + var storedTask = target[XHR_TASK]; + if (!storedTask) { + target[XHR_TASK] = task; + } + sendNative.apply(target, data.args); + target[XHR_SCHEDULED] = true; + return task; + } + function placeholderCallback() { } + function clearTask(task) { + var data = task.data; + // Note - ideally, we would call data.target.removeEventListener here, but it's too late + // to prevent it from firing. So instead, we store info for the event listener. + data.aborted = true; + return abortNative.apply(data.target, data.args); + } + var openNative = patchMethod(XMLHttpRequestPrototype, 'open', function () { return function (self, args) { + self[XHR_SYNC] = args[2] == false; + self[XHR_URL] = args[1]; + return openNative.apply(self, args); + }; }); + var XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send'; + var fetchTaskAborting = zoneSymbol('fetchTaskAborting'); + var fetchTaskScheduling = zoneSymbol('fetchTaskScheduling'); + var sendNative = patchMethod(XMLHttpRequestPrototype, 'send', function () { return function (self, args) { + if (Zone.current[fetchTaskScheduling] === true) { + // a fetch is scheduling, so we are using xhr to polyfill fetch + // and because we already schedule macroTask for fetch, we should + // not schedule a macroTask for xhr again + return sendNative.apply(self, args); + } + if (self[XHR_SYNC]) { + // if the XHR is sync there is no task to schedule, just execute the code. + return sendNative.apply(self, args); + } + else { + var options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false }; + var task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask); + if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted && + task.state === SCHEDULED) { + // xhr request throw error when send + // we should invoke task instead of leaving a scheduled + // pending macroTask + task.invoke(); + } + } + }; }); + var abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', function () { return function (self, args) { + var task = findPendingTask(self); + if (task && typeof task.type == 'string') { + // If the XHR has already completed, do nothing. + // If the XHR has already been aborted, do nothing. + // Fix #569, call abort multiple times before done will cause + // macroTask task count be negative number + if (task.cancelFn == null || (task.data && task.data.aborted)) { + return; + } + task.zone.cancelTask(task); + } + else if (Zone.current[fetchTaskAborting] === true) { + // the abort is called from fetch polyfill, we need to call native abort of XHR. + return abortNative.apply(self, args); + } + // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no + // task + // to cancel. Do nothing. + }; }); + } +}); +Zone.__load_patch('geolocation', function (global) { + /// GEO_LOCATION + if (global['navigator'] && global['navigator'].geolocation) { + patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']); + } +}); +Zone.__load_patch('PromiseRejectionEvent', function (global, Zone) { + // handle unhandled promise rejection + function findPromiseRejectionHandler(evtName) { + return function (e) { + var eventTasks = findEventTasks(global, evtName); + eventTasks.forEach(function (eventTask) { + // windows has added unhandledrejection event listener + // trigger the event listener + var PromiseRejectionEvent = global['PromiseRejectionEvent']; + if (PromiseRejectionEvent) { + var evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection }); + eventTask.invoke(evt); + } + }); + }; + } + if (global['PromiseRejectionEvent']) { + Zone[zoneSymbol('unhandledPromiseRejectionHandler')] = + findPromiseRejectionHandler('unhandledrejection'); + Zone[zoneSymbol('rejectionHandledHandler')] = + findPromiseRejectionHandler('rejectionhandled'); + } +}); + +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +}))); + + +/***/ }), + +/***/ "./src/$$_lazy_route_resource lazy recursive": +/*!**********************************************************!*\ + !*** ./src/$$_lazy_route_resource lazy namespace object ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var map = { + "./home/home.module": "./src/app/home/home.module.ts" +}; + +function webpackAsyncContext(req) { + return Promise.resolve().then(function() { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + + var id = map[req]; + return __webpack_require__(id); + }); +} +webpackAsyncContext.keys = function webpackAsyncContextKeys() { + return Object.keys(map); +}; +webpackAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive"; +module.exports = webpackAsyncContext; + +/***/ }), + +/***/ "./src/app/animations/modal_enter.ts": +/*!*******************************************!*\ + !*** ./src/app/animations/modal_enter.ts ***! + \*******************************************/ +/*! exports provided: myEnterAnimation */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "myEnterAnimation", function() { return myEnterAnimation; }); +function myEnterAnimation(AnimationC, baseEl) { + var baseAnimation = new AnimationC(); + var backdropAnimation = new AnimationC(); + backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')); + var wrapperAnimation = new AnimationC(); + wrapperAnimation.addElement(baseEl.querySelector('.modal-wrapper')); + wrapperAnimation + .fromTo('transform', 'scaleX(0.1) scaleY(0.1)', 'translateX(0%) scaleX(1) scaleY(1)') + .fromTo('opacity', 0, 1); + backdropAnimation.fromTo('opacity', 0.01, 0.4); + return Promise.resolve(baseAnimation + .addElement(baseEl) + .easing('cubic-bezier(0.36,0.66,0.04,1)') + .duration(400) + .beforeAddClass('show-modal') + .add(backdropAnimation) + .add(wrapperAnimation)); +} + + +/***/ }), + +/***/ "./src/app/animations/modal_leave.ts": +/*!*******************************************!*\ + !*** ./src/app/animations/modal_leave.ts ***! + \*******************************************/ +/*! exports provided: myLeaveAnimation */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "myLeaveAnimation", function() { return myLeaveAnimation; }); +//see blog -- https://www.joshmorony.com/create-a-custom-modal-page-transition-animation-in-ionic/ +function myLeaveAnimation(AnimationC, baseEl) { + var baseAnimation = new AnimationC(); + var backdropAnimation = new AnimationC(); + backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')); + var wrapperAnimation = new AnimationC(); + var wrapperEl = baseEl.querySelector('.modal-wrapper'); + wrapperAnimation.addElement(wrapperEl); + var wrapperElRect = wrapperEl.getBoundingClientRect(); + wrapperAnimation + .fromTo('transform', 'scaleX(1) scaleY(1)', 'scaleX(0.1) scaleY(0.1)') + .fromTo('opacity', 1, 0); + backdropAnimation.fromTo('opacity', 0.4, 0.0); + return Promise.resolve(baseAnimation + .addElement(baseEl) + .easing('ease-out') + .duration(400) + .add(backdropAnimation) + .add(wrapperAnimation)); +} + + +/***/ }), + +/***/ "./src/app/app-routing.module.ts": +/*!***************************************!*\ + !*** ./src/app/app-routing.module.ts ***! + \***************************************/ +/*! exports provided: AppRoutingModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppRoutingModule", function() { return AppRoutingModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _incentive_award_memes_award_memes_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./incentive/award-memes/award-memes.component */ "./src/app/incentive/award-memes/award-memes.component.ts"); +/* harmony import */ var _incentive_aquarium_demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./incentive/aquarium/demo-aquarium/demo-aquarium.component */ "./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts"); +/* harmony import */ var _incentive_life_insights_sample_life_insights_sample_life_insights_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./incentive/life-insights/sample-life-insights/sample-life-insights.component */ "./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.ts"); +/* harmony import */ var _incentive_treasurechest_treasurechest_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./incentive/treasurechest/treasurechest.component */ "./src/app/incentive/treasurechest/treasurechest.component.ts"); +/* harmony import */ var _survey_sample_survey_sample_survey_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./survey/sample-survey/sample-survey.component */ "./src/app/survey/sample-survey/sample-survey.component.ts"); +/* harmony import */ var _incentive_award_altruism_award_altruism_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./incentive/award-altruism/award-altruism.component */ "./src/app/incentive/award-altruism/award-altruism.component.ts"); +/* harmony import */ var _incentive_aquarium_cheatpage_cheatpage_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./incentive/aquarium/cheatpage/cheatpage.component */ "./src/app/incentive/aquarium/cheatpage/cheatpage.component.ts"); +/* harmony import */ var _survey_aya_sample_survey_aya_sample_survey_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./survey/aya-sample-survey/aya-sample-survey.component */ "./src/app/survey/aya-sample-survey/aya-sample-survey.component.ts"); +/* harmony import */ var _user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./user/auth/auth.guard */ "./src/app/user/auth/auth.guard.ts"); +/* harmony import */ var _user_auth_auth_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./user/auth/auth.component */ "./src/app/user/auth/auth.component.ts"); +/* harmony import */ var _incentive_info_page_info_page_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./incentive/info-page/info-page.component */ "./src/app/incentive/info-page/info-page.component.ts"); +/* harmony import */ var _home_contact_contact_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./home/contact/contact.component */ "./src/app/home/contact/contact.component.ts"); +/* harmony import */ var _incentive_aquarium_previews_fishbowl_fishbowl_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./incentive/aquarium/previews/fishbowl/fishbowl.component */ "./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.ts"); +/* harmony import */ var _incentive_aquarium_previews_sea_sea_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./incentive/aquarium/previews/sea/sea.component */ "./src/app/incentive/aquarium/previews/sea/sea.component.ts"); +/* harmony import */ var _incentive_aquarium_previews_tundra_tundra_component__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./incentive/aquarium/previews/tundra/tundra.component */ "./src/app/incentive/aquarium/previews/tundra/tundra.component.ts"); +/* harmony import */ var _incentive_aquarium_previews_rainforest_rainforest_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./incentive/aquarium/previews/rainforest/rainforest.component */ "./src/app/incentive/aquarium/previews/rainforest/rainforest.component.ts"); +/* harmony import */ var _survey_harvard_survey_harvard_survey_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./survey/harvard-survey/harvard-survey.component */ "./src/app/survey/harvard-survey/harvard-survey.component.ts"); +/* harmony import */ var _intervention_harvard_arc_apps_front_page_front_page_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./intervention/harvard-arc-apps/front-page/front-page.component */ "./src/app/intervention/harvard-arc-apps/front-page/front-page.component.ts"); +/* harmony import */ var _incentive_video_info_page_video_info_page_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./incentive/video-info-page/video-info-page.component */ "./src/app/incentive/video-info-page/video-info-page.component.ts"); +/* harmony import */ var _incentive_life_insights_sample_python_view_sample_python_view_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./incentive/life-insights/sample-python-view/sample-python-view.component */ "./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.ts"); +/* harmony import */ var _survey_sleep_survey_sleep_survey_component__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./survey/sleep-survey/sleep-survey.component */ "./src/app/survey/sleep-survey/sleep-survey.component.ts"); + + + + + +//import { SelectiveLoadingStrategy } from './SelectiveLoadingStrategy'; +//import { InitiatedDrinkComponent } from './survey/initiated-drink/initiated-drink.component'; +//import { AwardComponent } from './incentive/award/award.component'; +//import { ActivetaskComponent } from './survey/activetask/activetask.component'; +//import { ActiveTask2Component } from './survey/active-task2/active-task2.component'; +//import { VisualizationComponent } from './incentive/visualization/visualization.component'; +//import { DynamicSurveyComponent } from './survey/dynamic-survey/dynamic-survey.component'; +//import { Q1MotivatedComponent } from './incentive/life-insights/q1-motivated/q1-motivated.component'; +//import { SampleSurveyComponent } from './survey/sample-survey/sample-survey.component'; + + + + + + + + + + + + + + + + + + + +var routes = [ + /* + { path: '', redirectTo: 'home', pathMatch: 'full' }, + { path: 'home', loadChildren: './home/home.module#HomePageModule' }, + { path: 'survey/initated-drink', component: InitiatedDrinkComponent }, + { path: 'survey/activetask', component: ActivetaskComponent }, + { path: 'survey/activetask2', component: ActiveTask2Component }, + { path: 'survey/dynamicsurvey', component: DynamicSurveyComponent }, + { path: 'survey/samplesurvey', component: SampleSurveyComponent }, + { path: 'incentive/award', component: AwardComponent }, + { path: 'incentive/award-memes', component: AwardMemesComponent }, + { path: 'incentive/visualization', component: VisualizationComponent}, + { path: 'incentive/aquariumone', component: DemoAquariumComponent }, + { path: 'life-insight/q1lifeinsight', component: Q1MotivatedComponent }, + */ + { path: '', redirectTo: 'home', pathMatch: 'full', canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'auth', component: _user_auth_auth_component__WEBPACK_IMPORTED_MODULE_12__["AuthComponent"] }, + { path: 'home', loadChildren: './home/home.module#HomePageModule', canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + //{ path: 'home', component: DemoAquariumComponent, canActivate: [AuthGuard]}, + { path: 'incentive/sample-life-insight', component: _incentive_life_insights_sample_life_insights_sample_life_insights_component__WEBPACK_IMPORTED_MODULE_5__["SampleLifeInsightsComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'incentive/treasurechest', component: _incentive_treasurechest_treasurechest_component__WEBPACK_IMPORTED_MODULE_6__["TreasurechestComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'incentive/cheatpoints', component: _incentive_aquarium_cheatpage_cheatpage_component__WEBPACK_IMPORTED_MODULE_9__["CheatpageComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'survey/samplesurvey', component: _survey_sample_survey_sample_survey_component__WEBPACK_IMPORTED_MODULE_7__["SampleSurveyComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'survey/samplesurvey2', component: _survey_aya_sample_survey_aya_sample_survey_component__WEBPACK_IMPORTED_MODULE_10__["AyaSampleSurveyComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'survey/harvardsurvey', component: _survey_harvard_survey_harvard_survey_component__WEBPACK_IMPORTED_MODULE_19__["HarvardSurveyComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'survey/sleepsurvey', component: _survey_sleep_survey_sleep_survey_component__WEBPACK_IMPORTED_MODULE_23__["SleepSurveyComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'intervention/arcappsfrontpage', component: _intervention_harvard_arc_apps_front_page_front_page_component__WEBPACK_IMPORTED_MODULE_20__["FrontPageComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'incentive/aquariumone', component: _incentive_aquarium_demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_4__["DemoAquariumComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'incentive/award-memes', component: _incentive_award_memes_award_memes_component__WEBPACK_IMPORTED_MODULE_3__["AwardMemesComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'incentive/award-altruism', component: _incentive_award_altruism_award_altruism_component__WEBPACK_IMPORTED_MODULE_8__["AwardAltruismComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'incentive/pythonlifeinsightsammple', component: _incentive_life_insights_sample_python_view_sample_python_view_component__WEBPACK_IMPORTED_MODULE_22__["SamplePythonViewComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'contact-study-staff', component: _home_contact_contact_component__WEBPACK_IMPORTED_MODULE_14__["ContactComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'incentive/infopage', component: _incentive_info_page_info_page_component__WEBPACK_IMPORTED_MODULE_13__["InfoPageComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'incentive/videoinfopage', component: _incentive_video_info_page_video_info_page_component__WEBPACK_IMPORTED_MODULE_21__["VideoInfoPageComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'preview/fishbowl', component: _incentive_aquarium_previews_fishbowl_fishbowl_component__WEBPACK_IMPORTED_MODULE_15__["FishbowlComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'preview/sea', component: _incentive_aquarium_previews_sea_sea_component__WEBPACK_IMPORTED_MODULE_16__["SeaComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'preview/tundra', component: _incentive_aquarium_previews_tundra_tundra_component__WEBPACK_IMPORTED_MODULE_17__["TundraComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] }, + { path: 'preview/rainforest', component: _incentive_aquarium_previews_rainforest_rainforest_component__WEBPACK_IMPORTED_MODULE_18__["RainforestComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_11__["AuthGuard"]] } + //{ path: 'incentive/award-memes', component: AwardMemesComponent }, + //{ path: 'incentive/aquariumone', component: DemoAquariumComponent }, + /* + { + path: 'survey', + //loadChildren: () => import('./survey/survey.module').then(mod => mod.SurveyModule) + loadChildren: './survey/survey.module#SurveyModule', + data: { + //name: 'survey' + preload: false + } + }, + */ + /* + { + path: 'incentive/aquarium', + loadChildren: './incentive/aquarium/aquarium.module#AquariumModule', + data: { + //name: 'survey' + preload: true + } + }, + */ + /* + { + path: 'incentive', + loadChildren: './incentive/incentive.module#IncentiveModule', + data: { + //name: 'survey' + preload: true + } + } + */ + // { path: 'incentive/life-insights', + // loadChildren: './incentive/life-insights/life-insights.module#LifeInsightsModule', + // data: { + // //name: 'life-insights' + // preload: true + // } + // }, +]; +var AppRoutingModule = /** @class */ (function () { + /* + @NgModule({ + providers: [ + SimpleLoadingStrategy + //SelectiveLoadingStrategy + ], + imports: [ + //RouterModule.forRoot(routes) + RouterModule.forRoot(routes, { preloadingStrategy: SimpleLoadingStrategy }) + ], + exports: [RouterModule] + }) + */ + function AppRoutingModule() { + } + AppRoutingModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + imports: [ + _angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forRoot(routes, { preloadingStrategy: _angular_router__WEBPACK_IMPORTED_MODULE_2__["PreloadAllModules"] }) + ], + exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"]] + }) + /* + @NgModule({ + providers: [ + SimpleLoadingStrategy + //SelectiveLoadingStrategy + ], + imports: [ + //RouterModule.forRoot(routes) + RouterModule.forRoot(routes, { preloadingStrategy: SimpleLoadingStrategy }) + ], + exports: [RouterModule] + }) + */ + ], AppRoutingModule); + return AppRoutingModule; +}()); + + + +/***/ }), + +/***/ "./src/app/app.component.ts": +/*!**********************************!*\ + !*** ./src/app/app.component.ts ***! + \**********************************/ +/*! exports provided: AppComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _ionic_native_splash_screen_ngx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic-native/splash-screen/ngx */ "./node_modules/@ionic-native/splash-screen/ngx/index.js"); +/* harmony import */ var _ionic_native_status_bar_ngx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ionic-native/status-bar/ngx */ "./node_modules/@ionic-native/status-bar/ngx/index.js"); +/* harmony import */ var _notification_one_signal_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./notification/one-signal.service */ "./src/app/notification/one-signal.service.ts"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _user_auth_auth_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user/auth/auth.service */ "./src/app/user/auth/auth.service.ts"); + + + + + + + + + + +var AppComponent = /** @class */ (function () { + function AppComponent(router, platform, splashScreen, statusBar, oneSignalService, authService, userProfileService, loadingController, navController) { + var _this = this; + this.router = router; + this.platform = platform; + this.splashScreen = splashScreen; + this.statusBar = statusBar; + this.oneSignalService = oneSignalService; + this.authService = authService; + this.userProfileService = userProfileService; + this.loadingController = loadingController; + this.navController = navController; + this.agreeToTerms = JSON.parse(localStorage.getItem("agreeToTerms")); + this.initializeApp(); + this.isAYA = true; + router.events.subscribe(function (event) { + //this.isShowingRouteLoadIndicator = false; + var asyncLoadCount = 0; + if (event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_6__["RouteConfigLoadStart"]) { + asyncLoadCount++; + console.log("Routing started"); + //console.log(event); + //this.survey_text = "Loading Survey"; + console.log(event.route.path); + // if(event.route.path == "survey") + // this.showLaoding(); + } + else if (event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_6__["RouteConfigLoadEnd"]) { + asyncLoadCount--; + console.log("Routing ended"); + console.log(event.route.path); + // if(event.route.path == "survey") + // this.dismissLoading(); + //console.log(event); + //this.survey_text = "Start survey"; + //console.log(this.router.url); + } + else if (event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_6__["NavigationStart"]) { + console.log("Navigation started"); + //this.survey_text = "Start survey"; + } + else if (event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_6__["NavigationEnd"]) { + asyncLoadCount--; + console.log("Navigation ended"); + //this.survey_text = "Start survey"; + } + // If there is at least one pending asynchronous config load request, + // then let's show the loading indicator. + // -- + // CAUTION: I'm using CSS to include a small delay such that this loading + // indicator won't be seen by people with sufficiently fast connections. + _this.isShowingRouteLoadIndicator = !!asyncLoadCount; + }); + } + Object.defineProperty(AppComponent.prototype, "username", { + get: function () { + if (this.userProfileService == undefined) { + //console.log("--userProfileService--: " + JSON.stringify(this.userProfileService)); + return "test"; + } + else if (this.userProfileService == null) { + //console.log("--userProfileService--: " + JSON.stringify(this.userProfileService)); + return "test"; + } + else { + //console.log("User profile -- username -- called from here"); + //console.log("--userProfileService--: " + JSON.stringify(this.userProfileService)); + return this.userProfileService.username; + } + }, + enumerable: true, + configurable: true + }); + AppComponent.prototype.ngOnInit = function () { + }; + AppComponent.prototype.ngOnDestroy = function () { + if (this.userSub) { + this.userSub.unsubscribe(); + } + }; + AppComponent.prototype.initializeApp = function () { + var _this = this; + //disable back button + this.platform.ready().then(function () { + _this.platform.backButton.subscribeWithPriority(9999, function () { + document.addEventListener('backbutton', function (event) { + event.preventDefault(); + event.stopPropagation(); + console.log('hello'); + }, false); + }); + _this.statusBar.styleDefault(); + }); + if (this.authService.isLoggedIn()) { + this.userProfileService.loadProfileFromDevice(); + // this.isLoading = false; + // get up to date userProfileFixed - to see if isActive has changed + this.userProfileService.fetchUserProfileFixed().subscribe(function (response) { + if (response.changed) { + // there was a change to isActive + // accessible via + // this.userProfileService.isActive + } + }); + // fetch a copy from server of userProfile to see if it's newer + this.userProfileService.fetchUserProfile().subscribe(function (response) { + if (response.serverCopyNewer) { + // the server copy of the userProfile was newer (and has been updated locally) + // accessible via + // this.userProfileService.userProfile + } + }); + } + else { + // not logged in; so do nothing + // should be routed via the authguard to the login screen + // after login occurs we should load the 'user-profile' and 'user-profile-fixed' - which happens via the auth.component + } + this.platform.ready().then(function () { + //this.statusBar.styleDefault(); + // let status bar overlay webview + //this.statusBar.overlaysWebView(true); + // set status bar to white + //this.statusBar.backgroundColorByHexString('#ffffff'); + if (_this.platform.is('android')) { + _this.statusBar.styleLightContent(); + _this.statusBar.backgroundColorByHexString("#004166"); + } + _this.splashScreen.hide(); + _this.oneSignalService.initOneSignal(); + //sidebar update. + if ((_this.userProfileService != undefined) && (_this.userProfileService.isParent == true)) + _this.isAYA = false; + }); + //window.localStorage.setItem("TotalPoints", "0"); + // let status bar overlay webview + //this.statusBar.overlaysWebView(true); + // set status bar to white + //this.statusBar.backgroundColorByHexString('#ffffff'); + }; + AppComponent.prototype.showLoading = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var _a; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, this.loadingController.create({ + message: "Loading...", + spinner: "lines", + duration: 5000 + })]; + case 1: + _a.loading = _b.sent(); + this.loading.onDidDismiss(function () { + console.log('Dismissed loading after 5 seconds'); + }); + this.loading.present(); + return [2 /*return*/]; + } + }); + }); + }; + AppComponent.prototype.dismissLoading = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + this.loading.dismiss(); + return [2 /*return*/]; + }); + }); + }; + AppComponent.prototype.presentLoading = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var loading, _a, role, data; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, this.loadingController.create({ + message: 'Hellooo', + duration: 2000 + })]; + case 1: + loading = _b.sent(); + return [4 /*yield*/, loading.present()]; + case 2: + _b.sent(); + return [4 /*yield*/, loading.onDidDismiss()]; + case 3: + _a = _b.sent(), role = _a.role, data = _a.data; + console.log('Loading dismissed!'); + return [2 /*return*/]; + } + }); + }); + }; + AppComponent.prototype.presentLoadingWithOptions = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var loading; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.loadingController.create({ + spinner: null, + duration: 5000, + message: 'Please wait...', + translucent: true, + cssClass: 'custom-class custom-loading' + })]; + case 1: + loading = _a.sent(); + return [4 /*yield*/, loading.present()]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + // + AppComponent.prototype.showPreviewOfFishBowl = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + this.navController.navigateRoot(['/preview/fishbowl']); + return [2 /*return*/]; + }); + }); + }; + AppComponent.prototype.showPreviewOfSea = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + this.navController.navigateRoot(['/preview/sea']); + return [2 /*return*/]; + }); + }); + }; + AppComponent.prototype.showPreviewOfTundra = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + this.navController.navigateRoot(['/preview/tundra']); + return [2 /*return*/]; + }); + }); + }; + AppComponent.prototype.showPreviewOfRainforest = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + this.navController.navigateRoot(['/preview/rainforest']); + return [2 /*return*/]; + }); + }); + }; + AppComponent.ctorParameters = function () { return [ + { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["Platform"] }, + { type: _ionic_native_splash_screen_ngx__WEBPACK_IMPORTED_MODULE_3__["SplashScreen"] }, + { type: _ionic_native_status_bar_ngx__WEBPACK_IMPORTED_MODULE_4__["StatusBar"] }, + { type: _notification_one_signal_service__WEBPACK_IMPORTED_MODULE_5__["OneSignalService"] }, + { type: _user_auth_auth_service__WEBPACK_IMPORTED_MODULE_8__["AuthService"] }, + { type: _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_7__["UserProfileService"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["LoadingController"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NavController"] } + ]; }; + AppComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-root', + template: __webpack_require__(/*! raw-loader!./app.component.html */ "./node_modules/raw-loader/index.js!./src/app/app.component.html") + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["Platform"], + _ionic_native_splash_screen_ngx__WEBPACK_IMPORTED_MODULE_3__["SplashScreen"], + _ionic_native_status_bar_ngx__WEBPACK_IMPORTED_MODULE_4__["StatusBar"], + _notification_one_signal_service__WEBPACK_IMPORTED_MODULE_5__["OneSignalService"], + _user_auth_auth_service__WEBPACK_IMPORTED_MODULE_8__["AuthService"], + _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_7__["UserProfileService"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["LoadingController"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NavController"]]) + ], AppComponent); + return AppComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/app.module.ts": +/*!*******************************!*\ + !*** ./src/app/app.module.ts ***! + \*******************************/ +/*! exports provided: AppModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var angular_azure_blob_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! angular-azure-blob-service */ "./node_modules/angular-azure-blob-service/fesm5/angular-azure-blob-service.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _ionic_native_splash_screen_ngx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic-native/splash-screen/ngx */ "./node_modules/@ionic-native/splash-screen/ngx/index.js"); +/* harmony import */ var _ionic_native_status_bar_ngx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic-native/status-bar/ngx */ "./node_modules/@ionic-native/status-bar/ngx/index.js"); +/* harmony import */ var _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ionic-native/onesignal/ngx */ "./node_modules/@ionic-native/onesignal/ngx/index.js"); +/* harmony import */ var _ionic_native_sqlite_porter_ngx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ionic-native/sqlite-porter/ngx */ "./node_modules/@ionic-native/sqlite-porter/ngx/index.js"); +/* harmony import */ var _ionic_native_sqlite_ngx__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ionic-native/sqlite/ngx */ "./node_modules/@ionic-native/sqlite/ngx/index.js"); +/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts"); +/* harmony import */ var _app_routing_module__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./app-routing.module */ "./src/app/app-routing.module.ts"); +/* harmony import */ var _notification_notification_module__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./notification/notification.module */ "./src/app/notification/notification.module.ts"); +/* harmony import */ var _incentive_incentive_module__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./incentive/incentive.module */ "./src/app/incentive/incentive.module.ts"); +/* harmony import */ var _incentive_life_insights_life_insights_module__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./incentive/life-insights/life-insights.module */ "./src/app/incentive/life-insights/life-insights.module.ts"); +/* harmony import */ var _survey_survey_module__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./survey/survey.module */ "./src/app/survey/survey.module.ts"); +/* harmony import */ var _incentive_aquarium_aquarium_module__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./incentive/aquarium/aquarium.module */ "./src/app/incentive/aquarium/aquarium.module.ts"); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); +/* harmony import */ var _incentive_aquarium_cheatpage_cheatpage_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./incentive/aquarium/cheatpage/cheatpage.component */ "./src/app/incentive/aquarium/cheatpage/cheatpage.component.ts"); +/* harmony import */ var _user_user_module__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./user/user.module */ "./src/app/user/user.module.ts"); +/* harmony import */ var _home_home_module__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./home/home.module */ "./src/app/home/home.module.ts"); +/* harmony import */ var _incentive_award_money_award_dollar_service__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./incentive/award-money/award-dollar.service */ "./src/app/incentive/award-money/award-dollar.service.ts"); +/* harmony import */ var _ionic_native_app_version_ngx__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @ionic-native/app-version/ngx */ "./node_modules/@ionic-native/app-version/ngx/index.js"); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); +/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./reducers */ "./src/app/reducers/index.ts"); +/* harmony import */ var _ngrx_store_devtools__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @ngrx/store-devtools */ "./node_modules/@ngrx/store-devtools/fesm5/store-devtools.js"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var _ngrx_effects__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @ngrx/effects */ "./node_modules/@ngrx/effects/fesm5/effects.js"); +/* harmony import */ var _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @ionic-native/mobile-accessibility/ngx */ "./node_modules/@ionic-native/mobile-accessibility/ngx/index.js"); +/* harmony import */ var _intervention_intervention_module__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./intervention/intervention.module */ "./src/app/intervention/intervention.module.ts"); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +var AppModule = /** @class */ (function () { + function AppModule(injector) { + this.injector = injector; + AppModule_1.injector = injector; + } + AppModule_1 = AppModule; + var AppModule_1; + AppModule.ctorParameters = function () { return [ + { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] } + ]; }; + AppModule = AppModule_1 = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [_app_component__WEBPACK_IMPORTED_MODULE_12__["AppComponent"], _incentive_aquarium_cheatpage_cheatpage_component__WEBPACK_IMPORTED_MODULE_20__["CheatpageComponent"]], + entryComponents: [_incentive_aquarium_cheatpage_cheatpage_component__WEBPACK_IMPORTED_MODULE_20__["CheatpageComponent"]], + imports: [ + _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__["BrowserModule"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["IonicModule"].forRoot(), + _app_routing_module__WEBPACK_IMPORTED_MODULE_13__["AppRoutingModule"], + _survey_survey_module__WEBPACK_IMPORTED_MODULE_17__["SurveyModule"], + _incentive_life_insights_life_insights_module__WEBPACK_IMPORTED_MODULE_16__["LifeInsightsModule"], + _incentive_incentive_module__WEBPACK_IMPORTED_MODULE_15__["IncentiveModule"], + _notification_notification_module__WEBPACK_IMPORTED_MODULE_14__["NotificationModule"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpClientModule"], + _incentive_aquarium_aquarium_module__WEBPACK_IMPORTED_MODULE_18__["AquariumModule"], + _angular_forms__WEBPACK_IMPORTED_MODULE_19__["FormsModule"], + _user_user_module__WEBPACK_IMPORTED_MODULE_21__["UserModule"], + _home_home_module__WEBPACK_IMPORTED_MODULE_22__["HomePageModule"], + _intervention_intervention_module__WEBPACK_IMPORTED_MODULE_31__["InterventionModule"], + angular_azure_blob_service__WEBPACK_IMPORTED_MODULE_5__["BlobModule"].forRoot(), + //this ngrx import + _ngrx_store__WEBPACK_IMPORTED_MODULE_25__["StoreModule"].forRoot(_reducers__WEBPACK_IMPORTED_MODULE_26__["reducers"], { + metaReducers: _reducers__WEBPACK_IMPORTED_MODULE_26__["metaReducers"], + runtimeChecks: { + strictStateImmutability: true, + strictActionImmutability: true + } + }), + //dev tool maxAge 25 versions of the data + _ngrx_store_devtools__WEBPACK_IMPORTED_MODULE_27__["StoreDevtoolsModule"].instrument({ maxAge: 25, logOnly: _environments_environment__WEBPACK_IMPORTED_MODULE_28__["environment"].production }), + _ngrx_effects__WEBPACK_IMPORTED_MODULE_29__["EffectsModule"].forRoot([]) + ], + providers: [ + _ionic_native_status_bar_ngx__WEBPACK_IMPORTED_MODULE_8__["StatusBar"], + _ionic_native_splash_screen_ngx__WEBPACK_IMPORTED_MODULE_7__["SplashScreen"], + _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_9__["OneSignal"], + _incentive_award_money_award_dollar_service__WEBPACK_IMPORTED_MODULE_23__["AwardDollarService"], + _ionic_native_app_version_ngx__WEBPACK_IMPORTED_MODULE_24__["AppVersion"], + _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_30__["MobileAccessibility"], + _ionic_native_sqlite_ngx__WEBPACK_IMPORTED_MODULE_11__["SQLite"], + _ionic_native_sqlite_porter_ngx__WEBPACK_IMPORTED_MODULE_10__["SQLitePorter"], + { provide: _angular_router__WEBPACK_IMPORTED_MODULE_3__["RouteReuseStrategy"], useClass: _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["IonicRouteStrategy"] } + //, + //{provide: ErrorHandler, useClass: GlobalErrorHandler} + ], + bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_12__["AppComponent"]] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]]) + ], AppModule); + return AppModule; +}()); + + + +/***/ }), + +/***/ "./src/app/home/contact/contact.component.css": +/*!****************************************************!*\ + !*** ./src/app/home/contact/contact.component.css ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaG9tZS9jb250YWN0L2NvbnRhY3QuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL2hvbWUvY29udGFjdC9jb250YWN0LmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */" + +/***/ }), + +/***/ "./src/app/home/contact/contact.component.ts": +/*!***************************************************!*\ + !*** ./src/app/home/contact/contact.component.ts ***! + \***************************************************/ +/*! exports provided: ContactComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContactComponent", function() { return ContactComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); +/* harmony import */ var _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ionic-native/mobile-accessibility/ngx */ "./node_modules/@ionic-native/mobile-accessibility/ngx/index.js"); + + + + + +var ContactComponent = /** @class */ (function () { + function ContactComponent(menuCtrl, mobileAccessibility, appUsageDb) { + this.menuCtrl = menuCtrl; + this.mobileAccessibility = mobileAccessibility; + this.appUsageDb = appUsageDb; + } + ContactComponent.prototype.ngOnInit = function () { + //this.mobileAccessibility.usePreferredTextZoom(false); + this.menuCtrl.close(); + }; + ContactComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageEnter("study_contact_info_page"); + }; + ContactComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + //this.mobileAccessibility.usePreferredTextZoom(true); + this.appUsageDb.saveAppUsageExit("study_contact_info_page"); + }; + ContactComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] }, + { type: _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__["MobileAccessibility"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__["DatabaseService"] } + ]; }; + ContactComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-contact', + template: __webpack_require__(/*! raw-loader!./contact.component.html */ "./node_modules/raw-loader/index.js!./src/app/home/contact/contact.component.html"), + styles: [__webpack_require__(/*! ./contact.component.css */ "./src/app/home/contact/contact.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"], + _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__["MobileAccessibility"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__["DatabaseService"]]) + ], ContactComponent); + return ContactComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/home/header/header.component.scss": +/*!***************************************************!*\ + !*** ./src/app/home/header/header.component.scss ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".navbar {\n min-height: 30px;\n background-color: #3c9ce7;\n padding: 0px;\n}\n.navbar .navbar-brand {\n color: #ecf0f1;\n}\n.navbar .navbar-brand:hover, .navbar .navbar-brand:focus {\n color: #f9efa0;\n}\n.navbar .navbar-text {\n color: #ecf0f1;\n}\n.navbar .navbar-text a {\n color: #f9efa0;\n}\n.navbar .navbar-text a:hover, .navbar .navbar-text a:focus {\n color: #f9efa0;\n}\n.navbar .navbar-nav .nav-link {\n color: #ecf0f1;\n border-radius: 0.25rem;\n margin: 0 0.25em;\n}\n.navbar .navbar-nav .nav-link:not(.disabled):hover, .navbar .navbar-nav .nav-link:not(.disabled):focus {\n color: #f9efa0;\n}\n.navbar .navbar-nav .nav-item.active .nav-link, .navbar .navbar-nav .nav-item.active .nav-link:hover, .navbar .navbar-nav .nav-item.active .nav-link:focus, .navbar .navbar-nav .nav-item.show .nav-link, .navbar .navbar-nav .nav-item.show .nav-link:hover, .navbar .navbar-nav .nav-item.show .nav-link:focus {\n color: #f9efa0;\n background-color: #477fd9;\n}\n.navbar .navbar-toggle {\n border-color: #477fd9;\n}\n.navbar .navbar-toggle:hover, .navbar .navbar-toggle:focus {\n background-color: #477fd9;\n}\n.navbar .navbar-toggle .navbar-toggler-icon {\n color: #ecf0f1;\n}\n.navbar .navbar-collapse,\n.navbar .navbar-form {\n border-color: #ecf0f1;\n}\n.navbar .navbar-link {\n color: #ecf0f1;\n}\n.navbar .navbar-link:hover {\n color: #f9efa0;\n}\n@media (max-width: 575px) {\n .navbar-expend-sm .navbar-nav .show .dropdown-menu .dropdown-item {\n color: #ecf0f1;\n }\n .navbar-expend-sm .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend-sm .navbar-nav .show .dropdown-menu .dropdown-item:focus {\n color: #f9efa0;\n }\n .navbar-expend-sm .navbar-nav .show .dropdown-menu .dropdown-item.active {\n color: #f9efa0;\n background-color: #477fd9;\n }\n}\n@media (max-width: 767px) {\n .navbar-expend-md .navbar-nav .show .dropdown-menu .dropdown-item {\n color: #ecf0f1;\n }\n .navbar-expend-md .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend-md .navbar-nav .show .dropdown-menu .dropdown-item:focus {\n color: #f9efa0;\n }\n .navbar-expend-md .navbar-nav .show .dropdown-menu .dropdown-item.active {\n color: #f9efa0;\n background-color: #477fd9;\n }\n}\n@media (max-width: 991px) {\n .navbar-expend-lg .navbar-nav .show .dropdown-menu .dropdown-item {\n color: #ecf0f1;\n }\n .navbar-expend-lg .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend-lg .navbar-nav .show .dropdown-menu .dropdown-item:focus {\n color: #f9efa0;\n }\n .navbar-expend-lg .navbar-nav .show .dropdown-menu .dropdown-item.active {\n color: #f9efa0;\n background-color: #477fd9;\n }\n}\n@media (max-width: 1199px) {\n .navbar-expend-xl .navbar-nav .show .dropdown-menu .dropdown-item {\n color: #ecf0f1;\n }\n .navbar-expend-xl .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend-xl .navbar-nav .show .dropdown-menu .dropdown-item:focus {\n color: #f9efa0;\n }\n .navbar-expend-xl .navbar-nav .show .dropdown-menu .dropdown-item.active {\n color: #f9efa0;\n background-color: #477fd9;\n }\n}\n.navbar-expend .navbar-nav .show .dropdown-menu .dropdown-item {\n color: #ecf0f1;\n}\n.navbar-expend .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend .navbar-nav .show .dropdown-menu .dropdown-item:focus {\n color: #f9efa0;\n}\n.navbar-expend .navbar-nav .show .dropdown-menu .dropdown-item.active {\n color: #f9efa0;\n background-color: #477fd9;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaG9tZS9oZWFkZXIvaGVhZGVyLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9ob21lL2hlYWRlci9oZWFkZXIuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0E7RUFDRSxnQkFBQTtFQUNBLHlCQVBnQjtFQVFoQixZQUFBO0FDSkY7QURLRTtFQUNFLGNBUmM7QUNLbEI7QURJSTtFQUNFLGNBVFk7QUNPbEI7QURHRTtFQUNFLGNBWmM7QUNXbEI7QURFSTtFQUNFLGNBYlk7QUNhbEI7QURDTTtFQUNFLGNBZlU7QUNnQmxCO0FEQ0k7RUFDRSxjQW5CWTtFQW9CWixzQkFBQTtFQUNBLGdCQUFBO0FDQ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C5kcm9wZG93bi1tZW51IC5kcm9wZG93bi1pdGVtIHtcbiAgICBjb2xvcjogI2VjZjBmMTtcbiAgfVxuICAubmF2YmFyLWV4cGVuZC14bCAubmF2YmFyLW5hdiAuc2hvdyAuZHJvcGRvd24tbWVudSAuZHJvcGRvd24taXRlbTpob3ZlciwgLm5hdmJhci1leHBlbmQteGwgLm5hdmJhci1uYXYgLnNob3cgLmRyb3Bkb3duLW1lbnUgLmRyb3Bkb3duLWl0ZW06Zm9jdXMge1xuICAgIGNvbG9yOiAjZjllZmEwO1xuICB9XG4gIC5uYXZiYXItZXhwZW5kLXhsIC5uYXZiYXItbmF2IC5zaG93IC5kcm9wZG93bi1tZW51IC5kcm9wZG93bi1pdGVtLmFjdGl2ZSB7XG4gICAgY29sb3I6ICNmOWVmYTA7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogIzQ3N2ZkOTtcbiAgfVxufVxuLm5hdmJhci1leHBlbmQgLm5hdmJhci1uYXYgLnNob3cgLmRyb3Bkb3duLW1lbnUgLmRyb3Bkb3duLWl0ZW0ge1xuICBjb2xvcjogI2VjZjBmMTtcbn1cbi5uYXZiYXItZXhwZW5kIC5uYXZiYXItbmF2IC5zaG93IC5kcm9wZG93bi1tZW51IC5kcm9wZG93bi1pdGVtOmhvdmVyLCAubmF2YmFyLWV4cGVuZCAubmF2YmFyLW5hdiAuc2hvdyAuZHJvcGRvd24tbWVudSAuZHJvcGRvd24taXRlbTpmb2N1cyB7XG4gIGNvbG9yOiAjZjllZmEwO1xufVxuLm5hdmJhci1leHBlbmQgLm5hdmJhci1uYXYgLnNob3cgLmRyb3Bkb3duLW1lbnUgLmRyb3Bkb3duLWl0ZW0uYWN0aXZlIHtcbiAgY29sb3I6ICNmOWVmYTA7XG4gIGJhY2tncm91bmQtY29sb3I6ICM0NzdmZDk7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/home/header/header.component.ts": +/*!*************************************************!*\ + !*** ./src/app/home/header/header.component.ts ***! + \*************************************************/ +/*! exports provided: HeaderComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComponent", function() { return HeaderComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var src_app_user_auth_auth_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/user/auth/auth.service */ "./src/app/user/auth/auth.service.ts"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); + + + + +var HeaderComponent = /** @class */ (function () { + function HeaderComponent(authService, router) { + this.authService = authService; + this.router = router; + this.isAuthenticated = false; + this.collapsed = true; + } + // onTestButtonClicked(){ + // this.userProfileService.initialize(); + // this.userProfileService.saveToServer(); + // } + HeaderComponent.prototype.onLogout = function () { + this.authService.logout(); + this.router.navigate(['/auth']); + }; + HeaderComponent.prototype.ngOnInit = function () { + var _this = this; + this.userSub = this.authService.loggedInUser.subscribe(function (loggedInUser) { + _this.isAuthenticated = _this.authService.isLoggedIn(); + console.log(!loggedInUser); + }); + this.authService.autoLogin(); + }; + HeaderComponent.prototype.ngOnDestroy = function () { + this.userSub.unsubscribe(); + }; + Object.defineProperty(HeaderComponent.prototype, "userName", { + get: function () { + return this.authService.loggedInUser.getValue(); + }, + enumerable: true, + configurable: true + }); + HeaderComponent.ctorParameters = function () { return [ + { type: src_app_user_auth_auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"] } + ]; }; + HeaderComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-header', + template: __webpack_require__(/*! raw-loader!./header.component.html */ "./node_modules/raw-loader/index.js!./src/app/home/header/header.component.html"), + styles: [__webpack_require__(/*! ./header.component.scss */ "./src/app/home/header/header.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_auth_auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"], + _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"]]) + ], HeaderComponent); + return HeaderComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/home/home-routing.module.ts": +/*!*********************************************!*\ + !*** ./src/app/home/home-routing.module.ts ***! + \*********************************************/ +/*! exports provided: HomeRoutingModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HomeRoutingModule", function() { return HomeRoutingModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _home_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./home.page */ "./src/app/home/home.page.ts"); +/* harmony import */ var _incentive_aquarium_aquarium_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../incentive/aquarium/aquarium.component */ "./src/app/incentive/aquarium/aquarium.component.ts"); +/* harmony import */ var _incentive_unlocked_memes_unlocked_memes_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../incentive/unlocked-memes/unlocked-memes.component */ "./src/app/incentive/unlocked-memes/unlocked-memes.component.ts"); +/* harmony import */ var _incentive_unlocked_altuistic_messages_unlocked_altuistic_messages_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component */ "./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.ts"); +/* harmony import */ var _user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../user/auth/auth.guard */ "./src/app/user/auth/auth.guard.ts"); +/* harmony import */ var _contact_contact_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contact/contact.component */ "./src/app/home/contact/contact.component.ts"); +/* harmony import */ var _incentive_unlocked_inspirational_quotes_unlocked_inspirational_quotes_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component */ "./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.ts"); +/* harmony import */ var _incentive_life_insights_sample_python_view_sample_python_view_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../incentive/life-insights/sample-python-view/sample-python-view.component */ "./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.ts"); + + + + + + + + + + + +var routes = [ + { + path: 'home', + component: _home_page__WEBPACK_IMPORTED_MODULE_3__["HomePage"], + children: [ + { + path: 'incentive', component: _incentive_aquarium_aquarium_component__WEBPACK_IMPORTED_MODULE_4__["AquariumComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_7__["AuthGuard"]] + }, + { + path: 'quotes', component: _incentive_unlocked_inspirational_quotes_unlocked_inspirational_quotes_component__WEBPACK_IMPORTED_MODULE_9__["UnlockedInspirationalQuotesComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_7__["AuthGuard"]] + }, + { + path: 'memes', component: _incentive_unlocked_memes_unlocked_memes_component__WEBPACK_IMPORTED_MODULE_5__["UnlockedMemesComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_7__["AuthGuard"]] + }, + { + path: 'thankyous', component: _incentive_unlocked_altuistic_messages_unlocked_altuistic_messages_component__WEBPACK_IMPORTED_MODULE_6__["UnlockedAltuisticMessagesComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_7__["AuthGuard"]] + }, + { + path: 'lifeinsight', component: _incentive_life_insights_sample_python_view_sample_python_view_component__WEBPACK_IMPORTED_MODULE_10__["SamplePythonViewComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_7__["AuthGuard"]] + }, + { + path: 'contact', component: _contact_contact_component__WEBPACK_IMPORTED_MODULE_8__["ContactComponent"], canActivate: [_user_auth_auth_guard__WEBPACK_IMPORTED_MODULE_7__["AuthGuard"]] + }, + { + path: '', + redirectTo: '/home/incentive', + pathMatch: 'full' + } + ] + }, + { + path: '', + redirectTo: '/home/incentive', + pathMatch: 'full' + } +]; +var HomeRoutingModule = /** @class */ (function () { + function HomeRoutingModule() { + } + HomeRoutingModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + imports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forChild(routes)], + exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"]] + }) + ], HomeRoutingModule); + return HomeRoutingModule; +}()); + + + +/***/ }), + +/***/ "./src/app/home/home.module.ts": +/*!*************************************!*\ + !*** ./src/app/home/home.module.ts ***! + \*************************************/ +/*! exports provided: HomePageModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HomePageModule", function() { return HomePageModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _home_page__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./home.page */ "./src/app/home/home.page.ts"); +/* harmony import */ var _incentive_aquarium_aquarium_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../incentive/aquarium/aquarium.module */ "./src/app/incentive/aquarium/aquarium.module.ts"); +/* harmony import */ var _header_header_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./header/header.component */ "./src/app/home/header/header.component.ts"); +/* harmony import */ var _terms_of_service_terms_of_service_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./terms-of-service/terms-of-service.component */ "./src/app/home/terms-of-service/terms-of-service.component.ts"); +/* harmony import */ var _home_routing_module__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./home-routing.module */ "./src/app/home/home-routing.module.ts"); +/* harmony import */ var _contact_contact_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./contact/contact.component */ "./src/app/home/contact/contact.component.ts"); + + + + + + + + + + + + +var HomePageModule = /** @class */ (function () { + function HomePageModule() { + } + HomePageModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], + _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["IonicModule"], + _incentive_aquarium_aquarium_module__WEBPACK_IMPORTED_MODULE_7__["AquariumModule"], + _home_routing_module__WEBPACK_IMPORTED_MODULE_10__["HomeRoutingModule"], + _angular_router__WEBPACK_IMPORTED_MODULE_5__["RouterModule"].forChild([ + { + path: '', + component: _home_page__WEBPACK_IMPORTED_MODULE_6__["HomePage"] + } + ]) + ], + declarations: [_home_page__WEBPACK_IMPORTED_MODULE_6__["HomePage"], _header_header_component__WEBPACK_IMPORTED_MODULE_8__["HeaderComponent"], _terms_of_service_terms_of_service_component__WEBPACK_IMPORTED_MODULE_9__["TermsOfServiceComponent"], _contact_contact_component__WEBPACK_IMPORTED_MODULE_11__["ContactComponent"]], + schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]], + exports: [_terms_of_service_terms_of_service_component__WEBPACK_IMPORTED_MODULE_9__["TermsOfServiceComponent"]] + }) + ], HomePageModule); + return HomePageModule; +}()); + + + +/***/ }), + +/***/ "./src/app/home/home.page.scss": +/*!*************************************!*\ + !*** ./src/app/home/home.page.scss ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color {\n --background: #005486;\n}\n\nion-tab-button.tab-selected ion-icon {\n color: #fff !important;\n --ion-color-base: #fff !important;\n width: 50%;\n height: 50%;\n}\n\nion-tab-button.tab-selected ion-label {\n color: #fff !important;\n --ion-color-base: #fff !important;\n}\n\nion-tab-button ion-icon {\n width: 40%;\n height: 40%;\n color: #ccecff !important;\n --ion-color-base: #ccecff !important;\n}\n\nion-tab-button ion-label {\n color: #ccecff !important;\n --ion-color-base: #ccecff !important;\n}\n\n/*\n\n.tab-btn-selected, .tab-btn:hover {\n color: #e6f6ff;\n}\n\n\n\nion-tab-button:focus {\n ion-icon {\n width: 60%;\n height: 60%;\n color: #fff !important;\n }\n}\n*/\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaG9tZS9ob21lLnBhZ2Uuc2NzcyIsInNyYy9hcHAvaG9tZS9ob21lLnBhZ2Uuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHFCQUFBO0FDQ0o7O0FETUk7RUFDRSxzQkFBQTtFQUNBLGlDQUFBO0VBQ0EsVUFBQTtFQUNBLFdBQUE7QUNITjs7QURRSTtFQUNJLHNCQUFBO0VBQ0QsaUNBQUE7QUNMUDs7QURVSTtFQUNJLFVBQUE7RUFDQSxXQUFBO0VBQ0EseUJBQUE7RUFDQSxvQ0FBQTtBQ1BSOztBRFlJO0VBQ0kseUJBQUE7RUFDRCxvQ0FBQTtBQ1RQOztBRGFBOzs7Ozs7Ozs7Ozs7Ozs7Q0FBQSIsImZpbGUiOiJzcmMvYXBwL2hvbWUvaG9tZS5wYWdlLnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufVxuXG5cblxuXG5pb24tdGFiLWJ1dHRvbi50YWItc2VsZWN0ZWQge1xuICAgIGlvbi1pY29uIHtcbiAgICAgIGNvbG9yOiAjZmZmICFpbXBvcnRhbnQ7XG4gICAgICAtLWlvbi1jb2xvci1iYXNlOiAjZmZmICFpbXBvcnRhbnQ7XG4gICAgICB3aWR0aDogNTAlO1xuICAgICAgaGVpZ2h0OiA1MCU7XG4gICAgfVxuf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GFudDtcbiAgd2lkdGg6IDUwJTtcbiAgaGVpZ2h0OiA1MCU7XG59XG5cbmlvbi10YWItYnV0dG9uLnRhYi1zZWxlY3RlZCBpb24tbGFiZWwge1xuICBjb2xvcjogI2ZmZiAhaW1wb3J0YW50O1xuICAtLWlvbi1jb2xvci1iYXNlOiAjZmZmICFpbXBvcnRhbnQ7XG59XG5cbmlvbi10YWItYnV0dG9uIGlvbi1pY29uIHtcbiAgd2lkdGg6IDQwJTtcbiAgaGVpZ2h0OiA0MCU7XG4gIGNvbG9yOiAjY2NlY2ZmICFpbXBvcnRhbnQ7XG4gIC0taW9uLWNvbG9yLWJhc2U6ICNjY2VjZmYgIWltcG9ydGFudDtcbn1cblxuaW9uLXRhYi1idXR0b24gaW9uLWxhYmVsIHtcbiAgY29sb3I6ICNjY2VjZmYgIWltcG9ydGFudDtcbiAgLS1pb24tY29sb3ItYmFzZTogI2NjZWNmZiAhaW1wb3J0YW50O1xufVxuXG4vKlxuXG4udGFiLWJ0bi1zZWxlY3RlZCwgLnRhYi1idG46aG92ZXIge1xuICAgIGNvbG9yOiAjZTZmNmZmO1xufVxuXG5cblxuaW9uLXRhYi1idXR0b246Zm9jdXMge1xuICAgIGlvbi1pY29uIHtcbiAgICAgICAgd2lkdGg6IDYwJTtcbiAgICAgICAgaGVpZ2h0OiA2MCU7XG4gICAgICAgIGNvbG9yOiAjZmZmICFpbXBvcnRhbnQ7XG4gICAgfVxufVxuKi8iXX0= */" + +/***/ }), + +/***/ "./src/app/home/home.page.ts": +/*!***********************************!*\ + !*** ./src/app/home/home.page.ts ***! + \***********************************/ +/*! exports provided: HomePage */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HomePage", function() { return HomePage; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _incentive_aquarium_aquarium_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../incentive/aquarium/aquarium.component */ "./src/app/incentive/aquarium/aquarium.component.ts"); +/* harmony import */ var _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); + + + + +var HomePage = /** @class */ (function () { + function HomePage(userProfileService) { + this.userProfileService = userProfileService; + this.isAYA = true; + if (this.userProfileService.isParent == true) + this.isAYA = false; + } + HomePage.prototype.ngOnInit = function () { + }; + HomePage.prototype.ionViewDidEnter = function () { + console.log("ionViewDidEnterFunction"); + //this.child.ionViewDidEnterFunction(); + }; + HomePage.prototype.ionViewDidLeave = function () { + console.log("ionViewDidLeaveFunction"); + //this.child.ionViewDidLeaveFunction(); + }; + HomePage.ctorParameters = function () { return [ + { type: _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"] } + ]; }; + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(_incentive_aquarium_aquarium_component__WEBPACK_IMPORTED_MODULE_2__["AquariumComponent"], { static: true }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", Object) + ], HomePage.prototype, "child", void 0); + HomePage = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-home', + template: __webpack_require__(/*! raw-loader!./home.page.html */ "./node_modules/raw-loader/index.js!./src/app/home/home.page.html"), + styles: [__webpack_require__(/*! ./home.page.scss */ "./src/app/home/home.page.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"]]) + ], HomePage); + return HomePage; +}()); + + + +/***/ }), + +/***/ "./src/app/home/terms-of-service/terms-of-service.component.scss": +/*!***********************************************************************!*\ + !*** ./src/app/home/terms-of-service/terms-of-service.component.scss ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ":host {\n display: inline-block;\n height: 85%;\n}\n\n.new-background-color {\n --background: #3F51B5;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaG9tZS90ZXJtcy1vZi1zZXJ2aWNlL3Rlcm1zLW9mLXNlcnZpY2UuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2hvbWUvdGVybXMtb2Ytc2VydmljZS90ZXJtcy1vZi1zZXJ2aWNlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ1EscUJBQUE7RUFDQSxXQUFBO0FDQ1I7O0FERUE7RUFDUSxxQkFBQTtBQ0NSIiwiZmlsZSI6InNyYy9hcHAvaG9tZS90ZXJtcy1vZi1zZXJ2aWNlL3Rlcm1zLW9mLXNlcnZpY2UuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdHtcbiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgICAgICBoZWlnaHQ6IDg1JTtcbn1cblxuLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgICAgICAtLWJhY2tncm91bmQ6ICMzRjUxQjU7XG59XG5cbiIsIjpob3N0IHtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBoZWlnaHQ6IDg1JTtcbn1cblxuLm5ldy1iYWNrZ3JvdW5kLWNvbG9yIHtcbiAgLS1iYWNrZ3JvdW5kOiAjM0Y1MUI1O1xufSJdfQ== */" + +/***/ }), + +/***/ "./src/app/home/terms-of-service/terms-of-service.component.ts": +/*!*********************************************************************!*\ + !*** ./src/app/home/terms-of-service/terms-of-service.component.ts ***! + \*********************************************************************/ +/*! exports provided: TermsOfServiceComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TermsOfServiceComponent", function() { return TermsOfServiceComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); + + +// import { Router } from '@angular/router'; +var TermsOfServiceComponent = /** @class */ (function () { + function TermsOfServiceComponent() { + this.agreeToTerms = JSON.parse(localStorage.getItem("agreeToTerms")); + } + TermsOfServiceComponent.prototype.ngOnInit = function () { }; + TermsOfServiceComponent.prototype.onSubmit = function () { + localStorage.setItem("agreeToTerms", this.agreeToTerms.toString()); + location.reload(); + }; + TermsOfServiceComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-terms-of-service', + template: __webpack_require__(/*! raw-loader!./terms-of-service.component.html */ "./node_modules/raw-loader/index.js!./src/app/home/terms-of-service/terms-of-service.component.html"), + styles: [__webpack_require__(/*! ./terms-of-service.component.scss */ "./src/app/home/terms-of-service/terms-of-service.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", []) + ], TermsOfServiceComponent); + return TermsOfServiceComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/action-types.ts": +/*!*******************************************!*\ + !*** ./src/app/incentive/action-types.ts ***! + \*******************************************/ +/*! exports provided: IncentiveActions */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _incentive_actions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./incentive.actions */ "./src/app/incentive/incentive.actions.ts"); +/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "IncentiveActions", function() { return _incentive_actions__WEBPACK_IMPORTED_MODULE_0__; }); + + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/aquarium.component.css": +/*!***********************************************************!*\ + !*** ./src/app/incentive/aquarium/aquarium.component.css ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n\n\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL2FxdWFyaXVtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvYXF1YXJpdW0vYXF1YXJpdW0uY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59XG5cblxuIl19 */" + +/***/ }), + +/***/ "./src/app/incentive/aquarium/aquarium.component.ts": +/*!**********************************************************!*\ + !*** ./src/app/incentive/aquarium/aquarium.component.ts ***! + \**********************************************************/ +/*! exports provided: AquariumComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AquariumComponent", function() { return AquariumComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _incentive_aquarium_demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../incentive/aquarium/demo-aquarium/demo-aquarium.component */ "./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _animations_modal_enter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../animations/modal_enter */ "./src/app/animations/modal_enter.ts"); +/* harmony import */ var _incentive_aquarium_modal_unlocked_page_modal_unlocked_page_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component */ "./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.ts"); +/* harmony import */ var _animations_modal_leave__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../animations/modal_leave */ "./src/app/animations/modal_leave.ts"); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); +/* harmony import */ var _incentive_incentive_selectors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../incentive/incentive.selectors */ "./src/app/incentive/incentive.selectors.ts"); +/* harmony import */ var _incentive_actions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../incentive.actions */ "./src/app/incentive/incentive.actions.ts"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); +/* harmony import */ var _storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../storage/aws-s3.service */ "./src/app/storage/aws-s3.service.ts"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts"); + + + + + + + + + + + + + + + + + +var AquariumComponent = /** @class */ (function () { + function AquariumComponent(platform, alertCtrl, router, route, modalController, store, navController, menu, appUsageDb, awsS3Service, userProfileService, httpClient) { + var _this = this; + this.platform = platform; + this.alertCtrl = alertCtrl; + this.router = router; + this.route = route; + this.modalController = modalController; + this.store = store; + this.navController = navController; + this.menu = menu; + this.appUsageDb = appUsageDb; + this.awsS3Service = awsS3Service; + this.userProfileService = userProfileService; + this.httpClient = httpClient; + this.money = 0; + this.modalObjectNavigationExtras = {}; + this.pageTitle = "Aquarium"; + this.aware_id = "Not found"; + this.title = ""; + this.isIOS = false; + console.log("Constructor called"); + this.sub1$ = this.platform.pause.subscribe(function () { + console.log('****UserdashboardPage PAUSED****'); + _this.child.pauseGameRendering(); + }); + this.sub2$ = this.platform.resume.subscribe(function () { + console.log('****UserdashboardPage RESUMED****'); + _this.child.resumeGameRendering(); + }); + if (window.localStorage['AwardDollar'] == undefined) + this.money = 0; + else { + try { + this.money = parseInt(window.localStorage['AwardDollar']); + } + catch (error) { + window.localStorage.setItem("AwardDollar", "" + 0); + this.money = 0; + } + } + if (this.platform.is('ios')) { + this.isIOS = true; + } + this.sideMenu(); + } + Object.defineProperty(AquariumComponent.prototype, "isActive", { + get: function () { + //return false; + if (this.userProfileService == undefined) + return true; + else + return this.userProfileService.isActive; + }, + enumerable: true, + configurable: true + }); + AquariumComponent.prototype.startCheatPage = function () { + //this.router.navigate(['incentive/tundra']); + this.navController.navigateRoot(['incentive/cheatpoints']); + }; + AquariumComponent.prototype.startInfoPage = function () { + this.navController.navigateRoot(['incentive/infopage']); + }; + AquariumComponent.prototype.sideMenu = function () { + this.navigate = + [ + { + title: "Home", + url: "/home", + icon: "home" + }, + { + title: "Chat", + url: "/chat", + icon: "chatboxes" + }, + { + title: "Contacts", + url: "/contacts", + icon: "contacts" + }, + ]; + }; + //show side menu + AquariumComponent.prototype.showSideMenu = function () { + console.log("side menu called"); + this.menu.enable(true, 'first'); + this.menu.open('first'); + }; + AquariumComponent.prototype.ionViewDidLeaveFunction = function () { + this.child.ionViewDidLeaveFunction(); + //unsubscribe from model view. + this.modalDataSubscription$.unsubscribe(); + }; + AquariumComponent.prototype.ionViewDidLeave = function () { + console.log("aqarium.ts --- ionDidLeave"); + this.ionViewDidLeaveFunction(); + //If "Leave Aquarium" is already tracked in demo-aquarium, duplication? + this.appUsageDb.saveAppUsageExit("aquarium_tab"); + }; + AquariumComponent.prototype.ionViewDidEnter = function () { + console.log("aqarium.ts --- ionViewDidEnter"); + this.child.loadFunction(); + //decide if we want to show the modal view with unlockables. + this.subscribeForModalView(); + //If "Enter Aquarium" is already tracked in demo-aquarium, duplication? + this.appUsageDb.saveAppUsageEnter("aquarium_tab"); + // + this.saveDbToAWS(); + this.userProfileService.saveToServer(); + }; + //Upload SQLite database to AWS in ionViewWillEnter which happens + //before "ionViewDidEnter" in demo-aquarium, thus the table will + //be empty first visit aquarium, will not be empty if user + //"come back" to aquarium after visit other pages and will + // be exported to AWS. + // + // --- Moving to ionViewDidEnter() + // + AquariumComponent.prototype.saveDbToAWS = function () { + var _this = this; + this.appUsageDb.isTableEmpty().then(function (tableEmpty) { + console.log("tableEmpty: " + tableEmpty); + if (!tableEmpty) { + _this.exportDatabase(); + } + }).catch(function (e) { + console.log("In ionViewWillEnter at Aqarium:" + e); + }); + }; + AquariumComponent.prototype.exportDatabase = function () { + var _this = this; + console.log("exportTable at Aquarium Page!"); + this.appUsageDb.exportDatabaseToJson().then(function (res) { + console.log("upload to AWS at Aquarium Page: " + JSON.stringify(res)); + _this.awsS3Service.upload("Tracking", res); + //Empty table to prepare another round of tracking + _this.appUsageDb.emptyTable(); + }); + }; + AquariumComponent.prototype.ionViewWillUnload = function () { + }; + AquariumComponent.prototype.ngOnInit = function () { + /* + this.route.queryParams.subscribe(params => { + if (this.router.getCurrentNavigation().extras.state) { + //throw new Error("Method not implemented."); + //show modal on awards + this.modalObjectNavigationExtras = this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras; + console.log("home.page.ts --- modalObjectNavigationExtras: " + JSON.stringify(this.modalObjectNavigationExtras)); + if(this.modalObjectNavigationExtras['IsModalShownYet'] == false) + this.showModal(); + + + //this.date = this.router.getCurrentNavigation().extras.state.date; + //this.reinforcementObj['prob'] = this.router.getCurrentNavigation().extras.state.prob; + //this.reinforcement_data = this.router.getCurrentNavigation().extras.state.reinforcement_data; + //console.log("Inside AwardAltruism, date is: " +this.date+" prob is: "+this.reinforcementObj['prob']); + } + }); + */ + //this.title = "ADAPTS"; + this.title = "SARA"; + console.log("aquarium.component.ts --- start"); + //this.menu.enable(true); + this.getAwareId(); + }; + AquariumComponent.prototype.ngOnDestroy = function () { + this.sub1$.unsubscribe(); + this.sub2$.unsubscribe(); + this.ionViewDidLeaveFunction(); + console.log("aquarium.component.ts --- destroy"); + }; + AquariumComponent.prototype.getAwareId = function () { + var _this = this; + var flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_16__["environment"].flaskServerForIncentives; + var res = flaskServerAPIEndpoint.split(":"); + flaskServerAPIEndpoint = res[0] + ":" + res[1] + ":56735"; + this.httpClient.post(flaskServerAPIEndpoint + "/get_aware_id", { "username": this.userProfileService.username }) + .subscribe({ + next: function (data) { return _this.aware_id = data["aware_id"]; }, + error: function (error) { return console.error('There was an error!', error); } + }); + }; + AquariumComponent.prototype.subscribeForModalView = function () { + var _this = this; + //this.unlockedItems$ = + this.modalDataSubscription$ = this.store.pipe(Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_10__["select"])(_incentive_incentive_selectors__WEBPACK_IMPORTED_MODULE_11__["isIncentivesUnlockedForTheDay"])) + .subscribe(function (params) { + if (params == undefined) + console.log("---params: undefined---" + JSON.stringify(params)); + else { + console.log("---params: ---" + JSON.stringify(params)); + var unlockedIncentive = params; + //computeUnlockedReinforcements(currentPoints, previousPoints, awardedDollar) + if (unlockedIncentive["isUnlockedViewShown"] == false) + _this.computeUnlockedReinforcements(unlockedIncentive["current_point"], unlockedIncentive["current_point"] - unlockedIncentive["unlocked_points"], unlockedIncentive["unlocked_money"]); + } + }); + }; + AquariumComponent.prototype.startSurvey = function () { + console.log('start survey'); + var currentTime = moment__WEBPACK_IMPORTED_MODULE_4__(); + var startTime = moment__WEBPACK_IMPORTED_MODULE_4__({ hour: 18 }); // 6pm + var endTime = moment__WEBPACK_IMPORTED_MODULE_4__({ hour: 23, minute: 59 }); // 11:59pm + var firstLogin = this.userProfileService.userProfile.firstlogin; + if (firstLogin == undefined) + firstLogin = true; + this.userProfileService.userProfile.firstlogin = false; + this.userProfileService.saveProfileToDevice(); + this.userProfileService.saveToServer(); + if (!currentTime.isBetween(startTime, endTime) && !firstLogin) { + this.presentAlert('Please come back between 6 PM and midnight'); + } + else if (this.userProfileService.surveyTakenForCurrentDay()) { + this.presentAlert('You have already completed the survey for the day.'); + } + else { + if (this.userProfileService.isParent) { + this.navController.navigateRoot(['survey/samplesurvey']); //caregiversurvey + } + else { + this.navController.navigateRoot(['survey/samplesurvey2']); //aya + } + } + }; + AquariumComponent.prototype.openSurvey = function (location) { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + this.navController.navigateRoot([location]); + return [2 /*return*/]; + }); + }); + }; + AquariumComponent.prototype.presentAlert = function (alertMessage) { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var alert; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.alertCtrl.create({ + //
Thank you for completing the survey. You have unlocked a meme.
+ //header: '
Daily survey unavilable
', + header: 'Daily survey unavailable', + //subHeader: "Survey is not avaibable!", + message: alertMessage, + //defined in theme/variables.scss + //buttons: [{text: 'OK', cssClass: 'secondary'}] + buttons: [{ text: 'OK' }] + })]; + case 1: + alert = _a.sent(); + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + //---- + return [4 /*yield*/, alert.present()]; + case 2: + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + //---- + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + AquariumComponent.prototype.dispalySurveyPausedMsg = function () { + this.presentAlert('This account has been temporarily paused by the research administrators.'); + }; + AquariumComponent.prototype.showMemeDemo = function () { + this.router.navigate(['incentive/award-memes']); + }; + AquariumComponent.prototype.showAltruisticDemo = function () { + this.router.navigate(['incentive/award-altruism']); + }; + AquariumComponent.prototype.showHarvardSurvey = function () { + this.navController.navigateRoot(['survey/harvardsurvey']); + //this.router.navigate(['survey/harvardsurvey']); + }; + AquariumComponent.prototype.showSleepSurvey = function () { + this.navController.navigateRoot(['survey/sleepsurvey']); + }; + AquariumComponent.prototype.showHarvardArcApps = function () { + this.router.navigate(['intervention/arcappsfrontpage']); + }; + AquariumComponent.prototype.showPythonLifeInsight = function () { + this.router.navigate(['incentive/pythonlifeinsightsammple']); + }; + AquariumComponent.prototype.showModalDemo = function () { + var reinforcements = []; + reinforcements.push({ 'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?" }); + reinforcements.push({ 'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?" }); + reinforcements.push({ 'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?" }); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + //reinforcements.push({'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}); + this.presentModal(reinforcements); + }; + //show unlocked pages, using a modal + AquariumComponent.prototype.presentModal = function (reinforcements) { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var modal; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.modalController.create({ + component: _incentive_aquarium_modal_unlocked_page_modal_unlocked_page_component__WEBPACK_IMPORTED_MODULE_8__["ModalUnlockedPageComponent"], + componentProps: { + 'reinforcements': reinforcements + }, + enterAnimation: _animations_modal_enter__WEBPACK_IMPORTED_MODULE_7__["myEnterAnimation"], + leaveAnimation: _animations_modal_leave__WEBPACK_IMPORTED_MODULE_9__["myLeaveAnimation"], + //, + cssClass: 'my-default-2' + })]; + case 1: + modal = _a.sent(); + return [4 /*yield*/, modal.present()]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + AquariumComponent.prototype.showModal = function () { + //if(window.localStorage['IsModalShown'] == undefined) + // return; + //if(window.localStorage['IsModalShown'] == "false"){ + // + var todaysDate = moment__WEBPACK_IMPORTED_MODULE_4__().format('YYYYMMDD'); + var storedDate = this.modalObjectNavigationExtras["LastSurveyCompletionDate"]; + // + if (todaysDate == storedDate) { + //this.computeUnlockedReinforcements(); + } + // + //window.localStorage.setItem("IsModalShown", "true"); + //} + }; + AquariumComponent.prototype.isFirstDayInTheStudy = function () { + var daily_survey = this.userProfileService.userProfile.survey_data.daily_survey; + var first_date = moment__WEBPACK_IMPORTED_MODULE_4__().format('YYYYMMDD'); + var first_date_moment_js = moment__WEBPACK_IMPORTED_MODULE_4__(first_date, "YYYYMMDD"); + var key_moment_js; + for (var key in daily_survey) { + key_moment_js = moment__WEBPACK_IMPORTED_MODULE_4__(key, "YYYYMMDD"); + //takes the first day only. But it may not be the first date. + if (key_moment_js < first_date_moment_js) { + first_date = key; + first_date_moment_js = moment__WEBPACK_IMPORTED_MODULE_4__(first_date, "YYYYMMDD"); + } + } + var todays_date = moment__WEBPACK_IMPORTED_MODULE_4__().format('YYYYMMDD'); + if (todays_date == first_date) + return true; + else + return false; + }; + AquariumComponent.prototype.computeUnlockedReinforcements = function (currentPoints, previousPoints, awardedDollar) { + var _this = this; + //var currentPoints = this.modalObjectNavigationExtras["CurrentPoints"]; + //var previousPoints = this.modalObjectNavigationExtras["PreviousPoints"]; + //var awardedDollar = this.modalObjectNavigationExtras["AwardedDollar"]; + var reinforcements = []; + console.log("computeUnlockedReinforcements: called"); + //get if money is awarded. + if (awardedDollar > 0) { + if (this.isFirstDayInTheStudy()) + //reinforcements.push({'img': 'assets/img/1dollar.jpg', 'header': 'You earned ' + awardedDollar + ' dollar(s)', 'text': 'Thanks for being a participant in the study. You earned 2 dollar.'}); + reinforcements.push({ 'img': 'assets/img/1dollar.jpg', 'header': 'You earned money', 'text': 'Thanks for completing your first survey! You earned 2 dollars.' }); + else { + if (awardedDollar == 1) //hack, 1 dollar is only awarded after a three-day streak. + reinforcements.push({ 'img': 'assets/img/1dollar.jpg', 'header': 'You earned money', 'text': 'Thanks for surveys three days in a row! You earned 1 dollar.' }); + if (awardedDollar == 2) //hack, 2 dollar is only awarded after a break. + reinforcements.push({ 'img': 'assets/img/1dollar.jpg', 'header': 'You earned money', 'text': 'Thanks for coming back after a break! You earned 2 dollars.' }); + } + } + //get if fish is alotted + previousPoints = currentPoints - 60; + console.log(currentPoints + ", " + previousPoints); + fetch('../../../assets/game/fishpoints.json').then(function (res) { return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](_this, void 0, void 0, function () { + var fish_data, img, header, text, i; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, res.json()]; + case 1: + fish_data = _a.sent(); + for (i = 0; i < fish_data.length; i++) { + if ((fish_data[i].points > previousPoints) && (fish_data[i].points <= currentPoints)) { + img = "assets/" + fish_data[i].img.substring(0, fish_data[i].img.length - 4) + '_tn.jpg'; + header = "You have now unlocked the " + fish_data[i].name; + text = fish_data[i].trivia; + reinforcements.push({ 'img': img, 'header': header, 'text': text }); + } + } + console.log("reinforcements: " + JSON.stringify(reinforcements)); + if (reinforcements.length > 0) //means some rainforcement was provided. + this.presentModal(reinforcements); + return [2 /*return*/]; + } + }); + }); }); + //update the state reinforcement + this.store.dispatch(Object(_incentive_actions__WEBPACK_IMPORTED_MODULE_12__["unlockedScreenShownAlready"])({ isUnlockedScreenShown: true })); + }; + AquariumComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["Platform"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["AlertController"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["ActivatedRoute"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["ModalController"] }, + { type: _ngrx_store__WEBPACK_IMPORTED_MODULE_10__["Store"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["NavController"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["MenuController"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_13__["DatabaseService"] }, + { type: _storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_14__["AwsS3Service"] }, + { type: _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_6__["UserProfileService"] }, + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_15__["HttpClient"] } + ]; }; + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(_incentive_aquarium_demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_2__["DemoAquariumComponent"], { static: true }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", Object) + ], AquariumComponent.prototype, "child", void 0); + AquariumComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-aquarium', + template: __webpack_require__(/*! raw-loader!./aquarium.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/aquarium.component.html"), + styles: [__webpack_require__(/*! ./aquarium.component.css */ "./src/app/incentive/aquarium/aquarium.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_3__["Platform"], _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["AlertController"], + _angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"], + _angular_router__WEBPACK_IMPORTED_MODULE_5__["ActivatedRoute"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["ModalController"], + _ngrx_store__WEBPACK_IMPORTED_MODULE_10__["Store"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["NavController"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["MenuController"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_13__["DatabaseService"], + _storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_14__["AwsS3Service"], + _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_6__["UserProfileService"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_15__["HttpClient"]]) + ], AquariumComponent); + return AquariumComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/aquarium.module.ts": +/*!*******************************************************!*\ + !*** ./src/app/incentive/aquarium/aquarium.module.ts ***! + \*******************************************************/ +/*! exports provided: AquariumModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AquariumModule", function() { return AquariumModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./demo-aquarium/demo-aquarium.component */ "./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts"); +/* harmony import */ var _survey_survey_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../survey/survey.module */ "./src/app/survey/survey.module.ts"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _aquarium_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./aquarium.component */ "./src/app/incentive/aquarium/aquarium.component.ts"); +/* harmony import */ var _previews_rainforest_rainforest_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./previews/rainforest/rainforest.component */ "./src/app/incentive/aquarium/previews/rainforest/rainforest.component.ts"); + + + + + + + + + +var routes = [ + { path: 'aquariumone', component: _demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_4__["DemoAquariumComponent"] } +]; +var AquariumModule = /** @class */ (function () { + function AquariumModule() { + } + AquariumModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [_demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_4__["DemoAquariumComponent"], _aquarium_component__WEBPACK_IMPORTED_MODULE_7__["AquariumComponent"], _previews_rainforest_rainforest_component__WEBPACK_IMPORTED_MODULE_8__["RainforestComponent"]], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], + _survey_survey_module__WEBPACK_IMPORTED_MODULE_5__["SurveyModule"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["IonicModule"].forRoot(), + _angular_router__WEBPACK_IMPORTED_MODULE_6__["RouterModule"].forChild(routes) + ], + exports: [ + _demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_4__["DemoAquariumComponent"], _aquarium_component__WEBPACK_IMPORTED_MODULE_7__["AquariumComponent"] + ], + schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]] + }) + ], AquariumModule); + return AquariumModule; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/cheatpage/cheatpage.component.scss": +/*!***********************************************************************!*\ + !*** ./src/app/incentive/aquarium/cheatpage/cheatpage.component.scss ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hcXVhcml1bS9jaGVhdHBhZ2UvY2hlYXRwYWdlLmNvbXBvbmVudC5zY3NzIn0= */" + +/***/ }), + +/***/ "./src/app/incentive/aquarium/cheatpage/cheatpage.component.ts": +/*!*********************************************************************!*\ + !*** ./src/app/incentive/aquarium/cheatpage/cheatpage.component.ts ***! + \*********************************************************************/ +/*! exports provided: CheatpageComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CheatpageComponent", function() { return CheatpageComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); + + + +var CheatpageComponent = /** @class */ (function () { + function CheatpageComponent(userProfileService) { + this.userProfileService = userProfileService; + } + CheatpageComponent.prototype.ngOnInit = function () { + /* + if(window.localStorage['TotalPoints'] == undefined) + this.currentPoints = 0; + else + this.currentPoints = parseInt(window.localStorage['TotalPoints']); + */ + this.currentPoints = this.userProfileService.points; + }; + CheatpageComponent.prototype.logChange = function (event) { + //console.log(event); + console.log("Total points: " + this.totalPoints); + }; + CheatpageComponent.prototype.resetPoint = function () { + console.log("Total points: " + this.totalPoints); + this.currentPoints = this.totalPoints; + // + /* + + if(window.localStorage['TotalPoints'] == undefined) + this.totalPoints = 0; + else + this.totalPoints = parseInt(window.localStorage['TotalPoints']); + */ + //this.totalPoints = 700;//this.totalPoints + 100; + //window.localStorage.setItem("TotalPoints", ""+this.totalPoints); + this.userProfileService.cheatPoints(this.totalPoints); + }; + CheatpageComponent.prototype.returnToAquarium = function () { + window.location.href = '/home'; + }; + CheatpageComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__["UserProfileService"] } + ]; }; + CheatpageComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-cheatpage', + template: __webpack_require__(/*! raw-loader!./cheatpage.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/cheatpage/cheatpage.component.html"), + styles: [__webpack_require__(/*! ./cheatpage.component.scss */ "./src/app/incentive/aquarium/cheatpage/cheatpage.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__["UserProfileService"]]) + ], CheatpageComponent); + return CheatpageComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.less": +/*!*******************************************************************************!*\ + !*** ./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.less ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color {\n --background: #005486;\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL2RlbW8tYXF1YXJpdW0vZGVtby1hcXVhcml1bS5jb21wb25lbnQubGVzcyIsInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL2RlbW8tYXF1YXJpdW0vZGVtby1hcXVhcml1bS5jb21wb25lbnQubGVzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHFCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvYXF1YXJpdW0vZGVtby1hcXVhcml1bS9kZW1vLWFxdWFyaXVtLmNvbXBvbmVudC5sZXNzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59XG4iXX0= */" + +/***/ }), + +/***/ "./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts": +/*!*****************************************************************************!*\ + !*** ./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts ***! + \*****************************************************************************/ +/*! exports provided: DemoAquariumComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DemoAquariumComponent", function() { return DemoAquariumComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _levels_FishBowlL1_Boot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../levels/FishBowlL1/Boot */ "./src/app/incentive/aquarium/levels/FishBowlL1/Boot.js"); +/* harmony import */ var _levels_FishBowlL1_Preloader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../levels/FishBowlL1/Preloader */ "./src/app/incentive/aquarium/levels/FishBowlL1/Preloader.js"); +/* harmony import */ var _levels_FishBowlL1_Game__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../levels/FishBowlL1/Game */ "./src/app/incentive/aquarium/levels/FishBowlL1/Game.js"); +/* harmony import */ var _levels_FishBowlL2_Boot__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../levels/FishBowlL2/Boot */ "./src/app/incentive/aquarium/levels/FishBowlL2/Boot.js"); +/* harmony import */ var _levels_FishBowlL2_Preloader__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../levels/FishBowlL2/Preloader */ "./src/app/incentive/aquarium/levels/FishBowlL2/Preloader.js"); +/* harmony import */ var _levels_FishBowlL2_Game__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../levels/FishBowlL2/Game */ "./src/app/incentive/aquarium/levels/FishBowlL2/Game.js"); +/* harmony import */ var _levels_SeaLevelL3_Boot__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../levels/SeaLevelL3/Boot */ "./src/app/incentive/aquarium/levels/SeaLevelL3/Boot.js"); +/* harmony import */ var _levels_SeaLevelL3_Preloader__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../levels/SeaLevelL3/Preloader */ "./src/app/incentive/aquarium/levels/SeaLevelL3/Preloader.js"); +/* harmony import */ var _levels_SeaLevelL3_Game__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../levels/SeaLevelL3/Game */ "./src/app/incentive/aquarium/levels/SeaLevelL3/Game.js"); +/* harmony import */ var _levels_SeaLevelL4_Boot__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../levels/SeaLevelL4/Boot */ "./src/app/incentive/aquarium/levels/SeaLevelL4/Boot.js"); +/* harmony import */ var _levels_SeaLevelL4_Preloader__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../levels/SeaLevelL4/Preloader */ "./src/app/incentive/aquarium/levels/SeaLevelL4/Preloader.js"); +/* harmony import */ var _levels_SeaLevelL4_Game__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../levels/SeaLevelL4/Game */ "./src/app/incentive/aquarium/levels/SeaLevelL4/Game.js"); +/* harmony import */ var _levels_GameOver_Boot__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../levels/GameOver/Boot */ "./src/app/incentive/aquarium/levels/GameOver/Boot.js"); +/* harmony import */ var _levels_GameOver_Preloader__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../levels/GameOver/Preloader */ "./src/app/incentive/aquarium/levels/GameOver/Preloader.js"); +/* harmony import */ var _levels_GameOver_GameOver__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../levels/GameOver/GameOver */ "./src/app/incentive/aquarium/levels/GameOver/GameOver.js"); +/* harmony import */ var _levels_TundraLevelL5_Boot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../levels/TundraLevelL5/Boot */ "./src/app/incentive/aquarium/levels/TundraLevelL5/Boot.js"); +/* harmony import */ var _levels_TundraLevelL5_Preloader__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../levels/TundraLevelL5/Preloader */ "./src/app/incentive/aquarium/levels/TundraLevelL5/Preloader.js"); +/* harmony import */ var _levels_TundraLevelL5_Game__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../levels/TundraLevelL5/Game */ "./src/app/incentive/aquarium/levels/TundraLevelL5/Game.js"); +/* harmony import */ var _levels_TundraLevelL51_Boot__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../levels/TundraLevelL51/Boot */ "./src/app/incentive/aquarium/levels/TundraLevelL51/Boot.js"); +/* harmony import */ var _levels_TundraLevelL51_Preloader__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../levels/TundraLevelL51/Preloader */ "./src/app/incentive/aquarium/levels/TundraLevelL51/Preloader.js"); +/* harmony import */ var _levels_TundraLevelL51_Game__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../levels/TundraLevelL51/Game */ "./src/app/incentive/aquarium/levels/TundraLevelL51/Game.js"); +/* harmony import */ var _levels_RainforestL6_Boot__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../levels/RainforestL6/Boot */ "./src/app/incentive/aquarium/levels/RainforestL6/Boot.js"); +/* harmony import */ var _levels_RainforestL6_Preloader__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../levels/RainforestL6/Preloader */ "./src/app/incentive/aquarium/levels/RainforestL6/Preloader.js"); +/* harmony import */ var _levels_RainforestL6_Game__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../levels/RainforestL6/Game */ "./src/app/incentive/aquarium/levels/RainforestL6/Game.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_29__); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var sentry_cordova__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! sentry-cordova */ "./node_modules/sentry-cordova/dist/js/sentry-cordova.js"); +/* harmony import */ var sentry_cordova__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(sentry_cordova__WEBPACK_IMPORTED_MODULE_32__); + + + + + + + + + + + + + + + + + + + + + + + + + + + +//import { PreLoad } from '../../../PreLoad'; + + + + + + + +var DemoAquariumComponent = /** @class */ (function () { + /* get surveyPath(){ + if (this.userProfileService.isParent){ + return "survey/samplesurvey"; //"/survey/caregiversurvey" + } else{ + return "survey/samplesurvey2"; //"/survey/ayasurvey" + } + } */ + function DemoAquariumComponent(router, alertCtrl, modalController, + //private pickGameService: PickGameService, + platform, route, userProfileService, httpClient) { + this.router = router; + this.alertCtrl = alertCtrl; + this.modalController = modalController; + this.platform = platform; + this.route = route; + this.userProfileService = userProfileService; + this.httpClient = httpClient; + this.isLoaded = false; + this.fishFunFactListViewItems = []; + console.log("Constructor called"); + /* + this.route.queryParams.subscribe(params => { + if (this.router.getCurrentNavigation().extras.state) { + this.totalPoints = this.router.getCurrentNavigation().extras.state.totalPoints; + console.log("Pass totalPoints: "+this.totalPoints); + } + }); + */ + this.survey_text = "Start Survey"; + this.debugText = ""; + //this.username = "test"; + } + Object.defineProperty(DemoAquariumComponent.prototype, "totalPoints", { + // totalPoints = 0; + get: function () { + return this.userProfileService.points; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DemoAquariumComponent.prototype, "username", { + get: function () { + if (this.userProfileService == undefined) + return "test"; + else { + //add username to sentry scope for better error handling + this.addSentryScope(this.userProfileService.username); + return this.userProfileService.username; + } + }, + enumerable: true, + configurable: true + }); + DemoAquariumComponent.prototype.addSentryScope = function (username) { + /* + * + * This function adds errors in Sentry + * + */ + sentry_cordova__WEBPACK_IMPORTED_MODULE_32__["configureScope"](function (scope) { + scope.setUser({ + username: username + }); + }); + }; + //Get total submitted survey + DemoAquariumComponent.prototype.getTotalSurveyCount = function () { + return Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length; + }; + /* Get last seven days of indicator for survey completion, + return an array of 7 elements like [0, 1, 0, 0, 0, 1, 0] + with 1 indicating submitted survey, 0 otherwise, the first + element is current day. */ + DemoAquariumComponent.prototype.getIndicatorForSurveyDone = function () { + var daily_survey = this.userProfileService.userProfile.survey_data.daily_survey; + console.log("daily_survey:"); + console.log(JSON.stringify(daily_survey)); + var indicatorArray = []; + //daily_survey = {}; + if (Object.keys(daily_survey).length == 0) { + indicatorArray.push(0); + return indicatorArray; + } + var orderedDatesKeys = Object.keys(daily_survey).sort(); + var first_date = orderedDatesKeys[0]; + //first_date = "20200515"; + for (var i = 0; i < 7; i++) { + var previousdate = moment__WEBPACK_IMPORTED_MODULE_29__().subtract(i, "days").format("YYYYMMDD"); + //console.log(JSON.stringify(this.userProfileService.userProfile.survey_data.daily_survey)); + var indicator = 0; + if (previousdate in daily_survey) { + indicator = 1; + } + indicatorArray.push(indicator); + // as may days user is in in the study. no blank filling + if (first_date == previousdate) + break; + } + return indicatorArray; + }; + DemoAquariumComponent.prototype.showInfoModal = function (text) { + console.log("rewards page"); + var header_text = "Survey Completion Bar"; + text = " Shows the number of surveys you have completed in the past week (shown as green) and the ones you missed (shown as gray)."; + this.presentAlert(text, header_text); + }; + DemoAquariumComponent.prototype.goToRewardsPage = function () { + console.log("rewards page"); + //this.router.navigate(['/home']); + this.router.navigate(['incentive/treasurechest']); + }; + //preload the images + DemoAquariumComponent.prototype.preload = function () { + console.log("Preload called"); + this.game.load.image('einstein', 'assets/pics/ra_einstein.png'); + }; + //gets executed after preload + DemoAquariumComponent.prototype.create = function () { + console.log(window.localStorage['TotalPoints']); + //this.totalPoints = parseInt(window.localStorage['TotalPoints'] || "0"); + /* + if(window.localStorage['TotalPoints'] == undefined) + this.totalPoints = 0; + else + this.totalPoints = parseInt(window.localStorage['TotalPoints']); + */ + console.log("Inside Aquarium totalPoints: " + this.totalPoints); + console.log("create called"); + var s = this.game.add.sprite(80, 9, 'einstein'); + s.rotation = 0.14; + }; + DemoAquariumComponent.prototype.ngOnInit = function () { + //this.loadFunction(); + this.sendUserIdToServerFor8PMNotification(); + this.addFishFunFactsBelow(); + //get inspirational quotes + this.getInspirationalQuotes(); + }; + DemoAquariumComponent.prototype.getInspirationalQuotes = function () { + var flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_31__["environment"].flaskServerForIncentives; + var username = this.userProfileService.username; + this.httpClient.post(flaskServerAPIEndpoint + '/get-inspirational-quote', { "user_id": username }).subscribe({ + next: function (data) { return console.log("Inspirational quote: " + JSON.stringify(data)); }, + error: function (error) { return console.error('There was an error!', error); } + }); + }; + DemoAquariumComponent.prototype.addFishFunFactsBelow = function () { + //add the fish fun facts below: + if (this.totalPoints < 1060 && this.totalPoints >= 0) //fishbowl + this.addFishFunFactsBetween(0, this.totalPoints); + else if (this.totalPoints >= 1060 && this.totalPoints < 2120) //sea + this.addFishFunFactsBetween(1060, this.totalPoints); + else if (this.totalPoints >= 2120 && this.totalPoints < 3020) //tundra + this.addFishFunFactsBetween(2120, this.totalPoints); + else if (this.totalPoints >= 3020) //rainforest + this.addFishFunFactsBetween(3020, this.totalPoints); + }; + DemoAquariumComponent.prototype.addFishFunFactsBetween = function (startPoint, totalPoints) { + var _this = this; + fetch('../../../../assets/game/fishpoints.json').then(function (res) { return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](_this, void 0, void 0, function () { + var data, current_points, fishFunFactListViewItem, i; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, res.json()]; + case 1: + data = _a.sent(); + current_points = 700; + fishFunFactListViewItem = {}; + for (i = 0; i < data.length; i++) { + if (data[i].points < startPoint) + continue; + if (totalPoints < data[i].points) + continue; + // break; + fishFunFactListViewItem = { + funFact: data[i].trivia, + image: "assets/" + data[i].img.substring(0, data[i].img.length - 4) + '_tn.jpg', + fishName: data[i].name + }; + this.fishFunFactListViewItems.push(fishFunFactListViewItem); + } + this.fishFunFactListViewItems = this.fishFunFactListViewItems.reverse(); + return [2 /*return*/]; + } + }); + }); }); + }; + DemoAquariumComponent.prototype.sendUserIdToServerFor8PMNotification = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var oneSignalPlayerId, username, currentTimeTs, currentTimeReadableTs, headers, body, flaskServerAPIEndpoint; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + // Simple POST request with a JSON body and response type + console.log("--aquarium-- " + "sendUserIdToServerFor8PMNotification"); + oneSignalPlayerId = window.localStorage['oneSignalPlayerId']; + if (oneSignalPlayerId == "null" || oneSignalPlayerId == null || oneSignalPlayerId == undefined) { + console.log("oneSignalId is null, " + oneSignalPlayerId); + oneSignalPlayerId = "test_one_signal_id"; + return [2 /*return*/]; + } + username = this.userProfileService.username; + currentTimeTs = Date.now(); + currentTimeReadableTs = moment__WEBPACK_IMPORTED_MODULE_29__().format("MMMM Do YYYY, h:mm:ss a Z"); + headers = { "Content-Type": "application/json;charset=UTF-8" }; + body = { "user_id": username, "oneSignalPlayerId": oneSignalPlayerId, "currentTimeTs": currentTimeTs, "currentTimeReadableTs": currentTimeReadableTs }; + /* + this.httpClient.post("http://ec2-54-91-131-166.compute-1.amazonaws.com:56733/store-onesignal-id", body, { headers }).subscribe({ + next: data => console.log(data), + error: error => console.error('There was an error!', error) + }); + */ + console.log("oneSignalPlayerId---: " + oneSignalPlayerId); + flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_31__["environment"].flaskServerForIncentives; + this.httpClient.post(flaskServerAPIEndpoint + "/store-onesignal-id", body) + .subscribe({ + next: function (data) { return console.log("--aquarium-- " + JSON.stringify(data)); }, + error: function (error) { return console.error('There was an error!', error); } + }); + return [2 /*return*/]; + }); + }); + }; + DemoAquariumComponent.prototype.ionViewDidEnter = function () { + //if(this.isLoaded == true) + // this.loadFunction(); + this.survey_text = "Start survey"; + }; + //this function gets called from the above the "aquarium.component.ts" + DemoAquariumComponent.prototype.loadFunction = function () { + //console.log(window.localStorage['TotalPoints']); + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + //this.totalPoints = parseInt(window.localStorage['TotalPoints'] || "0"); + /* + if(window.localStorage['TotalPoints'] == undefined) + this.totalPoints = 0; + else + this.totalPoints = parseInt(window.localStorage['TotalPoints']); + */ + //console.log("Inside Aquarium totalPoints: "+this.totalPoints); + //this.game.destroy(); + //height adjustment for different phone types + var GameApp = GameApp || {}; + GameApp.CANVAS_WIDTH = 382.0; + console.log("w: " + window.innerWidth + ", h: " + window.innerHeight + ", dp: " + window.devicePixelRatio); + if (window.innerWidth > GameApp.CANVAS_WIDTH) + GameApp.CANVAS_WIDTH = window.innerWidth; + GameApp.CANVAS_HEIGHT = window.innerHeight - 35; + //var game; + if (this.platform.is('ios')) { + if (GameApp.CANVAS_HEIGHT < 642.0) { //iphone SE fix. + GameApp.CANVAS_HEIGHT += 30; + GameApp.CANVAS_WIDTH = window.innerWidth; + } + if (GameApp.CANVAS_HEIGHT > 800) { //iphone XR fix. + GameApp.CANVAS_HEIGHT -= 40; + GameApp.CANVAS_WIDTH = window.innerWidth; + } + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 45 * window.devicePixelRatio, Phaser.AUTO, 'gameDiv'); + } + else if (this.platform.is('android')) + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 74, Phaser.AUTO, 'gameDiv'); + else + this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 100, Phaser.AUTO, 'gameDiv'); + this.debugText = "" + GameApp.CANVAS_HEIGHT + ", " + window.innerHeight + ", " + window.devicePixelRatio; + //this.totalPoints = 2125; + if (this.isPreview == "false") { + if (this.totalPoints < 0) { + this.game.state.add('Boot', _levels_GameOver_Boot__WEBPACK_IMPORTED_MODULE_14__["BootGameOver"]); + this.pickedGame = 'GameOver'; + var preLoader = new _levels_GameOver_Preloader__WEBPACK_IMPORTED_MODULE_15__["PreloaderGameOver"](); + this.game.state.add('Preloader', preLoader); + var gameover = new _levels_GameOver_GameOver__WEBPACK_IMPORTED_MODULE_16__["GameOver"](); + this.game.state.add('GameOver', gameover); + } + else if (this.totalPoints < 770 && this.totalPoints >= 0) { + this.game.state.add('Boot', _levels_FishBowlL1_Boot__WEBPACK_IMPORTED_MODULE_2__["BootL1"]); + this.pickedGame = 'FishBowlL1'; + var preLoader = new _levels_FishBowlL1_Preloader__WEBPACK_IMPORTED_MODULE_3__["PreloaderL1"](); + this.game.state.add('Preloader', preLoader); + var fishBowlL1 = new _levels_FishBowlL1_Game__WEBPACK_IMPORTED_MODULE_4__["FishBowlL1"](); + fishBowlL1.setTotalPoints(this.totalPoints); + var surveyCompletionHistory = this.getIndicatorForSurveyDone(); + fishBowlL1.setSurveyHistory(surveyCompletionHistory); + this.game.state.add('FishBowlL1', fishBowlL1); + } + else if (this.totalPoints >= 770 && this.totalPoints < 1060) { + this.game.state.add('Boot', _levels_FishBowlL2_Boot__WEBPACK_IMPORTED_MODULE_5__["BootL2"]); + this.pickedGame = 'FishBowlL2'; + var preLoader = new _levels_FishBowlL2_Preloader__WEBPACK_IMPORTED_MODULE_6__["PreloaderL2"](); + this.game.state.add('Preloader', preLoader); + var fishBowlL2 = new _levels_FishBowlL2_Game__WEBPACK_IMPORTED_MODULE_7__["FishBowlL2"](); + fishBowlL2.setTotalPoints(this.totalPoints); + var surveyCompletionHistory = this.getIndicatorForSurveyDone(); + fishBowlL2.setSurveyHistory(surveyCompletionHistory); + this.game.state.add('FishBowlL2', fishBowlL2); + } + else if (this.totalPoints >= 1060 && this.totalPoints < 1710) { + this.game.state.add('Boot', _levels_SeaLevelL3_Boot__WEBPACK_IMPORTED_MODULE_8__["BootL3"]); + this.pickedGame = 'SeaLevelL3'; + var preLoader = new _levels_SeaLevelL3_Preloader__WEBPACK_IMPORTED_MODULE_9__["PreloaderL3"](); + this.game.state.add('Preloader', preLoader); + var seaLevelL3 = new _levels_SeaLevelL3_Game__WEBPACK_IMPORTED_MODULE_10__["SeaLevelL3"](); + seaLevelL3.setTotalPoints(this.totalPoints); + var surveyCompletionHistory = this.getIndicatorForSurveyDone(); + seaLevelL3.setSurveyHistory(surveyCompletionHistory); + this.game.state.add('SeaLevelL3', seaLevelL3); + } + else if (this.totalPoints >= 1710 && this.totalPoints < 2120) { + this.game.state.add('Boot', _levels_SeaLevelL4_Boot__WEBPACK_IMPORTED_MODULE_11__["BootL4"]); + this.pickedGame = 'SeaLevelL4'; + var preLoader = new _levels_SeaLevelL4_Preloader__WEBPACK_IMPORTED_MODULE_12__["PreloaderL4"](); + this.game.state.add('Preloader', preLoader); + var seaLevelL4 = new _levels_SeaLevelL4_Game__WEBPACK_IMPORTED_MODULE_13__["SeaLevelL4"](); + seaLevelL4.setTotalPoints(this.totalPoints); + var surveyCompletionHistory = this.getIndicatorForSurveyDone(); + seaLevelL4.setSurveyHistory(surveyCompletionHistory); + this.game.state.add('SeaLevelL4', seaLevelL4); + } + else if (this.totalPoints >= 2120 && this.totalPoints < 2720) { + this.game.state.add('Boot', _levels_TundraLevelL5_Boot__WEBPACK_IMPORTED_MODULE_17__["BootTundraL5"]); + this.pickedGame = "TundraLevel1"; + var preLoader = new _levels_TundraLevelL5_Preloader__WEBPACK_IMPORTED_MODULE_18__["PreloaderTundraL5"](); + this.game.state.add('Preloader', preLoader); + var level5 = new _levels_TundraLevelL5_Game__WEBPACK_IMPORTED_MODULE_19__["GameTundraL5"](); + level5.setTotalPoints(this.totalPoints); + var surveyCompletionHistory = this.getIndicatorForSurveyDone(); + level5.setSurveyHistory(surveyCompletionHistory); + this.game.state.add('TundraLevel1', level5); + } + else if (this.totalPoints >= 2720 && this.totalPoints < 3020) { + this.game.state.add('Boot', _levels_TundraLevelL51_Boot__WEBPACK_IMPORTED_MODULE_20__["BootTundraL51"]); + this.pickedGame = "TundraLevel2"; + var preLoader = new _levels_TundraLevelL51_Preloader__WEBPACK_IMPORTED_MODULE_21__["PreloaderTundraL51"](); + this.game.state.add('Preloader', preLoader); + var level51 = new _levels_TundraLevelL51_Game__WEBPACK_IMPORTED_MODULE_22__["GameTundraL51"](); + level51.setTotalPoints(this.totalPoints); + var surveyCompletionHistory = this.getIndicatorForSurveyDone(); + level51.setSurveyHistory(surveyCompletionHistory); + this.game.state.add('TundraLevel2', level51); + } + else if (this.totalPoints >= 3020) { + this.game.state.add('Boot', _levels_RainforestL6_Boot__WEBPACK_IMPORTED_MODULE_23__["BootRainforestL6"]); + this.pickedGame = "RainforestLevel6"; + var preLoader = new _levels_RainforestL6_Preloader__WEBPACK_IMPORTED_MODULE_24__["PreloaderRainforestL6"](); + this.game.state.add('Preloader', preLoader); + var level6 = new _levels_RainforestL6_Game__WEBPACK_IMPORTED_MODULE_25__["GameRainforestL6"](); + level6.setTotalPoints(this.totalPoints); + var surveyCompletionHistory = this.getIndicatorForSurveyDone(); + level6.setSurveyHistory(surveyCompletionHistory); + this.game.state.add('RainforestLevel6', level6); + } + else { + //--- + var preLoader = new _levels_FishBowlL1_Preloader__WEBPACK_IMPORTED_MODULE_3__["PreloaderL1"](); + preLoader.setGameName(this.pickedGame = "GameOver"); + this.game.state.add('Preloader', preLoader); + } + } + if (this.isPreview == "true") { + } + //this.game.state.add('GameOver', GameOver); + this.game.state.start('Boot'); + //self = this; + this.game.state.states[this.pickedGame].assignscope(this); + //this.pickGameService.currentGame.subscribe(game => this.pickedGame = game) + }; + DemoAquariumComponent.prototype.ionViewDidLeaveFunction = function () { + console.log("Aquarium, ionDidLeave"); + //this.survey_text = "Start survey"; + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.game.destroy(); + }; + DemoAquariumComponent.prototype.pauseGameRendering = function () { + this.game.state.states[this.pickedGame].yourGamePausedFunc(); + }; + DemoAquariumComponent.prototype.resumeGameRendering = function () { + this.game.state.states[this.pickedGame].yourGameResumedFunc(); + }; + DemoAquariumComponent.prototype.ngAfterViewInit = function () { + }; + DemoAquariumComponent.prototype.presentAlert = function (alertMessage, header_text) { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var alert; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.alertCtrl.create({ + //
Thank you for completing the survey. You have unlocked a meme.
+ //header: '
Daily survey unavilable
', + header: header_text, + //subHeader: "Survey is not avaibable!", + message: alertMessage, + //defined in theme/variables.scss + //buttons: [{text: 'OK', cssClass: 'secondary'}] + buttons: [{ text: 'OK' }] + })]; + case 1: + alert = _a.sent(); + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + //---- + return [4 /*yield*/, alert.present()]; + case 2: + /* + let alert = this.alertCtrl.create({ + title: 'Low battery', + subTitle: '10% of battery remaining', + buttons: ['Dismiss'] + }); + */ + //---- + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + DemoAquariumComponent.ctorParameters = function () { return [ + { type: _angular_router__WEBPACK_IMPORTED_MODULE_26__["Router"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_27__["AlertController"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_27__["ModalController"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_27__["Platform"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_26__["ActivatedRoute"] }, + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_28__["UserProfileService"] }, + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_30__["HttpClient"] } + ]; }; + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", String) + ], DemoAquariumComponent.prototype, "isPreview", void 0); + DemoAquariumComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-demo-aquarium', + template: __webpack_require__(/*! raw-loader!./demo-aquarium.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.html"), + styles: [__webpack_require__(/*! ./demo-aquarium.component.less */ "./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.less")] + }) + //@PreLoad('survey') + , + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_26__["Router"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_27__["AlertController"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_27__["ModalController"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_27__["Platform"], + _angular_router__WEBPACK_IMPORTED_MODULE_26__["ActivatedRoute"], + src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_28__["UserProfileService"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_30__["HttpClient"]]) + ], DemoAquariumComponent); + return DemoAquariumComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/FishBowlL1/Boot.js": +/*!**************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/FishBowlL1/Boot.js ***! + \**************************************************************/ +/*! exports provided: BootL1 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BootL1", function() { return BootL1; }); +class BootL1 extends Phaser.State { + preload() { + this.load.image('preloaderBar', 'assets/img/loader_bar.png'); + } + + create() { + this.input.maxPointers = 1; + this.stage.disableVisibilityChange = false; + //this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + this.scale.minWidth = 270; + this.scale.minHeight = 400; + this.scale.pageAlignHorizontally = true; + this.scale.pageAlignVertically = true; + this.stage.forcePortrait = true; + //this.scale.setScreenSize(true); + + this.input.addPointer(); + + //Change color here + //-- http://www.w3schools.com/colors/colors_picker.asp + this.stage.backgroundColor = '#095e98'; + + this.state.start('Preloader'); + console.log("Boot completed"); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/FishBowlL1/Game.js": +/*!**************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/FishBowlL1/Game.js ***! + \**************************************************************/ +/*! exports provided: FishBowlL1 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FishBowlL1", function() { return FishBowlL1; }); +class FishBowlL1 extends Phaser.State { + + //componentObject; + constructor(){ + super(); + this.componentObject; + this.surveyHistory = []; + } + + create() { + + this.gameover = false; + this.totalClicks = 0; + this.isPrawnAdded = false; + this.isClownFishAdded = false; + + this.CANVAS_WIDTH = 382.0; + if(window.innerWidth > this.CANVAS_WIDTH) + this.CANVAS_WIDTH = window.innerWidth; + + // + this.buildWorld(); + this.game.inputEnabled = false; + + // + Phaser.Canvas.setTouchAction(this.game.canvas, "auto"); + this.game.input.touch.preventDefault = false; + + } + + buildWorld() { + + // + this.height = this.game.height; + var titlescreen = this.add.image(0, this.height-210, 'titlescreen'); + //titlescreen.scale.setTo(0.85, 0.85); + + // + //var timer = this.add.sprite(5, 40, 'timer', 1); + + /* + var fish_progress = this.add.image(175,50, 'clownfish_grey'); + fish_progress.scale.setTo(-0.3, 0.3); + fish_progress.anchor.setTo(.5,.5); + */ + + /* + var pouch = this.add.image(15,80, 'diamond'); + pouch.scale.setTo(0.4, 0.4); + pouch.anchor.setTo(.5,.5); + this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', "" + 2, 12); + */ + + // + var treasure = this.add.image(90, this.height-80, 'treasure'); + treasure.scale.setTo(0.3, 0.3); + treasure.inputEnabled = true; + treasure.events.onInputDown.add(this.showunlockables, this); + + + // + this.buildFish(); + this.addFishes(); + + this.showProgressBars(); + + // + /* + var journal = this.add.image(this.CANVAS_WIDTH - 70, 10, 'journal'); + journal.scale.setTo(0.4, 0.4); + journal.inputEnabled = true; + journal.events.onInputDown.add(this.logdata, this); + */ + + + + // + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + + // + this.game.onPause.add(this.yourGamePausedFunc, this); + this.game.onResume.add(this.yourGameResumedFunc, this); + + } + + showProgressBars(){ + + var current_points = this.totalPoints; + + //------ Left side + + + + //level info + //var levels_progress = this.add.image(5, 55, 'levels_progress'); + //levels_progress.scale.setTo(.27, .30); + + /* + // + var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0); + levels_progress.scale.setTo(0.95, 1.2); + + //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1); + var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1); + var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + //progress_sprite.anchor.setTo(0,0); + progress_sprite.scale.setTo(1,1.1); + + + var level_up_icon = this.add.image(18, 68, 'level_up_icon'); + level_up_icon.scale.setTo(.5, .5); + level_up_icon.anchor.setTo(.5, .5); + + var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite'); + info_level_progress.animations.add('swim'); + info_level_progress.animations.play('swim', 1, true); + info_level_progress.scale.setTo(0.3, 0.3); + info_level_progress.anchor.setTo(.5,.5); + info_level_progress.inputEnabled = true; + info_level_progress.events.onInputDown.add(function(){this.showInforBox("Info level progress bar clicked")}, this); + + + //progress_sprite.anchor.setTo(1,0); + //progress_sprite.scale.setTo(0.8,0.8); + */ + + var SCALING_FACTOR = 0.8; + + //streak_info + var streak_info = this.add.image(5, 5, 'streak_info'); + streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR); + + /* + var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite'); + info_level_streak.animations.add('swim'); + info_level_streak.animations.play('swim', 1, true); + info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR); + info_level_streak.anchor.setTo(.5,.5); + info_level_streak.inputEnabled = true; + info_level_streak.events.onInputDown.add(function(){this.showInforBox("Streak progress bar clicked")}, this); + */ + + var colors = []; //['grey','grey','grey','grey','grey','grey','grey']; + for(var i=0; i < this.surveyHistory.length; i++){ + if(this.surveyHistory[i] == 1) + colors[i] = 'green'; + else + colors[i] = 'grey'; + } + colors = colors.reverse() + + //console.log("this.surveyHistory " + this.surveyHistory); + console.log("colors " + colors); + //colors = ['green','green','green','green','grey','green','grey']; + var streak_tile; + for(var i=0; i < this.surveyHistory.length; i++){ + streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]); + streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR); + } + + + //------ Right side + //var progressBars = this.add.group(); + + //points bar + var vertical_position_offset = 13; + var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2'); + points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR); + points_progress.anchor.setTo(1,0); + //progressBars.add(points_progress); + + //point text + var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, "" + this.totalPoints, {font:"20px dumbo_regular", fill:"#4c3d01"}); + points_text.anchor.setTo(0.5,0); + points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + //progressBars.add(points_text); + + var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point'); + star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + star_icon.anchor.setTo(.5, .5); + //progressBars.add(points_text); + + //progressBars.scale.setTo(.8, .8); + + /* + var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite'); + info_points.animations.add('swim'); + info_points.animations.play('swim', 1, true); + info_points.scale.setTo(0.3, 0.3); + info_points.anchor.setTo(.5,.5); + info_points.inputEnabled = true; + //function(){doAlert(textString) + info_points.events.onInputDown.add(function(){this.showInforBox("Info pregess bar cliccked 2")}, this); + */ + + + //points to get to next fish. + vertical_position_offset = 35; + var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1); + progress_bar_fish.anchor.setTo(1,0); + progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0); + var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon'); + fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR); + fish_progress_icon.anchor.setTo(.5, .5); + + + + //points to get to meme. + vertical_position_offset = 57; + + + /* + var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1); + progress_bar_memes.anchor.setTo(1,0); + progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_memes = 0; + var total_number_of_memes = 31; + var already_shown_memes = window.localStorage["already_shown_memes3"]; + if(already_shown_memes == undefined) + already_shown_memes = [{"filename": "assets/memes/4.jpg", "unlock_date": "blah"}] + else + already_shown_memes = JSON.parse(window.localStorage["already_shown_memes3"]); + var currently_number_of_unlocked_memes = already_shown_memes.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_memes-start_number_of_memes)/ + (total_number_of_memes-start_number_of_memes); + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon'); + meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR); + meme_icon.anchor.setTo(.5, .5); + + + //points to get to alt message. + var vertical_position_offset = 79; + var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1); + progress_bar_altruism_message.anchor.setTo(1,0); + progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_alt_messages = 0; + var total_number_of_alt_messages = 21; + + var already_shown_altruism_msgs = window.localStorage["already_shown_alt_msg3"]; + if(already_shown_altruism_msgs == undefined) + already_shown_altruism_msgs = [{"filename": "assets/altruism/altruism_1.png", "unlock_date": "blah"}] + else + already_shown_altruism_msgs = JSON.parse(window.localStorage["already_shown_alt_msg3"]); + var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/ + (total_number_of_alt_messages-start_number_of_alt_messages); + //if(percent < 0.05) + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Alt Width, " + rect.width + "," + percent); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + + var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon'); + alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR); + alt_icon.anchor.setTo(.5, .5); + + + + //points to get to level up. + var vertical_position_offset = 101; + */ + + var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1); + progress_bar_level_up.anchor.setTo(1,0); + progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + // end of level is 1060, start is at 0 + var start_point_for_level = 0; + var end_point_for_level = 1060; + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level); + percent = percent*0.8 + 0.2; + //console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + //console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2'); + level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR); + level_up_2.anchor.setTo(.5, .5); + + + + + + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + //console.log("countdown.width " + this.countdown.width); + + + } + + setSurveyHistory(survey_history){ + console.log("survey_history " + survey_history + ", length: " + survey_history.length); + //this.surveyHistory = survey_history; + for(var i=0; i= data[i].points){ + + //nemo + if(data[i].name.valueOf() === "Clown fish") + this.animateClownFish(); + + //if(data[i].name.valueOf() === "Puffer fish") + // this.animatePufferFish(); + + //starfish + if(data[i].name.valueOf() === "Star fish") + this.animateStarFishes(); + + //squid + if(data[i].name.valueOf() === "Squid") + this.animateSquid(); + + if(data[i].name.valueOf() === "Gold fish") + this.animateGoldFish(); + + if(data[i].name.valueOf() === "Octopus") + this.animateOctpus(); + + if(data[i].name.valueOf() === "Angel fish") + this.animateAngelFish(); + + if(data[i].name.valueOf() === "Crab") + this.animateCrab(); + + if(data[i].name.valueOf() === "Carp fish") + this.animateGreenFish(); + + if(data[i].name.valueOf() === "Butterfly fish") + this.animateButterflyFish(); + + if(data[i].name.valueOf() === "Puffer fish") + this.animatePufferFish(); + + if(data[i].name.valueOf() === "Tiger barb") + this.animateTigerbarb(); + + + } + } + + //set the progres bar + this.previoous_fish_point = 0; + this.next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + this.next_fish_point = data[i].points; + break; + }else{ + this.previoous_fish_point = data[i].points; + } + } + + /* + this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0); + var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height); + var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point); + console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point + "," + percent); + rect.width = Math.max(0, percent * this.progress_sprite.width); + + console.log("Width, " + rect.width + "," + this.progress_sprite.width); + this.progress_sprite.crop(rect); + */ + } + + animateClownFish(){ + this.clownFish = this.add.sprite(-100, 253, 'clownfish'); + this.clownFish.anchor.setTo(.5,.5); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 30, true); + this.clownFish.scale.setTo(0.5, 0.5); + this.clownFish.name = "clownFish"; + this.gobothways(this.clownFish); + } + + + animateSquid(){ + //squid + var squid = this.add.sprite(- 120, this.height-150, 'squid'); + squid.animations.add('swim'); + squid.animations.play('swim', 5, true); + squid.scale.setTo(0.25, 0.25); + this.gobothways(squid); + } + + animateButterflyFish(){ + //angel + var butterflyFish = this.add.sprite(-100, this.height-300, 'butterflyfish'); + butterflyFish.animations.add('swim'); + butterflyFish.animations.play('swim', 10, true); + butterflyFish.scale.setTo(0.7, 0.7); + this.gobothways(butterflyFish); + } + + animateTigerbarb(){ + // + //if(this.totalPoints >= 50 && this.totalPoints < 75) + var tigerbarbfish = this.add.sprite(-100, this.height-120, 'tigerbarb'); + tigerbarbfish.animations.add('swim'); + tigerbarbfish.animations.play('swim', 10, true); + tigerbarbfish.scale.setTo(0.8, 0.8); + this.gobothways(tigerbarbfish); + } + + animatePufferFish(){ + + var pufferfish = this.add.sprite(-100, 50, 'puffer'); + pufferfish.animations.add('swim'); + pufferfish.animations.play('swim', 5, true); + pufferfish.scale.setTo(0.7, 0.7); + this.gobothways(pufferfish); + + } + + animateAngelFish(){ + //angel + var angelfish = this.add.sprite(-100, this.height-250, 'angelfish'); + angelfish.animations.add('swim'); + angelfish.animations.play('swim', 10, true); + angelfish.scale.setTo(0.6, 0.6); + this.gobothways(angelfish); + } + + animateGreenFish(){ + // + var greenFish = this.add.sprite(this.CANVAS_WIDTH + 100, 103, 'greenfish'); + greenFish.anchor.setTo(.5,.5); + greenFish.animations.add('swim'); + greenFish.animations.play('swim', 30, true); + greenFish.scale.setTo(0.3, 0.3); + greenFish.name = "greenfish"; + this.gobothways(greenFish); + } + + animateStarFishes(){ + var redstarfish = this.add.sprite(30, this.height-28, 'redstarfish'); + redstarfish.animations.add('swim'); + redstarfish.animations.play('swim', 2, true); + redstarfish.anchor.setTo(0.5,0.5); + redstarfish.angle -= 20; + redstarfish.scale.setTo(0.10, 0.10); + + var bluestarfish = this.add.sprite(70, this.height-22, 'bluestarfish'); + bluestarfish.animations.add('swim'); + bluestarfish.animations.play('swim', 1, true); + bluestarfish.anchor.setTo(0.5,0.5); + bluestarfish.angle -= 0; + bluestarfish.scale.setTo(0.06, 0.06); + + var greenstarfish = this.add.sprite(190, this.height-22, 'greenstarfish'); + greenstarfish.animations.add('swim'); + greenstarfish.animations.play('swim', 5, true); + greenstarfish.anchor.setTo(0.5,0.5); + greenstarfish.angle +=10; + greenstarfish.scale.setTo(0.08, 0.08); + } + + animateGoldFish(){ + var goldfish = this.add.sprite(this.CANVAS_WIDTH+100, 153, 'goldfish'); + goldfish.animations.add('swim'); + goldfish.animations.play('swim', 10, true); + goldfish.scale.setTo(0.4, 0.4); + this.gobothways(goldfish); + } + + animateClownFish(){ + this.clownFish = this.add.sprite(-100, 253, 'clownfish'); + this.clownFish.anchor.setTo(.5,.5); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 30, true); + this.clownFish.scale.setTo(0.5, 0.5); + this.clownFish.name = "clownFish"; + this.gobothways(this.clownFish); + } + + animateOctpus(){ + var octopus = this.add.sprite(40, 200, 'octopus'); + octopus.animations.add('swim'); + octopus.animations.play('swim', 30, true); + octopus.scale.setTo(0.3, 0.3); + this.add.tween(octopus).to({ y: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true); + } + + + animateCrab(){ + var crab = this.add.sprite(230, this.height-60, 'seacreatures'); + crab.animations.add('swim', Phaser.Animation.generateFrameNames('crab1', 0, 25, '', 4), 30, true); + crab.animations.play('swim'); + crab.scale.setTo(0.7, 0.7); + } + + gobothways(b){ + + var change_amount = Math.floor(this.rnd.realInRange(0, 150)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + var pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.height) || (pos_y < 70)){ + pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + var t, X, Y; + if(b.x > this.CANVAS_WIDTH){ + b.scale.x = -1*b.scale.x; + X = -100+Math.floor(this.rnd.realInRange(0, 50)); + t= this.add.tween(b).to({ x: X, y: pos_y}, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + b.scale.x = -1*b.scale.x; + X = this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)); + t = this.add.tween(b).to({ x: X, y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + } + + + + stopFish(b) { + this.gobothways(b); + } + + assignFishMovement(b) { + xposition = Math.floor(this.rnd.realInRange(-100, this.world.width+100)); + yposition = Math.floor(this.rnd.realInRange(50, this.world.height-150)); + bdelay = 0; + if(xposition < b.x){ + b.scale.x = -1; + }else{ + b.scale.x = 1; + } + b.animations.add('swim'); + b.animations.play('swim', 30, true); + t = this.add.tween(b).to({x:xposition, y:yposition}, 3500, Phaser.Easing.Quadratic.InOut, true, bdelay); + t.onComplete.add(this.stopFish, this); + } + + yourGamePausedFunc(){ + console.log("Game paused"); + if(this.game.lockRender == false) + this.game.lockRender = true; + } + + yourGameResumedFunc(){ + console.log("Game resumed"); + if(this.game.lockRender == true) + this.game.lockRender = false; + } + + showunlockables(){ + console.log('treasure box clicked'); + this.componentObject.goToRewardsPage(); + } + + logdata() { + console.log('show surveys'); + this.componentObject.goToSurveyPage(); + } + + update(){ + } + + assignscope(componentObject){ + this.componentObject = componentObject; + } + + setTotalPoints(totalPoints){ + this.totalPoints = totalPoints; + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/FishBowlL1/Preloader.js": +/*!*******************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/FishBowlL1/Preloader.js ***! + \*******************************************************************/ +/*! exports provided: PreloaderL1 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloaderL1", function() { return PreloaderL1; }); +class PreloaderL1 extends Phaser.State { + + preload(){ + + //console.log("Preloader: preload called"); + + this.load.onLoadComplete.addOnce(this.onLoadComplete, this); + + this.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar'); + this.preloadBar.anchor.setTo(0.5, 0.5); + this.load.setPreloadSprite(this.preloadBar); + + //---- both aquariums + this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt'); + this.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points + this.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png'); + + this.add.text(0, 0, "hack", {font:"1px dumbo_regular", fill:"#FFFFFF"}); + //this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20); + this.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20); + this.load.image('points_progress_2', 'assets/img/points_progress_2.png'); + this.load.image('levels_progress', 'assets/img/levels_progress_2.png'); + this.load.image('streak_info', 'assets/img/streak_info_2.png'); + this.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20); + this.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20); + this.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20); + this.load.image('alt_icon', 'assets/img/heart.png'); + this.load.image('next_fish_icon', 'assets/img/fish_icon_2.png'); + this.load.image('meme_icon', 'assets/img/smiley_face.png'); + this.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20); + this.load.image('level_up_icon', 'assets/img/level_icon.png'); + this.load.image('level_up_2', 'assets/img/level_up_2.png'); + this.load.image('streak_green', 'assets/img/streak_green.png'); + this.load.image('streak_red', 'assets/img/streak_red_2.png'); + this.load.image('streak_grey', 'assets/img/streak_grey.png'); + this.load.image('star_point', 'assets/img/star.png'); + this.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json'); + + + // + //Returns a random integer between min (inclusive) and max (inclusive) + //Using Math.round() will give you a non-uniform distribution! + // + var max = 8; + var min = 1; + var rand_num = Math.floor(Math.random() * (max - min + 1)) + min; + console.log('assets/img/pirate-' + rand_num + '.png'); + this.load.image('pirate', 'assets/img/pirate-' + rand_num + '.png'); + + var username = window.localStorage['username'] || 'unknown'; + + this.isStudyParticipant = username.indexOf('-study-') !== -1; // !== -1; + this.loadFishBowl(); + + //--- RedBanner.png + //this.load.atlasJSONArray('banner', 'sprite/RedBanner.png', 'sprite/RedBanner.json'); + this.load.image('banner', 'assets/img/RedBanner.png'); + this.load.image('banner_fish', 'assets/img/banner_fish.png'); + + + //---- + var next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png'; + console.log("Next fish: " + next_fish); + this.load.image('clownfish_grey', next_fish); + + this.load.image('diamond', 'assets/img/diamond.png'); + + var progressDisplay = 0; + var timerEvt = this.time.events.loop(100, function (){ + if(this.load.progress < 100){ + progressDisplay++; + console.log('loading... '+(this.load.progress)+'%' + "; " + (100*progressDisplay)); + }else{ + //loadingText.text = 'Ready, Go!'; + console.log('Ready, Go!'); + this.time.events.remove(timerEvt); + } + + }, this); + } + + create(){ + console.log("Preloader: create called"); + this.preloadBar.cropEnabled = false; + } + + update() + { + console.log("update: "+ this.pickedGame); + this.state.start('FishBowlL1'); + } + + onLoadComplete(){ + console.log("Load complete"); + this.ready = true; + } + + loadFishBowl(){ + + // + console.log("Inside loadFishBowl"); + this.load.image('titlescreen', 'assets/img/TitleBG4.png'); + this.load.image('journal', 'assets/img/fishjournal.png'); + + // + this.load.image('fish', 'assets/img/fish.png'); + this.load.image('treasure', 'assets/img/treasure.png'); + this.load.atlasJSONArray('clownfish', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json'); + this.load.atlasJSONArray('squid', 'assets/game/sprite/squid.png', 'assets/game/sprite/squid.json'); + this.load.atlasJSONArray('butterflyfish', 'assets/game/sprite/butterflyfish.png', 'assets/game/sprite/butterflyfish.json'); + this.load.atlasJSONArray('tigerbarb', 'assets/game/sprite/tigerbarb.png', 'assets/game/sprite/tigerbarb.json'); + this.load.atlasJSONArray('puffer', 'assets/game/sprite/pufferfish.png', 'assets/game/sprite/pufferfish.json'); + this.load.atlasJSONArray('angelfish', 'assets/game/sprite/angelfish.png', 'assets/game/sprite/angelfish.json'); + this.load.atlasJSONArray('greenfish', 'assets/game/sprite/swimrightgreenfish.png', 'assets/game/sprite/swimrightgreenfish.json'); + + // + this.load.spritesheet('greenstarfish', 'assets/game/sprite/greenstarfish.png', 512, 512, 3); + this.load.spritesheet('redstarfish', 'assets/game/sprite/redstarfish.png', 512, 512, 3); + this.load.spritesheet('bluestarfish', 'assets/game/sprite/bluestarfish.png', 512, 512, 3); + + // + this.load.atlasJSONArray('goldfish', 'assets/game/sprite/goldfish.png', 'assets/game/sprite/goldfish.json'); + this.load.atlasXML('octopus', 'assets/game/sprite/octopus.png', 'assets/game/sprite/octopus.xml'); + this.load.atlasXML('seacreatures', 'assets/game/sprite/seacreatures.png', 'assets/game/sprite/seacreatures.xml'); + + + // + this.load.image('smiley', 'assets/img/smiley.png'); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/FishBowlL2/Boot.js": +/*!**************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/FishBowlL2/Boot.js ***! + \**************************************************************/ +/*! exports provided: BootL2 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BootL2", function() { return BootL2; }); +class BootL2 extends Phaser.State { + preload() { + this.load.image('preloaderBar', 'assets/img/loader_bar.png'); + } + + create() { + this.input.maxPointers = 1; + if(this.game.device.touch){ + this.input.mouse.stop(); + } + this.stage.disableVisibilityChange = false; + //this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + this.scale.minWidth = 270; + this.scale.minHeight = 400; + this.scale.pageAlignHorizontally = true; + this.scale.pageAlignVertically = true; + this.stage.forcePortrait = true; + //this.scale.setScreenSize(true); + + this.input.addPointer(); + + //Change color here + //-- http://www.w3schools.com/colors/colors_picker.asp + this.stage.backgroundColor = '#095e98'; + + this.state.start('Preloader'); + console.log("Boot completed"); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/FishBowlL2/Game.js": +/*!**************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/FishBowlL2/Game.js ***! + \**************************************************************/ +/*! exports provided: FishBowlL2 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FishBowlL2", function() { return FishBowlL2; }); +class FishBowlL2 extends Phaser.State { + + //componentObject; + constructor(){ + super(); + this.componentObject; + this.surveyHistory = []; + } + + create() { + + this.gameover = false; + this.totalClicks = 0; + this.isPrawnAdded = false; + this.isClownFishAdded = false; + + this.previoous_fish_point = 0; + this.next_fish_point = 0; + + + + // = 382.0; + //if(window.innerWidth > this.CANVAS_WIDTH) + this.CANVAS_WIDTH = window.innerWidth; + + this.buildWorld(); + this.inputEnabled = false; + + // + Phaser.Canvas.setTouchAction(this.game.canvas, "auto"); + this.game.input.touch.preventDefault = false; + + } + + buildWorld() { + + // + //this.height = window.innerHeight-44; + this.height = this.game.height; + var titlescreen = this.add.image(0, this.height-160, 'titlescreen'); + titlescreen.scale.setTo(0.85, 0.85); + + // + /* + var fish_progress = this.add.image(175,50, 'clownfish_grey'); + fish_progress.scale.setTo(-0.3, 0.3); + fish_progress.anchor.setTo(.5,.5); + */ + + //var info_progress_bar = this.add.image(175,50, 'info'); + //info_progress_bar.scale.setTo(0.3, 0.3); + //info_progress_bar.anchor.setTo(.5,.5); + + /* + var info_progress_bar = this.add.sprite(175,53, 'info_sprite'); + info_progress_bar.animations.add('swim'); + info_progress_bar.animations.play('swim', 1, true); + info_progress_bar.scale.setTo(0.3, 0.3); + info_progress_bar.anchor.setTo(.5,.5); + info_progress_bar.inputEnabled = true; + //function(){doAlert(textString) + info_progress_bar.events.onInputDown.add(function(){this.showInforBox("Info pregess bar cliccked")}, this); + */ + + /* + var pouch = this.add.image(15,80, 'diamond'); + pouch.scale.setTo(0.4, 0.4); + pouch.anchor.setTo(.5,.5); + this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', "" + 2, 12); + */ + + var treasure = this.add.image(90, this.height-70, 'treasure'); + treasure.scale.setTo(0.3, 0.3); + treasure.inputEnabled = true; + treasure.events.onInputDown.add(this.showunlockables, this); + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Fishes Fed: ' + this.totalClicks, 20); + /* + this.totalPoints = 100; + var points_str = "" + this.totalPoints; + if(this.totalPoints < 10) + points_str = "000" + this.totalPoints; + if(this.totalPoints>=10 && this.totalPoints<100) + points_str = "00" + this.totalPoints; + if(this.totalPoints>=100 && this.totalPoints<1000) + points_str = "0" + this.totalPoints; + */ + + + + // + /* + var journal = this.add.image(this.CANVAS_WIDTH - 70, 10, 'journal'); + journal.scale.setTo(0.4, 0.4); + journal.inputEnabled = true; + journal.events.onInputDown.add(this.logdata, this); + */ + + + + // + this.game.onPause.add(this.yourGamePausedFunc, this); + this.game.onResume.add(this.yourGameResumedFunc, this); + + + + + + //this.totalPoints = 1000; + this.buildFish(); + this.addFishes(); + + // + this.showProgressBars(); + + //this.checkReinforcement(); + //this.showBanner(); + + } + + showProgressBars(){ + + var current_points = this.totalPoints; + + //------ Left side + + + + //level info + //var levels_progress = this.add.image(5, 55, 'levels_progress'); + //levels_progress.scale.setTo(.27, .30); + + /* + // + var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0); + levels_progress.scale.setTo(0.95, 1.2); + + //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1); + var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1); + var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + //progress_sprite.anchor.setTo(0,0); + progress_sprite.scale.setTo(1,1.1); + + + var level_up_icon = this.add.image(18, 68, 'level_up_icon'); + level_up_icon.scale.setTo(.5, .5); + level_up_icon.anchor.setTo(.5, .5); + + var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite'); + info_level_progress.animations.add('swim'); + info_level_progress.animations.play('swim', 1, true); + info_level_progress.scale.setTo(0.3, 0.3); + info_level_progress.anchor.setTo(.5,.5); + info_level_progress.inputEnabled = true; + info_level_progress.events.onInputDown.add(function(){this.showInforBox("Info level progress bar clicked")}, this); + + + //progress_sprite.anchor.setTo(1,0); + //progress_sprite.scale.setTo(0.8,0.8); + */ + + var SCALING_FACTOR = 0.8; + + //streak_info + var streak_info = this.add.image(5, 5, 'streak_info'); + streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR); + + /* + var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite'); + info_level_streak.animations.add('swim'); + info_level_streak.animations.play('swim', 1, true); + info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR); + info_level_streak.anchor.setTo(.5,.5); + info_level_streak.inputEnabled = true; + info_level_streak.events.onInputDown.add(function(){this.showInforBox("Streak progress bar clicked")}, this); + */ + + var colors = []; //['grey','grey','grey','grey','grey','grey','grey']; + for(var i=0; i < this.surveyHistory.length; i++){ + if(this.surveyHistory[i] == 1) + colors[i] = 'green'; + else + colors[i] = 'grey'; + } + colors = colors.reverse() + + //console.log("this.surveyHistory " + this.surveyHistory); + console.log("colors " + colors); + //colors = ['green','green','green','green','grey','green','grey']; + var streak_tile; + for(var i=0; i < this.surveyHistory.length; i++){ + streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]); + streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR); + } + + + //------ Right side + //var progressBars = this.add.group(); + + //points bar + var vertical_position_offset = 13; + var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2'); + //points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR); + points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR); + points_progress.anchor.setTo(1,0); + + //progressBars.add(points_progress); + + //point text + var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, "" + this.totalPoints, {font:"20px dumbo_regular", fill:"#4c3d01"}); + points_text.anchor.setTo(0.5,0); + points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + //progressBars.add(points_text); + + var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point'); + star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + star_icon.anchor.setTo(.5, .5); + //star_icon.smoothed = false; + //star_icon.antialiasing = false; + //progressBars.add(points_text); + + //progressBars.scale.setTo(.8, .8); + + /* + var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite'); + info_points.animations.add('swim'); + info_points.animations.play('swim', 1, true); + info_points.scale.setTo(0.3, 0.3); + info_points.anchor.setTo(.5,.5); + info_points.inputEnabled = true; + //function(){doAlert(textString) + info_points.events.onInputDown.add(function(){this.showInforBox("Info pregess bar cliccked 2")}, this); + */ + + + //points to get to next fish. + vertical_position_offset = 35; + + + var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1); + progress_bar_fish.anchor.setTo(1,0); + progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0); + var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon'); + fish_progress_icon.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9**SCALING_FACTOR); + fish_progress_icon.anchor.setTo(.5, .5); + + + + //points to get to meme. + vertical_position_offset = 57; + + /* + var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1); + progress_bar_memes.anchor.setTo(1,0); + progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_memes = 0; + var total_number_of_memes = 31; + var already_shown_memes = window.localStorage["already_shown_memes3"]; + if(already_shown_memes == undefined) + already_shown_memes = [{"filename": "assets/memes/4.jpg", "unlock_date": "blah"}] + else + already_shown_memes = JSON.parse(window.localStorage["already_shown_memes3"]); + var currently_number_of_unlocked_memes = already_shown_memes.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_memes-start_number_of_memes)/ + (total_number_of_memes-start_number_of_memes); + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon'); + meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR); + meme_icon.anchor.setTo(.5, .5); + + + //points to get to alt message. + var vertical_position_offset = 79; + var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1); + progress_bar_altruism_message.anchor.setTo(1,0); + progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_alt_messages = 0; + var total_number_of_alt_messages = 21; + + var already_shown_altruism_msgs = window.localStorage["already_shown_alt_msg3"]; + if(already_shown_altruism_msgs == undefined) + already_shown_altruism_msgs = [{"filename": "assets/altruism/altruism_1.png", "unlock_date": "blah"}] + else + already_shown_altruism_msgs = JSON.parse(window.localStorage["already_shown_alt_msg3"]); + var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/ + (total_number_of_alt_messages-start_number_of_alt_messages); + //if(percent < 0.05) + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Alt Width, " + rect.width + "," + percent); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + + var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon'); + alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR); + alt_icon.anchor.setTo(.5, .5); + + + + //points to get to level up. + var vertical_position_offset = 101; + */ + + var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1); + progress_bar_level_up.anchor.setTo(1,0); + progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + // end of level is 1060, start is at 0 + var start_point_for_level = 0; + var end_point_for_level = 1060; + var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level); + percent = percent*0.8 + 0.2; + //console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + //console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2'); + level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR); + level_up_2.anchor.setTo(.5, .5); + + + + + + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + //console.log("countdown.width " + this.countdown.width); + + + } + + showBanner(){ + this.banner_object = this.add.group(); + //--- banner + var banner = this.add.image(0, this.height-180, 'banner'); + banner.scale.setTo(.65, .95); + banner.inputEnabled = true; + //banner.events.onInputDown.add(this.hideBanner, this); + this.banner_object.add(banner); + banner.events.onInputDown.add(this.hideBanner, this); + + var banner_fish = this.add.image(290, this.height-210, 'info'); + banner_fish.scale.setTo(1, 1); + banner_fish.inputEnabled = true; + //banner_fish.events.onInputDown.add(this.hideBanner, this); + this.banner_object.add(banner_fish); + banner_fish.events.onInputDown.add(this.hideBanner, this); + + // + var style = { font: "18px Arial", fill: "#f1c40f", align: "left", fontWeights: 'lighter' }; + var text = this.add.text(10, this.height-165, "New sea level is unlocked.\nClick the fish bowl\nto go to earlier level.", style); + text.strokeThickness = 0; + text.inputEnabled = true; + //text.events.onInputDown.add(this.hideBanner, this); + this.banner_object.add(text); + text.events.onInputDown.add(this.hideBanner, this); + + // + var style = { font: "13px Arial", fill: "#f1c40f", align: "left", fontStyle: 'italic', fontWeights: 'lighter'}; + var text2 = this.add.text(215, this.height-105, "Tap to hide", style); + text2.strokeThickness = 0; + text2.inputEnabled = true; + //text2.events.onInputDown.add(this.hideBanner, this); + this.banner_object.add(text2); + text2.events.onInputDown.add(this.hideBanner, this); + + //make a left ot right animation. + } + + hideBanner(elem){ + console.log("clicked"); + this.banner_object.destroy(true); + window.localStorage['banner_shown_2'] = "1"; + //deleted all the elements + } + + + buildFish() { + + //assign number of fish + this.numfish = 0; + //assign type and age of fish + var fishType = ["green1", "horse1", "purple1", "pink1", "magenta1"] + this.fishGroup = this.add.group(); + this.fishGroup.enableBody = true; + + // + for(var i = 0; i < this.numfish; i++){ + var b = this.fishGroup.create(this.rnd.integerInRange(0, this.world.width), this.rnd.integerInRange(this.world.height-300, this.world.height-200), fishType[i]); + b.anchor.setTo(0.5, 0.5); + b.body.moves = false; + b.inputEnabled = true; //true; + b.events.onInputDown.add(this.addTally, this); + this.assignFishMovement(b); + } + + } + + + addFishes(){ + + var phaserJSON = this.game.cache.getJSON('fishpoints'); + //console.log(JSON.stringify(phaserJSON)); + + + var data = phaserJSON; + var survey_string = ""; + var current_points = this.totalPoints; + for(var i = 0; i < data.length; i++) { + if(current_points >= data[i].points){ + + //nemo + if(data[i].name.valueOf() === "Clown fish") + this.animateClownFish(); + + //if(data[i].name.valueOf() === "Puffer fish") + // this.animatePufferFish(); + + //starfish + if(data[i].name.valueOf() === "Star fish") + this.animateStarFishes(); + + //squid + if(data[i].name.valueOf() === "Squid") + this.animateSquid(); + + if(data[i].name.valueOf() === "Gold fish") + this.animateGoldFish(); + + if(data[i].name.valueOf() === "Octopus") + this.animateOctpus(); + + if(data[i].name.valueOf() === "Angel fish") + this.animateAngelFish(); + + if(data[i].name.valueOf() === "Crab") + this.animateCrab(); + + if(data[i].name.valueOf() === "Carp fish") + this.animateGreenFish(); + + if(data[i].name.valueOf() === "Electric fish") + this.animatePurpleFish(); + + if(data[i].name.valueOf() === "Discus fish") + this.animateDiscusFish(); + + if(data[i].name.valueOf() === "Betta fish") + this.animateBettaFish(); + + if(data[i].name.valueOf() === "Sea horse") + this.animateSeaHorse(); + + if(data[i].name.valueOf() === "Butterfly fish") + this.animateButterflyFish(); + + if(data[i].name.valueOf() === "Puffer fish") + this.animatePufferFish(); + + if(data[i].name.valueOf() === "Tiger barb") + this.animateTigerbarb(); + + //if(data[i].name.valueOf() === "Tiger barb") + // this.animateTigerbarb(); + + } + } + + //set the progres bar + this.previoous_fish_point = 0; + this.next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + this.next_fish_point = data[i].points; + break; + }else{ + this.previoous_fish_point = data[i].points; + } + } + + + } + + animateClownFish(){ + this.clownFish = this.add.sprite(-100, 253, 'clownfish'); + this.clownFish.anchor.setTo(.5,.5); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 30, true); + this.clownFish.scale.setTo(0.5, 0.5); + this.clownFish.name = "clownFish"; + this.gobothways(this.clownFish); + } + + + animateSquid(){ + //squid + var squid = this.add.sprite(- 120, this.height-150, 'squid'); + squid.animations.add('swim'); + squid.animations.play('swim', 5, true); + squid.scale.setTo(0.25, 0.25); + this.gobothways(squid); + } + + + animateButterflyFish(){ + //angel + var butterflyFish = this.add.sprite(-100, this.height-300, 'butterflyfish'); + butterflyFish.animations.add('swim'); + butterflyFish.animations.play('swim', 10, true); + butterflyFish.scale.setTo(0.5, 0.5); + this.gobothways(butterflyFish); + } + + animateTigerbarb(){ + // + //if(this.totalPoints >= 50 && this.totalPoints < 75) + var tigerbarbfish = this.add.sprite(-100, this.height-120, 'tigerbarb'); + tigerbarbfish.animations.add('swim'); + tigerbarbfish.animations.play('swim', 10, true); + tigerbarbfish.scale.setTo(0.6, 0.6); + this.gobothways(tigerbarbfish); + } + + animatePufferFish(){ + // + //if(this.totalPoints >= 50 && this.totalPoints < 75) + var pufferfish = this.add.sprite(-100, 60, 'puffer'); + pufferfish.animations.add('swim'); + pufferfish.animations.play('swim', 10, true); + pufferfish.scale.setTo(0.5, 0.5); + this.gobothways(pufferfish); + } + + animateSquid(){ + //squid + var squid = this.add.sprite(- 120, this.height-190, 'squid'); + squid.animations.add('swim'); + squid.animations.play('swim', 5, true); + squid.scale.setTo(0.19, 0.19); + this.gobothways(squid); + + } + + + animateAngelFish(){ + + //angel + var angelfish = this.add.sprite(-100, this.height-260, 'angelfish'); + angelfish.animations.add('swim'); + angelfish.animations.play('swim', 10, true); + angelfish.scale.setTo(0.4, 0.4); + this.gobothways(angelfish); + + } + + + animateDiscusFish(){ + + // + var discusfish = this.add.sprite(-100, this.height-150, 'discusfish'); + discusfish.animations.add('swim'); + discusfish.animations.play('swim', 15, true); + discusfish.scale.setTo(0.4, 0.4); + this.gobothways(discusfish); + + } + + + animateBettaFish(){ + + // + var bettafish = this.add.sprite(this.CANVAS_WIDTH-150, this.height-130, 'bettafish'); + bettafish.animations.add('swim'); + bettafish.animations.play('swim', 5, true); + bettafish.scale.setTo(0.25, 0.25); + + + } + + + animateClownFish(){ + // + this.clownFish = this.add.sprite(-100, 253, 'clownfish'); + this.clownFish.anchor.setTo(.5,.5); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 30, true); + this.clownFish.scale.setTo(0.35, 0.35); + this.clownFish.name = "clownFish"; + this.gobothways(this.clownFish); + + } + + + animateGoldFish(){ + //goldfish + var goldfish = this.add.sprite(this.CANVAS_WIDTH+100, 193, 'goldfish'); + goldfish.animations.add('swim'); + goldfish.animations.play('swim', 10, true); + goldfish.scale.setTo(0.27, 0.27); + this.gobothways(goldfish); + + } + + + animateGreenFish(){ + var greenFish = this.add.sprite(this.CANVAS_WIDTH + 100, 153, 'greenfish'); + greenFish.anchor.setTo(.5,.5); + greenFish.animations.add('swim'); + greenFish.animations.play('swim', 30, true); + greenFish.scale.setTo(0.2, 0.2); + greenFish.name = "greenfish"; + this.gobothways(greenFish); + + + } + + + animateSeaHorse(){ + + var seahorse = this.add.sprite(this.CANVAS_WIDTH-60, 150, 'seahorseyellow'); + seahorse.animations.add('swim'); + seahorse.animations.play('swim', 10, true); + //seahorse.anchor.setTo(0.5, 0.5); + seahorse.scale.setTo(0.08, 0.08); + + + } + + + animateOctpus(){ + var octopus = this.add.sprite(40, 200, 'octopus'); + octopus.animations.add('swim'); + octopus.animations.play('swim', 30, true); + octopus.scale.setTo(0.2, 0.2); + this.add.tween(octopus).to({ y: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true); + + } + + + animatePurpleFish(){ + + var purpleFish = this.add.sprite(-100, 103, 'seacreatures'); + purpleFish.animations.add('swim', Phaser.Animation.generateFrameNames('purpleFish', 0, 20, '', 4), 30, true); + purpleFish.animations.play('swim'); + purpleFish.anchor.setTo(.5,.5); + purpleFish.scale.setTo(0.5, 0.5); + purpleFish.name = "purplefish"; + //this.add.tween(purpleFish).to({ x: -100 }, 3500, Phaser.Easing.Quadratic.InOut, true, 0, 1000, false); + this.gobothways(purpleFish); + + + } + + + animateCrab(){ + var crab = this.add.sprite(190, this.height-50, 'seacreatures'); + crab.animations.add('swim', Phaser.Animation.generateFrameNames('crab1', 0, 25, '', 4), 30, true); + crab.animations.play('swim'); + crab.scale.setTo(0.52, 0.52); + + } + + + + + animateStarFishes(){ + // + var redstarfish = this.add.sprite(30, this.height-28+7, 'redstarfish'); + redstarfish.animations.add('swim'); + redstarfish.animations.play('swim', 2, true); + redstarfish.anchor.setTo(0.5,0.5); + redstarfish.angle -= 20; + redstarfish.scale.setTo(0.07, 0.07); + + var bluestarfish = this.add.sprite(70, this.height-22+7, 'bluestarfish'); + bluestarfish.animations.add('swim'); + bluestarfish.animations.play('swim', 1, true); + bluestarfish.anchor.setTo(0.5,0.5); + bluestarfish.angle -= 0; + bluestarfish.scale.setTo(0.04, 0.04); + + + var greenstarfish = this.add.sprite(170, this.height-22+7, 'greenstarfish'); + greenstarfish.animations.add('swim'); + greenstarfish.animations.play('swim', 5, true); + greenstarfish.anchor.setTo(0.5,0.5); + greenstarfish.angle +=10; + greenstarfish.scale.setTo(0.04, 0.04); + + + } + + + gobothways(b){ + + var change_amount = Math.floor(this.rnd.realInRange(0, 150)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + var pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.height) || (pos_y < 70)){ + pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + var t, X, Y; + if(b.x > this.CANVAS_WIDTH){ + b.scale.x = -1*b.scale.x; + X = -100+Math.floor(this.rnd.realInRange(0, 50)); + t= this.add.tween(b).to({ x: X, y: pos_y}, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + b.scale.x = -1*b.scale.x; + X = this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)); + t = this.add.tween(b).to({ x: X, y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + } + + + + stopFish(b) { + this.gobothways(b); + } + + assignFishMovement(b) { + xposition = Math.floor(this.rnd.realInRange(-100, this.world.width+100)); + yposition = Math.floor(this.rnd.realInRange(50, this.world.height-150)); + bdelay = 0; + if(xposition < b.x){ + b.scale.x = -1; + }else{ + b.scale.x = 1; + } + b.animations.add('swim'); + b.animations.play('swim', 30, true); + t = this.add.tween(b).to({x:xposition, y:yposition}, 3500, Phaser.Easing.Quadratic.InOut, true, bdelay); + t.onComplete.add(this.stopFish, this); + } + + yourGamePausedFunc(){ + console.log("Game paused"); + if(this.game.lockRender == false) + this.game.lockRender = true; + } + + yourGameResumedFunc(){ + console.log("Game resumed"); + if(this.game.lockRender == true) + this.game.lockRender = false; + } + + showunlockables(){ + console.log('treasure box clicked'); + this.componentObject.goToRewardsPage(); + } + + showInforBox(text){ + //console.log('treasure box clicked'); + this.componentObject.showInfoModal(text); + } + + logdata() { + console.log('show surveys'); + this.componentObject.goToSurveyPage(); + } + + update(){ + } + + assignscope(componentObject){ + this.componentObject = componentObject; + } + + setTotalPoints(totalPoints){ + this.totalPoints = totalPoints; + } + + setSurveyHistory(survey_history){ + console.log("survey_history " + survey_history + ", length: " + survey_history.length); + //this.surveyHistory = survey_history; + for(var i=0; i= data[i].points){ + drawing_order_enabled[data[i].name.valueOf()] = 1; + } + } + + for(var key in drawing_order_enabled) { + + //means it is not included + if(drawing_order_enabled[key] == 0) + continue; + + + if(drawing_order_enabled[key] == 1){ + + // + if(key === "Squirrel") + this.animateSquirrel(); + + if(key === "Jaguar") + this.animateJaguar(); + + if(key === "Venus Flytrap") + this.animateCarnivorePlant(); + + if(key === "Lion") + this.animateLionMain(); + + if(key === "Ostrich") + this.animateOstrich(); + + if(key === "Triceratops") + this.animateTriceratopsMain(); + + //if(data[i].name.valueOf() === "Corn") + // this.animateCornMain(); + + if(key === "Macaw") + this.animateMacaw(); + + if(key === "Duck") + this.animateGooseDuck(); + + if(key === "Owl") + this.animateOwl(); + + if(key === "Sparrow") + this.animateSparrow(); + + if(key === "Vulture") + this.animateVulture(); + + if(key === "Koala") + this.animateKoalaMain(); + + if(key === "Butterfly") + this.animateButterFly(); + + if(key === "Rain"){ + //this.animateRain(); + } + + } + } + + //set the progres bar + this.previoous_fish_point = 0; + this.next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + this.next_fish_point = data[i].points; + break; + }else{ + this.previoous_fish_point = data[i].points; + } + } + + /* + //--- + var timer = this.add.sprite(5, 40, 'timer', 1); + + this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0); + var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height); + var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point); + //console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point + "," + percent); + rect.width = Math.max(0, percent * this.progress_sprite.width); + + //console.log("Width, " + rect.width + "," + this.progress_sprite.width); + this.progress_sprite.crop(rect); + */ + } + + animateRain(){ + //console.log("snow button loaded"); + this.rainingswitch = this.add.image(this.game.width - 100, 10, 'rain_start'); + this.rainingswitch.scale.setTo(0.6, 0.6); + this.rainingswitch.inputEnabled = true; + this.rainingswitch.events.onInputDown.addOnce(this.startraining, this); + } + + startraining(){ + //console.log("start snowing"); + + //var mid_emitter; + //var back_emitter; + + this.rainingswitch.loadTexture("rain_end",0); + + //this.back_emitter = this.game.add.emitter(this.game.world.centerX, -32, 600); + this.emitter = this.game.add.emitter(this.game.world.centerX, -32, 600); + + this.emitter.width = this.game.world.width; + // emitter.angle = 30; // uncomment to set an angle for the rain. + + this.emitter.makeParticles('rain'); + this.emitter.minParticleScale = 0.1; + this.emitter.maxParticleScale = 0.5; + this.emitter.setYSpeed(300, 500); + this.emitter.setXSpeed(-5, 5); + this.emitter.minRotation = 0; + this.emitter.maxRotation = 0; + this.emitter.start(false, 1600, 5, 0); + + this.rainingswitch.events.onInputDown.addOnce(this.stopraining, this); + } + + stopraining(){ + + this.rainingswitch.loadTexture("rain_start",0); + this.emitter.destroy(); + this.rainingswitch.events.onInputDown.addOnce(this.startraining, this); + } + + animateButterFly(){ + var flowerBush = this.add.sprite(-10, this.game.height-293, 'flowerBush'); + flowerBush.scale.setTo(.2, .2); + flowerBush.anchor.setTo(0,1); + + var butterfly = this.game.add.sprite(60, this.game.height-373, 'butterfly'); + butterfly.animations.add('swim'); + butterfly.animations.play('swim', 3, true); + butterfly.scale.setTo(.6, .6); + //this.butterfly = butterfly; + + + butterfly = this.game.add.sprite(30, this.game.height-343, 'butterfly'); + butterfly.animations.add('swim'); + butterfly.animations.play('swim', 15, true); + butterfly.scale.setTo(.4, .4); + butterfly.rotation = -0.5; + //this.butterfly = butterfly; + + butterfly = this.game.add.sprite(20, this.game.height-343, 'butterfly'); + butterfly.animations.add('swim'); + butterfly.animations.play('swim', 25, true); + butterfly.scale.setTo(.25, .25); + butterfly.rotation = 0.5; + this.butterfly = butterfly; + } + + animateMonkey(){ + //--- + var treeBranch = this.add.sprite(-10, 125, 'treeBranch'); + treeBranch.scale.setTo(.3, .3); + treeBranch.rotation = -0.1; + + //--- + /* + //console.log("adding redMonkey"); + var redMonkey = this.game.add.sprite(5, 145, 'redMonkey'); + redMonkey.animations.add('swim'); + //redMonkey.animations.play('swim', 5, true); + redMonkey.scale.setTo(.15, .15); + //redMonkey.inputEnabled = true; + this.redMonkey = redMonkey; + + //--- + console.log("adding brownMonkey"); + var brownMonkey = this.game.add.sprite(20, 145, 'brownMonkey'); + brownMonkey.animations.add('swim'); + //brownMonkey.animations.play('swim', 5, true); + brownMonkey.scale.setTo(.1, .1); + //brownMonkey.inputEnabled = true; + this.brownMonkey = brownMonkey; + + //--- + console.log("adding blackMonkey"); + var blackMonkey = this.game.add.sprite(30, 145, 'blackMonkey'); + blackMonkey.animations.add('swim'); + //blackMonkey.animations.play('swim', 5, true); + blackMonkey.scale.setTo(.15, .15); + //brownMonkey.inputEnabled = true; + this.blackMonkey = blackMonkey; + */ + + } + + animateCarnivorePlant(){ + // + //console.log("adding thristy plant"); + var thirstyplant = this.game.add.sprite(-30, this.game.height-310, 'thirstyplant'); + thirstyplant.animations.add('swim'); + thirstyplant.animations.play('swim', 15, true); + thirstyplant.scale.setTo(.72, .72); + thirstyplant.inputEnabled = true; + this.thirstyplant = thirstyplant; + thirstyplant.events.onInputDown.addOnce(this.changeToAttack, this); + } + + + animateCornMain(){ + //console.log("adding corn"); + var corn = this.game.add.sprite(5, this.game.height-345, 'corn_stand'); + corn.animations.add('swim'); + corn.animations.play('swim', 5, true); + corn.scale.setTo(.64, .64); + corn.inputEnabled = true; + this.corn = corn; + corn.events.onInputDown.addOnce(this.changeToAttackCorn, this); + } + + + animateKoalaMain(){ + // + this.koala = this.add.sprite(this.game.width+30, this.game.height-320, 'koala'); + this.animateKoala(); + } + // + animateKoala(){ + console.log("Idle koala"); + this.koala.loadTexture('koala', 0); + this.koala.animations.add('swim'); + this.koala.animations.play('swim', 2, true); + this.koala.scale.setTo(-.24, .24); + //this.triceratops.inputEnabled = true; + //this.triceratops.events.onInputDown.addOnce(this.animateLionJump, this); + this.koala.name = "koala"; + } + + // + animateTriceratopsMain(){ + this.triceratops = this.add.sprite(this.game.width+30, this.game.height-240, 'triceratops'); + this.animateTriceratops(); + } + + // + animateTriceratops(){ + //console.log("Idle triceratops"); + this.triceratops.loadTexture('triceratops', 0); + this.triceratops.animations.add('swim'); + this.triceratops.animations.play('swim', 2, true); + this.triceratops.scale.setTo(-.32, .32); + this.triceratops.name = "triceratops"; + } + + animateLionMain(){// + // + this.lion = this.add.sprite(this.game.width-60, this.game.height-240, 'lion'); + this.animateLion(); + } + + // + animateLion(){ + console.log("Idle lion"); + this.lion.loadTexture('lion', 0); + this.lion.animations.add('swim'); + this.lion.animations.play('swim', 3, true); + this.lion.scale.setTo(-0.8, 0.8); + this.lion.inputEnabled = true; + this.lion.events.onInputDown.addOnce(this.animateLionJump, this); + this.lion.name = "lion"; + //this.pegions.body.velocity.x = -20; + //this.gobothways(this.lion); + } + + // + animateLionJump(){ + + //console.log("Jump lion jump"); + + //this.thirstyplant.loadTexture('attackplant', 0); + + //this.lion = this.add.sprite(this.game.width-30, this.game.height-250, 'lionjump'); + this.lion.loadTexture('lionjump', 0); + this.lion.animations.add('swim'); + this.lion.animations.play('swim', 5, true); + this.lion.scale.setTo(-0.8, 0.8); + //this.lion.inputEnabled = true; + //thirstyplant.events.onInputDown.add(this.changeToAttack, this); + this.lion.name = "lion"; + //this.pegions.body.velocity.x = -20; + //this.gobothways(this.lion); + + // + //this.lion.animations.currentAnim.onComplete.add(this.animateLion, this); + this.lion.events.onInputDown.addOnce(this.animateLion, this); + } + + // + animatePegions(){ + this.pegions = this.add.sprite(-500, 95, 'pegions'); + this.pegions.anchor.setTo(.5,.5); + this.pegions.animations.add('swim2'); + this.pegions.animations.play('swim2', 5, true); + this.pegions.scale.setTo(-0.7, 0.7); + this.pegions.name = "pegions"; + //this.pegions.body.velocity.x = -20; + this.gobothways(this.pegions); + } + + // + animateVulture(){ + this.vulture = this.add.sprite(-40, 75, 'vulture_flying'); + this.vulture.anchor.setTo(.5,.5); + this.vulture.animations.add('swim2'); + this.vulture.animations.play('swim2', 5, true); + this.vulture.scale.setTo(0.12, 0.12); + this.vulture.name = "vulture"; + this.gobothways(this.vulture); + } + + // + animateSparrow(){ + this.sparrow = this.add.sprite(this.game.width+750, 215, 'sparrow_flying'); + this.sparrow.anchor.setTo(.5,.5); + this.sparrow.animations.add('swim2'); + this.sparrow.animations.play('swim2', 15, true); + this.sparrow.scale.setTo(-0.15, 0.15); + this.sparrow.name = "sparrow"; + this.gobothways(this.sparrow); + } + + // + animateGooseDuck(){ + this.duck1 = this.add.sprite(this.game.width+250, 135, 'goose_flying'); + this.duck1.anchor.setTo(.5,.5); + this.duck1.animations.add('swim2'); + this.duck1.animations.play('swim2', 15, true); + this.duck1.scale.setTo(-0.12, 0.12); + this.duck1.name = "duck1"; + this.gobothways(this.duck1); + + this.duck2 = this.add.sprite(this.game.width+300, 145, 'duck_flying'); + this.duck2.anchor.setTo(.5,.5); + this.duck2.animations.add('swim2'); + this.duck2.animations.play('swim2', 15, true); + this.duck2.scale.setTo(-0.11, 0.11); + this.duck2.name = "duck2"; + this.gobothways(this.duck2); + } + + // + animateMacaw(){ + this.macaw = this.add.sprite(this.game.width+150, 235, 'macaw_flying'); + this.macaw.anchor.setTo(.5,.5); + this.macaw.animations.add('swim2'); + this.macaw.animations.play('swim2', 15, true); + this.macaw.scale.setTo(0.2, 0.2); + this.macaw.name = "macaw"; + this.gobothways(this.macaw); + } + + // + animateOwl(){ + this.owl = this.add.sprite(this.game.width+550, 255, 'owl_flying'); + this.owl.anchor.setTo(.5,.5); + this.owl.animations.add('swim2'); + this.owl.animations.play('swim2', 15, true); + this.owl.scale.setTo(-0.1, 0.1); + this.owl.name = "owl"; + this.gobothways(this.owl); + } + + + // + /* + animateSparrow(){ + this.sparrow = this.add.sprite(this.game.width+250, 65, 'sparrow_flying'); + this.sparrow.anchor.setTo(.5,.5); + this.sparrow.animations.add('swim'); + this.sparrow.animations.play('swim', 5, true); + this.sparrow.scale.setTo(0.1, 0.); + this.sparrow.name = "sparrow"; + this.gobothways(this.sparrow); + } + */ + + + //if(this.totalPoints >= 0 && this.totalPoints < 25) + animateOstrich(){ + this.clownFish = this.add.sprite(this.game.width+250, this.game.height-275, 'ostrich'); + this.clownFish.anchor.setTo(.5,.5); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 10, true); + this.clownFish.scale.setTo(0.4, 0.4); + this.clownFish.name = "squirrel"; + this.gobothways(this.clownFish); + + + //this.isPrawnAdded = true; + //this.prawn = this.add.sprite(10, this.height-50, 'seacreatures', 'prawn0000'); + //this.prawn.scale.setTo(0.5, 0.5); + } + + //if(this.totalPoints >= 0 && this.totalPoints < 25) + animateSquirrel(){ + this.ostrich = this.add.sprite(-50, this.game.height-250, 'squirrel'); + this.ostrich.anchor.setTo(.5,.5); + this.ostrich.animations.add('swim2'); + this.ostrich.animations.play('swim2', 25, true); + this.ostrich.scale.setTo(-0.56, 0.56); + this.ostrich.name = "ostrich"; + this.gobothways(this.ostrich); + + + //this.isPrawnAdded = true; + //this.prawn = this.add.sprite(10, this.height-50, 'seacreatures', 'prawn0000'); + //this.prawn.scale.setTo(0.5, 0.5); + } + + + animateJaguar(){ + this.jaguar = this.add.sprite(this.game.width+50, this.game.height-310, 'jaguar'); + this.jaguar.anchor.setTo(.5,.5); + this.jaguar.animations.add('swim2'); + this.jaguar.animations.play('swim2', 10, true); + this.jaguar.scale.setTo(0.25, 0.25); + this.jaguar.name = "jaguar"; + this.gobothways(this.jaguar); + + + //this.isPrawnAdded = true; + //this.prawn = this.add.sprite(10, this.height-50, 'seacreatures', 'prawn0000'); + //this.prawn.scale.setTo(0.5, 0.5); + } + + + + + changeToAttack(){ + console.log("changed to attack"); + this.thirstyplant.loadTexture('attackplant', 0); + this.thirstyplant.animations.add('swim'); + this.thirstyplant.animations.play('swim', 15, true); + this.thirstyplant.events.onInputDown.addOnce(this.changeToThirsty, this); + } + + changeToThirsty(){ + //console.log("changed to thirsty"); + this.thirstyplant.loadTexture('thirstyplant', 0); + this.thirstyplant.animations.add('swim'); + this.thirstyplant.animations.play('swim', 15, true); + this.thirstyplant.events.onInputDown.addOnce(this.changeToAttack, this); + } + + changeToAttackCorn(){ + //console.log("changed to attack"); + this.corn.loadTexture('corn_attach', 0); + this.corn.animations.add('swim'); + this.corn.animations.play('swim', 5, true); + this.corn.events.onInputDown.addOnce(this.changeToAttackCornKiss, this); + } + + + changeToAttackCornKiss(){ + //console.log("changed to thirsty"); + this.corn.loadTexture('corn_stand', 0); + this.corn.animations.add('swim'); + this.corn.animations.play('swim', 5, true); + this.corn.events.onInputDown.addOnce(this.changeToAttackCorn, this); + } + + gobothways(b){ + + var change_amount = Math.floor(this.rnd.realInRange(0, 150)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.height) || (pos_y < 70)){ + pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + var t, X, Y; + if(b.x > this.CANVAS_WIDTH){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + X = -200+Math.floor(this.rnd.realInRange(0, 200));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000)) + t= this.add.tween(b).to({ x: X, y: pos_y}, 7500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + //console.log('left to right, ' + b.x); + b.scale.x = -1*b.scale.x; + X = this.CANVAS_WIDTH + 200 - Math.floor(this.rnd.realInRange(0, 200)); //+ Math.floor(this.rnd.realInRange(0, 2000)) + t = this.add.tween(b).to({ x: X, y: pos_y }, 9500+ Math.floor(this.rnd.realInRange(0, 5000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + //*/ + } + + stopFish(b) { + //this.assignFishMovement(b); + //console.log('stopped'); + this.gobothways(b); + } + + buildWorld() { + + } + + showunlockables(){ + //console.log('treasure box clicked'); + this.componentObject.goToRewardsPage(); + } + + + setTotalPoints(totalPoints){ + this.totalPoints = totalPoints; + } + + assignscope(componentObject){ + this.componentObject = componentObject; + } + + + yourGamePausedFunc(){ + console.log("Game paused"); + if(this.game.lockRender == false) + this.game.lockRender = true; + } + + yourGameResumedFunc(){ + console.log("Game resumed"); + if(this.game.lockRender == true) + this.game.lockRender = false; + } + + + + +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/RainforestL6/Preloader.js": +/*!*********************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/RainforestL6/Preloader.js ***! + \*********************************************************************/ +/*! exports provided: PreloaderRainforestL6 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloaderRainforestL6", function() { return PreloaderRainforestL6; }); +class PreloaderRainforestL6 extends Phaser.State { + + preload(){ + + console.log("Preload called"); + this.input.addPointer(); + + this.load.onLoadComplete.addOnce(this.onLoadComplete, this); + this.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar'); + this.preloadBar.anchor.setTo(0.5, 0.5); + this.load.setPreloadSprite(this.preloadBar); + + //---- both aquariums + this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt'); + this.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points + this.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png'); + + + this.add.text(0, 0, "hack", {font:"1px dumbo_regular", fill:"#FFFFFF"}); + //this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20); + this.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20); + this.load.image('points_progress_2', 'assets/img/points_progress_2.png'); + this.load.image('levels_progress', 'assets/img/levels_progress_2.png'); + this.load.image('streak_info', 'assets/img/streak_info_2.png'); + this.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20); + this.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20); + this.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20); + this.load.image('alt_icon', 'assets/img/heart.png'); + this.load.image('next_fish_icon', 'assets/img/fish_icon_2.png'); + this.load.image('meme_icon', 'assets/img/smiley_face.png'); + this.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20); + this.load.image('level_up_icon', 'assets/img/level_icon.png'); + this.load.image('level_up_2', 'assets/img/level_up_2.png'); + this.load.image('streak_green', 'assets/img/streak_green.png'); + this.load.image('streak_red', 'assets/img/streak_red_2.png'); + this.load.image('streak_grey', 'assets/img/streak_grey.png'); + this.load.image('star_point', 'assets/img/star.png'); + this.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json'); + + + + + + this.load.image('diamond', 'assets/img/diamond.png'); + + + //---- + var next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png'; + this.load.image('clownfish_grey', next_fish); + var progressDisplay = 0; + var timerEvt = this.time.events.loop(100, function (){ + if(this.load.progress < 100){ + progressDisplay++; + console.log('loading... '+(this.load.progress)+'%' + "; " + (100*progressDisplay)); + }else{ + //loadingText.text = 'Ready, Go!'; + console.log('Ready, Go!'); + this.time.events.remove(timerEvt); + } + + }, this); + + + + + this.game.load.image('rock2','assets/pics/rock2.png'); + + this.game.load.image('reinforest1','assets/pics/bg-rainforest-top-V2.png'); + this.load.image('reinforestBackgroundBottom1', 'assets/pics/bg-rainforest-bottom-1.png'); + this.load.image('reinforestBackgroundBottom2', 'assets/pics/bg-rainforest-bottom-2.png'); + + + this.game.load.image('treasure', 'assets/img/treasure_chest_rainforest.png'); + this.game.load.atlasJSONArray('attackplant', 'assets/game/sprite/attack_plant.png', 'assets/game/sprite/attack_plant.json'); + this.game.load.atlasJSONArray('thirstyplant', 'assets/game/sprite/thirsty_plant.png', 'assets/game/sprite/thirsty_plant.json'); + this.game.load.atlasJSONArray('squirrel', 'assets/game/sprite/squirrel_run-0.png', 'assets/game/sprite/squirrel_run.json'); + this.game.load.atlasJSONArray('ostrich', 'assets/game/sprite/ostrich_sprite.png', 'assets/game/sprite/ostrich_sprite.json'); + this.game.load.atlasJSONArray('jaguar', 'assets/game/sprite/Jaquar.png', 'assets/game/sprite/Jaquar.json'); + + this.game.load.atlasJSONArray('pegions', 'assets/game/sprite/5-pegions.png', 'assets/game/sprite/5-pegions.json'); + this.game.load.atlasJSONArray('lion', 'assets/game/sprite/brave_lion_idle-0.png', 'assets/game/sprite/brave_lion_idle-0.json'); + this.game.load.atlasJSONArray('triceratops', 'assets/game/sprite/triceratops_idle_sprit.png', 'assets/game/sprite/triceratops_idle_sprit.json'); + this.game.load.atlasJSONArray('koala', 'assets/game/sprite/koala_sprite.png', 'assets/game/sprite/koala_sprite.json'); + this.game.load.atlasJSONArray('lionjump', 'assets/game/sprite/brave_lion_jump-0.png', 'assets/game/sprite/brave_lion_jump-0.json'); + + // + this.game.load.atlasJSONArray('corn_stand', 'assets/game/sprite/cron_stand_sprite.png', 'assets/game/sprite/cron_stand_sprite.json'); + this.game.load.atlasJSONArray('corn_attach', 'assets/game/sprite/cron_attack_sprite.png', 'assets/game/sprite/cron_attack_sprite.json'); + + // + this.game.load.atlasJSONArray('vulture_flying', 'assets/game/sprite/vulture_sprite.png', 'assets/game/sprite/vulture_sprite.json'); + this.game.load.atlasJSONArray('sparrow_flying', 'assets/game/sprite/sparrow_sprite.png', 'assets/game/sprite/sparrow_sprite.json'); + this.game.load.atlasJSONArray('goose_flying', 'assets/game/sprite/goose_sprite.png', 'assets/game/sprite/goose_sprite.json'); + this.game.load.atlasJSONArray('owl_flying', 'assets/game/sprite/owl_sprite.png', 'assets/game/sprite/owl_sprite.json'); + this.game.load.atlasJSONArray('duck_flying', 'assets/game/sprite/duck_sprite.png', 'assets/game/sprite/duck_sprite.json'); + this.game.load.atlasJSONArray('macaw_flying', 'assets/game/sprite/Macaw.png', 'assets/game/sprite/Macaw.json'); + + //monkeys + this.game.load.image('treeBranch','assets/img/branch-tree.png'); + //this.game.load.atlasJSONArray('redMonkey', 'assets/game/sprite/RedMonkey.png', 'assets/game/sprite/RedMonkey.json'); + //this.game.load.atlasJSONArray('brownMonkey', 'assets/game/sprite/BrownMonkey.png', 'assets/game/sprite/BrownMonkey.json'); + //this.game.load.atlasJSONArray('blackMonkey', 'assets/game/sprite/BlackMonkey.png', 'assets/game/sprite/BlackMonkey.json'); + + //butter fly + this.game.load.image('flowerBush','assets/img/flower-bush.png'); + this.game.load.atlasJSONArray('butterfly', 'assets/game/sprite/butterfly.png', 'assets/game/sprite/butterfly.json'); + + this.game.load.spritesheet('rain', 'assets/game/sprite/rain.png', 17, 17) +// + //this.load.image('snowgswitch', 'assets/img/snowglobe.png'); + this.load.image('rain_start', 'assets/img/start_rain.png'); + this.load.image('rain_end', 'assets/img/stop_rain.png'); + // + + + + } + + create(){ + console.log("Preloader: create called"); + this.preloadBar.cropEnabled = false; + } + + update(){ + console.log("update: "+ 'RainforestLevel6'); + this.state.start('RainforestLevel6'); + } + + onLoadComplete(){ + console.log("Load complete"); + this.ready = true; + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/SeaLevelL3/Boot.js": +/*!**************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/SeaLevelL3/Boot.js ***! + \**************************************************************/ +/*! exports provided: BootL3 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BootL3", function() { return BootL3; }); +class BootL3 extends Phaser.State { + preload() { + this.load.image('preloaderBar', 'assets/img/loader_bar.png'); + } + + create() { + this.input.maxPointers = 1; + if(this.game.device.touch){ + this.input.mouse.stop(); + } + this.stage.disableVisibilityChange = false; + //this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + this.scale.minWidth = 270; + this.scale.minHeight = 400; + this.scale.pageAlignHorizontally = true; + this.scale.pageAlignVertically = true; + this.stage.forcePortrait = true; + //this.scale.setScreenSize(true); + + this.input.addPointer(); + + //Change color here + //-- http://www.w3schools.com/colors/colors_picker.asp + this.stage.backgroundColor = '#095e98'; + + this.state.start('Preloader'); + console.log("Boot completed"); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/SeaLevelL3/Game.js": +/*!**************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/SeaLevelL3/Game.js ***! + \**************************************************************/ +/*! exports provided: SeaLevelL3 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeaLevelL3", function() { return SeaLevelL3; }); +class SeaLevelL3 extends Phaser.State { + //componentObject; + constructor(){ + super(); + this.componentObject; + this.surveyHistory = []; + } + + create() { + this.gameover = false; + this.totalClicks = 0; + //this.totalPoints = this.ionic_scope.total_points; + //this.music = this.add.audio('game_audio'); + //this.music.play('', 0, 1.0, true); + + this.CANVAS_WIDTH = 382.0; + if(window.innerWidth > this.CANVAS_WIDTH) + this.CANVAS_WIDTH = window.innerWidth; + + this.buildWorld(); + + + this.inputEnabled = false; + + Phaser.Canvas.setTouchAction(this.game.canvas, "auto"); + this.game.input.touch.preventDefault = false; + } + + buildWorld() { + //this.height = window.innerHeight-44; + this.height = this.game.height; + var undersea = this.add.image(0, 0, 'undersea'); + undersea.scale.setTo(0.8, 0.8); + + //coral + + + undersea.x = -200; + undersea.y = 0; + undersea.height = this.game.height; + undersea.width = this.game.width*5; + + //add water + //this.addWater(); + + // + //this.add.sprite(5, 40, 'timer', 1); + + + // + /* + var fish_progress = this.add.image(175,50, 'clownfish_grey'); + fish_progress.scale.setTo(-0.3, 0.3); + fish_progress.anchor.setTo(.5,.5); + */ + + + + // + var treasure = this.add.image(35, this.height-100, 'treasuresea'); + treasure.scale.setTo(0.3, 0.3); + treasure.inputEnabled = true; + treasure.events.onInputDown.add(this.showunlockables, this); + treasure.angle += 10; + + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Fishes Fed: ' + this.totalClicks, 20); + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + + // + /* + var fishtank = this.add.image(5, 100, 'first_aq'); + fishtank.scale.setTo(0.2, 0.2); + fishtank.inputEnabled = true; + fishtank.events.onInputDown.add(this.earlyaquarium, this); + */ + + /* + var pouch = this.add.image(15,80, 'diamond'); + pouch.scale.setTo(0.4, 0.4); + pouch.anchor.setTo(.5,.5); + this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', "" + 2, 12); + */ + + //this.buildFish(); + this.buildAquarium(); + + this.showProgressBars(); + + // + /* + var meme = this.add.image(window.innerWidth - 140, 1, 'meme'); + meme.scale.setTo(0.3, 0.3); + meme.inputEnabled = true; + meme.events.onInputDown.add(this.showBubbles, this); + */ + + // + /* + var journal = this.add.image(this.CANVAS_WIDTH - 70, 1, 'fish_journal'); + journal.scale.setTo(0.5, 0.5); + journal.inputEnabled = true; + journal.events.onInputDown.add(this.logdata, this); + */ + + + //add bubbles + //this.showBubbles(); + + this.game.onPause.add(this.yourGamePausedFunc, this); + this.game.onResume.add(this.yourGameResumedFunc, this); + //this.game.onResume.add(yourGameResumedFunc, this); + + // + /* + var banner_shown = window.localStorage['banner_shown_2'] || "0";// = 1; + if(banner_shown==="0") + this.showBanner(); + */ + + this.isPaused = false; + + //this.checkReinforcement(); + } + + showProgressBars(){ + + var current_points = this.totalPoints; + + //------ Left side + + + + //level info + //var levels_progress = this.add.image(5, 55, 'levels_progress'); + //levels_progress.scale.setTo(.27, .30); + + /* + // + var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0); + levels_progress.scale.setTo(0.95, 1.2); + + //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1); + var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1); + var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + //progress_sprite.anchor.setTo(0,0); + progress_sprite.scale.setTo(1,1.1); + + + var level_up_icon = this.add.image(18, 68, 'level_up_icon'); + level_up_icon.scale.setTo(.5, .5); + level_up_icon.anchor.setTo(.5, .5); + + var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite'); + info_level_progress.animations.add('swim'); + info_level_progress.animations.play('swim', 1, true); + info_level_progress.scale.setTo(0.3, 0.3); + info_level_progress.anchor.setTo(.5,.5); + info_level_progress.inputEnabled = true; + info_level_progress.events.onInputDown.add(function(){this.showInforBox("Info level progress bar clicked")}, this); + + + //progress_sprite.anchor.setTo(1,0); + //progress_sprite.scale.setTo(0.8,0.8); + */ + + var SCALING_FACTOR = 0.8; + + //streak_info + var streak_info = this.add.image(5, 5, 'streak_info'); + streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR); + + /* + var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite'); + info_level_streak.animations.add('swim'); + info_level_streak.animations.play('swim', 1, true); + info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR); + info_level_streak.anchor.setTo(.5,.5); + info_level_streak.inputEnabled = true; + info_level_streak.events.onInputDown.add(function(){this.showInforBox("Streak progress bar clicked")}, this); + */ + + var colors = []; //['grey','grey','grey','grey','grey','grey','grey']; + for(var i=0; i < this.surveyHistory.length; i++){ + if(this.surveyHistory[i] == 1) + colors[i] = 'green'; + else + colors[i] = 'grey'; + } + colors = colors.reverse() + + //console.log("this.surveyHistory " + this.surveyHistory); + console.log("colors " + colors); + //colors = ['green','green','green','green','grey','green','grey']; + var streak_tile; + for(var i=0; i < this.surveyHistory.length; i++){ + streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]); + streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR); + } + + + //------ Right side + //var progressBars = this.add.group(); + + //points bar + vertical_position_offset = 13; + var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2'); + points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR); + points_progress.anchor.setTo(1,0); + //progressBars.add(points_progress); + + //point text + var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, "" + this.totalPoints, {font:"20px dumbo_regular", fill:"#4c3d01"}); + points_text.anchor.setTo(0.5,0); + points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + //progressBars.add(points_text); + + var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point'); + star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + star_icon.anchor.setTo(.5, .5); + //progressBars.add(points_text); + + //progressBars.scale.setTo(.8, .8); + + /* + var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite'); + info_points.animations.add('swim'); + info_points.animations.play('swim', 1, true); + info_points.scale.setTo(0.3, 0.3); + info_points.anchor.setTo(.5,.5); + info_points.inputEnabled = true; + //function(){doAlert(textString) + info_points.events.onInputDown.add(function(){this.showInforBox("Info pregess bar cliccked 2")}, this); + */ + + + //points to get to next fish. + var vertical_position_offset = 35; + + + var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1); + progress_bar_fish.anchor.setTo(1,0); + progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0); + var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon'); + fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR); + fish_progress_icon.anchor.setTo(.5, .5); + + + + //points to get to meme. + vertical_position_offset = 57; + + /* + var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1); + progress_bar_memes.anchor.setTo(1,0); + progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_memes = 0; + var total_number_of_memes = 31; + var already_shown_memes = window.localStorage["already_shown_memes3"]; + if(already_shown_memes == undefined) + already_shown_memes = [{"filename": "assets/memes/4.jpg", "unlock_date": "blah"}] + else + already_shown_memes = JSON.parse(window.localStorage["already_shown_memes3"]); + var currently_number_of_unlocked_memes = already_shown_memes.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_memes-start_number_of_memes)/ + (total_number_of_memes-start_number_of_memes); + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon'); + meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR); + meme_icon.anchor.setTo(.5, .5); + + + //points to get to alt message. + var vertical_position_offset = 79; + var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1); + progress_bar_altruism_message.anchor.setTo(1,0); + progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_alt_messages = 0; + var total_number_of_alt_messages = 21; + + var already_shown_altruism_msgs = window.localStorage["already_shown_alt_msg3"]; + if(already_shown_altruism_msgs == undefined) + already_shown_altruism_msgs = [{"filename": "assets/altruism/altruism_1.png", "unlock_date": "blah"}] + else + already_shown_altruism_msgs = JSON.parse(window.localStorage["already_shown_alt_msg3"]); + var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/ + (total_number_of_alt_messages-start_number_of_alt_messages); + //if(percent < 0.05) + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Alt Width, " + rect.width + "," + percent); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + + var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon'); + alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR); + alt_icon.anchor.setTo(.5, .5); + + + + //points to get to level up. + var vertical_position_offset = 101; + */ + + + var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1); + progress_bar_level_up.anchor.setTo(1,0); + progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + // end of level is 1060, start is at 0 + var start_point_for_level = 1060; + var end_point_for_level = 2120; + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level); + percent = percent*0.8 + 0.2; + //console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + //console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2'); + level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR); + level_up_2.anchor.setTo(.5, .5); + + + + + + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + //console.log("countdown.width " + this.countdown.width); + + + } + + setSurveyHistory(survey_history){ + console.log("survey_history " + survey_history + ", length: " + survey_history.length); + //this.surveyHistory = survey_history; + for(var i=0; i2) + delay += 100; + //this.checkLastBubble(sprite); + } + } + + checkLastBubble2(b) { + /* + if(b.x > window.innerWidth){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + t= this.add.tween(b).to({ x: -100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + */ + + // + var graphics = this.add.graphics(0,50); + graphics.lineStyle(0); + graphics.beginFill(0x006622, 0.8); + graphics.drawRect(0, 0, this.game.width, this.game.height-100); + graphics.endFill(); + + // Apply the shadow to the Stroke only + //text2.setShadow(2, 2, "#E65100", 2, true, false); + + //you earned a reward + var pirate = this.add.image(this.game.width-145, 100, 'pirate'); + //pirate.anchor.setTo(-0.3, 1.4); + pirate.scale.setTo(0.7, 0.7); + + // + var text3 = this.add.text(10, 60, "An extra gift\ntoday", { font: "35px Arial Black", fill: "#b33e00" }); + text3.stroke = "#FFE0B2"; + text3.strokeThickness = 4; + + // + var text1 = this.add.text(10, 160, "for completing\nactive tasks", { font: "24px Arial Black", fill: "#b33e00" }); + text1.stroke = "#FFE0B2"; + text1.strokeThickness = 2; + // Apply the shadow to the Stroke only + text1.setShadow(2, 2, "#E65100", 2, true, false); + + + // + var text2 = this.add.text(10, this.game.height-130, "Click on the gift\nto open", { font: "24px Arial Black", fill: "#FFE0B2" }); + text2.stroke = "#FFE0B2"; + text2.strokeThickness = 0; + // Apply the shadow to the Stroke only + //text2.setShadow(2, 2, "#E65100", 2, true, false); + + // + var sprite = this.add.sprite(this.world.centerX, this.world.centerY, 'gift'); + sprite.anchor.setTo(0.9, 0.2); + sprite.scale.setTo(0.35,0.35); + sprite.alpha = 0; + this.add.tween(sprite).to( { alpha: 1 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false); + sprite.inputEnabled = true; + sprite.events.onInputDown.add(this.showReward, this); + + + // + console.log("don't know " + b.y); + } + + showBubbles(){ + //add.tween(purplediver).to({ x: this.world.centerX-20 }, 800 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + + var blackdiver = this.add.sprite(this.CANVAS_WIDTH+100, 303, 'submarine'); + blackdiver.anchor.setTo(.5,.5); + blackdiver.animations.add('swim'); + blackdiver.animations.play('swim', 30, true); + blackdiver.scale.setTo(-1.3, 1.3); + var t = this.add.tween(blackdiver).to({ x: this.world.centerX+20 }, 800 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.addBubbles, this); + } + + addBubbles(){ + var delay = 0; + for (var i = 0; i < 100; i++) + { + var sprite = this.add.sprite(-100 + (this.world.randomX), this.height+100, 'ball'); + sprite.scale.set(this.rnd.realInRange(0.3, 0.6)); + var speed = this.rnd.between(1000, 2000); + var tween = this.add.tween(sprite); + tween.to({y: -256}, speed, Phaser.Easing.Sinusoidal.In, true, delay, 0, false); + delay += 100; + + if(i==0) + tween.onComplete.add(this.checkLastBubble, this); + + if(i>2) + delay += 100; + //this.checkLastBubble(sprite); + } + } + + checkLastBubble(b) { + /* + if(b.x > window.innerWidth){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + t= this.add.tween(b).to({ x: -100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + */ + + // + var graphics = this.add.graphics(0,50); + graphics.lineStyle(0); + graphics.beginFill(0x0288D1, 0.8); + graphics.drawRect(0, 0, this.game.width, this.game.height-100); + graphics.endFill(); + + // Apply the shadow to the Stroke only + //text2.setShadow(2, 2, "#E65100", 2, true, false); + + //you earned a reward + var pirate = this.add.image(this.game.width-145, 100, 'pirate'); + //pirate.anchor.setTo(-0.3, 1.4); + pirate.scale.setTo(0.7, 0.7); + + // + var text3 = this.add.text(10, 60, "An extra gift\ntoday", { font: "35px Arial Black", fill: "#b33e00" }); + text3.stroke = "#FFE0B2"; + text3.strokeThickness = 4; + + // + var text1 = this.add.text(10, 160, "for filling out\nthe survey", { font: "24px Arial Black", fill: "#b33e00" }); + text1.stroke = "#FFE0B2"; + text1.strokeThickness = 2; + // Apply the shadow to the Stroke only + text1.setShadow(2, 2, "#E65100", 2, true, false); + + + // + var text2 = this.add.text(10, this.game.height-130, "Click on the gift\nto open", { font: "24px Arial Black", fill: "#FFE0B2" }); + text2.stroke = "#FFE0B2"; + text2.strokeThickness = 0; + + + + + // + var sprite = this.add.sprite(this.world.centerX, this.world.centerY, 'gift'); + sprite.anchor.setTo(0.9, 0.2); + sprite.scale.setTo(0.35,0.35); + sprite.alpha = 0; + this.add.tween(sprite).to( { alpha: 1 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false); + sprite.inputEnabled = true; + sprite.events.onInputDown.add(this.showReward, this); + + + // + console.log("don't know " + b.y); + } + + //show the reward + showReward(){ + this.ionic_scope.$emit('show:reinforcement',this.ionic_scope); + } + + + buildAquarium() { + + //////////////////////////////////////////////////////////// + //upper aquarium + //////////////////////////////////////////////////////////// + + /* + this.sharkfish = this.add.sprite(window.innerWidth + 100, 70, 'sharkswim'); + this.sharkfish.anchor.setTo(.5,.5); + this.sharkfish.animations.add('swim'); + this.sharkfish.animations.play('swim',10, true); + this.sharkfish.scale.setTo(0.3, 0.22); + this.sharkfish.name = "sharkswim"; + this.gobothways(this.sharkfish); + + //swordfish + this.swordfish = this.add.sprite(-150, 120, 'swordfish'); + this.swordfish.anchor.setTo(.5,.5); + this.swordfish.animations.add('swim'); + this.swordfish.animations.play('swim',30, true); + this.swordfish.scale.setTo(0.3, 0.3); + this.swordfish.name = "swordfishswim"; + this.gobothways(this.swordfish); + + this.dolphin = this.add.sprite(-150, 180, 'dolphin'); + this.dolphin.anchor.setTo(.5,.5); + this.dolphin.animations.add('swim'); + this.dolphin.animations.play('swim',10, true); + this.dolphin.scale.setTo(0.6, 0.6); + this.dolphin.name = "dolphinswim"; + this.dolphin.angle -= 3; + this.gobothways(this.dolphin); + */ + + var phaserJSON = this.game.cache.getJSON('fishpoints'); + + //////////////////////////////////////////////////////////// + //upper aquarium + //////////////////////////////////////////////////////////// + var data = phaserJSON; + var survey_string = ""; + var current_points = this.totalPoints; + for(var i = 0; i < data.length; i++) { + if(current_points >= data[i].points){ + + //nemo + if(data[i].name.valueOf() === "Blue tang") + this.addDori(); + + + //starfish + if(data[i].name.valueOf() === "Jelly fish") + this.addJellyFish(); + + //squid + if(data[i].name.valueOf() === "Green Crab") + this.addCrab(); + + + if(data[i].name.valueOf() === "Achovies") + this.addAnchovies(); + + if(data[i].name.valueOf() === "Bubbles") + this.addYellowTang(); + + if(data[i].name.valueOf() === "Salmon") + this.addSalmon(); + + if(data[i].name.valueOf() === "Deep undersea fish") + this.addAngryFish(); + + + + //if(data[i].name.valueOf() === "Tiger barb") + // this.animateTigerbarb(); + } + } + + this.addCoral(); + + //set the progres bar + this.previoous_fish_point = 0; + this.next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + this.next_fish_point = data[i].points; + break; + }else{ + this.previoous_fish_point = data[i].points; + } + } + + /* + //console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point); + this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0); + var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height); + var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point); + console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point + "," + percent); + rect.width = Math.max(0, percent * this.progress_sprite.width); + + console.log("Width, " + rect.width + "," + this.progress_sprite.width); + this.progress_sprite.crop(rect); + */ + + } + + + addAFish(added_point){ + + var phaserJSON = this.game.cache.getJSON('fishpoints'); + //console.log(JSON.stringify(phaserJSON)); + + + var data = phaserJSON; + var survey_string = ""; + var current_points = this.totalPoints; + var old_points = current_points - added_point; + console.log("" + current_points + ", " + old_points); + for(var i = 0; i < data.length; i++) { + if(current_points >= data[i].points && + old_points < data[i].points){ + + //nemo + if(data[i].name.valueOf() === "Blue tang") + this.addDori(); + + + //starfish + if(data[i].name.valueOf() === "Jelly fish") + this.addJellyFish(); + + //squid + if(data[i].name.valueOf() === "Green Crab") + this.addCrab(); + + + if(data[i].name.valueOf() === "Achovies") + this.addAnchovies(); + + if(data[i].name.valueOf() === "Bubbles") + this.addYellowTang(); + + if(data[i].name.valueOf() === "Salmon") + this.addSalmon(); + + if(data[i].name.valueOf() === "Angry fish") + this.addAngryFish(); + + + //if(data[i].name.valueOf() === "Tiger barb") + // this.animateTigerbarb(); + + } + } + + //set the progres bar + var previoous_fish_point = 0; + var next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + next_fish_point = data[i].points; + break; + }else{ + previoous_fish_point = data[i].points; + } + } + //console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point); + var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height); + var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point); + console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point + "," + percent); + this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0); + rect.width = 1 * percent * this.progress_sprite.width; + this.progress_sprite.crop(rect); + + } + + addDori() { + //////////////////////////////////////////////////////////// + // mid aquarium + //////////////////////////////////////////////////////////// + /* + if(this.totalPoints >= 1360){//means bubbles are available + var dori = this.add.sprite(90, 100, 'dori'); + dori.animations.add('swim'); + dori.animations.play('swim', 10, true); + dori.angle -= 10; + dori.scale.setTo(0.5, 0.5); + + var nemo = this.add.sprite(75, 110, 'nemo'); + nemo.animations.add('swim'); + nemo.animations.play('swim', 7, true); + nemo.angle += 10; + nemo.scale.setTo(-0.5, 0.5); + }else + */ + { + this.clownFish = this.add.sprite(-100, 283, 'clownfish'); + this.clownFish.anchor.setTo(.5,.5); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 10, true); + this.clownFish.scale.setTo(0.5, 0.5); + this.clownFish.name = "clownFish"; + this.gobothways(this.clownFish); + + this.clownFish = this.add.sprite(-100, 218, 'dori'); + this.clownFish.anchor.setTo(.1,.1); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 10, true); + this.clownFish.scale.setTo(0.5, 0.5); + this.clownFish.name = "clownFish"; + this.gobothways(this.clownFish); + } + + } + + addYellowTang() { + var yellowtang = this.add.sprite(this.CANVAS_WIDTH + 70, 120, 'yellowtang'); + yellowtang.animations.add('swim'); + yellowtang.animations.play('swim', 10, true); + yellowtang.scale.setTo(0.45, 0.45); + //yellowtang.angle -= 10; + yellowtang.anchor.setTo(.5,.5); + this.gobothways(yellowtang); + } + + + addJellyFish() { + + // + var jellyfish = this.add.sprite(this.CANVAS_WIDTH - 80, 100, 'jellyfish'); + jellyfish.animations.add('swim'); + jellyfish.animations.play('swim', 15, true); + jellyfish.scale.setTo(0.25, 0.25); + this.add.tween(jellyfish).to({ y: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true); + + } + + + addSalmon() { + var salmon = this.add.sprite(-250, 370, 'salmon'); + salmon.animations.add('swim'); + salmon.animations.play('swim', 10, true); + salmon.scale.setTo(0.4, 0.4); + salmon.anchor.setTo(.5,.5); + this.gobothways(salmon); + + + //////////////////////////////////////////////////////////// + // bottom aquarium + //////////////////////////////////////////////////////////// + + // + /* + var whale = this.add.sprite(window.innerWidth+150, this.height-100, 'whale'); + whale.animations.add('swim'); + whale.animations.play('swim', 12, true); + whale.scale.setTo(1.8, 1.8); + whale.anchor.setTo(.5,.5); + whale.angle += 5; + whale.name = "whaleswim"; + this.gobothways(whale); + */ + + } + + + addCrab() { + var redcrab = this.add.sprite(this.CANVAS_WIDTH-30, this.height-105, 'redcrab'); + redcrab.animations.add('swim'); + redcrab.animations.play('swim', 15, true); + redcrab.scale.setTo(-0.3, 0.3); + + // + var greencrab = this.add.sprite(this.CANVAS_WIDTH-240, this.height-85, 'greencrab'); + greencrab.animations.add('swim'); + greencrab.animations.play('swim', 15, true); + greencrab.scale.setTo(0.3, 0.3); + + //angryfish + //var angryfish = this.add.sprite(220, this.height-205, 'angryfish'); + //angryfish.animations.add('swim'); + //angryfish.animations.play('swim', 15, true); + //angryfish.scale.setTo(0.35, 0.35); + } + + + + //angryfish + //var angryfish = this.add.sprite(220, this.height-205, 'angryfish'); + //angryfish.animations.add('swim'); + //angryfish.animations.play('swim', 15, true); + //angryfish.scale.setTo(0.35, 0.35); + + addAngryFish() { + this.angryfish = this.add.sprite(-100, this.height-150, 'angryfish'); + this.angryfish.anchor.setTo(1.2,.5); + this.angryfish.animations.add('swim'); + this.angryfish.animations.play('swim',20, true); + this.angryfish.scale.setTo(0.4, 0.4); + this.angryfish.name = "angryfishswim"; + this.gobothways(this.angryfish); + + + } + + addAnchovies() { + // + this.blueanchovy = this.add.sprite(-100, this.height-250, 'blueanchovy'); + this.blueanchovy.anchor.setTo(.9,.9); + this.blueanchovy.animations.add('swim'); + this.blueanchovy.animations.play('swim',4, true); + this.blueanchovy.scale.setTo(0.18, 0.18); + this.blueanchovy.name = "blueanchovyswim"; + this.gobothways(this.blueanchovy); + + this.greenanchovy = this.add.sprite(-100, this.height-235, 'greenanchovy'); + this.greenanchovy.anchor.setTo(.5,.5); + this.greenanchovy.animations.add('swim'); + this.greenanchovy.animations.play('swim',8, true); + this.greenanchovy.scale.setTo(0.13, 0.13); + this.greenanchovy.name = "greenanchovyswim"; + this.gobothways(this.greenanchovy); + + this.pinkanchovy = this.add.sprite(-100, this.height-270, 'pinkanchovy'); + this.pinkanchovy.anchor.setTo(.2,.2); + this.pinkanchovy.animations.add('swim'); + this.pinkanchovy.animations.play('swim',2, true); + this.pinkanchovy.scale.setTo(0.21, 0.21); + this.pinkanchovy.name = "pinkanchovyswim"; + this.gobothways(this.pinkanchovy); + + } + + + addCoral() { + // + var coral = this.add.image(0, this.height-90, 'coral'); + coral.scale.setTo(0.7, 0.7); + + } + + showunlockables(){ + console.log('treasure box clicked'); + this.componentObject.goToRewardsPage(); + } + + gobothways(b){ + //console.log('start again ' + b.name); + + //if() + /* + if(b.x > window.innerWidth){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + t= this.add.tween(b).to({ x: -100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + //console.log('left to right, ' + b.x); + b.scale.x = -1*b.scale.x; + t = this.add.tween(b).to({ x: window.innerWidth + 100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + */ + + var change_amount = Math.floor(this.rnd.realInRange(0, 50)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + var pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.height) || (pos_y < 70)){ + pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + + var t; + //if() + if(b.x > this.CANVAS_WIDTH){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + //t= this.add.tween(b).to({ x: -200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t= this.add.tween(b).to({ x: -100+Math.floor(this.rnd.realInRange(0, 50)), y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 4000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + //console.log('left to right, ' + b.x); + b.scale.x = -1*b.scale.x; + //t = this.add.tween(b).to({ x: window.innerWidth + 200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t = this.add.tween(b).to({ x: this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)), y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 4000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + //if() + /* + if(b.x > window.innerWidth){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + //t= this.add.tween(b).to({ x: -200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t= this.add.tween(b).to({ x: -100 }, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + //console.log('left to right, ' + b.x); + b.scale.x = -1*b.scale.x; + //t = this.add.tween(b).to({ x: window.innerWidth + 200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t = this.add.tween(b).to({ x: window.innerWidth + 100 }, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + }*/ + } + + buildFish() { + + //assign number of fish + numfish = 5; + //assign type and age of fish + var fishType = ["green4", "horse4", "purple4", "pink4", "magenta4"] + this.fishGroup = this.add.group(); + this.fishGroup.enableBody = true; + for(i = 0; i < numfish; i++){ + var b = this.fishGroup.create(this.rnd.integerInRange(0, this.world.width), this.rnd.integerInRange(this.world.height-300, this.world.height-200), fishType[i]); + b.scale.setTo(0.4, 0.8); + b.anchor.setTo(0.5, 0.5); + b.body.moves = false; + b.inputEnabled = true; + b.events.onInputDown.add(this.addTally, this); + this.assignFishMovement(b); + } + + } + + assignFishMovement(b) { + xposition = Math.floor(this.rnd.realInRange(50, this.world.width-50)); + yposition = Math.floor(this.rnd.realInRange(100, this.world.height-200)); + bdelay = this.rnd.integerInRange(2000, 6000); + if(xposition < b.x){ + b.scale.x = -1; + }else{ + b.scale.x = 1; + } + t = this.add.tween(b).to({x:xposition, y:yposition}, 3500, Phaser.Easing.Quadratic.InOut, true, bdelay); + t.onComplete.add(this.stopFish, this); + } + + stopFish(b) { + //this.assignFishMovement(b); + this.gobothways(b); + } + + addTally() { + this.totalClicks = this.totalClicks + 1; + this.countdown.setText('Fishes Fed: ' + this.totalClicks); + } + + updatescore (added_points) { + console.log("Update score called inside game, " + this.ionic_scope.total_points); + this.totalPoints = this.ionic_scope.total_points; + this.addAFish(added_points); + this.countdown.setText('Points: ' + this.totalPoints); + } + + setTotalPoints(totalPoints){ + this.totalPoints = totalPoints; + } + + assignscope(componentObject){ + this.componentObject = componentObject; + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/SeaLevelL3/Preloader.js": +/*!*******************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/SeaLevelL3/Preloader.js ***! + \*******************************************************************/ +/*! exports provided: PreloaderL3 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloaderL3", function() { return PreloaderL3; }); +class PreloaderL3 extends Phaser.State { + + preload(){ + + //console.log("Preloader: preload called"); + + this.load.onLoadComplete.addOnce(this.onLoadComplete, this); + + this.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar'); + this.preloadBar.anchor.setTo(0.5, 0.5); + this.load.setPreloadSprite(this.preloadBar); + + //---- both aquariums + this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt'); + this.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points + this.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png'); + //this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20); + + this.add.text(0, 0, "hack", {font:"1px dumbo_regular", fill:"#FFFFFF"}); + //this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20); + this.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20); + this.load.image('points_progress_2', 'assets/img/points_progress_2.png'); + this.load.image('levels_progress', 'assets/img/levels_progress_2.png'); + this.load.image('streak_info', 'assets/img/streak_info_2.png'); + this.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20); + this.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20); + this.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20); + this.load.image('alt_icon', 'assets/img/heart.png'); + this.load.image('next_fish_icon', 'assets/img/fish_icon_2.png'); + this.load.image('meme_icon', 'assets/img/smiley_face.png'); + this.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20); + this.load.image('level_up_icon', 'assets/img/level_icon.png'); + this.load.image('level_up_2', 'assets/img/level_up_2.png'); + this.load.image('streak_green', 'assets/img/streak_green.png'); + this.load.image('streak_red', 'assets/img/streak_red_2.png'); + this.load.image('streak_grey', 'assets/img/streak_grey.png'); + this.load.image('star_point', 'assets/img/star.png'); + this.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json'); + + + var max = 8; + var min = 1; + var rand_num = Math.floor(Math.random() * (max - min + 1)) + min; + console.log('assets/img/pirate-' + rand_num + '.png'); + this.load.image('pirate', 'assets/img/pirate-' + rand_num + '.png'); + + var username = window.localStorage['username'] || 'unknown'; + + this.isStudyParticipant = username.indexOf('-study-') !== -1; // !== -1; + this.loadSea(); + + //--- RedBanner.png + this.load.image('banner', 'assets/img/RedBanner.png'); + this.load.image('banner_fish', 'assets/img/banner_fish.png'); + + + //---- + var next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png'; + console.log("Next fish: " + next_fish); + this.load.image('clownfish_grey', next_fish); + + this.load.image('diamond', 'assets/img/diamond.png'); + + var progressDisplay = 0; + var timerEvt = this.time.events.loop(100, function (){ + if(this.load.progress < 100){ + progressDisplay++; + console.log('loading... '+(this.load.progress)+'%' + "; " + (100*progressDisplay)); + }else{ + //loadingText.text = 'Ready, Go!'; + console.log('Ready, Go!'); + this.time.events.remove(timerEvt); + } + + }, this); + } + + create(){ + console.log("Preloader: create called"); + this.preloadBar.cropEnabled = false; + } + + update() + { + console.log("update: "+ "SeaLevelL3"); + this.state.start('SeaLevelL3'); + } + + onLoadComplete(){ + console.log("Load complete"); + this.ready = true; + } + + loadSea(){ + //second aquarium + //-- fish_journal + console.log("Inside loadSea"); + this.load.image('fish_journal', 'assets/img/fish_journal.png'); + + //--- sea + this.load.image('undersea', 'assets/img/underwaterbr.jpg'); + this.load.image('treasuresea', 'assets/img/treasuresea.png'); + this.load.image('coral', 'assets/img/seabed.png'); + this.load.atlasJSONArray('clownfish', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json'); + this.load.atlasJSONArray('dori', 'assets/game/sprite/dory2.png', 'assets/game/sprite/dory2.json'); + this.load.atlasJSONArray('jellyfish', 'assets/game/sprite/jellyfish.png', 'assets/game/sprite/jellyfish.json'); + this.load.atlasJSONArray('redcrab', 'assets/game/sprite/redcrab.png', 'assets/game/sprite/redcrab.json'); + this.load.atlasJSONArray('greencrab', 'assets/game/sprite/greencrab.png', 'assets/game/sprite/greencrab.json'); + this.load.atlasJSONArray('angryfish', 'assets/game/sprite/angryfish.png', 'assets/game/sprite/angryfish.json'); + this.load.atlasJSONArray('salmon', 'assets/game/sprite/salmon.png', 'assets/game/sprite/salmon.json'); + this.load.atlasJSONArray('yellowtang', 'assets/game/sprite/yellowtang.png', 'assets/game/sprite/yellowtang.json'); + this.load.spritesheet('blueanchovy', 'assets/game/sprite/blueanchovy.png', 512, 125, 4); + this.load.spritesheet('greenanchovy', 'assets/game/sprite/greenanchovy.png', 512, 125, 4); + this.load.spritesheet('pinkanchovy', 'assets/game/sprite/pinkanchovy.png', 512, 125, 4); + + //this.load.atlasJSONArray('sharkswim', 'assets/game/sprite/sharkswimming.png', 'assets/game/sprite/sharkswimming.json'); + //this.load.atlasJSONArray('nemo', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json'); + //this.load.atlasJSONArray('swordfish', 'assets/game/sprite/swordfish.png', 'assets/game/sprite/swordfish.json'); + //this.load.atlasJSONArray('dolphin', 'assets/game/sprite/dolphin.png', 'assets/game/sprite/dolphin.json'); + //this.load.atlasJSONArray('kitefish', 'assets/game/sprite/kitefish.png', 'assets/game/sprite/kitefish.json'); + //this.load.atlasJSONArray('whale', 'assets/game/sprite/whale.png', 'assets/game/sprite/whale.json'); + + + // + //this.load.image('gotosea', 'assets/img/gotosea.png'); + + //first_aq + //this.load.image('first_aq', 'assets/img/first_aq.png'); + + + + //submarine + //this.load.atlasJSONArray('submarine', 'assets/game/sprite/submarine.png', 'assets/game/sprite/submarine.json'); + //this.load.atlasJSONArray('submarine_at', 'assets/game/sprite/submarine_at.png', 'assets/game/sprite/submarine_at.json'); + + //this.preloadBar.destroy(); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/SeaLevelL4/Boot.js": +/*!**************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/SeaLevelL4/Boot.js ***! + \**************************************************************/ +/*! exports provided: BootL4 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BootL4", function() { return BootL4; }); +class BootL4 extends Phaser.State { + preload() { + this.load.image('preloaderBar', 'assets/img/loader_bar.png'); + } + + create() { + this.input.maxPointers = 1; + if(this.game.device.touch){ + this.input.mouse.stop(); + } + this.stage.disableVisibilityChange = false; + //this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + this.scale.minWidth = 270; + this.scale.minHeight = 400; + this.scale.pageAlignHorizontally = true; + this.scale.pageAlignVertically = true; + this.stage.forcePortrait = true; + //this.scale.setScreenSize(true); + + this.input.addPointer(); + + //Change color here + //-- http://www.w3schools.com/colors/colors_picker.asp + this.stage.backgroundColor = '#095e98'; + + this.state.start('Preloader'); + console.log("Boot completed"); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/SeaLevelL4/Game.js": +/*!**************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/SeaLevelL4/Game.js ***! + \**************************************************************/ +/*! exports provided: SeaLevelL4 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeaLevelL4", function() { return SeaLevelL4; }); +class SeaLevelL4 extends Phaser.State { + //componentObject; + constructor(){ + super(); + this.componentObject; + this.surveyHistory = []; + } + + create(){ + this.gameover = false; + this.totalClicks = 0; + + this.CANVAS_WIDTH = 382.0; + if(window.innerWidth > this.CANVAS_WIDTH) + this.CANVAS_WIDTH = window.innerWidth; + + this.buildWorld(); + + + this.inputEnabled = false; + + Phaser.Canvas.setTouchAction(this.game.canvas, "auto"); + this.game.input.touch.preventDefault = false; + } + + buildWorld() { + console.log("Inside Level1 buildWorld()"); + this.height = this.game.height; + var undersea = this.add.image(0, 0, 'undersea'); + undersea.scale.setTo(0.8, 0.8); + + //coral + undersea.x = -200; + undersea.y = 0; + undersea.height = this.game.height; + undersea.width = this.game.width*5; + + // + //this.add.sprite(5, 40, 'timer', 1); + + + // + /* + var fish_progress = this.add.image(175,50, 'clownfish_grey'); + fish_progress.scale.setTo(-0.3, 0.3); + fish_progress.anchor.setTo(.5,.5); + */ + + + var treasure = this.add.image(35, this.height-80, 'treasuresea'); + treasure.scale.setTo(0.3, 0.3); + treasure.inputEnabled = true; + treasure.events.onInputDown.add(this.showunlockables, this); + treasure.angle += 10; + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + + // + /* + var fishtank = this.add.image(5, 100, 'first_aq'); + fishtank.scale.setTo(0.2, 0.2); + fishtank.inputEnabled = true; + fishtank.events.onInputDown.add(this.earlyaquarium, this); + */ + + /* + var pouch = this.add.image(15,80, 'diamond'); + pouch.scale.setTo(0.4, 0.4); + pouch.anchor.setTo(.5,.5); + this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', "" + 2, 12); + */ + + //this.buildFish(); + this.buildAquarium(); + + this.showProgressBars(); + + // + /* + var journal = this.add.image(this.CANVAS_WIDTH - 70, 1, 'fish_journal'); + journal.scale.setTo(0.5, 0.5); + journal.inputEnabled = true; + journal.events.onInputDown.add(this.logdata, this); + */ + + + + // + /* + var meme = this.add.image(window.innerWidth - 140, 1, 'meme'); + meme.scale.setTo(0.3, 0.3); + meme.inputEnabled = true; + meme.events.onInputDown.add(this.showBubbles, this); + */ + + + //text.anchor.set(0.5); + + //banner.inputEnabled = true; + //banner.events.onInputDown.add(this.showBubbles, this); + + setTimeout(function () { + //checkReinforcement(); + + }, 500); + + + // + // var banner_shown = window.localStorage['banner_shown'] || "0";// = 1; + // if(banner_shown==="0") + // this.showBanner(); + // this.showBanner(); + + // + /* + var banner_shown = window.localStorage['banner_shown_2'] || "0";// = 1; + if(banner_shown==="0") + this.showBanner(); + */ + + // + this.game.onPause.add(this.yourGamePausedFunc, this); + this.game.onResume.add(this.yourGameResumedFunc, this); + + //this.checkReinforcement(); + } + + showProgressBars(){ + + var current_points = this.totalPoints; + + //------ Left side + + + + //level info + //var levels_progress = this.add.image(5, 55, 'levels_progress'); + //levels_progress.scale.setTo(.27, .30); + + /* + // + var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0); + levels_progress.scale.setTo(0.95, 1.2); + + //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1); + var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1); + var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + //progress_sprite.anchor.setTo(0,0); + progress_sprite.scale.setTo(1,1.1); + + + var level_up_icon = this.add.image(18, 68, 'level_up_icon'); + level_up_icon.scale.setTo(.5, .5); + level_up_icon.anchor.setTo(.5, .5); + + var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite'); + info_level_progress.animations.add('swim'); + info_level_progress.animations.play('swim', 1, true); + info_level_progress.scale.setTo(0.3, 0.3); + info_level_progress.anchor.setTo(.5,.5); + info_level_progress.inputEnabled = true; + info_level_progress.events.onInputDown.add(function(){this.showInforBox("Info level progress bar clicked")}, this); + + + //progress_sprite.anchor.setTo(1,0); + //progress_sprite.scale.setTo(0.8,0.8); + */ + + var SCALING_FACTOR = 0.8; + + //streak_info + var streak_info = this.add.image(5, 5, 'streak_info'); + streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR); + + /* + var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite'); + info_level_streak.animations.add('swim'); + info_level_streak.animations.play('swim', 1, true); + info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR); + info_level_streak.anchor.setTo(.5,.5); + info_level_streak.inputEnabled = true; + info_level_streak.events.onInputDown.add(function(){this.showInforBox("Streak progress bar clicked")}, this); + */ + + var colors = []; //['grey','grey','grey','grey','grey','grey','grey']; + for(var i=0; i < this.surveyHistory.length; i++){ + if(this.surveyHistory[i] == 1) + colors[i] = 'green'; + else + colors[i] = 'grey'; + } + colors = colors.reverse() + + //console.log("this.surveyHistory " + this.surveyHistory); + console.log("colors " + colors); + //colors = ['green','green','green','green','grey','green','grey']; + var streak_tile; + for(var i=0; i < this.surveyHistory.length; i++){ + streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]); + streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR); + } + + + //------ Right side + //var progressBars = this.add.group(); + + //points bar + vertical_position_offset = 13; + var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2'); + points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR); + points_progress.anchor.setTo(1,0); + //progressBars.add(points_progress); + + //point text + var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, "" + this.totalPoints, {font:"20px dumbo_regular", fill:"#4c3d01"}); + points_text.anchor.setTo(0.5,0); + points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + //progressBars.add(points_text); + + var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point'); + star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + star_icon.anchor.setTo(.5, .5); + //progressBars.add(points_text); + + //progressBars.scale.setTo(.8, .8); + + /* + var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite'); + info_points.animations.add('swim'); + info_points.animations.play('swim', 1, true); + info_points.scale.setTo(0.3, 0.3); + info_points.anchor.setTo(.5,.5); + info_points.inputEnabled = true; + //function(){doAlert(textString) + info_points.events.onInputDown.add(function(){this.showInforBox("Info pregess bar cliccked 2")}, this); + */ + + + //points to get to next fish. + vertical_position_offset = 35; + var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1); + progress_bar_fish.anchor.setTo(1,0); + progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0); + var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon'); + fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR); + fish_progress_icon.anchor.setTo(.5, .5); + + + + //points to get to meme. + var vertical_position_offset = 57; + + /* + var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1); + progress_bar_memes.anchor.setTo(1,0); + progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_memes = 0; + var total_number_of_memes = 31; + var already_shown_memes = window.localStorage["already_shown_memes3"]; + if(already_shown_memes == undefined) + already_shown_memes = [{"filename": "assets/memes/4.jpg", "unlock_date": "blah"}] + else + already_shown_memes = JSON.parse(window.localStorage["already_shown_memes3"]); + var currently_number_of_unlocked_memes = already_shown_memes.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_memes-start_number_of_memes)/ + (total_number_of_memes-start_number_of_memes); + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon'); + meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR); + meme_icon.anchor.setTo(.5, .5); + + + //points to get to alt message. + var vertical_position_offset = 79; + var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1); + progress_bar_altruism_message.anchor.setTo(1,0); + progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_alt_messages = 0; + var total_number_of_alt_messages = 21; + + var already_shown_altruism_msgs = window.localStorage["already_shown_alt_msg3"]; + if(already_shown_altruism_msgs == undefined) + already_shown_altruism_msgs = [{"filename": "assets/altruism/altruism_1.png", "unlock_date": "blah"}] + else + already_shown_altruism_msgs = JSON.parse(window.localStorage["already_shown_alt_msg3"]); + var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/ + (total_number_of_alt_messages-start_number_of_alt_messages); + //if(percent < 0.05) + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Alt Width, " + rect.width + "," + percent); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + + var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon'); + alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR); + alt_icon.anchor.setTo(.5, .5); + + + + //points to get to level up. + var vertical_position_offset = 101; + */ + + var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1); + progress_bar_level_up.anchor.setTo(1,0); + progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + // end of level is 1060, start is at 0 + var start_point_for_level = 1060; + var end_point_for_level = 2120; + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level); + percent = percent*0.8 + 0.2; + //console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + //console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2'); + level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR); + level_up_2.anchor.setTo(.5, .5); + + + + + + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + //console.log("countdown.width " + this.countdown.width); + + + } + + setSurveyHistory(survey_history){ + console.log("survey_history " + survey_history + ", length: " + survey_history.length); + //this.surveyHistory = survey_history; + for(var i=0; i2) + delay += 100; + //this.checkLastBubble(sprite); + } + } + + checkLastBubble2(b) { + /* + if(b.x > window.innerWidth){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + t= this.add.tween(b).to({ x: -100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + */ + + // + var graphics = this.add.graphics(0,50); + graphics.lineStyle(0); + graphics.beginFill(0x006622, 0.8); + graphics.drawRect(0, 0, this.game.width, this.game.height-100); + graphics.endFill(); + + // Apply the shadow to the Stroke only + //text2.setShadow(2, 2, "#E65100", 2, true, false); + + //you earned a reward + var pirate = this.add.image(this.game.width-145, 100, 'pirate'); + //pirate.anchor.setTo(-0.3, 1.4); + pirate.scale.setTo(0.7, 0.7); + + // + var text3 = this.add.text(10, 60, "An extra gift\ntoday", { font: "35px Arial Black", fill: "#b33e00" }); + text3.stroke = "#FFE0B2"; + text3.strokeThickness = 4; + + // + var text1 = this.add.text(10, 160, "for completing\nactive tasks", { font: "24px Arial Black", fill: "#b33e00" }); + text1.stroke = "#FFE0B2"; + text1.strokeThickness = 2; + // Apply the shadow to the Stroke only + text1.setShadow(2, 2, "#E65100", 2, true, false); + + + // + var text2 = this.add.text(10, this.game.height-130, "Click on the gift\nto open", { font: "24px Arial Black", fill: "#FFE0B2" }); + text2.stroke = "#FFE0B2"; + text2.strokeThickness = 0; + // Apply the shadow to the Stroke only + //text2.setShadow(2, 2, "#E65100", 2, true, false); + + // + var sprite = this.add.sprite(this.world.centerX, this.world.centerY, 'gift'); + sprite.anchor.setTo(0.9, 0.2); + sprite.scale.setTo(0.35,0.35); + sprite.alpha = 0; + this.add.tween(sprite).to( { alpha: 1 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false); + sprite.inputEnabled = true; + sprite.events.onInputDown.add(this.showReward, this); + + + // + //console.log("don't know " + b.y); + } + + + showBubbles(){ + //add.tween(purplediver).to({ x: this.world.centerX-20 }, 800 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + + var blackdiver = this.add.sprite(this.CANVAS_WIDTH+100, 303, 'submarine'); + blackdiver.anchor.setTo(.5,.5); + blackdiver.animations.add('swim'); + blackdiver.animations.play('swim', 30, true); + blackdiver.scale.setTo(-1.3, 1.3); + var t = this.add.tween(blackdiver).to({ x: this.world.centerX+20 }, 800 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.addBubbles, this); + } + + + + addBubbles(){ + var delay = 0; + for (var i = 0; i < 100; i++) + { + var sprite = this.add.sprite(-100 + (this.world.randomX), this.height+100, 'ball'); + sprite.scale.set(this.rnd.realInRange(0.3, 0.6)); + var speed = this.rnd.between(1000, 2000); + var tween = this.add.tween(sprite); + tween.to({y: -256}, speed, Phaser.Easing.Sinusoidal.In, true, delay, 0, false); + delay += 100; + + if(i==0) + tween.onComplete.add(this.checkLastBubble, this); + + if(i>2) + delay += 100; + //this.checkLastBubble(sprite); + } + } + + checkLastBubble(b) { + + // + var graphics = this.add.graphics(0,50); + graphics.lineStyle(0); + graphics.beginFill(0x0288D1, 0.8); + graphics.drawRect(0, 0, this.game.width, this.game.height-100); + graphics.endFill(); + + // Apply the shadow to the Stroke only + //text2.setShadow(2, 2, "#E65100", 2, true, false); + + //you earned a reward + var pirate = this.add.image(this.game.width-145, 100, 'pirate'); + //pirate.anchor.setTo(-0.3, 1.4); + pirate.scale.setTo(0.7, 0.7); + + // + var text3 = this.add.text(10, 60, "An extra gift\ntoday", { font: "35px Arial Black", fill: "#b33e00" }); + text3.stroke = "#FFE0B2"; + text3.strokeThickness = 4; + + // + var text1 = this.add.text(10, 160, "for filling out\nthe survey", { font: "24px Arial Black", fill: "#b33e00" }); + text1.stroke = "#FFE0B2"; + text1.strokeThickness = 2; + // Apply the shadow to the Stroke only + text1.setShadow(2, 2, "#E65100", 2, true, false); + + + // + var text2 = this.add.text(10, this.game.height-130, "Click on the gift\nto open", { font: "24px Arial Black", fill: "#FFE0B2" }); + text2.stroke = "#FFE0B2"; + text2.strokeThickness = 0; + + + + + // + var sprite = this.add.sprite(this.world.centerX, this.world.centerY, 'gift'); + sprite.anchor.setTo(0.9, 0.2); + sprite.scale.setTo(0.35,0.35); + sprite.alpha = 0; + this.add.tween(sprite).to( { alpha: 1 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false); + sprite.inputEnabled = true; + sprite.events.onInputDown.add(this.showReward, this); + + + // + console.log("don't know " + b.y); + } + + //show the reward + showReward(){ + this.ionic_scope.$emit('show:reinforcement',this.ionic_scope); + } + + + buildAquarium() { + + var phaserJSON = this.game.cache.getJSON('fishpoints'); + + //////////////////////////////////////////////////////////// + //upper aquarium + //////////////////////////////////////////////////////////// + var data = phaserJSON; + var survey_string = ""; + var current_points = this.totalPoints; + for(var i = 0; i < data.length; i++) { + if(current_points >= data[i].points){ + + //nemo + if(data[i].name.valueOf() === "Blue tang") + this.addDori(); + + //starfish + if(data[i].name.valueOf() === "Jelly fish") + this.addJellyFish(); + + //squid + if(data[i].name.valueOf() === "Green Crab") + this.addCrab(); + + + if(data[i].name.valueOf() === "Achovies") + this.addAnchovies(); + + if(data[i].name.valueOf() === "Bubbles") + this.addYellowTang(); + + if(data[i].name.valueOf() === "Salmon") + this.addSalmon(); + + if(data[i].name.valueOf() === "Deep undersea fish") + this.addAngryFish(); + + if(data[i].name.valueOf() === "Sword fish") + this.addSwordFish(); + + if(data[i].name.valueOf() === "Shark") + this.addShark(); + + if(data[i].name.valueOf() === "Dophin") + this.addDolphin(); + + if(data[i].name.valueOf() === "Whale") + this.addWhale(); + + if(data[i].name.valueOf() === "Stingray fish") + this.addKiteFish(); + + + //if(data[i].name.valueOf() === "Tiger barb") + // this.animateTigerbarb(); + } + } + + this.addCoral(); + + //set the progres bar + this.previoous_fish_point = 0; + this.next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + this.next_fish_point = data[i].points; + break; + }else{ + this.previoous_fish_point = data[i].points; + } + } + + /* + //console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point); + this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0); + var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height); + var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point); + console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point + "," + percent); + rect.width = Math.max(0, percent * this.progress_sprite.width); + + console.log("Width, " + rect.width + "," + this.progress_sprite.width); + this.progress_sprite.crop(rect); + */ + } + + addAFish(added_point){ + + var phaserJSON = this.game.cache.getJSON('fishpoints'); + //console.log(JSON.stringify(phaserJSON)); + + + var data = phaserJSON; + var survey_string = ""; + var current_points = this.totalPoints; + var old_points = current_points - added_point; + console.log("" + current_points + ", " + old_points); + for(var i = 0; i < data.length; i++) { + if(current_points >= data[i].points && + old_points < data[i].points){ + + //nemo + if(data[i].name.valueOf() === "Blue tang") + this.addDori(); + + + //starfish + if(data[i].name.valueOf() === "Jelly fish") + this.addJellyFish(); + + //squid + if(data[i].name.valueOf() === "Green Crab") + this.addCrab(); + + + if(data[i].name.valueOf() === "Achovies") + this.addAnchovies(); + + if(data[i].name.valueOf() === "Bubbles") + this.addYellowTang(); + + if(data[i].name.valueOf() === "Salmon") + this.addSalmon(); + + if(data[i].name.valueOf() === "Angry fish") + this.addAngryFish(); + + if(data[i].name.valueOf() === "Sword fish") + this.addSwordFish(); + + if(data[i].name.valueOf() === "Shark") + this.addShark(); + + if(data[i].name.valueOf() === "Dophin") + this.addDolphin(); + + if(data[i].name.valueOf() === "Whale") + this.addWhale(); + + if(data[i].name.valueOf() === "Stingray fish") + this.addKiteFish(); + + //if(data[i].name.valueOf() === "Tiger barb") + // this.animateTigerbarb(); + + } + } + + //set the progres bar + var previoous_fish_point = 0; + var next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + next_fish_point = data[i].points; + break; + }else{ + previoous_fish_point = data[i].points; + } + } + //console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point); + var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height); + var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point); + console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point + "," + percent); + this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0); + rect.width = 1 * percent * this.progress_sprite.width; + this.progress_sprite.crop(rect); + + } + + + addShark() { + this.sharkfish = this.add.sprite(this.CANVAS_WIDTH + 100, 130, 'sharkswim'); + this.sharkfish.anchor.setTo(.5,.5); + this.sharkfish.animations.add('swim'); + this.sharkfish.animations.play('swim',10, true); + this.sharkfish.scale.setTo(0.3, 0.22); + this.sharkfish.name = "sharkswim"; + this.gobothways(this.sharkfish); + } + + + addSwordFish() { + //swordfish + this.swordfish = this.add.sprite(-150, 70, 'swordfish'); + this.swordfish.anchor.setTo(-.5,.6); + this.swordfish.animations.add('swim'); + this.swordfish.animations.play('swim',30, true); + this.swordfish.scale.setTo(0.3, 0.3); + this.swordfish.name = "swordfishswim"; + this.gobothways(this.swordfish); + } + + + addDolphin() { + this.dolphin = this.add.sprite(-150, 70, 'dolphin'); + this.dolphin.anchor.setTo(.9,.6); + this.dolphin.animations.add('swim'); + this.dolphin.animations.play('swim',10, true); + this.dolphin.scale.setTo(0.6, 0.6); + this.dolphin.name = "dolphinswim"; + this.dolphin.angle -= 3; + this.gobothways(this.dolphin); + } + + addDori() { + //////////////////////////////////////////////////////////// + // mid aquarium + //////////////////////////////////////////////////////////// + /* + var dori = this.add.sprite(100, this.height/3 + 20, 'dori'); + dori.animations.add('swim'); + dori.animations.play('swim', 10, true); + dori.scale.setTo(0.3, 0.3); + dori.angle -= 10; + dori.anchor.setTo(.5,.5); + + var nemo = this.add.sprite(35, this.height/3 + 20, 'nemo'); + nemo.animations.add('swim'); + nemo.animations.play('swim', 7, true); + nemo.scale.setTo(-0.3, 0.3); + nemo.angle += 10; + nemo.anchor.setTo(.5,.5); + */ + + this.clownFish = this.add.sprite(-100, this.height/3 + 20, 'clownfish'); + this.clownFish.anchor.setTo(.5,.5); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 10, true); + this.clownFish.scale.setTo(0.3, 0.3); + this.clownFish.name = "clownFish"; + this.gobothways(this.clownFish); + + this.clownFish = this.add.sprite(-100, this.height/3 + 20, 'dori'); + this.clownFish.anchor.setTo(.1,.1); + this.clownFish.animations.add('swim'); + this.clownFish.animations.play('swim', 10, true); + this.clownFish.scale.setTo(0.3, 0.3); + this.clownFish.name = "clownFish"; + this.gobothways(this.clownFish); + + } + + addYellowTang() { + var yellowtang = this.add.sprite(this.CANVAS_WIDTH+100, this.height/3 + 55, 'yellowtang'); + yellowtang.animations.add('swim'); + yellowtang.animations.play('swim', 10, true); + yellowtang.scale.setTo(0.22, 0.22); + //yellowtang.angle -= 10; + yellowtang.anchor.setTo(.5,.5); + this.gobothways(yellowtang); + } + + + addJellyFish() { + // + var jellyfish = this.add.sprite(this.CANVAS_WIDTH - 80, this.height/3 + 0, 'jellyfish'); + jellyfish.animations.add('swim'); + jellyfish.animations.play('swim', 15, true); + jellyfish.scale.setTo(0.12, 0.12); + this.add.tween(jellyfish).to({ y: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true); + } + + + addSalmon() { + + var yellowtang = this.add.sprite(-150, this.height/3 + 70, 'salmon'); + yellowtang.animations.add('swim'); + yellowtang.animations.play('swim', 10, true); + yellowtang.scale.setTo(0.2, 0.2); + //yellowtang.angle -= 10; + yellowtang.anchor.setTo(.5,.5); + this.gobothways(yellowtang); + } + + //////////////////////////////////////////////////////////// + // bottom aquarium + //////////////////////////////////////////////////////////// + + + addWhale() { + var whale = this.add.sprite(this.CANVAS_WIDTH+150, this.height-120, 'whale'); + whale.animations.add('swim'); + whale.animations.play('swim', 12, true); + whale.scale.setTo(1.5, 1.5); + whale.anchor.setTo(.5,.5); + whale.angle += 5; + whale.name = "whaleswim"; + this.gobothways(whale); + } + + + addCrab() { + var redcrab = this.add.sprite(225, this.height-65, 'redcrab'); + redcrab.animations.add('swim'); + redcrab.animations.play('swim', 15, true); + redcrab.scale.setTo(-0.2, 0.2); + + + // + var greencrab = this.add.sprite(90, this.height-55, 'greencrab'); + greencrab.animations.add('swim'); + greencrab.animations.play('swim', 15, true); + greencrab.scale.setTo(0.2, 0.2); + } + + + addKiteFish() { + var kitefish = this.add.sprite(this.CANVAS_WIDTH-120, this.height-85, 'kitefish'); + kitefish.animations.add('swim'); + kitefish.animations.play('swim', 15, true); + kitefish.scale.setTo(0.5, 0.5); + } + + + addAngryFish() { + this.angryfish = this.add.sprite(-100, this.height-250, 'angryfish'); + this.angryfish.anchor.setTo(2.2,-0.1); + this.angryfish.animations.add('swim'); + this.angryfish.animations.play('swim',20, true); + this.angryfish.scale.setTo(0.25, 0.25); + this.angryfish.name = "angryfishswim"; + this.gobothways(this.angryfish); + } + + addAnchovies() { + // + this.blueanchovy = this.add.sprite(-100, this.height-250, 'blueanchovy'); + this.blueanchovy.anchor.setTo(.9,.9); + this.blueanchovy.animations.add('swim'); + this.blueanchovy.animations.play('swim',4, true); + this.blueanchovy.scale.setTo(0.1, 0.1); + this.blueanchovy.name = "blueanchovyswim"; + this.gobothways(this.blueanchovy); + + this.greenanchovy = this.add.sprite(-100, this.height-235, 'greenanchovy'); + this.greenanchovy.anchor.setTo(.5,.5); + this.greenanchovy.animations.add('swim'); + this.greenanchovy.animations.play('swim',8, true); + this.greenanchovy.scale.setTo(0.1, 0.1); + this.greenanchovy.name = "greenanchovyswim"; + this.gobothways(this.greenanchovy); + + this.pinkanchovy = this.add.sprite(-100, this.height-270, 'pinkanchovy'); + this.pinkanchovy.anchor.setTo(.2,.2); + this.pinkanchovy.animations.add('swim'); + this.pinkanchovy.animations.play('swim',2, true); + this.pinkanchovy.scale.setTo(0.12, 0.12); + this.pinkanchovy.name = "pinkanchovyswim"; + this.gobothways(this.pinkanchovy); + } + + + addCoral() { + // + var coral = this.add.image(0, this.height-60, 'coral'); + coral.scale.setTo(0.5, 0.5); + + } + + showunlockables(){ + console.log('treasure box clicked'); + this.componentObject.goToRewardsPage(); + } + + gobothways(b){ + + //console.log('start again ' + b.name); + var change_amount = Math.floor(this.rnd.realInRange(0, 50)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + var pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.height) || (pos_y < 70)){ + pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + + var t; + //if() + if(b.x > this.CANVAS_WIDTH){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + //t= this.add.tween(b).to({ x: -200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t= this.add.tween(b).to({ x: -100+Math.floor(this.rnd.realInRange(0, 50)), y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 4000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + //console.log('left to right, ' + b.x); + b.scale.x = -1*b.scale.x; + //t = this.add.tween(b).to({ x: window.innerWidth + 200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0); + t = this.add.tween(b).to({ x: this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)), y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 4000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + } + + buildFish() { + + //assign number of fish + numfish = 5; + //assign type and age of fish + var fishType = ["green4", "horse4", "purple4", "pink4", "magenta4"] + this.fishGroup = this.add.group(); + this.fishGroup.enableBody = true; + for(i = 0; i < numfish; i++){ + var b = this.fishGroup.create(this.rnd.integerInRange(0, this.world.width), this.rnd.integerInRange(this.world.height-300, this.world.height-200), fishType[i]); + b.scale.setTo(0.4, 0.8); + b.anchor.setTo(0.5, 0.5); + b.body.moves = false; + b.inputEnabled = true; + b.events.onInputDown.add(this.addTally, this); + this.assignFishMovement(b); + } + + } + + assignFishMovement(b) { + xposition = Math.floor(this.rnd.realInRange(50, this.world.width-50)); + yposition = Math.floor(this.rnd.realInRange(100, this.world.height-200)); + bdelay = this.rnd.integerInRange(2000, 6000); + if(xposition < b.x){ + b.scale.x = -1; + }else{ + b.scale.x = 1; + } + t = this.add.tween(b).to({x:xposition, y:yposition}, 3500, Phaser.Easing.Quadratic.InOut, true, bdelay); + t.onComplete.add(this.stopFish, this); + } + + stopFish(b) { + //this.assignFishMovement(b); + this.gobothways(b); + } + + addTally() { + this.totalClicks = this.totalClicks + 1; + this.countdown.setText('Fishes Fed: ' + this.totalClicks); + } + + updatescore(added_points) { + console.log("Update score called inside game, " + this.ionic_scope.total_points); + //this.totalPoints = this.ionic_scope.total_points; + this.addAFish(added_points); + this.countdown.setText('Points: ' + this.totalPoints); + } + + setTotalPoints(totalPoints){ + this.totalPoints = totalPoints; + } + + assignscope(componentObject){ + this.componentObject = componentObject; + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/SeaLevelL4/Preloader.js": +/*!*******************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/SeaLevelL4/Preloader.js ***! + \*******************************************************************/ +/*! exports provided: PreloaderL4 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloaderL4", function() { return PreloaderL4; }); +class PreloaderL4 extends Phaser.State { + + preload(){ + + //console.log("Preloader: preload called"); + + this.load.onLoadComplete.addOnce(this.onLoadComplete, this); + + this.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar'); + this.preloadBar.anchor.setTo(0.5, 0.5); + this.load.setPreloadSprite(this.preloadBar); + + //---- both aquariums + this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt'); + this.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points + this.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png'); + //this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20); + + this.add.text(0, 0, "hack", {font:"1px dumbo_regular", fill:"#FFFFFF"}); + //this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20); + this.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20); + this.load.image('points_progress_2', 'assets/img/points_progress_2.png'); + this.load.image('levels_progress', 'assets/img/levels_progress_2.png'); + this.load.image('streak_info', 'assets/img/streak_info_2.png'); + this.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20); + this.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20); + this.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20); + this.load.image('alt_icon', 'assets/img/heart.png'); + this.load.image('next_fish_icon', 'assets/img/fish_icon_2.png'); + this.load.image('meme_icon', 'assets/img/smiley_face.png'); + this.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20); + this.load.image('level_up_icon', 'assets/img/level_icon.png'); + this.load.image('level_up_2', 'assets/img/level_up_2.png'); + this.load.image('streak_green', 'assets/img/streak_green.png'); + this.load.image('streak_red', 'assets/img/streak_red_2.png'); + this.load.image('streak_grey', 'assets/img/streak_grey.png'); + this.load.image('star_point', 'assets/img/star.png'); + this.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json'); + + + var max = 8; + var min = 1; + var rand_num = Math.floor(Math.random() * (max - min + 1)) + min; + console.log('assets/img/pirate-' + rand_num + '.png'); + this.load.image('pirate', 'assets/img/pirate-' + rand_num + '.png'); + + var username = window.localStorage['username'] || 'unknown'; + + this.isStudyParticipant = username.indexOf('-study-') !== -1; // !== -1; + this.loadSea(); + + //--- RedBanner.png + this.load.image('banner', 'assets/img/RedBanner.png'); + this.load.image('banner_fish', 'assets/img/banner_fish.png'); + + + //---- + var next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png'; + console.log("Next fish: " + next_fish); + this.load.image('clownfish_grey', next_fish); + + this.load.image('diamond', 'assets/img/diamond.png'); + + var progressDisplay = 0; + var timerEvt = this.time.events.loop(100, function (){ + if(this.load.progress < 100){ + progressDisplay++; + console.log('loading... '+(this.load.progress)+'%' + "; " + (100*progressDisplay)); + }else{ + //loadingText.text = 'Ready, Go!'; + console.log('Ready, Go!'); + this.time.events.remove(timerEvt); + } + + }, this); + } + + create(){ + console.log("Preloader: create called"); + this.preloadBar.cropEnabled = false; + } + + update() + { + console.log("update: "+ "SeaLevelL4"); + this.state.start('SeaLevelL4'); + } + + onLoadComplete(){ + console.log("Load complete"); + this.ready = true; + } + + loadSea(){ + //second aquarium + //-- fish_journal + console.log("Inside loadSea"); + this.load.image('fish_journal', 'assets/img/fish_journal.png'); + + //--- sea + this.load.image('undersea', 'assets/img/underwaterbr.jpg'); + this.load.image('treasuresea', 'assets/img/treasuresea.png'); + this.load.image('coral', 'assets/img/seabed.png'); + this.load.atlasJSONArray('clownfish', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json'); + this.load.atlasJSONArray('dori', 'assets/game/sprite/dory2.png', 'assets/game/sprite/dory2.json'); + this.load.atlasJSONArray('jellyfish', 'assets/game/sprite/jellyfish.png', 'assets/game/sprite/jellyfish.json'); + this.load.atlasJSONArray('redcrab', 'assets/game/sprite/redcrab.png', 'assets/game/sprite/redcrab.json'); + this.load.atlasJSONArray('greencrab', 'assets/game/sprite/greencrab.png', 'assets/game/sprite/greencrab.json'); + this.load.atlasJSONArray('angryfish', 'assets/game/sprite/angryfish.png', 'assets/game/sprite/angryfish.json'); + this.load.atlasJSONArray('salmon', 'assets/game/sprite/salmon.png', 'assets/game/sprite/salmon.json'); + this.load.atlasJSONArray('yellowtang', 'assets/game/sprite/yellowtang.png', 'assets/game/sprite/yellowtang.json'); + this.load.spritesheet('blueanchovy', 'assets/game/sprite/blueanchovy.png', 512, 125, 4); + this.load.spritesheet('greenanchovy', 'assets/game/sprite/greenanchovy.png', 512, 125, 4); + this.load.spritesheet('pinkanchovy', 'assets/game/sprite/pinkanchovy.png', 512, 125, 4); + + this.load.atlasJSONArray('sharkswim', 'assets/game/sprite/sharkswimming.png', 'assets/game/sprite/sharkswimming.json'); + this.load.atlasJSONArray('nemo', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json'); + this.load.atlasJSONArray('swordfish', 'assets/game/sprite/swordfish.png', 'assets/game/sprite/swordfish.json'); + this.load.atlasJSONArray('dolphin', 'assets/game/sprite/dolphin.png', 'assets/game/sprite/dolphin.json'); + this.load.atlasJSONArray('kitefish', 'assets/game/sprite/kitefish.png', 'assets/game/sprite/kitefish.json'); + this.load.atlasJSONArray('whale', 'assets/game/sprite/whale.png', 'assets/game/sprite/whale.json'); + + + // + //this.load.image('gotosea', 'assets/img/gotosea.png'); + + //first_aq + //this.load.image('first_aq', 'assets/img/first_aq.png'); + + + + //submarine + //this.load.atlasJSONArray('submarine', 'assets/game/sprite/submarine.png', 'assets/game/sprite/submarine.json'); + //this.load.atlasJSONArray('submarine_at', 'assets/game/sprite/submarine_at.png', 'assets/game/sprite/submarine_at.json'); + + //this.preloadBar.destroy(); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/TundraLevelL5/Boot.js": +/*!*****************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/TundraLevelL5/Boot.js ***! + \*****************************************************************/ +/*! exports provided: BootTundraL5 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BootTundraL5", function() { return BootTundraL5; }); +class BootTundraL5 extends Phaser.State { + preload() { + this.load.image('preloaderBar', 'assets/img/loader_bar.png'); + } + + create() { + this.input.maxPointers = 1; + //-- https://github.com/photonstorm/phaser-ce/issues/32 + if(this.game.device.touch){ + this.input.mouse.stop(); + } + this.stage.disableVisibilityChange = false; + //this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + this.scale.minWidth = 270; + this.scale.minHeight = 400; + this.scale.pageAlignHorizontally = true; + this.scale.pageAlignVertically = true; + this.stage.forcePortrait = true; + //this.scale.setScreenSize(true); + + this.input.addPointer(); + + //Change color here + //-- http://www.w3schools.com/colors/colors_picker.asp + this.stage.backgroundColor = '#ffffff'; + + this.state.start('Preloader'); + console.log("Boot completed"); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/TundraLevelL5/Game.js": +/*!*****************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/TundraLevelL5/Game.js ***! + \*****************************************************************/ +/*! exports provided: GameTundraL5 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GameTundraL5", function() { return GameTundraL5; }); +class GameTundraL5 extends Phaser.State { + + //componentObject; + constructor(){ + super(); + this.componentObject; + this.snowgswitch; + this.back_emitter; + this.mid_emitter; + this.yeti; + this.surveyHistory = []; + } + + // + create() { + + console.log("create called"); + + var s = this.game.add.sprite(0,0,'tundra1'); + s.rotation = 0.0; + var aspect_ratio = s.width/s.height; + s.height = this.game.height - 310; + s.width = s.height*aspect_ratio; + + //--- this is the bottom screen, blue water thing. + var titlescreen = this.add.image(0, this.game.height-60, 'titlescreen'); + titlescreen.scale.setTo(0.6, 0.6); + + + this.CANVAS_WIDTH = window.innerWidth; + + // + this.height = this.game.height; + + //--- + //this.CANVAS_WIDTH = 382.0; + //if(window.innerWidth > this.CANVAS_WIDTH) + // this.CANVAS_WIDTH = window.innerWidth; + + //--- + //var timer = this.add.sprite(5, 40, 'timer', 1); + + //--- + /* + var fish_progress = this.add.image(175,50, 'clownfish_grey'); + fish_progress.scale.setTo(-0.3, 0.3); + fish_progress.anchor.setTo(.5,.5); + */ + + //--- + /* + var pouch = this.add.image(15,80, 'diamond'); + pouch.scale.setTo(0.4, 0.4); + pouch.anchor.setTo(.5,.5); + this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', "" + 2, 12); + */ + + // + /* + this.snowgswitch = this.add.image(5, 70, 'snowgswitch'); + this.snowgswitch.scale.setTo(0.15, 0.15); + this.snowgswitch.inputEnabled = true; + this.snowgswitch.events.onInputDown.addOnce(this.startsnowing, this); + */ + + + // + this.inputEnabled = false; + Phaser.Canvas.setTouchAction(this.game.canvas, "auto"); + this.game.input.touch.preventDefault = false; + + + //this.animateDuck(); + //this.animateSnowOwl(); + + // + var treasure = this.add.image(this.game.width/2, this.height-85, 'treasure_tundra'); + treasure.scale.setTo(-0.5, 0.5); + treasure.anchor.setTo(.5,.5); + treasure.inputEnabled = true; + treasure.events.onInputDown.add(this.showunlockables, this); + + + // + this.addAnimals(); + + this.showProgressBars(); + + // + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + + // + this.game.onPause.add(this.yourGamePausedFunc, this); + this.game.onResume.add(this.yourGameResumedFunc, this); + + } + + showProgressBars(){ + + var current_points = this.totalPoints; + + //------ Left side + + + + //level info + //var levels_progress = this.add.image(5, 55, 'levels_progress'); + //levels_progress.scale.setTo(.27, .30); + + /* + // + var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0); + levels_progress.scale.setTo(0.95, 1.2); + + //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1); + var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1); + var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + //progress_sprite.anchor.setTo(0,0); + progress_sprite.scale.setTo(1,1.1); + + + var level_up_icon = this.add.image(18, 68, 'level_up_icon'); + level_up_icon.scale.setTo(.5, .5); + level_up_icon.anchor.setTo(.5, .5); + + var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite'); + info_level_progress.animations.add('swim'); + info_level_progress.animations.play('swim', 1, true); + info_level_progress.scale.setTo(0.3, 0.3); + info_level_progress.anchor.setTo(.5,.5); + info_level_progress.inputEnabled = true; + info_level_progress.events.onInputDown.add(function(){this.showInforBox("Info level progress bar clicked")}, this); + + + //progress_sprite.anchor.setTo(1,0); + //progress_sprite.scale.setTo(0.8,0.8); + */ + + var SCALING_FACTOR = 0.8; + + //streak_info + var streak_info = this.add.image(5, 5, 'streak_info'); + streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR); + + /* + var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite'); + info_level_streak.animations.add('swim'); + info_level_streak.animations.play('swim', 1, true); + info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR); + info_level_streak.anchor.setTo(.5,.5); + info_level_streak.inputEnabled = true; + info_level_streak.events.onInputDown.add(function(){this.showInforBox("Streak progress bar clicked")}, this); + */ + + var colors = []; //['grey','grey','grey','grey','grey','grey','grey']; + for(var i=0; i < this.surveyHistory.length; i++){ + if(this.surveyHistory[i] == 1) + colors[i] = 'green'; + else + colors[i] = 'grey'; + } + colors = colors.reverse() + + //console.log("this.surveyHistory " + this.surveyHistory); + console.log("colors " + colors); + //colors = ['green','green','green','green','grey','green','grey']; + var streak_tile; + for(var i=0; i < this.surveyHistory.length; i++){ + streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]); + streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR); + } + + + //------ Right side + //var progressBars = this.add.group(); + + //points bar + vertical_position_offset = 13; + var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2'); + points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR); + points_progress.anchor.setTo(1,0); + //progressBars.add(points_progress); + + //point text + var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, "" + this.totalPoints, {font:"20px dumbo_regular", fill:"#4c3d01"}); + points_text.anchor.setTo(0.5,0); + points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + //progressBars.add(points_text); + + var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point'); + star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + star_icon.anchor.setTo(.5, .5); + //progressBars.add(points_text); + + //progressBars.scale.setTo(.8, .8); + + /* + var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite'); + info_points.animations.add('swim'); + info_points.animations.play('swim', 1, true); + info_points.scale.setTo(0.3, 0.3); + info_points.anchor.setTo(.5,.5); + info_points.inputEnabled = true; + //function(){doAlert(textString) + info_points.events.onInputDown.add(function(){this.showInforBox("Info pregess bar cliccked 2")}, this); + */ + + + //points to get to next fish. + var vertical_position_offset = 35; + + + var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1); + progress_bar_fish.anchor.setTo(1,0); + progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0); + var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon'); + fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR); + fish_progress_icon.anchor.setTo(.5, .5); + + + + //points to get to meme. + vertical_position_offset = 57; + + /* + var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1); + progress_bar_memes.anchor.setTo(1,0); + progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_memes = 0; + var total_number_of_memes = 31; + var already_shown_memes = window.localStorage["already_shown_memes3"]; + if(already_shown_memes == undefined) + already_shown_memes = [{"filename": "assets/memes/4.jpg", "unlock_date": "blah"}] + else + already_shown_memes = JSON.parse(window.localStorage["already_shown_memes3"]); + var currently_number_of_unlocked_memes = already_shown_memes.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_memes-start_number_of_memes)/ + (total_number_of_memes-start_number_of_memes); + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon'); + meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR); + meme_icon.anchor.setTo(.5, .5); + + + //points to get to alt message. + var vertical_position_offset = 79; + var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1); + progress_bar_altruism_message.anchor.setTo(1,0); + progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_alt_messages = 0; + var total_number_of_alt_messages = 21; + + var already_shown_altruism_msgs = window.localStorage["already_shown_alt_msg3"]; + if(already_shown_altruism_msgs == undefined) + already_shown_altruism_msgs = [{"filename": "assets/altruism/altruism_1.png", "unlock_date": "blah"}] + else + already_shown_altruism_msgs = JSON.parse(window.localStorage["already_shown_alt_msg3"]); + var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/ + (total_number_of_alt_messages-start_number_of_alt_messages); + //if(percent < 0.05) + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Alt Width, " + rect.width + "," + percent); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + + var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon'); + alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR); + alt_icon.anchor.setTo(.5, .5); + + + + //points to get to level up. + var vertical_position_offset = 101; + */ + + var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1); + progress_bar_level_up.anchor.setTo(1,0); + progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + // end of level is 1060, start is at 0 + var start_point_for_level = 2120; + var end_point_for_level = 3020; + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level); + percent = percent*0.8 + 0.2; + //console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + //console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2'); + level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR); + level_up_2.anchor.setTo(.5, .5); + + + + + + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + //console.log("countdown.width " + this.countdown.width); + + + } + + setSurveyHistory(survey_history){ + console.log("survey_history " + survey_history + ", length: " + survey_history.length); + //this.surveyHistory = survey_history; + for(var i=0; i= data[i].points){ + drawing_order_enabled[data[i].name.valueOf()] = 1; + } + } + + + for(var key in drawing_order_enabled) { + + //means it is not included + if(drawing_order_enabled[key] == 0) + continue; + + + if(drawing_order_enabled[key] == 1){ + + //nemo + if(key === "Penguin") + this.animatePenguin(); + + if(key === "Seal") + this.animateSealion(); + + if(key === "Grey Wolf") + this.animateWolf(); + + if(key === "Brown Bear") + this.animateBear(); + + if(key === "Snow Bunting") + this.animateBirds(); + + if(key === "Hare") + this.animateHare(); + + if(key === "Pingu, the Penguin") + this.animatePingu(); + + //if(data[i].name.valueOf() === "Coyote") + // this.animateCoyote(); + + //if(data[i].name.valueOf() === "White Husky") + // this.animateWhiteHusky(); + + + if(key === "Snow") + this.animateSnow(); + + + if(key === "Grey Husky") + this.animateBrwonHusky(); + + if(key === "Yeti") + this.animateYeti(); + + + + if(key === "Reindeer") + this.animateReindeer(); + + + + if(key === "Snowy Owl") + this.animateSnowOwl(); + + + if(key === "Ducks") + this.animateDuck(); + + if(key === "Mountain goat") + this.animateMountainGoat(); + + if(key === "Blue Jay") + this.animateBlueJay(); + + /* + if(data[i].name.valueOf() === "Rabbit") + this.animateRabbit(); + */ + + } + } + + + //set the progres bar + this.previoous_fish_point = 0; + this.next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + this.next_fish_point = data[i].points; + break; + }else{ + this.previoous_fish_point = data[i].points; + } + } + + /* + this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0); + var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height); + var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point); + console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point + "," + percent); + rect.width = Math.max(0, percent * this.progress_sprite.width); + + console.log("Width, " + rect.width + "," + this.progress_sprite.width); + this.progress_sprite.crop(rect); + */ + } + + animateSnow(){ + //console.log("snow button loaded"); + this.snowgswitch = this.add.image(5, 70, 'snow_start'); + this.snowgswitch.scale.setTo(0.6, 0.6); + this.snowgswitch.inputEnabled = true; + this.snowgswitch.events.onInputDown.addOnce(this.startsnowing, this); + } + + + + //-- Add Penguin + animatePenguin(){ + + console.log("Device pixel ratio is: " + window.devicePixelRatio) + + var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y; + starting_pos_x = -15; + starting_pos_y = this.game.height - 145; + ending_pos_x = 45; + ending_pos_y = this.game.height - 105; + scale_x = 0.3; + scale_y = 0.3; + + this.penguins = this.add.sprite(starting_pos_x, starting_pos_y, 'penguin'); + this.penguins.anchor.setTo(.5,.5); + this.penguins.animations.add('swim2'); + this.penguins.animations.play('swim2', 5, true); + this.penguins.scale.setTo(scale_x, scale_y); + this.penguins.name = "pegions"; + var t = this.add.tween(this.penguins).to({ x: ending_pos_x, y: ending_pos_y}, 1000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.penguins.animations.stop(null, true);}, this); + } + + //-- Add sea lion + animateSealion(){ + + var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y; + + + //---- sea lion silver + starting_pos_x = this.game.width+15; + starting_pos_y = this.game.height - 105; + ending_pos_x = this.game.width-75; + ending_pos_y = this.game.height - 105; + scale_x = 1.3; + scale_y = 1.3; + + this.sealion = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_silver'); + this.sealion.anchor.setTo(.5,.5); + this.sealion.animations.add('swim2'); + this.sealion.animations.play('swim2', 5, true); + this.sealion.scale.setTo(scale_x, scale_y); + this.sealion.name = "sea_lion_silver"; + var t = this.add.tween(this.sealion).to({ x: ending_pos_x, y: ending_pos_y}, 3000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion.animations.stop(null, true);}, this); + + + //---- sea lion brown + starting_pos_x = this.game.width+25; + starting_pos_y = this.game.height - 135; + ending_pos_x = this.game.width-45; + ending_pos_y = this.game.height - 135; + scale_x = 1.3; + scale_y = 1.3; + + this.sealion_brown = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_brown'); + this.sealion_brown.anchor.setTo(.5,.5); + this.sealion_brown.animations.add('swim2'); + this.sealion_brown.animations.play('swim2', 5, true); + this.sealion_brown.scale.setTo(scale_x, scale_y); + this.sealion_brown.name = "sea_lion_brown"; + var t = this.add.tween(this.sealion_brown).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion_brown.animations.stop(null, true);}, this); + + //---- sea lion pink + starting_pos_x = this.game.width+125; + starting_pos_y = this.game.height - 85; + ending_pos_x = this.game.width-25; + ending_pos_y = this.game.height - 85; + scale_x = 0.8; + scale_y = 0.8; + + this.sealion_pink = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_pink'); + this.sealion_pink.anchor.setTo(.5,.5); + this.sealion_pink.animations.add('swim2'); + this.sealion_pink.animations.play('swim2', 5, true); + this.sealion_pink.scale.setTo(scale_x, scale_y); + this.sealion_pink.name = "sea_lion_pink"; + var t = this.add.tween(this.sealion_pink).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion_pink.animations.stop(null, true);}, this); + + } + + // + animateDuck(){ + this.duck = this.add.sprite(this.game.width+15, this.game.height-20, 'duck'); + this.duck.anchor.setTo(.5,.5); + this.duck.animations.add('swim2'); + this.duck.animations.play('swim2', 3, true); + this.duck.scale.setTo(1, 1); + this.duck.name = "duck"; + this.gobothways(this.duck); + + this.duck2 = this.add.sprite(this.game.width+55, this.game.height-20, 'duck'); + this.duck2.anchor.setTo(.5,.5); + this.duck2.animations.add('swim2'); + this.duck2.animations.play('swim2', 3, true); + this.duck2.scale.setTo(1, 1); + this.duck2.name = "duck2"; + this.gobothways(this.duck2); + } + + animateBearCub(){ + //console.log("snow button loaded"); + this.polarBearCub = this.add.sprite(this.game.width+15, this.game.height - 290, 'polar_bear_cub'); + this.polarBearCub.anchor.setTo(.5,.5); + this.polarBearCub.animations.add('swim2'); + this.polarBearCub.animations.play('swim2', 3, true); + this.polarBearCub.scale.setTo(-0.8, 0.8); + this.polarBearCub.name = "polarBearCub"; + this.gobothways(this.polarBearCub); + } + + + + + // + animateSnowOwl(){ + // + this.black_tundra_owl = this.add.sprite(this.game.width-130, 195, 'black_tundra_owl'); + this.black_tundra_owl.anchor.setTo(.5,.5); + this.black_tundra_owl.animations.add('swim2'); + this.black_tundra_owl.animations.play('swim2', 5, true); + this.black_tundra_owl.scale.setTo(0.9, 0.9); + this.black_tundra_owl.name = "black_tundra_owl"; + this.gobothways(this.black_tundra_owl); + + + this.brown_tundra_owl = this.add.sprite(this.game.width-100, 200, 'brown_tundra_owl'); + this.brown_tundra_owl.anchor.setTo(.5,.5); + this.brown_tundra_owl.animations.add('swim2'); + this.brown_tundra_owl.animations.play('swim2', 5, true); + this.brown_tundra_owl.scale.setTo(0.9, 0.9); + this.brown_tundra_owl.name = "brown_tundra_owl"; + this.gobothways(this.brown_tundra_owl); + + + this.grey_tundra_owl = this.add.sprite(this.game.width-160, 205, 'grey_tundra_owl'); + this.grey_tundra_owl.anchor.setTo(.5,.5); + this.grey_tundra_owl.animations.add('swim2'); + this.grey_tundra_owl.animations.play('swim2', 5, true); + this.grey_tundra_owl.scale.setTo(0.9, 0.9); + this.grey_tundra_owl.name = "grey_tundra_owl"; + this.gobothways(this.grey_tundra_owl); + + /* + this.light_brown_tundra_owl = this.add.sprite(this.game.width-170, 180, 'light_brown_tundra_owl'); + this.light_brown_tundra_owl.anchor.setTo(.5,.5); + this.light_brown_tundra_owl.animations.add('swim2'); + this.light_brown_tundra_owl.animations.play('swim2', 5, true); + this.light_brown_tundra_owl.scale.setTo(0.9, 0.9); + this.light_brown_tundra_owl.name = "light_brown_tundra_owl"; + this.gobothways(this.light_brown_tundra_owl); + */ + + this.white_tundra_owl = this.add.sprite(this.game.width-200, 185, 'white_tundra_owl'); + this.white_tundra_owl.anchor.setTo(.5,.5); + this.white_tundra_owl.animations.add('swim2'); + this.white_tundra_owl.animations.play('swim2', 5, true); + this.white_tundra_owl.scale.setTo(0.9, 0.9); + this.white_tundra_owl.name = "white_tundra_owl"; + this.gobothways(this.white_tundra_owl); + + } + + // + animateMountainGoat(){ + var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y; + + + //---- sea lion silver + starting_pos_x = this.game.width/2-60; + starting_pos_y = this.game.height - 185 + 40; + ending_pos_x = this.game.width/2-30; + ending_pos_y = this.game.height - 185 + 40; + scale_x = 1.3; + scale_y = 1.3; + + this.black_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'black_mountain_goat'); + this.black_mountain_goat.anchor.setTo(.5,.5); + this.black_mountain_goat.animations.add('swim2'); + this.black_mountain_goat.animations.play('swim2', 3, true); + this.black_mountain_goat.scale.setTo(scale_x, scale_y); + this.black_mountain_goat.name = "black_mountain_goat"; + var t = this.add.tween(this.black_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 9000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.black_mountain_goat.animations.stop(null, true);}, this); + + + starting_pos_x = this.game.width-10; + starting_pos_y = this.game.height - 205 + 40; + ending_pos_x = this.game.width/2+50; + ending_pos_y = this.game.height - 205 + 40; + scale_x = -1.5; + scale_y = 1.5; + + this.white_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'white_mountain_goat'); + this.white_mountain_goat.anchor.setTo(.5,.5); + this.white_mountain_goat.animations.add('swim2'); + this.white_mountain_goat.animations.play('swim2', 3, true); + this.white_mountain_goat.scale.setTo(scale_x, scale_y); + this.white_mountain_goat.name = "white_mountain_goat"; + t = this.add.tween(this.white_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 15000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.white_mountain_goat.animations.stop(null, true);}, this); + + + starting_pos_x = this.game.width-10; + starting_pos_y = this.game.height - 175 + 40; + ending_pos_x = this.game.width/2+30; + ending_pos_y = this.game.height - 175 + 40; + scale_x = -1.2; + scale_y = 1.2; + + this.brown_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'brown_mountain_goat'); + this.brown_mountain_goat.anchor.setTo(.5,.5); + this.brown_mountain_goat.animations.add('swim2'); + this.brown_mountain_goat.animations.play('swim2', 3, true); + this.brown_mountain_goat.scale.setTo(scale_x, scale_y); + this.brown_mountain_goat.name = "brown_mountain_goat"; + t = this.add.tween(this.brown_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 9000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.brown_mountain_goat.animations.stop(null, true);}, this); + + /* + //---- sea lion brown + starting_pos_x = this.game.width+25; + starting_pos_y = this.game.height - 135; + ending_pos_x = this.game.width-45; + ending_pos_y = this.game.height - 135; + scale_x = 1.3; + scale_y = 1.3; + + this.sealion_brown = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_brown'); + this.sealion_brown.anchor.setTo(.5,.5); + this.sealion_brown.animations.add('swim2'); + this.sealion_brown.animations.play('swim2', 5, true); + this.sealion_brown.scale.setTo(scale_x, scale_y); + this.sealion_brown.name = "sea_lion_brown"; + var t = this.add.tween(this.sealion_brown).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion_brown.animations.stop(null, true);}, this); + + //---- sea lion pink + starting_pos_x = this.game.width+125; + starting_pos_y = this.game.height - 85; + ending_pos_x = this.game.width-25; + ending_pos_y = this.game.height - 85; + scale_x = 0.8; + scale_y = 0.8; + + this.sealion_pink = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_pink'); + this.sealion_pink.anchor.setTo(.5,.5); + this.sealion_pink.animations.add('swim2'); + this.sealion_pink.animations.play('swim2', 5, true); + this.sealion_pink.scale.setTo(scale_x, scale_y); + this.sealion_pink.name = "sea_lion_pink"; + var t = this.add.tween(this.sealion_pink).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion_pink.animations.stop(null, true);}, this); + */ + } + + //--- add wolf animation. + animateWolf(){ + + var starting_pos_x, starting_pos_y, scale_x, scale_y; + + //---- wolf walk + starting_pos_x = this.game.width-100; + starting_pos_y = this.game.height-335; + scale_x = 0.8; + scale_y = 0.8; + + this.wolf = this.add.sprite(starting_pos_x, starting_pos_y, 'wolf_walk'); + //this.wolf = this.add.sprite(this.game.width+100, this.game.height-295, 'wolf_walk'); + this.wolf.anchor.setTo(.5,.5); + this.wolf.animations.add('swim'); + this.wolf.animations.play('swim', 3, true); + this.wolf.scale.setTo(scale_x, scale_y); + this.wolf.name = "wolf"; + this.wolf.startingDirection = "leftToRight"; + this.wolf.spriteFacesDirection = "right"; + this.gobothways(this.wolf); + } + + animateBear(){ + this.brown_bear = this.add.sprite(-200, this.game.height-325, 'brown_bear'); + this.brown_bear.anchor.setTo(.5,.5); + this.brown_bear.animations.add('swim'); + this.brown_bear.animations.play('swim', 6, true); + this.brown_bear.scale.setTo(-.15, .15); + this.brown_bear.name = "brown_bear"; + this.gobothways(this.brown_bear); + + this.animateBearCub(); + } + + + + // + animateBrwonHusky(){ + + this.white_husky = this.add.sprite(65, this.game.height - 215, 'white_husky'); + this.white_husky.anchor.setTo(.5,.5); + this.white_husky.animations.add('swim2'); + this.white_husky.animations.play('swim2',15, true); + this.white_husky.scale.setTo(0.35, 0.35); + this.white_husky.name = "white_husky"; + + + this.white_husky = this.add.sprite(65, this.game.height - 185, 'grey_husky'); + this.white_husky.anchor.setTo(.5,.5); + this.white_husky.animations.add('swim2'); + this.white_husky.animations.play('swim2',15, true); + this.white_husky.scale.setTo(0.35, 0.35); + this.white_husky.name = "grey_husky"; + } + + // + animatePingu(){ + this.pingu = this.add.sprite(105, this.game.height - 105, 'pingu'); + this.pingu.anchor.setTo(.5,.5); + this.pingu.animations.add('swim2'); + this.pingu.animations.play('swim2',4, true); + this.pingu.scale.setTo(0.35, 0.35); + this.pingu.name = "pingu"; + } + + + + animateRabbit(){ + this.rabbit = this.add.sprite(this.game.width+215, this.game.height-125, 'rabbit'); + this.rabbit.anchor.setTo(.5,.5); + this.rabbit.animations.add('swim2'); + this.rabbit.animations.play('swim2', 20, true); + this.rabbit.scale.setTo(-0.4, 0.4); + this.rabbit.name = "rabbit"; + this.gobothways(this.rabbit); + } + + + + + // + animateHare(){ + this.hare = this.add.sprite(this.game.width-115, this.game.height - 285, 'hare'); + this.hare.anchor.setTo(.5,.5); + this.hare.animations.add('swim2'); + this.hare.animations.play('swim2', 5, true); + this.hare.scale.setTo(0.4, 0.4); + this.hare.name = "hare"; + this.hare.startingDirection = "rightToLeft"; + this.hare.spriteFacesDirection = "right"; + this.gobothways(this.hare); + } + + + // + animateReindeer(){ + //this.reindeer = this.add.sprite(-115, this.game.height - 145, 'reindeer'); + this.reindeer = this.add.sprite(-75, this.game.height - 265, 'reindeer'); + this.reindeer.anchor.setTo(.5,.5); + this.reindeer.animations.add('swim2'); + this.reindeer.animations.play('swim2', 5, true); + this.reindeer.scale.setTo(-0.12, 0.12); + this.reindeer.name = "reindeer"; + this.gobothways(this.reindeer); + } + + + // + animateCoyote(){ + this.coyote = this.add.sprite(-115, this.game.height - 225, 'coyote'); + this.coyote.anchor.setTo(.5,.5); + this.coyote.animations.add('swim2'); + this.coyote.animations.play('swim2', 5, true); + this.coyote.scale.setTo(-1, 1); + this.coyote.name = "coyote"; + this.gobothways(this.coyote); + } + + + // + animateBirds(){ + this.birds = this.add.sprite(-50, 95, 'bird_fly'); + this.birds.anchor.setTo(.5,.5); + this.birds.animations.add('swim2'); + this.birds.animations.play('swim2', 5, true); + this.birds.scale.setTo(-0.3, 0.3); + this.birds.name = "birds"; + //this.pegions.body.velocity.x = -20; + this.gobothways(this.birds); + } + + + // + animateBlueJay(){ + this.blue_jay = this.add.sprite(this.game.width-50, 135, 'blue_jay'); + this.blue_jay.anchor.setTo(.5,.5); + this.blue_jay.animations.add('swim2'); + this.blue_jay.animations.play('swim2', 10, true); + this.blue_jay.scale.setTo(0.6, 0.6); + this.blue_jay.name = "blue_jay"; + //this.pegions.body.velocity.x = -20; + this.gobothways(this.blue_jay); + } + + // + animateYeti(){ + this.yeti = this.add.sprite(this.game.width-15, this.game.height - 205, 'yeti_walk'); + this.yeti.anchor.setTo(.5,.5); + this.yeti.animations.add('swim2'); + this.yeti.animations.play('swim2', 5, true); + this.yeti.scale.setTo(-0.5, 0.5); + this.yeti.name = "yeti"; + var t = this.add.tween(this.yeti).to({ x: this.game.width-45, y: this.game.height - 205}, 2000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){ + this.yeti.animations.stop(null, true); + this.yeti.loadTexture('yeti_standing', 0); + this.yeti.inputEnabled = true; + this.yeti.events.onInputDown.addOnce(this.changeYetiLaugh, this); + }, this); + } + + changeYetiLaugh(){ + console.log("changed to laugh"); + this.yeti.loadTexture('yeti_laugh', 0); + this.yeti.animations.add('swim'); + this.yeti.animations.play('swim', 5, true); + this.yeti.events.onInputDown.addOnce(this.changeToStanding, this); + } + + changeToStanding(){ + console.log("changed to standing"); + this.yeti.loadTexture('yeti_standing', 0); + this.yeti.events.onInputDown.addOnce(this.changeYetiLaugh, this); + } + + + gobothways(b){ + + //console.log('reached: ' + "gobothways" + " " + b.name); + + var change_amount = Math.floor(this.rnd.realInRange(0, 150)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + + var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.game.height) || (pos_y < 70)){ + pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + var t, X, Y; + if(b.x > this.game.width){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000)) + t= this.add.tween(b).to({ x: X, y: pos_y}, 17500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + b.scale.x = -1*b.scale.x; + X = this.game.width + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000)) + t = this.add.tween(b).to({ x: X, y: pos_y }, 17500+Math.floor(this.rnd.realInRange(0, 5000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + //*/ + + + if((b.x >= 0) && (b.x <= this.game.width)){ + if(b.startingDirection == "leftToRight"){ + if(b.spriteFacesDirection == "left"){ + //going "leftToRight", animalSprite is "right facing" + b.scale.x = -1*b.scale.x; + } + + var speedMultiplier = (this.game.width + 100 - b.x)/(this.game.width + 100 + 100); + X = this.game.width + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000)) + t = this.add.tween(b).to({ x: X, y: pos_y }, speedMultiplier*(17500+Math.floor(this.rnd.realInRange(0, 5000))), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + }else{ + //going rightToLeft + if(b.spriteFacesDirection == "right"){ + b.scale.x = -1*b.scale.x; + } + var speedMultiplier = (b.x + 100)/(this.game.width + 100 + 100); + X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000)) + t= this.add.tween(b).to({ x: X, y: pos_y}, speedMultiplier*17500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + } + + + } + + stopFish(b) { + this.gobothways(b); + } + + gobothways2(b,duration){ + + var change_amount = Math.floor(this.rnd.realInRange(0, 150)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.height) || (pos_y < 70)){ + pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + var t, X, Y; + if(b.x > this.CANVAS_WIDTH){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000)) + t= this.add.tween(b).to({ x: X, y: pos_y}, duration, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + //console.log('left to right, ' + b.x); + b.scale.x = -1*b.scale.x; + X = this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000)) + t = this.add.tween(b).to({ x: X, y: pos_y }, duration, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + //*/ + + + } + + + + setTotalPoints(totalPoints){ + this.totalPoints = totalPoints; + } + + assignscope(componentObject){ + this.componentObject = componentObject; + } + + showunlockables(){ + console.log('treasure box clicked'); + this.componentObject.goToRewardsPage(); + } + + yourGamePausedFunc(){ + console.log("Game paused"); + if(this.game.lockRender == false) + this.game.lockRender = true; + } + + yourGameResumedFunc(){ + console.log("Game resumed"); + if(this.game.lockRender == true) + this.game.lockRender = false; + } +} + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/TundraLevelL5/Preloader.js": +/*!**********************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/TundraLevelL5/Preloader.js ***! + \**********************************************************************/ +/*! exports provided: PreloaderTundraL5 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloaderTundraL5", function() { return PreloaderTundraL5; }); +class PreloaderTundraL5 extends Phaser.State { + + preload(){ + + console.log("Preload called"); + this.input.addPointer(); + + + this.load.onLoadComplete.addOnce(this.onLoadComplete, this); + + this.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar'); + this.preloadBar.anchor.setTo(0.5, 0.5); + this.load.setPreloadSprite(this.preloadBar); + + //---- both aquariums + this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt'); + this.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points + this.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png'); + //this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20); + + this.add.text(0, 0, "hack", {font:"1px dumbo_regular", fill:"#FFFFFF"}); + this.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20); + this.load.image('points_progress_2', 'assets/img/points_progress_2.png'); + this.load.image('levels_progress', 'assets/img/levels_progress_2.png'); + this.load.image('streak_info', 'assets/img/streak_info_2.png'); + this.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20); + this.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20); + this.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20); + this.load.image('alt_icon', 'assets/img/heart.png'); + this.load.image('next_fish_icon', 'assets/img/fish_icon_2.png'); + this.load.image('meme_icon', 'assets/img/smiley_face.png'); + this.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20); + this.load.image('level_up_icon', 'assets/img/level_icon.png'); + this.load.image('level_up_2', 'assets/img/level_up_2.png'); + this.load.image('streak_green', 'assets/img/streak_green.png'); + this.load.image('streak_red', 'assets/img/streak_red_2.png'); + this.load.image('streak_grey', 'assets/img/streak_grey.png'); + this.load.image('star_point', 'assets/img/star.png'); + this.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json'); + + + this.load.image('diamond', 'assets/img/diamond.png'); + + + //---- + var next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png'; + this.load.image('clownfish_grey', next_fish); + + + var progressDisplay = 0; + var timerEvt = this.time.events.loop(100, function (){ + if(this.load.progress < 100){ + progressDisplay++; + console.log('loading... '+(this.load.progress)+'%' + "; " + (100*progressDisplay)); + }else{ + //loadingText.text = 'Ready, Go!'; + console.log('Ready, Go!'); + this.time.events.remove(timerEvt); + } + + }, this); + + + + //this.game.load.image('tundra1','assets/pics/bg-tundra.png'); + this.game.load.image('tundra1','assets/pics/bg-top-tundra.png'); + this.load.image('titlescreen', 'assets/pics/bg-bottom-tundra.png'); + + this.game.load.atlasJSONArray('penguin', 'assets/game/sprite/penguin_sprite.png', 'assets/game/sprite/penguin_sprite.json'); + this.game.load.atlasJSONArray('sea_lion_silver', 'assets/game/sprite/sea_lion_silver_sprite.png', 'assets/game/sprite/sea_lion_silver_sprite.json'); + this.game.load.atlasJSONArray('sea_lion_brown', 'assets/game/sprite/sea_lion_brown_sprite.png', 'assets/game/sprite/sea_lion_brown_sprite.json'); + this.game.load.atlasJSONArray('sea_lion_pink', 'assets/game/sprite/PinkSeal.png', 'assets/game/sprite/PinkSeal.json'); + // + this.game.load.atlasJSONArray('wolf_walk', 'assets/game/sprite/wolf_walk_sprite.png', 'assets/game/sprite/wolf_walk_sprite.json'); + + // + this.game.load.atlasJSONArray('bird_fly', 'assets/game/sprite/bird_tundra_sprite.png', 'assets/game/sprite/bird_tundra_sprite.json'); + this.game.load.atlasJSONArray('blue_jay', 'assets/game/sprite/BlueJay.png', 'assets/game/sprite/BlueJay.json'); + + // + this.game.load.atlasJSONArray('hare', 'assets/game/sprite/hare_tundra_sprite.png', 'assets/game/sprite/hare_tundra_sprite.json'); + this.game.load.atlasJSONArray('pingu', 'assets/game/sprite/pingu_tundra_sprite.png', 'assets/game/sprite/pingu_tundra_sprite.json'); + this.game.load.atlasJSONArray('coyote', 'assets/game/sprite/coyote_tundra_sprite.png', 'assets/game/sprite/coyote_tundra_sprite.json'); + + + + // + this.game.load.atlasJSONArray('grey_husky', 'assets/game/sprite/husky_grey_tundra_sprite.png', 'assets/game/sprite/husky_grey_tundra_sprite.json'); + this.game.load.atlasJSONArray('white_husky', 'assets/game/sprite/husky_white_tundra_sprite.png', 'assets/game/sprite/husky_white_tundra_sprite.json'); + + // + this.game.load.atlasJSONArray('yeti_walk', 'assets/game/sprite/yeti_walk_sprite.png', 'assets/game/sprite/yeti_walk_sprite.json'); + this.game.load.atlasJSONArray('yeti_laugh', 'assets/game/sprite/yeti_laugh_sprite.png', 'assets/game/sprite/yeti_laugh_sprite.json'); + + + // + this.game.load.atlasJSONArray('brown_bear', 'assets/game/sprite/brown_bear.png', 'assets/game/sprite/brown_bear.json'); + this.game.load.atlasJSONArray('rabbit', 'assets/game/sprite/rabbit.png', 'assets/game/sprite/rabbit.json'); + this.game.load.atlasJSONArray('reindeer', 'assets/game/sprite/reindeer.png', 'assets/game/sprite/reindeer.json'); + + // + this.game.load.atlasJSONArray('duck', 'assets/game/sprite/Duck.png', 'assets/game/sprite/Duck.json'); + this.game.load.atlasJSONArray('polar_bear_cub', 'assets/game/sprite/PolarBear.png', 'assets/game/sprite/PolarBear.json'); + + + // + this.game.load.atlasJSONArray('black_tundra_owl', 'assets/game/sprite/black_tundra_owl.png', 'assets/game/sprite/black_tundra_owl.json'); + this.game.load.atlasJSONArray('brown_tundra_owl', 'assets/game/sprite/brown_tundra_owl.png', 'assets/game/sprite/brown_tundra_owl.json'); + this.game.load.atlasJSONArray('grey_tundra_owl', 'assets/game/sprite/grey_tundra_owl.png', 'assets/game/sprite/grey_tundra_owl.json'); + //this.game.load.atlasJSONArray('light_brown_tundra_owl', 'assets/game/sprite/light_brown_tundra_owl.png', 'assets/game/sprite/light_brown_tundra_owl.json'); + this.game.load.atlasJSONArray('white_tundra_owl', 'assets/game/sprite/white_tundra_owl.png', 'assets/game/sprite/white_tundra_owl.json'); + + + //mountain goat + this.game.load.atlasJSONArray('black_mountain_goat', 'assets/game/sprite/black_mountain_goat.png', 'assets/game/sprite/black_mountain_goat.json'); + this.game.load.atlasJSONArray('brown_mountain_goat', 'assets/game/sprite/brown_mountain_goat.png', 'assets/game/sprite/brown_mountain_goat.json'); + this.game.load.atlasJSONArray('white_mountain_goat', 'assets/game/sprite/white_mountain_goat.png', 'assets/game/sprite/white_mountain_goat.json'); + + + // + this.load.image('treasure_tundra', 'assets/img/tundra_treasure_chest.png'); + + // + this.load.image('yeti_standing', 'assets/game/sprite/yeti_standing.png'); + + // + //this.load.image('snowgswitch', 'assets/img/snowglobe.png'); + this.load.image('snow_start', 'assets/img/start_snow.png'); + this.load.image('snow_end', 'assets/img/stop_snow.png'); + + // + this.game.load.spritesheet('snowflakes', 'assets/game/sprite/snowflakes.png', 17, 17); + //snowflakes.png + } + + create(){ + console.log("Preloader: create called"); + this.preloadBar.cropEnabled = false; + } + + update(){ + console.log("update: "+ 'TundraLevel1'); + this.state.start('TundraLevel1'); + } + + onLoadComplete(){ + console.log("Load complete"); + this.ready = true; + } + + +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/TundraLevelL51/Boot.js": +/*!******************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/TundraLevelL51/Boot.js ***! + \******************************************************************/ +/*! exports provided: BootTundraL51 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BootTundraL51", function() { return BootTundraL51; }); +class BootTundraL51 extends Phaser.State { + preload() { + this.load.image('preloaderBar', 'assets/img/loader_bar.png'); + } + + create() { + this.input.maxPointers = 1; + //-- https://github.com/photonstorm/phaser-ce/issues/32 + if(this.game.device.touch){ + this.input.mouse.stop(); + } + this.stage.disableVisibilityChange = false; + //this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; + this.scale.minWidth = 270; + this.scale.minHeight = 400; + this.scale.pageAlignHorizontally = true; + this.scale.pageAlignVertically = true; + this.stage.forcePortrait = true; + //this.scale.setScreenSize(true); + + this.input.addPointer(); + + //Change color here + //-- http://www.w3schools.com/colors/colors_picker.asp + this.stage.backgroundColor = '#ffffff'; + + this.state.start('Preloader'); + console.log("Boot completed"); + + } +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/TundraLevelL51/Game.js": +/*!******************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/TundraLevelL51/Game.js ***! + \******************************************************************/ +/*! exports provided: GameTundraL51 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GameTundraL51", function() { return GameTundraL51; }); +class GameTundraL51 extends Phaser.State { + + //componentObject; + constructor(){ + super(); + this.componentObject; + this.snowgswitch; + this.back_emitter; + this.mid_emitter; + this.yeti; + this.scaleFactor=0.8; + this.surveyHistory = []; + } + + // + create() { + + console.log("create called"); + + var s = this.game.add.sprite(0,0,'tundra1'); + s.rotation = 0.0; + var aspect_ratio = s.width/s.height; + s.height = this.game.height - 310; + s.width = s.height*aspect_ratio; + + //--- this is the bottom screen, blue water thing. + var titlescreen = this.add.image(0, this.game.height-60, 'titlescreen'); + titlescreen.scale.setTo(0.6, 0.6); + + this.CANVAS_WIDTH = window.innerWidth; + + // + this.height = this.game.height; + + //--- + //this.CANVAS_WIDTH = 382.0; + //if(window.innerWidth > this.CANVAS_WIDTH) + // this.CANVAS_WIDTH = window.innerWidth; + + //--- + //var timer = this.add.sprite(5, 40, 'timer', 1); + + //--- + /* + var fish_progress = this.add.image(175,50, 'clownfish_grey'); + fish_progress.scale.setTo(-0.3, 0.3); + fish_progress.anchor.setTo(.5,.5); + */ + + //--- + /* + var pouch = this.add.image(15,80, 'diamond'); + pouch.scale.setTo(0.4, 0.4); + pouch.anchor.setTo(.5,.5); + this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', "" + 2, 12); + */ + + // + /* + this.snowgswitch = this.add.image(5, 70, 'snowgswitch'); + this.snowgswitch.scale.setTo(0.15, 0.15); + this.snowgswitch.inputEnabled = true; + this.snowgswitch.events.onInputDown.addOnce(this.startsnowing, this); + */ + + + // + this.inputEnabled = false; + Phaser.Canvas.setTouchAction(this.game.canvas, "auto"); + this.game.input.touch.preventDefault = false; + + + //this.animateDuck(); + //this.animateSnowOwl(); + + + + // + var treasure = this.add.image(this.game.width/2, this.height-85, 'treasure_tundra'); + treasure.scale.setTo(-0.5*this.scaleFactor, 0.5*this.scaleFactor); + treasure.anchor.setTo(.5,.5); + treasure.inputEnabled = true; + treasure.events.onInputDown.add(this.showunlockables, this); + + // + this.addAnimals(); + + // + this.showProgressBars(); + + // + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + + // + this.game.onPause.add(this.yourGamePausedFunc, this); + this.game.onResume.add(this.yourGameResumedFunc, this); + + } + + showProgressBars(){ + + var current_points = this.totalPoints; + + //------ Left side + + + + //level info + //var levels_progress = this.add.image(5, 55, 'levels_progress'); + //levels_progress.scale.setTo(.27, .30); + + /* + // + var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0); + levels_progress.scale.setTo(0.95, 1.2); + + //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1); + var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1); + var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + //progress_sprite.anchor.setTo(0,0); + progress_sprite.scale.setTo(1,1.1); + + + var level_up_icon = this.add.image(18, 68, 'level_up_icon'); + level_up_icon.scale.setTo(.5, .5); + level_up_icon.anchor.setTo(.5, .5); + + var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite'); + info_level_progress.animations.add('swim'); + info_level_progress.animations.play('swim', 1, true); + info_level_progress.scale.setTo(0.3, 0.3); + info_level_progress.anchor.setTo(.5,.5); + info_level_progress.inputEnabled = true; + info_level_progress.events.onInputDown.add(function(){this.showInforBox("Info level progress bar clicked")}, this); + + + //progress_sprite.anchor.setTo(1,0); + //progress_sprite.scale.setTo(0.8,0.8); + */ + + var SCALING_FACTOR = 0.8; + + //streak_info + var streak_info = this.add.image(5, 5, 'streak_info'); + streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR); + + /* + var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite'); + info_level_streak.animations.add('swim'); + info_level_streak.animations.play('swim', 1, true); + info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR); + info_level_streak.anchor.setTo(.5,.5); + info_level_streak.inputEnabled = true; + info_level_streak.events.onInputDown.add(function(){this.showInforBox("Streak progress bar clicked")}, this); + */ + + var colors = []; //['grey','grey','grey','grey','grey','grey','grey']; + for(var i=0; i < this.surveyHistory.length; i++){ + if(this.surveyHistory[i] == 1) + colors[i] = 'green'; + else + colors[i] = 'grey'; + } + colors = colors.reverse() + + //console.log("this.surveyHistory " + this.surveyHistory); + console.log("colors " + colors); + //colors = ['green','green','green','green','grey','green','grey']; + var streak_tile; + for(var i=0; i < this.surveyHistory.length; i++){ + streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]); + streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR); + } + + + //------ Right side + //var progressBars = this.add.group(); + + //points bar + vertical_position_offset = 13; + var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2'); + points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR); + points_progress.anchor.setTo(1,0); + //progressBars.add(points_progress); + + //point text + var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, "" + this.totalPoints, {font:"20px dumbo_regular", fill:"#4c3d01"}); + points_text.anchor.setTo(0.5,0); + points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + //progressBars.add(points_text); + + var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point'); + star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR); + star_icon.anchor.setTo(.5, .5); + //progressBars.add(points_text); + + //progressBars.scale.setTo(.8, .8); + + /* + var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite'); + info_points.animations.add('swim'); + info_points.animations.play('swim', 1, true); + info_points.scale.setTo(0.3, 0.3); + info_points.anchor.setTo(.5,.5); + info_points.inputEnabled = true; + //function(){doAlert(textString) + info_points.events.onInputDown.add(function(){this.showInforBox("Info pregess bar cliccked 2")}, this); + */ + + + //points to get to next fish. + vertical_position_offset = 35; + var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1); + progress_bar_fish.anchor.setTo(1,0); + progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0); + var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point); + if(percent == 0) + percent = 0.05; + console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon'); + fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR); + fish_progress_icon.anchor.setTo(.5, .5); + + + + //points to get to meme. + var vertical_position_offset = 57; + + /* + var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1); + progress_bar_memes.anchor.setTo(1,0); + progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_memes = 0; + var total_number_of_memes = 31; + var already_shown_memes = window.localStorage["already_shown_memes3"]; + if(already_shown_memes == undefined) + already_shown_memes = [{"filename": "assets/memes/4.jpg", "unlock_date": "blah"}] + else + already_shown_memes = JSON.parse(window.localStorage["already_shown_memes3"]); + var currently_number_of_unlocked_memes = already_shown_memes.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_memes-start_number_of_memes)/ + (total_number_of_memes-start_number_of_memes); + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon'); + meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR); + meme_icon.anchor.setTo(.5, .5); + + + //points to get to alt message. + var vertical_position_offset = 79; + var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1); + progress_bar_altruism_message.anchor.setTo(1,0); + progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var start_number_of_alt_messages = 0; + var total_number_of_alt_messages = 21; + + var already_shown_altruism_msgs = window.localStorage["already_shown_alt_msg3"]; + if(already_shown_altruism_msgs == undefined) + already_shown_altruism_msgs = [{"filename": "assets/altruism/altruism_1.png", "unlock_date": "blah"}] + else + already_shown_altruism_msgs = JSON.parse(window.localStorage["already_shown_alt_msg3"]); + var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length; + + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/ + (total_number_of_alt_messages-start_number_of_alt_messages); + //if(percent < 0.05) + percent = percent*0.8 + 0.2; + rect.width = Math.max(0, percent * progress_sprite.width); + console.log("Alt Width, " + rect.width + "," + percent); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + + var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon'); + alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR); + alt_icon.anchor.setTo(.5, .5); + + + + //points to get to level up. + var vertical_position_offset = 101; + */ + + var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1); + progress_bar_level_up.anchor.setTo(1,0); + progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + // end of level is 1060, start is at 0 + var start_point_for_level = 2120; + var end_point_for_level = 3020; + progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0); + rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height); + percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level); + percent = percent*0.8 + 0.2; + //console.log("" + current_points + "," + this.previoous_fish_point + "," + this.next_fish_point + "," + percent); + rect.width = Math.max(0, percent * progress_sprite.width); + //console.log("Width, " + rect.width + "," + progress_sprite.width); + progress_sprite.crop(rect); + progress_sprite.anchor.setTo(1,0); + progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR); + + var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2'); + level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR); + level_up_2.anchor.setTo(.5, .5); + + + + + + + //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20); + //console.log("countdown.width " + this.countdown.width); + + + } + + setSurveyHistory(survey_history){ + console.log("survey_history " + survey_history + ", length: " + survey_history.length); + //this.surveyHistory = survey_history; + for(var i=0; i= data[i].points){ + drawing_order_enabled[data[i].name.valueOf()] = 1; + } + } + + + for(var key in drawing_order_enabled) { + + //means it is not included + if(drawing_order_enabled[key] == 0) + continue; + + + if(drawing_order_enabled[key] == 1){ + + //nemo + if(key === "Penguin") + this.animatePenguin(); + + if(key === "Seal") + this.animateSealion(); + + if(key === "Grey Wolf") + this.animateWolf(); + + if(key === "Brown Bear") + this.animateBear(); + + if(key === "Snow Bunting") + this.animateBirds(); + + if(key === "Hare") + this.animateHare(); + + if(key === "Pingu, the Penguin") + this.animatePingu(); + + //if(data[i].name.valueOf() === "Coyote") + // this.animateCoyote(); + + //if(data[i].name.valueOf() === "White Husky") + // this.animateWhiteHusky(); + + + if(key === "Snow") + this.animateSnow(); + + + if(key === "Grey Husky") + this.animateBrwonHusky(); + + if(key === "Yeti") + this.animateYeti(); + + + + if(key === "Reindeer") + this.animateReindeer(); + + + + if(key === "Snowy Owl") + this.animateSnowOwl(); + + + if(key === "Ducks") + this.animateDuck(); + + if(key === "Mountain goat") + this.animateMountainGoat(); + + if(key === "Blue Jay") + this.animateBlueJay(); + + /* + if(data[i].name.valueOf() === "Rabbit") + this.animateRabbit(); + */ + + } + } + + + //set the progres bar + this.previoous_fish_point = 0; + this.next_fish_point = 0; + for(var i = 0; i < data.length; i++) { + if(current_points < data[i].points){ + this.next_fish_point = data[i].points; + break; + }else{ + this.previoous_fish_point = data[i].points; + } + } + + /* + this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0); + var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height); + var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point); + console.log("" + current_points + "," + previoous_fish_point + "," + next_fish_point + "," + percent); + rect.width = Math.max(0, percent * this.progress_sprite.width); + + console.log("Width, " + rect.width + "," + this.progress_sprite.width); + this.progress_sprite.crop(rect); + */ + } + + animateSnow(){ + //console.log("snow button loaded"); + this.snowgswitch = this.add.image(5, 70, 'snow_start'); + this.snowgswitch.scale.setTo(0.6, 0.6); + this.snowgswitch.inputEnabled = true; + this.snowgswitch.events.onInputDown.addOnce(this.startsnowing, this); + } + + + + //-- Add Penguin + animatePenguin(){ + + console.log("Device pixel ratio is: " + window.devicePixelRatio) + + var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y; + starting_pos_x = -15; + starting_pos_y = this.game.height - 145; + ending_pos_x = 45; + ending_pos_y = this.game.height - 105; + scale_x = 0.25; + scale_y = 0.25; + + this.penguins = this.add.sprite(starting_pos_x, starting_pos_y, 'penguin'); + this.penguins.anchor.setTo(.5,.5); + this.penguins.animations.add('swim2'); + this.penguins.animations.play('swim2', 5, true); + this.penguins.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor); + this.penguins.name = "pegions"; + var t = this.add.tween(this.penguins).to({ x: ending_pos_x, y: ending_pos_y}, 1000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.penguins.animations.stop(null, true);}, this); + } + + //-- Add sea lion + animateSealion(){ + + var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y; + + + //---- sea lion silver + starting_pos_x = this.game.width+15; + starting_pos_y = this.game.height - 105; + ending_pos_x = this.game.width-65; + ending_pos_y = this.game.height - 105; + scale_x = 1.3; + scale_y = 1.3; + + this.sealion = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_silver'); + this.sealion.anchor.setTo(.5,.5); + this.sealion.animations.add('swim2'); + this.sealion.animations.play('swim2', 5, true); + this.sealion.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor); + this.sealion.name = "sea_lion_silver"; + var t = this.add.tween(this.sealion).to({ x: ending_pos_x, y: ending_pos_y}, 3000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion.animations.stop(null, true);}, this); + + + //---- sea lion brown + starting_pos_x = this.game.width+25; + starting_pos_y = this.game.height - 125; + ending_pos_x = this.game.width-45; + ending_pos_y = this.game.height - 125; + scale_x = 1.3; + scale_y = 1.3; + + this.sealion_brown = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_brown'); + this.sealion_brown.anchor.setTo(.5,.5); + this.sealion_brown.animations.add('swim2'); + this.sealion_brown.animations.play('swim2', 5, true); + this.sealion_brown.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor); + this.sealion_brown.name = "sea_lion_brown"; + var t = this.add.tween(this.sealion_brown).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion_brown.animations.stop(null, true);}, this); + + //---- sea lion pink + starting_pos_x = this.game.width+125; + starting_pos_y = this.game.height - 85; + ending_pos_x = this.game.width-25; + ending_pos_y = this.game.height - 85; + scale_x = 0.8; + scale_y = 0.8; + + this.sealion_pink = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_pink'); + this.sealion_pink.anchor.setTo(.5,.5); + this.sealion_pink.animations.add('swim2'); + this.sealion_pink.animations.play('swim2', 5, true); + this.sealion_pink.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor); + this.sealion_pink.name = "sea_lion_pink"; + var t = this.add.tween(this.sealion_pink).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion_pink.animations.stop(null, true);}, this); + + } + + // + animateDuck(){ + this.duck = this.add.sprite(this.game.width+15, this.game.height-20, 'duck'); + this.duck.anchor.setTo(.5,.5); + this.duck.animations.add('swim2'); + this.duck.animations.play('swim2', 3, true); + this.duck.scale.setTo(1, 1); + this.duck.name = "duck"; + this.gobothways(this.duck); + + this.duck2 = this.add.sprite(this.game.width+55, this.game.height-20, 'duck'); + this.duck2.anchor.setTo(.5,.5); + this.duck2.animations.add('swim2'); + this.duck2.animations.play('swim2', 3, true); + this.duck2.scale.setTo(1, 1); + this.duck2.name = "duck2"; + this.gobothways(this.duck2); + } + + animateBearCub(){ + //console.log("snow button loaded"); + this.polarBearCub = this.add.sprite(this.game.width+15, this.game.height - 290, 'polar_bear_cub'); + this.polarBearCub.anchor.setTo(.5,.5); + this.polarBearCub.animations.add('swim2'); + this.polarBearCub.animations.play('swim2', 3, true); + this.polarBearCub.scale.setTo(-0.8, 0.8); + this.polarBearCub.name = "polarBearCub"; + this.gobothways(this.polarBearCub); + } + + + + + // + animateSnowOwl(){ + // + this.black_tundra_owl = this.add.sprite(this.game.width-130, 195, 'black_tundra_owl'); + this.black_tundra_owl.anchor.setTo(.5,.5); + this.black_tundra_owl.animations.add('swim2'); + this.black_tundra_owl.animations.play('swim2', 5, true); + this.black_tundra_owl.scale.setTo(0.9*this.scaleFactor, 0.9*this.scaleFactor); + this.black_tundra_owl.name = "black_tundra_owl"; + this.gobothways(this.black_tundra_owl); + + + this.brown_tundra_owl = this.add.sprite(this.game.width-100, 200, 'brown_tundra_owl'); + this.brown_tundra_owl.anchor.setTo(.5,.5); + this.brown_tundra_owl.animations.add('swim2'); + this.brown_tundra_owl.animations.play('swim2', 5, true); + this.brown_tundra_owl.scale.setTo(0.9*this.scaleFactor, 0.9*this.scaleFactor); + this.brown_tundra_owl.name = "brown_tundra_owl"; + this.gobothways(this.brown_tundra_owl); + + + this.grey_tundra_owl = this.add.sprite(this.game.width-160, 205, 'grey_tundra_owl'); + this.grey_tundra_owl.anchor.setTo(.5,.5); + this.grey_tundra_owl.animations.add('swim2'); + this.grey_tundra_owl.animations.play('swim2', 5, true); + this.grey_tundra_owl.scale.setTo(0.9*this.scaleFactor, 0.9*this.scaleFactor); + this.grey_tundra_owl.name = "grey_tundra_owl"; + this.gobothways(this.grey_tundra_owl); + + /* + this.light_brown_tundra_owl = this.add.sprite(this.game.width-170, 180, 'light_brown_tundra_owl'); + this.light_brown_tundra_owl.anchor.setTo(.5,.5); + this.light_brown_tundra_owl.animations.add('swim2'); + this.light_brown_tundra_owl.animations.play('swim2', 5, true); + this.light_brown_tundra_owl.scale.setTo(0.9, 0.9); + this.light_brown_tundra_owl.name = "light_brown_tundra_owl"; + this.gobothways(this.light_brown_tundra_owl); + */ + + this.white_tundra_owl = this.add.sprite(this.game.width-200, 185, 'white_tundra_owl'); + this.white_tundra_owl.anchor.setTo(.5,.5); + this.white_tundra_owl.animations.add('swim2'); + this.white_tundra_owl.animations.play('swim2', 5, true); + this.white_tundra_owl.scale.setTo(0.9*this.scaleFactor, 0.9*this.scaleFactor); + this.white_tundra_owl.name = "white_tundra_owl"; + this.gobothways(this.white_tundra_owl); + + } + + // + animateMountainGoat(){ + var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y; + + + //---- sea lion silver + starting_pos_x = this.game.width/2-60; + starting_pos_y = this.game.height - 185 + 30; + ending_pos_x = this.game.width/2-15; + ending_pos_y = this.game.height - 185 + 30; + scale_x = 1.3; + scale_y = 1.3; + + this.black_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'black_mountain_goat'); + this.black_mountain_goat.anchor.setTo(.5,.5); + this.black_mountain_goat.animations.add('swim2'); + this.black_mountain_goat.animations.play('swim2', 3, true); + this.black_mountain_goat.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor); + this.black_mountain_goat.name = "black_mountain_goat"; + var t = this.add.tween(this.black_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 9000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.black_mountain_goat.animations.stop(null, true);}, this); + + + starting_pos_x = this.game.width-10; + starting_pos_y = this.game.height - 205 + 40; + ending_pos_x = this.game.width/2+50; + ending_pos_y = this.game.height - 205 + 40; + scale_x = -1.5; + scale_y = 1.5; + + this.white_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'white_mountain_goat'); + this.white_mountain_goat.anchor.setTo(.5,.5); + this.white_mountain_goat.animations.add('swim2'); + this.white_mountain_goat.animations.play('swim2', 3, true); + this.white_mountain_goat.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor); + this.white_mountain_goat.name = "white_mountain_goat"; + t = this.add.tween(this.white_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 15000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.white_mountain_goat.animations.stop(null, true);}, this); + + + starting_pos_x = this.game.width-10; + starting_pos_y = this.game.height - 175 + 40; + ending_pos_x = this.game.width/2+30; + ending_pos_y = this.game.height - 175 + 40; + scale_x = -1.2; + scale_y = 1.2; + + this.brown_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'brown_mountain_goat'); + this.brown_mountain_goat.anchor.setTo(.5,.5); + this.brown_mountain_goat.animations.add('swim2'); + this.brown_mountain_goat.animations.play('swim2', 3, true); + this.brown_mountain_goat.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor); + this.brown_mountain_goat.name = "brown_mountain_goat"; + t = this.add.tween(this.brown_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 9000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.brown_mountain_goat.animations.stop(null, true);}, this); + + /* + //---- sea lion brown + starting_pos_x = this.game.width+25; + starting_pos_y = this.game.height - 135; + ending_pos_x = this.game.width-45; + ending_pos_y = this.game.height - 135; + scale_x = 1.3; + scale_y = 1.3; + + this.sealion_brown = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_brown'); + this.sealion_brown.anchor.setTo(.5,.5); + this.sealion_brown.animations.add('swim2'); + this.sealion_brown.animations.play('swim2', 5, true); + this.sealion_brown.scale.setTo(scale_x, scale_y); + this.sealion_brown.name = "sea_lion_brown"; + var t = this.add.tween(this.sealion_brown).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion_brown.animations.stop(null, true);}, this); + + //---- sea lion pink + starting_pos_x = this.game.width+125; + starting_pos_y = this.game.height - 85; + ending_pos_x = this.game.width-25; + ending_pos_y = this.game.height - 85; + scale_x = 0.8; + scale_y = 0.8; + + this.sealion_pink = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_pink'); + this.sealion_pink.anchor.setTo(.5,.5); + this.sealion_pink.animations.add('swim2'); + this.sealion_pink.animations.play('swim2', 5, true); + this.sealion_pink.scale.setTo(scale_x, scale_y); + this.sealion_pink.name = "sea_lion_pink"; + var t = this.add.tween(this.sealion_pink).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){this.sealion_pink.animations.stop(null, true);}, this); + */ + } + + //--- add wolf animation. + animateWolf(){ + + var starting_pos_x, starting_pos_y, scale_x, scale_y; + + //---- wolf walk + starting_pos_x = this.game.width-100; + starting_pos_y = this.game.height-285; + scale_x = 0.8; + scale_y = 0.8; + + this.wolf = this.add.sprite(starting_pos_x, starting_pos_y, 'wolf_walk'); + //this.wolf = this.add.sprite(this.game.width+100, this.game.height-295, 'wolf_walk'); + this.wolf.anchor.setTo(.5,.5); + this.wolf.animations.add('swim'); + this.wolf.animations.play('swim', 3, true); + this.wolf.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor); + this.wolf.name = "wolf"; + this.wolf.startingDirection = "leftToRight"; + this.wolf.spriteFacesDirection = "right"; + this.gobothways(this.wolf); + } + + animateBear(){ + this.brown_bear = this.add.sprite(-200, this.game.height-325, 'brown_bear'); + this.brown_bear.anchor.setTo(.5,.5); + this.brown_bear.animations.add('swim'); + this.brown_bear.animations.play('swim', 6, true); + this.brown_bear.scale.setTo(-.15*this.scaleFactor, .15*this.scaleFactor); + this.brown_bear.name = "brown_bear"; + this.gobothways(this.brown_bear); + + this.animateBearCub(); + } + + + + // + animateBrwonHusky(){ + + this.white_husky = this.add.sprite(65, this.game.height - 205, 'white_husky'); + this.white_husky.anchor.setTo(.5,.5); + this.white_husky.animations.add('swim2'); + this.white_husky.animations.play('swim2',15, true); + this.white_husky.scale.setTo(0.35*this.scaleFactor, 0.35*this.scaleFactor); + this.white_husky.name = "white_husky"; + + + this.white_husky = this.add.sprite(65, this.game.height - 175, 'grey_husky'); + this.white_husky.anchor.setTo(.5,.5); + this.white_husky.animations.add('swim2'); + this.white_husky.animations.play('swim2',15, true); + this.white_husky.scale.setTo(0.35*this.scaleFactor, 0.35*this.scaleFactor); + this.white_husky.name = "grey_husky"; + } + + // + animatePingu(){ + this.pingu = this.add.sprite(105, this.game.height - 105, 'pingu'); + this.pingu.anchor.setTo(.5,.5); + this.pingu.animations.add('swim2'); + this.pingu.animations.play('swim2',4, true); + this.pingu.scale.setTo(0.35*this.scaleFactor, 0.35*this.scaleFactor); + this.pingu.name = "pingu"; + } + + + + animateRabbit(){ + this.rabbit = this.add.sprite(this.game.width+215, this.game.height-125, 'rabbit'); + this.rabbit.anchor.setTo(.5,.5); + this.rabbit.animations.add('swim2'); + this.rabbit.animations.play('swim2', 20, true); + this.rabbit.scale.setTo(-0.4, 0.4); + this.rabbit.name = "rabbit"; + this.gobothways(this.rabbit); + } + + + + + // + animateHare(){ + this.hare = this.add.sprite(this.game.width-115, this.game.height - 245, 'hare'); + this.hare.anchor.setTo(.5,.5); + this.hare.animations.add('swim2'); + this.hare.animations.play('swim2', 5, true); + this.hare.scale.setTo(0.4*this.scaleFactor, 0.4*this.scaleFactor); + this.hare.name = "hare"; + this.hare.startingDirection = "rightToLeft"; + this.hare.spriteFacesDirection = "right"; + this.gobothways(this.hare); + } + + + // + animateReindeer(){ + //this.reindeer = this.add.sprite(-115, this.game.height - 145, 'reindeer'); + this.reindeer = this.add.sprite(-75, this.game.height - 230, 'reindeer'); + this.reindeer.anchor.setTo(.5,.5); + this.reindeer.animations.add('swim2'); + this.reindeer.animations.play('swim2', 5, true); + this.reindeer.scale.setTo(-0.12*this.scaleFactor, 0.12*this.scaleFactor); + this.reindeer.name = "reindeer"; + this.gobothways(this.reindeer); + } + + + // + animateCoyote(){ + this.coyote = this.add.sprite(-115, this.game.height - 225, 'coyote'); + this.coyote.anchor.setTo(.5,.5); + this.coyote.animations.add('swim2'); + this.coyote.animations.play('swim2', 5, true); + this.coyote.scale.setTo(-1*this.scaleFactor, 1*this.scaleFactor); + this.coyote.name = "coyote"; + this.gobothways(this.coyote); + } + + + // + animateBirds(){ + this.birds = this.add.sprite(-50, 95, 'bird_fly'); + this.birds.anchor.setTo(.5,.5); + this.birds.animations.add('swim2'); + this.birds.animations.play('swim2', 5, true); + this.birds.scale.setTo(-0.3, 0.3); + this.birds.name = "birds"; + //this.pegions.body.velocity.x = -20; + this.gobothways(this.birds); + } + + + // + animateBlueJay(){ + this.blue_jay = this.add.sprite(this.game.width-50, 135, 'blue_jay'); + this.blue_jay.anchor.setTo(.5,.5); + this.blue_jay.animations.add('swim2'); + this.blue_jay.animations.play('swim2', 10, true); + this.blue_jay.scale.setTo(0.6*this.scaleFactor, 0.6*this.scaleFactor); + this.blue_jay.name = "blue_jay"; + //this.pegions.body.velocity.x = -20; + this.gobothways(this.blue_jay); + } + + // + animateYeti(){ + this.yeti = this.add.sprite(this.game.width-15, this.game.height - 190, 'yeti_walk'); + this.yeti.anchor.setTo(.5,.5); + this.yeti.animations.add('swim2'); + this.yeti.animations.play('swim2', 5, true); + this.yeti.scale.setTo(-0.5*this.scaleFactor, 0.5*this.scaleFactor); + this.yeti.name = "yeti"; + var t = this.add.tween(this.yeti).to({ x: this.game.width-45, y: this.game.height - 205}, 2000, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(function(){ + this.yeti.animations.stop(null, true); + this.yeti.loadTexture('yeti_standing', 0); + this.yeti.inputEnabled = true; + this.yeti.events.onInputDown.addOnce(this.changeYetiLaugh, this); + }, this); + } + + changeYetiLaugh(){ + console.log("changed to laugh"); + this.yeti.loadTexture('yeti_laugh', 0); + this.yeti.animations.add('swim'); + this.yeti.animations.play('swim', 5, true); + this.yeti.events.onInputDown.addOnce(this.changeToStanding, this); + } + + changeToStanding(){ + console.log("changed to standing"); + this.yeti.loadTexture('yeti_standing', 0); + this.yeti.events.onInputDown.addOnce(this.changeYetiLaugh, this); + } + + + gobothways(b){ + + //console.log('reached: ' + "gobothways" + " " + b.name); + + var change_amount = Math.floor(this.rnd.realInRange(0, 150)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + + var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.game.height) || (pos_y < 70)){ + pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + var t, X, Y; + if(b.x > this.game.width){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000)) + t= this.add.tween(b).to({ x: X, y: pos_y}, 17500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + b.scale.x = -1*b.scale.x; + X = this.game.width + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000)) + t = this.add.tween(b).to({ x: X, y: pos_y }, 17500+Math.floor(this.rnd.realInRange(0, 5000)), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + //*/ + + + if((b.x >= 0) && (b.x <= this.game.width)){ + if(b.startingDirection == "leftToRight"){ + if(b.spriteFacesDirection == "left"){ + //going "leftToRight", animalSprite is "right facing" + b.scale.x = -1*b.scale.x; + } + + var speedMultiplier = (this.game.width + 100 - b.x)/(this.game.width + 100 + 100); + X = this.game.width + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000)) + t = this.add.tween(b).to({ x: X, y: pos_y }, speedMultiplier*(17500+Math.floor(this.rnd.realInRange(0, 5000))), Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + }else{ + //going rightToLeft + if(b.spriteFacesDirection == "right"){ + b.scale.x = -1*b.scale.x; + } + var speedMultiplier = (b.x + 100)/(this.game.width + 100 + 100); + X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000)) + t= this.add.tween(b).to({ x: X, y: pos_y}, speedMultiplier*17500, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + } + + + } + + stopFish(b) { + this.gobothways(b); + } + + gobothways2(b,duration){ + + var change_amount = Math.floor(this.rnd.realInRange(0, 150)); + if(Math.floor(this.rnd.realInRange(0, 10))==2) + change_amount = 3*change_amount; + var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + while((pos_y > this.height) || (pos_y < 70)){ + pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount)); + } + + var t, X, Y; + if(b.x > this.CANVAS_WIDTH){ + //console.log('right to left, ' + b.x); + //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1); + b.scale.x = -1*b.scale.x; + X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000)) + t= this.add.tween(b).to({ x: X, y: pos_y}, duration, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + + if(b.x < 0){ + //console.log('left to right, ' + b.x); + b.scale.x = -1*b.scale.x; + X = this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000)) + t = this.add.tween(b).to({ x: X, y: pos_y }, duration, Phaser.Easing.Quadratic.InOut, true, 0); + t.onComplete.add(this.stopFish, this); + } + //*/ + + + } + + + + setTotalPoints(totalPoints){ + this.totalPoints = totalPoints; + } + + assignscope(componentObject){ + this.componentObject = componentObject; + } + + showunlockables(){ + console.log('treasure box clicked'); + this.componentObject.goToRewardsPage(); + } + + yourGamePausedFunc(){ + console.log("Game paused"); + if(this.game.lockRender == false) + this.game.lockRender = true; + } + + yourGameResumedFunc(){ + console.log("Game resumed"); + if(this.game.lockRender == true) + this.game.lockRender = false; + } +} + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/levels/TundraLevelL51/Preloader.js": +/*!***********************************************************************!*\ + !*** ./src/app/incentive/aquarium/levels/TundraLevelL51/Preloader.js ***! + \***********************************************************************/ +/*! exports provided: PreloaderTundraL51 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloaderTundraL51", function() { return PreloaderTundraL51; }); +class PreloaderTundraL51 extends Phaser.State { + + preload(){ + + console.log("Preload called"); + this.input.addPointer(); + + + this.load.onLoadComplete.addOnce(this.onLoadComplete, this); + + this.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar'); + this.preloadBar.anchor.setTo(0.5, 0.5); + this.load.setPreloadSprite(this.preloadBar); + + //---- both aquariums + this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt'); + this.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points + this.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png'); + + this.add.text(0, 0, "hack", {font:"1px dumbo_regular", fill:"#FFFFFF"}); + //this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20); + this.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20); + this.load.image('points_progress_2', 'assets/img/points_progress_2.png'); + this.load.image('levels_progress', 'assets/img/levels_progress_2.png'); + this.load.image('streak_info', 'assets/img/streak_info_2.png'); + this.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20); + this.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20); + this.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20); + this.load.image('alt_icon', 'assets/img/heart.png'); + this.load.image('next_fish_icon', 'assets/img/fish_icon_2.png'); + this.load.image('meme_icon', 'assets/img/smiley_face.png'); + this.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20); + this.load.image('level_up_icon', 'assets/img/level_icon.png'); + this.load.image('level_up_2', 'assets/img/level_up_2.png'); + this.load.image('streak_green', 'assets/img/streak_green.png'); + this.load.image('streak_red', 'assets/img/streak_red_2.png'); + this.load.image('streak_grey', 'assets/img/streak_grey.png'); + this.load.image('star_point', 'assets/img/star.png'); + this.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json'); + + + this.load.image('diamond', 'assets/img/diamond.png'); + + + //---- + var next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png'; + this.load.image('clownfish_grey', next_fish); + + + var progressDisplay = 0; + var timerEvt = this.time.events.loop(100, function (){ + if(this.load.progress < 100){ + progressDisplay++; + console.log('loading... '+(this.load.progress)+'%' + "; " + (100*progressDisplay)); + }else{ + //loadingText.text = 'Ready, Go!'; + console.log('Ready, Go!'); + this.time.events.remove(timerEvt); + } + + }, this); + + + + //this.game.load.image('tundra1','assets/pics/bg-tundra.png'); + this.game.load.image('tundra1','assets/pics/bg-top-tundra.png'); + this.load.image('titlescreen', 'assets/pics/bg-bottom-tundra.png'); + + this.game.load.atlasJSONArray('penguin', 'assets/game/sprite/penguin_sprite.png', 'assets/game/sprite/penguin_sprite.json'); + this.game.load.atlasJSONArray('sea_lion_silver', 'assets/game/sprite/sea_lion_silver_sprite.png', 'assets/game/sprite/sea_lion_silver_sprite.json'); + this.game.load.atlasJSONArray('sea_lion_brown', 'assets/game/sprite/sea_lion_brown_sprite.png', 'assets/game/sprite/sea_lion_brown_sprite.json'); + this.game.load.atlasJSONArray('sea_lion_pink', 'assets/game/sprite/PinkSeal.png', 'assets/game/sprite/PinkSeal.json'); + // + this.game.load.atlasJSONArray('wolf_walk', 'assets/game/sprite/wolf_walk_sprite.png', 'assets/game/sprite/wolf_walk_sprite.json'); + + // + this.game.load.atlasJSONArray('bird_fly', 'assets/game/sprite/bird_tundra_sprite.png', 'assets/game/sprite/bird_tundra_sprite.json'); + this.game.load.atlasJSONArray('blue_jay', 'assets/game/sprite/BlueJay.png', 'assets/game/sprite/BlueJay.json'); + + // + this.game.load.atlasJSONArray('hare', 'assets/game/sprite/hare_tundra_sprite.png', 'assets/game/sprite/hare_tundra_sprite.json'); + this.game.load.atlasJSONArray('pingu', 'assets/game/sprite/pingu_tundra_sprite.png', 'assets/game/sprite/pingu_tundra_sprite.json'); + this.game.load.atlasJSONArray('coyote', 'assets/game/sprite/coyote_tundra_sprite.png', 'assets/game/sprite/coyote_tundra_sprite.json'); + + + + // + this.game.load.atlasJSONArray('grey_husky', 'assets/game/sprite/husky_grey_tundra_sprite.png', 'assets/game/sprite/husky_grey_tundra_sprite.json'); + this.game.load.atlasJSONArray('white_husky', 'assets/game/sprite/husky_white_tundra_sprite.png', 'assets/game/sprite/husky_white_tundra_sprite.json'); + + // + this.game.load.atlasJSONArray('yeti_walk', 'assets/game/sprite/yeti_walk_sprite.png', 'assets/game/sprite/yeti_walk_sprite.json'); + this.game.load.atlasJSONArray('yeti_laugh', 'assets/game/sprite/yeti_laugh_sprite.png', 'assets/game/sprite/yeti_laugh_sprite.json'); + + + // + this.game.load.atlasJSONArray('brown_bear', 'assets/game/sprite/brown_bear.png', 'assets/game/sprite/brown_bear.json'); + this.game.load.atlasJSONArray('rabbit', 'assets/game/sprite/rabbit.png', 'assets/game/sprite/rabbit.json'); + this.game.load.atlasJSONArray('reindeer', 'assets/game/sprite/reindeer.png', 'assets/game/sprite/reindeer.json'); + + // + this.game.load.atlasJSONArray('duck', 'assets/game/sprite/Duck.png', 'assets/game/sprite/Duck.json'); + this.game.load.atlasJSONArray('polar_bear_cub', 'assets/game/sprite/PolarBear.png', 'assets/game/sprite/PolarBear.json'); + + + // + this.game.load.atlasJSONArray('black_tundra_owl', 'assets/game/sprite/black_tundra_owl.png', 'assets/game/sprite/black_tundra_owl.json'); + this.game.load.atlasJSONArray('brown_tundra_owl', 'assets/game/sprite/brown_tundra_owl.png', 'assets/game/sprite/brown_tundra_owl.json'); + this.game.load.atlasJSONArray('grey_tundra_owl', 'assets/game/sprite/grey_tundra_owl.png', 'assets/game/sprite/grey_tundra_owl.json'); + //this.game.load.atlasJSONArray('light_brown_tundra_owl', 'assets/game/sprite/light_brown_tundra_owl.png', 'assets/game/sprite/light_brown_tundra_owl.json'); + this.game.load.atlasJSONArray('white_tundra_owl', 'assets/game/sprite/white_tundra_owl.png', 'assets/game/sprite/white_tundra_owl.json'); + + + //mountain goat + this.game.load.atlasJSONArray('black_mountain_goat', 'assets/game/sprite/black_mountain_goat.png', 'assets/game/sprite/black_mountain_goat.json'); + this.game.load.atlasJSONArray('brown_mountain_goat', 'assets/game/sprite/brown_mountain_goat.png', 'assets/game/sprite/brown_mountain_goat.json'); + this.game.load.atlasJSONArray('white_mountain_goat', 'assets/game/sprite/white_mountain_goat.png', 'assets/game/sprite/white_mountain_goat.json'); + + + // + this.load.image('treasure_tundra', 'assets/img/tundra_treasure_chest.png'); + + // + this.load.image('yeti_standing', 'assets/game/sprite/yeti_standing.png'); + + // + //this.load.image('snowgswitch', 'assets/img/snowglobe.png'); + this.load.image('snow_start', 'assets/img/start_snow.png'); + this.load.image('snow_end', 'assets/img/stop_snow.png'); + + // + this.game.load.spritesheet('snowflakes', 'assets/game/sprite/snowflakes.png', 17, 17); + //snowflakes.png + } + + create(){ + console.log("Preloader: create called"); + this.preloadBar.cropEnabled = false; + } + + update(){ + console.log("update: "+ 'TundraLevel2'); + this.state.start('TundraLevel2'); + } + + onLoadComplete(){ + console.log("Load complete"); + this.ready = true; + } + + +} + +/***/ }), + +/***/ "./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.scss": +/*!*******************************************************************************************!*\ + !*** ./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.scss ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hcXVhcml1bS9tb2RhbC11bmxvY2tlZC1wYWdlL21vZGFsLXVubG9ja2VkLXBhZ2UuY29tcG9uZW50LnNjc3MifQ== */" + +/***/ }), + +/***/ "./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.ts": +/*!*****************************************************************************************!*\ + !*** ./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.ts ***! + \*****************************************************************************************/ +/*! exports provided: ModalUnlockedPageComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModalUnlockedPageComponent", function() { return ModalUnlockedPageComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); + + + + +var ModalUnlockedPageComponent = /** @class */ (function () { + function ModalUnlockedPageComponent(navParams, modalCtrl, userProfileService) { + this.modalCtrl = modalCtrl; + this.userProfileService = userProfileService; + // componentProps can also be accessed at construction time using NavParams + console.log(navParams.get('firstName')); + //this.reinforcements = [];//[{'img': "assets/img/" + "nemo" + '_tn.jpg', 'header': 'Nemo', 'text': "Do you know the animators of \"Finding nemo\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?"}]; + } + ModalUnlockedPageComponent.prototype.ngOnInit = function () { + }; + ModalUnlockedPageComponent.prototype.dismiss = function () { + //pass-data: https://ionicframework.com/docs/v3/api/components/modal/ModalController/ + //let data = { 'foo': 'bar' }; + //this.modalCtrl.dismiss(data); + this.modalCtrl.dismiss(); + }; + ModalUnlockedPageComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NavParams"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["ModalController"] }, + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"] } + ]; }; + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", Object) + ], ModalUnlockedPageComponent.prototype, "reinforcements", void 0); + ModalUnlockedPageComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-modal-unlocked-page', + template: __webpack_require__(/*! raw-loader!./modal-unlocked-page.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.html"), + styles: [__webpack_require__(/*! ./modal-unlocked-page.component.scss */ "./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NavParams"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["ModalController"], src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"]]) + ], ModalUnlockedPageComponent); + return ModalUnlockedPageComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.css": +/*!*****************************************************************************!*\ + !*** ./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.css ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL2Zpc2hib3dsL2Zpc2hib3dsLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvYXF1YXJpdW0vcHJldmlld3MvZmlzaGJvd2wvZmlzaGJvd2wuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.ts": +/*!****************************************************************************!*\ + !*** ./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.ts ***! + \****************************************************************************/ +/*! exports provided: FishbowlComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FishbowlComponent", function() { return FishbowlComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); + + + +var FishbowlComponent = /** @class */ (function () { + function FishbowlComponent(menuCtrl) { + this.menuCtrl = menuCtrl; + } + FishbowlComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + FishbowlComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] } + ]; }; + FishbowlComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-fishbowl', + template: __webpack_require__(/*! raw-loader!./fishbowl.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.html"), + styles: [__webpack_require__(/*! ./fishbowl.component.css */ "./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"]]) + ], FishbowlComponent); + return FishbowlComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/previews/rainforest/rainforest.component.css": +/*!*********************************************************************************!*\ + !*** ./src/app/incentive/aquarium/previews/rainforest/rainforest.component.css ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL3JhaW5mb3Jlc3QvcmFpbmZvcmVzdC5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0kscUJBQXFCO0FBQ3pCIiwiZmlsZSI6InNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL3JhaW5mb3Jlc3QvcmFpbmZvcmVzdC5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iXX0= */" + +/***/ }), + +/***/ "./src/app/incentive/aquarium/previews/rainforest/rainforest.component.ts": +/*!********************************************************************************!*\ + !*** ./src/app/incentive/aquarium/previews/rainforest/rainforest.component.ts ***! + \********************************************************************************/ +/*! exports provided: RainforestComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RainforestComponent", function() { return RainforestComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../demo-aquarium/demo-aquarium.component */ "./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts"); + + + + +var RainforestComponent = /** @class */ (function () { + function RainforestComponent(menuCtrl, navController) { + this.menuCtrl = menuCtrl; + this.navController = navController; + } + RainforestComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + RainforestComponent.prototype.goHome = function () { + /* + this.child.ionViewDidLeaveFunction(); + // Create an Observable that will publish a value on an interval + const secondsCounter2 = interval(1000).subscribe(n =>{ + console.log(`It's been ${n} seconds since subscribing!`); + secondsCounter2.unsubscribe(); + + }); + */ + this.navController.navigateRoot(['/home']); + }; + RainforestComponent.prototype.ionViewDidEnter = function () { + console.log("aqarium.ts --- ionViewDidEnter"); + //this.child.loadFunction(); + }; + RainforestComponent.prototype.ngAfterViewInit = function () { + /* + console.log("aqarium.ts --- ngAfterInit"); + console.log("aqarium.ts --- " + this.child); + //this.child.loadFunction(); + + // Create an Observable that will publish a value on an interval + const secondsCounter = interval(1000).subscribe(n =>{ + console.log(`It's been ${n} seconds since subscribing!`); + secondsCounter.unsubscribe(); + this.child.loadFunction(); + }); + */ + }; + RainforestComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NavController"] } + ]; }; + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])(_demo_aquarium_demo_aquarium_component__WEBPACK_IMPORTED_MODULE_3__["DemoAquariumComponent"], { static: true }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", Object) + ], RainforestComponent.prototype, "child", void 0); + RainforestComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-rainforest', + template: __webpack_require__(/*! raw-loader!./rainforest.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/previews/rainforest/rainforest.component.html"), + styles: [__webpack_require__(/*! ./rainforest.component.css */ "./src/app/incentive/aquarium/previews/rainforest/rainforest.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NavController"]]) + ], RainforestComponent); + return RainforestComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/previews/sea/sea.component.css": +/*!*******************************************************************!*\ + !*** ./src/app/incentive/aquarium/previews/sea/sea.component.css ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL3NlYS9zZWEuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hcXVhcml1bS9wcmV2aWV3cy9zZWEvc2VhLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */" + +/***/ }), + +/***/ "./src/app/incentive/aquarium/previews/sea/sea.component.ts": +/*!******************************************************************!*\ + !*** ./src/app/incentive/aquarium/previews/sea/sea.component.ts ***! + \******************************************************************/ +/*! exports provided: SeaComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SeaComponent", function() { return SeaComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); + + + +var SeaComponent = /** @class */ (function () { + function SeaComponent(menuCtrl) { + this.menuCtrl = menuCtrl; + } + SeaComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + SeaComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] } + ]; }; + SeaComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-sea', + template: __webpack_require__(/*! raw-loader!./sea.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/previews/sea/sea.component.html"), + styles: [__webpack_require__(/*! ./sea.component.css */ "./src/app/incentive/aquarium/previews/sea/sea.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"]]) + ], SeaComponent); + return SeaComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/aquarium/previews/tundra/tundra.component.css": +/*!*************************************************************************!*\ + !*** ./src/app/incentive/aquarium/previews/tundra/tundra.component.css ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL3R1bmRyYS90dW5kcmEuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hcXVhcml1bS9wcmV2aWV3cy90dW5kcmEvdHVuZHJhLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */" + +/***/ }), + +/***/ "./src/app/incentive/aquarium/previews/tundra/tundra.component.ts": +/*!************************************************************************!*\ + !*** ./src/app/incentive/aquarium/previews/tundra/tundra.component.ts ***! + \************************************************************************/ +/*! exports provided: TundraComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TundraComponent", function() { return TundraComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); + + + +var TundraComponent = /** @class */ (function () { + function TundraComponent(menuCtrl) { + this.menuCtrl = menuCtrl; + } + TundraComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + TundraComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] } + ]; }; + TundraComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-tundra', + template: __webpack_require__(/*! raw-loader!./tundra.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/aquarium/previews/tundra/tundra.component.html"), + styles: [__webpack_require__(/*! ./tundra.component.css */ "./src/app/incentive/aquarium/previews/tundra/tundra.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"]]) + ], TundraComponent); + return TundraComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/award-altruism/award-altruism.component.scss": +/*!************************************************************************!*\ + !*** ./src/app/incentive/award-altruism/award-altruism.component.scss ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hd2FyZC1hbHRydWlzbS9hd2FyZC1hbHRydWlzbS5jb21wb25lbnQuc2NzcyJ9 */" + +/***/ }), + +/***/ "./src/app/incentive/award-altruism/award-altruism.component.ts": +/*!**********************************************************************!*\ + !*** ./src/app/incentive/award-altruism/award-altruism.component.ts ***! + \**********************************************************************/ +/*! exports provided: AwardAltruismComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AwardAltruismComponent", function() { return AwardAltruismComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var src_app_storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/storage/aws-s3.service */ "./src/app/storage/aws-s3.service.ts"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + + + + +var AwardAltruismComponent = /** @class */ (function () { + function AwardAltruismComponent(route, userProfileService, awsS3Service, appUsageDb, router) { + this.route = route; + this.userProfileService = userProfileService; + this.awsS3Service = awsS3Service; + this.appUsageDb = appUsageDb; + this.router = router; + this.reinforcementObj = {}; + this.reinforcement_data = {}; + this.modalObjectNavigationExtras = {}; + this.pageTitle = " Award_Altruism"; + this.HeartsBackground = { + heartHeight: 60, + heartWidth: 64, + hearts: [], + imageNames: ['valentinesheart.png', 'blueflower.png', 'yellowrose.png', 'redflower.png', 'yellowflower.png'], + heartImage: './assets/img/', + //heartImage: './assets/img/petal.png', + maxHearts: 60, + minScale: 0.4, + draw: function () { + //this.setCanvasSize(); + this.ctx.clearRect(0, 0, this.w, this.h); + //console.log("Hearts draw function called"); + var ctx = this.ctx; + for (var i = 0; i < this.hearts.length; i++) { + var heart = this.hearts[i]; + heart.image = new Image(); + heart.image.style.height = heart.height; + heart.image.src = this.heartImage; + ctx.drawImage(heart.image, heart.x, heart.y, heart.width, heart.height); + } + this.move(); + }, + move: function () { + //console.log("Move function called"); + for (var b = 0; b < this.hearts.length; b++) { + var heart = this.hearts[b]; + heart.y += heart.ys; + if (heart.y > this.h) { + //heart.x = Math.random() * this.w; + //heart.y = -1 * this.heartHeight; + } + } + }, + angularDraw: function () { + //this.setCanvasSize(); + this.ctx.clearRect(0, 0, this.w, this.h); + //console.log("Hearts draw function called"); + var ctx = this.ctx; + for (var i = 0; i < this.hearts.length; i++) { + var heart = this.hearts[i]; + /* + heart.image = new Image(); + heart.image.style.height = heart.height; + heart.image.src = this.heartImage; + */ + ctx.drawImage(heart.image, heart.angle_x, heart.angle_y, heart.width, heart.height); + } + this.angularMove(); + }, + angularMove: function () { + //console.log("Move function called"); + for (var b = 0; b < this.hearts.length; b++) { + var heart = this.hearts[b]; + //heart.y += heart.ys; + //console.log("" + heart.angle_x + "," + heart.angle_y); + //console.log(heart.angle); + //console.log("" + heart.angle_x + "," + heart.angle_y + ", " + heart.angle_deltax + ", " + heart.angle_deltay); + heart.angle_x += heart.angle_deltax; + heart.angle_y += heart.angle_deltay; + //console.log("" + heart.angle_x + "," + heart.angle_y); + if (heart.y > this.h) { + //heart.x = Math.random() * this.w; + //heart.y = -1 * this.heartHeight; + } + } + }, + setCanvasSize: function () { + this.canvas.width = window.innerWidth; + this.canvas.height = window.innerHeight - 170; + console.log("Set canvas size function called"); + this.w = this.canvas.width; + this.h = this.canvas.height; + }, + initialize: function () { + var _this = this; + console.log("Initialize hearts"); + this.canvas = document.getElementById("hearts_canvas"); //$('#canvas')[0]; hearts_canvas + if (!this.canvas.getContext) + return; + this.setCanvasSize(); + this.ctx = this.canvas.getContext('2d'); + this.canvas.addEventListener("touchstart", function (event) { event.preventDefault(); }); + this.canvas.addEventListener("touchmove", function (event) { event.preventDefault(); }); + this.canvas.addEventListener("touchend", function (event) { event.preventDefault(); }); + this.canvas.addEventListener("touchcancel", function (event) { event.preventDefault(); }); + // Attach an event handler to the document + //this.canvas.addEventListener("mousemove", function(event) {event.preventDefault()}); + for (var a = 0; a < this.maxHearts; a++) { + var scale = (Math.random() * (1 - this.minScale)) + this.minScale; + this.hearts.push({ + x: Math.random() * this.w, + y: Math.random() * this.h, + ys: Math.random() + 8, + height: scale * this.heartHeight, + width: scale * this.heartWidth, + angle_x: this.w / 2, + angle_y: this.h / 2, + angle_deltax: this.getRandomArbitraryMoreThanX(-10, 10, 6), + angle_deltay: this.getRandomArbitraryMoreThanX(-10, 10, 6), + opacity: scale + }); + } + //setInterval($.proxy(this.draw, this), 30); + //setTimeout(e => this.draw, 30); + //this.draw(); + var intervalVar; + if (Math.random() > 0.5) { + //intervalVar = setInterval(e => this.angularDraw(), 30); + this.heartImage = this.heartImage + 'valentinesheart.png'; + } + else { + //intervalVar = setInterval(e => this.draw(), 30); + //choose an heart image everytime + var randomElement = this.imageNames[Math.floor(Math.random() * this.imageNames.length)]; + this.heartImage = this.heartImage + randomElement; + } + var image = new Image(); + image.src = this.heartImage; + var hearts = this.hearts; + var self_this = this; + image.onload = function () { + for (var a = 0; a < hearts.length; a++) { + hearts[a].image = image; + hearts[a].image.style.height = hearts[a].height; + } + intervalVar = setInterval(function (e) { return self_this.angularDraw(); }, 15); + }; + setTimeout(function (e) { return _this.stopInterval(intervalVar); }, 800); + }, + stopInterval: function (intervalVar) { + this.ctx.clearRect(0, 0, this.w, this.h); + clearInterval(intervalVar); + }, + getRandomArbitrary: function (min, max) { + return Math.random() * (max - min) + min; + }, + getRandomArbitraryMoreThanX: function (min, max, X) { + var rand_var = this.getRandomArbitrary(min, max); + if (Math.abs(rand_var) < X) { + if (rand_var < X) + return rand_var - X; + if (rand_var > X) + return rand_var + X; + } + else { + return rand_var; + } + } + }; + this.reinforcementObj['ds'] = 1; + this.reinforcementObj['reward'] = 2; + this.reinforcementObj['reward_type'] = 'altruistic message'; + } + AwardAltruismComponent.prototype.ngOnInit = function () { + var _this = this; + this.route.queryParams.subscribe(function (params) { + if (_this.router.getCurrentNavigation().extras.state) { + _this.date = _this.router.getCurrentNavigation().extras.state.date; + _this.reinforcementObj['prob'] = _this.router.getCurrentNavigation().extras.state.prob; + _this.reinforcement_data = _this.router.getCurrentNavigation().extras.state.reinforcement_data; + _this.modalObjectNavigationExtras = _this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras; + console.log("Inside AwardAltruism, date is: " + _this.date + " prob is: " + _this.reinforcementObj['prob']); + } + }); + }; + AwardAltruismComponent.prototype.ngAfterViewInit = function () { + var _this = this; + fetch('./assets/altruism/altruism_list.json').then(function (res) { return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](_this, void 0, void 0, function () { + var _a; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, res.json()]; + case 1: + _a.altruism_data = _b.sent(); + this.showaltruism(); + return [2 /*return*/]; + } + }); + }); }); + }; + AwardAltruismComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageEnter("award_altruism_msg"); + }; + AwardAltruismComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageExit("award_altruism_msg"); + }; + AwardAltruismComponent.prototype.showaltruism = function () { + var _this = this; + console.log('Altruism data: ' + JSON.stringify(this.altruism_data)); + this.altruism_data = this.shuffle(this.altruism_data); + //console.log('Altruism images suffled: ' + JSON.stringify(this.altruism_data)); + var picked_altruism_image = this.pick_altrusim(this.altruism_data); + //console.log('picked_altruism_image: ' + JSON.stringify(picked_altruism_image)); + var already_shown = window.localStorage["already_shown_alt_msg4"]; + if (already_shown == undefined) + already_shown = { + "last_updated": Date.now(), + "last_updated_readable_ts": moment__WEBPACK_IMPORTED_MODULE_5__().format("MMMM Do YYYY, h:mm:ss a Z"), + "unlocked_alt_msgs": [{ "filename": "assets/altruism/altruism_1.png", "unlock_date": moment__WEBPACK_IMPORTED_MODULE_5__().format('MM/DD/YYYY') }] + }; + else + already_shown = JSON.parse(window.localStorage["already_shown_alt_msg4"]); + console.log("already_shown: " + already_shown); + already_shown["last_updated"] = Date.now(); + already_shown["last_updated_readable_ts"] = moment__WEBPACK_IMPORTED_MODULE_5__().format("MMMM Do YYYY, h:mm:ss a Z"); + already_shown["unlocked_alt_msgs"].push({ "filename": "assets/altruism/" + picked_altruism_image[0]["filename"], "unlock_date": moment__WEBPACK_IMPORTED_MODULE_5__().format('MM/DD/YYYY') }); + window.localStorage["already_shown_alt_msg4"] = JSON.stringify(already_shown); + this.whichImage = "./assets/altruism/" + picked_altruism_image[0]["filename"]; + this.reinforcementObj['reward_img_link'] = "/altruism/" + picked_altruism_image[0]["filename"]; + this.reinforcement_data['reward_img_link'] = "/altruism/" + picked_altruism_image[0]["filename"]; + setTimeout(function (e) { return _this.drawImageOnCanvas(_this.whichImage); }, 200); + }; + AwardAltruismComponent.prototype.ratingChanged = function (rating) { + if (rating == 0) { + console.log("thumbs down"); + this.reinforcementObj['Like'] = "No"; + this.reinforcement_data['Like'] = "No"; + window.localStorage.setItem("Like", "No"); + this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); + } + else { + console.log("thumbs up"); + this.reinforcementObj['Like'] = "Yes"; + this.reinforcement_data['Like'] = "Yes"; + window.localStorage.setItem("Like", "Yes"); + this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); + } + this.userProfileService.addReinforcementData(this.date, this.reinforcementObj); + var navigationExtras = { + state: { + modalObjectNavigationExtras: this.modalObjectNavigationExtras + } + }; + this.router.navigate(['home'], navigationExtras); + }; + /** + * Shuffles array in place if it is not already shuffled + * @param {Array} a items An array containing the items. + */ + AwardAltruismComponent.prototype.shuffle = function (a) { + if (window.localStorage['altruism_shuffle6'] == undefined) { + // + var j, x, i; + for (i = a.length - 1; i > 0; i--) { + j = Math.floor(Math.random() * (i + 1)); + x = a[i]; + a[i] = a[j]; + a[j] = x; + } + // + window.localStorage['altruism_shuffle6'] = JSON.stringify(a); + return a; + } + else { + a = JSON.parse(window.localStorage['altruism_shuffle6']); + return a; + } + }; + /** + * Shuffles array in place if it is not already shuffled + * @param {Array} a items An array containing the items. + */ + AwardAltruismComponent.prototype.pick_altrusim = function (a) { + var picked_altruism = a.splice(0, 1); + a.push(picked_altruism[0]); + window.localStorage['altruism_shuffle6'] = JSON.stringify(a); + return picked_altruism; + }; + AwardAltruismComponent.prototype.drawImageOnCanvas = function (imageF_file_path) { + /* + // + var imageObj = new Image(); + imageObj.src = imageF_file_path; + + // + var drawingCanvas = document.getElementById("drawing_canvas"); + drawingCanvas.style.width = '100%'; + drawingCanvas.width = drawingCanvas.offsetWidth; + + var ctx = drawingCanvas.getContext('2d'); + + // + imageObj.onload = function () { + console.log("print: " + (imageObj.height/imageObj.width)); + drawingCanvas.height = Math.abs(drawingCanvas.width*(imageObj.height/imageObj.width)); + + ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle + 0, 0, drawingCanvas.width, drawingCanvas.height); // destination rectangle + + // + + } + */ + //this.HeartsBackground.initialize(drawingCanvas); + this.HeartsBackground.initialize(); + }; + AwardAltruismComponent.ctorParameters = function () { return [ + { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] }, + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"] }, + { type: src_app_storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_4__["AwsS3Service"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] } + ]; }; + AwardAltruismComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-award-altruism', + template: __webpack_require__(/*! raw-loader!./award-altruism.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/award-altruism/award-altruism.component.html"), + styles: [__webpack_require__(/*! ./award-altruism.component.scss */ "./src/app/incentive/award-altruism/award-altruism.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"], + src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"], + src_app_storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_4__["AwsS3Service"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"], + _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"]]) + ], AwardAltruismComponent); + return AwardAltruismComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/award-memes/award-memes.component.scss": +/*!******************************************************************!*\ + !*** ./src/app/incentive/award-memes/award-memes.component.scss ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "img {\n border: 2px solid black;\n top: 85px;\n position: absolute;\n width: 350px;\n margin: 5px;\n}\n\n#container {\n position: relative;\n}\n\n#link {\n position: absolute;\n top: 10px;\n left: 10px;\n}\n\n#drawing_canvas {\n position: absolute;\n margin: auto;\n width: 512px;\n height: 350px;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaW5jZW50aXZlL2F3YXJkLW1lbWVzL2F3YXJkLW1lbWVzLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9pbmNlbnRpdmUvYXdhcmQtbWVtZXMvYXdhcmQtbWVtZXMuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiO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ogMzUwcHg7XG4gIG1hcmdpbjogNXB4O1xufVxuXG4jY29udGFpbmVyIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xufVxuXG4jbGluayB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAxMHB4O1xuICBsZWZ0OiAxMHB4O1xufVxuXG4jZHJhd2luZ19jYW52YXMge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIG1hcmdpbjogYXV0bztcbiAgd2lkdGg6IDUxMnB4O1xuICBoZWlnaHQ6IDM1MHB4O1xuICB0b3A6IDA7XG4gIGJvdHRvbTogMDtcbiAgbGVmdDogMDtcbiAgcmlnaHQ6IDA7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/incentive/award-memes/award-memes.component.ts": +/*!****************************************************************!*\ + !*** ./src/app/incentive/award-memes/award-memes.component.ts ***! + \****************************************************************/ +/*! exports provided: AwardMemesComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AwardMemesComponent", function() { return AwardMemesComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var src_app_storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/storage/aws-s3.service */ "./src/app/storage/aws-s3.service.ts"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + + + + +var AwardMemesComponent = /** @class */ (function () { + //src="{{whichImage}}" + function AwardMemesComponent(route, userProfileService, awsS3Service, appUsageDb, router) { + this.route = route; + this.userProfileService = userProfileService; + this.awsS3Service = awsS3Service; + this.appUsageDb = appUsageDb; + this.router = router; + this.reinforcementObj = {}; + this.reinforcement_data = {}; + this.pageTitle = " Award_Meme"; + this.viewWidth = 512; + this.viewHeight = 350; + this.timeStep = (1 / 60); + this.modalObjectNavigationExtras = {}; + this.reinforcementObj['ds'] = 1; + this.reinforcementObj['reward'] = 1; + this.reinforcementObj['reward_type'] = 'meme'; + } + AwardMemesComponent.prototype.ngOnInit = function () { + var _this = this; + this.route.queryParams.subscribe(function (params) { + if (_this.router.getCurrentNavigation().extras.state) { + _this.date = _this.router.getCurrentNavigation().extras.state.date; + _this.reinforcementObj['prob'] = _this.router.getCurrentNavigation().extras.state.prob; + _this.reinforcement_data = _this.router.getCurrentNavigation().extras.state.reinforcement_data; + _this.modalObjectNavigationExtras = _this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras; + console.log("Inside AwardMemes, date is: " + _this.date + " prob is: " + _this.reinforcementObj['prob']); + } + }); + }; + AwardMemesComponent.prototype.ngAfterViewInit = function () { + var _this = this; + //var randomInt = Math.floor(Math.random() * 5) + 1; + //this.whichImage = "./assets/memes/"+randomInt+".jpg"; + //console.log('Reading local json files: ' + this.fileLink); + fetch('./assets/memes/memefile.json').then(function (res) { return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](_this, void 0, void 0, function () { + var _a; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_b) { + switch (_b.label) { + case 0: + _a = this; + return [4 /*yield*/, res.json()]; + case 1: + _a.meme_data = _b.sent(); + this.showmemes(); + return [2 /*return*/]; + } + }); + }); }); + }; + AwardMemesComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageEnter("award_meme"); + }; + AwardMemesComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageExit("award_meme"); + }; + AwardMemesComponent.prototype.showmemes = function () { + var _this = this; + //window.localStorage['meme_shuffle5'] = "[]"; + //var randomInt = Math.floor(Math.random() * this.meme_data.length); + //this.whichImage = "./assets/memes/"+this.meme_data[randomInt]["filename"]; + //console.log('Meme data: ' + JSON.stringify(this.meme_data)); + this.meme_data = this.shuffle(this.meme_data); + //console.log('Meme suffled: ' + JSON.stringify(this.meme_data)); + var picked_meme = this.pick_meme(this.meme_data); + var already_shown = window.localStorage["already_shown_memes4"]; + if (already_shown == undefined) + already_shown = { + "last_updated": Date.now(), + "last_updated_readable_ts": moment__WEBPACK_IMPORTED_MODULE_5__().format("MMMM Do YYYY, h:mm:ss a Z"), + "unlocked_memes": [{ "filename": "assets/memes/4.jpg", "unlock_date": moment__WEBPACK_IMPORTED_MODULE_5__().format('MM/DD/YYYY') }] + }; + else + already_shown = JSON.parse(window.localStorage["already_shown_memes4"]); + console.log("already_shown: " + already_shown); + already_shown["last_updated"] = Date.now(); + already_shown["last_updated_readable_ts"] = moment__WEBPACK_IMPORTED_MODULE_5__().format("MMMM Do YYYY, h:mm:ss a Z"); + already_shown["unlocked_memes"].push({ "filename": "assets/memes/" + picked_meme[0]["filename"], "unlock_date": moment__WEBPACK_IMPORTED_MODULE_5__().format('MM/DD/YYYY') }); + window.localStorage["already_shown_memes4"] = JSON.stringify(already_shown); + this.whichImage = "./assets/memes/" + picked_meme[0]["filename"]; + this.reinforcementObj['reward_img_link'] = "/memes/" + picked_meme[0]["filename"]; + this.reinforcement_data['reward_img_link'] = "/memes/" + picked_meme[0]["filename"]; + setTimeout(function (e) { return _this.drawImageOnCanvas(_this.whichImage); }, 200); + }; + AwardMemesComponent.prototype.ratingChanged = function (rating) { + if (rating == 0) { + //console.log("thumbs down"); + this.reinforcementObj['Like'] = "No"; + this.reinforcement_data['Like'] = "No"; + window.localStorage.setItem("Like", "No"); + this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); + } + else { + //console.log("thumbs up"); + this.reinforcementObj['Like'] = "Yes"; + this.reinforcement_data['Like'] = "Yes"; + window.localStorage.setItem("Like", "Yes"); + this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); + } + this.userProfileService.addReinforcementData(this.date, this.reinforcementObj); + var navigationExtras = { + state: { + modalObjectNavigationExtras: this.modalObjectNavigationExtras + } + }; + this.router.navigate(['home'], navigationExtras); + }; + /** + * Shuffles array in place if it is not already shuffled + * @param {Array} a items An array containing the items. + */ + AwardMemesComponent.prototype.shuffle = function (a) { + // + //console.log(window.localStorage['meme_shuffle5']); + if (window.localStorage['meme_shuffle6'] == undefined) { + // + var j, x, i; + for (i = a.length - 1; i > 0; i--) { + j = Math.floor(Math.random() * (i + 1)); + x = a[i]; + a[i] = a[j]; + a[j] = x; + //console.log(JSON.stringify(a[i][0]) + "," + JSON.stringify(a[j][0])); + //console.log('Meme data: ' + i + ", " + JSON.stringify(a)); + } + // + window.localStorage['meme_shuffle6'] = JSON.stringify(a); + return a; + } + else { + a = JSON.parse(window.localStorage['meme_shuffle6']); + return a; + } + }; + /** + * Shuffles array in place if it is not already shuffled + * @param {Array} a items An array containing the items. + */ + AwardMemesComponent.prototype.pick_meme = function (a) { + var picked_meme = a.splice(0, 1); + a.push(picked_meme[0]); + window.localStorage['meme_shuffle6'] = JSON.stringify(a); + return picked_meme; + }; + // + AwardMemesComponent.prototype.initDrawingCanvas = function () { + /* + this.drawingCanvas.style.width = '100%'; + this.drawingCanvas.width = this.drawingCanvas.offsetWidth; + this.drawingCanvas.style.height = '90%'; + this.ctx = this.drawingCanvas.getContext('2d'); + */ + //createLoader(); + //createExploader(); + //createParticles(); + }; + AwardMemesComponent.prototype.drawImageOnCanvas = function (imageF_file_path) { + /* + // + var imageObj = new Image(); + imageObj.src = imageF_file_path; + + // + var drawingCanvas = document.getElementById("drawing_canvas"); + drawingCanvas.style.width = '100%'; + drawingCanvas.width = drawingCanvas.offsetWidth; + + var ctx = drawingCanvas.getContext('2d'); + + // + imageObj.onload = function () { + console.log("print: " + (imageObj.height/imageObj.width)); + drawingCanvas.height = Math.abs(drawingCanvas.width*(imageObj.height/imageObj.width)); + + ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle + 0, 0, drawingCanvas.width, drawingCanvas.height); // destination rectangle + + // + + } + */ + //this.HeartsBackground.initialize(drawingCanvas); + this.drawConfetti(); + }; + //draws confetti + AwardMemesComponent.prototype.drawConfetti = function () { + var canvas = document.getElementById("hearts_canvas"); //$('#canvas')[0]; hearts_canvas + //https://www.kirilv.com/canvas-confetti/ + // you should only initialize a canvas once, so save this function + // we'll save it to the canvas itself for the purpose of this demo + //@ts-ignore + canvas.confetti = canvas.confetti || confetti.create(canvas, { resize: true }); + canvas.width = window.innerWidth; + canvas.height = window.innerHeight - 170; + /* + canvas.confetti({ + angle: this.randomInRange(55, 125), + spread: this.randomInRange(50, 70), + particleCount: this.randomInRange(50, 100), + origin: { y: 0.6, x: 0.5 } + }); + */ + // + if (Math.random() > 0.5) + this.drawRealisticConfetti(canvas); + else + this.drawConfettiFireworks(canvas); + }; + AwardMemesComponent.prototype.drawConfettiFireworks = function (canvas) { + var duration = 1 * 1200; + var animationEnd = Date.now() + duration; + var defaults = { startVelocity: 30, spread: 100, ticks: 60, zIndex: 0 }; + function randomInRange(min, max) { + return Math.random() * (max - min) + min; + } + var interval = setInterval(function () { + var timeLeft = animationEnd - Date.now(); + if (timeLeft <= 0) { + return clearInterval(interval); + } + var particleCount = 50 * (timeLeft / duration); + // since particles fall down, start a bit higher than random + canvas.confetti(Object.assign({}, defaults, { particleCount: particleCount, origin: { x: randomInRange(0.2, 0.4), y: Math.random() - 0.0 } })); + canvas.confetti(Object.assign({}, defaults, { particleCount: particleCount, origin: { x: randomInRange(0.6, 0.8), y: Math.random() - 0.0 } })); + }, 250); + }; + AwardMemesComponent.prototype.drawConfettiVanillaDirection = function (canvas) { + canvas.confetti({ + particleCount: 100, + spread: 70, + origin: { y: 0.5, x: 0.5 } + }); + }; + AwardMemesComponent.prototype.drawConfettiRandomDirection = function (canvas) { + canvas.confetti({ + angle: this.randomInRange(55, 125), + spread: this.randomInRange(50, 70), + particleCount: this.randomInRange(50, 100), + origin: { y: 0.5, x: 0.5 } + }); + }; + AwardMemesComponent.prototype.drawRealisticConfetti = function (canvas) { + this.confettiFire(0.25, { + spread: 26, + startVelocity: 100, + }, canvas); + this.confettiFire(0.2, { + spread: 60, + }, canvas); + this.confettiFire(0.35, { + spread: 100, + decay: 0.99, + }, canvas); + this.confettiFire(0.1, { + spread: 120, + startVelocity: 100, + decay: 0.99, + }, canvas); + this.confettiFire(0.1, { + spread: 120, + startVelocity: 100, + }, canvas); + // + setTimeout(function () { + canvas.confetti.reset(); + }, 1200); + }; + AwardMemesComponent.prototype.confettiFire = function (particleRatio, opts, canvas) { + var count = 200; + var defaults = { + origin: { y: 0.8 } + }; + canvas.confetti(Object.assign({}, defaults, opts, { + particleCount: Math.floor(count * particleRatio) + })); + }; + AwardMemesComponent.prototype.randomInRange = function (min, max) { + return Math.random() * (max - min) + min; + }; + AwardMemesComponent.ctorParameters = function () { return [ + { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] }, + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"] }, + { type: src_app_storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_4__["AwsS3Service"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] } + ]; }; + AwardMemesComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-award-memes', + template: __webpack_require__(/*! raw-loader!./award-memes.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/award-memes/award-memes.component.html"), + styles: [__webpack_require__(/*! ./award-memes.component.scss */ "./src/app/incentive/award-memes/award-memes.component.scss")] + }) + //declare let confetti: any; + , + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"], + src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"], + src_app_storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_4__["AwsS3Service"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"], + _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"]]) + ], AwardMemesComponent); + return AwardMemesComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/award-money/award-dollar.service.ts": +/*!***************************************************************!*\ + !*** ./src/app/incentive/award-money/award-dollar.service.ts ***! + \***************************************************************/ +/*! exports provided: AwardDollarService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AwardDollarService", function() { return AwardDollarService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); + + + + +var AwardDollarService = /** @class */ (function () { + function AwardDollarService(userProfileService) { + this.userProfileService = userProfileService; + } + AwardDollarService.prototype.getCurrentlyEarnedDollars = function () { + /* + * + * load current dollar amount user earned from local storage, + * and if "undefined" (i.e.,user likely didn't earn anything) then assign value to zero. + * + * This function is called from dynamic-survey to update the current dollar amount. + * + */ + if (window.localStorage['AwardDollar'] == undefined) + this.usersCurrentDollars = 0; + else + this.usersCurrentDollars = parseInt(window.localStorage['AwardDollar']); + return this.usersCurrentDollars; + }; + AwardDollarService.prototype.giveDollars = function () { + /* + * + * Called after survey is completed. + * Gives participants money, based on three cretia. + * + * Returns the total amount user has currently earned in total amount. + * + */ + var dailySurveyHistory = this.userProfileService.userProfile.survey_data.daily_survey; + /* + * + * Scenario 1: + * + * If user completed survey on the first day of the study then reward 2 dollars. + * + * Since this case can't include a 3-day streak or a pause, so return this current amount + * + */ + //get the first date, by iterating through all dates and find the smallest one. + var firstDateSurveyIsCompleted = moment__WEBPACK_IMPORTED_MODULE_2__().format('YYYYMMDD'); + var timestampeForFirstDataSurveyIsCompleted = moment__WEBPACK_IMPORTED_MODULE_2__(firstDateSurveyIsCompleted, "YYYYMMDD"); + var timestampDateForASurveyCompleted; + for (var dateForASurveyCompleted in dailySurveyHistory) { + timestampDateForASurveyCompleted = moment__WEBPACK_IMPORTED_MODULE_2__(dateForASurveyCompleted, "YYYYMMDD"); + if (timestampDateForASurveyCompleted < timestampeForFirstDataSurveyIsCompleted) { + firstDateSurveyIsCompleted = dateForASurveyCompleted; + timestampeForFirstDataSurveyIsCompleted = moment__WEBPACK_IMPORTED_MODULE_2__(firstDateSurveyIsCompleted, "YYYYMMDD"); + } + } + // If today is the first day then award 2 dollars for survey completion; + // else load the last day, current amout user earned + var todaysDate = moment__WEBPACK_IMPORTED_MODULE_2__().format('YYYYMMDD'); + if (todaysDate == firstDateSurveyIsCompleted) { + this.usersCurrentDollars = 2; + //save the dollar ammount in local storage + window.localStorage.setItem("AwardDollar", "" + this.usersCurrentDollars); + return this.usersCurrentDollars; + } + else + this.usersCurrentDollars = parseInt(window.localStorage['AwardDollar']); + /* + * + * Scenario 2: + * + * If survey is paused, and user comes back after >= 14 days, then give then extra 2 dollars + * after they complete the survey. + * + */ + // + // Get the dates when survey is turned on. This only contains days + // that the survey on button was physically clicked. + // + var onDatesSurveyIsTurnedOn = this.userProfileService.userProfileFixed.onDates; + // + // set the last date to today, if 'onDatesSurveyPauseStarted' are not empty, will set it + // to be the last date in 'onDatesSurveyPauseStarted'. + // + var maxDateInOnDatesSurveyIsTurnedOn = moment__WEBPACK_IMPORTED_MODULE_2__().format('YYYY-MM-DD'); + ; + var timestampForLastDate = moment__WEBPACK_IMPORTED_MODULE_2__("1970-01-01", "YYYY-MM-DD"); + var timestampDateFor_date; + for (var _date in onDatesSurveyIsTurnedOn) { + timestampDateFor_date = moment__WEBPACK_IMPORTED_MODULE_2__(_date, "YYYY-MM-DD"); + if (timestampDateFor_date > timestampForLastDate) { + maxDateInOnDatesSurveyIsTurnedOn = _date; + timestampForLastDate = moment__WEBPACK_IMPORTED_MODULE_2__(maxDateInOnDatesSurveyIsTurnedOn, "YYYY-MM-DD"); + } + } + var day14BeforeToday = moment__WEBPACK_IMPORTED_MODULE_2__().subtract(14, "days").format("YYYY-MM-DD"); + var timestampDay14BeforeToday = moment__WEBPACK_IMPORTED_MODULE_2__(day14BeforeToday, "YYYY-MM-DD"); + var timestampMaxDateInOnDatesSurveyIsTurnedOn = moment__WEBPACK_IMPORTED_MODULE_2__(maxDateInOnDatesSurveyIsTurnedOn, "YYYY-MM-DD"); + // if 14-day before today is more than (i.e., after) timestampMaxDateInOnDatesSurveyIsTurnedOn + // then user has come back after 14 days. + if (timestampDay14BeforeToday.isAfter(timestampMaxDateInOnDatesSurveyIsTurnedOn)) { + this.usersCurrentDollars = this.usersCurrentDollars + 2; + //save the dollar ammount in local storage + window.localStorage.setItem("AwardDollar", "" + this.usersCurrentDollars); + return this.usersCurrentDollars; + } + /* + * + * Scenario 3: + * + * Give money for a three-day streak of survey completion, that does not include + * scenario 1 and 2. (Ideally scenario 1,2,3 are mutually exclusive). + * + */ + this.users3DayStreakHistory = window.localStorage["AwardDollarDates"]; + if ((this.users3DayStreakHistory == undefined) || (JSON.parse(this.users3DayStreakHistory) == null)) { + /* + * Means, no history exist for 3-day, so start a streak with the current date. + */ + this.users3DayStreakHistory = {}; + this.users3DayStreakHistory['dates'] = [moment__WEBPACK_IMPORTED_MODULE_2__().format("DD-MM-YYYY")]; + window.localStorage.setItem("AwardDollarDates", JSON.stringify(this.users3DayStreakHistory)); + } + else { + this.users3DayStreakHistory = JSON.parse(window.localStorage["AwardDollarDates"]); + if (this.users3DayStreakHistory['dates'].length < 2) { + /* + * see if previous date exist in the current 'users3DayStreakHistory' + * If not then clean 'users3DayStreakHistory' and start a new streak. + */ + var previousDate = moment__WEBPACK_IMPORTED_MODULE_2__().subtract(1, "days").format("DD-MM-YYYY"); + var dates = this.users3DayStreakHistory["dates"]; + var dateIndex = dates.indexOf(previousDate); + if (dateIndex > -1) { + //previous date exist, we will pushing the current date and extend the streak. + this.users3DayStreakHistory['dates'].push(moment__WEBPACK_IMPORTED_MODULE_2__().format("DD-MM-YYYY")); + } + else { + // if the date saved is not the previous day of today, remove it + // save current date to users3DayStreakHistory. This means a new streak has started. + this.users3DayStreakHistory['dates'] = [moment__WEBPACK_IMPORTED_MODULE_2__().format("DD-MM-YYYY")]; + } + window.localStorage.setItem("AwardDollarDates", JSON.stringify(this.users3DayStreakHistory)); + // no money here now since the streak length it most 2 here. + } + else { + /* + * see if previous date exist in the current 'users3DayStreakHistory' + * If not then clean 'users3DayStreakHistory' and start a new streak. + */ + var previousDate = moment__WEBPACK_IMPORTED_MODULE_2__().subtract(1, "days").format("DD-MM-YYYY"); + var dates = this.users3DayStreakHistory["dates"]; + var dateIndex = dates.indexOf(previousDate); + if (dateIndex > -1) { + //means a streak has been completed, so award one dollar, remove all dates + this.usersCurrentDollars = this.usersCurrentDollars + 1; + //empty users3DayStreakHistory by making it null, and we will start a new streak. + window.localStorage.removeItem('AwardDollarDates'); + } + else { + //the previous day is not in the array, means that we must have skipped the previous day, + //Save current date to AwardDollarDates to start a new streak. + this.users3DayStreakHistory['dates'] = [moment__WEBPACK_IMPORTED_MODULE_2__().format("DD-MM-YYYY")]; + window.localStorage.setItem("AwardDollarDates", JSON.stringify(this.users3DayStreakHistory)); + } + } + } + //save the dollar ammount in local storage + window.localStorage.setItem("AwardDollar", "" + this.usersCurrentDollars); + return this.usersCurrentDollars; + }; + AwardDollarService.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"] } + ]; }; + AwardDollarService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"]]) + ], AwardDollarService); + return AwardDollarService; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/incentive.actions.ts": +/*!************************************************!*\ + !*** ./src/app/incentive/incentive.actions.ts ***! + \************************************************/ +/*! exports provided: surveyCompletedRegisterUnlocked, unlockedScreenShownAlready */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "surveyCompletedRegisterUnlocked", function() { return surveyCompletedRegisterUnlocked; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unlockedScreenShownAlready", function() { return unlockedScreenShownAlready; }); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); + +var surveyCompletedRegisterUnlocked = Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["createAction"])("[Survey Page] Survey Completed. Register Unlocked.", Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["props"])()); +var unlockedScreenShownAlready = Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["createAction"])("[Main Page] Survey already shown.", Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["props"])()); + + +/***/ }), + +/***/ "./src/app/incentive/incentive.module.ts": +/*!***********************************************!*\ + !*** ./src/app/incentive/incentive.module.ts ***! + \***********************************************/ +/*! exports provided: IncentiveModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IncentiveModule", function() { return IncentiveModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _award_memes_award_memes_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./award-memes/award-memes.component */ "./src/app/incentive/award-memes/award-memes.component.ts"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _treasurechest_treasurechest_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./treasurechest/treasurechest.component */ "./src/app/incentive/treasurechest/treasurechest.component.ts"); +/* harmony import */ var _award_altruism_award_altruism_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./award-altruism/award-altruism.component */ "./src/app/incentive/award-altruism/award-altruism.component.ts"); +/* harmony import */ var _aquarium_modal_unlocked_page_modal_unlocked_page_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./aquarium/modal-unlocked-page/modal-unlocked-page.component */ "./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.ts"); +/* harmony import */ var _info_page_info_page_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./info-page/info-page.component */ "./src/app/incentive/info-page/info-page.component.ts"); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); +/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./reducers */ "./src/app/incentive/reducers/index.ts"); +/* harmony import */ var _unlocked_memes_unlocked_memes_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./unlocked-memes/unlocked-memes.component */ "./src/app/incentive/unlocked-memes/unlocked-memes.component.ts"); +/* harmony import */ var _unlocked_altuistic_messages_unlocked_altuistic_messages_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./unlocked-altuistic-messages/unlocked-altuistic-messages.component */ "./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.ts"); +/* harmony import */ var _aquarium_previews_fishbowl_fishbowl_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./aquarium/previews/fishbowl/fishbowl.component */ "./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.ts"); +/* harmony import */ var _aquarium_previews_sea_sea_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./aquarium/previews/sea/sea.component */ "./src/app/incentive/aquarium/previews/sea/sea.component.ts"); +/* harmony import */ var _aquarium_previews_tundra_tundra_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./aquarium/previews/tundra/tundra.component */ "./src/app/incentive/aquarium/previews/tundra/tundra.component.ts"); +/* harmony import */ var _unlocked_inspirational_quotes_unlocked_inspirational_quotes_component__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./unlocked-inspirational-quotes/unlocked-inspirational-quotes.component */ "./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.ts"); +/* harmony import */ var _video_info_page_video_info_page_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./video-info-page/video-info-page.component */ "./src/app/incentive/video-info-page/video-info-page.component.ts"); +/* harmony import */ var _life_insights_sample_python_view_sample_python_view_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./life-insights/sample-python-view/sample-python-view.component */ "./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.ts"); + + + + +//import { AwardComponent } from './award/award.component'; + +//import { VisualizationComponent } from './visualization/visualization.component'; +//import { DemoAquariumComponent } from './aquarium/demo-aquarium/demo-aquarium.component'; +//import { SurveyModule } from '../survey/survey.module'; + + + + + + + + + + + + + + + +var routes = [ + // { path: 'award', component: AwardComponent }, + { path: 'award-memes', component: _award_memes_award_memes_component__WEBPACK_IMPORTED_MODULE_4__["AwardMemesComponent"] }, +]; +var IncentiveModule = /** @class */ (function () { + function IncentiveModule() { + } + IncentiveModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [_award_memes_award_memes_component__WEBPACK_IMPORTED_MODULE_4__["AwardMemesComponent"], _award_altruism_award_altruism_component__WEBPACK_IMPORTED_MODULE_7__["AwardAltruismComponent"], _treasurechest_treasurechest_component__WEBPACK_IMPORTED_MODULE_6__["TreasurechestComponent"], + _aquarium_modal_unlocked_page_modal_unlocked_page_component__WEBPACK_IMPORTED_MODULE_8__["ModalUnlockedPageComponent"], _info_page_info_page_component__WEBPACK_IMPORTED_MODULE_9__["InfoPageComponent"], _unlocked_memes_unlocked_memes_component__WEBPACK_IMPORTED_MODULE_12__["UnlockedMemesComponent"], _unlocked_altuistic_messages_unlocked_altuistic_messages_component__WEBPACK_IMPORTED_MODULE_13__["UnlockedAltuisticMessagesComponent"], + _aquarium_previews_fishbowl_fishbowl_component__WEBPACK_IMPORTED_MODULE_14__["FishbowlComponent"], _aquarium_previews_sea_sea_component__WEBPACK_IMPORTED_MODULE_15__["SeaComponent"], _aquarium_previews_tundra_tundra_component__WEBPACK_IMPORTED_MODULE_16__["TundraComponent"], _unlocked_inspirational_quotes_unlocked_inspirational_quotes_component__WEBPACK_IMPORTED_MODULE_17__["UnlockedInspirationalQuotesComponent"], _video_info_page_video_info_page_component__WEBPACK_IMPORTED_MODULE_18__["VideoInfoPageComponent"], + _life_insights_sample_python_view_sample_python_view_component__WEBPACK_IMPORTED_MODULE_19__["SamplePythonViewComponent"] + ], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["IonicModule"].forRoot(), + _angular_router__WEBPACK_IMPORTED_MODULE_5__["RouterModule"].forChild(routes), + _ngrx_store__WEBPACK_IMPORTED_MODULE_10__["StoreModule"].forFeature('incentive', _reducers__WEBPACK_IMPORTED_MODULE_11__["incentiveReducer"]) + ], + exports: [ + //AwardComponent, + _award_memes_award_memes_component__WEBPACK_IMPORTED_MODULE_4__["AwardMemesComponent"], + _award_altruism_award_altruism_component__WEBPACK_IMPORTED_MODULE_7__["AwardAltruismComponent"] + //VisualizationComponent + ], + schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]], + entryComponents: [_aquarium_modal_unlocked_page_modal_unlocked_page_component__WEBPACK_IMPORTED_MODULE_8__["ModalUnlockedPageComponent"]] + }) + ], IncentiveModule); + return IncentiveModule; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/incentive.selectors.ts": +/*!**************************************************!*\ + !*** ./src/app/incentive/incentive.selectors.ts ***! + \**************************************************/ +/*! exports provided: selectAuthState, isIncentivesUnlockedForTheDay */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectAuthState", function() { return selectAuthState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIncentivesUnlockedForTheDay", function() { return isIncentivesUnlockedForTheDay; }); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__); + + +var selectAuthState = Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["createFeatureSelector"])("incentive"); +var isIncentivesUnlockedForTheDay = Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectAuthState, function (incentive) { + var currentDate = moment__WEBPACK_IMPORTED_MODULE_1__().format('YYYYMMDD'); + if (incentive["timeline"] == undefined) + return undefined; + else if (currentDate in incentive["timeline"]) + return incentive["timeline"][currentDate]; + else + return undefined; +}); + + +/***/ }), + +/***/ "./src/app/incentive/info-page/info-page.component.scss": +/*!**************************************************************!*\ + !*** ./src/app/incentive/info-page/info-page.component.scss ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color {\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaW5jZW50aXZlL2luZm8tcGFnZS9pbmZvLXBhZ2UuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2luY2VudGl2ZS9pbmZvLXBhZ2UvaW5mby1wYWdlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0kscUJBQUE7QUNDSiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9pbmZvLXBhZ2UvaW5mby1wYWdlLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/incentive/info-page/info-page.component.ts": +/*!************************************************************!*\ + !*** ./src/app/incentive/info-page/info-page.component.ts ***! + \************************************************************/ +/*! exports provided: InfoPageComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfoPageComponent", function() { return InfoPageComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + +var InfoPageComponent = /** @class */ (function () { + function InfoPageComponent(menuCtrl, appUsageDb) { + this.menuCtrl = menuCtrl; + this.appUsageDb = appUsageDb; + } + InfoPageComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + InfoPageComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageEnter("reward_info_page"); + }; + InfoPageComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageExit("reward_info_page"); + }; + InfoPageComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__["DatabaseService"] } + ]; }; + InfoPageComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-info-page', + template: __webpack_require__(/*! raw-loader!./info-page.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/info-page/info-page.component.html"), + styles: [__webpack_require__(/*! ./info-page.component.scss */ "./src/app/incentive/info-page/info-page.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__["DatabaseService"]]) + ], InfoPageComponent); + return InfoPageComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/life-insights/life-insights.module.ts": +/*!*****************************************************************!*\ + !*** ./src/app/incentive/life-insights/life-insights.module.ts ***! + \*****************************************************************/ +/*! exports provided: LifeInsightsModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LifeInsightsModule", function() { return LifeInsightsModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _q1_motivated_q1_motivated_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./q1-motivated/q1-motivated.component */ "./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.ts"); +/* harmony import */ var _sample_life_insights_sample_life_insights_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sample-life-insights/sample-life-insights.component */ "./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.ts"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); +/* + The profile for questions is stored in /assets/data/life_insight.json +*/ + + + + + + + + +var routes = [ + { path: 'sample-life-insights', component: _sample_life_insights_sample_life_insights_component__WEBPACK_IMPORTED_MODULE_5__["SampleLifeInsightsComponent"] } +]; +var LifeInsightsModule = /** @class */ (function () { + function LifeInsightsModule() { + } + LifeInsightsModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [_q1_motivated_q1_motivated_component__WEBPACK_IMPORTED_MODULE_4__["Q1MotivatedComponent"], _sample_life_insights_sample_life_insights_component__WEBPACK_IMPORTED_MODULE_5__["SampleLifeInsightsComponent"]], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], + _angular_forms__WEBPACK_IMPORTED_MODULE_7__["FormsModule"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["IonicModule"].forRoot(), + _angular_router__WEBPACK_IMPORTED_MODULE_6__["RouterModule"].forChild(routes) + ], + schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]], + exports: [_q1_motivated_q1_motivated_component__WEBPACK_IMPORTED_MODULE_4__["Q1MotivatedComponent"], _sample_life_insights_sample_life_insights_component__WEBPACK_IMPORTED_MODULE_5__["SampleLifeInsightsComponent"]] + }) + ], LifeInsightsModule); + return LifeInsightsModule; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.scss": +/*!**********************************************************************************!*\ + !*** ./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.scss ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9saWZlLWluc2lnaHRzL3ExLW1vdGl2YXRlZC9xMS1tb3RpdmF0ZWQuY29tcG9uZW50LnNjc3MifQ== */" + +/***/ }), + +/***/ "./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.ts": +/*!********************************************************************************!*\ + !*** ./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.ts ***! + \********************************************************************************/ +/*! exports provided: Q1MotivatedComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q1MotivatedComponent", function() { return Q1MotivatedComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! chart.js */ "./node_modules/chart.js/dist/Chart.js"); +/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(chart_js__WEBPACK_IMPORTED_MODULE_2__); + + + +var Q1MotivatedComponent = /** @class */ (function () { + function Q1MotivatedComponent() { + } + Object.defineProperty(Q1MotivatedComponent.prototype, "jsonObj", { + get: function () { + // transform value for display + return this._jsonObj; + }, + set: function (jsonObj) { + console.log('prev _jsonObj: ', this._jsonObj); + console.log('got jsonObj: ', jsonObj); + this._jsonObj = jsonObj; + }, + enumerable: true, + configurable: true + }); + Q1MotivatedComponent.prototype.ngOnInit = function () { + //console.log(this.inputStr); + //this.jsonObj = JSON.parse(this.inputStr); + console.log("Q1MotivatedComponent " + JSON.stringify(this._jsonObj)); + this.imgloc = this._jsonObj.imgloc; + this.title = this._jsonObj.title; + this.subtext = this._jsonObj.subtext; + this.topSubtext = this._jsonObj.topSubtext; + this.bottomSubtext = this._jsonObj.bottomSubtext; + this.question = this._jsonObj.question; + this.data = this._jsonObj.data; + this.labels = this._jsonObj.labels; + this.qYaxis = this._jsonObj.qYaxis; + this.lineChart = new chart_js__WEBPACK_IMPORTED_MODULE_2__["Chart"](this.lineCanvas.nativeElement, { + type: "line", + data: { + labels: this.labels, + datasets: [ + { + label: "My First dataset", + fill: false, + lineTension: 0.1, + backgroundColor: "rgba(75,192,192,0.4)", + borderColor: "rgba(75,192,192,1)", + borderCapStyle: "butt", + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: "miter", + pointBorderColor: "rgba(75,192,192,1)", + pointBackgroundColor: "rgba(75,192,192,1)", + pointBorderWidth: 1, + pointHoverRadius: 5, + pointHoverBackgroundColor: "rgba(75,192,192,1)", + pointHoverBorderColor: "rgba(220,220,220,1)", + pointHoverBorderWidth: 2, + pointRadius: 4, + pointHitRadius: 10, + data: this.data, + spanGaps: false + } + ] + }, + options: { + tooltips: { enabled: false }, + hover: { mode: null }, + legend: { + display: false + }, + maintainAspectRatio: false, + layout: { + padding: { + left: 5, + right: 5, + top: 15, + bottom: 5 + } + }, + scales: { + yAxes: [{ + scaleLabel: { + display: true, + labelString: this.qYaxis, + fontColor: "#000" + }, + ticks: { + max: 4, + min: 0, + stepSize: 1, + display: true + } + }], + xAxes: [{ + scaleLabel: { + display: true, + labelString: 'Day', + fontColor: "#000" + } + }], + } + } + }); + }; + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('lineCanvas', { static: true }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]) + ], Q1MotivatedComponent.prototype, "lineCanvas", void 0); + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", Object), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [Object]) + ], Q1MotivatedComponent.prototype, "jsonObj", null); + Q1MotivatedComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-q1-motivated', + template: __webpack_require__(/*! raw-loader!./q1-motivated.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.html"), + styles: [__webpack_require__(/*! ./q1-motivated.component.scss */ "./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", []) + ], Q1MotivatedComponent); + return Q1MotivatedComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.scss": +/*!**************************************************************************************************!*\ + !*** ./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.scss ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9saWZlLWluc2lnaHRzL3NhbXBsZS1saWZlLWluc2lnaHRzL3NhbXBsZS1saWZlLWluc2lnaHRzLmNvbXBvbmVudC5zY3NzIn0= */" + +/***/ }), + +/***/ "./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.ts": +/*!************************************************************************************************!*\ + !*** ./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.ts ***! + \************************************************************************************************/ +/*! exports provided: SampleLifeInsightsComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SampleLifeInsightsComponent", function() { return SampleLifeInsightsComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! chart.js */ "./node_modules/chart.js/dist/Chart.js"); +/* harmony import */ var chart_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(chart_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_3__); + + + + +//import * as lifeInsightProfile from "../../../../assets/data/life_insight.json"; +//import { PreLoad } from '../../../PreLoad'; +var SampleLifeInsightsComponent = /** @class */ (function () { + function SampleLifeInsightsComponent() { + this.index = 0; + } + /* get jsonObj(): any { + // transform value for display + return this._jsonObj; + } + + @Input() + set jsonObj(jsonObj: any) { + console.log('prev _jsonObj: ', this._jsonObj); + console.log('got jsonObj: ', jsonObj); + this._jsonObj = jsonObj; + } */ + SampleLifeInsightsComponent.prototype.ngOnInit = function () { + this.init(this.index); + }; + SampleLifeInsightsComponent.prototype.init = function (index) { + //console.log(this.inputStr); + //this.jsonObj = JSON.parse(this.inputStr); + var lifeInsightProfile = { + "questions": ["Q3d", "Q4d", "Q5d", "Q8d"], + "qimgs": ["assets/img/stress.png", "assets/img/freetime.png", "assets/img/dance2.png", "assets/img/social.png"], + "lifeInsightsTitle": ["How much pain are you currently experiencing?", + "How much fatigue are you currently experiencing?", + "How much nausea are you currently experiencing?", + "How motivated are you to take 6MP today?"], + "qYaxis": ["Pain level", "Fatigue level", "Nausea level", "Degree of motivation"], + "qSubText": ["0 = low pain, 4 = severe pain", + "0 = low fatigue, 4 = severe fatigue", + "0 = low nausea, 4 = severe nausea", + "0 = less motivated, 4 = highly motivated"], + "lifeInsightsHighStress": [ + "Stressed ", + "Fatigued ", + "Nausea ", + "Motivated " + ], + "lifeInsightsLowStress": [ + "Relaxed ", + "Fatigued ", + "Nausea ", + "Motivated " + ] + }; + this.index = Math.floor(Math.random() * lifeInsightProfile.questions.length); + this.question = lifeInsightProfile.questions[this.index]; + this.imgloc = lifeInsightProfile.qimgs[this.index]; + this.title = lifeInsightProfile.lifeInsightsTitle[this.index]; + this.qYaxis = lifeInsightProfile.qYaxis[this.index]; + this.subtext = lifeInsightProfile.qSubText[this.index]; + this.topSubtext = lifeInsightProfile.lifeInsightsHighStress[this.index]; + this.bottomSubtext = lifeInsightProfile.lifeInsightsLowStress[this.index]; + this.qYaxisArray = lifeInsightProfile.qYaxis; + this.selectedValue = lifeInsightProfile.qYaxis[this.index]; + //read data from localStorage + if (window.localStorage.getItem("lifeInsight") == undefined) { + console.log("Undefined!"); + this.data = [0, 1, 3, 4, null, 3, 1]; + //this.inputString = JSON.stringify(this.inputJson); + } + else { + var lifeInsightObj = JSON.parse(window.localStorage.getItem("lifeInsight")); + console.log(JSON.stringify(lifeInsightObj)); + this.data = []; + this.labels = []; + for (var i = 6; i >= 0; i--) { + var currentdate = moment__WEBPACK_IMPORTED_MODULE_3__().subtract(i, "days").format("DD-MM-YYYY"); + //console.log("Inside loop: currentdate: "+currentdate); + if (i == 0) { + this.labels.push("Today"); + } + else { + this.labels.push(moment__WEBPACK_IMPORTED_MODULE_3__().subtract(i, "days").format("MM/DD")); + } + //console.log("Local Storage save: "+question+" "+JSON.stringify(lifeInsightObj[question])); + var dates = lifeInsightObj[this.question]["dates"]; + var dateIndex = dates.lastIndexOf(currentdate); + if (dateIndex > -1) { + this.data.push(lifeInsightObj[this.question]['data'][dateIndex]); + } + else { + this.data.push(null); + } + } + //this.data = [null, null, null, null, null, null, 1]; + console.log("Data, " + this.data); + } + this.lineChart = new chart_js__WEBPACK_IMPORTED_MODULE_2__["Chart"](this.lineCanvas.nativeElement, { + type: "line", + data: { + labels: this.labels, + datasets: [ + { + label: "My First dataset", + fill: false, + lineTension: 0.1, + backgroundColor: "rgba(75,192,192,0.4)", + borderColor: "rgba(75,192,192,1)", + borderCapStyle: "butt", + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: "miter", + pointBorderColor: "rgba(75,192,192,1)", + pointBackgroundColor: "rgba(75,192,192,1)", + pointBorderWidth: 1, + pointHoverRadius: 5, + pointHoverBackgroundColor: "rgba(75,192,192,1)", + pointHoverBorderColor: "rgba(220,220,220,1)", + pointHoverBorderWidth: 2, + pointRadius: 4, + pointHitRadius: 10, + data: this.data, + spanGaps: false + } + ] + }, + options: { + tooltips: { enabled: false }, + hover: { mode: null }, + legend: { + display: false + }, + maintainAspectRatio: false, + layout: { + padding: { + left: 5, + right: 5, + top: 15, + bottom: 5 + } + }, + scales: { + yAxes: [{ + scaleLabel: { + display: true, + labelString: this.qYaxis, + fontColor: "#000" + }, + ticks: { + max: 4, + min: 0, + stepSize: 1, + display: true + } + }], + xAxes: [{ + scaleLabel: { + display: true, + labelString: 'Day', + fontColor: "#000" + } + }], + } + } + }); + }; + SampleLifeInsightsComponent.prototype.ratingChanged = function (rating) { + if (rating == 0) + console.log("thumbs down"); + else + console.log("thumbs up"); + //this.router.navigate(['incentive/aquarium/aquariumone']); + //this.router.navigate(['/home']); + window.location.href = '/home'; + }; + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('lineCanvas', { static: true }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]) + ], SampleLifeInsightsComponent.prototype, "lineCanvas", void 0); + SampleLifeInsightsComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-sample-life-insights', + template: __webpack_require__(/*! raw-loader!./sample-life-insights.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.html"), + styles: [__webpack_require__(/*! ./sample-life-insights.component.scss */ "./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.scss")] + }) + //@PreLoad('q1lifeinsight') + , + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", []) + ], SampleLifeInsightsComponent); + return SampleLifeInsightsComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.css": +/*!*********************************************************************************************!*\ + !*** ./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.css ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2xpZmUtaW5zaWdodHMvc2FtcGxlLXB5dGhvbi12aWV3L3NhbXBsZS1weXRob24tdmlldy5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0kscUJBQXFCO0FBQ3pCIiwiZmlsZSI6InNyYy9hcHAvaW5jZW50aXZlL2xpZmUtaW5zaWdodHMvc2FtcGxlLXB5dGhvbi12aWV3L3NhbXBsZS1weXRob24tdmlldy5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iXX0= */" + +/***/ }), + +/***/ "./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.ts": +/*!********************************************************************************************!*\ + !*** ./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.ts ***! + \********************************************************************************************/ +/*! exports provided: SamplePythonViewComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SamplePythonViewComponent", function() { return SamplePythonViewComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); +/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); + + + + + + +var SamplePythonViewComponent = /** @class */ (function () { + function SamplePythonViewComponent(userProfileService, menuCtrl, appUsageDb, sanitizer) { + this.userProfileService = userProfileService; + this.menuCtrl = menuCtrl; + this.appUsageDb = appUsageDb; + this.sanitizer = sanitizer; + } + SamplePythonViewComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + /* + const browser = this.iab.create('https://cnn.com/'); + + //browser.executeScript(...); + + //browser.insertCSS(...); + browser.on('loadstop').subscribe(event => { + browser.insertCSS({ code: "body{color: red;" }); + }); + + browser.close(); + */ + ////'http://54.146.43.246:5000/' + }; + SamplePythonViewComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.moodInsightImage = "http://ec2-52-201-144-36.compute-1.amazonaws.com:56735/get_daily_plot?username=" + this.userProfileService.username + "&plot_type=edu.harvard.srl.MoodVisualization&cachebreaker=" + new Date().getTime(); + this.concentrationInsightImage = "http://ec2-52-201-144-36.compute-1.amazonaws.com:56735/get_daily_plot?username=" + this.userProfileService.username + "&plot_type=edu.harvard.srl.ConcentrationVisualization&cachebreaker=" + new Date().getTime(); + this.stressInsightImage = "http://ec2-52-201-144-36.compute-1.amazonaws.com:56735/get_daily_plot?username=" + this.userProfileService.username + "&plot_type=edu.harvard.srl.GoodDayVisualization&cachebreaker=" + new Date().getTime(); + this.appUsageDb.saveAppUsageEnter("python_life_insight_page_sample"); + }; + SamplePythonViewComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageExit("python_life_insight_page_sample"); + }; + SamplePythonViewComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_5__["UserProfileService"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__["DatabaseService"] }, + { type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__["DomSanitizer"] } + ]; }; + SamplePythonViewComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-sample-python-view', + template: __webpack_require__(/*! raw-loader!./sample-python-view.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.html"), + styles: [__webpack_require__(/*! ./sample-python-view.component.css */ "./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_5__["UserProfileService"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__["DatabaseService"], + _angular_platform_browser__WEBPACK_IMPORTED_MODULE_4__["DomSanitizer"]]) + ], SamplePythonViewComponent); + return SamplePythonViewComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/reducers/index.ts": +/*!*********************************************!*\ + !*** ./src/app/incentive/reducers/index.ts ***! + \*********************************************/ +/*! exports provided: initialUnlockedIncentiveState, incentiveReducer */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialUnlockedIncentiveState", function() { return initialUnlockedIncentiveState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "incentiveReducer", function() { return incentiveReducer; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); +/* harmony import */ var _action_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../action-types */ "./src/app/incentive/action-types.ts"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_3__); + + + + +var initialUnlockedIncentiveState = { + unlockedIncentives: undefined +}; +var incentiveReducer = Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_1__["createReducer"])(initialUnlockedIncentiveState, Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_1__["on"])(_action_types__WEBPACK_IMPORTED_MODULE_2__["IncentiveActions"].surveyCompletedRegisterUnlocked, function (state, payload) { + console.log("Incentive State: " + JSON.stringify(state)); + console.log("Incentive payload: " + JSON.stringify(payload)); + var currentDate = moment__WEBPACK_IMPORTED_MODULE_3__().format('YYYYMMDD'); + var unlockedIncentiveObject = {}; + var new_state = {}; + var payload_data = payload["payload"]; + new_state['user_id'] = payload_data["user_id"]; + new_state['last_date'] = payload_data["last_date"]; + var currentIncentiveTimeline = Object.assign({}, state["timeline"]); + if (currentIncentiveTimeline == undefined) //means initial state with no timeline + currentIncentiveTimeline = {}; + var key = currentDate; + var value = { + unlocked_points: payload_data["unlocked_points"], + unlocked_money: payload_data["unlocked_money"], + current_point: payload_data["current_point"], + date: moment__WEBPACK_IMPORTED_MODULE_3__().format('YYYYMMDD'), + isUnlockedViewShown: payload_data["isUnlockedViewShown"], + }; + currentIncentiveTimeline[key] = value; + new_state["timeline"] = currentIncentiveTimeline; + console.log("Incentive State: " + JSON.stringify(new_state)); + return new_state; +}), Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_1__["on"])(_action_types__WEBPACK_IMPORTED_MODULE_2__["IncentiveActions"].unlockedScreenShownAlready, function (state, payload) { + var currentDate = moment__WEBPACK_IMPORTED_MODULE_3__().format('YYYYMMDD'); + //let clone = Object.assign({}, obj); + var currentIncentiveTimeline = Object.assign({}, state["timeline"]); + currentIncentiveTimeline[currentDate] = tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"]({}, currentIncentiveTimeline[currentDate], { isUnlockedViewShown: true }); + return tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"]({}, state, { timeline: currentIncentiveTimeline }); +}) +//this.store.dispatch(surveyCompletedRegisterUnlocked({unlockedIncentives})); +/* +on(AuthActions.login, (state, action) => { + return { + user: action.user + } +}), + +on(AuthActions.logout, (state, action) => { + return { + user: undefined + } +}) +*/ +); + + +/***/ }), + +/***/ "./src/app/incentive/treasurechest/treasurechest.component.scss": +/*!**********************************************************************!*\ + !*** ./src/app/incentive/treasurechest/treasurechest.component.scss ***! + \**********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color {\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaW5jZW50aXZlL3RyZWFzdXJlY2hlc3QvdHJlYXN1cmVjaGVzdC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvaW5jZW50aXZlL3RyZWFzdXJlY2hlc3QvdHJlYXN1cmVjaGVzdC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHFCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvdHJlYXN1cmVjaGVzdC90cmVhc3VyZWNoZXN0LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/incentive/treasurechest/treasurechest.component.ts": +/*!********************************************************************!*\ + !*** ./src/app/incentive/treasurechest/treasurechest.component.ts ***! + \********************************************************************/ +/*! exports provided: TreasurechestComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreasurechestComponent", function() { return TreasurechestComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + +var TreasurechestComponent = /** @class */ (function () { + function TreasurechestComponent(appUsageDb) { + this.appUsageDb = appUsageDb; + this.amount_earned = "$0"; + this.pearlsAndGems = []; + this.pointsdata = []; + } + TreasurechestComponent.prototype.ngOnInit = function () { + var _this = this; + //load reward data + var badges; + //badges = JSON.parse(window.localStorage['badges'] || "{}"); + var user_data = JSON.parse(window.localStorage['user_data'] || "{}"); + badges = user_data['badges'] || {}; + if ('money' in badges) { //means things are empty. + } + else { + badges['daily_survey'] = [0, 0, 0, 0, 0, 0]; + badges['weekly_survey'] = [0, 0, 0, 0]; + badges['active_tasks'] = [0, 0, 0, 0, 0, 0]; + badges['money'] = 10; + } + //add the money + this.amount_earned = "$" + badges['money']; + // + if (window.localStorage['AwardDollar'] == undefined) + this.amount_earned = "$" + 0; + else + this.amount_earned = "$" + parseInt(window.localStorage['AwardDollar']); + //add the badges for daily survey + var daily_survey_tasks = [2, 1, 0, 3, 1, 1]; //badges['daily_survey']; + //daily_survey_tasks = [3,2,0,2,2,1]; + //daily_survey_tasks = [0,0,0,0,0]; + //badges['weekly_survey'] = [0,0,0,0]; + var daily_width = [50, 30, 42, 30, 42, 40, 46]; + var ds_tasks_badges = ['img/backgroud_daily.png', 'img/green.png', 'img/blue.png', 'img/red.png', 'img/bronze.png', 'img/silver.png', 'img/gold.png']; + for (var i = 1; i < ds_tasks_badges.length; i++) { + if (daily_survey_tasks[i - 1] > 0) { + for (var q = 0; q < daily_survey_tasks[i - 1]; q++) + this.pearlsAndGems.push({ "img": "assets/" + ds_tasks_badges[i], "count": daily_survey_tasks[i - 1], "width": daily_width[i] * 3 / 2 }); + } + } + fetch('../../../assets/game/fishpoints.json').then(function (res) { return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](_this, void 0, void 0, function () { + var data, current_points, survey_string, isNextAvailableStillMasked, i; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, res.json()]; + case 1: + data = _a.sent(); + current_points = 700; + survey_string = ""; + isNextAvailableStillMasked = false; + for (i = 0; i < data.length; i++) { + data[i].class = 'nonshade'; + data[i].img = "assets/" + data[i].img.substring(0, data[i].img.length - 4) + '_tn.jpg'; + data[i].fish_index = i; + data[i].show_trivia = 1; + /* + if(current_points < data[i].points){ + if(isNextAvailableStillMasked == false){ + // + data[i].img = data[i].img.substring(0, data[i].img.length-7) + '-grey_tn.jpg'; + isNextAvailableStillMasked = true; + //data[i].class = 'shade'; + } + else{ + data[i].img = 'assets/img/cryptocoin_tn.jpg'; + } + + data[i].show_trivia = 0; + } + + if(data[i].name === 'Sea environment'){ + data[i].show_trivia = 0; + } + */ + } + this.pointsdata = data; + return [2 /*return*/]; + } + }); + }); }); + //add the fish to be unlocked + }; + TreasurechestComponent.prototype.sum = function (arr) { + var total = 0; + for (var i in arr) { + total += arr[i]; + } + return total; + }; + TreasurechestComponent.prototype.ionViewDidEnter = function () { + // + this.appUsageDb.saveAppUsageEnter("treasure_chest"); + }; + TreasurechestComponent.prototype.ionViewDidLeave = function () { + this.appUsageDb.saveAppUsageExit("treasure_chest"); + }; + TreasurechestComponent.ctorParameters = function () { return [ + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__["DatabaseService"] } + ]; }; + TreasurechestComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-treasurechest', + template: __webpack_require__(/*! raw-loader!./treasurechest.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/treasurechest/treasurechest.component.html"), + styles: [__webpack_require__(/*! ./treasurechest.component.scss */ "./src/app/incentive/treasurechest/treasurechest.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__["DatabaseService"]]) + ], TreasurechestComponent); + return TreasurechestComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.css": +/*!*************************************************************************************************!*\ + !*** ./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.css ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL3VubG9ja2VkLWFsdHVpc3RpYy1tZXNzYWdlcy91bmxvY2tlZC1hbHR1aXN0aWMtbWVzc2FnZXMuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS91bmxvY2tlZC1hbHR1aXN0aWMtbWVzc2FnZXMvdW5sb2NrZWQtYWx0dWlzdGljLW1lc3NhZ2VzLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */" + +/***/ }), + +/***/ "./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.ts": +/*!************************************************************************************************!*\ + !*** ./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.ts ***! + \************************************************************************************************/ +/*! exports provided: UnlockedAltuisticMessagesComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnlockedAltuisticMessagesComponent", function() { return UnlockedAltuisticMessagesComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + + + + +var UnlockedAltuisticMessagesComponent = /** @class */ (function () { + function UnlockedAltuisticMessagesComponent(userProfileService, httpClient, appUsageDb) { + this.userProfileService = userProfileService; + this.httpClient = httpClient; + this.appUsageDb = appUsageDb; + } + Object.defineProperty(UnlockedAltuisticMessagesComponent.prototype, "username", { + get: function () { + if (this.userProfileService == undefined) + return "test"; + else { + return this.userProfileService.username; + } + }, + enumerable: true, + configurable: true + }); + UnlockedAltuisticMessagesComponent.prototype.ngOnInit = function () { + }; + UnlockedAltuisticMessagesComponent.prototype.ionViewDidEnter = function () { + this.already_shown_altruism_msgs = window.localStorage["already_shown_alt_msg4"]; + if (this.already_shown_altruism_msgs == undefined) { + this.already_shown_altruism_msgs = { + "last_updated": Date.now(), + "last_updated_readable_ts": moment__WEBPACK_IMPORTED_MODULE_2__().format("MMMM Do YYYY, h:mm:ss a Z"), + "unlocked_alt_msgs": [{ "filename": "assets/altruism/altruism_1.png", "unlock_date": moment__WEBPACK_IMPORTED_MODULE_2__().format('MM/DD/YYYY') }] + }; + window.localStorage["already_shown_alt_msg4"] = JSON.stringify(this.already_shown_altruism_msgs); + } + else + this.already_shown_altruism_msgs = JSON.parse(window.localStorage["already_shown_alt_msg4"]); + if (this.already_shown_altruism_msgs.unlocked_alt_msgs.length == 0) { + this.already_shown_altruism_msgs = { + "last_updated": Date.now(), + "last_updated_readable_ts": moment__WEBPACK_IMPORTED_MODULE_2__().format("MMMM Do YYYY, h:mm:ss a Z"), + "unlocked_alt_msgs": [{ "filename": "assets/altruism/altruism_1.png", "unlock_date": moment__WEBPACK_IMPORTED_MODULE_2__().format('MM/DD/YYYY') }] + }; + window.localStorage["already_shown_alt_msg4"] = JSON.stringify(this.already_shown_altruism_msgs); + } + this.unlockedAltMessagesCount = this.already_shown_altruism_msgs.unlocked_alt_msgs.length; + this.list_of_alt_msg_to_display = this.already_shown_altruism_msgs["unlocked_alt_msgs"]; + //this.list_of_alt_msg_to_display.reverse(); + console.log("already_shown_altruism_msgs " + this.already_shown_altruism_msgs); + this.downloadAndUpdateUnlockedAltsMsgsList(); + // + this.appUsageDb.saveAppUsageEnter("unlocked_altruism_message_tab"); + }; + UnlockedAltuisticMessagesComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageExit("unlocked_altruism_message_tab"); + }; + UnlockedAltuisticMessagesComponent.prototype.downloadAndUpdateUnlockedAltsMsgsList = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var flaskServerAPIEndpoint; + var _this = this; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].flaskServerForIncentives; + this.httpClient.post(flaskServerAPIEndpoint + '/get-unlocked-incentive', { "user_id": this.username, "incentive_type": "alt_msg" }).subscribe({ + next: function (data) { + var json_data = JSON.parse(JSON.stringify(data)); + /* + + Sample of returned data + + { + "last_updated": 1591509230223, + "last_updated_readable_ts": "June 6th 2020, 10:53:50 pm -07:00", + "unlocked_memes": [ + { + "filename": "assets/memes/4.jpg", + "unlock_date": "06/06/2020" + } + ] + } + */ + var lastUpdatedSeverSide; + var lastUpdatedReadableTsSeverSide; + var unlockedAltMsgsServerSide; + if ("last_updated" in json_data) { + lastUpdatedSeverSide = json_data["last_updated"]; + lastUpdatedReadableTsSeverSide = json_data["last_updated_readable_ts"]; + unlockedAltMsgsServerSide = json_data["unlocked_alt_msgs"]; + //console.log("--unlockedAltMsgsServerSide--- " + JSON.stringify(unlockedAltMsgsServerSide)); + } + else { + lastUpdatedSeverSide = -1; + lastUpdatedReadableTsSeverSide = -1; + unlockedAltMsgsServerSide = []; + //console.log("--unlockedAltMsgsServerSide--- " + JSON.stringify(unlockedAltMsgsServerSide)); + } + var localAltMsgsRecord = JSON.parse(window.localStorage["already_shown_alt_msg4"]); + var lastUpdatedLocalStorage = localAltMsgsRecord["last_updated"]; + var lastUpdatedReadableTsLocalStorage = localAltMsgsRecord["last_updated_readable_ts"]; + var unlockedAltMsgLocalStorage = localAltMsgsRecord["unlocked_alt_msgs"]; + //console.log("--unlockedAltMsgLocalStorage--- " + JSON.stringify(unlockedAltMsgLocalStorage)); + //Following code creats a union of unlockedMemesServerSide and unlockedMemesLocalStorage + var unionOfLocalAndServer = {}; + for (var i = 0; i < unlockedAltMsgsServerSide.length; i++) + unionOfLocalAndServer[unlockedAltMsgsServerSide[i]["filename"]] = unlockedAltMsgsServerSide[i]; + for (var i = 0; i < unlockedAltMsgLocalStorage.length; i++) + unionOfLocalAndServer[unlockedAltMsgLocalStorage[i]["filename"]] = unlockedAltMsgLocalStorage[i]; + //console.log("--unionOfLocalAndServer--- " + JSON.stringify(unionOfLocalAndServer)); + // + var unlockedAltMessagesOrderedByDate = {}; + for (var key in unionOfLocalAndServer) + unlockedAltMessagesOrderedByDate[unionOfLocalAndServer[key]["unlock_date"]] = unionOfLocalAndServer[key]; + //console.log("--unlockedAltMessagesOrderedByDate--- " + JSON.stringify(unlockedAltMessagesOrderedByDate)); + var res = []; + var sortedDates = Object.keys(unlockedAltMessagesOrderedByDate).sort(); + for (var k = 0; k < sortedDates.length; k++) { + res.push(unlockedAltMessagesOrderedByDate[sortedDates[k]]); + } + _this.list_of_alt_msg_to_display = res.reverse(); + _this.unlockedAltMessagesCount = res.length; + localAltMsgsRecord["unlocked_alt_msgs"] = _this.list_of_alt_msg_to_display; + localAltMsgsRecord["last_updated"] = Date.now(); + localAltMsgsRecord["last_updated_readable_ts"] = moment__WEBPACK_IMPORTED_MODULE_2__().format("MMMM Do YYYY, h:mm:ss a Z"); + window.localStorage["already_shown_alt_msg4"] = JSON.stringify(localAltMsgsRecord); + //console.log("--localAltMsgsRecord--- " + JSON.stringify(localAltMsgsRecord)); + // + _this.uploadCurrentlyUnlockedAltMsgsList(localAltMsgsRecord); + }, + error: function (error) { return console.error('There was an error!', error); } + }); + return [2 /*return*/]; + }); + }); + }; + UnlockedAltuisticMessagesComponent.prototype.uploadCurrentlyUnlockedAltMsgsList = function (already_shown_alt_msgs) { + /* + { + "user_id": "test", + "incentiveString": "test", + "whenInserted": "test", + "whenInsertedReadableTs": 1234, + "incentiveType": "test" + } + */ + var username = this.userProfileService.username; + var currentTimeTs = Date.now(); + var currentTimeReadableTs = moment__WEBPACK_IMPORTED_MODULE_2__().format("MMMM Do YYYY, h:mm:ss a Z"); + var headers = { "Content-Type": "application/json;charset=UTF-8" }; + var body = { + "user_id": username, + "whenInserted": currentTimeTs, + "whenInsertedReadableTs": currentTimeReadableTs, + "incentiveType": "alt_msg", + "incentiveString": JSON.stringify(already_shown_alt_msgs) + }; + var flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].flaskServerForIncentives; + this.httpClient.post(flaskServerAPIEndpoint + "/store-unlocked-incentive", body) + .subscribe({ + next: function (data) { return console.log("--unlocked_alt_msg-- " + JSON.stringify(data)); }, + error: function (error) { return console.error('There was an error!', error); } + }); + }; + UnlockedAltuisticMessagesComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"] }, + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"] } + ]; }; + UnlockedAltuisticMessagesComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-unlocked-altuistic-messages', + template: __webpack_require__(/*! raw-loader!./unlocked-altuistic-messages.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.html"), + styles: [__webpack_require__(/*! ./unlocked-altuistic-messages.component.css */ "./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"]]) + ], UnlockedAltuisticMessagesComponent); + return UnlockedAltuisticMessagesComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.css": +/*!*****************************************************************************************************!*\ + !*** ./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.css ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL3VubG9ja2VkLWluc3BpcmF0aW9uYWwtcXVvdGVzL3VubG9ja2VkLWluc3BpcmF0aW9uYWwtcXVvdGVzLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvdW5sb2NrZWQtaW5zcGlyYXRpb25hbC1xdW90ZXMvdW5sb2NrZWQtaW5zcGlyYXRpb25hbC1xdW90ZXMuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.ts": +/*!****************************************************************************************************!*\ + !*** ./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.ts ***! + \****************************************************************************************************/ +/*! exports provided: UnlockedInspirationalQuotesComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnlockedInspirationalQuotesComponent", function() { return UnlockedInspirationalQuotesComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + + + + +var UnlockedInspirationalQuotesComponent = /** @class */ (function () { + function UnlockedInspirationalQuotesComponent(userProfileService, httpClient, appUsageDb) { + this.userProfileService = userProfileService; + this.httpClient = httpClient; + this.appUsageDb = appUsageDb; + this.unlockedInspirationalQuotes = []; + } + Object.defineProperty(UnlockedInspirationalQuotesComponent.prototype, "username", { + get: function () { + if (this.userProfileService == undefined) + return "test"; + else { + return this.userProfileService.username; + } + }, + enumerable: true, + configurable: true + }); + UnlockedInspirationalQuotesComponent.prototype.ngOnInit = function () { + }; + UnlockedInspirationalQuotesComponent.prototype.ionViewDidEnter = function () { + //pre-populate + this.unlockedInspirationalQuotes = JSON.parse(window.localStorage.getItem("saved_quotes") || '[]'); + this.getInspirationalQuotes(); + // + this.appUsageDb.saveAppUsageEnter("unlocked_inspirational_quote_tab"); + }; + UnlockedInspirationalQuotesComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageExit("unlocked_inspirational_quote_tab"); + }; + UnlockedInspirationalQuotesComponent.prototype.getInspirationalQuotes = function () { + var _this = this; + var flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].flaskServerForIncentives; + this.httpClient.post(flaskServerAPIEndpoint + '/get-inspirational-quote', { "user_id": this.username }).subscribe({ + next: function (data) { + //console.log("Inspirational quote: " + JSON.stringify(data)); + var json_data = JSON.parse(JSON.stringify(data)); + _this.unlockedInspirationalQuotes = []; + for (var i = 0; i < json_data.length; i++) { + //exclude today if it is not yet 4PM. + var todaysDate = moment__WEBPACK_IMPORTED_MODULE_5__().format('YYYYMMDD'); + if (json_data[i].date == todaysDate) { + var currentTime = moment__WEBPACK_IMPORTED_MODULE_5__(); + var startTime = moment__WEBPACK_IMPORTED_MODULE_5__({ hour: 16 }); // 6pm + var endTime = moment__WEBPACK_IMPORTED_MODULE_5__({ hour: 23, minute: 59, second: 59 }); // 11:59pm + if (!currentTime.isBetween(startTime, endTime)) + continue; + } + //sometimes tomorrow can get scheduled as well + var tomorrowsDate = moment__WEBPACK_IMPORTED_MODULE_5__().add(1, "days").format('YYYYMMDD'); + if (json_data[i].date == tomorrowsDate) + continue; + var date = json_data[i].date; + date = date.substring(4, 6) + "/" + date.substring(6, 8) + "/" + date.substring(0, 4); + _this.unlockedInspirationalQuotes.push({ + "image": "https://aws-website-sara-ubicomp-h28yp.s3.amazonaws.com/sarapp/engagement_images/" + json_data[i].image, + "author": json_data[i].author, + "quote_text": json_data[i].quote_text, + "date": date + }); + } + window.localStorage.setItem('saved_quotes', JSON.stringify(_this.unlockedInspirationalQuotes)); + }, + error: function (error) { return console.error('There was an error!', error); } + }); + }; + UnlockedInspirationalQuotesComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__["UserProfileService"] }, + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"] } + ]; }; + UnlockedInspirationalQuotesComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-unlocked-inspirational-quotes', + template: __webpack_require__(/*! raw-loader!./unlocked-inspirational-quotes.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.html"), + styles: [__webpack_require__(/*! ./unlocked-inspirational-quotes.component.css */ "./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__["UserProfileService"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"]]) + ], UnlockedInspirationalQuotesComponent); + return UnlockedInspirationalQuotesComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/unlocked-memes/unlocked-memes.component.css": +/*!***********************************************************************!*\ + !*** ./src/app/incentive/unlocked-memes/unlocked-memes.component.css ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL3VubG9ja2VkLW1lbWVzL3VubG9ja2VkLW1lbWVzLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvdW5sb2NrZWQtbWVtZXMvdW5sb2NrZWQtbWVtZXMuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/incentive/unlocked-memes/unlocked-memes.component.ts": +/*!**********************************************************************!*\ + !*** ./src/app/incentive/unlocked-memes/unlocked-memes.component.ts ***! + \**********************************************************************/ +/*! exports provided: UnlockedMemesComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnlockedMemesComponent", function() { return UnlockedMemesComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + + + + +var UnlockedMemesComponent = /** @class */ (function () { + function UnlockedMemesComponent(userProfileService, httpClient, appUsageDb) { + this.userProfileService = userProfileService; + this.httpClient = httpClient; + this.appUsageDb = appUsageDb; + } + Object.defineProperty(UnlockedMemesComponent.prototype, "username", { + get: function () { + if (this.userProfileService == undefined) + return "test"; + else { + return this.userProfileService.username; + } + }, + enumerable: true, + configurable: true + }); + UnlockedMemesComponent.prototype.ngOnInit = function () { + }; + UnlockedMemesComponent.prototype.ionViewDidEnter = function () { + this.already_shown_memes = window.localStorage["already_shown_memes4"]; + if (this.already_shown_memes == undefined) { + this.already_shown_memes = { + "last_updated": Date.now(), + "last_updated_readable_ts": moment__WEBPACK_IMPORTED_MODULE_2__().format("MMMM Do YYYY, h:mm:ss a Z"), + "unlocked_memes": [{ "filename": "assets/memes/4.jpg", "unlock_date": moment__WEBPACK_IMPORTED_MODULE_2__().format('MM/DD/YYYY') }] + }; + window.localStorage["already_shown_memes4"] = JSON.stringify(this.already_shown_memes); + } + else + this.already_shown_memes = JSON.parse(window.localStorage["already_shown_memes4"]); + if (this.already_shown_memes.unlocked_memes.length == 0) { + this.already_shown_memes = { + "last_updated": Date.now(), + "last_updated_readable_ts": moment__WEBPACK_IMPORTED_MODULE_2__().format("MMMM Do YYYY, h:mm:ss a Z"), + "unlocked_memes": [{ "filename": "assets/memes/4.jpg", "unlock_date": moment__WEBPACK_IMPORTED_MODULE_2__().format('MM/DD/YYYY') }] + }; + window.localStorage["already_shown_memes4"] = JSON.stringify(this.already_shown_memes); + } + this.unlockedMemeCount = this.already_shown_memes["unlocked_memes"].length; + //var unlockedMemeUnorderDateList = this.already_shown_memes["unlocked_memes"]; + //for(var key in unlockedMemeUnorderDateList) + // unlockedMemesOrderedByDate[unionOfLocalAndServer[key]["unlock_date"]] = unionOfLocalAndServer[key]; + //console.log("unlockedMemeUnorderDateList " + JSON.stringify(unlockedMemeUnorderDateList.reverse())); + this.list_of_meme_to_display = this.already_shown_memes["unlocked_memes"]; + //this.list_of_meme_to_display.reverse(); + console.log("already_shown_memes " + JSON.stringify(this.already_shown_memes)); + this.downloadAndUpdateUnlockedMemeList(); + // + this.appUsageDb.saveAppUsageEnter("unlocked_meme_tab"); + }; + UnlockedMemesComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageExit("unlocked_meme_tab"); + }; + UnlockedMemesComponent.prototype.downloadAndUpdateUnlockedMemeList = function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var flaskServerAPIEndpoint; + var _this = this; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].flaskServerForIncentives; + this.httpClient.post(flaskServerAPIEndpoint + '/get-unlocked-incentive', { "user_id": this.username, "incentive_type": "meme" }).subscribe({ + next: function (data) { + var json_data = JSON.parse(JSON.stringify(data)); + /* + + Sample of returned data + + { + "last_updated": 1591509230223, + "last_updated_readable_ts": "June 6th 2020, 10:53:50 pm -07:00", + "unlocked_memes": [ + { + "filename": "assets/memes/4.jpg", + "unlock_date": "06/06/2020" + } + ] + } + */ + var lastUpdatedSeverSide; + var lastUpdatedReadableTsSeverSide; + var unlockedMemesServerSide; + if ("last_updated" in json_data) { + lastUpdatedSeverSide = json_data["last_updated"]; + lastUpdatedReadableTsSeverSide = json_data["last_updated_readable_ts"]; + unlockedMemesServerSide = json_data["unlocked_memes"]; + //console.log("--unlockedMemesServerSide--- " + JSON.stringify(unlockedMemesServerSide)); + } + else { + lastUpdatedSeverSide = -1; + lastUpdatedReadableTsSeverSide = -1; + unlockedMemesServerSide = []; + //console.log("--unlockedMemesServerSide--- " + JSON.stringify(unlockedMemesServerSide)); + } + var localMemeRecord = JSON.parse(window.localStorage["already_shown_memes4"]); + var lastUpdatedLocalStorage = localMemeRecord["last_updated"]; + var lastUpdatedReadableTsLocalStorage = localMemeRecord["last_updated_readable_ts"]; + var unlockedMemesLocalStorage = localMemeRecord["unlocked_memes"]; + //console.log("--unlockedMemesLocalStorage--- " + JSON.stringify(unlockedMemesLocalStorage)); + //Following code creates a union of unlockedMemesServerSide and unlockedMemesLocalStorage + var unionOfLocalAndServer = {}; + for (var i = 0; i < unlockedMemesServerSide.length; i++) + unionOfLocalAndServer[unlockedMemesServerSide[i]["filename"]] = unlockedMemesServerSide[i]; + for (var i = 0; i < unlockedMemesLocalStorage.length; i++) + unionOfLocalAndServer[unlockedMemesLocalStorage[i]["filename"]] = unlockedMemesLocalStorage[i]; + // + var unlockedMemesOrderedByDate = {}; + for (var key in unionOfLocalAndServer) + unlockedMemesOrderedByDate[unionOfLocalAndServer[key]["unlock_date"]] = unionOfLocalAndServer[key]; + //console.log("--unlockedMemesOrderedByDate--- " + JSON.stringify(unlockedMemesOrderedByDate)); + var res = []; + var sortedDates = Object.keys(unlockedMemesOrderedByDate).sort(); + for (var k = 0; k < sortedDates.length; k++) { + res.push(unlockedMemesOrderedByDate[sortedDates[k]]); + } + //console.log("--sortedDates--- " + JSON.stringify(sortedDates)); + _this.list_of_meme_to_display = res.reverse(); + _this.unlockedMemeCount = res.length; + localMemeRecord["unlocked_memes"] = _this.list_of_meme_to_display; + localMemeRecord["last_updated"] = Date.now(); + localMemeRecord["last_updated_readable_ts"] = moment__WEBPACK_IMPORTED_MODULE_2__().format("MMMM Do YYYY, h:mm:ss a Z"); + window.localStorage["already_shown_memes4"] = JSON.stringify(localMemeRecord); + //console.log("--localMemeRecord--- " + JSON.stringify(localMemeRecord)); + // + _this.uploadCurrentlyUnlockedMemeList(localMemeRecord); + }, + error: function (error) { return console.error('There was an error!', error); } + }); + return [2 /*return*/]; + }); + }); + }; + UnlockedMemesComponent.prototype.uploadCurrentlyUnlockedMemeList = function (already_shown_memes) { + /* + { + "user_id": "test", + "incentiveString": "test", + "whenInserted": "test", + "whenInsertedReadableTs": 1234, + "incentiveType": "test" + } + */ + var username = this.userProfileService.username; + var currentTimeTs = Date.now(); + var currentTimeReadableTs = moment__WEBPACK_IMPORTED_MODULE_2__().format("MMMM Do YYYY, h:mm:ss a Z"); + var headers = { "Content-Type": "application/json;charset=UTF-8" }; + var body = { + "user_id": username, + "whenInserted": currentTimeTs, + "whenInsertedReadableTs": currentTimeReadableTs, + "incentiveType": "meme", + "incentiveString": JSON.stringify(already_shown_memes) + }; + var flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].flaskServerForIncentives; + this.httpClient.post(flaskServerAPIEndpoint + "/store-unlocked-incentive", body) + .subscribe({ + next: function (data) { return console.log("--unlocked_meme-- " + JSON.stringify(data)); }, + error: function (error) { return console.error('There was an error!', error); } + }); + }; + UnlockedMemesComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_4__["UserProfileService"] }, + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"] } + ]; }; + UnlockedMemesComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-unlocked-memes', + template: __webpack_require__(/*! raw-loader!./unlocked-memes.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/unlocked-memes/unlocked-memes.component.html"), + styles: [__webpack_require__(/*! ./unlocked-memes.component.css */ "./src/app/incentive/unlocked-memes/unlocked-memes.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_4__["UserProfileService"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_6__["DatabaseService"]]) + ], UnlockedMemesComponent); + return UnlockedMemesComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/incentive/video-info-page/video-info-page.component.css": +/*!*************************************************************************!*\ + !*** ./src/app/incentive/video-info-page/video-info-page.component.css ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n\n.video-responsive{\n overflow:hidden;\n padding-bottom:56.25%;\n position:relative;\n height:650px;\n}\n\n.video-responsive iframe{\n left:0;\n top:0;\n height:100%;\n width:100%;\n position:absolute;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL3ZpZGVvLWluZm8tcGFnZS92aWRlby1pbmZvLXBhZ2UuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6Qjs7QUFFQTtJQUNJLGVBQWU7SUFDZixxQkFBcUI7SUFDckIsaUJBQWlCO0lBQ2pCLFlBQVk7QUFDaEI7O0FBQ0E7SUFDSSxNQUFNO0lBQ04sS0FBSztJQUNMLFdBQVc7SUFDWCxVQUFVO0lBQ1YsaUJBQWlCO0FBQ3JCIiwiZmlsZSI6InNyYy9hcHAvaW5jZW50aXZlL3ZpZGVvLWluZm8tcGFnZS92aWRlby1pbmZvLXBhZ2UuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59XG5cbi52aWRlby1yZXNwb25zaXZle1xuICAgIG92ZXJmbG93OmhpZGRlbjtcbiAgICBwYWRkaW5nLWJvdHRvbTo1Ni4yNSU7XG4gICAgcG9zaXRpb246cmVsYXRpdmU7XG4gICAgaGVpZ2h0OjY1MHB4O1xufVxuLnZpZGVvLXJlc3BvbnNpdmUgaWZyYW1le1xuICAgIGxlZnQ6MDtcbiAgICB0b3A6MDtcbiAgICBoZWlnaHQ6MTAwJTtcbiAgICB3aWR0aDoxMDAlO1xuICAgIHBvc2l0aW9uOmFic29sdXRlO1xufSJdfQ== */" + +/***/ }), + +/***/ "./src/app/incentive/video-info-page/video-info-page.component.ts": +/*!************************************************************************!*\ + !*** ./src/app/incentive/video-info-page/video-info-page.component.ts ***! + \************************************************************************/ +/*! exports provided: VideoInfoPageComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VideoInfoPageComponent", function() { return VideoInfoPageComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + +var VideoInfoPageComponent = /** @class */ (function () { + function VideoInfoPageComponent(menuCtrl, appUsageDb) { + this.menuCtrl = menuCtrl; + this.appUsageDb = appUsageDb; + } + VideoInfoPageComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + VideoInfoPageComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageEnter("reward_video_info_page"); + }; + VideoInfoPageComponent.prototype.ionViewDidLeave = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageExit("reward_video_info_page"); + }; + VideoInfoPageComponent.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__["DatabaseService"] } + ]; }; + VideoInfoPageComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-video-info-page', + template: __webpack_require__(/*! raw-loader!./video-info-page.component.html */ "./node_modules/raw-loader/index.js!./src/app/incentive/video-info-page/video-info-page.component.html"), + styles: [__webpack_require__(/*! ./video-info-page.component.css */ "./src/app/incentive/video-info-page/video-info-page.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_3__["DatabaseService"]]) + ], VideoInfoPageComponent); + return VideoInfoPageComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/intervention/harvard-arc-apps/front-page/front-page.component.css": +/*!***********************************************************************************!*\ + !*** ./src/app/intervention/harvard-arc-apps/front-page/front-page.component.css ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW50ZXJ2ZW50aW9uL2hhcnZhcmQtYXJjLWFwcHMvZnJvbnQtcGFnZS9mcm9udC1wYWdlLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbnRlcnZlbnRpb24vaGFydmFyZC1hcmMtYXBwcy9mcm9udC1wYWdlL2Zyb250LXBhZ2UuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/intervention/harvard-arc-apps/front-page/front-page.component.ts": +/*!**********************************************************************************!*\ + !*** ./src/app/intervention/harvard-arc-apps/front-page/front-page.component.ts ***! + \**********************************************************************************/ +/*! exports provided: FrontPageComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FrontPageComponent", function() { return FrontPageComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); + + + + +var FrontPageComponent = /** @class */ (function () { + function FrontPageComponent(router, navController, menuCtrl) { + this.router = router; + this.navController = navController; + this.menuCtrl = menuCtrl; + this.TM_apps_thumbs = [ + { + name: "Tomato Timer", + url: "https://tomato-timer.com/", + img: "./assets/img/arcapps/tomatoapp.png", + description: "Tomato timer chunks larger-works into a set of intervals separated by short breaks." + }, + { + name: "Forest", + url: "https://www.forestapp.cc/", + img: "./assets/img/arcapps/forestapp.png", + description: "Forest is an app that helps you stay focused on the important things in life." + }, + { + name: "Focus", + url: "https://heyfocus.com/", + img: "./assets/img/arcapps/focusapp.png", + description: "Focus is a distraction blocker that helps you improve your productivity." + }, + { + name: "MyStudyLife", + url: "https://www.mystudylife.com/", + img: "./assets/img/arcapps/mystudylifeapp.png", + description: "MyStudyLife is a cross-platform planner that stores classes, homework, and exams in the cloud." + }, + { + name: "Week Plan", + url: "https://weekplan.net/", + img: "./assets/img/arcapps/weekplanapp.png", + description: "Week Plan is a priority planner for highly effective people." + }, + { + name: "SelfControl", + url: "https://selfcontrolapp.com/", + img: "./assets/img/arcapps/selfcontrolapp.png", + description: "SelfControl is a free Mac application to help you avoid distracting websites." + }, + { + name: "Freedom", + url: "https://freedom.to/", + img: "./assets/img/arcapps/freedomapp.jpg", + description: "Freedom is an app and website blocker used by over 1,000,000 people to reclaim focus and productivity." + }, + { + name: "StayFocusd", + url: "https://chrome.google.com/webstore/detail/stayfocusd/laankejkbhbdhmipfmgcngdelahlfoji?hl=en", + img: "./assets/img/arcapps/stayfocusdapp.png", + description: "StayFocusd is a productivity extension for Google Chrome that restricts the amount of time you can spend on time-wasting websites." + }, + { + name: "Cold Turkey", + url: "https://getcoldturkey.com/", + img: "./assets/img/arcapps/coldturkeyapp.png", + description: "Cold Turkey is a free website blocker designed for studying or focusing on work." + }, + ]; + this.TM_apps = [ + { name: "Tomato Timer", url: "https://tomato-timer.com/" }, + { name: "Forest", url: "https://www.forestapp.cc/" }, + { name: "Focus", url: "https://heyfocus.com/" }, + { name: "mystudylife", url: "https://tomato-timer.com/" }, + { name: "weekplan", url: "https://tomato-timer.com/" }, + ]; + this.Internet_Blocking_Tools = [ + { name: "SelfControlapp", url: "https://selfcontrolapp.com/" }, + { name: "Freedom", url: "https://tomato-timer.com/" }, + { name: "Stayfocusd", url: "https://tomato-timer.com/" }, + { name: "getcoldturckey", url: "https://tomato-timer.com/" }, + ]; + this.Task_Management = [ + { name: "Asana: Organize Tasks and Work", url: "https://selfcontrolapp.com/" }, + { name: "Trello", url: "https://tomato-timer.com/" }, + { name: "Wunderlist", url: "https://tomato-timer.com/" }, + { name: "Google Calendar", url: "https://tomato-timer.com/" }, + { name: "Toodledo", url: "https://tomato-timer.com/" }, + ]; + } + FrontPageComponent.prototype.ngOnInit = function () { + this.menuCtrl.close(); + }; + FrontPageComponent.prototype.goHome = function () { + this.navController.navigateRoot(['home']); + }; + //"window.open('http://example.com/login/{{user._id}}', '_system', 'location=yes'); return false;" + FrontPageComponent.prototype.visitTheURL = function (url) { + console.log("visitTheURL"); + window.open(url, '_system', 'location=yes'); + return false; + }; + FrontPageComponent.ctorParameters = function () { return [ + { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NavController"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"] } + ]; }; + FrontPageComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-front-page', + template: __webpack_require__(/*! raw-loader!./front-page.component.html */ "./node_modules/raw-loader/index.js!./src/app/intervention/harvard-arc-apps/front-page/front-page.component.html"), + styles: [__webpack_require__(/*! ./front-page.component.css */ "./src/app/intervention/harvard-arc-apps/front-page/front-page.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NavController"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["MenuController"]]) + ], FrontPageComponent); + return FrontPageComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/intervention/harvard-arc-apps/harvard-arc-apps.module.ts": +/*!**************************************************************************!*\ + !*** ./src/app/intervention/harvard-arc-apps/harvard-arc-apps.module.ts ***! + \**************************************************************************/ +/*! exports provided: HarvardArcAppsModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HarvardArcAppsModule", function() { return HarvardArcAppsModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _front_page_front_page_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./front-page/front-page.component */ "./src/app/intervention/harvard-arc-apps/front-page/front-page.component.ts"); + + + + +var HarvardArcAppsModule = /** @class */ (function () { + function HarvardArcAppsModule() { + } + HarvardArcAppsModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [_front_page_front_page_component__WEBPACK_IMPORTED_MODULE_3__["FrontPageComponent"]], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"] + ], + exports: [_front_page_front_page_component__WEBPACK_IMPORTED_MODULE_3__["FrontPageComponent"]], + schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]] + }) + ], HarvardArcAppsModule); + return HarvardArcAppsModule; +}()); + + + +/***/ }), + +/***/ "./src/app/intervention/intervention.module.ts": +/*!*****************************************************!*\ + !*** ./src/app/intervention/intervention.module.ts ***! + \*****************************************************/ +/*! exports provided: InterventionModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterventionModule", function() { return InterventionModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _harvard_arc_apps_harvard_arc_apps_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./harvard-arc-apps/harvard-arc-apps.module */ "./src/app/intervention/harvard-arc-apps/harvard-arc-apps.module.ts"); + + + + +var InterventionModule = /** @class */ (function () { + function InterventionModule() { + } + InterventionModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], + _harvard_arc_apps_harvard_arc_apps_module__WEBPACK_IMPORTED_MODULE_3__["HarvardArcAppsModule"] + ], + schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]] + }) + ], InterventionModule); + return InterventionModule; +}()); + + + +/***/ }), + +/***/ "./src/app/monitor/database.service.ts": +/*!*********************************************!*\ + !*** ./src/app/monitor/database.service.ts ***! + \*********************************************/ +/*! exports provided: DatabaseService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DatabaseService", function() { return DatabaseService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_native_sqlite_porter_ngx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic-native/sqlite-porter/ngx */ "./node_modules/@ionic-native/sqlite-porter/ngx/index.js"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var _ionic_native_sqlite_ngx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ionic-native/sqlite/ngx */ "./node_modules/@ionic-native/sqlite/ngx/index.js"); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* Installation: + +ionic install @ionic-native/sqlite @ionic-native/sqlite-porter +ionic cordova plugin add cordova-sqlite-storage +ionic cordova plugin add uk.co.workingedge.cordova.plugin.sqliteporter + +Follow reference: https://devdactic.com/ionic-4-sqlite-queries/ +*/ + + + + + + + + + +var DatabaseService = /** @class */ (function () { + function DatabaseService(plt, sqlitePorter, sqlite, userProfileService, http) { + var _this = this; + this.plt = plt; + this.sqlitePorter = sqlitePorter; + this.sqlite = sqlite; + this.userProfileService = userProfileService; + this.http = http; + this.dbReady = new rxjs__WEBPACK_IMPORTED_MODULE_6__["BehaviorSubject"](false); + this.tracks = new rxjs__WEBPACK_IMPORTED_MODULE_6__["BehaviorSubject"]([]); + this.plt.ready().then(function () { + _this.sqlite.create({ + name: 'tracks.db', + location: 'default' + }).then(function (db) { + _this.database = db; + //this.dropTable(); + //console.log("table deleted!"); + _this.createDatabase(); + }); + }); + } + DatabaseService.prototype.createDatabase = function () { + var _this = this; + console.log("start seedDatabase!"); + return this.http.get('assets/track.sql', { responseType: 'text' }) + .subscribe(function (sql) { + _this.sqlitePorter.importSqlToDb(_this.database, sql) + .then(function (_) { + console.log('Before displayTracks'); + _this.displayTracks(); + console.log('Tracks displayed'); + _this.dbReady.next(true); + }) + .catch(function (e) { return console.error("In seedDatabase:" + e); }); + }); + }; + DatabaseService.prototype.getDatabaseState = function () { + return this.dbReady.asObservable(); + }; + DatabaseService.prototype.getTracks = function () { + return this.tracks.asObservable(); + }; + DatabaseService.prototype.dropTable = function () { + return this.database.executeSql('DROP TABLE IF EXISTS tracks').then(function (data) { + console.log('Table deleted!'); + }).catch(function (e) { + console.log("dropTable:" + JSON.stringify(e)); + //this.isTableExist(); + }); + }; + DatabaseService.prototype.emptyTable = function () { + return this.database.executeSql('DELETE FROM tracks').then(function (data) { + console.log('Table emptied!'); + }).catch(function (e) { + console.log("deleteTable:" + JSON.stringify(e)); + }); + }; + DatabaseService.prototype.isTableExist = function () { + console.log("Inside isTableEmpty:"); + //return this.database.executeSql('SELECT * FROM tracks', []).then(data => { + return this.database.executeSql("SELECT * FROM sqlite_master WHERE name ='tracks' and type='table'", []).then(function (data) { + var rowlength = data.rows.length; + console.log("isTableEmpty rowlength= " + rowlength); + return rowlength != 0; + }).catch(function (e) { + console.log("At isTableNotEmpty:" + JSON.stringify(e)); + return false; + }); + }; + DatabaseService.prototype.isTableEmpty = function () { + console.log("Inside isTableEmpty:"); + return this.database.executeSql('SELECT * FROM tracks', []).then(function (data) { + var rowlength = data.rows.length; + console.log("isTableEmpty rowlength= " + rowlength); + return rowlength == 0; + }).catch(function (e) { + console.log("At isTableNotEmpty:" + JSON.stringify(e)); + return true; + }); + }; + DatabaseService.prototype.saveAppUsageEnter = function (pageName) { + var _this = this; + this.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + var day_count = Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length; + _this.addTrack(pageName, "Enter", _this.userProfileService.username, day_count); + } + }); + }; + DatabaseService.prototype.saveAppUsageExit = function (pageName) { + var _this = this; + this.getDatabaseState().subscribe(function (rdy) { + if (rdy) { + var day_count = Object.keys(_this.userProfileService.userProfile.survey_data.daily_survey).length; + _this.addTrack(pageName, "Exit", _this.userProfileService.username, day_count); + } + }); + }; + //save usage + /* + saveAppUsage(pageName, eventStatus, username, day_count){ + this.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.addTrack(pageName, eventStatus, username, day_count); + } + }); + } + */ + DatabaseService.prototype.addTrack = function (pageName, eventStatus, username, day_count) { + var currentTime = moment__WEBPACK_IMPORTED_MODULE_7__().format('MMMM Do YYYY, h:mm:ss a Z'); + var currentDate = moment__WEBPACK_IMPORTED_MODULE_7__().format('YYYYMMDD'); + var unix_ts = new Date().getTime(); + var data = [pageName, currentTime, currentDate, unix_ts, day_count, eventStatus, username]; + return this.database.executeSql('INSERT INTO tracks (pageName, eventTime, eventDate, unix_ts, day_count, eventStatus, username) VALUES (?, ?, ?, ?, ?, ?, ?)', data).then(function (data) { + console.log('App usage added!! ' + pageName + ", " + eventStatus); + //this.displayTracks(); + }).catch(function (e) { return console.log("In addTrack:" + pageName + " " + JSON.stringify(e)); }); + }; + DatabaseService.prototype.displayTracks = function () { + //let query = 'SELECT product.name, product.id, developer.name AS creator FROM product JOIN developer ON developer.id = product.creatorId'; + return this.database.executeSql('SELECT * FROM tracks', []).then(function (data) { + var currentTracks = []; + var rowlength = data.rows.length; + console.log("data.rows= " + rowlength); + if (rowlength > 0) { + for (var i = 0; i < rowlength; i++) { + console.log("data.rows= " + rowlength); + console.log("displayTracks " + i + " pageName: " + data.rows.item(i).pageName + ", eventTime " + data.rows.item(i).eventStatus); + //console.log("displayTracks "+i+" time: "+data.rows.item(i).eventTime); + currentTracks.push({ + id: data.rows.item(i).id, + pageName: data.rows.item(i).pageName, + eventTime: data.rows.item(i).eventTime, + eventDate: data.rows.item(i).eventDate, + unix_ts: data.rows.item(i).unix_ts, + day_count: data.rows.item(i).day_count, + eventStatus: data.rows.item(i).eventStatus, + username: data.rows.item(i).username, + }); + } + //console.log("currentTracks length: "+currentTracks.length); + } + //this.tracks.next(currentTracks); announce new value to all subscribers + }).catch(function (e) { return console.log("In displayTracks:" + e); }); + }; + DatabaseService.prototype.exportDatabaseToJson = function () { + return this.sqlitePorter.exportDbToJson(this.database).then(function (res) { + //console.log('Exported '+JSON.stringify(res)); + return res; + }).catch(function (e) { return console.error(e); }); + }; + DatabaseService.ctorParameters = function () { return [ + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_1__["Platform"] }, + { type: _ionic_native_sqlite_porter_ngx__WEBPACK_IMPORTED_MODULE_3__["SQLitePorter"] }, + { type: _ionic_native_sqlite_ngx__WEBPACK_IMPORTED_MODULE_5__["SQLite"] }, + { type: _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_8__["UserProfileService"] }, + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpClient"] } + ]; }; + DatabaseService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_angular__WEBPACK_IMPORTED_MODULE_1__["Platform"], + _ionic_native_sqlite_porter_ngx__WEBPACK_IMPORTED_MODULE_3__["SQLitePorter"], + _ionic_native_sqlite_ngx__WEBPACK_IMPORTED_MODULE_5__["SQLite"], + _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_8__["UserProfileService"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpClient"]]) + ], DatabaseService); + return DatabaseService; +}()); + + + +/***/ }), + +/***/ "./src/app/notification/notification.module.ts": +/*!*****************************************************!*\ + !*** ./src/app/notification/notification.module.ts ***! + \*****************************************************/ +/*! exports provided: NotificationModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationModule", function() { return NotificationModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _one_signal_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./one-signal.service */ "./src/app/notification/one-signal.service.ts"); +/* + +Install following, then this module shall work. +ionic cordova plugin add onesignal-cordova-plugin +npm install @ionic-native/onesignal + +This module can handle notificationReceive/Open when app is not killed. +otherwise: + +Implement in android/ios platform if need to receive notification +when app is killed. + +Copy MyNotificationExtenderBareBones.java file to src.io.ionic folder +add below to androidmanifest.xml + + + + + + + +*/ + + + + +var NotificationModule = /** @class */ (function () { + function NotificationModule() { + } + NotificationModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"] + ], + providers: [_one_signal_service__WEBPACK_IMPORTED_MODULE_3__["OneSignalService"]] + }) + ], NotificationModule); + return NotificationModule; +}()); + + + +/***/ }), + +/***/ "./src/app/notification/one-signal.service.ts": +/*!****************************************************!*\ + !*** ./src/app/notification/one-signal.service.ts ***! + \****************************************************/ +/*! exports provided: OneSignalService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OneSignalService", function() { return OneSignalService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic-native/onesignal/ngx */ "./node_modules/@ionic-native/onesignal/ngx/index.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); + + + + + + + + +var OneSignalService = /** @class */ (function () { + function OneSignalService(oneSignal, alertCtrl, http, userProfileService) { + this.oneSignal = oneSignal; + this.alertCtrl = alertCtrl; + this.http = http; + this.userProfileService = userProfileService; + } + OneSignalService.prototype.initOneSignal = function () { + //link for one signal tutorial ==========> https://devdactic.com/push-notifications-ionic-onesignal/ + var _this = this; + //this.oneSignal.startInit('YOUR ONESIGNAL APP ID', 'YOUR ANDROID ID'); + console.log("--Onesignal-- " + "init called"); + this.oneSignal.startInit(src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].oneSignalAppId, src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].firebaseConfig.messagingSenderId); + this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.None); + //this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.InAppAlert); + //Sets a notification received handler. Only called if the app is + //running in the foreground at the time the notification was received. + this.oneSignal.handleNotificationReceived().subscribe(function (data) { + _this.time = new Date().getTime(); + _this.formattedTime = moment__WEBPACK_IMPORTED_MODULE_4__().format('MMMM Do YYYY, h:mm:ss a Z'); + console.log("notification is received at: " + _this.time + " formatted: " + _this.formattedTime); + var title = data.payload.title; + var msg = data.payload.body; + //let additionalData = data.payload.additionalData; + //this.showAlert(title, msg, additionalData.task); + //this.showAlert(title+" "+msg, "notification is received at: "+this.time+" formatted: "+this.formattedTime); + }); + //Sets a notification opened handler. The instance will be called when + //a notification is tapped on from the notification shade (ANDROID) or + //notification center (iOS), or when closing an Alert notification shown in the app + //(if InAppAlert is enabled in inFocusDisplaying, below). + this.oneSignal.handleNotificationOpened().subscribe(function (data) { + // do something when a notification is opened + _this.time = new Date().getTime(); + _this.formattedTime = moment__WEBPACK_IMPORTED_MODULE_4__().format('MMMM Do YYYY, h:mm:ss a Z'); + console.log("notification is opened at: " + _this.time + " formatted: " + _this.formattedTime); + var additionalData = data.notification.payload.additionalData; + //this.showAlert('Notification opened', 'You already read this before', additionalData.task); + //this.showAlert('Notification opened', "notification is opened at: "+this.time+" formatted: "+this.formattedTime); + }); + //--- clearOneSignalNotifications + //--- https://documentation.onesignal.com/docs/cordova-sdk + this.oneSignal.endInit(); + this.oneSignal.getPermissionSubscriptionState().then(function (status) { + console.log("--Onesignal-- " + JSON.stringify(status)); + window.localStorage.setItem("oneSignalPlayerId", "" + status.subscriptionStatus.userId); + /* + this.userProfileService.userProfile.oneSignalPlayerId = status.subscriptionStatus.userId; + this.userProfileService.saveProfileToDevice(); + this.userProfileService.saveToServer(); + */ + }); + }; + OneSignalService.prototype.showAlert = function (title, msg) { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var alert; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.alertCtrl.create({ + header: title, + subHeader: msg, + buttons: [ + 'OK' + /* { + text: `Action: ${task}`, + handler: () => { + // E.g: Navigate to a specific screen + } + } */ + ] + })]; + case 1: + alert = _a.sent(); + alert.present(); + return [2 /*return*/]; + } + }); + }); + }; + OneSignalService.ctorParameters = function () { return [ + { type: _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_2__["OneSignal"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["AlertController"] }, + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"] }, + { type: _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_7__["UserProfileService"] } + ]; }; + OneSignalService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_2__["OneSignal"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["AlertController"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_6__["HttpClient"], + _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_7__["UserProfileService"]]) + ], OneSignalService); + return OneSignalService; +}()); + + + +/***/ }), + +/***/ "./src/app/reducers/index.ts": +/*!***********************************!*\ + !*** ./src/app/reducers/index.ts ***! + \***********************************/ +/*! exports provided: reducers, metaReducers */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducers", function() { return reducers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "metaReducers", function() { return metaReducers; }); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts"); + +var reducers = {}; +var metaReducers = !_environments_environment__WEBPACK_IMPORTED_MODULE_0__["environment"].production ? [] : []; + + +/***/ }), + +/***/ "./src/app/storage/aws-s3.service.ts": +/*!*******************************************!*\ + !*** ./src/app/storage/aws-s3.service.ts ***! + \*******************************************/ +/*! exports provided: AwsS3Service */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AwsS3Service", function() { return AwsS3Service; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var _storage_base_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./storage-base.service */ "./src/app/storage/storage-base.service.ts"); +/* harmony import */ var _encrdecrservice_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./encrdecrservice.service */ "./src/app/storage/encrdecrservice.service.ts"); +/* harmony import */ var _network_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./network.service */ "./src/app/storage/network.service.ts"); +/* harmony import */ var aws_sdk__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! aws-sdk */ "./node_modules/aws-sdk/lib/browser.js"); +/* harmony import */ var aws_sdk__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(aws_sdk__WEBPACK_IMPORTED_MODULE_6__); +// +//--- The goal of this file is to serve as base class for all storeage classes, +// for example, store to firebase, azure, aws s3. All common functions used +// to them will be added here in the future, + + + + + + + +var AwsS3Service = /** @class */ (function (_super) { + tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AwsS3Service, _super); + function AwsS3Service(networkSvc, EncrDecr) { + var _this = _super.call(this) || this; + _this.networkSvc = networkSvc; + _this.EncrDecr = EncrDecr; + return _this; + } + AwsS3Service.prototype.upload = function (subfolder, result) { + var _this = this; + this.bucketName = _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].awsConfig.bucketName; + var bucketRegion = _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].awsConfig.bucketRegion; + var IdentityPoolId = _environments_environment__WEBPACK_IMPORTED_MODULE_2__["environment"].awsConfig.IdentityPoolId; + //var accessKeyId = environment.awsConfig.accessKeyId; + //var secretAccessKey = environment.awsConfig.secretAccessKey; + //set properties after creating AWS.Config using the update method + aws_sdk__WEBPACK_IMPORTED_MODULE_6__["config"].update({ + region: bucketRegion, + credentials: new aws_sdk__WEBPACK_IMPORTED_MODULE_6__["CognitoIdentityCredentials"]({ + IdentityPoolId: IdentityPoolId + }) + }); + //creates a new Amazon S3 service object + this.s3 = new aws_sdk__WEBPACK_IMPORTED_MODULE_6__["S3"]({ + apiVersion: '2006-03-01', + params: { Bucket: this.bucketName } + }); + /*const myS3Credentials = { + accessKeyId: accessKeyId, + secretAcccessKey: secretAccessKey, + }; + + var s3 = new AWS.S3({ + apiVersion: '2006-03-01', + params: {Bucket: bucketName}, + accessKeyId: accessKeyId, + secretAccessKey: secretAccessKey + }); */ + //create a file from result passed as a JSONObject + var fileName = "result_" + (new Date().getTime()) + "_" + this.EncrDecr.getSHA256(localStorage.getItem('loggedInUser')) + ".json"; + this.currentFile = new File([JSON.stringify(result)], fileName, { type: "text/plain" }); + //upload currentFile to the subfolder in S3 bucket + this.STORAGE_REQ_KEY = subfolder + "_result"; + this.subfolder = subfolder; + // Upload data and data saved in local Storage to AWS when online, save data + // to local storage when offline. + if (this.networkSvc.getCurrentNetworkStatus() == _network_service__WEBPACK_IMPORTED_MODULE_5__["ConnectionStatus"].Online) { + if (window.localStorage.getItem(this.STORAGE_REQ_KEY) != undefined) + this.uploadLocalData(); + this.uploadToS3(subfolder + "/" + fileName, result).catch(function (err) { + if (err) { + console.log('Caught thrown error: ' + err.message); + _this.storeResultLocally(result); + } + }); + } + else { + this.storeResultLocally(result); + } + }; + AwsS3Service.prototype.uploadToS3 = function (key, result) { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + this.s3.upload({ + Bucket: this.bucketName, + Key: key, + Body: JSON.stringify(result) + //Body: this.currentFile + }, function (err, data) { + if (err) { + console.log('There was an error uploading your file: ' + err.message); + throw new Error(err.message); + } + }); + return [2 /*return*/]; + }); + }); + }; + // upload data in local storage to AWS and clear local Data, if failed, save + // data in local storage. + AwsS3Service.prototype.uploadLocalData = function () { + var _this = this; + var storedObj = this.getLocalData(); + this.clearLocalData(); + if (storedObj.length > 0) { + var _loop_1 = function (op) { + console.log(JSON.stringify(op)); + fileName = "result_" + (new Date().getTime()) + "_" + this_1.EncrDecr.getSHA256(localStorage.getItem('loggedInUser')) + ".json"; + this_1.uploadToS3(this_1.subfolder + "/" + fileName, [op.data]).catch(function (err) { + if (err) { + console.log('Caught thrown error: ' + err.message); + _this.saveJsonObjLocally(op); + } + console.log('In uploadLocalData: update file successfully'); + }); + }; + var this_1 = this, fileName; + for (var _i = 0, storedObj_1 = storedObj; _i < storedObj_1.length; _i++) { + var op = storedObj_1[_i]; + _loop_1(op); + } + } + }; + AwsS3Service.ctorParameters = function () { return [ + { type: _network_service__WEBPACK_IMPORTED_MODULE_5__["NetworkService"] }, + { type: _encrdecrservice_service__WEBPACK_IMPORTED_MODULE_4__["EncrDecrService"] } + ]; }; + AwsS3Service = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_network_service__WEBPACK_IMPORTED_MODULE_5__["NetworkService"], + _encrdecrservice_service__WEBPACK_IMPORTED_MODULE_4__["EncrDecrService"]]) + ], AwsS3Service); + return AwsS3Service; +}(_storage_base_service__WEBPACK_IMPORTED_MODULE_3__["StoreBaseService"])); + + + +/***/ }), + +/***/ "./src/app/storage/encrdecrservice.service.ts": +/*!****************************************************!*\ + !*** ./src/app/storage/encrdecrservice.service.ts ***! + \****************************************************/ +/*! exports provided: EncrDecrService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EncrDecrService", function() { return EncrDecrService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! crypto-js */ "./node_modules/crypto-js/index.js"); +/* harmony import */ var crypto_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto_js__WEBPACK_IMPORTED_MODULE_2__); + + + +var EncrDecrService = /** @class */ (function () { + function EncrDecrService() { + } + //The set method is use for encrypt the value. + EncrDecrService.prototype.set = function (keys, value) { + var key = crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Utf8.parse(keys); + var iv = crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Utf8.parse(keys); + var encrypted = crypto_js__WEBPACK_IMPORTED_MODULE_2__["AES"].encrypt(crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Utf8.parse(value.toString()), key, { + keySize: 128 / 8, + iv: iv, + mode: crypto_js__WEBPACK_IMPORTED_MODULE_2__["mode"].CBC, + padding: crypto_js__WEBPACK_IMPORTED_MODULE_2__["pad"].Pkcs7 + }); + return encrypted.toString(); + }; + //The get method is use for decrypt the value. + EncrDecrService.prototype.get = function (keys, value) { + var key = crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Utf8.parse(keys); + var iv = crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Utf8.parse(keys); + var decrypted = crypto_js__WEBPACK_IMPORTED_MODULE_2__["AES"].decrypt(value, key, { + keySize: 128 / 8, + iv: iv, + mode: crypto_js__WEBPACK_IMPORTED_MODULE_2__["mode"].CBC, + padding: crypto_js__WEBPACK_IMPORTED_MODULE_2__["pad"].Pkcs7 + }); + return decrypted.toString(crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Utf8); + }; + EncrDecrService.prototype.encrypt = function (msg, pass) { + // Code goes here + var keySize = 256; + var ivSize = 128; + var iterations = 100; + //var message = "Hello World"; + //var password = "Secret Password"; + var salt = crypto_js__WEBPACK_IMPORTED_MODULE_2__["lib"].WordArray.random(128 / 8); + var key = crypto_js__WEBPACK_IMPORTED_MODULE_2__["PBKDF2"](pass, salt, { + keySize: keySize / 32, + iterations: iterations + }); + var iv = crypto_js__WEBPACK_IMPORTED_MODULE_2__["lib"].WordArray.random(128 / 8); + var encrypted = crypto_js__WEBPACK_IMPORTED_MODULE_2__["AES"].encrypt(msg, key, { + iv: iv, + padding: crypto_js__WEBPACK_IMPORTED_MODULE_2__["pad"].Pkcs7, + mode: crypto_js__WEBPACK_IMPORTED_MODULE_2__["mode"].CBC + }); + // salt, iv will be hex 32 in length + // append them to the ciphertext for use in decryption + var transitmessage = salt.toString() + iv.toString() + encrypted.toString(); + return transitmessage; + }; + EncrDecrService.prototype.decrypt = function (transitmessage, pass) { + // Code goes here + var keySize = 256; + var ivSize = 128; + var iterations = 100; + var salt = crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Hex.parse(transitmessage.substr(0, 32)); + var iv = crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Hex.parse(transitmessage.substr(32, 32)); + var encrypted = transitmessage.substring(64); + var key = crypto_js__WEBPACK_IMPORTED_MODULE_2__["PBKDF2"](pass, salt, { + keySize: keySize / 32, + iterations: iterations + }); + var decrypted = crypto_js__WEBPACK_IMPORTED_MODULE_2__["AES"].decrypt(encrypted, key, { + iv: iv, + padding: crypto_js__WEBPACK_IMPORTED_MODULE_2__["pad"].Pkcs7, + mode: crypto_js__WEBPACK_IMPORTED_MODULE_2__["mode"].CBC + }); + return decrypted.toString(crypto_js__WEBPACK_IMPORTED_MODULE_2__["enc"].Utf8); + }; + EncrDecrService.prototype.getSHA256 = function (inputStr) { + return crypto_js__WEBPACK_IMPORTED_MODULE_2__["SHA256"](inputStr); + }; + EncrDecrService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", []) + ], EncrDecrService); + return EncrDecrService; +}()); + + + +/***/ }), + +/***/ "./src/app/storage/network.service.ts": +/*!********************************************!*\ + !*** ./src/app/storage/network.service.ts ***! + \********************************************/ +/*! exports provided: ConnectionStatus, NetworkService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionStatus", function() { return ConnectionStatus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NetworkService", function() { return NetworkService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ionic_native_network_ngx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic-native/network/ngx */ "./node_modules/@ionic-native/network/ngx/index.js"); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); + + + + + +var ConnectionStatus; +(function (ConnectionStatus) { + ConnectionStatus[ConnectionStatus["Online"] = 0] = "Online"; + ConnectionStatus[ConnectionStatus["Offline"] = 1] = "Offline"; +})(ConnectionStatus || (ConnectionStatus = {})); +var NetworkService = /** @class */ (function () { + function NetworkService(network, toastController, plt) { + var _this = this; + this.network = network; + this.toastController = toastController; + this.plt = plt; + this.status = new rxjs__WEBPACK_IMPORTED_MODULE_3__["BehaviorSubject"](ConnectionStatus.Offline); + this.plt.ready().then(function () { + _this.initializeNetworkEvents(); + var status = _this.network.type !== 'none' ? ConnectionStatus.Online : ConnectionStatus.Offline; + _this.status.next(status); + }); + } + NetworkService.prototype.initializeNetworkEvents = function () { + var _this = this; + this.network.onDisconnect().subscribe(function () { + if (_this.status.getValue() === ConnectionStatus.Online) { + console.log('WE ARE OFFLINE'); + _this.updateNetworkStatus(ConnectionStatus.Offline); + } + }); + this.network.onConnect().subscribe(function () { + if (_this.status.getValue() === ConnectionStatus.Offline) { + console.log('WE ARE ONLINE'); + _this.updateNetworkStatus(ConnectionStatus.Online); + } + }); + }; + NetworkService.prototype.updateNetworkStatus = function (status) { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var connection, toast; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + this.status.next(status); + connection = status == ConnectionStatus.Offline ? 'Offline' : 'Online'; + toast = this.toastController.create({ + message: "You are now " + connection, + duration: 3000, + position: 'bottom' + }); + toast.then(function (toast) { return toast.present(); }); + return [2 /*return*/]; + }); + }); + }; + NetworkService.prototype.onNetworkChange = function () { + return this.status.asObservable(); + }; + NetworkService.prototype.getCurrentNetworkStatus = function () { + return this.status.getValue(); + }; + NetworkService.ctorParameters = function () { return [ + { type: _ionic_native_network_ngx__WEBPACK_IMPORTED_MODULE_2__["Network"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_4__["ToastController"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_4__["Platform"] } + ]; }; + NetworkService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ionic_native_network_ngx__WEBPACK_IMPORTED_MODULE_2__["Network"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_4__["ToastController"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_4__["Platform"]]) + ], NetworkService); + return NetworkService; +}()); + + + +/***/ }), + +/***/ "./src/app/storage/storage-base.service.ts": +/*!*************************************************!*\ + !*** ./src/app/storage/storage-base.service.ts ***! + \*************************************************/ +/*! exports provided: StoreBaseService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoreBaseService", function() { return StoreBaseService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__); +// +//--- The goal of this file is to serve as base class for all storeage classes, +// for example, store to firebase, azure, aws s3. All common functions used +// to them will be added here in the future, + + + +var StoreBaseService = /** @class */ (function () { + function StoreBaseService() { + } + StoreBaseService.prototype.storeResultLocally = function (surveyResult) { + var obj = { + date: moment__WEBPACK_IMPORTED_MODULE_2__().format('YYYYMMDD'), + data: surveyResult + }; + console.log("Before saveJsonObjLocally: " + this.STORAGE_REQ_KEY); + if (window.localStorage.getItem(this.STORAGE_REQ_KEY) == undefined) { + var storedObj = [obj]; + window.localStorage.setItem(this.STORAGE_REQ_KEY, JSON.stringify(storedObj)); + } + else { + this.saveJsonObjLocally(obj); + } + }; + StoreBaseService.prototype.saveJsonObjLocally = function (obj) { + var storedObj = this.getLocalData(); + console.log("before push survey to local storage: " + JSON.stringify(storedObj)); + storedObj.push(obj); + console.log("after push survey to loca storage: " + JSON.stringify(storedObj)); + // Save old & new local transactions back to Storage + window.localStorage.setItem(this.STORAGE_REQ_KEY, JSON.stringify(storedObj)); + }; + StoreBaseService.prototype.getLocalData = function () { + return JSON.parse(window.localStorage.getItem(this.STORAGE_REQ_KEY)); + }; + StoreBaseService.prototype.clearLocalData = function () { + window.localStorage.removeItem(this.STORAGE_REQ_KEY); + }; + StoreBaseService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", []) + ], StoreBaseService); + return StoreBaseService; +}()); + + + +/***/ }), + +/***/ "./src/app/storage/storage.module.ts": +/*!*******************************************!*\ + !*** ./src/app/storage/storage.module.ts ***! + \*******************************************/ +/*! exports provided: StorageModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StorageModule", function() { return StorageModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _store_to_firebase_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./store-to-firebase.service */ "./src/app/storage/store-to-firebase.service.ts"); +/* harmony import */ var _angular_fire__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/fire */ "./node_modules/@angular/fire/index.js"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var _angular_fire_firestore__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/fire/firestore */ "./node_modules/@angular/fire/firestore/index.js"); +/* harmony import */ var _encrdecrservice_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./encrdecrservice.service */ "./src/app/storage/encrdecrservice.service.ts"); +/* harmony import */ var _aws_s3_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./aws-s3.service */ "./src/app/storage/aws-s3.service.ts"); +/* harmony import */ var _ionic_native_network_ngx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ionic-native/network/ngx */ "./node_modules/@ionic-native/network/ngx/index.js"); + + + + + + + + + + +var StorageModule = /** @class */ (function () { + function StorageModule() { + } + StorageModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], + _angular_fire__WEBPACK_IMPORTED_MODULE_4__["AngularFireModule"].initializeApp(_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].firebaseConfig), + _angular_fire_firestore__WEBPACK_IMPORTED_MODULE_6__["AngularFirestoreModule"] + ], + providers: [_store_to_firebase_service__WEBPACK_IMPORTED_MODULE_3__["StoreToFirebaseService"], _encrdecrservice_service__WEBPACK_IMPORTED_MODULE_7__["EncrDecrService"], _aws_s3_service__WEBPACK_IMPORTED_MODULE_8__["AwsS3Service"], _ionic_native_network_ngx__WEBPACK_IMPORTED_MODULE_9__["Network"]] + }) + ], StorageModule); + return StorageModule; +}()); + + + +/***/ }), + +/***/ "./src/app/storage/store-to-firebase.service.ts": +/*!******************************************************!*\ + !*** ./src/app/storage/store-to-firebase.service.ts ***! + \******************************************************/ +/*! exports provided: StoreToFirebaseService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StoreToFirebaseService", function() { return StoreToFirebaseService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_fire_firestore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/fire/firestore */ "./node_modules/@angular/fire/firestore/index.js"); +/* harmony import */ var _storage_base_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./storage-base.service */ "./src/app/storage/storage-base.service.ts"); +// +//--- The goal of this file is to upload an object to firebase, the configuration +//--- is at app/environments/environment.ts. At app/storage/storage.module.ts, +//--- we load the environment configuration and setup our module to use the +//--- AngularFire package + + + + +var StoreToFirebaseService = /** @class */ (function (_super) { + tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](StoreToFirebaseService, _super); + function StoreToFirebaseService(afs) { + var _this = _super.call(this) || this; + _this.afs = afs; + return _this; + } + //upload obj to path in firebase + StoreToFirebaseService.prototype.addSurvey = function (path, obj) { + var _this = this; + console.log("Start to addSurvey!"); + return new Promise(function (resolve, reject) { + _this.afs.collection(path).add(obj) + .then(function (res) { + resolve(res); + }, function (err) { return reject(err); }); + }); + }; + StoreToFirebaseService.ctorParameters = function () { return [ + { type: _angular_fire_firestore__WEBPACK_IMPORTED_MODULE_2__["AngularFirestore"] } + ]; }; + StoreToFirebaseService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root', + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_fire_firestore__WEBPACK_IMPORTED_MODULE_2__["AngularFirestore"]]) + ], StoreToFirebaseService); + return StoreToFirebaseService; +}(_storage_base_service__WEBPACK_IMPORTED_MODULE_3__["StoreBaseService"])); + + + +/***/ }), + +/***/ "./src/app/survey/action-types.ts": +/*!****************************************!*\ + !*** ./src/app/survey/action-types.ts ***! + \****************************************/ +/*! exports provided: SurveyActions */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _survey_actions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./survey.actions */ "./src/app/survey/survey.actions.ts"); +/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "SurveyActions", function() { return _survey_actions__WEBPACK_IMPORTED_MODULE_0__; }); + + + + +/***/ }), + +/***/ "./src/app/survey/aya-sample-survey/aya-sample-survey.component.scss": +/*!***************************************************************************!*\ + !*** ./src/app/survey/aya-sample-survey/aya-sample-survey.component.scss ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color {\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvc3VydmV5L2F5YS1zYW1wbGUtc3VydmV5L2F5YS1zYW1wbGUtc3VydmV5LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9zdXJ2ZXkvYXlhLXNhbXBsZS1zdXJ2ZXkvYXlhLXNhbXBsZS1zdXJ2ZXkuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSxxQkFBQTtBQ0NKIiwiZmlsZSI6InNyYy9hcHAvc3VydmV5L2F5YS1zYW1wbGUtc3VydmV5L2F5YS1zYW1wbGUtc3VydmV5LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/survey/aya-sample-survey/aya-sample-survey.component.ts": +/*!*************************************************************************!*\ + !*** ./src/app/survey/aya-sample-survey/aya-sample-survey.component.ts ***! + \*************************************************************************/ +/*! exports provided: AyaSampleSurveyComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AyaSampleSurveyComponent", function() { return AyaSampleSurveyComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ionic-native/mobile-accessibility/ngx */ "./node_modules/@ionic-native/mobile-accessibility/ngx/index.js"); + + + + + +var AyaSampleSurveyComponent = /** @class */ (function () { + function AyaSampleSurveyComponent(userProfileService, mobileAccessibility, appUsageDb) { + this.userProfileService = userProfileService; + this.mobileAccessibility = mobileAccessibility; + this.appUsageDb = appUsageDb; + } + AyaSampleSurveyComponent.prototype.ngOnInit = function () { + this.mobileAccessibility.usePreferredTextZoom(false); + }; + AyaSampleSurveyComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageEnter("aya_survey_page"); + }; + AyaSampleSurveyComponent.prototype.ionViewDidLeave = function () { + /* + console.log(this.pageTitle+": ionViewDidLeave"); + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.mobileAccessibility.usePreferredTextZoom(true); + this.appUsageDb.saveAppUsageExit("aya_survey_page"); + }; + AyaSampleSurveyComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"] }, + { type: _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__["MobileAccessibility"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__["DatabaseService"] } + ]; }; + AyaSampleSurveyComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-aya-sample-survey', + template: __webpack_require__(/*! raw-loader!./aya-sample-survey.component.html */ "./node_modules/raw-loader/index.js!./src/app/survey/aya-sample-survey/aya-sample-survey.component.html"), + styles: [__webpack_require__(/*! ./aya-sample-survey.component.scss */ "./src/app/survey/aya-sample-survey/aya-sample-survey.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"], + _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__["MobileAccessibility"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__["DatabaseService"]]) + ], AyaSampleSurveyComponent); + return AyaSampleSurveyComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/survey/dynamic-survey/dynamic-survey.component.scss": +/*!*********************************************************************!*\ + !*** ./src/app/survey/dynamic-survey/dynamic-survey.component.scss ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3N1cnZleS9keW5hbWljLXN1cnZleS9keW5hbWljLXN1cnZleS5jb21wb25lbnQuc2NzcyJ9 */" + +/***/ }), + +/***/ "./src/app/survey/dynamic-survey/dynamic-survey.component.ts": +/*!*******************************************************************!*\ + !*** ./src/app/survey/dynamic-survey/dynamic-survey.component.ts ***! + \*******************************************************************/ +/*! exports provided: DynamicSurveyComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DynamicSurveyComponent", function() { return DynamicSurveyComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); +/* harmony import */ var _storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../storage/aws-s3.service */ "./src/app/storage/aws-s3.service.ts"); +/* harmony import */ var _storage_encrdecrservice_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../storage/encrdecrservice.service */ "./src/app/storage/encrdecrservice.service.ts"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _ionic_native_app_version_ngx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic-native/app-version/ngx */ "./node_modules/@ionic-native/app-version/ngx/index.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var src_app_incentive_award_money_award_dollar_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/incentive/award-money/award-dollar.service */ "./src/app/incentive/award-money/award-dollar.service.ts"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); +/* harmony import */ var _survey_actions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../survey.actions */ "./src/app/survey/survey.actions.ts"); +/* harmony import */ var src_app_incentive_incentive_actions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! src/app/incentive/incentive.actions */ "./src/app/incentive/incentive.actions.ts"); +// +//--- The goal of this file is to dynamically generate a survey from a JSON file. +//--- Example JSON files are located in assets/survey folder. +//--- For more details on how to create a survey please see: https://github.com/StatisticalReinforcementLearningLab/SARAv2/tree/master/src/app/survey +//--- At a high level, this file does the following: +// (i) reads a JSON file in the "ngAfterViewInit" +// (ii) calls the "generateSurvey" function to create html codes for the survey +// (iii) creates a component dynamically and attached it to the "vc" component. +// + + + + + + + + + + + + + + + +var DynamicSurveyComponent = /** @class */ (function () { + function DynamicSurveyComponent(_compiler, _injector, _m, awsS3Service, EncrDecr, router, changeDetector, appVersion, alertCtrl, plt, userProfileService, + //private lifeInsightsProfileService: LifeInsightsProfileService, + store, awardDollarService) { + this._compiler = _compiler; + this._injector = _injector; + this._m = _m; + this.awsS3Service = awsS3Service; + this.EncrDecr = EncrDecr; + this.router = router; + this.changeDetector = changeDetector; + this.appVersion = appVersion; + this.alertCtrl = alertCtrl; + this.plt = plt; + this.userProfileService = userProfileService; + this.store = store; + this.awardDollarService = awardDollarService; + this.isLoading = true; + this.loadingComplete = false; + //surveyQuestionsInHTMLString = ""; + this.surveyQuestionsDict = {}; + } + DynamicSurveyComponent.prototype.ngOnInit = function () { }; + DynamicSurveyComponent.prototype.ngAfterViewInit = function () { + this.fetchSurveyQuestionsAndGenerateSurvey(); + this.getAppVersionNumber(); // to track which users has the latest version of the app. + //initiate the life-insight object + //this.lifeInsightsProfileService.importLifeInsightProfile(this.jsonFileLinkForSurvey); + }; + DynamicSurveyComponent.prototype.fetchSurveyQuestionsAndGenerateSurvey = function () { + var _this = this; + fetch('../../../assets/data/' + this.jsonFileLinkForSurvey + '.json').then(function (res) { return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](_this, void 0, void 0, function () { + var surveyQuestionsInJSONDictFormat, surveyQuestionsInHTMLString; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, res.json()]; + case 1: + surveyQuestionsInJSONDictFormat = _a.sent(); + surveyQuestionsInHTMLString = this.generateHTMLCodeForSurveyFromJSON(surveyQuestionsInJSONDictFormat); + this.surveyQuestionsInJSONDictFormat = surveyQuestionsInJSONDictFormat; + this.generateDynamicSurveyComponentFromHTML(surveyQuestionsInHTMLString); + return [2 /*return*/]; + } + }); + }); }); + }; + DynamicSurveyComponent.prototype.generateHTMLCodeForSurveyFromJSON = function (surveyQuestionsInJSONDictFormat) { + // This function takes the JSON object with questions + // and generate HTML codes for the survey. + // The HTML code is later used in a dynamically generated component to + // show it to the user. + this.surveyQuestionsDict = {}; + var surveyQuestionsInHTMLString; + //questions JSON format are a list. This loop goes through each questions and adds it to the HTML string + for (var i = 0; i < surveyQuestionsInJSONDictFormat.length; i++) { + var singleSurveyQuestionObj = surveyQuestionsInJSONDictFormat[i]; + this.surveyQuestionsDict[singleSurveyQuestionObj.name] = ""; + //the following line crates a html string for the survey. + surveyQuestionsInHTMLString = this.process_survey(singleSurveyQuestionObj, surveyQuestionsInHTMLString, singleSurveyQuestionObj.name); + } + // the final step to create HTML from JSON file. It adds a submit button right at the end. + surveyQuestionsInHTMLString = surveyQuestionsInHTMLString + '
'; + return surveyQuestionsInHTMLString; + }; + DynamicSurveyComponent.prototype.generateDynamicSurveyComponentFromHTML = function (surveyQuestionsInHTMLString) { + var _this = this; + //--- + //--- Generate a survey component dynamically from the "surveyQuestionsInHTMLString." + //--- The "surveyQuestionsInHTMLString" contains all the HTML for the template for dynamic component + //--- + var surveyComponent = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ template: surveyQuestionsInHTMLString })(/** @class */ (function () { + function class_1() { + //IMPORTANT: contains all the questions in the + this.surveyAnswersJSONObject = {}; + this.isQuestionIncomplete = {}; + this.lifeInsightObj = {}; + this.totalPoints = 0; + this.surveyQuestionsInJSONDictFormat = []; + } + class_1.prototype.ngOnInit = function () { + this.initializeSurveyAnswersJSONObject(); + }; + class_1.prototype.initializeSurveyAnswersJSONObject = function () { + //set start time when participants started the survey. + this.surveyAnswersJSONObject['surveyStartTimeUTC'] = new Date().getTime(); + //isQuestionIncomplete list tracks if questions are answered or not. + for (var i = 0; i < this.surveyQuestionsInJSONDictFormat.length; i++) + this.isQuestionIncomplete[this.surveyQuestionsInJSONDictFormat[i].name] = { "tag": this.surveyQuestionsInJSONDictFormat[i].tag }; + //initialize when different survey questions are clicked + this.surveyAnswersJSONObject['onclickTimeForDifferentQuestions'] = {}; + }; + class_1.prototype.inputchanged = function (question) { + //This function tracks if users clicked on a survey question and reacts. + console.log("Clicked on question: " + question); + //store in the answer object when `question` has been clicked. + this.surveyAnswersJSONObject['onclickTimeForDifferentQuestions'][question] = {}; + this.surveyAnswersJSONObject['onclickTimeForDifferentQuestions'][question].ts = Date.now(); + this.surveyAnswersJSONObject['onclickTimeForDifferentQuestions'][question].readable_ts = moment__WEBPACK_IMPORTED_MODULE_7__().format("MMMM Do YYYY, h:mm:ss a Z"); + delete this.isQuestionIncomplete[question]; //remove the key from isQuestionIncomplete + }; + class_1.prototype.inputchangedRangeTime = function (question, startTime) { + //--- console.log('holla: ' + question+" "+JSON.stringify($event.detail)); + // + startTime = startTime.replace("
", " "); + var startTimeSplit = startTime.split(" "); + var startTimeHour = parseInt(startTimeSplit[0]); + var amPmPart = startTimeSplit[1]; + if (amPmPart == 'PM') + startTimeHour = startTimeHour + 12; + //console.log("Clicked on question: " + question); + //console.log("Time: " + startTime + ", startTimeHour: " + startTimeHour); + var changedHourAfterInput; + var changedMinuteAfterInput; + var changedAMPMAfterInput; + if ((this.surveyAnswersJSONObject[question] * 10) % 10 == 5) { + changedHourAfterInput = startTimeHour + this.surveyAnswersJSONObject[question] - 0.5; + changedMinuteAfterInput = "30"; + } + else { + changedHourAfterInput = startTimeHour + this.surveyAnswersJSONObject[question]; + changedMinuteAfterInput = "00"; + } + changedHourAfterInput = changedHourAfterInput % 24; //if goes above 24 then change to zero. + if (changedHourAfterInput == 0) { + changedHourAfterInput = 12; + changedAMPMAfterInput = "AM"; + } + else if (changedHourAfterInput > 0 && changedHourAfterInput < 12) + changedAMPMAfterInput = "AM"; + else if (changedHourAfterInput == 12) { + changedAMPMAfterInput = "PM"; + changedHourAfterInput = 12; + } + else { + changedAMPMAfterInput = "PM"; + changedHourAfterInput = changedHourAfterInput - 12; + } + this.surveyAnswersJSONObject[question + "_modified"] = "" + changedHourAfterInput + ":" + changedMinuteAfterInput + " " + changedAMPMAfterInput; + /* + // + // + if(this.surveyAnswersJSONObject[question] < 4){ + if((this.surveyAnswersJSONObject[question]*10)%10 == 5) + this.surveyAnswersJSONObject[question + "_modified"] = "" + (8 + this.surveyAnswersJSONObject[question] - 0.5) + ":30 PM"; + else + this.surveyAnswersJSONObject[question + "_modified"] = "" + (8 + this.surveyAnswersJSONObject[question]) + ":00 PM"; + }else if((this.surveyAnswersJSONObject[question]>=4) || (this.surveyAnswersJSONObject[question]<5)){ + if((this.surveyAnswersJSONObject[question]*10)%10 == 5) + this.surveyAnswersJSONObject[question + "_modified"] = "12:30 AM"; + else + this.surveyAnswersJSONObject[question + "_modified"] = "12:00 AM"; + }else{ + if((this.surveyAnswersJSONObject[question]*10)%10 == 5) + this.surveyAnswersJSONObject[question + "_modified"] = "" + (8 + this.surveyAnswersJSONObject[question] - 0.5 - 12) + ":30 AM"; + else + this.surveyAnswersJSONObject[question + "_modified"] = "" + (8 + this.surveyAnswersJSONObject[question] - 12) + ":00 AM"; + } + //console.log(JSON.stringify(this.surveyAnswersJSONObject)); + */ + this.inputchanged(question); + }; + class_1.prototype.inputChangedForCheckBox = function (question, item, $event) { + //console.log('holla: ' + question+" "+JSON.stringify($event.detail)); + this.surveyAnswersJSONObject[item] = $event.detail.checked; + //console.log(JSON.stringify(this.surveyAnswersJSONObject)); + //this.processExtraCondition(question); + }; + class_1.prototype.inputChangedWithEvent = function (question, $event) { + //console.log("Qs:" + questions + ", ts:" + Date.now() + ", readable_time:" + moment().format("MMMM Do YYYY, h:mm:ss a")); + console.log('holla: ' + question + " " + JSON.stringify($event.detail)); + this.surveyAnswersJSONObject[question] = $event.detail.value; + console.log(JSON.stringify(this.surveyAnswersJSONObject)); + //this.processExtraCondition(question); + }; + /* + processExtraCondition(question) { + + console.log("processDisplayCondition for " + question); + console.log(JSON.stringify(this.dependentQuestionsArray)); + if (this.dependentQuestionsArray[question] != null) { + for (var j = 0; j < this.dependentQuestionsArray[question].length; j++) { + var dependentQuestion = this.dependentQuestionsArray[question][j]; + if (this.dependencyExpression != undefined && this.dependencyExpression[dependentQuestion + question] != undefined) { + console.log(JSON.stringify(this.dependencyExpression)); + this.getDisplayFlagForDependentSurvey(this.dependencyExpression[dependentQuestion + question], dependentQuestion + question); + } + + //handle the case when there is empty space in answer when clicked, for example, "With someone" + if (this.showArrayForEachDependency != undefined && this.showArrayForEachDependency[dependentQuestion + question] != undefined) { + console.log(JSON.stringify(this.showArrayForEachDependency)); + this.getDisplayFlagForDependentSurveyWithSpaceInShowEntry(this.showArrayForEachDependency[dependentQuestion + question], dependentQuestion + question, question); + } + } + } + //this.update.next(""); + } + + getDisplayFlagForDependentSurvey(conditionExpression, label) { + console.log(conditionExpression + " " + label); + this.display_flag[label + "Show"] = eval(conditionExpression); + console.log("getDisplayFlagForDependentSurvey " + label + "Show " + this.display_flag[label + "Show"]); + } + + getDisplayFlagForDependentSurveyWithSpaceInShowEntry(conditionExpression, label, questions) { + //console.log("True " + ($scope.survey.Q3d==undefined || $scope.survey.Q3d=='0' || $scope.survey.Q3d=='0.5')); + var sel = this.survey2[questions]; + var dep = conditionExpression; + //console.log("compareSelectionWithDependency "+questions+" "+sel+" "+s); + if (sel != undefined && conditionExpression != undefined) { + sel = sel.replace(/\s+/g, ""); + dep = conditionExpression.replace(/\s+/g, ""); + } + this.display_flag[label + "Show"] = false; + if (sel === dep) { + this.display_flag[label + "Show"] = true; + } + + console.log("getDisplayFlagForDependentSurveyWithSpaceInShowEntry " + name + " for " + questions + " " + this.display_flag[label + "Show"]); + + } + */ + class_1.prototype.submitSurvey = function () { + // This function is called when user presses the "Submit button" + // We first check if participant completed all the questions. If they do submit the survey. + // If participant did not complete all the survey then show a prompt which questions they forgot to complete. + if (this.isEmpty(this.isQuestionIncomplete)) //--- means all questions has been completed + this.storeData(); + else { //--- means all questions has been completed + var incompleteQuestions = ""; + for (var incompleteQuestion in this.isQuestionIncomplete) + incompleteQuestions = incompleteQuestions + " " + this.isQuestionIncomplete[incompleteQuestion]["tag"] + ","; + incompleteQuestions = incompleteQuestions.substring(0, incompleteQuestions.length - 1); + this.presentAlertForIncompleteQuestions("You haven't completed questions:" + incompleteQuestions); + } + }; + class_1.prototype.presentAlertForIncompleteQuestions = function (alertMessage) { + return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this, void 0, void 0, function () { + var alert; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.alertCtrl.create({ + header: 'Oops! You missed some questions', + message: alertMessage, + buttons: [{ text: 'OK', cssClass: 'secondary' }] + })]; + case 1: + alert = _a.sent(); + return [4 /*yield*/, alert.present()]; + case 2: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + class_1.prototype.isEmpty = function (obj) { + return JSON.stringify(obj) === JSON.stringify({}); + }; + class_1.prototype.storeData = function () { + //--- add meta information to the survey, which could be interesting for data science + this.addMetaTagsToSurvey(); + //--- encrypt the survey and upload it to S3. + this.enycryptSurveyDataAndUploadToS3(); + //-- store survey completed into ngrx to send to server and any other listener. + this.storeToNgrxAndUpdateState(); + //start giving all the incentives from here + this.provideIncentives(); + }; + class_1.prototype.addMetaTagsToSurvey = function () { + var surveyEndTime = new Date().getTime(); + this.surveyAnswersJSONObject['endtimeUTC'] = surveyEndTime; + var readableSurveyEndTime = moment__WEBPACK_IMPORTED_MODULE_7__().format('MMMM Do YYYY, h:mm:ss a Z'); + this.surveyAnswersJSONObject['ts'] = readableSurveyEndTime; + this.surveyAnswersJSONObject['userName'] = this.userProfileService.username; + this.surveyAnswersJSONObject['devicInfo'] = this.plt.platforms(); //Type of device; iOS or Android + this.surveyAnswersJSONObject['appVersion'] = this.versionNumber; + this.surveyAnswersJSONObject['surveyName'] = this.fileLink; + }; + class_1.prototype.enycryptSurveyDataAndUploadToS3 = function () { + var encrypted = this.EncrDecr.encrypt(JSON.stringify(this.surveyAnswersJSONObject), _environments_environment__WEBPACK_IMPORTED_MODULE_11__["environment"].encyptString); + var surveyEncrypted = {}; + surveyEncrypted['encrypted'] = encrypted; + this.surveyAnswersJSONObject['encrypted'] = encrypted; + this.awsS3Service.upload(this.fileLink, surveyEncrypted); + }; + class_1.prototype.storeToNgrxAndUpdateState = function () { + //update survey timeline in ngrx store. + var surveyTimeline = { + user_id: this.userProfileService.username, + timeline: [{ dateOfCompletion: moment__WEBPACK_IMPORTED_MODULE_7__().format('YYYYMMDD'), timestamp: new Date().getTime(), readableTimestamp: moment__WEBPACK_IMPORTED_MODULE_7__().format('MMMM Do YYYY, h:mm:ss a Z') }] + }; + this.store.dispatch(Object(_survey_actions__WEBPACK_IMPORTED_MODULE_13__["surveyCompleted"])({ surveyTimeline: surveyTimeline })); + }; + class_1.prototype.provideIncentives = function () { + // incremenet point. Points automatically update the aquarium. + this.awardANdUpdatePoints(); + //compute new money and store it in local storage. + var _a = this.awardAndUpdateMoney(), pastTotalDollars = _a.pastTotalDollars, awardedTotalDollarAfterCurrentSurvey = _a.awardedTotalDollarAfterCurrentSurvey; + // ToDo: change this. Dan is saving user profile here to save the money to server. + this.userProfileService.surveyCompleted(); + //TODO: needs to add fix from Liying. + this.lifeInsightCodesUnfinished(); + //navigate to award-memes/award-altruism with equal probability after submit survey + var currentProb = Math.random(); + window.localStorage.setItem("Prob", "" + currentProb); + var currentDate = moment__WEBPACK_IMPORTED_MODULE_7__().format('YYYYMMDD'); + var navigationExtras = { + state: { + date: currentDate, + prob: currentProb + } + }; + //prepare reinforcement data to upload to AWS S3 + var reinforcement_data = {}; + reinforcement_data['userName'] = this.userProfileService.username; + reinforcement_data['appVersion'] = this.versionNumber; + reinforcement_data['Prob'] = currentProb; + reinforcement_data['day_count'] = Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length; + reinforcement_data['isRandomized'] = 1; //what is this one?? + reinforcement_data['unix_ts'] = new Date().getTime(); + reinforcement_data['readable_ts'] = moment__WEBPACK_IMPORTED_MODULE_7__().format('MMMM Do YYYY, h:mm:ss a Z'); + reinforcement_data['date'] = currentDate; + //add for the modal object + var modalObjectNavigationExtras = {}; + modalObjectNavigationExtras["LastSurveyCompletionDate"] = moment__WEBPACK_IMPORTED_MODULE_7__().format('YYYYMMDD'); + modalObjectNavigationExtras["CurrentPoints"] = this.userProfileService.points; + modalObjectNavigationExtras["PreviousPoints"] = this.userProfileService.points - 60; + modalObjectNavigationExtras["AwardedDollar"] = awardedTotalDollarAfterCurrentSurvey - pastTotalDollars; + modalObjectNavigationExtras["IsModalShownYet"] = false; + //currentProb = 0.8; + if (this.fileLink.includes('caregiver') || currentProb <= 0.4) { + var reinforcementObj = {}; + reinforcementObj['ds'] = 1; + reinforcementObj['reward'] = 0; + reinforcementObj['prob'] = currentProb; + reinforcement_data['reward'] = "No push"; + reinforcement_data['reward_img_link'] = ""; + reinforcement_data['Like'] = ""; + this.awsS3Service.upload('reinforcement_data', reinforcement_data); + this.userProfileService.addReinforcementData(currentDate, reinforcementObj); + navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras; + this.router.navigate(['home'], navigationExtras); + } + else if ((currentProb > 0.4) && (currentProb <= 0.7)) { + reinforcement_data['reward'] = "Meme"; + navigationExtras['state']['reinforcement_data'] = reinforcement_data; + navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras; + this.router.navigate(['incentive/award-memes'], navigationExtras); + } + else if (currentProb > 0.7) { + reinforcement_data['reward'] = "Altruistic message"; + navigationExtras['state']['reinforcement_data'] = reinforcement_data; + navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras; + this.router.navigate(['incentive/award-altruism'], navigationExtras); + } + //update unlocked incentive data in ngrx store. + //This ngrx store state is used to show unlocked incentives at + //the start of aquarium reload + this.updataUnlockedIncentiveInNgrxStore(awardedTotalDollarAfterCurrentSurvey - pastTotalDollars); + }; + class_1.prototype.awardANdUpdatePoints = function () { + //get current points from local storage, update, and store it back. + //TODO: rather than storage use the Ngrx store to store points and update. + if (window.localStorage['TotalPoints'] == undefined) + this.totalPoints = 0; + else + this.totalPoints = parseInt(window.localStorage['TotalPoints']); + this.totalPoints = this.totalPoints + 60; // + window.localStorage.setItem("TotalPoints", "" + this.totalPoints); + }; + class_1.prototype.awardAndUpdateMoney = function () { + //get current dollars, + var pastTotalDollars = this.awardDollarService.getCurrentlyEarnedDollars(); + var awardedTotalDollarAfterCurrentSurvey = this.awardDollarService.giveDollars(); + return { + pastTotalDollars: pastTotalDollars, + awardedTotalDollarAfterCurrentSurvey: awardedTotalDollarAfterCurrentSurvey + }; + }; + class_1.prototype.updataUnlockedIncentiveInNgrxStore = function (unlockedMoney) { + var payload = { + user_id: this.userProfileService.username, + last_date: moment__WEBPACK_IMPORTED_MODULE_7__().format('YYYYMMDD'), + unlocked_points: 60, + unlocked_money: unlockedMoney, + current_point: this.userProfileService.points, + date: moment__WEBPACK_IMPORTED_MODULE_7__().format('YYYYMMDD'), + isUnlockedViewShown: false + }; + this.store.dispatch(Object(src_app_incentive_incentive_actions__WEBPACK_IMPORTED_MODULE_14__["surveyCompletedRegisterUnlocked"])({ payload: payload })); + }; + class_1.prototype.lifeInsightCodesUnfinished = function () { + //Save 7-day date and value for each question in localStorage to generate lifeInsight chart + var lifeInsightProfile = { + "questions": ["Q3d", "Q4d", "Q5d", "Q8d"], + "qimgs": ["assets/img/stress.png", "assets/img/freetime.png", "assets/img/dance2.png", "assets/img/social.png"], + "lifeInsightsTitle": ["How much pain are you currently experiencing?", + "How much fatigue are you currently experiencing?", + "How much nausea are you currently experiencing?", + "How motivated are you to take 6MP today?"], + "qYaxis": ["Pain level", "Fatigue level", "Nausea level", "Degree of motivation"], + "qSubText": ["0 = low pain, 4 = severe pain", + "0 = low fatigue, 4 = severe fatigue", + "0 = low nausea, 4 = severe nausea", + "0 = less motivated, 4 = highly motivated"], + "lifeInsightsHighStress": [ + "Stressed ", + "Fatigued ", + "Nausea ", + "Motivated " + ], + "lifeInsightsLowStress": [ + "Relaxed ", + "Fatigued ", + "Nausea ", + "Motivated " + ] + }; + var questionsArray = lifeInsightProfile.questions; //["Q3d","Q4d","Q5d","Q8d"] + if (window.localStorage['lifeInsight'] == undefined) { + for (var _i = 0, questionsArray_1 = questionsArray; _i < questionsArray_1.length; _i++) { + var question = questionsArray_1[_i]; + this.lifeInsightObj[question] = {}; + this.lifeInsightObj[question]['dates'] = [moment__WEBPACK_IMPORTED_MODULE_7__().format("DD-MM-YYYY")]; + if (this.surveyAnswersJSONObject.hasOwnProperty(question)) { + this.lifeInsightObj[question]['data'] = [parseInt(this.surveyAnswersJSONObject[question])]; + } + else { + this.lifeInsightObj[question]['data'] = [null]; + } + } + } + else { + this.lifeInsightObj = JSON.parse(window.localStorage["lifeInsight"]); + for (var _a = 0, questionsArray_2 = questionsArray; _a < questionsArray_2.length; _a++) { + var question = questionsArray_2[_a]; + var dateslength = this.lifeInsightObj[question]['dates'].length; + if (dateslength == 7) { + this.lifeInsightObj[question]['dates'].shift(); + this.lifeInsightObj[question]['data'].shift(); + } + var currentdate = moment__WEBPACK_IMPORTED_MODULE_7__().format("DD-MM-YYYY"); + var dates = this.lifeInsightObj[question]["dates"]; + var dateIndex = dates.indexOf(currentdate); + console.log("Current date exist? " + dateIndex); + if (dateIndex > -1) { + this.lifeInsightObj[question]['dates'][dateIndex] = currentdate; + if (this.surveyAnswersJSONObject.hasOwnProperty(question)) { + this.lifeInsightObj[question]['data'][dateIndex] = (parseInt(this.surveyAnswersJSONObject[question])); + } + else { + this.lifeInsightObj[question][dateIndex] = null; + } + } + else { + this.lifeInsightObj[question]['dates'].push(currentdate); + if (this.surveyAnswersJSONObject.hasOwnProperty(question)) { + this.lifeInsightObj[question]['data'].push(parseInt(this.surveyAnswersJSONObject[question])); + } + else { + this.lifeInsightObj[question]['data'].push(null); + } + } + } + } + //console.log("lifeInsightObj: "+JSON.stringify(this.lifeInsightObj)); + window.localStorage.setItem("lifeInsight", JSON.stringify(this.lifeInsightObj)); + }; + class_1.prototype.ngAfterViewInit = function () { + var _this = this; + setTimeout(function (e) { return _this.drawMoodGrid(_this); }, 200); + }; + class_1.prototype.drawMoodGrid = function (self2) { + var c = document.getElementById("myCanvas"); + if (c == null) { + //console.log("is null"); + return; + } + c.style.width = '100%'; + c.width = c.offsetWidth; + c.height = c.width; + var ctx = c.getContext("2d"); + var imageObj = new Image(); + imageObj.src = 'assets/pics/affect_grid.png'; + imageObj.onload = function () { + ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle + 0, 0, c.width, c.height); // destination rectangle + }; + //corner points + var top_x = (42.0 / 354.0) * c.width; + var top_y = (32.0 / 354.0) * c.height; + var bottom_x = (320.0 / 354.0) * c.width; + var bottom_y = (320.0 / 354.0) * c.height; + c.addEventListener("click", function (e) { + //drawing = true; + var rect = c.getBoundingClientRect(); + var lastPos = { + x: e.clientX - rect.left, + y: e.clientY - rect.top + }; + //console.log("x:" + lastPos.x + ", y:" + lastPos.y + ":::: " + c.width + "," + c.height); + var x = -1; + var y = -1; + if ((lastPos.x >= top_x) && (lastPos.y >= top_y) && (lastPos.x <= bottom_x) && (lastPos.y <= bottom_y)) { + x = 10 * (lastPos.x - top_x) / (bottom_x - top_x) - 5; + y = 5 - 10 * (lastPos.y - top_y) / (bottom_y - top_y) - 5; + console.log("x:" + x + ", y:" + y); + //self2.survey2['QMood'] = "" + x + ":" + y; + self2.surveyAnswersJSONObject['QMood'] = "" + x + ":" + y; + // + self2.inputchanged("QMood"); + } + else { + return; + } + var rect = c.getBoundingClientRect(); + ctx.beginPath(); + ctx.clearRect(0, 0, rect.right - rect.left, rect.bottom - rect.top); + ctx.closePath(); + // + ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle + 0, 0, c.width, c.height); // destination rectangle + //ctx.drawImage(imageObj, 0, 0); + ctx.beginPath(); + ctx.arc(lastPos.x, lastPos.y, 10, 0, 2 * Math.PI); + ctx.fillStyle = 'red'; + ctx.fill(); + ctx.lineWidth = 1; + ctx.strokeStyle = 'red'; + ctx.stroke(); + }, false); + }; + return class_1; + }())); + var tmpModule = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ declarations: [surveyComponent], imports: [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["FormsModule"]] })(/** @class */ (function () { + function class_2() { + } + return class_2; + }())); + this._compiler.compileModuleAndAllComponentsAsync(tmpModule) + .then(function (factories) { + _this.isLoading = false; + _this.loadingComplete = true; + //setTimeout(function(){ console.log("holla") }, 3000); + _this.changeDetector.detectChanges(); + var f = factories.componentFactories[0]; + var cmpRef = _this.vc.createComponent(f); + cmpRef.instance.awsS3Service = _this.awsS3Service; + //cmpRef.instance.surveyAnswersJSONObject = this.surveyQuestionsDict; + cmpRef.instance.surveyAnswersJSONObject = _this.surveyQuestionsDict; + cmpRef.instance.fileLink = _this.jsonFileLinkForSurvey; + cmpRef.instance.versionNumber = _this.versionNumber; + cmpRef.instance.surveyQuestionsInJSONDictFormat = _this.surveyQuestionsInJSONDictFormat; + cmpRef.instance.alertCtrl = _this.alertCtrl; + cmpRef.instance.userProfileService = _this.userProfileService; + cmpRef.instance.awardDollarService = _this.awardDollarService; + cmpRef.instance.EncrDecr = _this.EncrDecr; + cmpRef.instance.plt = _this.plt; + cmpRef.instance.router = _this.router; // Router, + cmpRef.instance.store = _this.store; + cmpRef.instance.name = 'dynamic'; + }); + }; + // + // process survey for all types of objects + // Our current questionaire only has radio buttons. We have codes for other types of inputs, which we will gradually add. + // + DynamicSurveyComponent.prototype.process_survey = function (obj, survey_string, i) { + survey_string = [survey_string, + '
', + obj.text, + '
' + ].join(" "); + if (obj.type == 'random') { + //this.process_survey_random(obj, survey_string, i); + } + else { + // + if (obj.type == "captcha") { + //survey_string = this.process_survey_captcha(obj, survey_string); + } + //------------------------------------------------------ + //text box + //------------------------------------------------------ + if (obj.type == "textbox") { + //survey_string = this.process_survey_textbox(survey_string, i); + } + //------------------------------------------------------ + //time picker + //------------------------------------------------------ + if (obj.type == "timepicker") { + //survey_string = this.process_survey_timepicker(survey_string, i); + } + //------------------------------------------------------ + //paragraph + //------------------------------------------------------ + if (obj.type == "comment") { + //survey_string = this.process_survey_comment(survey_string); + } + //------------------------------------------------------ + //image + //------------------------------------------------------ + if (obj.type == "image") { + //survey_string = this.process_survey_image(obj, survey_string); + } + //------------------------------------------------------ + // mood + //------------------------------------------------------ + if (obj.type == 'mood') { + //survey_string = this.process_survey_mood(survey_string, i); + } + //------------------------------------------------------ + // mood-grid + //------------------------------------------------------ + if (obj.type == 'moodgrid') { + //survey_string = this.process_survey_moodgrid(survey_string, i); + } + if (obj.type == "moodgrid2") { + survey_string = this.process_survey_moodgrid2(survey_string); + } + //------------------------------------------------------ + // Autocomplete + //------------------------------------------------------ + // 'component-id="Q' + i + '" ' + + if (obj.type == 'autocomplete') { + //survey_string = this.process_survey_autocomplete(obj, survey_string, i); + } + //------------------------------------------------------ + // radio button + //------------------------------------------------------ + if (obj.type == "radiobutton") { + survey_string = this.process_survey_radiobutton(obj, survey_string, i); + } + //------------------------------------------------------ + // range + //------------------------------------------------------ + if (obj.type == "range") { + //survey_string = this.process_survey_range(obj, survey_string, i); + } + if (obj.type == "range_time") { + survey_string = this.process_survey_range_time(obj, survey_string, i); + } + if (obj.type == "range2") { + //survey_string = this.process_survey_range2(obj, survey_string, i); + } + //------------------------------------------------------ + //checkbox + //------------------------------------------------------ + if (obj.type == "checkbox") { + //survey_string = this.process_survey_checkbox(obj, survey_string, i); + } + survey_string = survey_string + '
'; + } + return survey_string; + }; + DynamicSurveyComponent.prototype.process_survey_range_time = function (obj, survey_string, i) { + //throw new Error("Method not implemented."); + // + var min = obj.extra.choices[2]; + var max = obj.extra.choices[3]; + var step = obj.extra.choices[4]; + this.surveyQuestionsDict[i + "_modified"] = obj.extra.choices[5]; //"12:00 AM"; + survey_string = [survey_string, + '
', + /* + '

' + min + '

', + */ + '
', + '

{{surveyAnswersJSONObject.' + i + '_modified}}

', + '
', + /* + '

' + max + '

', + */ + '
', + '
', + '

' + obj.extra.choices[0] + "

", + '', + //'', + '

' + obj.extra.choices[1] + "

", + '
', + ].join(" "); + return survey_string; + }; + // process survey if obj type is radiobutton + DynamicSurveyComponent.prototype.process_survey_radiobutton = function (obj, survey_string, i) { + //------------------------------------------------------ + //radio button, vertical + //------------------------------------------------------ + if (obj.extra.orientation == "vertical") { + survey_string = survey_string + '
    '; + for (var j = 0; j < obj.extra.choices.length; j++) { + survey_string = [survey_string, + '
  • ', + '', + '
  • ' + ].join(" "); + } + //if(this.choices == undefined) this.choices = {}; + //this.choices[obj.name]= obj.extra.choices; + survey_string = survey_string + '
'; + } + //------------------------------------------------------ + //radio button, horizontal + //------------------------------------------------------ + //console.log("Here: " + JSON.stringify(obj.extra.orientation) + ", " + obj.extra.choices.length); + if (obj.extra.orientation == "horizontal") { + survey_string = survey_string + '
    '; + //starting text + survey_string = survey_string + '
  • ' + obj.extra.choices[0] + '

  • '; + //middle text + for (var j = 0; j < obj.extra.levels; j++) { + survey_string = [survey_string, + '
  • ', + '', + '
  • ' + ].join(" "); + //console.log("" + j + ", " + obj.extra.choices.length); + } + //ending text + survey_string = survey_string + '
  • ' + obj.extra.choices[obj.extra.choices.length - 1] + '

  • '; + survey_string = survey_string + '
'; + } + return survey_string; + }; + DynamicSurveyComponent.prototype.process_survey_moodgrid2 = function (survey_string) { + survey_string = [survey_string, + '', + 'Your browser does not support the HTML5 canvas tag.', + '' + ].join(" "); + return survey_string; + }; + DynamicSurveyComponent.prototype.getAppVersionNumber = function () { + var _this = this; + //Get the app version to put inside the survey data. + //The goal of this app version number is to track in the backend that + //participants has the latest version of the app. + this.appVersion.getVersionNumber().then(function (value) { + _this.versionNumber = value; + console.log("VersionNumber: " + _this.versionNumber); + //store the version number to the userProfile + _this.userProfileService.versionNumber = _this.versionNumber; + }).catch(function (err) { + console.log(err); + }); + }; + DynamicSurveyComponent.ctorParameters = function () { return [ + { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, + { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, + { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"] }, + { type: _storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_3__["AwsS3Service"] }, + { type: _storage_encrdecrservice_service__WEBPACK_IMPORTED_MODULE_4__["EncrDecrService"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] }, + { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] }, + { type: _ionic_native_app_version_ngx__WEBPACK_IMPORTED_MODULE_8__["AppVersion"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_5__["AlertController"] }, + { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_5__["Platform"] }, + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_9__["UserProfileService"] }, + { type: _ngrx_store__WEBPACK_IMPORTED_MODULE_12__["Store"] }, + { type: src_app_incentive_award_money_award_dollar_service__WEBPACK_IMPORTED_MODULE_10__["AwardDollarService"] } + ]; }; + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", String) + ], DynamicSurveyComponent.prototype, "jsonFileLinkForSurvey", void 0); + tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"])('vc', { read: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"], static: false }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:type", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]) + ], DynamicSurveyComponent.prototype, "vc", void 0); + DynamicSurveyComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-dynamic-survey', + template: __webpack_require__(/*! raw-loader!./dynamic-survey.component.html */ "./node_modules/raw-loader/index.js!./src/app/survey/dynamic-survey/dynamic-survey.component.html"), + styles: [__webpack_require__(/*! ./dynamic-survey.component.scss */ "./src/app/survey/dynamic-survey/dynamic-survey.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], + _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], + _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"], + _storage_aws_s3_service__WEBPACK_IMPORTED_MODULE_3__["AwsS3Service"], + _storage_encrdecrservice_service__WEBPACK_IMPORTED_MODULE_4__["EncrDecrService"], + _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"], + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"], + _ionic_native_app_version_ngx__WEBPACK_IMPORTED_MODULE_8__["AppVersion"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_5__["AlertController"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_5__["Platform"], + src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_9__["UserProfileService"], + _ngrx_store__WEBPACK_IMPORTED_MODULE_12__["Store"], + src_app_incentive_award_money_award_dollar_service__WEBPACK_IMPORTED_MODULE_10__["AwardDollarService"]]) + ], DynamicSurveyComponent); + return DynamicSurveyComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/survey/harvard-survey/harvard-survey.component.css": +/*!********************************************************************!*\ + !*** ./src/app/survey/harvard-survey/harvard-survey.component.css ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3VydmV5L2hhcnZhcmQtc3VydmV5L2hhcnZhcmQtc3VydmV5LmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9zdXJ2ZXkvaGFydmFyZC1zdXJ2ZXkvaGFydmFyZC1zdXJ2ZXkuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/survey/harvard-survey/harvard-survey.component.ts": +/*!*******************************************************************!*\ + !*** ./src/app/survey/harvard-survey/harvard-survey.component.ts ***! + \*******************************************************************/ +/*! exports provided: HarvardSurveyComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HarvardSurveyComponent", function() { return HarvardSurveyComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic-native/mobile-accessibility/ngx */ "./node_modules/@ionic-native/mobile-accessibility/ngx/index.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + + +var HarvardSurveyComponent = /** @class */ (function () { + function HarvardSurveyComponent(userProfileService, mobileAccessibility, appUsageDb) { + this.userProfileService = userProfileService; + this.mobileAccessibility = mobileAccessibility; + this.appUsageDb = appUsageDb; + } + HarvardSurveyComponent.prototype.ngOnInit = function () { + this.mobileAccessibility.usePreferredTextZoom(false); + }; + HarvardSurveyComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.appUsageDb.saveAppUsageEnter("harvard_survey_page"); + }; + HarvardSurveyComponent.prototype.ionViewDidLeave = function () { + /* + console.log(this.pageTitle+": ionViewDidLeave"); + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.mobileAccessibility.usePreferredTextZoom(true); + this.appUsageDb.saveAppUsageExit("harvard_survey_page"); + }; + HarvardSurveyComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__["UserProfileService"] }, + { type: _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_3__["MobileAccessibility"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_4__["DatabaseService"] } + ]; }; + HarvardSurveyComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-harvard-survey', + template: __webpack_require__(/*! raw-loader!./harvard-survey.component.html */ "./node_modules/raw-loader/index.js!./src/app/survey/harvard-survey/harvard-survey.component.html"), + styles: [__webpack_require__(/*! ./harvard-survey.component.css */ "./src/app/survey/harvard-survey/harvard-survey.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__["UserProfileService"], + _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_3__["MobileAccessibility"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_4__["DatabaseService"]]) + ], HarvardSurveyComponent); + return HarvardSurveyComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/survey/reducers/index.ts": +/*!******************************************!*\ + !*** ./src/app/survey/reducers/index.ts ***! + \******************************************/ +/*! exports provided: initialSurveyState, surveyReducer */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialSurveyState", function() { return initialSurveyState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "surveyReducer", function() { return surveyReducer; }); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); +/* harmony import */ var _action_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../action-types */ "./src/app/survey/action-types.ts"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__); + + + +var initialSurveyState = { + surveyTimeLine: undefined +}; +var surveyReducer = Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["createReducer"])(initialSurveyState, Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["on"])(_action_types__WEBPACK_IMPORTED_MODULE_1__["SurveyActions"].surveyCompleted, function (state, action) { + var currentDate = moment__WEBPACK_IMPORTED_MODULE_2__().format('YYYYMMDD'); + var surveyObject = {}; + surveyObject[currentDate] = action.surveyTimeline; + return surveyObject; +}) +/* +on(AuthActions.login, (state, action) => { + return { + user: action.user + } +}), + +on(AuthActions.logout, (state, action) => { + return { + user: undefined + } +}) +*/ +); + + +/***/ }), + +/***/ "./src/app/survey/sample-survey/sample-survey.component.scss": +/*!*******************************************************************!*\ + !*** ./src/app/survey/sample-survey/sample-survey.component.scss ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color {\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvc3VydmV5L3NhbXBsZS1zdXJ2ZXkvc2FtcGxlLXN1cnZleS5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvc3VydmV5L3NhbXBsZS1zdXJ2ZXkvc2FtcGxlLXN1cnZleS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHFCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9zdXJ2ZXkvc2FtcGxlLXN1cnZleS9zYW1wbGUtc3VydmV5LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/survey/sample-survey/sample-survey.component.ts": +/*!*****************************************************************!*\ + !*** ./src/app/survey/sample-survey/sample-survey.component.ts ***! + \*****************************************************************/ +/*! exports provided: SampleSurveyComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SampleSurveyComponent", function() { return SampleSurveyComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ionic-native/mobile-accessibility/ngx */ "./node_modules/@ionic-native/mobile-accessibility/ngx/index.js"); + + +//import { PreLoad } from '../../PreLoad'; + + + +var SampleSurveyComponent = /** @class */ (function () { + function SampleSurveyComponent(userProfileService, mobileAccessibility, appUsageDb) { + this.userProfileService = userProfileService; + this.mobileAccessibility = mobileAccessibility; + this.appUsageDb = appUsageDb; + this.pageTitle = "Survey_caregiver"; + } + SampleSurveyComponent.prototype.ngOnInit = function () { + this.mobileAccessibility.usePreferredTextZoom(false); + }; + SampleSurveyComponent.prototype.ionViewDidEnter = function () { + // + this.appUsageDb.saveAppUsageEnter("cg_survey_page"); + }; + SampleSurveyComponent.prototype.ionViewDidLeave = function () { + // + this.mobileAccessibility.usePreferredTextZoom(true); + this.appUsageDb.saveAppUsageExit("cg_survey_page"); + }; + SampleSurveyComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"] }, + { type: _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__["MobileAccessibility"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__["DatabaseService"] } + ]; }; + SampleSurveyComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-sample-survey', + template: __webpack_require__(/*! raw-loader!./sample-survey.component.html */ "./node_modules/raw-loader/index.js!./src/app/survey/sample-survey/sample-survey.component.html"), + styles: [__webpack_require__(/*! ./sample-survey.component.scss */ "./src/app/survey/sample-survey/sample-survey.component.scss")] + }) + //@PreLoad('life-insights') + , + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_3__["UserProfileService"], + _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_4__["MobileAccessibility"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_2__["DatabaseService"]]) + ], SampleSurveyComponent); + return SampleSurveyComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/survey/sleep-survey/sleep-survey.component.css": +/*!****************************************************************!*\ + !*** ./src/app/survey/sleep-survey/sleep-survey.component.css ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color{\n --background: #005486;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3VydmV5L3NsZWVwLXN1cnZleS9zbGVlcC1zdXJ2ZXkuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL3N1cnZleS9zbGVlcC1zdXJ2ZXkvc2xlZXAtc3VydmV5LmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */" + +/***/ }), + +/***/ "./src/app/survey/sleep-survey/sleep-survey.component.ts": +/*!***************************************************************!*\ + !*** ./src/app/survey/sleep-survey/sleep-survey.component.ts ***! + \***************************************************************/ +/*! exports provided: SleepSurveyComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SleepSurveyComponent", function() { return SleepSurveyComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic-native/mobile-accessibility/ngx */ "./node_modules/@ionic-native/mobile-accessibility/ngx/index.js"); +/* harmony import */ var src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/monitor/database.service */ "./src/app/monitor/database.service.ts"); + + + + + +var SleepSurveyComponent = /** @class */ (function () { + function SleepSurveyComponent(userProfileService, mobileAccessibility, appUsageDb) { + this.userProfileService = userProfileService; + this.mobileAccessibility = mobileAccessibility; + this.appUsageDb = appUsageDb; + } + SleepSurveyComponent.prototype.ngOnInit = function () { + this.mobileAccessibility.usePreferredTextZoom(false); + }; + SleepSurveyComponent.prototype.ionViewDidEnter = function () { + /* + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Enter", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.whichImage = "http://ec2-52-201-144-36.compute-1.amazonaws.com:56735/get_daily_plot?username=" + this.userProfileService.username + "&plot_type=edu.harvard.srl.SleepAppUsageVisualization&cachebreaker=" + new Date().getTime(); + this.appUsageDb.saveAppUsageEnter("sleep_survey_page"); + }; + SleepSurveyComponent.prototype.reloadPage = function () { + window.location.reload(); + }; + SleepSurveyComponent.prototype.ionViewDidLeave = function () { + /* + console.log(this.pageTitle+": ionViewDidLeave"); + this.db.getDatabaseState().subscribe(rdy => { + if (rdy) { + this.db.addTrack(this.pageTitle, "Leave", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); + } + }); + */ + this.mobileAccessibility.usePreferredTextZoom(true); + this.appUsageDb.saveAppUsageExit("sleep_survey_page"); + }; + SleepSurveyComponent.ctorParameters = function () { return [ + { type: src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__["UserProfileService"] }, + { type: _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_3__["MobileAccessibility"] }, + { type: src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_4__["DatabaseService"] } + ]; }; + SleepSurveyComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-sleep-survey', + template: __webpack_require__(/*! raw-loader!./sleep-survey.component.html */ "./node_modules/raw-loader/index.js!./src/app/survey/sleep-survey/sleep-survey.component.html"), + styles: [__webpack_require__(/*! ./sleep-survey.component.css */ "./src/app/survey/sleep-survey/sleep-survey.component.css")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [src_app_user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_2__["UserProfileService"], + _ionic_native_mobile_accessibility_ngx__WEBPACK_IMPORTED_MODULE_3__["MobileAccessibility"], + src_app_monitor_database_service__WEBPACK_IMPORTED_MODULE_4__["DatabaseService"]]) + ], SleepSurveyComponent); + return SleepSurveyComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/survey/survey.actions.ts": +/*!******************************************!*\ + !*** ./src/app/survey/survey.actions.ts ***! + \******************************************/ +/*! exports provided: surveyCompleted */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "surveyCompleted", function() { return surveyCompleted; }); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); + +var surveyCompleted = Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["createAction"])("[Survey Page] Survey Completed", Object(_ngrx_store__WEBPACK_IMPORTED_MODULE_0__["props"])()); + + +/***/ }), + +/***/ "./src/app/survey/survey.effects.ts": +/*!******************************************!*\ + !*** ./src/app/survey/survey.effects.ts ***! + \******************************************/ +/*! exports provided: SurveyEffects */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyEffects", function() { return SurveyEffects; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _ngrx_effects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ngrx/effects */ "./node_modules/@ngrx/effects/fesm5/effects.js"); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _action_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./action-types */ "./src/app/survey/action-types.ts"); +/* harmony import */ var _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../user/user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts"); + + + + + + + + + + +var SurveyEffects = /** @class */ (function () { + function SurveyEffects(actions$, router, userProfileService, httpClient) { + var _this = this; + this.actions$ = actions$; + this.router = router; + this.userProfileService = userProfileService; + this.httpClient = httpClient; + this.login$ = Object(_ngrx_effects__WEBPACK_IMPORTED_MODULE_2__["createEffect"])(function () { + return _this.actions$.pipe(Object(_ngrx_effects__WEBPACK_IMPORTED_MODULE_2__["ofType"])(_action_types__WEBPACK_IMPORTED_MODULE_5__["SurveyActions"].surveyCompleted), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (action) { + //store on a server + localStorage.setItem('surveyTimeline', JSON.stringify(action.surveyTimeline)); + // + var username = _this.userProfileService.username; + var currentTimeTs = Date.now(); + var currentTimeReadableTs = moment__WEBPACK_IMPORTED_MODULE_8__().format("MMMM Do YYYY, h:mm:ss a Z"); + var dataString = moment__WEBPACK_IMPORTED_MODULE_8__().format("YYYYMMDD"); + var headers = { "Content-Type": "application/json;charset=UTF-8" }; + var body = { "user_id": username, "dataString": dataString, "whenCompletedTs": currentTimeTs, "whenCompletedReadableTs": currentTimeReadableTs }; + /* + this.httpClient.post("http://ec2-54-91-131-166.compute-1.amazonaws.com:56733/store-onesignal-id", body, { headers }).subscribe({ + next: data => console.log(data), + error: error => console.error('There was an error!', error) + }); + */ + var flaskServerAPIEndpoint = _environments_environment__WEBPACK_IMPORTED_MODULE_9__["environment"].flaskServerForIncentives; + _this.httpClient.post(flaskServerAPIEndpoint + "/store-survey-completed", body) + .subscribe({ + next: function (data) { return console.log("--survey_completed-- " + JSON.stringify(data)); }, + error: function (error) { return console.error('There was an error!', error); } + }); + })); + }, { dispatch: false }); + } + SurveyEffects.ctorParameters = function () { return [ + { type: _ngrx_effects__WEBPACK_IMPORTED_MODULE_2__["Actions"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"] }, + { type: _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_6__["UserProfileService"] }, + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpClient"] } + ]; }; + SurveyEffects = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])(), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_ngrx_effects__WEBPACK_IMPORTED_MODULE_2__["Actions"], + _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"], + _user_user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_6__["UserProfileService"], + _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HttpClient"]]) + ], SurveyEffects); + return SurveyEffects; +}()); + + + +/***/ }), + +/***/ "./src/app/survey/survey.module.ts": +/*!*****************************************!*\ + !*** ./src/app/survey/survey.module.ts ***! + \*****************************************/ +/*! exports provided: SurveyModule */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyModule", function() { return SurveyModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); +/* harmony import */ var _storage_storage_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../storage/storage.module */ "./src/app/storage/storage.module.ts"); +/* harmony import */ var _dynamic_survey_dynamic_survey_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./dynamic-survey/dynamic-survey.component */ "./src/app/survey/dynamic-survey/dynamic-survey.component.ts"); +/* harmony import */ var _sample_survey_sample_survey_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sample-survey/sample-survey.component */ "./src/app/survey/sample-survey/sample-survey.component.ts"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _incentive_incentive_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../incentive/incentive.module */ "./src/app/incentive/incentive.module.ts"); +/* harmony import */ var _aya_sample_survey_aya_sample_survey_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./aya-sample-survey/aya-sample-survey.component */ "./src/app/survey/aya-sample-survey/aya-sample-survey.component.ts"); +/* harmony import */ var _ngrx_store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ngrx/store */ "./node_modules/@ngrx/store/fesm5/store.js"); +/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./reducers */ "./src/app/survey/reducers/index.ts"); +/* harmony import */ var _ngrx_effects__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ngrx/effects */ "./node_modules/@ngrx/effects/fesm5/effects.js"); +/* harmony import */ var _survey_effects__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./survey.effects */ "./src/app/survey/survey.effects.ts"); +/* harmony import */ var _harvard_survey_harvard_survey_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./harvard-survey/harvard-survey.component */ "./src/app/survey/harvard-survey/harvard-survey.component.ts"); +/* harmony import */ var _sleep_survey_sleep_survey_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./sleep-survey/sleep-survey.component */ "./src/app/survey/sleep-survey/sleep-survey.component.ts"); + + + +//import { PromptedSurveyComponent } from './prompted-survey/prompted-survey.component'; +//import { MorningReportComponent } from './morning-report/morning-report.component'; +//import { InitiatedDrinkComponent } from './initiated-drink/initiated-drink.component'; + + + +//import { ActivetaskComponent } from './activetask/activetask.component'; +//import { ActiveTask2Component } from './active-task2/active-task2.component'; + + + + + + + + + + + +var routes = [ + { path: 'samplesurvey', component: _sample_survey_sample_survey_component__WEBPACK_IMPORTED_MODULE_7__["SampleSurveyComponent"] } +]; +var SurveyModule = /** @class */ (function () { + function SurveyModule() { + } + SurveyModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [ + _dynamic_survey_dynamic_survey_component__WEBPACK_IMPORTED_MODULE_6__["DynamicSurveyComponent"], + _aya_sample_survey_aya_sample_survey_component__WEBPACK_IMPORTED_MODULE_10__["AyaSampleSurveyComponent"], + _sample_survey_sample_survey_component__WEBPACK_IMPORTED_MODULE_7__["SampleSurveyComponent"], + _harvard_survey_harvard_survey_component__WEBPACK_IMPORTED_MODULE_15__["HarvardSurveyComponent"], + _sleep_survey_sleep_survey_component__WEBPACK_IMPORTED_MODULE_16__["SleepSurveyComponent"] + ], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["IonicModule"].forRoot(), + _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"], + _storage_storage_module__WEBPACK_IMPORTED_MODULE_5__["StorageModule"], + _incentive_incentive_module__WEBPACK_IMPORTED_MODULE_9__["IncentiveModule"], + _angular_router__WEBPACK_IMPORTED_MODULE_8__["RouterModule"].forChild(routes), + _ngrx_store__WEBPACK_IMPORTED_MODULE_11__["StoreModule"].forFeature('survey', _reducers__WEBPACK_IMPORTED_MODULE_12__["surveyReducer"]), + _ngrx_effects__WEBPACK_IMPORTED_MODULE_13__["EffectsModule"].forFeature([_survey_effects__WEBPACK_IMPORTED_MODULE_14__["SurveyEffects"]]) + ], + exports: [ + _dynamic_survey_dynamic_survey_component__WEBPACK_IMPORTED_MODULE_6__["DynamicSurveyComponent"], + _sample_survey_sample_survey_component__WEBPACK_IMPORTED_MODULE_7__["SampleSurveyComponent"], + _aya_sample_survey_aya_sample_survey_component__WEBPACK_IMPORTED_MODULE_10__["AyaSampleSurveyComponent"], + _harvard_survey_harvard_survey_component__WEBPACK_IMPORTED_MODULE_15__["HarvardSurveyComponent"], + _sleep_survey_sleep_survey_component__WEBPACK_IMPORTED_MODULE_16__["SleepSurveyComponent"] + ], + schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]] + }) + ], SurveyModule); + return SurveyModule; +}()); + + + +/***/ }), + +/***/ "./src/app/user/auth/auth.component.scss": +/*!***********************************************!*\ + !*** ./src/app/user/auth/auth.component.scss ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".new-background-color {\n --background: #3F51B5;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvdXNlci9hdXRoL2F1dGguY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3VzZXIvYXV0aC9hdXRoLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0kscUJBQUE7QUNDSiIsImZpbGUiOiJzcmMvYXBwL3VzZXIvYXV0aC9hdXRoLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzNGNTFCNTtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMzRjUxQjU7XG59Il19 */" + +/***/ }), + +/***/ "./src/app/user/auth/auth.component.ts": +/*!*********************************************!*\ + !*** ./src/app/user/auth/auth.component.ts ***! + \*********************************************/ +/*! exports provided: AuthComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthComponent", function() { return AuthComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./auth.service */ "./src/app/user/auth/auth.service.ts"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var _user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../user-profile/user-profile.service */ "./src/app/user/user-profile/user-profile.service.ts"); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); +/* harmony import */ var _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic-native/onesignal/ngx */ "./node_modules/@ionic-native/onesignal/ngx/index.js"); +//this component will register/login a user + + + + + + + + +var AuthComponent = /** @class */ (function () { + function AuthComponent(authService, router, userProfileService, oneSignal) { + this.authService = authService; + this.router = router; + this.userProfileService = userProfileService; + this.oneSignal = oneSignal; + this.isLoginMode = true; + this.isLoading = false; + this.error = null; + } + // was used to switch mode between login and register + // onSwitchMode(){ + // this.isLoginMode = !this.isLoginMode; + // } + AuthComponent.prototype.ngOnInit = function () { + console.log("in auth.component - ngOnInit"); + if (this.authService.isLoggedIn()) { + console.log("auth.component.ts - ngOnInit - is logged in"); + this.router.navigate(['home']); + } + console.log(src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userServer); + }; + //login button was clicked + AuthComponent.prototype.onSubmit = function (form) { + var _this = this; + console.log("auth.component.ts - onSubmit method - begin"); + if (!form.valid) { + console.log('invalid'); + return; + } + var userName = form.value.userName; + var password = form.value.password; + var authObs; + this.isLoading = true; + // if(this.isLoginMode){ + // login returns an observable + authObs = this.authService.login(userName, password); + // }else{ + // authObs = this.authService.signup(userName, password); + // } + this.authSub = authObs.subscribe(function (resData) { + console.log("auth.component.ts - onSubmit method - authService.login response: " + JSON.stringify(resData)); + if (resData.hasOwnProperty('access_token') && resData.hasOwnProperty('refresh_token')) { + // the response contains an access token and refresh token + console.log("auth.component.ts - onSubmit method - has access token"); + // userProfileService.initializeObs returns an observable, + // then below we can get the OneSignal Player id when UserProfile has been intialized + _this.userSub = _this.userProfileService.initializeObs() + .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["tap"])(function () { + _this.userProfileService.addOneSignalPlayerId(); + })) + .subscribe(function () { + console.log("in subscribe - got profiles init"); + _this.router.navigate(['home']); + console.log("in subscribe - got profiles init - post navigate to home"); + }); + } + else { + console.log("doesn't have access token"); + _this.isLoading = false; + _this.authService.loggedInUser.next(null); + if (resData.hasOwnProperty('message')) { + _this.error = resData.message; + } + else { + _this.error = "Unknown error\n" + JSON.stringify(resData); + } + } + }, function (errorMessage) { + console.log(errorMessage); + _this.error = errorMessage; + _this.isLoading = false; + }); + form.reset(); + }; + AuthComponent.prototype.ngOnDestroy = function () { + if (this.userSub) { + this.userSub.unsubscribe(); + } + if (this.authSub) { + this.authSub.unsubscribe(); + } + }; + AuthComponent.ctorParameters = function () { return [ + { type: _auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"] }, + { type: _user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_5__["UserProfileService"] }, + { type: _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_7__["OneSignal"] } + ]; }; + AuthComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-auth', + template: __webpack_require__(/*! raw-loader!./auth.component.html */ "./node_modules/raw-loader/index.js!./src/app/user/auth/auth.component.html"), + styles: [__webpack_require__(/*! ./auth.component.scss */ "./src/app/user/auth/auth.component.scss")] + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_auth_service__WEBPACK_IMPORTED_MODULE_2__["AuthService"], + _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"], + _user_profile_user_profile_service__WEBPACK_IMPORTED_MODULE_5__["UserProfileService"], + _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_7__["OneSignal"]]) + ], AuthComponent); + return AuthComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/user/auth/auth.guard.ts": +/*!*****************************************!*\ + !*** ./src/app/user/auth/auth.guard.ts ***! + \*****************************************/ +/*! exports provided: AuthGuard */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthGuard", function() { return AuthGuard; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./auth.service */ "./src/app/user/auth/auth.service.ts"); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); + + + + + +var AuthGuard = /** @class */ (function () { + function AuthGuard(authService, router) { + this.authService = authService; + this.router = router; + } + AuthGuard.prototype.canActivate = function (route, router) { + //This using reactive programming + //--- pipe: is a series of operation to be executed when the observables "loggedInUser" state changes + //--- take: an observable can emit a series of values. take(1) means only the first value will be used + //--- map: function takes an observable, do some transformation and returns a observable. + //--- search documentation here: https://rxjs-dev.firebaseapp.com/ + var _this = this; + return this.authService.loggedInUser.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function (loggedInUser) { + var isAuth = !!loggedInUser; + if (isAuth) { + console.log("auth.guard.ts - (isAuth): true"); + return true; + } + else { + console.log("auth.guard.ts - (isAuth): false"); + return _this.router.createUrlTree(['auth']); + } + })); + }; + AuthGuard.ctorParameters = function () { return [ + { type: _auth_service__WEBPACK_IMPORTED_MODULE_3__["AuthService"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] } + ]; }; + AuthGuard = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])({ providedIn: 'root' }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_auth_service__WEBPACK_IMPORTED_MODULE_3__["AuthService"], _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"]]) + ], AuthGuard); + return AuthGuard; +}()); + + + +/***/ }), + +/***/ "./src/app/user/auth/auth.service.ts": +/*!*******************************************!*\ + !*** ./src/app/user/auth/auth.service.ts ***! + \*******************************************/ +/*! exports provided: AuthService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AuthService", function() { return AuthService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); +/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts"); + + + + + +// import { User } from './user.model'; + +// import { AngularFireAuth } from '@angular/fire/auth'; + +var AuthService = /** @class */ (function () { + function AuthService(http, router) { + this.http = http; + this.router = router; + //new + this.loggedInUser = new rxjs__WEBPACK_IMPORTED_MODULE_4__["BehaviorSubject"](localStorage.getItem('loggedInUser')); //localStorage.getItem('loggedInUser') + this.userSub = this.loggedInUser.subscribe(function (loggedInUser) { + if (loggedInUser === null) { + localStorage.removeItem('loggedInUser'); + localStorage.removeItem('userProfile'); + } + else { + localStorage.setItem('loggedInUser', loggedInUser); + } + }); + this.ACCESS_TOKEN = 'ACCESS_TOKEN'; + this.ACCESS_TOKEN_EXPIRATION = 'ACCESS_TOKEN_EXPIRATION'; + this.REFRESH_TOKEN = 'REFRESH_TOKEN'; + this.REFRESH_TOKEN_EXPIRATION = 'REFRESH_TOKEN_EXPIRATION'; + } + // used to register new user + AuthService.prototype.signup = function (userName, password) { + var _this = this; + return this.http + .post(src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].userServer + '/registration', { + username: userName, + password: password + }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(this.handleError), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (resData) { + _this.loggedInUser.next(userName); + _this.storeAccessToken(resData.access_token, resData.access_expires); + _this.storeRefreshToken(resData.refresh_token, resData.refresh_expires); + console.log("resData: " + JSON.stringify(resData)); + })); + }; + // initializes loggedinUsder + AuthService.prototype.autoLogin = function () { + console.log("auth.service.ts - autoLogin method - begin"); + var loggedInUser = localStorage.getItem('loggedInUser'); + if (loggedInUser === null) { + console.log("auth.service.ts - autoLogin method - (loggedInUser===null)"); + return; + } + else { + console.log("auth.service.ts - autoLogin method - (sending saved observable)"); + this.loggedInUser.next(loggedInUser); + } + }; + AuthService.prototype.logout = function () { + this.loggedInUser.next(null); + this.router.navigate(['/home']); + localStorage.removeItem('loggedInUser'); + this.removeTokens(); + }; + //may not need + // autoLogout(expirationDuration: number){ + // console.log(expirationDuration); + // this.tokenExpirationTimer= setTimeout(() => { + // this.logout(); + // },expirationDuration); + // } + AuthService.prototype.login = function (userName, password) { + var _this = this; + console.log("auth.service.ts -login method - begin"); + return this.http + .post(src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].userServer + '/login', { + username: userName, + password: password + }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(this.handleError), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (resData) { + _this.loggedInUser.next(userName); + _this.storeAccessToken(resData.access_token, resData.access_token); + _this.storeRefreshToken(resData.refresh_token, resData.refresh_expires); + console.log("auth.service.ts -login method - loggedInUser: " + _this.loggedInUser.getValue()); + console.log("auth.service.ts -login method - resData: " + JSON.stringify(resData)); + })); + }; + AuthService.prototype.handleError = function (errorRes) { + console.log("auth.service.ts - handleError method - begin"); + if (errorRes.message.startsWith('Http failure response for')) { + var errorMessage_1 = 'You appear to be offline or unable to reach ' + errorRes.url; + return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["throwError"])(errorMessage_1); + } + var errorMessage = 'An unknown error occurred!!!! \n' + JSON.stringify(errorRes); + if (!errorRes.error || !errorRes.error.error) { + return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["throwError"])(errorMessage); + } + switch (errorRes.error.error.message) { + case 'EMAIL_EXISTS': + errorMessage = 'This email exists already!'; + break; + case 'EMAIL_NOT_FOUND': + errorMessage = 'Email address not found!'; + break; + case 'INVALID_PASSWORD': + errorMessage = 'This password is not correct.'; + break; + } + return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["throwError"])(errorMessage); + }; + //use refresh token to get a new access token + AuthService.prototype.refreshToken = function () { + var _this = this; + console.log("auth.service.ts - refreshToken method - begin"); + var token = this.getRefreshToken(); + var httpOptions = { + headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpHeaders"]({ + 'Authorization': "Bearer " + token + }) + }; + return this.http.post(src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].userServer + "/token/refresh", { + 'refreshToken': this.getRefreshToken() + }, httpOptions).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(function (resData) { + _this.storeAccessToken(resData.access_token, resData.access_expires); + })); + }; + // private removeUser(){ + // localStorage.removeItem('user'); + // } + // check if loggedInUser has a value and in which case, the user is logged in + AuthService.prototype.isLoggedIn = function () { + console.log("auth.service.ts - isLoggedIn method - begin"); + return !!this.loggedInUser.getValue(); + }; + AuthService.prototype.getAccessToken = function () { + console.log("auth.service.ts - getAccessToken method - begin"); + return localStorage.getItem(this.ACCESS_TOKEN); + }; + AuthService.prototype.doLogoutUser = function () { + this.loggedInUser = null; + this.removeTokens(); + }; + AuthService.prototype.getRefreshToken = function () { + console.log("auth.service.ts - getRefreshToken method - begin"); + return localStorage.getItem(this.REFRESH_TOKEN); + }; + AuthService.prototype.storeAccessToken = function (token, expires) { + console.log("auth.service.ts - storeAccessToken method - begin"); + localStorage.setItem(this.ACCESS_TOKEN, token); + var expirationDate = new Date(new Date().getTime() + +expires * 1000); + localStorage.ACCESS_TOKEN_EXPIRATION = expirationDate; + }; + AuthService.prototype.storeRefreshToken = function (token, expires) { + console.log("auth.service.ts - storeRefreshToken method - begin"); + localStorage.setItem(this.REFRESH_TOKEN, token); + var expirationDate = new Date(new Date().getTime() + +expires * 1000); + localStorage.REFRESH_TOKEN_EXPIRATION = expirationDate; + }; + AuthService.prototype.removeTokens = function () { + console.log("auth.service.ts - removeTokens method - begin"); + localStorage.removeItem(this.ACCESS_TOKEN); + localStorage.removeItem(this.ACCESS_TOKEN_EXPIRATION); + localStorage.removeItem(this.REFRESH_TOKEN); + localStorage.removeItem(this.REFRESH_TOKEN_EXPIRATION); + }; + AuthService.ctorParameters = function () { return [ + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] }, + { type: _angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"] } + ]; }; + AuthService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"], + _angular_router__WEBPACK_IMPORTED_MODULE_5__["Router"]]) + ], AuthService); + return AuthService; +}()); + + + +/***/ }), + +/***/ "./src/app/user/auth/loading-spinner/loading-spinner.component.css": +/*!*************************************************************************!*\ + !*** ./src/app/user/auth/loading-spinner/loading-spinner.component.css ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = ".lds-circle {\n display: inline-block;\n -webkit-transform: translateZ(1px);\n transform: translateZ(1px);\n}\n.lds-circle > div {\n display: inline-block;\n width: 51px;\n height: 51px;\n margin: 6px;\n border-radius: 50%;\n background: rgb(19, 12, 226);\n -webkit-animation: lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;\n animation: lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;\n}\n@-webkit-keyframes lds-circle {\n 0%, 100% {\n -webkit-animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);\n animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);\n }\n 0% {\n -webkit-transform: rotateY(0deg);\n transform: rotateY(0deg);\n }\n 50% {\n -webkit-transform: rotateY(1800deg);\n transform: rotateY(1800deg);\n -webkit-animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);\n animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);\n }\n 100% {\n -webkit-transform: rotateY(3600deg);\n transform: rotateY(3600deg);\n }\n}\n@keyframes lds-circle {\n 0%, 100% {\n -webkit-animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);\n animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);\n }\n 0% {\n -webkit-transform: rotateY(0deg);\n transform: rotateY(0deg);\n }\n 50% {\n -webkit-transform: rotateY(1800deg);\n transform: rotateY(1800deg);\n -webkit-animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);\n animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);\n }\n 100% {\n -webkit-transform: rotateY(3600deg);\n transform: rotateY(3600deg);\n }\n}\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvdXNlci9hdXRoL2xvYWRpbmctc3Bpbm5lci9sb2FkaW5nLXNwaW5uZXIuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHFCQUFxQjtFQUNyQixrQ0FBMEI7VUFBMUIsMEJBQTBCO0FBQzVCO0FBQ0E7RUFDRSxxQkFBcUI7RUFDckIsV0FBVztFQUNYLFlBQVk7RUFDWixXQUFXO0VBQ1gsa0JBQWtCO0VBQ2xCLDRCQUE0QjtFQUM1Qix3RUFBZ0U7VUFBaEUsZ0VBQWdFO0FBQ2xFO0FBQ0E7RUFDRTtJQUNFLCtEQUF1RDtZQUF2RCx1REFBdUQ7RUFDekQ7RUFDQTtJQUNFLGdDQUF3QjtZQUF4Qix3QkFBd0I7RUFDMUI7RUFDQTtJQUNFLG1DQUEyQ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biAgfVxuICA1MCUge1xuICAgIHRyYW5zZm9ybTogcm90YXRlWSgxODAwZGVnKTtcbiAgICBhbmltYXRpb24tdGltaW5nLWZ1bmN0aW9uOiBjdWJpYy1iZXppZXIoMCwgMC41LCAwLjUsIDEpO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogcm90YXRlWSgzNjAwZGVnKTtcbiAgfVxufVxuIl19 */" + +/***/ }), + +/***/ "./src/app/user/auth/loading-spinner/loading-spinner.component.ts": +/*!************************************************************************!*\ + !*** ./src/app/user/auth/loading-spinner/loading-spinner.component.ts ***! + \************************************************************************/ +/*! exports provided: LoadingSpinnerComponent */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingSpinnerComponent", function() { return LoadingSpinnerComponent; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); + + +var LoadingSpinnerComponent = /** @class */ (function () { + function LoadingSpinnerComponent() { + } + LoadingSpinnerComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ + selector: 'app-loading-spinner', + template: '
Facebook
', + styles: [__webpack_require__(/*! ./loading-spinner.component.css */ "./src/app/user/auth/loading-spinner/loading-spinner.component.css")] + }) + ], LoadingSpinnerComponent); + return LoadingSpinnerComponent; +}()); + + + +/***/ }), + +/***/ "./src/app/user/auth/token.interceptor.ts": +/*!************************************************!*\ + !*** ./src/app/user/auth/token.interceptor.ts ***! + \************************************************/ +/*! exports provided: TokenInterceptor */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TokenInterceptor", function() { return TokenInterceptor; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); +/* harmony import */ var _auth_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./auth.service */ "./src/app/user/auth/auth.service.ts"); +// logic borrowed from https://angular-academy.com/angular-jwt/ +// all http requests will be intercepted by this token interceptor +// which adds the access token to the request, unless URL contains refresh + + + + + + +var TokenInterceptor = /** @class */ (function () { + function TokenInterceptor(authService) { + this.authService = authService; + this.isRefreshing = false; + this.refreshTokenSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__["BehaviorSubject"](null); + } + TokenInterceptor.prototype.intercept = function (request, next) { + var _this = this; + console.log("token.interceptorts - intercept method - begin"); + if (this.authService.loggedInUser.getValue()) { + //if it's a refresh request, don't overwrite the token since it was already added + if (request.url.indexOf('refresh') < 0) { + request = this.addToken(request, this.authService.getAccessToken()); + } + } + return next.handle(request).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(function (error) { + if (error instanceof _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpErrorResponse"] && error.status === 401) { + return _this.handle401Error(request, next); + } + else { + return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["throwError"])(error); + } + })); + }; + TokenInterceptor.prototype.addToken = function (request, token) { + console.log("token.interceptorts - addToken method - begin"); + return request.clone({ + setHeaders: { + 'Authorization': "Bearer " + token + } + }); + }; + TokenInterceptor.prototype.handle401Error = function (request, next) { + var _this = this; + console.log("token.interceptorts - handle401Error method - begin"); + if (!this.isRefreshing) { + this.isRefreshing = true; + this.refreshTokenSubject.next(null); + return this.authService.refreshToken().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["switchMap"])(function (token) { + _this.isRefreshing = false; + _this.refreshTokenSubject.next(token.access_token); + return next.handle(_this.addToken(request, token.access_token)); + })); + } + else { + return this.refreshTokenSubject.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["filter"])(function (token) { return token != null; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["switchMap"])(function (access_token) { + return next.handle(_this.addToken(request, access_token)); + })); + } + }; + TokenInterceptor.ctorParameters = function () { return [ + { type: _auth_service__WEBPACK_IMPORTED_MODULE_5__["AuthService"] } + ]; }; + TokenInterceptor = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])(), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_auth_service__WEBPACK_IMPORTED_MODULE_5__["AuthService"]]) + ], TokenInterceptor); + return TokenInterceptor; +}()); + + + +/***/ }), + +/***/ "./src/app/user/user-profile/user-profile.model.ts": +/*!*********************************************************!*\ + !*** ./src/app/user/user-profile/user-profile.model.ts ***! + \*********************************************************/ +/*! exports provided: UserProfile, UserProfileFixed */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserProfile", function() { return UserProfile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserProfileFixed", function() { return UserProfileFixed; }); +//contains the two classes UserProfile and UserProfileFixed +var UserProfile = /** @class */ (function () { + // created constructor to initialize UserProfile - early on + function UserProfile(username, datesTaken, points, badgeCount, lastupdate, readable_ts) { + this.badges = { 'daily_survey': [], + 'money': 0, + }; + this.daily_streak = {}; + this.imei = "0"; + this.dollars = 0; + this.life_insights = { "daily_survey": {} }; + this.reinfrocement_data = {}; + this.survey_data = { + 'daily_survey': {}, + 'points': 0, + 'weekly_survey': {} + }; + this.username = username; + this.datesTaken = datesTaken; + this.points = points; + this.badgeCount = badgeCount; + this.lastupdate = lastupdate; + this.readable_ts = readable_ts; + } + UserProfile.ctorParameters = function () { return [ + { type: String }, + { type: Array }, + { type: Number }, + { type: Number }, + { type: Number }, + { type: String } + ]; }; + return UserProfile; +}()); + +var UserProfileFixed = /** @class */ (function () { + function UserProfileFixed() { + this.onDates = {}; + } + return UserProfileFixed; +}()); + + + +/***/ }), + +/***/ "./src/app/user/user-profile/user-profile.service.ts": +/*!***********************************************************!*\ + !*** ./src/app/user/user-profile/user-profile.service.ts ***! + \***********************************************************/ +/*! exports provided: UserProfileService */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserProfileService", function() { return UserProfileService; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _user_profile_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./user-profile.model */ "./src/app/user/user-profile/user-profile.model.ts"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts"); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic-native/onesignal/ngx */ "./node_modules/@ionic-native/onesignal/ngx/index.js"); +/* harmony import */ var _storage_network_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../storage/network.service */ "./src/app/storage/network.service.ts"); + + + + + + + + + + +var UserProfileService = /** @class */ (function () { + function UserProfileService(http, networkSvc, oneSignal) { + this.http = http; + this.networkSvc = networkSvc; + this.oneSignal = oneSignal; + this.me = this; + this.saveToServerRequestInQueue = false; + this.initialLoading = new rxjs__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"](true); + } + //returns Observable that we can subscribed to so as to trigger an action after + //user profiles have been initialized + UserProfileService.prototype.initializeObs = function () { + var _this = this; + //get profiles from server + console.log("user-profile.service.ts - initializeObs method"); + var getProfile = this.http.post(src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userServer + '/userinfo', { "empty": "empty" }); + var getProfileFixed = this.http.get(src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userServer + '/userinfofixed'); + // forkJoin will return an observable that waits till both http requests have received responses + return Object(rxjs__WEBPACK_IMPORTED_MODULE_5__["forkJoin"])([getProfile, getProfileFixed]) + .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["tap"])(function (response) { + console.log("in response of forkjoin"); + var response1 = response[0]; + var response2 = response[1]; + console.log("initializeObs response1: " + JSON.stringify(response1)); + console.log("initializeObs response2: " + JSON.stringify(response2)); + // console.log("initializeOb - response1.username: " + response1.username); + // console.log("initializeOb - !response1.username: " + !response1.username); + // console.log("initializeOb - !response1.hasOwnProperty('username'): " + !response1.hasOwnProperty('username')); + if (!response1.username || !response1.hasOwnProperty('username')) { + console.log("blank or empty user_name"); + var username = localStorage.getItem('loggedInUser'); + var currenttime = new Date(); + var dateString = moment__WEBPACK_IMPORTED_MODULE_7__(currenttime).format('MMMM Do YYYY, h:mm:ss a Z'); + _this.userProfile = new _user_profile_model__WEBPACK_IMPORTED_MODULE_2__["UserProfile"](username, [], 0, 0, currenttime.getTime(), dateString); + } + else { + _this.userProfile = response1; + if (_this.userProfile.hasOwnProperty("AwardDollarDates")) { + localStorage.setItem("AwardDollarDates", JSON.stringify(_this.userProfile.AwardDollarDates)); + } + localStorage.setItem("AwardDollar", JSON.stringify(_this.userProfile.dollars)); + } + _this.userProfileFixed = response2; + _this.saveProfileToDevice(); + _this.initialLoading.next(false); + })); + }; + UserProfileService.prototype.fetchUserProfile = function () { + var _this = this; + //get userProfile from server + console.log("user-profile.service.ts - fetchUserProfile method"); + var getProfile = this.http.post(src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userServer + '/userinfo', { "empty": "empty" }); + return getProfile + .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["tap"])(function (response) { + var serverCopyNewer = false; + console.log("fetchUserProfile response: " + JSON.stringify(response)); + // check if server copy is newer + if (response.hasOwnProperty("lastupdate") && response.lastupdate > _this.userProfile.lastupdate) { + _this.userProfile = response; + if (_this.userProfile.hasOwnProperty("AwardDollarDates")) { + localStorage.setItem("AwardDollarDates", JSON.stringify(_this.userProfile.AwardDollarDates)); + } + localStorage.setItem("AwardDollar", JSON.stringify(_this.userProfile.dollars)); + _this.userProfileFixed = response; + _this.saveProfileToDevice(); + serverCopyNewer = true; + } + else { + serverCopyNewer = false; + } + return { "serverCopyNewer": serverCopyNewer }; + })); + }; + UserProfileService.prototype.fetchUserProfileFixed = function () { + var _this = this; + //get userProfileFixed from server + console.log("user-profile.service.ts - fetchUserProfileFixed method"); + var getProfileFixed = this.http.get(src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userServer + '/userinfofixed'); + return getProfileFixed + .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["tap"])(function (response) { + var changed = false; + console.log("fetchUserProfileFixed response: " + JSON.stringify(response)); + var receivedUserFixedProfile = response; + if (receivedUserFixedProfile.isActive !== _this.userProfileFixed.isActive) { + _this.userProfileFixed = response; + _this.saveProfileToDevice(); + changed = true; + } + return { "changed": changed }; + })); + }; + UserProfileService.prototype.addOneSignalPlayerId = function () { + var _this = this; + this.oneSignal.getIds().then(function (id) { return tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](_this, void 0, void 0, function () { + var playerId; + return tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"](this, function (_a) { + playerId = id.userId; + this.userProfile.oneSignalPlayerId = id.userId; + console.log("onesignal player id: " + id); + this.saveProfileToDevice(); + this.saveToServer(); + return [2 /*return*/]; + }); + }); }); + }; + /* + addReinforcementData returns true if successful at adding the element (it doesn't already exist for the given date) + date is a string of the format YYYYMMDD (e.g. "20170430") + + reinforcementObj is an object of the form: + { + "ds": 1, //means participants completed the survey + "prob": 0.23, + "Like": "yes", //no if participants hated it. + "reward": 1, //0 means users were not randomized + "reward_type": "meme", //'altruistic message' + "reward_img_link": "img/reinforcements/memes/IM25.jpg" + } + */ + UserProfileService.prototype.addReinforcementData = function (date, reinforcementObj) { + if (!(date in this.userProfile.reinfrocement_data)) { + this.userProfile.reinfrocement_data[date] = reinforcementObj; + return true; + } + else { + return false; + } + }; + // not currenlty using below method (wich calcs dollars based on days survey is taken in UserProfile) + // instead allowing award-dollar.service to calc streaks + UserProfileService.prototype.calcDollars = function () { + //this method calculates the number of three day streaks + //then sets dollars = to number of three day streaks + var previousDate = new Date("1970-01-01"); + var numStreaks = 0; + var streak = 1; + // console.log("calcDollars, # dates: " + this.userProfile.datesTaken.length); + for (var i = 0; i < this.userProfile.datesTaken.length; i++) { + var currentDateStr = this.userProfile.datesTaken[i]; + var currentDate = new Date(currentDateStr.substr(0, 4) + "-" + currentDateStr.substr(4, 2) + "-" + currentDateStr.substr(6, 2)); + // console.log("calcDollars: " + currentDate); + var daysDiff = Math.round((currentDate.getTime() - previousDate.getTime()) / (1000 * 60 * 60 * 24)); + if (daysDiff == 0) { + continue; + } + if (daysDiff == 1) { + streak++; + // console.log("streak: "+ streak); + if (streak == 3) { + numStreaks++; + // reset + previousDate = new Date("1970-01-01"); //set previousDate to 1970-01-01 + streak = 1; + } + } + else { + //reset + streak = 1; + } + previousDate = currentDate; + } + console.log("numStreaks: " + numStreaks); + this.userProfile.dollars = numStreaks; + }; + Object.defineProperty(UserProfileService.prototype, "isActive", { + get: function () { + //console.log("user-profile.service.ts - isActive getter - begin"); + return this.userProfileFixed.isActive; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "isParent", { + get: function () { + console.log("user-profile.service.ts - isParent getter - begin"); + return this.userProfileFixed.isParent; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "points", { + get: function () { + console.log("user-profile.service.ts - points getter - begin"); + if (this.userProfile == undefined) + this.loadProfileFromDevice(); + return this.userProfile.points; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "username", { + get: function () { + //console.log("user-profile.service.ts - username getter - begin"); + if (this.userProfile == undefined) + this.loadProfileFromDevice(); + return this.userProfile.username; + }, + set: function (username) { + console.log("user-profile.service.ts - isActive setter - begin"); + this.userProfile.username = username; + this.saveProfileToDevice(); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "versionNumber", { + get: function () { + if (this.userProfile == undefined) + this.loadProfileFromDevice(); + return this.userProfile.versionNumber; + }, + set: function (versionNumber) { + this.userProfile.versionNumber = versionNumber; + this.saveProfileToDevice(); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "oneSignalPlayerId", { + get: function () { + return this.userProfile.oneSignalPlayerId; + }, + enumerable: true, + configurable: true + }); + UserProfileService.prototype.saveToServer = function () { + var _this = this; + this.saveToServerRequestInQueue = true; + if (this.networkSvc.getCurrentNetworkStatus() == _storage_network_service__WEBPACK_IMPORTED_MODULE_9__["ConnectionStatus"].Online) { + this.loadProfileFromDevice(); + var userProfile = this.userProfile; + this.http + .post(src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userServer + '/setuserinfo', userProfile) + .subscribe(function (response) { + console.log(response); + _this.saveToServerRequestInQueue = false; + }); + } + else { + this.saveToServerSub = this.networkSvc.onNetworkChange().subscribe(function () { + if (_this.networkSvc.getCurrentNetworkStatus() == _storage_network_service__WEBPACK_IMPORTED_MODULE_9__["ConnectionStatus"].Online) { + _this.loadProfileFromDevice(); + var userProfile = _this.userProfile; + _this.http + .post(src_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].userServer + '/setuserinfo', userProfile) + .subscribe(function (response) { + console.log(response); + _this.saveToServerRequestInQueue = false; + _this.saveToServerSub.unsubscribe(); + }); + } + }); + } + // console.log("saveToServer userProfile: " + JSON.stringify(userProfile)); + }; + UserProfileService.prototype.retrieve = function (userID) { + }; + UserProfileService.prototype.getProfile = function () { + }; + UserProfileService.prototype.initTestProfile = function () { + var currenttime = new Date(); + var dateString = moment__WEBPACK_IMPORTED_MODULE_7__(currenttime).format('MMMM Do YYYY, h:mm:ss a Z'); + var userProfile = new _user_profile_model__WEBPACK_IMPORTED_MODULE_2__["UserProfile"]('testy', [], 0, 3, currenttime.getTime(), dateString); + this.userProfile = userProfile; + this.saveProfileToDevice(); + //STORE ON DEVICE + }; + UserProfileService.prototype.saveProfileToDevice = function () { + localStorage.setItem('userProfile', JSON.stringify(this.userProfile)); + // maybe use this logic in case it's undefined: https://stackoverflow.com/questions/37417012/unexpected-token-u-in-json-at-position-0 + localStorage.setItem('userProfileFixed', JSON.stringify(this.userProfileFixed)); + }; + UserProfileService.prototype.profileIsOnDevice = function () { + if (localStorage.getItem('userProfile') !== null) { + return true; + } + else { + return false; + } + }; + UserProfileService.prototype.loadProfileFromDevice = function () { + this.userProfile = JSON.parse(localStorage.getItem('userProfile')); + this.userProfileFixed = JSON.parse(localStorage.getItem('userProfileFixed')); + //temporarily commenting out below line (see other instance for more info) + // this.userProfileFixed = JSON.parse(localStorage.getItem('userProfileFixed')); + }; + // below method can be called when a survey has been completed + // it does all the needed accounting + // adds current date to dict (and array) + UserProfileService.prototype.surveyCompleted = function () { + console.log("user-profile.service.ts - surveyCompleted method - begin"); + var username = localStorage.getItem('loggedInUser'); //this.authService.loggedInUser.getValue() + // check if survey has already been take for the current day or admin is contained in the username + // console.log('surveyCompleted - before if loop'); + if (!this.surveyTakenForCurrentDay() || username.indexOf('admin') >= 0) { + // console.log('surveyCompleted - in if loop'); + this.addDateTaken(); + this.addSurveyPoints(); + //this.calcDollars(); + this.userProfile.lastupdate = this.numericCurrenDateTime; + var dateString = moment__WEBPACK_IMPORTED_MODULE_7__(this.userProfile.lastupdate).format('MMMM Do YYYY, h:mm:ss a Z'); + this.userProfile.readable_ts = dateString; + // console.log("in SurveyCompleted, AwardDollarDates: "+ localStorage.getItem("AwardDollarDates")); + this.userProfile.AwardDollarDates = JSON.parse(localStorage.getItem("AwardDollarDates")); //fetch AwardDollarDates from local storage and add it to the UserProfile + try { + this.userProfile.dollars = JSON.parse(localStorage.getItem("AwardDollar")); + } + catch (error) { + window.localStorage.setItem("AwardDollar", "" + 0); + this.userProfile.dollars = 0; + } + this.saveProfileToDevice(); + this.saveToServer(); + } + }; + Object.defineProperty(UserProfileService.prototype, "stringCurrenDate", { + get: function () { + console.log("user-profile.service.ts - stringCurrenDate getter - begin"); + //shift hours back by 2, so that 2am, will register as 12am + var hoursShift = 2; + var currentDateTime = new Date(); + currentDateTime.setHours(currentDateTime.getHours() - hoursShift); + //now, set hours, min, sec to zero + currentDateTime.setHours(0, 0, 0, 0); + return currentDateTime.getFullYear() + + "" + ('0' + (currentDateTime.getMonth() + 1)).slice(-2) + + "" + ('0' + currentDateTime.getDate()).slice(-2); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileService.prototype, "numericCurrenDateTime", { + get: function () { + console.log("user-profile.service.ts - numericCurrenDateTime getter - begin"); + //shift hours back by 2, so that 2am, will register as 12am + var hoursShift = 2; + var currentDateTime = new Date(); + currentDateTime.setHours(currentDateTime.getHours() - hoursShift); + //now, set hours, min, sec to zero + currentDateTime.setHours(0, 0, 0, 0); + return currentDateTime.getTime(); + }, + enumerable: true, + configurable: true + }); + UserProfileService.prototype.addDateTaken = function () { + console.log("user-profile.service.ts - addDateTaken method - begin"); + this.loadProfileFromDevice(); + var stringCurrenDate = this.stringCurrenDate; + this.userProfile.datesTaken.push(stringCurrenDate); + this.userProfile.survey_data.daily_survey[stringCurrenDate] = 1; + this.saveProfileToDevice(); + }; + // boolean function, checks if survey has been taken for the current date. + UserProfileService.prototype.surveyTakenForCurrentDay = function () { + console.log("user-profile.service.ts - surveyTakenForCurrentDay method - begin"); + this.loadProfileFromDevice(); + //check if date already exists in dict of dates, otherwise add the date to dict + // var hasMatch = false; + if (this.stringCurrenDate in this.userProfile.survey_data.daily_survey) { + return true; + } + else { + return false; + } + }; + UserProfileService.prototype.addSurveyPoints = function () { + console.log("user-profile.service.ts - addSurveyPoints method - begin"); + var pointsPerSurvey = 60; + this.addPoints(pointsPerSurvey); + }; + UserProfileService.prototype.addPoints = function (points) { + console.log("user-profile.service.ts - addPoints method - begin"); + this.userProfile.points += points; + this.userProfile.survey_data.points += points; + this.saveProfileToDevice(); + this.saveToServer(); + }; + UserProfileService.prototype.cheatPoints = function (points) { + console.log("user-profile.service.ts - cheatPoints method - begin"); + this.userProfile.points = points; + this.userProfile.survey_data.points = points; + this.saveProfileToDevice(); + this.saveToServer(); + }; + UserProfileService.prototype.removeUserProfile = function () { + localStorage.removeItem('userProfile'); + }; + UserProfileService.ctorParameters = function () { return [ + { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"] }, + { type: _storage_network_service__WEBPACK_IMPORTED_MODULE_9__["NetworkService"] }, + { type: _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_8__["OneSignal"] } + ]; }; + UserProfileService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ + providedIn: 'root' + }), + tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"]("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"], + _storage_network_service__WEBPACK_IMPORTED_MODULE_9__["NetworkService"], + _ionic_native_onesignal_ngx__WEBPACK_IMPORTED_MODULE_8__["OneSignal"]]) + ], UserProfileService); + return UserProfileService; +}()); + + + +/***/ }), + +/***/ "./src/app/user/user.module.ts": +/*!*************************************!*\ + !*** ./src/app/user/user.module.ts ***! + \*************************************/ +/*! exports provided: UserModule, UserProfile */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UserModule", function() { return UserModule; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); +/* harmony import */ var _auth_auth_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./auth/auth.component */ "./src/app/user/auth/auth.component.ts"); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); +/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/dist/fesm5.js"); +/* harmony import */ var _angular_fire_auth__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/fire/auth */ "./node_modules/@angular/fire/auth/index.js"); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); +/* harmony import */ var _auth_token_interceptor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./auth/token.interceptor */ "./src/app/user/auth/token.interceptor.ts"); +/* harmony import */ var _auth_loading_spinner_loading_spinner_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./auth/loading-spinner/loading-spinner.component */ "./src/app/user/auth/loading-spinner/loading-spinner.component.ts"); +/* harmony import */ var _user_profile_user_profile_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./user-profile/user-profile.model */ "./src/app/user/user-profile/user-profile.model.ts"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UserProfile", function() { return _user_profile_user_profile_model__WEBPACK_IMPORTED_MODULE_10__["UserProfile"]; }); + + + + + + + + + + + +var UserModule = /** @class */ (function () { + function UserModule() { + } + UserModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ + declarations: [_auth_auth_component__WEBPACK_IMPORTED_MODULE_3__["AuthComponent"], _auth_loading_spinner_loading_spinner_component__WEBPACK_IMPORTED_MODULE_9__["LoadingSpinnerComponent"]], + imports: [ + _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], + _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"], + _ionic_angular__WEBPACK_IMPORTED_MODULE_5__["IonicModule"].forRoot(), + // AngularFireModule.initializeApp(environment.firebase), + _angular_fire_auth__WEBPACK_IMPORTED_MODULE_6__["AngularFireAuthModule"] + ], + exports: [_auth_auth_component__WEBPACK_IMPORTED_MODULE_3__["AuthComponent"]], + providers: [ + { + provide: _angular_common_http__WEBPACK_IMPORTED_MODULE_7__["HTTP_INTERCEPTORS"], + useClass: _auth_token_interceptor__WEBPACK_IMPORTED_MODULE_8__["TokenInterceptor"], + multi: true + } + // , UserProfile + ], + schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]] + }) + ], UserModule); + return UserModule; +}()); + + + + +/***/ }), + +/***/ "./src/environments/environment.ts": +/*!*****************************************!*\ + !*** ./src/environments/environment.ts ***! + \*****************************************/ +/*! exports provided: environment */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; }); +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. +var environment = { + production: false, + //userServer:"http://adaptsdata.research.chop.edu:5000", + userServer: "http://52.201.144.36:5000", + oneSignalAppId: "f9c4370d-cbcb-4e6f-ab1f-25d1c41b8f3a", + //oneSignalAppId: "de3580a2-4aae-42c4-87cf-2c319c2df0c3", + encyptString: "+Xr?SwA?EJ7m+g$c", + flaskServerForIncentives: "http://ec2-52-201-144-36.compute-1.amazonaws.com:56733", + //flaskServerForIncentives: "http://adaptsdata.research.chop.edu:5000", + firebaseConfig: { + apiKey: "AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0", + authDomain: "sarav2-6a033.firebaseapp.com", + databaseURL: "https://sarav2-6a033.firebaseio.com", + projectId: "sarav2-6a033", + storageBucket: "sarav2-6a033.appspot.com", + messagingSenderId: "110945766941", + appId: "1:489827689493:web:7f72eb7033e9acf5" + }, + azureConfig: { + sas: '?sv=2018-03-28&ss=b&srt=sco&sp=rwl&st=2019-06-27T18%3A15%3A56Z&se=2020-06-28T18%3A15%3A00Z&sig=vccYOEN3SG%2BErA4%2FzmDNn0w4qOn%2FT4tB8jGnEIJoXh4%3D', + storageAccount: 'securebloblyh', + containerName: 'mycontainer' + }, + awsConfig: { + /* + // CHOP + bucketName: 'chop-sara', + bucketRegion: 'us-east-1', + IdentityPoolId: 'us-east-1:667b1ad5-ccdc-4d90-b94f-300732b55448' + */ + //Harvard + bucketName: 'sara-dev-data-storage', + bucketRegion: 'us-east-2', + IdentityPoolId: 'us-east-2:bce8a68d-d3f3-4ac1-a16c-eab1d92597a4' + }, + googleAnalytic: { + id: 'UA-152399644-1' + } +}; +// export const environment = { +// production: false, +// userServer:"http://autherServerName.com", +// oneSignalAppId: "", +// firebase: { +// apiKey: "AIzaSyDM8d1yG2rNPc8AotB0NoN3Q2wMq4HDooo", +// authDomain: "adapts-331ee.firebaseapp.com", +// databaseURL: "https://adapts-331ee.firebaseio.com", +// projectId: "adapts-331ee", +// storageBucket: "adapts-331ee.appspot.com", +// messagingSenderId: "110945766941", +// appId: "1:110945766941:web:7c940aefa53553c39bc0f4", +// measurementId: "G-TL8MFZNE2M" +// // apiKey: "AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0", +// // authDomain: "sarav2-6a033.firebaseapp.com", +// // databaseURL: "https://sarav2-6a033.firebaseio.com", +// // projectId: "sarav2-6a033", +// // storageBucket: "sarav2-6a033.appspot.com", +// // messagingSenderId: "489827689493", +// // appId: "1:489827689493:web:7f72eb7033e9acf5" +// }, +// firebaseConfig: { +// // apiKey: "AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0", +// // authDomain: "sarav2-6a033.firebaseapp.com", +// // databaseURL: "https://sarav2-6a033.firebaseio.com", +// // projectId: "sarav2-6a033", +// // storageBucket: "sarav2-6a033.appspot.com", +// messagingSenderId: "489827689493", +// // appId: "1:489827689493:web:7f72eb7033e9acf5" +// } +// }; +/* + * For easier debugging in development mode, you can import the following file + * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. + * + * This import should be commented out in production mode because it will have a negative impact + * on performance if an error is thrown. + */ +// import 'zone.js/dist/zone-error'; // Included with Angular CLI. + + +/***/ }), + +/***/ "./src/main.ts": +/*!*********************!*\ + !*** ./src/main.ts ***! + \*********************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _polyfills_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfills.ts */ "./src/polyfills.ts"); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); +/* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js"); +/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts"); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts"); + + + + + +if (_environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].production) { + Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["enableProdMode"])(); +} +Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_2__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_3__["AppModule"]) + .catch(function (err) { return console.log(err); }); + + +/***/ }), + +/***/ "./src/polyfills.ts": +/*!**************************!*\ + !*** ./src/polyfills.ts ***! + \**************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _zone_flags_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zone-flags.ts */ "./src/zone-flags.ts"); +/* harmony import */ var _zone_flags_ts__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_zone_flags_ts__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! zone.js/dist/zone */ "./node_modules/zone.js/dist/zone.js"); +/* harmony import */ var zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(zone_js_dist_zone__WEBPACK_IMPORTED_MODULE_1__); +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ +/*************************************************************************************************** + * BROWSER POLYFILLS + */ +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. +/** + * Web Animations `@angular/platform-browser/animations` + * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. + * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). + */ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags.ts'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * + */ + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ + // Included with Angular CLI. +/*************************************************************************************************** + * APPLICATION IMPORTS + */ +// aws-sdk requires global to exist +window.global = window; + + +/***/ }), + +/***/ "./src/zone-flags.ts": +/*!***************************!*\ + !*** ./src/zone-flags.ts ***! + \***************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Prevents Angular change detection from + * running with certain Web Component callbacks + */ +window.__Zone_disable_customElements = true; + + +/***/ }), + +/***/ 0: +/*!***************************!*\ + !*** multi ./src/main.ts ***! + \***************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! /Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular/src/main.ts */"./src/main.ts"); + + +/***/ }), + +/***/ 1: +/*!********************!*\ + !*** fs (ignored) ***! + \********************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }) + +},[[0,"runtime","vendor"]]]); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/platforms/ios/www/main.js.map b/platforms/ios/www/main.js.map new file mode 100644 index 000000000..00f16b754 --- /dev/null +++ b/platforms/ios/www/main.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["./node_modules/@ionic/core/dist/esm-es5 lazy ^\\.\\/.*\\.entry\\.js$ include: \\.entry\\.js$ exclude: \\.system\\.entry\\.js$ namespace object","./node_modules/moment/locale sync ^\\.\\/.*$","./src/app/app.component.html","./src/app/home/contact/contact.component.html","./src/app/home/header/header.component.html","./src/app/home/home.page.html","./src/app/home/terms-of-service/terms-of-service.component.html","./src/app/incentive/aquarium/aquarium.component.html","./src/app/incentive/aquarium/cheatpage/cheatpage.component.html","./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.html","./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.html","./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.html","./src/app/incentive/aquarium/previews/rainforest/rainforest.component.html","./src/app/incentive/aquarium/previews/sea/sea.component.html","./src/app/incentive/aquarium/previews/tundra/tundra.component.html","./src/app/incentive/award-altruism/award-altruism.component.html","./src/app/incentive/award-memes/award-memes.component.html","./src/app/incentive/info-page/info-page.component.html","./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.html","./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.html","./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.html","./src/app/incentive/treasurechest/treasurechest.component.html","./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.html","./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.html","./src/app/incentive/unlocked-memes/unlocked-memes.component.html","./src/app/incentive/video-info-page/video-info-page.component.html","./src/app/intervention/harvard-arc-apps/front-page/front-page.component.html","./src/app/survey/aya-sample-survey/aya-sample-survey.component.html","./src/app/survey/dynamic-survey/dynamic-survey.component.html","./src/app/survey/harvard-survey/harvard-survey.component.html","./src/app/survey/sample-survey/sample-survey.component.html","./src/app/survey/sleep-survey/sleep-survey.component.html","./src/app/user/auth/auth.component.html","./node_modules/zone.js/dist/zone.js","./src/$_lazy_route_resource lazy namespace object","./src/app/animations/modal_enter.ts","./src/app/animations/modal_leave.ts","./src/app/app-routing.module.ts","./src/app/app.component.ts","./src/app/app.module.ts","./src/app/home/contact/contact.component.css","./src/app/home/contact/contact.component.ts","./src/app/home/header/header.component.scss","./src/app/home/header/header.component.ts","./src/app/home/home-routing.module.ts","./src/app/home/home.module.ts","./src/app/home/home.page.scss","./src/app/home/home.page.ts","./src/app/home/terms-of-service/terms-of-service.component.scss","./src/app/home/terms-of-service/terms-of-service.component.ts","./src/app/incentive/action-types.ts","./src/app/incentive/aquarium/aquarium.component.css","./src/app/incentive/aquarium/aquarium.component.ts","./src/app/incentive/aquarium/aquarium.module.ts","./src/app/incentive/aquarium/cheatpage/cheatpage.component.scss","./src/app/incentive/aquarium/cheatpage/cheatpage.component.ts","./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.less","./src/app/incentive/aquarium/demo-aquarium/demo-aquarium.component.ts","./src/app/incentive/aquarium/levels/FishBowlL1/Boot.js","./src/app/incentive/aquarium/levels/FishBowlL1/Game.js","./src/app/incentive/aquarium/levels/FishBowlL1/Preloader.js","./src/app/incentive/aquarium/levels/FishBowlL2/Boot.js","./src/app/incentive/aquarium/levels/FishBowlL2/Game.js","./src/app/incentive/aquarium/levels/FishBowlL2/Preloader.js","./src/app/incentive/aquarium/levels/GameOver/Boot.js","./src/app/incentive/aquarium/levels/GameOver/GameOver.js","./src/app/incentive/aquarium/levels/GameOver/Preloader.js","./src/app/incentive/aquarium/levels/RainforestL6/Boot.js","./src/app/incentive/aquarium/levels/RainforestL6/Game.js","./src/app/incentive/aquarium/levels/RainforestL6/Preloader.js","./src/app/incentive/aquarium/levels/SeaLevelL3/Boot.js","./src/app/incentive/aquarium/levels/SeaLevelL3/Game.js","./src/app/incentive/aquarium/levels/SeaLevelL3/Preloader.js","./src/app/incentive/aquarium/levels/SeaLevelL4/Boot.js","./src/app/incentive/aquarium/levels/SeaLevelL4/Game.js","./src/app/incentive/aquarium/levels/SeaLevelL4/Preloader.js","./src/app/incentive/aquarium/levels/TundraLevelL5/Boot.js","./src/app/incentive/aquarium/levels/TundraLevelL5/Game.js","./src/app/incentive/aquarium/levels/TundraLevelL5/Preloader.js","./src/app/incentive/aquarium/levels/TundraLevelL51/Boot.js","./src/app/incentive/aquarium/levels/TundraLevelL51/Game.js","./src/app/incentive/aquarium/levels/TundraLevelL51/Preloader.js","./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.scss","./src/app/incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component.ts","./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.css","./src/app/incentive/aquarium/previews/fishbowl/fishbowl.component.ts","./src/app/incentive/aquarium/previews/rainforest/rainforest.component.css","./src/app/incentive/aquarium/previews/rainforest/rainforest.component.ts","./src/app/incentive/aquarium/previews/sea/sea.component.css","./src/app/incentive/aquarium/previews/sea/sea.component.ts","./src/app/incentive/aquarium/previews/tundra/tundra.component.css","./src/app/incentive/aquarium/previews/tundra/tundra.component.ts","./src/app/incentive/award-altruism/award-altruism.component.scss","./src/app/incentive/award-altruism/award-altruism.component.ts","./src/app/incentive/award-memes/award-memes.component.scss","./src/app/incentive/award-memes/award-memes.component.ts","./src/app/incentive/award-money/award-dollar.service.ts","./src/app/incentive/incentive.actions.ts","./src/app/incentive/incentive.module.ts","./src/app/incentive/incentive.selectors.ts","./src/app/incentive/info-page/info-page.component.scss","./src/app/incentive/info-page/info-page.component.ts","./src/app/incentive/life-insights/life-insights.module.ts","./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.scss","./src/app/incentive/life-insights/q1-motivated/q1-motivated.component.ts","./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.scss","./src/app/incentive/life-insights/sample-life-insights/sample-life-insights.component.ts","./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.css","./src/app/incentive/life-insights/sample-python-view/sample-python-view.component.ts","./src/app/incentive/reducers/index.ts","./src/app/incentive/treasurechest/treasurechest.component.scss","./src/app/incentive/treasurechest/treasurechest.component.ts","./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.css","./src/app/incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component.ts","./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.css","./src/app/incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component.ts","./src/app/incentive/unlocked-memes/unlocked-memes.component.css","./src/app/incentive/unlocked-memes/unlocked-memes.component.ts","./src/app/incentive/video-info-page/video-info-page.component.css","./src/app/incentive/video-info-page/video-info-page.component.ts","./src/app/intervention/harvard-arc-apps/front-page/front-page.component.css","./src/app/intervention/harvard-arc-apps/front-page/front-page.component.ts","./src/app/intervention/harvard-arc-apps/harvard-arc-apps.module.ts","./src/app/intervention/intervention.module.ts","./src/app/monitor/database.service.ts","./src/app/notification/notification.module.ts","./src/app/notification/one-signal.service.ts","./src/app/reducers/index.ts","./src/app/storage/aws-s3.service.ts","./src/app/storage/encrdecrservice.service.ts","./src/app/storage/network.service.ts","./src/app/storage/storage-base.service.ts","./src/app/storage/storage.module.ts","./src/app/storage/store-to-firebase.service.ts","./src/app/survey/action-types.ts","./src/app/survey/aya-sample-survey/aya-sample-survey.component.scss","./src/app/survey/aya-sample-survey/aya-sample-survey.component.ts","./src/app/survey/dynamic-survey/dynamic-survey.component.scss","./src/app/survey/dynamic-survey/dynamic-survey.component.ts","./src/app/survey/harvard-survey/harvard-survey.component.css","./src/app/survey/harvard-survey/harvard-survey.component.ts","./src/app/survey/reducers/index.ts","./src/app/survey/sample-survey/sample-survey.component.scss","./src/app/survey/sample-survey/sample-survey.component.ts","./src/app/survey/sleep-survey/sleep-survey.component.css","./src/app/survey/sleep-survey/sleep-survey.component.ts","./src/app/survey/survey.actions.ts","./src/app/survey/survey.effects.ts","./src/app/survey/survey.module.ts","./src/app/user/auth/auth.component.scss","./src/app/user/auth/auth.component.ts","./src/app/user/auth/auth.guard.ts","./src/app/user/auth/auth.service.ts","./src/app/user/auth/loading-spinner/loading-spinner.component.css","./src/app/user/auth/loading-spinner/loading-spinner.component.ts","./src/app/user/auth/token.interceptor.ts","./src/app/user/user-profile/user-profile.model.ts","./src/app/user/user-profile/user-profile.service.ts","./src/app/user/user.module.ts","./src/environments/environment.ts","./src/main.ts","./src/polyfills.ts","./src/zone-flags.ts","fs (ignored)"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,qC;;;;;;;;;;;ACtZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6E;;;;;;;;;;;ACnRA,yiBAAyiB,iMAAiM,KAAK,UAAU,yNAAyN,mLAAmL,4LAA4L,gMAAgM,gHAAgH,kBAAkB,yoC;;;;;;;;;;;ACAnoD,kKAAkK,sGAAsG,yWAAyW,8JAA8J,uKAAuK,sE;;;;;;;;;;;ACAt7B,krD;;;;;;;;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,kBAAkB;AACzD,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,iEAAiE,+CAA+C,EAAE;AAClH;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,4DAA4D,0CAA0C;AACtG;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,uCAAuC,0BAA0B,EAAE;AACnE;AACA;AACA;AACA,wCAAwC,6DAA6D,EAAE;AACvG,uCAAuC,WAAW,EAAE;AACpD;AACA,kCAAkC,aAAa,EAAE;AACjD,oCAAoC,WAAW,EAAE;AACjD,gCAAgC,aAAa,EAAE;AAC/C,qCAAqC,aAAa,EAAE;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,0CAA0C,aAAa,EAAE;AACzD,iCAAiC,cAAc,EAAE;AACjD,uCAAuC,kBAAkB,EAAE;AAC3D,2CAA2C,aAAa,EAAE;AAC1D,qDAAqD,kBAAkB,EAAE;AACzE,mCAAmC,kBAAkB,EAAE;AACvD,iCAAiC,WAAW,EAAE;AAC9C,iCAAiC,aAAa,EAAE;AAChD,0CAA0C,aAAa,EAAE;AACzD,uCAAuC,WAAW,EAAE;AACpD,4CAA4C,aAAa,EAAE;AAC3D,wCAAwC,aAAa,EAAE;AACvD,qCAAqC,aAAa;AAClD;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4HAA4H,wBAAwB,oCAAoC;AACxL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,sEAAsE;AACtJ;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,oDAAoD;AAC5F;AACA;AACA;AACA;AACA;AACA,2BAA2B,mCAAmC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,qEAAqE,gBAAgB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,kBAAkB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,mFAAmF,kBAAkB;AACrG;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,EAAE;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,EAAE;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oCAAoC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,sBAAsB;AAChE,qCAAqC,iBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,8BAA8B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,0BAA0B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,0BAA0B,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,6BAA6B,EAAE;AACpF;AACA;AACA;AACA;AACA,8CAA8C,kDAAkD,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,sDAAsD;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,EAAE;AACP,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,+BAA+B,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,gBAAgB;AACrF;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8FAA8F;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,UAAU,EAAE;AACZ;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE;AACZ,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,EAAE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AC1B,gEAAU;OAvGrB,qBAAqB,CA8ejC;IAAD,4BAAC;CAAA;AA9eiC;;;;;;;;;;;;;AC/DlC;AAAA;AAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC1BA;AAAA;AAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qDAAqD,Q;;;AAGnH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iDAAiD,Q;AAC7G;;AAEA,wBAAwB;AACxB,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA,S;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,0CAA0C;AACrI;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,sDAAsD,iDAAiD,Q;AACvG;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wDAAwD;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C,oEAAoE;AAChH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AAOA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;;AAEA;;;AAGA;;AAEA;;;AAGA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,K;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,mB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uC;AACA;;AAEA,uB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uC;AACA;;AAEA,wB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mC;AACA;;AAEA,uB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oC;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,kD;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA,mB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kCAAkC,yBAAyB;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,E;AACA,C;;;;;;;;;;;;AC5oBA;AAAA;AAAO;;AAEP;;AAEA,6C;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8DAA8D;AAC9D;;AAEA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qEAAqE;AACrE;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uEAAuE;AACvE,aAAa;AACb;AACA;AACA;AACA;;AAEA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,4D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AClIA;AAAA;AAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC7BA;AAAA;AAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,4DAA4D,+CAA+C;AAC3G;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA,2D;AACA;;;;AAIA;AACA;AACA;;;;;;AAMA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qDAAqD,Q;;;AAGnH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iDAAiD,Q;AAC7G;;AAEA,wBAAwB;AACxB,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA,S;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,2FAA2F,0CAA0C;AACrI;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,sDAAsD,iDAAiD,Q;AACvG;;;AAGA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wDAAwD;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C,oEAAoE;AAChH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AAOA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,4C;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;;AAGA,K;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,mB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,uC;AACA;;AAEA,uB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uC;AACA;;AAEA,wB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;;AAGA;AACA;AACA;AACA;AACA;AACA,oCAAoC,SAAS;;AAE7C;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,WAAW;AACpD;;;AAGA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oC;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,kD;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA,mB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kCAAkC,yBAAyB;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,K;;AAEA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;AACA,C;;;;;;;;;;;;AC3zBA;AAAA;AAAO;;AAEP;;AAEA,6C;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B,yCAAyC;AACxE,8DAA8D;AAC9D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qEAAqE;AACrE;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uEAAuE;AACvE,aAAa;AACb;AACA;AACA;AACA;;AAEA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,4D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA,4D;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC5IA;AAAA;AAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC1BA;AAAA;AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;;ACpBA;AAAA;AAAO;;AAEP;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;;ACxBA;AAAA;AAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC7BA;AAAA;AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;AACA;;;;AAIA;;;AAGA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qDAAqD,Q;;;AAGnH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iDAAiD,Q;AAC7G;;AAEA,wBAAwB;AACxB,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA,S;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,0CAA0C;AACrI;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,sDAAsD,iDAAiD,Q;AACvG;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wDAAwD;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C,oEAAoE;AAChH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AAOA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;;AAEA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,6C;;AAEA;AACA,wC;;AAEA;AACA,4C;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;;AAEA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,8DAA8D,2CAA2C;AACzG,qCAAqC,gBAAgB;AACrD,kD;AACA;;AAEA;AACA;AACA;AACA,mFAAmF;AACnF,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,K;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;AAKA,C;;;;;;;;;;;;ACr6BA;AAAA;AAAO;;AAEP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8DAA8D;AAC9D;;;AAGA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAMA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE;AACvE,aAAa;AACb;AACA;AACA;AACA;;AAEA,GAAG;;;;;AAKH;;AAEA;AACA,2F;AACA,2F;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;AAIA,E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;;ACpIA;AAAA;AAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC7BA;AAAA;AAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qDAAqD,Q;;;AAGnH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iDAAiD,Q;AAC7G;;AAEA,wBAAwB;AACxB,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA,S;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,0CAA0C;AACrI;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,sDAAsD,iDAAiD,Q;AACvG;;;AAGA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wDAAwD;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C,oEAAoE;AAChH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AAOA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qCAAqC;;AAErC,oCAAoC;AACpC,0CAA0C;AAC1C,qCAAqC;;AAErC;;AAEA;AACA,cAAc;AACd,gEAAgE;;AAEhE,wDAAwD;AACxD,4BAA4B;AAC5B,+BAA+B;AAC/B,kCAAkC;;AAElC,gCAAgC,cAAc;AAC9C,kBAAkB;AAClB,iEAAiE;;AAEjE;AACA,kDAAkD;;AAElD;AACA,gDAAgD;AAChD,kBAAkB;;AAElB,sCAAsC;AACtC,mCAAmC;;AAEnC,6DAA6D;;AAE7D,4DAA4D;;AAE5D,yCAAyC;AACzC,cAAc;AACd;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAqC,2BAA2B;;AAEhE;AACA;AACA;AACA;AACA;AACA,+CAA+C,uBAAuB;AACtE;;AAEA;;AAEA,kB;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,qCAAqC,UAAU;AAC/C,kD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mEAAmE,4CAA4C;AAC/G;AACA;;AAEA;AACA,4EAA4E,4CAA4C;AACxH;AACA;AACA;AACA;;;AAGA;AACA,2FAA2F,4CAA4C;AACvI;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;;;AAGA;AACA;AACA;;AAEA;AACA,qCAAqC,2BAA2B;;AAEhE;AACA;AACA;AACA;AACA;AACA,+CAA+C,2BAA2B;AAC1E;AACA;;AAEA,iB;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,qCAAqC,UAAU;AAC/C,kD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mEAAmE,4CAA4C;AAC/G;AACA;;AAEA;AACA,2EAA2E,4CAA4C;AACvH;AACA;AACA;AACA;;;AAGA;AACA,2FAA2F,4CAA4C;AACvI;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;AAIA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,e;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,oB;;AAEA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;;AAE/C;;;AAGA,iB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA,e;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA,oB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,oB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA,gB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,qCAAqC,UAAU;AAC/C,kD;AACA;;AAEA;AACA;AACA;AACA,sCAAsC,6BAA6B;AACnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,uCAAuC,UAAU;AACjD,qCAAqC,4DAA4D;AACjG,kD;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,6BAA6B;AACrE,sCAAsC,iFAAiF;AACvH;AACA;;AAEA;AACA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,uCAAuC,UAAU;AACjD,qCAAqC,UAAU;AAC/C,kD;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,6BAA6B;AACrE,sCAAsC,6BAA6B;AACnE;AACA,SAAS;AACT,K;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kCAAkC,yBAAyB;AAC3D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,C;;;;;;;;;;;;ACrsCA;AAAA;AAAO;;AAEP;;AAEA,6C;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8DAA8D;AAC9D;AACA;;AAEA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qEAAqE;AACrE;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uEAAuE;AACvE,aAAa;AACb;AACA;AACA;AACA;;AAEA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,6D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;;;AAIA;AACA;AACA;;AAEA;;AAEA;AACA,C;;;;;;;;;;;;AC1IA;AAAA;AAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC7BA;AAAA;AAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA,mC;;AAEA,SAAS;;;AAGT;AACA,yEAAyE;AACzE;AACA;AACA;;AAEA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qDAAqD,Q;;;AAGnH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iDAAiD,Q;AAC7G;;AAEA,wBAAwB;AACxB,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA,S;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,0CAA0C;AACrI;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,sDAAsD,iDAAiD,Q;AACvG;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wDAAwD;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C,oEAAoE;AAChH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AAOA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,K;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;AAIA;AACA,qCAAqC,2BAA2B;;AAEhE;AACA;AACA;AACA;AACA;AACA,+CAA+C,uBAAuB;AACtE;;AAEA;;AAEA,kB;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,qCAAqC,UAAU;AAC/C,kD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mEAAmE,4CAA4C;AAC/G;AACA;;AAEA;AACA,4EAA4E,4CAA4C;AACxH;AACA;AACA;AACA;;;AAGA;AACA,2FAA2F,4CAA4C;AACvI;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA,qCAAqC,2BAA2B;;AAEhE;AACA;AACA;AACA;AACA;AACA,+CAA+C,2BAA2B;AAC1E;AACA;;;;AAIA,iB;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,mEAAmE,4CAA4C;AAC/G;AACA;;AAEA;AACA,2EAA2E,4CAA4C;AACvH;AACA;AACA;AACA;;;AAGA;AACA,2FAA2F,4CAA4C;AACvI;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA,gB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,oB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,kB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,e;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,oB;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;;;AAGA,iB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA,gB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,e;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA,mB;AACA;AACA;AACA;AACA;AACA;;;AAGA,oB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,gB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,uCAAuC,UAAU;AACjD,qCAAqC,4DAA4D;AACjG,kD;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,6BAA6B;AACrE,sCAAsC,iFAAiF;AACvH;AACA;AACA,K;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kCAAkC,yBAAyB;AAC3D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,K;;AAEA;AACA;AACA;AACA,C;;;;;;;;;;;;ACtmCA;AAAA;AAAO;;AAEP;;AAEA,6C;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8DAA8D;AAC9D;AACA;;AAEA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qEAAqE;AACrE;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uEAAuE;AACvE,aAAa;AACb;AACA;AACA;AACA;;AAEA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,6D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;;;AAIA;AACA;AACA;;AAEA;;AAEA;AACA,C;;;;;;;;;;;;AC1IA;AAAA;AAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC9BA;AAAA;AAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qDAAqD,Q;;;AAGnH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iDAAiD,Q;AAC7G;;AAEA,wBAAwB;AACxB,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA,S;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,0CAA0C;AACrI;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,sDAAsD,iDAAiD,Q;AACvG;;;AAGA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wDAAwD;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C,oEAAoE;AAChH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AAOA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;AAKA;;AAEA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;;;AAGA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,uC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,wC;;AAEA;AACA,2C;;AAEA;AACA,+C;;;AAGA;AACA,sC;;;AAGA;AACA,6C;;AAEA;AACA,uC;;;;AAIA;AACA;;;;AAIA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oC;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kCAAkC;AACpF,oCAAoC,2CAA2C;AAC/E;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,kCAAkC;AACnF,oCAAoC,0CAA0C;;;AAG9E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iCAAiC;AACxF,oCAAoC,gDAAgD;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,iCAAiC;AACvF,oCAAoC,+CAA+C;;AAEnF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,kCAAkC;AAC/F,oCAAoC,sDAAsD;;;AAG1F;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kCAAkC;AAC3F,oCAAoC,sDAAsD;;;AAG1F;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kCAAkC;AAC3F,oCAAoC,sDAAsD;;AAE1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iCAAiC;AACxF,oCAAoC,gDAAgD;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,iCAAiC;AACvF,oCAAoC,+CAA+C;AACnF;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,K;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,kDAAkD;AAChG;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;;AAEA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;;AAEA;AACA,kC;AACA;AACA,uCAAuC;AACvC;AACA,6DAA6D,2CAA2C;AACxG,qCAAqC,gBAAgB;AACrD,kD;AACA;;AAEA;AACA;AACA,gFAAgF;AAChF,sCAAsC,iBAAiB;AACvD;AACA;AACA;;;AAGA,mD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oFAAoF;AACpF,0CAA0C,iBAAiB;AAC3D;AACA,aAAa;AACb;AACA,sD;AACA;AACA;AACA;AACA,iEAAiE,2CAA2C;AAC5G,yCAAyC,gBAAgB;AACzD,sD;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;;AAEA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,6DAA6D,2CAA2C;AACxG,qCAAqC,gBAAgB;AACrD,kD;AACA;;AAEA;AACA;AACA;AACA,kFAAkF;AAClF,sCAAsC,iBAAiB;AACvD;AACA;AACA;;;AAGA;;;;AAIA;AACA;AACA,K;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzkCA;AAAA;AAAO;;AAEP;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8DAA8D;AAC9D;AACA;;AAEA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,uEAAuE;AACvE,aAAa;AACb;AACA;AACA;AACA;;AAEA,GAAG;;;;AAIH;AACA;AACA,qE;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA,C;;;;;;;;;;;;ACvJA;AAAA;AAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AC9BA;AAAA;AAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qDAAqD,Q;;;AAGnH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iDAAiD,Q;AAC7G;;AAEA,wBAAwB;AACxB,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;AACA,S;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,0CAA0C;AACrI;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,sDAAsD,iDAAiD,Q;AACvG;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC,wDAAwD;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C,oEAAoE;AAChH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;AAOA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;AAKA;;AAEA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA,oBAAoB,0BAA0B;AAC9C;;;AAGA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,uC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,wC;;AAEA;AACA,2C;;AAEA;AACA,+C;;;AAGA;AACA,sC;;;AAGA;AACA,6C;;AAEA;AACA,uC;;;;AAIA;AACA;;;;AAIA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oC;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kCAAkC;AACpF,oCAAoC,2CAA2C;AAC/E;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,kCAAkC;AACnF,oCAAoC,0CAA0C;;;AAG9E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iCAAiC;AACxF,oCAAoC,gDAAgD;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,iCAAiC;AACvF,oCAAoC,+CAA+C;;AAEnF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,kCAAkC;AAC/F,oCAAoC,sDAAsD;;;AAG1F;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kCAAkC;AAC3F,oCAAoC,sDAAsD;;;AAG1F;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kCAAkC;AAC3F,oCAAoC,sDAAsD;;AAE1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iCAAiC;AACxF,oCAAoC,gDAAgD;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,iCAAiC;AACvF,oCAAoC,+CAA+C;AACnF;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,K;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,kDAAkD;AAChG;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;;AAEA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;;AAEA;AACA,kC;AACA;AACA,uCAAuC;AACvC;AACA,6DAA6D,2CAA2C;AACxG,qCAAqC,gBAAgB;AACrD,kD;AACA;;AAEA;AACA;AACA,gFAAgF;AAChF,sCAAsC,iBAAiB;AACvD;AACA;AACA;;;AAGA,mD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oFAAoF;AACpF,0CAA0C,iBAAiB;AAC3D;AACA,aAAa;AACb;AACA,sD;AACA;AACA;AACA;AACA,iEAAiE,2CAA2C;AAC5G,yCAAyC,gBAAgB;AACzD,sD;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;;AAEA;AACA,oC;AACA;AACA,uCAAuC;AACvC;AACA,6DAA6D,2CAA2C;AACxG,qCAAqC,gBAAgB;AACrD,kD;AACA;;AAEA;AACA;AACA;AACA,kFAAkF;AAClF,sCAAsC,iBAAiB;AACvD;AACA;AACA;;;AAGA;;;;AAIA;AACA;AACA,K;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvkCA;AAAA;AAAO;;AAEP;;AAEA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8DAA8D;AAC9D;;AAEA,+BAA+B,yCAAyC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,uEAAuE;AACvE,aAAa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AAK,CAAC,aAAG,IAAI,cAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAhB,CAAgB,CAAC,CAAC;;;;;;;;;;;;;ACdlC;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AAEH,+EAA+E;AAC/E,oEAAoE;AAEpE;;;;GAIG;AACH,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEsB;AAEzB;;GAEG;AAEwB,CAAE,6BAA6B;AAG1D;;GAEG;AAEF,mCAAmC;AACnC,MAAc,CAAC,MAAM,GAAG,MAAM,CAAC;;;;;;;;;;;;ACpEhC;;;GAGG;AACF,MAAc,CAAC,6BAA6B,GAAG,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;ACJrD,e","file":"main.js","sourcesContent":["var map = {\n\t\"./ion-action-sheet-controller_8.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-action-sheet-controller_8.entry.js\",\n\t\t\"common\",\n\t\t2\n\t],\n\t\"./ion-action-sheet-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-action-sheet-ios.entry.js\",\n\t\t\"common\",\n\t\t3\n\t],\n\t\"./ion-action-sheet-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-action-sheet-md.entry.js\",\n\t\t\"common\",\n\t\t4\n\t],\n\t\"./ion-alert-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-alert-ios.entry.js\",\n\t\t\"common\",\n\t\t5\n\t],\n\t\"./ion-alert-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-alert-md.entry.js\",\n\t\t\"common\",\n\t\t6\n\t],\n\t\"./ion-app_8-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-app_8-ios.entry.js\",\n\t\t0,\n\t\t\"common\",\n\t\t7\n\t],\n\t\"./ion-app_8-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-app_8-md.entry.js\",\n\t\t0,\n\t\t\"common\",\n\t\t8\n\t],\n\t\"./ion-avatar_3-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-avatar_3-ios.entry.js\",\n\t\t\"common\",\n\t\t9\n\t],\n\t\"./ion-avatar_3-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-avatar_3-md.entry.js\",\n\t\t\"common\",\n\t\t10\n\t],\n\t\"./ion-back-button-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-back-button-ios.entry.js\",\n\t\t\"common\",\n\t\t11\n\t],\n\t\"./ion-back-button-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-back-button-md.entry.js\",\n\t\t\"common\",\n\t\t12\n\t],\n\t\"./ion-backdrop-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-backdrop-ios.entry.js\",\n\t\t13\n\t],\n\t\"./ion-backdrop-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-backdrop-md.entry.js\",\n\t\t14\n\t],\n\t\"./ion-button_2-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-button_2-ios.entry.js\",\n\t\t\"common\",\n\t\t15\n\t],\n\t\"./ion-button_2-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-button_2-md.entry.js\",\n\t\t\"common\",\n\t\t16\n\t],\n\t\"./ion-card_5-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-card_5-ios.entry.js\",\n\t\t\"common\",\n\t\t17\n\t],\n\t\"./ion-card_5-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-card_5-md.entry.js\",\n\t\t\"common\",\n\t\t18\n\t],\n\t\"./ion-checkbox-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-checkbox-ios.entry.js\",\n\t\t\"common\",\n\t\t19\n\t],\n\t\"./ion-checkbox-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-checkbox-md.entry.js\",\n\t\t\"common\",\n\t\t20\n\t],\n\t\"./ion-chip-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-chip-ios.entry.js\",\n\t\t\"common\",\n\t\t21\n\t],\n\t\"./ion-chip-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-chip-md.entry.js\",\n\t\t\"common\",\n\t\t22\n\t],\n\t\"./ion-col_3.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-col_3.entry.js\",\n\t\t23\n\t],\n\t\"./ion-datetime_3-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-datetime_3-ios.entry.js\",\n\t\t\"common\",\n\t\t24\n\t],\n\t\"./ion-datetime_3-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-datetime_3-md.entry.js\",\n\t\t\"common\",\n\t\t25\n\t],\n\t\"./ion-fab_3-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-fab_3-ios.entry.js\",\n\t\t\"common\",\n\t\t26\n\t],\n\t\"./ion-fab_3-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-fab_3-md.entry.js\",\n\t\t\"common\",\n\t\t27\n\t],\n\t\"./ion-img.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-img.entry.js\",\n\t\t28\n\t],\n\t\"./ion-infinite-scroll_2-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-infinite-scroll_2-ios.entry.js\",\n\t\t\"common\",\n\t\t29\n\t],\n\t\"./ion-infinite-scroll_2-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-infinite-scroll_2-md.entry.js\",\n\t\t\"common\",\n\t\t30\n\t],\n\t\"./ion-input-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-input-ios.entry.js\",\n\t\t\"common\",\n\t\t31\n\t],\n\t\"./ion-input-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-input-md.entry.js\",\n\t\t\"common\",\n\t\t32\n\t],\n\t\"./ion-item-option_3-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-item-option_3-ios.entry.js\",\n\t\t\"common\",\n\t\t33\n\t],\n\t\"./ion-item-option_3-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-item-option_3-md.entry.js\",\n\t\t\"common\",\n\t\t34\n\t],\n\t\"./ion-item_8-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-item_8-ios.entry.js\",\n\t\t\"common\",\n\t\t35\n\t],\n\t\"./ion-item_8-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-item_8-md.entry.js\",\n\t\t\"common\",\n\t\t36\n\t],\n\t\"./ion-loading-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-loading-ios.entry.js\",\n\t\t\"common\",\n\t\t37\n\t],\n\t\"./ion-loading-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-loading-md.entry.js\",\n\t\t\"common\",\n\t\t38\n\t],\n\t\"./ion-menu_4-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-menu_4-ios.entry.js\",\n\t\t\"common\",\n\t\t39\n\t],\n\t\"./ion-menu_4-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-menu_4-md.entry.js\",\n\t\t\"common\",\n\t\t40\n\t],\n\t\"./ion-modal-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-modal-ios.entry.js\",\n\t\t0,\n\t\t\"common\",\n\t\t41\n\t],\n\t\"./ion-modal-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-modal-md.entry.js\",\n\t\t0,\n\t\t\"common\",\n\t\t42\n\t],\n\t\"./ion-nav_5.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-nav_5.entry.js\",\n\t\t0,\n\t\t\"common\",\n\t\t43\n\t],\n\t\"./ion-popover-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-popover-ios.entry.js\",\n\t\t0,\n\t\t\"common\",\n\t\t44\n\t],\n\t\"./ion-popover-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-popover-md.entry.js\",\n\t\t0,\n\t\t\"common\",\n\t\t45\n\t],\n\t\"./ion-progress-bar-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-progress-bar-ios.entry.js\",\n\t\t\"common\",\n\t\t46\n\t],\n\t\"./ion-progress-bar-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-progress-bar-md.entry.js\",\n\t\t\"common\",\n\t\t47\n\t],\n\t\"./ion-radio_2-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-radio_2-ios.entry.js\",\n\t\t\"common\",\n\t\t48\n\t],\n\t\"./ion-radio_2-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-radio_2-md.entry.js\",\n\t\t\"common\",\n\t\t49\n\t],\n\t\"./ion-range-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-range-ios.entry.js\",\n\t\t\"common\",\n\t\t50\n\t],\n\t\"./ion-range-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-range-md.entry.js\",\n\t\t\"common\",\n\t\t51\n\t],\n\t\"./ion-refresher_2-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-refresher_2-ios.entry.js\",\n\t\t\"common\",\n\t\t52\n\t],\n\t\"./ion-refresher_2-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-refresher_2-md.entry.js\",\n\t\t\"common\",\n\t\t53\n\t],\n\t\"./ion-reorder_2-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-reorder_2-ios.entry.js\",\n\t\t\"common\",\n\t\t54\n\t],\n\t\"./ion-reorder_2-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-reorder_2-md.entry.js\",\n\t\t\"common\",\n\t\t55\n\t],\n\t\"./ion-ripple-effect.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-ripple-effect.entry.js\",\n\t\t56\n\t],\n\t\"./ion-route_4.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-route_4.entry.js\",\n\t\t\"common\",\n\t\t57\n\t],\n\t\"./ion-searchbar-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-searchbar-ios.entry.js\",\n\t\t\"common\",\n\t\t58\n\t],\n\t\"./ion-searchbar-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-searchbar-md.entry.js\",\n\t\t\"common\",\n\t\t59\n\t],\n\t\"./ion-segment_2-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-segment_2-ios.entry.js\",\n\t\t\"common\",\n\t\t60\n\t],\n\t\"./ion-segment_2-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-segment_2-md.entry.js\",\n\t\t\"common\",\n\t\t61\n\t],\n\t\"./ion-select_3-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-select_3-ios.entry.js\",\n\t\t\"common\",\n\t\t62\n\t],\n\t\"./ion-select_3-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-select_3-md.entry.js\",\n\t\t\"common\",\n\t\t63\n\t],\n\t\"./ion-slide_2-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-slide_2-ios.entry.js\",\n\t\t64\n\t],\n\t\"./ion-slide_2-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-slide_2-md.entry.js\",\n\t\t65\n\t],\n\t\"./ion-spinner.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-spinner.entry.js\",\n\t\t\"common\",\n\t\t66\n\t],\n\t\"./ion-split-pane-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-split-pane-ios.entry.js\",\n\t\t67\n\t],\n\t\"./ion-split-pane-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-split-pane-md.entry.js\",\n\t\t68\n\t],\n\t\"./ion-tab-bar_2-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-tab-bar_2-ios.entry.js\",\n\t\t\"common\",\n\t\t69\n\t],\n\t\"./ion-tab-bar_2-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-tab-bar_2-md.entry.js\",\n\t\t\"common\",\n\t\t70\n\t],\n\t\"./ion-tab_2.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-tab_2.entry.js\",\n\t\t1\n\t],\n\t\"./ion-text.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-text.entry.js\",\n\t\t\"common\",\n\t\t71\n\t],\n\t\"./ion-textarea-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-textarea-ios.entry.js\",\n\t\t\"common\",\n\t\t72\n\t],\n\t\"./ion-textarea-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-textarea-md.entry.js\",\n\t\t\"common\",\n\t\t73\n\t],\n\t\"./ion-toast-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-toast-ios.entry.js\",\n\t\t\"common\",\n\t\t74\n\t],\n\t\"./ion-toast-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-toast-md.entry.js\",\n\t\t\"common\",\n\t\t75\n\t],\n\t\"./ion-toggle-ios.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-toggle-ios.entry.js\",\n\t\t\"common\",\n\t\t76\n\t],\n\t\"./ion-toggle-md.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-toggle-md.entry.js\",\n\t\t\"common\",\n\t\t77\n\t],\n\t\"./ion-virtual-scroll.entry.js\": [\n\t\t\"./node_modules/@ionic/core/dist/esm-es5/ion-virtual-scroll.entry.js\",\n\t\t78\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = \"./node_modules/@ionic/core/dist/esm-es5 lazy recursive ^\\\\.\\\\/.*\\\\.entry\\\\.js$ include: \\\\.entry\\\\.js$ exclude: \\\\.system\\\\.entry\\\\.js$\";\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./af\": \"./node_modules/moment/locale/af.js\",\n\t\"./af.js\": \"./node_modules/moment/locale/af.js\",\n\t\"./ar\": \"./node_modules/moment/locale/ar.js\",\n\t\"./ar-dz\": \"./node_modules/moment/locale/ar-dz.js\",\n\t\"./ar-dz.js\": \"./node_modules/moment/locale/ar-dz.js\",\n\t\"./ar-kw\": \"./node_modules/moment/locale/ar-kw.js\",\n\t\"./ar-kw.js\": \"./node_modules/moment/locale/ar-kw.js\",\n\t\"./ar-ly\": \"./node_modules/moment/locale/ar-ly.js\",\n\t\"./ar-ly.js\": \"./node_modules/moment/locale/ar-ly.js\",\n\t\"./ar-ma\": \"./node_modules/moment/locale/ar-ma.js\",\n\t\"./ar-ma.js\": \"./node_modules/moment/locale/ar-ma.js\",\n\t\"./ar-sa\": \"./node_modules/moment/locale/ar-sa.js\",\n\t\"./ar-sa.js\": \"./node_modules/moment/locale/ar-sa.js\",\n\t\"./ar-tn\": \"./node_modules/moment/locale/ar-tn.js\",\n\t\"./ar-tn.js\": \"./node_modules/moment/locale/ar-tn.js\",\n\t\"./ar.js\": \"./node_modules/moment/locale/ar.js\",\n\t\"./az\": \"./node_modules/moment/locale/az.js\",\n\t\"./az.js\": \"./node_modules/moment/locale/az.js\",\n\t\"./be\": \"./node_modules/moment/locale/be.js\",\n\t\"./be.js\": \"./node_modules/moment/locale/be.js\",\n\t\"./bg\": \"./node_modules/moment/locale/bg.js\",\n\t\"./bg.js\": \"./node_modules/moment/locale/bg.js\",\n\t\"./bm\": \"./node_modules/moment/locale/bm.js\",\n\t\"./bm.js\": \"./node_modules/moment/locale/bm.js\",\n\t\"./bn\": \"./node_modules/moment/locale/bn.js\",\n\t\"./bn.js\": \"./node_modules/moment/locale/bn.js\",\n\t\"./bo\": \"./node_modules/moment/locale/bo.js\",\n\t\"./bo.js\": \"./node_modules/moment/locale/bo.js\",\n\t\"./br\": \"./node_modules/moment/locale/br.js\",\n\t\"./br.js\": \"./node_modules/moment/locale/br.js\",\n\t\"./bs\": \"./node_modules/moment/locale/bs.js\",\n\t\"./bs.js\": \"./node_modules/moment/locale/bs.js\",\n\t\"./ca\": \"./node_modules/moment/locale/ca.js\",\n\t\"./ca.js\": \"./node_modules/moment/locale/ca.js\",\n\t\"./cs\": \"./node_modules/moment/locale/cs.js\",\n\t\"./cs.js\": \"./node_modules/moment/locale/cs.js\",\n\t\"./cv\": \"./node_modules/moment/locale/cv.js\",\n\t\"./cv.js\": \"./node_modules/moment/locale/cv.js\",\n\t\"./cy\": \"./node_modules/moment/locale/cy.js\",\n\t\"./cy.js\": \"./node_modules/moment/locale/cy.js\",\n\t\"./da\": \"./node_modules/moment/locale/da.js\",\n\t\"./da.js\": \"./node_modules/moment/locale/da.js\",\n\t\"./de\": \"./node_modules/moment/locale/de.js\",\n\t\"./de-at\": \"./node_modules/moment/locale/de-at.js\",\n\t\"./de-at.js\": \"./node_modules/moment/locale/de-at.js\",\n\t\"./de-ch\": \"./node_modules/moment/locale/de-ch.js\",\n\t\"./de-ch.js\": \"./node_modules/moment/locale/de-ch.js\",\n\t\"./de.js\": \"./node_modules/moment/locale/de.js\",\n\t\"./dv\": \"./node_modules/moment/locale/dv.js\",\n\t\"./dv.js\": \"./node_modules/moment/locale/dv.js\",\n\t\"./el\": \"./node_modules/moment/locale/el.js\",\n\t\"./el.js\": \"./node_modules/moment/locale/el.js\",\n\t\"./en-SG\": \"./node_modules/moment/locale/en-SG.js\",\n\t\"./en-SG.js\": \"./node_modules/moment/locale/en-SG.js\",\n\t\"./en-au\": \"./node_modules/moment/locale/en-au.js\",\n\t\"./en-au.js\": \"./node_modules/moment/locale/en-au.js\",\n\t\"./en-ca\": \"./node_modules/moment/locale/en-ca.js\",\n\t\"./en-ca.js\": \"./node_modules/moment/locale/en-ca.js\",\n\t\"./en-gb\": \"./node_modules/moment/locale/en-gb.js\",\n\t\"./en-gb.js\": \"./node_modules/moment/locale/en-gb.js\",\n\t\"./en-ie\": \"./node_modules/moment/locale/en-ie.js\",\n\t\"./en-ie.js\": \"./node_modules/moment/locale/en-ie.js\",\n\t\"./en-il\": \"./node_modules/moment/locale/en-il.js\",\n\t\"./en-il.js\": \"./node_modules/moment/locale/en-il.js\",\n\t\"./en-nz\": \"./node_modules/moment/locale/en-nz.js\",\n\t\"./en-nz.js\": \"./node_modules/moment/locale/en-nz.js\",\n\t\"./eo\": \"./node_modules/moment/locale/eo.js\",\n\t\"./eo.js\": \"./node_modules/moment/locale/eo.js\",\n\t\"./es\": \"./node_modules/moment/locale/es.js\",\n\t\"./es-do\": \"./node_modules/moment/locale/es-do.js\",\n\t\"./es-do.js\": \"./node_modules/moment/locale/es-do.js\",\n\t\"./es-us\": \"./node_modules/moment/locale/es-us.js\",\n\t\"./es-us.js\": \"./node_modules/moment/locale/es-us.js\",\n\t\"./es.js\": \"./node_modules/moment/locale/es.js\",\n\t\"./et\": \"./node_modules/moment/locale/et.js\",\n\t\"./et.js\": \"./node_modules/moment/locale/et.js\",\n\t\"./eu\": \"./node_modules/moment/locale/eu.js\",\n\t\"./eu.js\": \"./node_modules/moment/locale/eu.js\",\n\t\"./fa\": \"./node_modules/moment/locale/fa.js\",\n\t\"./fa.js\": \"./node_modules/moment/locale/fa.js\",\n\t\"./fi\": \"./node_modules/moment/locale/fi.js\",\n\t\"./fi.js\": \"./node_modules/moment/locale/fi.js\",\n\t\"./fo\": \"./node_modules/moment/locale/fo.js\",\n\t\"./fo.js\": \"./node_modules/moment/locale/fo.js\",\n\t\"./fr\": \"./node_modules/moment/locale/fr.js\",\n\t\"./fr-ca\": \"./node_modules/moment/locale/fr-ca.js\",\n\t\"./fr-ca.js\": \"./node_modules/moment/locale/fr-ca.js\",\n\t\"./fr-ch\": \"./node_modules/moment/locale/fr-ch.js\",\n\t\"./fr-ch.js\": \"./node_modules/moment/locale/fr-ch.js\",\n\t\"./fr.js\": \"./node_modules/moment/locale/fr.js\",\n\t\"./fy\": \"./node_modules/moment/locale/fy.js\",\n\t\"./fy.js\": \"./node_modules/moment/locale/fy.js\",\n\t\"./ga\": \"./node_modules/moment/locale/ga.js\",\n\t\"./ga.js\": \"./node_modules/moment/locale/ga.js\",\n\t\"./gd\": \"./node_modules/moment/locale/gd.js\",\n\t\"./gd.js\": \"./node_modules/moment/locale/gd.js\",\n\t\"./gl\": \"./node_modules/moment/locale/gl.js\",\n\t\"./gl.js\": \"./node_modules/moment/locale/gl.js\",\n\t\"./gom-latn\": \"./node_modules/moment/locale/gom-latn.js\",\n\t\"./gom-latn.js\": \"./node_modules/moment/locale/gom-latn.js\",\n\t\"./gu\": \"./node_modules/moment/locale/gu.js\",\n\t\"./gu.js\": \"./node_modules/moment/locale/gu.js\",\n\t\"./he\": \"./node_modules/moment/locale/he.js\",\n\t\"./he.js\": \"./node_modules/moment/locale/he.js\",\n\t\"./hi\": \"./node_modules/moment/locale/hi.js\",\n\t\"./hi.js\": \"./node_modules/moment/locale/hi.js\",\n\t\"./hr\": \"./node_modules/moment/locale/hr.js\",\n\t\"./hr.js\": \"./node_modules/moment/locale/hr.js\",\n\t\"./hu\": \"./node_modules/moment/locale/hu.js\",\n\t\"./hu.js\": \"./node_modules/moment/locale/hu.js\",\n\t\"./hy-am\": \"./node_modules/moment/locale/hy-am.js\",\n\t\"./hy-am.js\": \"./node_modules/moment/locale/hy-am.js\",\n\t\"./id\": \"./node_modules/moment/locale/id.js\",\n\t\"./id.js\": \"./node_modules/moment/locale/id.js\",\n\t\"./is\": \"./node_modules/moment/locale/is.js\",\n\t\"./is.js\": \"./node_modules/moment/locale/is.js\",\n\t\"./it\": \"./node_modules/moment/locale/it.js\",\n\t\"./it-ch\": \"./node_modules/moment/locale/it-ch.js\",\n\t\"./it-ch.js\": \"./node_modules/moment/locale/it-ch.js\",\n\t\"./it.js\": \"./node_modules/moment/locale/it.js\",\n\t\"./ja\": \"./node_modules/moment/locale/ja.js\",\n\t\"./ja.js\": \"./node_modules/moment/locale/ja.js\",\n\t\"./jv\": \"./node_modules/moment/locale/jv.js\",\n\t\"./jv.js\": \"./node_modules/moment/locale/jv.js\",\n\t\"./ka\": \"./node_modules/moment/locale/ka.js\",\n\t\"./ka.js\": \"./node_modules/moment/locale/ka.js\",\n\t\"./kk\": \"./node_modules/moment/locale/kk.js\",\n\t\"./kk.js\": \"./node_modules/moment/locale/kk.js\",\n\t\"./km\": \"./node_modules/moment/locale/km.js\",\n\t\"./km.js\": \"./node_modules/moment/locale/km.js\",\n\t\"./kn\": \"./node_modules/moment/locale/kn.js\",\n\t\"./kn.js\": \"./node_modules/moment/locale/kn.js\",\n\t\"./ko\": \"./node_modules/moment/locale/ko.js\",\n\t\"./ko.js\": \"./node_modules/moment/locale/ko.js\",\n\t\"./ku\": \"./node_modules/moment/locale/ku.js\",\n\t\"./ku.js\": \"./node_modules/moment/locale/ku.js\",\n\t\"./ky\": \"./node_modules/moment/locale/ky.js\",\n\t\"./ky.js\": \"./node_modules/moment/locale/ky.js\",\n\t\"./lb\": \"./node_modules/moment/locale/lb.js\",\n\t\"./lb.js\": \"./node_modules/moment/locale/lb.js\",\n\t\"./lo\": \"./node_modules/moment/locale/lo.js\",\n\t\"./lo.js\": \"./node_modules/moment/locale/lo.js\",\n\t\"./lt\": \"./node_modules/moment/locale/lt.js\",\n\t\"./lt.js\": \"./node_modules/moment/locale/lt.js\",\n\t\"./lv\": \"./node_modules/moment/locale/lv.js\",\n\t\"./lv.js\": \"./node_modules/moment/locale/lv.js\",\n\t\"./me\": \"./node_modules/moment/locale/me.js\",\n\t\"./me.js\": \"./node_modules/moment/locale/me.js\",\n\t\"./mi\": \"./node_modules/moment/locale/mi.js\",\n\t\"./mi.js\": \"./node_modules/moment/locale/mi.js\",\n\t\"./mk\": \"./node_modules/moment/locale/mk.js\",\n\t\"./mk.js\": \"./node_modules/moment/locale/mk.js\",\n\t\"./ml\": \"./node_modules/moment/locale/ml.js\",\n\t\"./ml.js\": \"./node_modules/moment/locale/ml.js\",\n\t\"./mn\": \"./node_modules/moment/locale/mn.js\",\n\t\"./mn.js\": \"./node_modules/moment/locale/mn.js\",\n\t\"./mr\": \"./node_modules/moment/locale/mr.js\",\n\t\"./mr.js\": \"./node_modules/moment/locale/mr.js\",\n\t\"./ms\": \"./node_modules/moment/locale/ms.js\",\n\t\"./ms-my\": \"./node_modules/moment/locale/ms-my.js\",\n\t\"./ms-my.js\": \"./node_modules/moment/locale/ms-my.js\",\n\t\"./ms.js\": \"./node_modules/moment/locale/ms.js\",\n\t\"./mt\": \"./node_modules/moment/locale/mt.js\",\n\t\"./mt.js\": \"./node_modules/moment/locale/mt.js\",\n\t\"./my\": \"./node_modules/moment/locale/my.js\",\n\t\"./my.js\": \"./node_modules/moment/locale/my.js\",\n\t\"./nb\": \"./node_modules/moment/locale/nb.js\",\n\t\"./nb.js\": \"./node_modules/moment/locale/nb.js\",\n\t\"./ne\": \"./node_modules/moment/locale/ne.js\",\n\t\"./ne.js\": \"./node_modules/moment/locale/ne.js\",\n\t\"./nl\": \"./node_modules/moment/locale/nl.js\",\n\t\"./nl-be\": \"./node_modules/moment/locale/nl-be.js\",\n\t\"./nl-be.js\": \"./node_modules/moment/locale/nl-be.js\",\n\t\"./nl.js\": \"./node_modules/moment/locale/nl.js\",\n\t\"./nn\": \"./node_modules/moment/locale/nn.js\",\n\t\"./nn.js\": \"./node_modules/moment/locale/nn.js\",\n\t\"./pa-in\": \"./node_modules/moment/locale/pa-in.js\",\n\t\"./pa-in.js\": \"./node_modules/moment/locale/pa-in.js\",\n\t\"./pl\": \"./node_modules/moment/locale/pl.js\",\n\t\"./pl.js\": \"./node_modules/moment/locale/pl.js\",\n\t\"./pt\": \"./node_modules/moment/locale/pt.js\",\n\t\"./pt-br\": \"./node_modules/moment/locale/pt-br.js\",\n\t\"./pt-br.js\": \"./node_modules/moment/locale/pt-br.js\",\n\t\"./pt.js\": \"./node_modules/moment/locale/pt.js\",\n\t\"./ro\": \"./node_modules/moment/locale/ro.js\",\n\t\"./ro.js\": \"./node_modules/moment/locale/ro.js\",\n\t\"./ru\": \"./node_modules/moment/locale/ru.js\",\n\t\"./ru.js\": \"./node_modules/moment/locale/ru.js\",\n\t\"./sd\": \"./node_modules/moment/locale/sd.js\",\n\t\"./sd.js\": \"./node_modules/moment/locale/sd.js\",\n\t\"./se\": \"./node_modules/moment/locale/se.js\",\n\t\"./se.js\": \"./node_modules/moment/locale/se.js\",\n\t\"./si\": \"./node_modules/moment/locale/si.js\",\n\t\"./si.js\": \"./node_modules/moment/locale/si.js\",\n\t\"./sk\": \"./node_modules/moment/locale/sk.js\",\n\t\"./sk.js\": \"./node_modules/moment/locale/sk.js\",\n\t\"./sl\": \"./node_modules/moment/locale/sl.js\",\n\t\"./sl.js\": \"./node_modules/moment/locale/sl.js\",\n\t\"./sq\": \"./node_modules/moment/locale/sq.js\",\n\t\"./sq.js\": \"./node_modules/moment/locale/sq.js\",\n\t\"./sr\": \"./node_modules/moment/locale/sr.js\",\n\t\"./sr-cyrl\": \"./node_modules/moment/locale/sr-cyrl.js\",\n\t\"./sr-cyrl.js\": \"./node_modules/moment/locale/sr-cyrl.js\",\n\t\"./sr.js\": \"./node_modules/moment/locale/sr.js\",\n\t\"./ss\": \"./node_modules/moment/locale/ss.js\",\n\t\"./ss.js\": \"./node_modules/moment/locale/ss.js\",\n\t\"./sv\": \"./node_modules/moment/locale/sv.js\",\n\t\"./sv.js\": \"./node_modules/moment/locale/sv.js\",\n\t\"./sw\": \"./node_modules/moment/locale/sw.js\",\n\t\"./sw.js\": \"./node_modules/moment/locale/sw.js\",\n\t\"./ta\": \"./node_modules/moment/locale/ta.js\",\n\t\"./ta.js\": \"./node_modules/moment/locale/ta.js\",\n\t\"./te\": \"./node_modules/moment/locale/te.js\",\n\t\"./te.js\": \"./node_modules/moment/locale/te.js\",\n\t\"./tet\": \"./node_modules/moment/locale/tet.js\",\n\t\"./tet.js\": \"./node_modules/moment/locale/tet.js\",\n\t\"./tg\": \"./node_modules/moment/locale/tg.js\",\n\t\"./tg.js\": \"./node_modules/moment/locale/tg.js\",\n\t\"./th\": \"./node_modules/moment/locale/th.js\",\n\t\"./th.js\": \"./node_modules/moment/locale/th.js\",\n\t\"./tl-ph\": \"./node_modules/moment/locale/tl-ph.js\",\n\t\"./tl-ph.js\": \"./node_modules/moment/locale/tl-ph.js\",\n\t\"./tlh\": \"./node_modules/moment/locale/tlh.js\",\n\t\"./tlh.js\": \"./node_modules/moment/locale/tlh.js\",\n\t\"./tr\": \"./node_modules/moment/locale/tr.js\",\n\t\"./tr.js\": \"./node_modules/moment/locale/tr.js\",\n\t\"./tzl\": \"./node_modules/moment/locale/tzl.js\",\n\t\"./tzl.js\": \"./node_modules/moment/locale/tzl.js\",\n\t\"./tzm\": \"./node_modules/moment/locale/tzm.js\",\n\t\"./tzm-latn\": \"./node_modules/moment/locale/tzm-latn.js\",\n\t\"./tzm-latn.js\": \"./node_modules/moment/locale/tzm-latn.js\",\n\t\"./tzm.js\": \"./node_modules/moment/locale/tzm.js\",\n\t\"./ug-cn\": \"./node_modules/moment/locale/ug-cn.js\",\n\t\"./ug-cn.js\": \"./node_modules/moment/locale/ug-cn.js\",\n\t\"./uk\": \"./node_modules/moment/locale/uk.js\",\n\t\"./uk.js\": \"./node_modules/moment/locale/uk.js\",\n\t\"./ur\": \"./node_modules/moment/locale/ur.js\",\n\t\"./ur.js\": \"./node_modules/moment/locale/ur.js\",\n\t\"./uz\": \"./node_modules/moment/locale/uz.js\",\n\t\"./uz-latn\": \"./node_modules/moment/locale/uz-latn.js\",\n\t\"./uz-latn.js\": \"./node_modules/moment/locale/uz-latn.js\",\n\t\"./uz.js\": \"./node_modules/moment/locale/uz.js\",\n\t\"./vi\": \"./node_modules/moment/locale/vi.js\",\n\t\"./vi.js\": \"./node_modules/moment/locale/vi.js\",\n\t\"./x-pseudo\": \"./node_modules/moment/locale/x-pseudo.js\",\n\t\"./x-pseudo.js\": \"./node_modules/moment/locale/x-pseudo.js\",\n\t\"./yo\": \"./node_modules/moment/locale/yo.js\",\n\t\"./yo.js\": \"./node_modules/moment/locale/yo.js\",\n\t\"./zh-cn\": \"./node_modules/moment/locale/zh-cn.js\",\n\t\"./zh-cn.js\": \"./node_modules/moment/locale/zh-cn.js\",\n\t\"./zh-hk\": \"./node_modules/moment/locale/zh-hk.js\",\n\t\"./zh-hk.js\": \"./node_modules/moment/locale/zh-hk.js\",\n\t\"./zh-tw\": \"./node_modules/moment/locale/zh-tw.js\",\n\t\"./zh-tw.js\": \"./node_modules/moment/locale/zh-tw.js\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./node_modules/moment/locale sync recursive ^\\\\.\\\\/.*$\";","module.exports = \" \\n \\n\\n\\n \\n \\n \\n \\n \\n \\n
\\n \\n \\n \\n

{{username}}

\\n
\\n
\\n\\n \\n\\n \\n \\n \\n   How this app works\\n \\n\\n \\n \\n   Arc Apps\\n \\n\\n \\n\\n

Preview/review levels

\\n \\n \\n \\n Level 1: Fishbowl\\n \\n \\n \\n \\n Level 2: Sea\\n

Unlocks at 1060 points

\\n
\\n
\\n \\n \\n \\n Level 3: Tundra\\n

Unlocks at 2120 points

\\n
\\n
\\n \\n \\n Level 4: Rainforest\\n

Unlocks at 3020 points

\\n
\\n
\\n \\n
\\n
\\n
\\n \\n\\n \\n
\\n\\n\"","module.exports = \"\\n \\n \\n \\n \\n Contact study staff\\n \\n \\n\\n\\n\\n\\n

Annisa Ahmed

\\n
\\n

Phone: (267) 634-4490

\\n

Email: ayaadapts@email.chop.edu

\\n\\n\\n \\n   Call\\n \\n \\n   SMS\\n \\n \\n   Email\\n \\n \\n\\n\\n
\"","module.exports = \"\\n\\n \\n \\n\\n \\n\\n\"","module.exports = \"\\n\\n\\n\\n \\n \\n \\n \\n Home\\n \\n\\n \\n \\n Quotes\\n \\n\\n \\n \\n Memes\\n \\n\\n\\n \\n \\n Thank yous\\n \\n\\n \\n \\n Insights\\n \\n\\n \\n \\n Contact\\n \\n\\n\\n\\n \\n \\n\\n\"","module.exports = \"\\n \\n SARA\\n \\n\\n\\n

Terms of Service

\\n
\\n

# Released under MIT License

\\n

Copyright 2020 Harvard University

\\n

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \\\"Software\\\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

\\n

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

\\n

THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

\\n
\\n \\n Agree to terms\\n \\n \\n
\\n\\n\\n Submit\\n\"","module.exports = \"\\n \\n\\n \\n \\n\\n \\n \\n\\n \\n\\n\\n \\n ${{money}}\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n {{title}}\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n \\n\\n \\n\\n Aware id: {{aware_id}}\\n
\\n\\n \\n \\n
\\n \\n \"","module.exports = \"\\n \\n \\n \\n \\n Cheat points\\n \\n\\n\\n\\n \\n \\n \\n
\\n Current points: {{currentPoints}}\\n

\\n Cheat\\n

\\n Return\\n \\n
\\n\"","module.exports = \"
\\n\\n \\n\\n \\n


You unlocked the following animals in this level so far


\\n
\\n \\n \\n \\n \\n \\n \\n

{{item.fishName}}

\\n

{{item.funFact}}

\\n
\\n
\\n\\n \\n
\\n\\n \\n\\n\\n\"","module.exports = \"\\n\\n Congratulations!!!\\n\\n\\n\\n \\n \\n \\n \\n \\n \\n

{{reinforcement.header}}

\\n

{{reinforcement.text}}

\\n
\\n
\\n
\\n
\\n\\n\\n Close\\n\"","module.exports = \"\\n\\n \\n \\n \\n \\n Level 1: Fishbowl\\n \\n\\n\\n\\n \\n \\n A preview of Level 1: Fishbowl\\n This level is the first level.\\n \\n \\n \\n \\n \\n\\n\\n\\n\"","module.exports = \"\\n \\n \\n \\n \\n \\n \\n Level 4: Rainforest\\n \\n\\n\\n\\n \\n \\n \\n \\n A preview of Level 4: Rainforest\\n This level will be unlocked at 3020 points.\\n \\n \\n \\n \\n \\n\\n\"","module.exports = \"\\n \\n \\n \\n \\n Level 2: Sea\\n \\n\\n\\n\\n \\n \\n \\n \\n A preview of Level 2: Sea\\n This level will be unlocked at 1060 points.\\n \\n \\n \\n \\n \\n\"","module.exports = \"\\n\\n \\n \\n \\n \\n Level 3: Tundra\\n \\n\\n\\n\\n \\n \\n \\n \\n A preview of Level 3: Tundra\\n This level will be unlocked at 2120 points.\\n \\n \\n \\n \\n \\n\\n\"","module.exports = \"\\n \\n \\n You unlocked a thank you message\\n \\n\\n \\n\\n\\n\\n
\\n \\n \\n
\\n\\n\\n\\n\\n\\n\\n
\\n\\n \\n \\n \\n \\n\\n\"","module.exports = \"\\n \\n \\n You unlocked a meme\\n \\n \\n \\n\\n\\n \\n
\\n \\n \\n
\\n \\n\\n\\n\\n\\n
\\n\\n \\n \\n \\n \\n\\n\"","module.exports = \"\\n \\n \\n \\n \\n How the app works?\\n \\n\\n\\n\\n\\n \\n\\n\\n \\n \\n \\n \\n \\n

Complete survey and get rewarded

\\n

Every day complete a survey between 6PM and midnight, and receive a variety of different rewards described below.

\\n
\\n
\\n\\n
\\n\\n\\n \\n \\n \\n \\n \\n

Money

\\n

Earn one dollar for completing a 3-day streak of your daily survey and two dollars for completing the 1st survey of every new month.

\\n
\\n
\\n\\n
\\n\\n \\n \\n \\n \\n \\n

Point

\\n

Each survey you complete = 60 points!

\\n
\\n
\\n\\n
\\n\\n \\n \\n \\n \\n \\n

Animals

\\n

More points = more animals in your environment!

\\n

You can unlock 62 different animals and fish!!

\\n
\\n
\\n\\n
\\n\\n \\n \\n \\n \\n \\n

Survey completion bar

\\n

Shows the number of surveys you have completed in the past week (shown as green) and the ones you missed (shown as gray).

\\n
\\n
\\n\\n
\\n\\n \\n \\n

Progress bars

\\n

Next Animal (top): Shows how far you are to unlock the next animal.

\\n

Level up (bottom): Shows how far until you “level up†until the next environment

\\n
\\n \\n \\n \\n
\\n\\n
\\n \\n
\\n\\n\\n \\n\\n
\\n

You will sometimes get thank you messages or memes for completing the surveys.

\\n
\\n \\n
\\n
\\n\\n\\n
\\n\\n\\n\\n
\"","module.exports = \"\\n \\n \\n \\n \\n Sample life-insight (demo)\\n \\n\\n\\n\\n
\\n
Congratulations!!
\\n
You unlocked a life-insight
\\n
\\n\\n
\\n
\\n \\n
\\n
\\n \\n

{{subtext}}

\\n
\\n\\n
\\n \\n
\\n \\n\\n
\\n \\n \\n
\\n \\n
\\n \\n
\\n \\n \\n\\n
\\n
\\n\\n\\n\\n\\n\"","module.exports = \"\\n\\n\\n\\n\\n \\n \\n \\n \\n Aquarium\\n \\n \\n \\n \\n
\\n
Congratulations!!
\\n
You unlocked a life-insight
\\n
\\n \\n
\\n \\n
\\n
\\n \\n
\\n
\\n \\n

{{subtext}}

\\n
\\n \\n
\\n \\n
\\n \\n \\n
\\n \\n \\n
\\n \\n
\\n \\n
\\n \\n
\\n
\\n\\n \\n \\n \\n \\n \\n \\n \\n \"","module.exports = \"\\n \\n \\n \\n \\n Python sample life insight\\n \\n\\n\\n\\n \\n\\n

Mood

\\n
\\n \\n
\\n \\n\\n

Concentration level

\\n
\\n \\n
\\n\\n

Good day tomorrow

\\n
\\n \\n
\\n\\n\\n\\n\\n\\n
\"","module.exports = \"\\n \\n \\n \\n \\n Unlockables\\n \\n\\n\\n\\n\\n
\\n

You have so far earned

\\n

{{amount_earned}}

\\n
\\n\\n
\\n

Animals/Fish to unlock

\\n \\n \\n
\\n\\n \\n\\n
\\n\\n\\n\"","module.exports = \"\\n \\n \\n \\n \\n Thank you messages\\n \\n\\n \\n \\n\\n \\n \\n {{unlockedAltMessagesCount}} out of 21 thank you messages unlocked\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\"","module.exports = \"\\n \\n \\n \\n \\n Inspirational quotes\\n \\n\\n\\n\\n\\n \\n \\n You received the following inspirational quotes\\n \\n \\n\\n \\n \\n \\n \\n \\n \\n\\n\\n

\\n {{item.author}}\\n\\n

\\n \\n

\\n {{item.quote_text}}\\n

\\n
\\n
\\n
\\n\\n
\"","module.exports = \"\\n \\n \\n \\n \\n Memes\\n \\n\\n \\n \\n\\n \\n \\n {{unlockedMemeCount}} out of 31 memes unlocked\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\"","module.exports = \"\\n \\n \\n \\n \\n Video tutorials\\n \\n \\n\\n\\n \\n\\n \\n \\n \\n 4PM and 6PM notifications\\n \\n
\\n \\n
\\n\\n
\\n
\"","module.exports = \"\\n \\n \\n \\n \\n \\n \\n\\n Arc apps\\n \\n\\n\\n\\n\\n \\n \\n Time Management Apps\\n \\n\\n \\n \\n \\n \\n \\n \\n

\\n {{item.name}}\\n

\\n

\\n {{item.description}}\\n

\\n
\\n \\n \\n Visit\\n \\n \\n
\\n
\\n
\\n \\n\\n \\n \\n Time Management Apps\\n \\n \\n {{app.name}}\\n \\n \\n Internet Blocking Tools\\n \\n \\n {{app.name}}\\n \\n \\n Managing Tasks and Priorities\\n \\n \\n {{app.name}}\\n \\n >\\n
\"","module.exports = \"\\n \\n \\n \\n \\n Survey\\n \\n\\n\\n\\n\\n \\n \\n \\n\\n\\n\\n\"","module.exports = \"
\\n

Loading survey...

\\n
\\n
\\n \\n
\\n\\n\\n\\n \\n\\n\\n\"","module.exports = \"\\n \\n \\n \\n \\n Survey\\n \\n\\n\\n\\n \\n\"","module.exports = \"\\n \\n \\n \\n \\n Survey\\n \\n\\n\\n\\n \\n \\n\\n \\n \\n \\n\\n\\n\"","module.exports = \"\\n \\n \\n \\n \\n Sleep survey\\n \\n \\n \\n \\n \\n\\n \\n\\n\\n\\n\\n \\n \\n \\n Phone lock/ublock history\\n \\n \\n \\n The graph shows a dot when you locked or unlocked your phone last night and this morning. You most likely slept between the last time you \\n locked the phone last night to the first time you unlocked the phone this morning.\\n \\n \\n \\n \\n \\n\\n\\n\"","module.exports = \"\\n \\n SARA\\n \\n\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n

{{error}}

\\n
\\n\\n \\n
\\n \\n \\n
\\n\\n
\\n \\n Username\\n \\n \\n \\n Password\\n \\n \\n
\\n {{isLoginMode ? 'Login' : 'Sign Up'}} \\n \\n
\\n
\\n
\\n
\\n
\\n
\\n\"","/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source code is governed by an MIT-style license that can be\n* found in the LICENSE file at https://angular.io/license\n*/\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(factory());\n}(this, (function () { 'use strict';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar Zone$1 = (function (global) {\n var performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n var checkDuplicate = global[('__zone_symbol__forceDuplicateZoneCheck')] === true;\n if (global['Zone']) {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n throw new Error('Zone already loaded.');\n }\n else {\n return global['Zone'];\n }\n }\n var Zone = /** @class */ (function () {\n function Zone(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n Zone.assertZonePatched = function () {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n };\n Object.defineProperty(Zone, \"root\", {\n get: function () {\n var zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Zone, \"current\", {\n get: function () {\n return _currentZoneFrame.zone;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Zone, \"currentTask\", {\n get: function () {\n return _currentTask;\n },\n enumerable: true,\n configurable: true\n });\n Zone.__load_patch = function (name, fn) {\n if (patches.hasOwnProperty(name)) {\n if (checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n var perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n };\n Object.defineProperty(Zone.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Zone.prototype, \"name\", {\n get: function () {\n return this._name;\n },\n enumerable: true,\n configurable: true\n });\n Zone.prototype.get = function (key) {\n var zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n };\n Zone.prototype.getZoneWith = function (key) {\n var current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n };\n Zone.prototype.fork = function (zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n };\n Zone.prototype.wrap = function (callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n var _callback = this._zoneDelegate.intercept(this, callback, source);\n var zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n };\n Zone.prototype.run = function (callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n };\n Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) {\n if (applyThis === void 0) { applyThis = null; }\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n };\n Zone.prototype.runTask = function (task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\n var reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n var previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n };\n Zone.prototype.scheduleTask = function (task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n var newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(\"can not reschedule task to \" + this.name + \" which is descendants of the original zone \" + task.zone.name);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n var zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n };\n Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n };\n Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n };\n Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n };\n Zone.prototype.cancelTask = function (task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n };\n Zone.prototype._updateTaskCount = function (task, count) {\n var zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (var i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n };\n Zone.__symbol__ = __symbol__;\n return Zone;\n }());\n var DELEGATE_ZS = {\n name: '',\n onHasTask: function (delegate, _, target, hasTaskState) { return delegate.hasTask(target, hasTaskState); },\n onScheduleTask: function (delegate, _, target, task) {\n return delegate.scheduleTask(target, task);\n },\n onInvokeTask: function (delegate, _, target, task, applyThis, applyArgs) {\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n },\n onCancelTask: function (delegate, _, target, task) { return delegate.cancelTask(target, task); }\n };\n var ZoneDelegate = /** @class */ (function () {\n function ZoneDelegate(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate.zone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate.zone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate.zone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate.zone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt = zoneSpec &&\n (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate.zone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate.zone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate.zone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n var zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n var parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) {\n return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n };\n ZoneDelegate.prototype.intercept = function (targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n };\n ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n };\n ZoneDelegate.prototype.handleError = function (targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n };\n ZoneDelegate.prototype.scheduleTask = function (targetZone, task) {\n var returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n };\n ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n };\n ZoneDelegate.prototype.cancelTask = function (targetZone, task) {\n var value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n };\n ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n };\n ZoneDelegate.prototype._updateTaskCount = function (type, count) {\n var counts = this._taskCounts;\n var prev = counts[type];\n var next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n var isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n };\n return ZoneDelegate;\n }());\n var ZoneTask = /** @class */ (function () {\n function ZoneTask(type, source, callback, options, scheduleFn, cancelFn) {\n this._zone = null;\n this.runCount = 0;\n this._zoneDelegates = null;\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n this.callback = callback;\n var self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n ZoneTask.invokeTask = function (task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n };\n Object.defineProperty(ZoneTask.prototype, \"zone\", {\n get: function () {\n return this._zone;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ZoneTask.prototype, \"state\", {\n get: function () {\n return this._state;\n },\n enumerable: true,\n configurable: true\n });\n ZoneTask.prototype.cancelScheduleRequest = function () {\n this._transitionTo(notScheduled, scheduling);\n };\n ZoneTask.prototype._transitionTo = function (toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(this.type + \" '\" + this.source + \"': can not transition to '\" + toState + \"', expecting state '\" + fromState1 + \"'\" + (fromState2 ? ' or \\'' + fromState2 + '\\'' : '') + \", was '\" + this._state + \"'.\");\n }\n };\n ZoneTask.prototype.toString = function () {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n };\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n ZoneTask.prototype.toJSON = function () {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n };\n return ZoneTask;\n }());\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n var symbolSetTimeout = __symbol__('setTimeout');\n var symbolPromise = __symbol__('Promise');\n var symbolThen = __symbol__('then');\n var _microTaskQueue = [];\n var _isDrainingMicrotaskQueue = false;\n var nativeMicroTaskQueuePromise;\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n var nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, drainMicroTaskQueue);\n }\n else {\n global[symbolSetTimeout](drainMicroTaskQueue, 0);\n }\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n var queue = _microTaskQueue;\n _microTaskQueue = [];\n for (var i = 0; i < queue.length; i++) {\n var task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n var NO_ZONE = { name: 'NO ZONE' };\n var notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n var microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n var patches = {};\n var _api = {\n symbol: __symbol__,\n currentZoneFrame: function () { return _currentZoneFrame; },\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: function () { return !Zone[__symbol__('ignoreConsoleErrorUncaughtError')]; },\n patchEventTarget: function () { return []; },\n patchOnProperties: noop,\n patchMethod: function () { return noop; },\n bindArguments: function () { return []; },\n patchThen: function () { return noop; },\n patchMacroTask: function () { return noop; },\n setNativePromise: function (NativePromise) {\n // sometimes NativePromise.resolve static function\n // is not ready yet, (such as core-js/es6.promise)\n // so we need to check here.\n if (NativePromise && typeof NativePromise.resolve === 'function') {\n nativeMicroTaskQueuePromise = NativePromise.resolve(0);\n }\n },\n patchEventPrototype: function () { return noop; },\n isIEOrEdge: function () { return false; },\n getGlobalObjects: function () { return undefined; },\n ObjectDefineProperty: function () { return noop; },\n ObjectGetOwnPropertyDescriptor: function () { return undefined; },\n ObjectCreate: function () { return undefined; },\n ArraySlice: function () { return []; },\n patchClass: function () { return noop; },\n wrapWithCurrentZone: function () { return noop; },\n filterProperties: function () { return []; },\n attachOriginToPatched: function () { return noop; },\n _redefineProperty: function () { return noop; },\n patchCallbacks: function () { return noop; }\n };\n var _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n var _currentTask = null;\n var _numberOfNestedTaskFrames = 0;\n function noop() { }\n function __symbol__(name) {\n return '__zone_symbol__' + name;\n }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n\nvar __values = (undefined && undefined.__values) || function (o) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n};\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('ZoneAwarePromise', function (global, Zone, api) {\n var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n var className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n var __symbol__ = api.symbol;\n var _uncaughtPromiseErrors = [];\n var symbolPromise = __symbol__('Promise');\n var symbolThen = __symbol__('then');\n var creationTrace = '__creationTrace__';\n api.onUnhandledError = function (e) {\n if (api.showUncaughtError()) {\n var rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = function () {\n while (_uncaughtPromiseErrors.length) {\n var _loop_1 = function () {\n var uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(function () {\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n };\n while (_uncaughtPromiseErrors.length) {\n _loop_1();\n }\n }\n };\n var UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n var handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (handler && typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) {\n return value && value.then;\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n var symbolState = __symbol__('state');\n var symbolValue = __symbol__('value');\n var symbolFinally = __symbol__('finally');\n var symbolParentPromiseValue = __symbol__('parentPromiseValue');\n var symbolParentPromiseState = __symbol__('parentPromiseState');\n var source = 'Promise.then';\n var UNRESOLVED = null;\n var RESOLVED = true;\n var REJECTED = false;\n var REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return function (v) {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n var once = function () {\n var wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n var TYPE_ERROR = 'Promise resolved with itself';\n var CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n var onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n var then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(function () {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(function () {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n var queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n var trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (var i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n try {\n // try to print more readable error log\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n var error_1 = err;\n error_1.rejection = value;\n error_1.promise = promise;\n error_1.zone = Zone.current;\n error_1.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(error_1);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n var REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n var handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (var i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n var promiseState = promise[symbolState];\n var delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected : forwardRejection;\n zone.scheduleMicroTask(source, function () {\n try {\n var parentPromiseValue = promise[symbolValue];\n var isFinallyPromise = chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n var value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?\n [] :\n [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n var ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n var ZoneAwarePromise = /** @class */ (function () {\n function ZoneAwarePromise(executor) {\n var promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n ZoneAwarePromise.toString = function () {\n return ZONE_AWARE_PROMISE_TO_STRING;\n };\n ZoneAwarePromise.resolve = function (value) {\n return resolvePromise(new this(null), RESOLVED, value);\n };\n ZoneAwarePromise.reject = function (error) {\n return resolvePromise(new this(null), REJECTED, error);\n };\n ZoneAwarePromise.race = function (values) {\n var e_1, _a;\n var resolve;\n var reject;\n var promise = new this(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n resolve(value);\n }\n function onReject(error) {\n reject(error);\n }\n try {\n for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {\n var value = values_1_1.value;\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return promise;\n };\n ZoneAwarePromise.all = function (values) {\n var e_2, _a;\n var resolve;\n var reject;\n var promise = new this(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n var unresolvedCount = 2;\n var valueIndex = 0;\n var resolvedValues = [];\n var _loop_2 = function (value) {\n if (!isThenable(value)) {\n value = this_1.resolve(value);\n }\n var curValueIndex = valueIndex;\n value.then(function (value) {\n resolvedValues[curValueIndex] = value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, reject);\n unresolvedCount++;\n valueIndex++;\n };\n var this_1 = this;\n try {\n for (var values_2 = __values(values), values_2_1 = values_2.next(); !values_2_1.done; values_2_1 = values_2.next()) {\n var value = values_2_1.value;\n _loop_2(value);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (values_2_1 && !values_2_1.done && (_a = values_2.return)) _a.call(values_2);\n }\n finally { if (e_2) throw e_2.error; }\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n };\n Object.defineProperty(ZoneAwarePromise.prototype, Symbol.toStringTag, {\n get: function () {\n return 'Promise';\n },\n enumerable: true,\n configurable: true\n });\n ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) {\n var chainPromise = new this.constructor(null);\n var zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n };\n ZoneAwarePromise.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n ZoneAwarePromise.prototype.finally = function (onFinally) {\n var chainPromise = new this.constructor(null);\n chainPromise[symbolFinally] = symbolFinally;\n var zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n };\n return ZoneAwarePromise;\n }());\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n var NativePromise = global[symbolPromise] = global['Promise'];\n var ZONE_AWARE_PROMISE = Zone.__symbol__('ZoneAwarePromise');\n var desc = ObjectGetOwnPropertyDescriptor(global, 'Promise');\n if (!desc || desc.configurable) {\n desc && delete desc.writable;\n desc && delete desc.value;\n if (!desc) {\n desc = { configurable: true, enumerable: true };\n }\n desc.get = function () {\n // if we already set ZoneAwarePromise, use patched one\n // otherwise return native one.\n return global[ZONE_AWARE_PROMISE] ? global[ZONE_AWARE_PROMISE] : global[symbolPromise];\n };\n desc.set = function (NewNativePromise) {\n if (NewNativePromise === ZoneAwarePromise) {\n // if the NewNativePromise is ZoneAwarePromise\n // save to global\n global[ZONE_AWARE_PROMISE] = NewNativePromise;\n }\n else {\n // if the NewNativePromise is not ZoneAwarePromise\n // for example: after load zone.js, some library just\n // set es6-promise to global, if we set it to global\n // directly, assertZonePatched will fail and angular\n // will not loaded, so we just set the NewNativePromise\n // to global[symbolPromise], so the result is just like\n // we load ES6 Promise before zone.js\n global[symbolPromise] = NewNativePromise;\n if (!NewNativePromise.prototype[symbolThen]) {\n patchThen(NewNativePromise);\n }\n api.setNativePromise(NewNativePromise);\n }\n };\n ObjectDefineProperty(global, 'Promise', desc);\n }\n global['Promise'] = ZoneAwarePromise;\n var symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n var proto = Ctor.prototype;\n var prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n var originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n var _this = this;\n var wrapped = new ZoneAwarePromise(function (resolve, reject) {\n originalThen.call(_this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function () {\n var resultPromise = fn.apply(this, arguments);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n var ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n var fetch_1 = global['fetch'];\n if (typeof fetch_1 == 'function') {\n global[api.symbol('fetch')] = fetch_1;\n global['fetch'] = zoneify(fetch_1);\n }\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nvar ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nvar ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nvar ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nvar ObjectCreate = Object.create;\n/** Array.prototype.slice */\nvar ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nvar ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nvar REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nvar ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nvar ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nvar TRUE_STR = 'true';\n/** false string const */\nvar FALSE_STR = 'false';\n/** __zone_symbol__ string const */\nvar ZONE_SYMBOL_PREFIX = '__zone_symbol__';\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nvar zoneSymbol = Zone.__symbol__;\nvar isWindowExists = typeof window !== 'undefined';\nvar internalWindow = isWindowExists ? window : undefined;\nvar _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\nvar REMOVE_ATTRIBUTE = 'removeAttribute';\nvar NULL_ON_PROP_VALUE = [null];\nfunction bindArguments(args, source) {\n for (var i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n var source = prototype.constructor['name'];\n var _loop_1 = function (i) {\n var name_1 = fnNames[i];\n var delegate = prototype[name_1];\n if (delegate) {\n var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name_1);\n if (!isPropertyWritable(prototypeDesc)) {\n return \"continue\";\n }\n prototype[name_1] = (function (delegate) {\n var patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name_1));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n };\n for (var i = 0; i < fnNames.length; i++) {\n _loop_1(i);\n }\n}\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nvar isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nvar isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\nvar isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nvar isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\nvar zoneSymbolEventNames = {};\nvar wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n var eventNameSymbol = zoneSymbolEventNames[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n var target = this || event.target || _global;\n var listener = target[eventNameSymbol];\n var result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signiture\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n var errorEvent = event;\n result = listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n var desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n var prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n var onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n var originalDescGet = desc.get;\n var originalDescSet = desc.set;\n // substr(2) cuz 'onclick' -> 'click', etc\n var eventName = prop.substr(2);\n var eventNameSymbol = zoneSymbolEventNames[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n var target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n var previousValue = target[eventNameSymbol];\n if (previousValue) {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n if (originalDescSet) {\n originalDescSet.apply(target, NULL_ON_PROP_VALUE);\n }\n if (typeof newValue === 'function') {\n target[eventNameSymbol] = newValue;\n target.addEventListener(eventName, wrapFn, false);\n }\n else {\n target[eventNameSymbol] = null;\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n var target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n var listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n var value = originalDescGet && originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n}\nfunction patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (var i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n var onProperties = [];\n for (var prop in obj) {\n if (prop.substr(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (var j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\nvar originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n var OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n var a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n var instance = new OriginalClass(function () { });\n var prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\nfunction copySymbolProperties(src, dest) {\n if (typeof Object.getOwnPropertySymbols !== 'function') {\n return;\n }\n var symbols = Object.getOwnPropertySymbols(src);\n symbols.forEach(function (symbol) {\n var desc = Object.getOwnPropertyDescriptor(src, symbol);\n Object.defineProperty(dest, symbol, {\n get: function () {\n return src[symbol];\n },\n set: function (value) {\n if (desc && (!desc.writable || typeof desc.set !== 'function')) {\n // if src[symbol] is not writable or not have a setter, just return\n return;\n }\n src[symbol] = value;\n },\n enumerable: desc ? desc.enumerable : true,\n configurable: desc ? desc.configurable : true\n });\n });\n}\nvar shouldCopySymbolProperties = false;\n\nfunction patchMethod(target, name, patchFn) {\n var proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n var delegateName = zoneSymbol(name);\n var delegate = null;\n if (proto && !(delegate = proto[delegateName])) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n var desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n var patchDelegate_1 = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate_1(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n if (shouldCopySymbolProperties) {\n copySymbolProperties(delegate, proto[name]);\n }\n }\n }\n return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n var setNative = null;\n function scheduleTask(task) {\n var data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, function (delegate) { return function (self, args) {\n var meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n }; });\n}\n\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\nvar isDetectedIEOrEdge = false;\nvar ieOrEdge = false;\nfunction isIE() {\n try {\n var ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n }\n catch (error) {\n }\n return false;\n}\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n var ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) {\n }\n return ieOrEdge;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// override Function.prototype.toString to make zone.js patched function\n// look like native function\nZone.__load_patch('toString', function (global) {\n // patch Func.prototype.toString to let them look like native\n var originalFunctionToString = Function.prototype.toString;\n var ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n var PROMISE_SYMBOL = zoneSymbol('Promise');\n var ERROR_SYMBOL = zoneSymbol('Error');\n var newFunctionToString = function toString() {\n if (typeof this === 'function') {\n var originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n var nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n var nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n var originalObjectToString = Object.prototype.toString;\n var PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nvar passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\n// an identifier to tell ZoneTask do not create a new invoke closure\nvar OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n};\nvar zoneSymbolEventNames$1 = {};\nvar globalSources = {};\nvar EVENT_NAME_SYMBOL_REGX = /^__zone_symbol__(\\w+)(true|false)$/;\nvar IMMEDIATE_PROPAGATION_SYMBOL = ('__zone_symbol__propagationStopped');\nfunction patchEventTarget(_global, apis, patchOptions) {\n var ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n var REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n var LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n var REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n var zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n var ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n var PREPEND_EVENT_LISTENER = 'prependListener';\n var PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n var invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n var delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = function (event) { return delegate.handleEvent(event); };\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n task.invoke(task, target, [event]);\n var options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n var delegate_1 = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate_1, options);\n }\n };\n // global shared zoneAwareCallback to handle all event callback with capture = false\n var globalZoneAwareCallback = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n var target = this || event.target || _global;\n var tasks = target[zoneSymbolEventNames$1[event.type][FALSE_STR]];\n if (tasks) {\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n invokeTask(tasks[0], target, event);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n var copyTasks = tasks.slice();\n for (var i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n invokeTask(copyTasks[i], target, event);\n }\n }\n }\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n var globalZoneAwareCaptureCallback = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n var target = this || event.target || _global;\n var tasks = target[zoneSymbolEventNames$1[event.type][TRUE_STR]];\n if (tasks) {\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n invokeTask(tasks[0], target, event);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n var copyTasks = tasks.slice();\n for (var i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n invokeTask(copyTasks[i], target, event);\n }\n }\n }\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n var useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n var validateHandler = patchOptions && patchOptions.vh;\n var checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n var returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n var proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n var eventNameToString = patchOptions && patchOptions.eventNameToString;\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n var taskData = {};\n var nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n var nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n var nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n var nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n var nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n function checkIsPassive(task) {\n if (!passiveSupported && typeof taskData.options !== 'boolean' &&\n typeof taskData.options !== 'undefined' && taskData.options !== null) {\n // options is a non-null non-undefined object\n // passive is not supported\n // don't pass options as object\n // just pass capture as a boolean\n task.options = !!taskData.options.capture;\n taskData.options = task.options;\n }\n }\n var customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n checkIsPassive(task);\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n var customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n var symbolEventNames = zoneSymbolEventNames$1[task.eventName];\n var symbolEventName = void 0;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n var existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (var i = 0; i < existingTasks.length; i++) {\n var existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n var customScheduleNonGlobal = function (task) {\n checkIsPassive(task);\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n var customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n var customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n var customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n var customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n var compareTaskCallbackVsDelegate = function (task, delegate) {\n var typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n var compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n var blackListedEvents = Zone[Zone.__symbol__('BLACK_LISTED_EVENTS')];\n var makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget, prepend) {\n if (returnTarget === void 0) { returnTarget = false; }\n if (prepend === void 0) { prepend = false; }\n return function () {\n var target = this || _global;\n var eventName = arguments[0];\n var delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n var isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n var options = arguments[2];\n if (blackListedEvents) {\n // check black list\n for (var i = 0; i < blackListedEvents.length; i++) {\n if (eventName === blackListedEvents[i]) {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n var capture;\n var once = false;\n if (options === undefined) {\n capture = false;\n }\n else if (options === true) {\n capture = true;\n }\n else if (options === false) {\n capture = false;\n }\n else {\n capture = options ? !!options.capture : false;\n once = options ? !!options.once : false;\n }\n var zone = Zone.current;\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n var symbolEventName;\n if (!symbolEventNames) {\n // the code is duplicate, but I just want to get some better performance\n var falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n var trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n var symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames$1[eventName] = {};\n zoneSymbolEventNames$1[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames$1[eventName][TRUE_STR] = symbolCapture;\n symbolEventName = capture ? symbolCapture : symbol;\n }\n else {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n var existingTasks = target[symbolEventName];\n var isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (var i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n var source;\n var constructorName = target.constructor['name'];\n var targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n var data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n var task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n if (!(!passiveSupported && typeof task.options === 'boolean')) {\n // if not support passive, and we pass an option object\n // to addEventListener, we should save the options to task\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n var options = arguments[2];\n var capture;\n if (options === undefined) {\n capture = false;\n }\n else if (options === true) {\n capture = true;\n }\n else if (options === false) {\n capture = false;\n }\n else {\n capture = options ? !!options.capture : false;\n }\n var delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n var symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n var existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (var i = 0; i < existingTasks.length; i++) {\n var existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n var listeners = [];\n var tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (var i = 0; i < tasks.length; i++) {\n var task = tasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n var target = this || _global;\n var eventName = arguments[0];\n if (!eventName) {\n var keys = Object.keys(target);\n for (var i = 0; i < keys.length; i++) {\n var prop = keys[i];\n var match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n var evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n var symbolEventNames = zoneSymbolEventNames$1[eventName];\n if (symbolEventNames) {\n var symbolEventName = symbolEventNames[FALSE_STR];\n var symbolCaptureEventName = symbolEventNames[TRUE_STR];\n var tasks = target[symbolEventName];\n var captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n var removeTasks = tasks.slice();\n for (var i = 0; i < removeTasks.length; i++) {\n var task = removeTasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n var removeTasks = captureTasks.slice();\n for (var i = 0; i < removeTasks.length; i++) {\n var task = removeTasks[i];\n var delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n var results = [];\n for (var i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n}\nfunction findEventTasks(target, eventName) {\n var foundTasks = [];\n for (var prop in target) {\n var match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n var evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n var tasks = target[prop];\n if (tasks) {\n for (var i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n}\nfunction patchEventPrototype(global, api) {\n var Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', function (delegate) { return function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n }; });\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n var symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n var nativeDelegate = target[symbol] = target[method];\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n var source = targetName + \".\" + method + \"::\" + callback;\n var prototype = opts.prototype;\n if (prototype.hasOwnProperty(callback)) {\n var descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/*\n * This is necessary for Chrome and Chrome mobile, to enable\n * things like redefining `createdCallback` on an element.\n */\nvar zoneSymbol$1 = Zone.__symbol__;\nvar _defineProperty = Object[zoneSymbol$1('defineProperty')] = Object.defineProperty;\nvar _getOwnPropertyDescriptor = Object[zoneSymbol$1('getOwnPropertyDescriptor')] =\n Object.getOwnPropertyDescriptor;\nvar _create = Object.create;\nvar unconfigurablesKey = zoneSymbol$1('unconfigurables');\nfunction propertyPatch() {\n Object.defineProperty = function (obj, prop, desc) {\n if (isUnconfigurable(obj, prop)) {\n throw new TypeError('Cannot assign to read only property \\'' + prop + '\\' of ' + obj);\n }\n var originalConfigurableFlag = desc.configurable;\n if (prop !== 'prototype') {\n desc = rewriteDescriptor(obj, prop, desc);\n }\n return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);\n };\n Object.defineProperties = function (obj, props) {\n Object.keys(props).forEach(function (prop) {\n Object.defineProperty(obj, prop, props[prop]);\n });\n return obj;\n };\n Object.create = function (obj, proto) {\n if (typeof proto === 'object' && !Object.isFrozen(proto)) {\n Object.keys(proto).forEach(function (prop) {\n proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);\n });\n }\n return _create(obj, proto);\n };\n Object.getOwnPropertyDescriptor = function (obj, prop) {\n var desc = _getOwnPropertyDescriptor(obj, prop);\n if (desc && isUnconfigurable(obj, prop)) {\n desc.configurable = false;\n }\n return desc;\n };\n}\nfunction _redefineProperty(obj, prop, desc) {\n var originalConfigurableFlag = desc.configurable;\n desc = rewriteDescriptor(obj, prop, desc);\n return _tryDefineProperty(obj, prop, desc, originalConfigurableFlag);\n}\nfunction isUnconfigurable(obj, prop) {\n return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];\n}\nfunction rewriteDescriptor(obj, prop, desc) {\n // issue-927, if the desc is frozen, don't try to change the desc\n if (!Object.isFrozen(desc)) {\n desc.configurable = true;\n }\n if (!desc.configurable) {\n // issue-927, if the obj is frozen, don't try to set the desc to obj\n if (!obj[unconfigurablesKey] && !Object.isFrozen(obj)) {\n _defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });\n }\n if (obj[unconfigurablesKey]) {\n obj[unconfigurablesKey][prop] = true;\n }\n }\n return desc;\n}\nfunction _tryDefineProperty(obj, prop, desc, originalConfigurableFlag) {\n try {\n return _defineProperty(obj, prop, desc);\n }\n catch (error) {\n if (desc.configurable) {\n // In case of errors, when the configurable flag was likely set by rewriteDescriptor(), let's\n // retry with the original flag value\n if (typeof originalConfigurableFlag == 'undefined') {\n delete desc.configurable;\n }\n else {\n desc.configurable = originalConfigurableFlag;\n }\n try {\n return _defineProperty(obj, prop, desc);\n }\n catch (error) {\n var descJson = null;\n try {\n descJson = JSON.stringify(desc);\n }\n catch (error) {\n descJson = desc.toString();\n }\n console.log(\"Attempting to configure '\" + prop + \"' with descriptor '\" + descJson + \"' on object '\" + obj + \"' and got error, giving up: \" + error);\n }\n }\n else {\n throw error;\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {globalThis}\n */\nvar globalEventHandlersEventNames = [\n 'abort',\n 'animationcancel',\n 'animationend',\n 'animationiteration',\n 'auxclick',\n 'beforeinput',\n 'blur',\n 'cancel',\n 'canplay',\n 'canplaythrough',\n 'change',\n 'compositionstart',\n 'compositionupdate',\n 'compositionend',\n 'cuechange',\n 'click',\n 'close',\n 'contextmenu',\n 'curechange',\n 'dblclick',\n 'drag',\n 'dragend',\n 'dragenter',\n 'dragexit',\n 'dragleave',\n 'dragover',\n 'drop',\n 'durationchange',\n 'emptied',\n 'ended',\n 'error',\n 'focus',\n 'focusin',\n 'focusout',\n 'gotpointercapture',\n 'input',\n 'invalid',\n 'keydown',\n 'keypress',\n 'keyup',\n 'load',\n 'loadstart',\n 'loadeddata',\n 'loadedmetadata',\n 'lostpointercapture',\n 'mousedown',\n 'mouseenter',\n 'mouseleave',\n 'mousemove',\n 'mouseout',\n 'mouseover',\n 'mouseup',\n 'mousewheel',\n 'orientationchange',\n 'pause',\n 'play',\n 'playing',\n 'pointercancel',\n 'pointerdown',\n 'pointerenter',\n 'pointerleave',\n 'pointerlockchange',\n 'mozpointerlockchange',\n 'webkitpointerlockerchange',\n 'pointerlockerror',\n 'mozpointerlockerror',\n 'webkitpointerlockerror',\n 'pointermove',\n 'pointout',\n 'pointerover',\n 'pointerup',\n 'progress',\n 'ratechange',\n 'reset',\n 'resize',\n 'scroll',\n 'seeked',\n 'seeking',\n 'select',\n 'selectionchange',\n 'selectstart',\n 'show',\n 'sort',\n 'stalled',\n 'submit',\n 'suspend',\n 'timeupdate',\n 'volumechange',\n 'touchcancel',\n 'touchmove',\n 'touchstart',\n 'touchend',\n 'transitioncancel',\n 'transitionend',\n 'waiting',\n 'wheel'\n];\nvar documentEventNames = [\n 'afterscriptexecute', 'beforescriptexecute', 'DOMContentLoaded', 'freeze', 'fullscreenchange',\n 'mozfullscreenchange', 'webkitfullscreenchange', 'msfullscreenchange', 'fullscreenerror',\n 'mozfullscreenerror', 'webkitfullscreenerror', 'msfullscreenerror', 'readystatechange',\n 'visibilitychange', 'resume'\n];\nvar windowEventNames = [\n 'absolutedeviceorientation',\n 'afterinput',\n 'afterprint',\n 'appinstalled',\n 'beforeinstallprompt',\n 'beforeprint',\n 'beforeunload',\n 'devicelight',\n 'devicemotion',\n 'deviceorientation',\n 'deviceorientationabsolute',\n 'deviceproximity',\n 'hashchange',\n 'languagechange',\n 'message',\n 'mozbeforepaint',\n 'offline',\n 'online',\n 'paint',\n 'pageshow',\n 'pagehide',\n 'popstate',\n 'rejectionhandled',\n 'storage',\n 'unhandledrejection',\n 'unload',\n 'userproximity',\n 'vrdisplyconnected',\n 'vrdisplaydisconnected',\n 'vrdisplaypresentchange'\n];\nvar htmlElementEventNames = [\n 'beforecopy', 'beforecut', 'beforepaste', 'copy', 'cut', 'paste', 'dragstart', 'loadend',\n 'animationstart', 'search', 'transitionrun', 'transitionstart', 'webkitanimationend',\n 'webkitanimationiteration', 'webkitanimationstart', 'webkittransitionend'\n];\nvar mediaElementEventNames = ['encrypted', 'waitingforkey', 'msneedkey', 'mozinterruptbegin', 'mozinterruptend'];\nvar ieElementEventNames = [\n 'activate',\n 'afterupdate',\n 'ariarequest',\n 'beforeactivate',\n 'beforedeactivate',\n 'beforeeditfocus',\n 'beforeupdate',\n 'cellchange',\n 'controlselect',\n 'dataavailable',\n 'datasetchanged',\n 'datasetcomplete',\n 'errorupdate',\n 'filterchange',\n 'layoutcomplete',\n 'losecapture',\n 'move',\n 'moveend',\n 'movestart',\n 'propertychange',\n 'resizeend',\n 'resizestart',\n 'rowenter',\n 'rowexit',\n 'rowsdelete',\n 'rowsinserted',\n 'command',\n 'compassneedscalibration',\n 'deactivate',\n 'help',\n 'mscontentzoom',\n 'msmanipulationstatechanged',\n 'msgesturechange',\n 'msgesturedoubletap',\n 'msgestureend',\n 'msgesturehold',\n 'msgesturestart',\n 'msgesturetap',\n 'msgotpointercapture',\n 'msinertiastart',\n 'mslostpointercapture',\n 'mspointercancel',\n 'mspointerdown',\n 'mspointerenter',\n 'mspointerhover',\n 'mspointerleave',\n 'mspointermove',\n 'mspointerout',\n 'mspointerover',\n 'mspointerup',\n 'pointerout',\n 'mssitemodejumplistitemremoved',\n 'msthumbnailclick',\n 'stop',\n 'storagecommit'\n];\nvar webglEventNames = ['webglcontextrestored', 'webglcontextlost', 'webglcontextcreationerror'];\nvar formEventNames = ['autocomplete', 'autocompleteerror'];\nvar detailEventNames = ['toggle'];\nvar frameEventNames = ['load'];\nvar frameSetEventNames = ['blur', 'error', 'focus', 'load', 'resize', 'scroll', 'messageerror'];\nvar marqueeEventNames = ['bounce', 'finish', 'start'];\nvar XMLHttpRequestEventNames = [\n 'loadstart', 'progress', 'abort', 'error', 'load', 'progress', 'timeout', 'loadend',\n 'readystatechange'\n];\nvar IDBIndexEventNames = ['upgradeneeded', 'complete', 'abort', 'success', 'error', 'blocked', 'versionchange', 'close'];\nvar websocketEventNames = ['close', 'error', 'open', 'message'];\nvar workerEventNames = ['error', 'message'];\nvar eventNames = globalEventHandlersEventNames.concat(webglEventNames, formEventNames, detailEventNames, documentEventNames, windowEventNames, htmlElementEventNames, ieElementEventNames);\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n var tip = ignoreProperties.filter(function (ip) { return ip.target === target; });\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n var targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(function (op) { return targetIgnoreProperties.indexOf(op) === -1; });\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n var filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n}\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n var supportsWebSocket = typeof WebSocket !== 'undefined';\n var ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n if (isBrowser) {\n var internalWindow = window;\n var ignoreErrorProperties = isIE ? [{ target: internalWindow, ignoreProperties: ['error'] }] : [];\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow, eventNames.concat(['messageerror']), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n patchFilteredProperties(Document.prototype, eventNames, ignoreProperties);\n if (typeof internalWindow['SVGElement'] !== 'undefined') {\n patchFilteredProperties(internalWindow['SVGElement'].prototype, eventNames, ignoreProperties);\n }\n patchFilteredProperties(Element.prototype, eventNames, ignoreProperties);\n patchFilteredProperties(HTMLElement.prototype, eventNames, ignoreProperties);\n patchFilteredProperties(HTMLMediaElement.prototype, mediaElementEventNames, ignoreProperties);\n patchFilteredProperties(HTMLFrameSetElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);\n patchFilteredProperties(HTMLBodyElement.prototype, windowEventNames.concat(frameSetEventNames), ignoreProperties);\n patchFilteredProperties(HTMLFrameElement.prototype, frameEventNames, ignoreProperties);\n patchFilteredProperties(HTMLIFrameElement.prototype, frameEventNames, ignoreProperties);\n var HTMLMarqueeElement_1 = internalWindow['HTMLMarqueeElement'];\n if (HTMLMarqueeElement_1) {\n patchFilteredProperties(HTMLMarqueeElement_1.prototype, marqueeEventNames, ignoreProperties);\n }\n var Worker_1 = internalWindow['Worker'];\n if (Worker_1) {\n patchFilteredProperties(Worker_1.prototype, workerEventNames, ignoreProperties);\n }\n }\n var XMLHttpRequest = _global['XMLHttpRequest'];\n if (XMLHttpRequest) {\n // XMLHttpRequest is not available in ServiceWorker, so we need to check here\n patchFilteredProperties(XMLHttpRequest.prototype, XMLHttpRequestEventNames, ignoreProperties);\n }\n var XMLHttpRequestEventTarget = _global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n patchFilteredProperties(XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype, XMLHttpRequestEventNames, ignoreProperties);\n }\n if (typeof IDBIndex !== 'undefined') {\n patchFilteredProperties(IDBIndex.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBRequest.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBOpenDBRequest.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBDatabase.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBTransaction.prototype, IDBIndexEventNames, ignoreProperties);\n patchFilteredProperties(IDBCursor.prototype, IDBIndexEventNames, ignoreProperties);\n }\n if (supportsWebSocket) {\n patchFilteredProperties(WebSocket.prototype, websocketEventNames, ignoreProperties);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('util', function (global, Zone, api) {\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n // define which events will not be patched by `Zone.js`.\n // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n // the name consistent with angular repo.\n // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n // backwards compatibility.\n var SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n var SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = _redefineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = function () { return ({\n globalSources: globalSources,\n zoneSymbolEventNames: zoneSymbolEventNames$1,\n eventNames: eventNames,\n isBrowser: isBrowser,\n isMix: isMix,\n isNode: isNode,\n TRUE_STR: TRUE_STR,\n FALSE_STR: FALSE_STR,\n ZONE_SYMBOL_PREFIX: ZONE_SYMBOL_PREFIX,\n ADD_EVENT_LISTENER_STR: ADD_EVENT_LISTENER_STR,\n REMOVE_EVENT_LISTENER_STR: REMOVE_EVENT_LISTENER_STR\n }); };\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction eventTargetLegacyPatch(_global, api) {\n var _a = api.getGlobalObjects(), eventNames = _a.eventNames, globalSources = _a.globalSources, zoneSymbolEventNames = _a.zoneSymbolEventNames, TRUE_STR = _a.TRUE_STR, FALSE_STR = _a.FALSE_STR, ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX;\n var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';\n var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket'\n .split(',');\n var EVENT_TARGET = 'EventTarget';\n var apis = [];\n var isWtf = _global['wtf'];\n var WTF_ISSUE_555_ARRAY = WTF_ISSUE_555.split(',');\n if (isWtf) {\n // Workaround for: https://github.com/google/tracing-framework/issues/555\n apis = WTF_ISSUE_555_ARRAY.map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);\n }\n else if (_global[EVENT_TARGET]) {\n apis.push(EVENT_TARGET);\n }\n else {\n // Note: EventTarget is not available in all browsers,\n // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget\n apis = NO_EVENT_TARGET;\n }\n var isDisableIECheck = _global['__Zone_disable_IE_check'] || false;\n var isEnableCrossContextCheck = _global['__Zone_enable_cross_context_check'] || false;\n var ieOrEdge = api.isIEOrEdge();\n var ADD_EVENT_LISTENER_SOURCE = '.addEventListener:';\n var FUNCTION_WRAPPER = '[object FunctionWrapper]';\n var BROWSER_TOOLS = 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }';\n // predefine all __zone_symbol__ + eventName + true/false string\n for (var i = 0; i < eventNames.length; i++) {\n var eventName = eventNames[i];\n var falseEventName = eventName + FALSE_STR;\n var trueEventName = eventName + TRUE_STR;\n var symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n // predefine all task.source string\n for (var i = 0; i < WTF_ISSUE_555.length; i++) {\n var target = WTF_ISSUE_555_ARRAY[i];\n var targets = globalSources[target] = {};\n for (var j = 0; j < eventNames.length; j++) {\n var eventName = eventNames[j];\n targets[eventName] = target + ADD_EVENT_LISTENER_SOURCE + eventName;\n }\n }\n var checkIEAndCrossContext = function (nativeDelegate, delegate, target, args) {\n if (!isDisableIECheck && ieOrEdge) {\n if (isEnableCrossContextCheck) {\n try {\n var testString = delegate.toString();\n if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n catch (error) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n else {\n var testString = delegate.toString();\n if ((testString === FUNCTION_WRAPPER || testString == BROWSER_TOOLS)) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n }\n else if (isEnableCrossContextCheck) {\n try {\n delegate.toString();\n }\n catch (error) {\n nativeDelegate.apply(target, args);\n return false;\n }\n }\n return true;\n };\n var apiTypes = [];\n for (var i = 0; i < apis.length; i++) {\n var type = _global[apis[i]];\n apiTypes.push(type && type.prototype);\n }\n // vh is validateHandler to check event handler\n // is valid or not(for security check)\n api.patchEventTarget(_global, apiTypes, { vh: checkIEAndCrossContext });\n Zone[api.symbol('patchEventTarget')] = !!_global[EVENT_TARGET];\n return true;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// we have to patch the instance since the proto is non-configurable\nfunction apply(api, _global) {\n var _a = api.getGlobalObjects(), ADD_EVENT_LISTENER_STR = _a.ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR = _a.REMOVE_EVENT_LISTENER_STR;\n var WS = _global.WebSocket;\n // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener\n // On older Chrome, no need since EventTarget was already patched\n if (!_global.EventTarget) {\n api.patchEventTarget(_global, [WS.prototype]);\n }\n _global.WebSocket = function (x, y) {\n var socket = arguments.length > 1 ? new WS(x, y) : new WS(x);\n var proxySocket;\n var proxySocketProto;\n // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance\n var onmessageDesc = api.ObjectGetOwnPropertyDescriptor(socket, 'onmessage');\n if (onmessageDesc && onmessageDesc.configurable === false) {\n proxySocket = api.ObjectCreate(socket);\n // socket have own property descriptor 'onopen', 'onmessage', 'onclose', 'onerror'\n // but proxySocket not, so we will keep socket as prototype and pass it to\n // patchOnProperties method\n proxySocketProto = socket;\n [ADD_EVENT_LISTENER_STR, REMOVE_EVENT_LISTENER_STR, 'send', 'close'].forEach(function (propName) {\n proxySocket[propName] = function () {\n var args = api.ArraySlice.call(arguments);\n if (propName === ADD_EVENT_LISTENER_STR || propName === REMOVE_EVENT_LISTENER_STR) {\n var eventName = args.length > 0 ? args[0] : undefined;\n if (eventName) {\n var propertySymbol = Zone.__symbol__('ON_PROPERTY' + eventName);\n socket[propertySymbol] = proxySocket[propertySymbol];\n }\n }\n return socket[propName].apply(socket, args);\n };\n });\n }\n else {\n // we can patch the real socket\n proxySocket = socket;\n }\n api.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open'], proxySocketProto);\n return proxySocket;\n };\n var globalWebSocket = _global['WebSocket'];\n for (var prop in WS) {\n globalWebSocket[prop] = WS[prop];\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {globalThis}\n */\nfunction propertyDescriptorLegacyPatch(api, _global) {\n var _a = api.getGlobalObjects(), isNode = _a.isNode, isMix = _a.isMix;\n if (isNode && !isMix) {\n return;\n }\n if (!canPatchViaPropertyDescriptor(api, _global)) {\n var supportsWebSocket = typeof WebSocket !== 'undefined';\n // Safari, Android browsers (Jelly Bean)\n patchViaCapturingAllTheEvents(api);\n api.patchClass('XMLHttpRequest');\n if (supportsWebSocket) {\n apply(api, _global);\n }\n Zone[api.symbol('patchEvents')] = true;\n }\n}\nfunction canPatchViaPropertyDescriptor(api, _global) {\n var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;\n if ((isBrowser || isMix) &&\n !api.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&\n typeof Element !== 'undefined') {\n // WebKit https://bugs.webkit.org/show_bug.cgi?id=134364\n // IDL interface attributes are not configurable\n var desc = api.ObjectGetOwnPropertyDescriptor(Element.prototype, 'onclick');\n if (desc && !desc.configurable)\n return false;\n // try to use onclick to detect whether we can patch via propertyDescriptor\n // because XMLHttpRequest is not available in service worker\n if (desc) {\n api.ObjectDefineProperty(Element.prototype, 'onclick', {\n enumerable: true,\n configurable: true,\n get: function () {\n return true;\n }\n });\n var div = document.createElement('div');\n var result = !!div.onclick;\n api.ObjectDefineProperty(Element.prototype, 'onclick', desc);\n return result;\n }\n }\n var XMLHttpRequest = _global['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return false;\n }\n var ON_READY_STATE_CHANGE = 'onreadystatechange';\n var XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n var xhrDesc = api.ObjectGetOwnPropertyDescriptor(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE);\n // add enumerable and configurable here because in opera\n // by default XMLHttpRequest.prototype.onreadystatechange is undefined\n // without adding enumerable and configurable will cause onreadystatechange\n // non-configurable\n // and if XMLHttpRequest.prototype.onreadystatechange is undefined,\n // we should set a real desc instead a fake one\n if (xhrDesc) {\n api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {\n enumerable: true,\n configurable: true,\n get: function () {\n return true;\n }\n });\n var req = new XMLHttpRequest();\n var result = !!req.onreadystatechange;\n // restore original desc\n api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, xhrDesc || {});\n return result;\n }\n else {\n var SYMBOL_FAKE_ONREADYSTATECHANGE_1 = api.symbol('fake');\n api.ObjectDefineProperty(XMLHttpRequestPrototype, ON_READY_STATE_CHANGE, {\n enumerable: true,\n configurable: true,\n get: function () {\n return this[SYMBOL_FAKE_ONREADYSTATECHANGE_1];\n },\n set: function (value) {\n this[SYMBOL_FAKE_ONREADYSTATECHANGE_1] = value;\n }\n });\n var req = new XMLHttpRequest();\n var detectFunc = function () { };\n req.onreadystatechange = detectFunc;\n var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;\n req.onreadystatechange = null;\n return result;\n }\n}\n// Whenever any eventListener fires, we check the eventListener target and all parents\n// for `onwhatever` properties and replace them with zone-bound functions\n// - Chrome (for now)\nfunction patchViaCapturingAllTheEvents(api) {\n var eventNames = api.getGlobalObjects().eventNames;\n var unboundKey = api.symbol('unbound');\n var _loop_1 = function (i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = api.wrapWithCurrentZone(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction registerElementPatch(_global, api) {\n var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;\n if ((!isBrowser && !isMix) || !('registerElement' in _global.document)) {\n return;\n }\n var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, document, 'Document', 'registerElement', callbacks);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\n(function (_global) {\n _global['__zone_symbol__legacyPatch'] = function () {\n var Zone = _global['Zone'];\n Zone.__load_patch('registerElement', function (global, Zone, api) {\n registerElementPatch(global, api);\n });\n Zone.__load_patch('EventTargetLegacy', function (global, Zone, api) {\n eventTargetLegacyPatch(global, api);\n propertyDescriptorLegacyPatch(api, global);\n });\n };\n})(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nvar taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n var setNative = null;\n var clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n var tasksByHandleId = {};\n function scheduleTask(task) {\n var data = task.data;\n function timer() {\n try {\n task.invoke.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n if (!(task.data && task.data.isPeriodic)) {\n if (typeof data.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[data.handleId];\n }\n else if (data.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n data.handleId[taskSymbol] = null;\n }\n }\n }\n }\n data.args[0] = timer;\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) {\n return clearNative(task.data.handleId);\n }\n setNative =\n patchMethod(window, setName, function (delegate) { return function (self, args) {\n if (typeof args[0] === 'function') {\n var options = {\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :\n undefined,\n args: args\n };\n var task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n var handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n }; });\n clearNative =\n patchMethod(window, cancelName, function (delegate) { return function (self, args) {\n var id = args[0];\n var task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n }; });\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCustomElements(_global, api) {\n var _a = api.getGlobalObjects(), isBrowser = _a.isBrowser, isMix = _a.isMix;\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n var callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n var _a = api.getGlobalObjects(), eventNames = _a.eventNames, zoneSymbolEventNames = _a.zoneSymbolEventNames, TRUE_STR = _a.TRUE_STR, FALSE_STR = _a.FALSE_STR, ZONE_SYMBOL_PREFIX = _a.ZONE_SYMBOL_PREFIX;\n // predefine all __zone_symbol__ + eventName + true/false string\n for (var i = 0; i < eventNames.length; i++) {\n var eventName = eventNames[i];\n var falseEventName = eventName + FALSE_STR;\n var trueEventName = eventName + TRUE_STR;\n var symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n var symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n var EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n}\nfunction patchEvent$1(global, api) {\n api.patchEventPrototype(global, api);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nZone.__load_patch('legacy', function (global) {\n var legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n});\nZone.__load_patch('timers', function (global) {\n var set = 'set';\n var clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n});\nZone.__load_patch('requestAnimationFrame', function (global) {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n});\nZone.__load_patch('blocking', function (global, Zone) {\n var blockingMethods = ['alert', 'prompt', 'confirm'];\n for (var i = 0; i < blockingMethods.length; i++) {\n var name_1 = blockingMethods[i];\n patchMethod(global, name_1, function (delegate, symbol, name) {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n});\nZone.__load_patch('EventTarget', function (global, Zone, api) {\n patchEvent$1(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n var XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, [XMLHttpRequestEventTarget.prototype]);\n }\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n patchClass('IntersectionObserver');\n patchClass('FileReader');\n});\nZone.__load_patch('on_property', function (global, Zone, api) {\n propertyDescriptorPatch(api, global);\n propertyPatch();\n});\nZone.__load_patch('customElements', function (global, Zone, api) {\n patchCustomElements(global, api);\n});\nZone.__load_patch('XHR', function (global, Zone) {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n var XHR_TASK = zoneSymbol('xhrTask');\n var XHR_SYNC = zoneSymbol('xhrSync');\n var XHR_LISTENER = zoneSymbol('xhrListener');\n var XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n var XHR_URL = zoneSymbol('xhrURL');\n var XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n var XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n var XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n var oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n var oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n var XMLHttpRequestEventTarget_1 = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget_1) {\n var XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget_1.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n var READY_STATE_CHANGE = 'readystatechange';\n var SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n var data = task.data;\n var target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n var listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n var newListener = target[XHR_LISTENER] = function () {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n var loadTasks = target['__zone_symbol__loadfalse'];\n if (loadTasks && loadTasks.length > 0) {\n var oriInvoke_1 = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n var loadTasks = target['__zone_symbol__loadfalse'];\n for (var i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke_1.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n var storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n var data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n var openNative = patchMethod(XMLHttpRequestPrototype, 'open', function () { return function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n }; });\n var XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n var fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n var fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n var sendNative = patchMethod(XMLHttpRequestPrototype, 'send', function () { return function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n var options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };\n var task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n }; });\n var abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', function () { return function (self, args) {\n var task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n }; });\n }\n});\nZone.__load_patch('geolocation', function (global) {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n});\nZone.__load_patch('PromiseRejectionEvent', function (global, Zone) {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n var eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(function (eventTask) {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n var PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n var evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n})));\n","var map = {\n\t\"./home/home.module\": \"./src/app/home/home.module.ts\"\n};\n\nfunction webpackAsyncContext(req) {\n\treturn Promise.resolve().then(function() {\n\t\tif(!__webpack_require__.o(map, req)) {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t}\n\n\t\tvar id = map[req];\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = \"./src/$$_lazy_route_resource lazy recursive\";\nmodule.exports = webpackAsyncContext;","import { Animation } from '@ionic/core';\n\nexport function myEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise {\n\n const baseAnimation = new AnimationC();\n\n const backdropAnimation = new AnimationC();\n backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));\n\n const wrapperAnimation = new AnimationC();\n wrapperAnimation.addElement(baseEl.querySelector('.modal-wrapper'));\n\n wrapperAnimation\n .fromTo('transform', 'scaleX(0.1) scaleY(0.1)', 'translateX(0%) scaleX(1) scaleY(1)')\n .fromTo('opacity', 0, 1);\n\n backdropAnimation.fromTo('opacity', 0.01, 0.4);\n\n return Promise.resolve(baseAnimation\n .addElement(baseEl)\n .easing('cubic-bezier(0.36,0.66,0.04,1)')\n .duration(400)\n .beforeAddClass('show-modal')\n .add(backdropAnimation)\n .add(wrapperAnimation));\n\n}","import { Animation } from '@ionic/core';\n\n\n//see blog -- https://www.joshmorony.com/create-a-custom-modal-page-transition-animation-in-ionic/\n\nexport function myLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise {\n\n const baseAnimation = new AnimationC();\n\n const backdropAnimation = new AnimationC();\n backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));\n\n const wrapperAnimation = new AnimationC();\n const wrapperEl = baseEl.querySelector('.modal-wrapper');\n wrapperAnimation.addElement(wrapperEl);\n const wrapperElRect = wrapperEl!.getBoundingClientRect();\n\n wrapperAnimation\n .fromTo('transform', 'scaleX(1) scaleY(1)', 'scaleX(0.1) scaleY(0.1)')\n .fromTo('opacity', 1, 0);\n\n backdropAnimation.fromTo('opacity', 0.4, 0.0);\n\n return Promise.resolve(baseAnimation\n .addElement(baseEl)\n .easing('ease-out')\n .duration(400)\n .add(backdropAnimation)\n .add(wrapperAnimation));\n\n}","import { NgModule } from '@angular/core';\nimport { PreloadAllModules, RouterModule, Routes } from '@angular/router';\nimport { SimpleLoadingStrategy } from './SimpleLoadingStrategy';\nimport { AwardMemesComponent } from './incentive/award-memes/award-memes.component';\nimport { DemoAquariumComponent } from './incentive/aquarium/demo-aquarium/demo-aquarium.component';\n//import { SelectiveLoadingStrategy } from './SelectiveLoadingStrategy';\n//import { InitiatedDrinkComponent } from './survey/initiated-drink/initiated-drink.component';\n//import { AwardComponent } from './incentive/award/award.component';\n//import { ActivetaskComponent } from './survey/activetask/activetask.component';\n//import { ActiveTask2Component } from './survey/active-task2/active-task2.component';\n//import { VisualizationComponent } from './incentive/visualization/visualization.component';\n//import { DynamicSurveyComponent } from './survey/dynamic-survey/dynamic-survey.component';\n//import { Q1MotivatedComponent } from './incentive/life-insights/q1-motivated/q1-motivated.component';\n//import { SampleSurveyComponent } from './survey/sample-survey/sample-survey.component';\nimport { SampleLifeInsightsComponent } from './incentive/life-insights/sample-life-insights/sample-life-insights.component';\nimport { TreasurechestComponent } from './incentive/treasurechest/treasurechest.component';\nimport { SampleSurveyComponent } from './survey/sample-survey/sample-survey.component';\nimport { AwardAltruismComponent } from './incentive/award-altruism/award-altruism.component';\nimport { CheatpageComponent } from './incentive/aquarium/cheatpage/cheatpage.component';\nimport { AyaSampleSurveyComponent } from './survey/aya-sample-survey/aya-sample-survey.component';\nimport { AuthGuard } from './user/auth/auth.guard';\nimport { AuthComponent } from './user/auth/auth.component';\nimport { InfoPageComponent } from './incentive/info-page/info-page.component';\nimport { ContactComponent } from './home/contact/contact.component';\nimport { FishbowlComponent } from './incentive/aquarium/previews/fishbowl/fishbowl.component';\nimport { SeaComponent } from './incentive/aquarium/previews/sea/sea.component';\nimport { TundraComponent } from './incentive/aquarium/previews/tundra/tundra.component';\nimport { RainforestComponent } from './incentive/aquarium/previews/rainforest/rainforest.component';\nimport { HarvardSurveyComponent } from './survey/harvard-survey/harvard-survey.component';\nimport { FrontPageComponent } from './intervention/harvard-arc-apps/front-page/front-page.component';\nimport { VideoInfoPageComponent } from './incentive/video-info-page/video-info-page.component';\nimport { SamplePythonViewComponent } from './incentive/life-insights/sample-python-view/sample-python-view.component';\nimport { SleepSurveyComponent } from './survey/sleep-survey/sleep-survey.component';\n\n\nconst routes: Routes = [\n \n /* \n { path: '', redirectTo: 'home', pathMatch: 'full' },\n { path: 'home', loadChildren: './home/home.module#HomePageModule' },\n { path: 'survey/initated-drink', component: InitiatedDrinkComponent },\n { path: 'survey/activetask', component: ActivetaskComponent },\n { path: 'survey/activetask2', component: ActiveTask2Component },\n { path: 'survey/dynamicsurvey', component: DynamicSurveyComponent }, \n { path: 'survey/samplesurvey', component: SampleSurveyComponent }, \n { path: 'incentive/award', component: AwardComponent },\n { path: 'incentive/award-memes', component: AwardMemesComponent },\n { path: 'incentive/visualization', component: VisualizationComponent},\n { path: 'incentive/aquariumone', component: DemoAquariumComponent }, \n { path: 'life-insight/q1lifeinsight', component: Q1MotivatedComponent },\n */\n \n { path: '', redirectTo: 'home', pathMatch: 'full', canActivate: [AuthGuard]},\n {path: 'auth', component: AuthComponent}, \n { path: 'home', loadChildren: './home/home.module#HomePageModule', canActivate: [AuthGuard]},\n //{ path: 'home', component: DemoAquariumComponent, canActivate: [AuthGuard]},\n { path: 'incentive/sample-life-insight', component: SampleLifeInsightsComponent, canActivate: [AuthGuard]},\n { path: 'incentive/treasurechest', component: TreasurechestComponent, canActivate: [AuthGuard]},\n { path: 'incentive/cheatpoints', component: CheatpageComponent, canActivate: [AuthGuard]},\n { path: 'survey/samplesurvey', component: SampleSurveyComponent, canActivate: [AuthGuard]}, \n { path: 'survey/samplesurvey2', component: AyaSampleSurveyComponent, canActivate: [AuthGuard]}, \n { path: 'survey/harvardsurvey', component: HarvardSurveyComponent, canActivate: [AuthGuard]}, \n { path: 'survey/sleepsurvey', component: SleepSurveyComponent, canActivate: [AuthGuard]},\n { path: 'intervention/arcappsfrontpage', component: FrontPageComponent, canActivate: [AuthGuard]}, \n { path: 'incentive/aquariumone', component: DemoAquariumComponent, canActivate: [AuthGuard]},\n { path: 'incentive/award-memes', component: AwardMemesComponent, canActivate: [AuthGuard]},\n { path: 'incentive/award-altruism', component: AwardAltruismComponent, canActivate: [AuthGuard]},\n { path: 'incentive/pythonlifeinsightsammple', component: SamplePythonViewComponent, canActivate: [AuthGuard]},\n { path: 'contact-study-staff', component: ContactComponent, canActivate: [AuthGuard]},\n { path: 'incentive/infopage', component: InfoPageComponent, canActivate: [AuthGuard]},\n { path: 'incentive/videoinfopage', component: VideoInfoPageComponent, canActivate: [AuthGuard]},\n { path: 'preview/fishbowl', component: FishbowlComponent, canActivate: [AuthGuard]},\n { path: 'preview/sea', component: SeaComponent, canActivate: [AuthGuard]},\n { path: 'preview/tundra', component: TundraComponent, canActivate: [AuthGuard]},\n { path: 'preview/rainforest', component: RainforestComponent, canActivate: [AuthGuard]}\n\n //{ path: 'incentive/award-memes', component: AwardMemesComponent },\n //{ path: 'incentive/aquariumone', component: DemoAquariumComponent }, \n /*\n { \n path: 'survey', \n //loadChildren: () => import('./survey/survey.module').then(mod => mod.SurveyModule)\n loadChildren: './survey/survey.module#SurveyModule',\n data: {\n //name: 'survey'\n preload: false\n }\n }, \n */\n /*\n { \n path: 'incentive/aquarium', \n loadChildren: './incentive/aquarium/aquarium.module#AquariumModule',\n data: {\n //name: 'survey'\n preload: true\n } \n }, \n */\n /*\n { \n path: 'incentive', \n loadChildren: './incentive/incentive.module#IncentiveModule',\n data: {\n //name: 'survey'\n preload: true\n } \n }\n */\n\n // { path: 'incentive/life-insights', \n // loadChildren: './incentive/life-insights/life-insights.module#LifeInsightsModule',\n // data: {\n // //name: 'life-insights'\n // preload: true\n // } \n // }, \n\n\n];\n\n\n@NgModule({\n imports: [\n RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })\n ],\n exports: [RouterModule]\n})\n\n/*\n@NgModule({\n providers: [\n SimpleLoadingStrategy\n //SelectiveLoadingStrategy\n ],\n imports: [\n //RouterModule.forRoot(routes)\n RouterModule.forRoot(routes, { preloadingStrategy: SimpleLoadingStrategy })\n ],\n exports: [RouterModule]\n})\n*/\nexport class AppRoutingModule { }\n","import { Component } from '@angular/core';\n\nimport { Platform, NavController } from '@ionic/angular';\nimport { SplashScreen } from '@ionic-native/splash-screen/ngx';\nimport { StatusBar } from '@ionic-native/status-bar/ngx';\nimport { OneSignalService } from './notification/one-signal.service';\n\nimport { environment } from '../environments/environment';\nimport { Router, RouterEvent, RouteConfigLoadStart, RouteConfigLoadEnd, NavigationStart, NavigationEnd } from '@angular/router';\n\nimport { LoadingController } from '@ionic/angular';\nimport { UserProfileService } from './user/user-profile/user-profile.service';\nimport { AuthService } from './user/auth/auth.service';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-root',\n templateUrl: 'app.component.html'\n})\nexport class AppComponent {\n public isShowingRouteLoadIndicator: boolean;\n loading;\n // isLoading = true;\n\n isAYA: boolean;\n\n get username(){\n if(this.userProfileService == undefined){\n //console.log(\"--userProfileService--: \" + JSON.stringify(this.userProfileService));\n return \"test\";\n }\n else if(this.userProfileService == null){\n //console.log(\"--userProfileService--: \" + JSON.stringify(this.userProfileService));\n return \"test\";\n }\n else{\n //console.log(\"User profile -- username -- called from here\");\n //console.log(\"--userProfileService--: \" + JSON.stringify(this.userProfileService));\n return this.userProfileService.username;\n }\n }\n\n constructor(\n private router: Router, \n private platform: Platform,\n private splashScreen: SplashScreen,\n private statusBar: StatusBar,\n private oneSignalService: OneSignalService,\n private authService: AuthService,\n private userProfileService: UserProfileService,\n public loadingController: LoadingController,\n public navController: NavController\n ) {\n this.initializeApp();\n\n this.isAYA = true;\n\n router.events.subscribe(\n\t\t\t( event: RouterEvent ) : void => {\n\n //this.isShowingRouteLoadIndicator = false;\n var asyncLoadCount = 0;\n\n \n\t\t\t\tif ( event instanceof RouteConfigLoadStart ) {\n asyncLoadCount++;\n console.log(\"Routing started\");\n //console.log(event);\n //this.survey_text = \"Loading Survey\";\n console.log(event.route.path);\n\n // if(event.route.path == \"survey\")\n // this.showLaoding();\n\n\t\t\t\t} else if ( event instanceof RouteConfigLoadEnd ) {\n asyncLoadCount--;\n console.log(\"Routing ended\");\n console.log(event.route.path);\n\n // if(event.route.path == \"survey\")\n // this.dismissLoading();\n\n //console.log(event);\n //this.survey_text = \"Start survey\";\n //console.log(this.router.url);\n\t\t\t\t} else if ( event instanceof NavigationStart ) {\n console.log(\"Navigation started\");\n //this.survey_text = \"Start survey\";\n\t\t\t\t} else if ( event instanceof NavigationEnd ) {\n asyncLoadCount--;\n console.log(\"Navigation ended\");\n //this.survey_text = \"Start survey\";\n\t\t\t\t}\n\n\t\t\t\t// If there is at least one pending asynchronous config load request,\n\t\t\t\t// then let's show the loading indicator.\n\t\t\t\t// --\n\t\t\t\t// CAUTION: I'm using CSS to include a small delay such that this loading\n\t\t\t\t// indicator won't be seen by people with sufficiently fast connections.\n\t\t\t\tthis.isShowingRouteLoadIndicator = !! asyncLoadCount;\n\n\t\t\t}\n\t\t);\n }\n\n agreeToTerms: boolean = JSON.parse(localStorage.getItem(\"agreeToTerms\"));\n private userSub: Subscription;\n\n ngOnInit(){\n }\n\n ngOnDestroy(){\n if(this.userSub){\n this.userSub.unsubscribe();\n }\n }\n\n initializeApp() {\n //disable back button\n this.platform.ready().then(() => {\n this.platform.backButton.subscribeWithPriority(9999, () => {\n document.addEventListener('backbutton', function (event) {\n event.preventDefault();\n event.stopPropagation();\n console.log('hello');\n }, false);\n });\n this.statusBar.styleDefault();\n });\n\n\n\n\n if(this.authService.isLoggedIn()){\n this.userProfileService.loadProfileFromDevice();\n // this.isLoading = false;\n\n // get up to date userProfileFixed - to see if isActive has changed\n this.userProfileService.fetchUserProfileFixed().subscribe(response=>{\n if(response.changed){\n // there was a change to isActive\n // accessible via\n // this.userProfileService.isActive\n }\n });\n\n // fetch a copy from server of userProfile to see if it's newer \n this.userProfileService.fetchUserProfile().subscribe(response=>{\n if(response.serverCopyNewer){\n // the server copy of the userProfile was newer (and has been updated locally)\n // accessible via\n // this.userProfileService.userProfile\n }\n });\n\n }\n\n else {\n // not logged in; so do nothing\n // should be routed via the authguard to the login screen\n // after login occurs we should load the 'user-profile' and 'user-profile-fixed' - which happens via the auth.component\n }\n\n this.platform.ready().then(() => {\n //this.statusBar.styleDefault();\n\n // let status bar overlay webview\n //this.statusBar.overlaysWebView(true);\n // set status bar to white\n //this.statusBar.backgroundColorByHexString('#ffffff');\n\n if(this.platform.is('android')) {\n this.statusBar.styleLightContent();\n this.statusBar.backgroundColorByHexString(\"#004166\");\n }\n\n this.splashScreen.hide();\n this.oneSignalService.initOneSignal();\n\n //sidebar update.\n if((this.userProfileService != undefined) && (this.userProfileService.isParent == true))\n this.isAYA = false;\n \n\n });\n //window.localStorage.setItem(\"TotalPoints\", \"0\");\n\n // let status bar overlay webview\n //this.statusBar.overlaysWebView(true);\n\n // set status bar to white\n //this.statusBar.backgroundColorByHexString('#ffffff');\n\n\n }\n\n async showLoading(){\n this.loading = await this.loadingController.create({\n message: \"Loading...\",\n spinner: \"lines\",\n duration: 5000\n });\n\n this.loading.onDidDismiss(() => {\n console.log('Dismissed loading after 5 seconds');\n });\n\n this.loading.present();\n }\n\n async dismissLoading(){\n this.loading.dismiss();\n }\n\n async presentLoading() {\n const loading = await this.loadingController.create({\n message: 'Hellooo',\n duration: 2000\n });\n await loading.present();\n\n const { role, data } = await loading.onDidDismiss();\n\n console.log('Loading dismissed!');\n }\n\n async presentLoadingWithOptions() {\n const loading = await this.loadingController.create({\n spinner: null,\n duration: 5000,\n message: 'Please wait...',\n translucent: true,\n cssClass: 'custom-class custom-loading'\n });\n return await loading.present();\n }\n\n //\n async showPreviewOfFishBowl(){\n this.navController.navigateRoot(['/preview/fishbowl']);\n }\n\n async showPreviewOfSea(){\n this.navController.navigateRoot(['/preview/sea']);\n }\n\n async showPreviewOfTundra(){\n this.navController.navigateRoot(['/preview/tundra']);\n }\n\n async showPreviewOfRainforest(){\n this.navController.navigateRoot(['/preview/rainforest']);\n }\n\n}\n","import { NgModule, ErrorHandler } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouteReuseStrategy } from '@angular/router';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { BlobModule } from 'angular-azure-blob-service';\nimport { IonicModule, IonicRouteStrategy } from '@ionic/angular';\nimport { SplashScreen } from '@ionic-native/splash-screen/ngx';\nimport { StatusBar } from '@ionic-native/status-bar/ngx';\nimport { OneSignal } from '@ionic-native/onesignal/ngx';\nimport { Injector } from '@angular/core';\nimport { SQLitePorter } from '@ionic-native/sqlite-porter/ngx';\nimport { SQLite } from '@ionic-native/sqlite/ngx';\n\n\nimport { AppComponent } from './app.component';\nimport { AppRoutingModule } from './app-routing.module';\nimport { NotificationModule } from './notification/notification.module';\nimport { IncentiveModule } from './incentive/incentive.module';\nimport { LifeInsightsModule } from './incentive/life-insights/life-insights.module';\nimport { SurveyModule } from './survey/survey.module';\nimport { AquariumModule } from './incentive/aquarium/aquarium.module';\nimport { FormsModule } from '@angular/forms';\nimport { CheatpageComponent } from './incentive/aquarium/cheatpage/cheatpage.component';\nimport { UserModule } from './user/user.module';\nimport { HomePageModule } from './home/home.module';\nimport { AwardDollarService } from './incentive/award-money/award-dollar.service';\nimport { AppVersion } from '@ionic-native/app-version/ngx';\nimport { StoreModule } from '@ngrx/store';\nimport { reducers, metaReducers } from './reducers';\nimport { StoreDevtoolsModule } from '@ngrx/store-devtools';\nimport { environment } from '../environments/environment';\nimport {EffectsModule} from '@ngrx/effects';\nimport { MobileAccessibility } from '@ionic-native/mobile-accessibility/ngx';\nimport { InterventionModule } from './intervention/intervention.module';\n\n\n@NgModule({\n declarations: [AppComponent,CheatpageComponent],\n entryComponents: [CheatpageComponent],\n imports: [\n BrowserModule, \n IonicModule.forRoot(), \n AppRoutingModule,\n SurveyModule,\n LifeInsightsModule,\n IncentiveModule,\n NotificationModule,\n HttpClientModule,\n AquariumModule,\n FormsModule,\n UserModule,\n HomePageModule,\n InterventionModule,\n BlobModule.forRoot(),\n //this ngrx import\n StoreModule.forRoot(reducers, {\n metaReducers,\n runtimeChecks: {\n strictStateImmutability: true,\n strictActionImmutability: true\n }\n }),\n //dev tool maxAge 25 versions of the data\n StoreDevtoolsModule.instrument({ maxAge: 25, logOnly: environment.production }),\n EffectsModule.forRoot([])\n ],\n providers: [\n StatusBar,\n SplashScreen,\n OneSignal,\n AwardDollarService,\n AppVersion,\n MobileAccessibility,\n SQLite,\n SQLitePorter,\n { provide: RouteReuseStrategy, useClass: IonicRouteStrategy}\n //,\n //{provide: ErrorHandler, useClass: GlobalErrorHandler}\n ],\n bootstrap: [AppComponent]\n})\n\nexport class AppModule {\n static injector: Injector;\n constructor(private injector: Injector) {\n AppModule.injector = injector;\n }\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaG9tZS9jb250YWN0L2NvbnRhY3QuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL2hvbWUvY29udGFjdC9jb250YWN0LmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */\"","import { Component, OnInit } from '@angular/core';\nimport { MenuController } from '@ionic/angular';\nimport { DatabaseService } from 'src/app/monitor/database.service';\nimport { MobileAccessibility } from '@ionic-native/mobile-accessibility/ngx';\n\n@Component({\n selector: 'app-contact',\n templateUrl: './contact.component.html',\n styleUrls: ['./contact.component.css']\n})\nexport class ContactComponent implements OnInit {\n\n constructor(private menuCtrl:MenuController,\n private mobileAccessibility: MobileAccessibility,\n private appUsageDb: DatabaseService) { }\n\n ngOnInit() {\n //this.mobileAccessibility.usePreferredTextZoom(false);\n this.menuCtrl.close();\n }\n\n ionViewDidEnter(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.appUsageDb.saveAppUsageEnter(\"study_contact_info_page\"); \n } \n\n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n //this.mobileAccessibility.usePreferredTextZoom(true);\n this.appUsageDb.saveAppUsageExit(\"study_contact_info_page\"); \n }\n\n}\n","module.exports = \".navbar {\\n min-height: 30px;\\n background-color: #3c9ce7;\\n padding: 0px;\\n}\\n.navbar .navbar-brand {\\n color: #ecf0f1;\\n}\\n.navbar .navbar-brand:hover, .navbar .navbar-brand:focus {\\n color: #f9efa0;\\n}\\n.navbar .navbar-text {\\n color: #ecf0f1;\\n}\\n.navbar .navbar-text a {\\n color: #f9efa0;\\n}\\n.navbar .navbar-text a:hover, .navbar .navbar-text a:focus {\\n color: #f9efa0;\\n}\\n.navbar .navbar-nav .nav-link {\\n color: #ecf0f1;\\n border-radius: 0.25rem;\\n margin: 0 0.25em;\\n}\\n.navbar .navbar-nav .nav-link:not(.disabled):hover, .navbar .navbar-nav .nav-link:not(.disabled):focus {\\n color: #f9efa0;\\n}\\n.navbar .navbar-nav .nav-item.active .nav-link, .navbar .navbar-nav .nav-item.active .nav-link:hover, .navbar .navbar-nav .nav-item.active .nav-link:focus, .navbar .navbar-nav .nav-item.show .nav-link, .navbar .navbar-nav .nav-item.show .nav-link:hover, .navbar .navbar-nav .nav-item.show .nav-link:focus {\\n color: #f9efa0;\\n background-color: #477fd9;\\n}\\n.navbar .navbar-toggle {\\n border-color: #477fd9;\\n}\\n.navbar .navbar-toggle:hover, .navbar .navbar-toggle:focus {\\n background-color: #477fd9;\\n}\\n.navbar .navbar-toggle .navbar-toggler-icon {\\n color: #ecf0f1;\\n}\\n.navbar .navbar-collapse,\\n.navbar .navbar-form {\\n border-color: #ecf0f1;\\n}\\n.navbar .navbar-link {\\n color: #ecf0f1;\\n}\\n.navbar .navbar-link:hover {\\n color: #f9efa0;\\n}\\n@media (max-width: 575px) {\\n .navbar-expend-sm .navbar-nav .show .dropdown-menu .dropdown-item {\\n color: #ecf0f1;\\n }\\n .navbar-expend-sm .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend-sm .navbar-nav .show .dropdown-menu .dropdown-item:focus {\\n color: #f9efa0;\\n }\\n .navbar-expend-sm .navbar-nav .show .dropdown-menu .dropdown-item.active {\\n color: #f9efa0;\\n background-color: #477fd9;\\n }\\n}\\n@media (max-width: 767px) {\\n .navbar-expend-md .navbar-nav .show .dropdown-menu .dropdown-item {\\n color: #ecf0f1;\\n }\\n .navbar-expend-md .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend-md .navbar-nav .show .dropdown-menu .dropdown-item:focus {\\n color: #f9efa0;\\n }\\n .navbar-expend-md .navbar-nav .show .dropdown-menu .dropdown-item.active {\\n color: #f9efa0;\\n background-color: #477fd9;\\n }\\n}\\n@media (max-width: 991px) {\\n .navbar-expend-lg .navbar-nav .show .dropdown-menu .dropdown-item {\\n color: #ecf0f1;\\n }\\n .navbar-expend-lg .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend-lg .navbar-nav .show .dropdown-menu .dropdown-item:focus {\\n color: #f9efa0;\\n }\\n .navbar-expend-lg .navbar-nav .show .dropdown-menu .dropdown-item.active {\\n color: #f9efa0;\\n background-color: #477fd9;\\n }\\n}\\n@media (max-width: 1199px) {\\n .navbar-expend-xl .navbar-nav .show .dropdown-menu .dropdown-item {\\n color: #ecf0f1;\\n }\\n .navbar-expend-xl .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend-xl .navbar-nav .show .dropdown-menu .dropdown-item:focus {\\n color: #f9efa0;\\n }\\n .navbar-expend-xl .navbar-nav .show .dropdown-menu .dropdown-item.active {\\n color: #f9efa0;\\n background-color: #477fd9;\\n }\\n}\\n.navbar-expend .navbar-nav .show .dropdown-menu .dropdown-item {\\n color: #ecf0f1;\\n}\\n.navbar-expend .navbar-nav .show .dropdown-menu .dropdown-item:hover, .navbar-expend .navbar-nav .show .dropdown-menu .dropdown-item:focus {\\n color: #f9efa0;\\n}\\n.navbar-expend .navbar-nav .show .dropdown-menu .dropdown-item.active {\\n color: #f9efa0;\\n background-color: #477fd9;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaG9tZS9oZWFkZXIvaGVhZGVyLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9ob21lL2hlYWRlci9oZWFkZXIuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0E7RUFDRSxnQkFBQTtFQUNBLHlCQVBnQjtFQVFoQixZQUFBO0FDSkY7QURLRTtFQUNFLGNBUmM7QUNLbEI7QURJSTtFQUNFLGNBVFk7QUNPbEI7QURHRTtFQUNFLGNBWmM7QUNXbEI7QURFSTtFQUNFLGNBYlk7QUNhbEI7QURDTTtFQUNFLGNBZlU7QUNnQmxCO0FEQ0k7RUFDRSxjQW5CWTtFQW9CWixzQkFBQTtFQUNBLGdCQUFBO0FDQ047QURDUTtFQUNFLGNBdkJRO0FDd0JsQjtBRFlNO0VBQ0UsY0FyQ1U7RUFzQ1YseUJBeENVO0FDOEJsQjtBRFdFO0VBQ0UscUJBMUNjO0FDaUNs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diAuc2hvdyAuZHJvcGRvd24tbWVudSAuZHJvcGRvd24taXRlbTpob3ZlciwgLm5hdmJhci1leHBlbmQteGwgLm5hdmJhci1uYXYgLnNob3cgLmRyb3Bkb3duLW1lbnUgLmRyb3Bkb3duLWl0ZW06Zm9jdXMge1xuICAgIGNvbG9yOiAjZjllZmEwO1xuICB9XG4gIC5uYXZiYXItZXhwZW5kLXhsIC5uYXZiYXItbmF2IC5zaG93IC5kcm9wZG93bi1tZW51IC5kcm9wZG93bi1pdGVtLmFjdGl2ZSB7XG4gICAgY29sb3I6ICNmOWVmYTA7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogIzQ3N2ZkOTtcbiAgfVxufVxuLm5hdmJhci1leHBlbmQgLm5hdmJhci1uYXYgLnNob3cgLmRyb3Bkb3duLW1lbnUgLmRyb3Bkb3duLWl0ZW0ge1xuICBjb2xvcjogI2VjZjBmMTtcbn1cbi5uYXZiYXItZXhwZW5kIC5uYXZiYXItbmF2IC5zaG93IC5kcm9wZG93bi1tZW51IC5kcm9wZG93bi1pdGVtOmhvdmVyLCAubmF2YmFyLWV4cGVuZCAubmF2YmFyLW5hdiAuc2hvdyAuZHJvcGRvd24tbWVudSAuZHJvcGRvd24taXRlbTpmb2N1cyB7XG4gIGNvbG9yOiAjZjllZmEwO1xufVxuLm5hdmJhci1leHBlbmQgLm5hdmJhci1uYXYgLnNob3cgLmRyb3Bkb3duLW1lbnUgLmRyb3Bkb3duLWl0ZW0uYWN0aXZlIHtcbiAgY29sb3I6ICNmOWVmYTA7XG4gIGJhY2tncm91bmQtY29sb3I6ICM0NzdmZDk7XG59Il19 */\"","import { Component, OnInit, OnDestroy } from '@angular/core';\nimport { AuthService } from 'src/app/user/auth/auth.service';\nimport { Subscription } from 'rxjs';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'app-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n})\nexport class HeaderComponent implements OnInit, OnDestroy {\n isAuthenticated = false;\n private userSub: Subscription;\n collapsed = true;\n\n constructor(private authService: AuthService, \n private router: Router) { }\n \n \n // onTestButtonClicked(){\n // this.userProfileService.initialize();\n // this.userProfileService.saveToServer();\n // }\n\n onLogout(){\n this.authService.logout();\n this.router.navigate(['/auth']);\n }\n\n ngOnInit(){\n this.userSub= this.authService.loggedInUser.subscribe(loggedInUser => {\n this.isAuthenticated = this.authService.isLoggedIn();\n console.log(!loggedInUser);\n });\n this.authService.autoLogin();\n }\n\n ngOnDestroy(){\n this.userSub.unsubscribe();\n }\n\n get userName(){\n return this.authService.loggedInUser.getValue();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { HomePage } from './home.page';\nimport { AquariumComponent } from '../incentive/aquarium/aquarium.component';\nimport { UnlockedMemesComponent } from '../incentive/unlocked-memes/unlocked-memes.component';\nimport { UnlockedAltuisticMessagesComponent } from '../incentive/unlocked-altuistic-messages/unlocked-altuistic-messages.component';\nimport { AuthGuard } from '../user/auth/auth.guard';\nimport { ContactComponent } from './contact/contact.component';\nimport { UnlockedInspirationalQuotesComponent } from '../incentive/unlocked-inspirational-quotes/unlocked-inspirational-quotes.component';\nimport { SamplePythonViewComponent } from '../incentive/life-insights/sample-python-view/sample-python-view.component';\n\nconst routes: Routes = [\n {\n path: 'home',\n component: HomePage,\n children: [\n {\n path: 'incentive', component: AquariumComponent, canActivate: [AuthGuard]\n },\n {\n path: 'quotes', component: UnlockedInspirationalQuotesComponent, canActivate: [AuthGuard]\n },\n {\n path: 'memes', component: UnlockedMemesComponent, canActivate: [AuthGuard]\n },\n {\n path: 'thankyous', component: UnlockedAltuisticMessagesComponent, canActivate: [AuthGuard]\n },\n {\n path: 'lifeinsight', component: SamplePythonViewComponent, canActivate: [AuthGuard]\n },\n {\n path: 'contact', component: ContactComponent, canActivate: [AuthGuard]\n },\n {\n path: '',\n redirectTo: '/home/incentive',\n pathMatch: 'full'\n }\n ]\n },\n {\n path: '',\n redirectTo: '/home/incentive',\n pathMatch: 'full'\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class HomeRoutingModule {}","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IonicModule } from '@ionic/angular';\nimport { FormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { HomePage } from './home.page';\nimport { AquariumModule } from '../incentive/aquarium/aquarium.module';\nimport { HeaderComponent } from './header/header.component';\nimport { TermsOfServiceComponent } from './terms-of-service/terms-of-service.component';\nimport { HomeRoutingModule } from './home-routing.module';\nimport { ContactComponent } from './contact/contact.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n IonicModule,\n AquariumModule,\n HomeRoutingModule,\n RouterModule.forChild([\n {\n path: '',\n component: HomePage\n }\n ])\n ],\n declarations: [HomePage, HeaderComponent, TermsOfServiceComponent, ContactComponent],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n exports:[TermsOfServiceComponent]\n})\nexport class HomePageModule {}\n","module.exports = \".new-background-color {\\n --background: #005486;\\n}\\n\\nion-tab-button.tab-selected ion-icon {\\n color: #fff !important;\\n --ion-color-base: #fff !important;\\n width: 50%;\\n height: 50%;\\n}\\n\\nion-tab-button.tab-selected ion-label {\\n color: #fff !important;\\n --ion-color-base: #fff !important;\\n}\\n\\nion-tab-button ion-icon {\\n width: 40%;\\n height: 40%;\\n color: #ccecff !important;\\n --ion-color-base: #ccecff !important;\\n}\\n\\nion-tab-button ion-label {\\n color: #ccecff !important;\\n --ion-color-base: #ccecff !important;\\n}\\n\\n/*\\n\\n.tab-btn-selected, .tab-btn:hover {\\n color: #e6f6ff;\\n}\\n\\n\\n\\nion-tab-button:focus {\\n ion-icon {\\n width: 60%;\\n height: 60%;\\n color: #fff !important;\\n }\\n}\\n*/\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9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bXBvcnRhbnQ7XG59XG5cbmlvbi10YWItYnV0dG9uIGlvbi1pY29uIHtcbiAgd2lkdGg6IDQwJTtcbiAgaGVpZ2h0OiA0MCU7XG4gIGNvbG9yOiAjY2NlY2ZmICFpbXBvcnRhbnQ7XG4gIC0taW9uLWNvbG9yLWJhc2U6ICNjY2VjZmYgIWltcG9ydGFudDtcbn1cblxuaW9uLXRhYi1idXR0b24gaW9uLWxhYmVsIHtcbiAgY29sb3I6ICNjY2VjZmYgIWltcG9ydGFudDtcbiAgLS1pb24tY29sb3ItYmFzZTogI2NjZWNmZiAhaW1wb3J0YW50O1xufVxuXG4vKlxuXG4udGFiLWJ0bi1zZWxlY3RlZCwgLnRhYi1idG46aG92ZXIge1xuICAgIGNvbG9yOiAjZTZmNmZmO1xufVxuXG5cblxuaW9uLXRhYi1idXR0b246Zm9jdXMge1xuICAgIGlvbi1pY29uIHtcbiAgICAgICAgd2lkdGg6IDYwJTtcbiAgICAgICAgaGVpZ2h0OiA2MCU7XG4gICAgICAgIGNvbG9yOiAjZmZmICFpbXBvcnRhbnQ7XG4gICAgfVxufVxuKi8iXX0= */\"","import { Component, OnInit, ViewChild} from '@angular/core';\nimport { AquariumComponent } from '../incentive/aquarium/aquarium.component';\nimport { UserProfileService } from '../user/user-profile/user-profile.service';\n\n\n@Component({\n selector: 'app-home',\n templateUrl: 'home.page.html',\n styleUrls: ['home.page.scss'],\n})\n\nexport class HomePage implements OnInit {\n\n isAYA: boolean;\n\n @ViewChild(AquariumComponent, {static: true}) child;\n\n constructor(\n private userProfileService: UserProfileService) { \n\n this.isAYA = true;\n if(this.userProfileService.isParent == true)\n this.isAYA = false;\n\n }\n\n ngOnInit(): void {\n }\n\n ionViewDidEnter(){\n console.log(\"ionViewDidEnterFunction\");\n //this.child.ionViewDidEnterFunction();\n }\n\n\n ionViewDidLeave(){\n console.log(\"ionViewDidLeaveFunction\");\n //this.child.ionViewDidLeaveFunction();\n }\n\n}\n","module.exports = \":host {\\n display: inline-block;\\n height: 85%;\\n}\\n\\n.new-background-color {\\n --background: #3F51B5;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaG9tZS90ZXJtcy1vZi1zZXJ2aWNlL3Rlcm1zLW9mLXNlcnZpY2UuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2hvbWUvdGVybXMtb2Ytc2VydmljZS90ZXJtcy1vZi1zZXJ2aWNlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ1EscUJBQUE7RUFDQSxXQUFBO0FDQ1I7O0FERUE7RUFDUSxxQkFBQTtBQ0NSIiwiZmlsZSI6InNyYy9hcHAvaG9tZS90ZXJtcy1vZi1zZXJ2aWNlL3Rlcm1zLW9mLXNlcnZpY2UuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdHtcbiAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgICAgICBoZWlnaHQ6IDg1JTtcbn1cblxuLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgICAgICAtLWJhY2tncm91bmQ6ICMzRjUxQjU7XG59XG5cbiIsIjpob3N0IHtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBoZWlnaHQ6IDg1JTtcbn1cblxuLm5ldy1iYWNrZ3JvdW5kLWNvbG9yIHtcbiAgLS1iYWNrZ3JvdW5kOiAjM0Y1MUI1O1xufSJdfQ== */\"","import { Component, OnInit } from '@angular/core';\n// import { Router } from '@angular/router';\n\n@Component({\n selector: 'app-terms-of-service',\n templateUrl: './terms-of-service.component.html',\n styleUrls: ['./terms-of-service.component.scss'],\n})\nexport class TermsOfServiceComponent implements OnInit {\n agreeToTerms: boolean = JSON.parse(localStorage.getItem(\"agreeToTerms\"));\n\n constructor() { }\n\n ngOnInit() {}\n\n onSubmit(){\n localStorage.setItem(\"agreeToTerms\",this.agreeToTerms.toString());\n location.reload();\n }\n}\n","import * as IncentiveActions from './incentive.actions';\n\nexport {IncentiveActions};","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n\\n\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL2FxdWFyaXVtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvYXF1YXJpdW0vYXF1YXJpdW0uY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59XG5cblxuIl19 */\"","import { Component, ViewChild, OnInit } from '@angular/core';\nimport { DemoAquariumComponent } from '../../incentive/aquarium/demo-aquarium/demo-aquarium.component';\nimport { Platform, AlertController, ModalController, NavController, MenuController } from '@ionic/angular';\nimport * as moment from 'moment';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { UserProfileService } from '../../user/user-profile/user-profile.service';\nimport { myEnterAnimation } from '../../animations/modal_enter';\nimport { ModalUnlockedPageComponent } from '../../incentive/aquarium/modal-unlocked-page/modal-unlocked-page.component';\nimport { myLeaveAnimation } from '../../animations/modal_leave';\nimport { AppState } from '../../reducers';\nimport { Store, select } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { isIncentivesUnlockedForTheDay } from '../../incentive/incentive.selectors';\nimport { UnlockedIncentive } from '../../incentive/model/unlocked-incentives';\nimport { unlockedScreenShownAlready } from '../incentive.actions';\nimport { DatabaseService } from 'src/app/monitor/database.service';\nimport { AwsS3Service } from '../../storage/aws-s3.service';\nimport { HttpClient } from '@angular/common/http';\nimport { environment } from '../../../environments/environment';\n\n@Component({\n selector: 'app-aquarium',\n templateUrl: './aquarium.component.html',\n styleUrls: ['./aquarium.component.css']\n})\nexport class AquariumComponent implements OnInit {\n\n private sub1$:any;\n private sub2$:any;\n money = 0;\n modalObjectNavigationExtras = {};\n pageTitle = \"Aquarium\";\n aware_id = \"Not found\";\n\n @ViewChild(DemoAquariumComponent, {static: true}) child;\n\n unlockedItems$: Observable;\n modalDataSubscription$: any;\n title = \"\";\n isIOS = false;\n navigate : any;\n\n\n get isActive(){\n //return false;\n if(this.userProfileService == undefined)\n return true;\n else\n return this.userProfileService.isActive;\n }\n\n startCheatPage(){\n //this.router.navigate(['incentive/tundra']);\n this.navController.navigateRoot(['incentive/cheatpoints']);\n }\n\n startInfoPage(){\n this.navController.navigateRoot(['incentive/infopage']);\n }\n\n constructor(private platform: Platform, private alertCtrl: AlertController, \n private router: Router, \n private route: ActivatedRoute, \n private modalController: ModalController,\n private store: Store,\n public navController: NavController,\n private menu: MenuController,\n private appUsageDb: DatabaseService,\n private awsS3Service: AwsS3Service,\n private userProfileService: UserProfileService,\n private httpClient: HttpClient) { \n console.log(\"Constructor called\");\n this.sub1$=this.platform.pause.subscribe(() => { \n console.log('****UserdashboardPage PAUSED****');\n this.child.pauseGameRendering();\n }); \n this.sub2$=this.platform.resume.subscribe(() => { \n console.log('****UserdashboardPage RESUMED****');\n this.child.resumeGameRendering();\n });\n\n\n if(window.localStorage['AwardDollar'] == undefined)\n this.money = 0;\n else{\n try{\n this.money = parseInt(window.localStorage['AwardDollar']);\n }catch(error){\n window.localStorage.setItem(\"AwardDollar\", \"\"+0); \n this.money = 0;\n }\n }\n\n if(this.platform.is('ios')){\n this.isIOS=true;\n }\n\n this.sideMenu();\n\n }\n\n sideMenu()\n {\n this.navigate =\n [\n {\n title : \"Home\",\n url : \"/home\",\n icon : \"home\"\n },\n {\n title : \"Chat\",\n url : \"/chat\",\n icon : \"chatboxes\"\n },\n {\n title : \"Contacts\",\n url : \"/contacts\",\n icon : \"contacts\"\n },\n ]\n }\n\n //show side menu\n showSideMenu() {\n console.log(\"side menu called\");\n this.menu.enable(true, 'first');\n this.menu.open('first');\n }\n\n ionViewDidLeaveFunction(){\n this.child.ionViewDidLeaveFunction();\n\n //unsubscribe from model view.\n this.modalDataSubscription$.unsubscribe();\n }\n\n ionViewDidLeave() {\n console.log(\"aqarium.ts --- ionDidLeave\");\n this.ionViewDidLeaveFunction();\n\n //If \"Leave Aquarium\" is already tracked in demo-aquarium, duplication?\n this.appUsageDb.saveAppUsageExit(\"aquarium_tab\");\n }\n\n ionViewDidEnter() {\n\n console.log(\"aqarium.ts --- ionViewDidEnter\");\n this.child.loadFunction();\n \n //decide if we want to show the modal view with unlockables.\n this.subscribeForModalView();\n\n //If \"Enter Aquarium\" is already tracked in demo-aquarium, duplication?\n this.appUsageDb.saveAppUsageEnter(\"aquarium_tab\");\n\n //\n this.saveDbToAWS();\n this.userProfileService.saveToServer();\n\n }\n\n //Upload SQLite database to AWS in ionViewWillEnter which happens\n //before \"ionViewDidEnter\" in demo-aquarium, thus the table will \n //be empty first visit aquarium, will not be empty if user \n //\"come back\" to aquarium after visit other pages and will \n // be exported to AWS.\n //\n // --- Moving to ionViewDidEnter()\n //\n saveDbToAWS() {\n this.appUsageDb.isTableEmpty().then(tableEmpty => {\n console.log(\"tableEmpty: \"+tableEmpty);\n if(!tableEmpty) {\n this.exportDatabase();\n } \n }).catch(e => {\n console.log(\"In ionViewWillEnter at Aqarium:\"+e);\n });\n } \n\n exportDatabase(){\n console.log(\"exportTable at Aquarium Page!\");\n this.appUsageDb.exportDatabaseToJson().then((res) => {\n console.log(\"upload to AWS at Aquarium Page: \"+JSON.stringify(res));\n this.awsS3Service.upload(\"Tracking\",res);\n \n //Empty table to prepare another round of tracking\n this.appUsageDb.emptyTable(); \n\n }); \n } \n\n ionViewWillUnload() {\n \n }\n\n ngOnInit(): void {\n\n /*\n this.route.queryParams.subscribe(params => {\n if (this.router.getCurrentNavigation().extras.state) {\n //throw new Error(\"Method not implemented.\");\n //show modal on awards\n this.modalObjectNavigationExtras = this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras;\n console.log(\"home.page.ts --- modalObjectNavigationExtras: \" + JSON.stringify(this.modalObjectNavigationExtras));\n if(this.modalObjectNavigationExtras['IsModalShownYet'] == false)\n this.showModal();\n\n \n //this.date = this.router.getCurrentNavigation().extras.state.date;\n //this.reinforcementObj['prob'] = this.router.getCurrentNavigation().extras.state.prob;\n //this.reinforcement_data = this.router.getCurrentNavigation().extras.state.reinforcement_data; \n //console.log(\"Inside AwardAltruism, date is: \" +this.date+\" prob is: \"+this.reinforcementObj['prob']);\n }\n }); \n */\n\n\n //this.title = \"ADAPTS\";\n this.title = \"SARA\";\n console.log(\"aquarium.component.ts --- start\");\n //this.menu.enable(true);\n\n this.getAwareId();\n\n }\n\n ngOnDestroy(){\n this.sub1$.unsubscribe();\n this.sub2$.unsubscribe();\n\n this.ionViewDidLeaveFunction();\n console.log(\"aquarium.component.ts --- destroy\");\n }\n\n getAwareId(){\n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n var res = flaskServerAPIEndpoint.split(\":\");\n flaskServerAPIEndpoint = res[0] + \":\" + res[1] + \":56735\";\n this.httpClient.post(flaskServerAPIEndpoint + \"/get_aware_id\", {\"username\" : this.userProfileService.username})\n .subscribe({\n next: data => this.aware_id = data[\"aware_id\"], //console.log(\"--aquarium-- \" + JSON.stringify(data)),\n error: error => console.error('There was an error!', error)\n });\n }\n\n subscribeForModalView(){\n //this.unlockedItems$ = \n this.modalDataSubscription$ = this.store.pipe(select(isIncentivesUnlockedForTheDay))\n .subscribe(params => {\n if(params == undefined)\n console.log(\"---params: undefined---\"+ JSON.stringify(params))\n else{\n console.log(\"---params: ---\"+ JSON.stringify(params))\n var unlockedIncentive: UnlockedIncentive = params;\n //computeUnlockedReinforcements(currentPoints, previousPoints, awardedDollar)\n\n if(unlockedIncentive[\"isUnlockedViewShown\"] == false) \n this.computeUnlockedReinforcements(unlockedIncentive[\"current_point\"], \n unlockedIncentive[\"current_point\"] - unlockedIncentive[\"unlocked_points\"],\n unlockedIncentive[\"unlocked_money\"]); \n }\n }\n );\n }\n\n\n startSurvey(){\n console.log('start survey');\n var currentTime = moment(); \n var startTime = moment({hour: 18}); // 6pm\n var endTime = moment({hour: 23, minute: 59}); // 11:59pm\n var firstLogin = this.userProfileService.userProfile.firstlogin;\n if(firstLogin == undefined) firstLogin = true;\n this.userProfileService.userProfile.firstlogin = false;\n this.userProfileService.saveProfileToDevice();\n this.userProfileService.saveToServer();\n if(!currentTime.isBetween(startTime, endTime) && !firstLogin) {\n this.presentAlert('Please come back between 6 PM and midnight');\n } else if(this.userProfileService.surveyTakenForCurrentDay()) {\n this.presentAlert('You have already completed the survey for the day.');\n } else {\n if (this.userProfileService.isParent){\n this.navController.navigateRoot(['survey/samplesurvey']); //caregiversurvey\n } else{\n this.navController.navigateRoot(['survey/samplesurvey2']); //aya\n }\n\n } \n\n }\n\n async openSurvey(location){\n this.navController.navigateRoot([location]);\n }\n\n async presentAlert(alertMessage) {\n \n const alert = await this.alertCtrl.create({\n //
Thank you for completing the survey. You have unlocked a meme.
\n //header: '
Daily survey unavilable
',\n header: 'Daily survey unavailable',\n //subHeader: \"Survey is not avaibable!\",\n message: alertMessage,\n //defined in theme/variables.scss\n //buttons: [{text: 'OK', cssClass: 'secondary'}]\n buttons: [{text: 'OK'}]\n });\n \n /*\n let alert = this.alertCtrl.create({\n title: 'Low battery',\n subTitle: '10% of battery remaining',\n buttons: ['Dismiss']\n });\n */\n\n //----\n await alert.present();\n }\n\n dispalySurveyPausedMsg(){\n this.presentAlert('This account has been temporarily paused by the research administrators.'); \n }\n\n\n showMemeDemo(){\n this.router.navigate(['incentive/award-memes']);\n }\n\n showAltruisticDemo(){\n this.router.navigate(['incentive/award-altruism']);\n }\n\n showHarvardSurvey(){\n this.navController.navigateRoot(['survey/harvardsurvey']);\n //this.router.navigate(['survey/harvardsurvey']);\n }\n\n showSleepSurvey(){\n this.navController.navigateRoot(['survey/sleepsurvey']);\n }\n\n\n showHarvardArcApps(){\n this.router.navigate(['intervention/arcappsfrontpage']);\n }\n\n showPythonLifeInsight(){\n this.router.navigate(['incentive/pythonlifeinsightsammple']);\n }\n\n showModalDemo(){\n var reinforcements = [];\n reinforcements.push({'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"});\n reinforcements.push({'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"});\n reinforcements.push({'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"});\n //reinforcements.push({'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"});\n //reinforcements.push({'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"});\n //reinforcements.push({'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"});\n //reinforcements.push({'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"});\n //reinforcements.push({'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"});\n this.presentModal(reinforcements);\n }\n\n\n //show unlocked pages, using a modal\n async presentModal(reinforcements) {\n const modal = await this.modalController.create({\n component: ModalUnlockedPageComponent,\n componentProps: {\n 'reinforcements': reinforcements\n },\n enterAnimation: myEnterAnimation,\n leaveAnimation: myLeaveAnimation,\n //,\n cssClass: 'my-default-2'\n });\n return await modal.present();\n }\n\n\n showModal(){\n //if(window.localStorage['IsModalShown'] == undefined)\n // return;\n\n //if(window.localStorage['IsModalShown'] == \"false\"){\n\n //\n var todaysDate = moment().format('YYYYMMDD');\n var storedDate = this.modalObjectNavigationExtras[\"LastSurveyCompletionDate\"];\n\n //\n if(todaysDate == storedDate){\n //this.computeUnlockedReinforcements();\n } \n\n //\n //window.localStorage.setItem(\"IsModalShown\", \"true\");\n //}\n }\n\n \n\n isFirstDayInTheStudy(){\n\n var daily_survey = this.userProfileService.userProfile.survey_data.daily_survey;\n var first_date = moment().format('YYYYMMDD');\n var first_date_moment_js = moment(first_date,\"YYYYMMDD\");\n var key_moment_js;\n for (var key in daily_survey) {\n key_moment_js = moment(key,\"YYYYMMDD\");\n //takes the first day only. But it may not be the first date.\n if (key_moment_js < first_date_moment_js) {\n first_date = key;\n first_date_moment_js = moment(first_date,\"YYYYMMDD\");\n }\n }\n\n var todays_date = moment().format('YYYYMMDD');\n if(todays_date == first_date)\n return true;\n else\n return false;\n }\n\n computeUnlockedReinforcements(currentPoints, previousPoints, awardedDollar){\n\n //var currentPoints = this.modalObjectNavigationExtras[\"CurrentPoints\"];\n //var previousPoints = this.modalObjectNavigationExtras[\"PreviousPoints\"];\n //var awardedDollar = this.modalObjectNavigationExtras[\"AwardedDollar\"];\n var reinforcements = [];\n console.log(\"computeUnlockedReinforcements: called\")\n\n //get if money is awarded.\n if(awardedDollar > 0){\n if(this.isFirstDayInTheStudy())\n //reinforcements.push({'img': 'assets/img/1dollar.jpg', 'header': 'You earned ' + awardedDollar + ' dollar(s)', 'text': 'Thanks for being a participant in the study. You earned 2 dollar.'});\n reinforcements.push({'img': 'assets/img/1dollar.jpg', 'header': 'You earned money', 'text': 'Thanks for completing your first survey! You earned 2 dollars.'});\n else{\n if(awardedDollar == 1) //hack, 1 dollar is only awarded after a three-day streak.\n reinforcements.push({'img': 'assets/img/1dollar.jpg', 'header': 'You earned money', 'text': 'Thanks for surveys three days in a row! You earned 1 dollar.'});\n \n if(awardedDollar == 2) //hack, 2 dollar is only awarded after a break.\n reinforcements.push({'img': 'assets/img/1dollar.jpg', 'header': 'You earned money', 'text': 'Thanks for coming back after a break! You earned 2 dollars.'});\n }\n }\n \n //get if fish is alotted\n previousPoints = currentPoints - 60;\n console.log(currentPoints + \", \" + previousPoints);\n\n fetch('../../../assets/game/fishpoints.json').then(async res => {\n //console.log(\"Fishes: \" + data);\n\n var fish_data = await res.json();\n var img; \n var header;\n var text;\n for(var i = 0; i < fish_data.length; i++) {\n if ((fish_data[i].points > previousPoints) && (fish_data[i].points <= currentPoints)) {\n img = \"assets/\" + fish_data[i].img.substring(0, fish_data[i].img.length-4) + '_tn.jpg';\n header = \"You have now unlocked the \" + fish_data[i].name;\n text = fish_data[i].trivia;\n reinforcements.push({'img': img, 'header': header, 'text': text});\n }\n }\n console.log(\"reinforcements: \" + JSON.stringify(reinforcements));\n if(reinforcements.length > 0)//means some rainforcement was provided.\n this.presentModal(reinforcements);\n });\n\n //update the state reinforcement\n this.store.dispatch(unlockedScreenShownAlready({isUnlockedScreenShown: true}));\n }\n\n\n \n}\n","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IonicModule } from '@ionic/angular';\nimport { DemoAquariumComponent } from './demo-aquarium/demo-aquarium.component';\nimport { SurveyModule } from '../../survey/survey.module';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AquariumComponent } from './aquarium.component';\nimport { RainforestComponent } from './previews/rainforest/rainforest.component';\n\nconst routes: Routes = [\n { path: 'aquariumone', component: DemoAquariumComponent }\n];\n\n@NgModule({\n declarations: [DemoAquariumComponent, AquariumComponent, RainforestComponent],\n imports: [\n CommonModule,\n SurveyModule,\n IonicModule.forRoot(),\n RouterModule.forChild(routes)\n ],\n exports:[\n DemoAquariumComponent, AquariumComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class AquariumModule { }\n","module.exports = \"\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hcXVhcml1bS9jaGVhdHBhZ2UvY2hlYXRwYWdlLmNvbXBvbmVudC5zY3NzIn0= */\"","import { Component, OnInit } from '@angular/core';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\n\n@Component({\n selector: 'app-cheatpage',\n templateUrl: './cheatpage.component.html',\n styleUrls: ['./cheatpage.component.scss'],\n})\nexport class CheatpageComponent implements OnInit {\n\n public totalPoints;\n public currentPoints;\n public myInput: string;\n\n constructor(private userProfileService: UserProfileService) { }\n\n ngOnInit() {\n\n /*\n if(window.localStorage['TotalPoints'] == undefined)\n this.currentPoints = 0;\n else\n this.currentPoints = parseInt(window.localStorage['TotalPoints']);\n */\n this.currentPoints = this.userProfileService.points;\n }\n\n logChange(event) {\n //console.log(event);\n console.log(\"Total points: \" + this.totalPoints);\n }\n\n resetPoint(){\n\n console.log(\"Total points: \" + this.totalPoints);\n this.currentPoints = this.totalPoints;\n\n //\n /*\n \n if(window.localStorage['TotalPoints'] == undefined)\n this.totalPoints = 0;\n else\n this.totalPoints = parseInt(window.localStorage['TotalPoints']);\n */\n //this.totalPoints = 700;//this.totalPoints + 100;\n //window.localStorage.setItem(\"TotalPoints\", \"\"+this.totalPoints); \n this.userProfileService.cheatPoints(this.totalPoints);\n }\n\n returnToAquarium(){\n window.location.href = '/home';\n }\n\n}\n","module.exports = \".new-background-color {\\n --background: #005486;\\n}\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL2RlbW8tYXF1YXJpdW0vZGVtby1hcXVhcml1bS5jb21wb25lbnQubGVzcyIsInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL2RlbW8tYXF1YXJpdW0vZGVtby1hcXVhcml1bS5jb21wb25lbnQubGVzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHFCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvYXF1YXJpdW0vZGVtby1hcXVhcml1bS9kZW1vLWFxdWFyaXVtLmNvbXBvbmVudC5sZXNzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59XG4iXX0= */\"","import { Component, OnInit, Input } from '@angular/core';\n\nimport { BootL1 } from '../levels/FishBowlL1/Boot';\nimport { PreloaderL1 } from '../levels/FishBowlL1/Preloader';\nimport { FishBowlL1 } from '../levels/FishBowlL1/Game';\n\n\nimport { BootL2 } from '../levels/FishBowlL2/Boot';\nimport { PreloaderL2 } from '../levels/FishBowlL2/Preloader';\nimport { FishBowlL2 } from '../levels/FishBowlL2/Game';\n\n\nimport { BootL3 } from '../levels/SeaLevelL3/Boot';\nimport { PreloaderL3 } from '../levels/SeaLevelL3/Preloader';\nimport { SeaLevelL3 } from '../levels/SeaLevelL3/Game';\n\n\nimport { BootL4 } from '../levels/SeaLevelL4/Boot';\nimport { PreloaderL4 } from '../levels/SeaLevelL4/Preloader';\nimport { SeaLevelL4 } from '../levels/SeaLevelL4/Game';\n\n\nimport { BootGameOver } from '../levels/GameOver/Boot';\nimport { PreloaderGameOver } from '../levels/GameOver/Preloader';\nimport { GameOver } from '../levels/GameOver/GameOver';\n\n\nimport { BootTundraL5 } from '../levels/TundraLevelL5/Boot';\nimport { PreloaderTundraL5 } from '../levels/TundraLevelL5/Preloader';\nimport { GameTundraL5 } from '../levels/TundraLevelL5/Game';\n\n\nimport { BootTundraL51 } from '../levels/TundraLevelL51/Boot';\nimport { PreloaderTundraL51 } from '../levels/TundraLevelL51/Preloader';\nimport { GameTundraL51 } from '../levels/TundraLevelL51/Game';\n\nimport { BootRainforestL6 } from '../levels/RainforestL6/Boot';\nimport { PreloaderRainforestL6 } from '../levels/RainforestL6/Preloader';\nimport { GameRainforestL6 } from '../levels/RainforestL6/Game';\n\n\nimport { ActivatedRoute, Router, RouterEvent, RouteConfigLoadStart, RouteConfigLoadEnd } from '@angular/router';\n//import { PreLoad } from '../../../PreLoad';\nimport { Platform, ModalController } from '@ionic/angular';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport * as moment from 'moment';\nimport { AlertController } from '@ionic/angular';\nimport { ModalUnlockedPageComponent } from '../modal-unlocked-page/modal-unlocked-page.component';\nimport { HttpClient } from '@angular/common/http';\n\nimport { environment } from '../../../../environments/environment';\n\nimport * as Sentry from 'sentry-cordova';\n\ndeclare let Phaser: any;\n\n@Component({\n selector: 'app-demo-aquarium',\n templateUrl: './demo-aquarium.component.html',\n styleUrls: ['./demo-aquarium.component.less'],\n})\n\n//@PreLoad('survey')\nexport class DemoAquariumComponent implements OnInit {\n \n\n game;\n pickedGame;\n isLoaded = false;\n public isShowingRouteLoadIndicator: boolean;\n survey_text; \n fishFunFactListViewItems = [];\n @Input() isPreview: string;\n debugText: String;\n \n // totalPoints = 0;\n get totalPoints(){\n return this.userProfileService.points;\n }\n\n get username(){\n if(this.userProfileService == undefined)\n return \"test\";\n else{\n\n //add username to sentry scope for better error handling\n this.addSentryScope(this.userProfileService.username);\n\n return this.userProfileService.username;\n }\n }\n\n addSentryScope(username: string) {\n /*\n *\n * This function adds errors in Sentry\n * \n */\n Sentry.configureScope(scope => {\n scope.setUser({\n username: username\n })\n });\n }\n //Get total submitted survey\n getTotalSurveyCount(){\n return Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length;\n }\n\n /* Get last seven days of indicator for survey completion, \n return an array of 7 elements like [0, 1, 0, 0, 0, 1, 0] \n with 1 indicating submitted survey, 0 otherwise, the first\n element is current day. */\n\n getIndicatorForSurveyDone(){\n var daily_survey = this.userProfileService.userProfile.survey_data.daily_survey;\n\n console.log(\"daily_survey:\");\n console.log(JSON.stringify(daily_survey));\n var indicatorArray = [];\n\n //daily_survey = {};\n if(Object.keys(daily_survey).length == 0){\n indicatorArray.push(0);\n return indicatorArray;\n }\n \n const orderedDatesKeys = Object.keys(daily_survey).sort()\n var first_date = orderedDatesKeys[0];\n //first_date = \"20200515\";\n\n for(let i = 0; i < 7; i++) {\n var previousdate = moment().subtract(i, \"days\").format(\"YYYYMMDD\");\n //console.log(JSON.stringify(this.userProfileService.userProfile.survey_data.daily_survey));\n var indicator = 0;\n if(previousdate in daily_survey){\n indicator = 1;\n }\n indicatorArray.push(indicator);\n\n // as may days user is in in the study. no blank filling\n if(first_date == previousdate)\n break;\n }\n\n\n return indicatorArray;\n\n }\n\n/* get surveyPath(){\n if (this.userProfileService.isParent){\n return \"survey/samplesurvey\"; //\"/survey/caregiversurvey\"\n } else{\n return \"survey/samplesurvey2\"; //\"/survey/ayasurvey\"\n }\n } */\n\n\n constructor(private router: Router, \n private alertCtrl: AlertController,\n private modalController: ModalController,\n //private pickGameService: PickGameService,\n private platform: Platform,\n private route: ActivatedRoute,\n private userProfileService: UserProfileService,\n private httpClient: HttpClient) { \n console.log(\"Constructor called\");\n \n /* \n this.route.queryParams.subscribe(params => {\n if (this.router.getCurrentNavigation().extras.state) {\n this.totalPoints = this.router.getCurrentNavigation().extras.state.totalPoints;\n console.log(\"Pass totalPoints: \"+this.totalPoints);\n }\n }); \n */\n\n this.survey_text = \"Start Survey\";\n this.debugText = \"\";\n //this.username = \"test\";\n }\n\n\n\n\n showInfoModal(text){\n console.log(\"rewards page\");\n var header_text = \"Survey Completion Bar\";\n text = \" Shows the number of surveys you have completed in the past week (shown as green) and the ones you missed (shown as gray).\"\n this.presentAlert(text, header_text);\n }\n\n\n goToRewardsPage(){\n console.log(\"rewards page\");\n //this.router.navigate(['/home']);\n this.router.navigate(['incentive/treasurechest']);\n }\n\n \n\n //preload the images\n preload(){\n console.log(\"Preload called\");\n this.game.load.image('einstein','assets/pics/ra_einstein.png');\n }\n\n //gets executed after preload\n create(){\n console.log(window.localStorage['TotalPoints']);\n //this.totalPoints = parseInt(window.localStorage['TotalPoints'] || \"0\");\n\n /*\n if(window.localStorage['TotalPoints'] == undefined)\n this.totalPoints = 0;\n else\n this.totalPoints = parseInt(window.localStorage['TotalPoints']);\n */\n\n console.log(\"Inside Aquarium totalPoints: \"+this.totalPoints);\n\n console.log(\"create called\");\n var s = this.game.add.sprite(80,9,'einstein');\n s.rotation = 0.14;\n }\n\n \n\n ngOnInit() {\n //this.loadFunction();\n \n this.sendUserIdToServerFor8PMNotification();\n\n\n this.addFishFunFactsBelow();\n\n //get inspirational quotes\n this.getInspirationalQuotes();\n }\n\n\n getInspirationalQuotes() {\n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n var username = this.userProfileService.username;\n this.httpClient.post(flaskServerAPIEndpoint + '/get-inspirational-quote', { \"user_id\": username }).subscribe({\n next: data => console.log(\"Inspirational quote: \" + JSON.stringify(data)),\n error: error => console.error('There was an error!', error)\n });\n }\n\n\n\n addFishFunFactsBelow() {\n //add the fish fun facts below:\n\n\n if(this.totalPoints <1060 && this.totalPoints >= 0) //fishbowl\n this.addFishFunFactsBetween(0, this.totalPoints);\n \n else if(this.totalPoints >=1060 && this.totalPoints <2120) //sea\n this.addFishFunFactsBetween(1060, this.totalPoints);\n\n else if(this.totalPoints >=2120 && this.totalPoints <3020) //tundra\n this.addFishFunFactsBetween(2120, this.totalPoints);\n\n else if(this.totalPoints >= 3020) //rainforest\n this.addFishFunFactsBetween(3020, this.totalPoints);\n\n }\n\n addFishFunFactsBetween(startPoint: number, totalPoints: number) {\n\n fetch('../../../../assets/game/fishpoints.json').then(async res => {\n //console.log(\"Fishes: \" + data);\n\n var data = await res.json();\n var current_points = 700;\n var fishFunFactListViewItem = {};\n for(var i = 0; i < data.length; i++) {\n\n if(data[i].points < startPoint)\n continue;\n\n if(totalPoints < data[i].points)\n continue;\n // break;\n\n fishFunFactListViewItem = {\n funFact: data[i].trivia,\n image: \"assets/\" + data[i].img.substring(0, data[i].img.length-4) + '_tn.jpg',\n fishName: data[i].name\n };\n\n this.fishFunFactListViewItems.push(fishFunFactListViewItem);\n \n }\n this.fishFunFactListViewItems = this.fishFunFactListViewItems.reverse();\n });\n }\n\n async sendUserIdToServerFor8PMNotification(){\n // Simple POST request with a JSON body and response type \n\n console.log(\"--aquarium-- \" + \"sendUserIdToServerFor8PMNotification\");\n var oneSignalPlayerId = window.localStorage['oneSignalPlayerId']; //this.userProfileService.oneSignalPlayerId;\n if(oneSignalPlayerId==\"null\" || oneSignalPlayerId==null || oneSignalPlayerId==undefined){\n console.log(\"oneSignalId is null, \" + oneSignalPlayerId);\n oneSignalPlayerId = \"test_one_signal_id\";\n return;\n }\n \n\n var username = this.userProfileService.username;\n var currentTimeTs = Date.now();\n var currentTimeReadableTs = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n const headers = { \"Content-Type\": \"application/json;charset=UTF-8\"};\n const body = {\"user_id\": username, \"oneSignalPlayerId\": oneSignalPlayerId, \"currentTimeTs\": currentTimeTs, \"currentTimeReadableTs\": currentTimeReadableTs};\n /*\n this.httpClient.post(\"http://ec2-54-91-131-166.compute-1.amazonaws.com:56733/store-onesignal-id\", body, { headers }).subscribe({\n next: data => console.log(data),\n error: error => console.error('There was an error!', error)\n });\n */\n console.log(\"oneSignalPlayerId---: \" + oneSignalPlayerId);\n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n this.httpClient.post(flaskServerAPIEndpoint + \"/store-onesignal-id\", body)\n .subscribe({\n next: data => console.log(\"--aquarium-- \" + JSON.stringify(data)),\n error: error => console.error('There was an error!', error)\n });\n }\n\n ionViewDidEnter(){\n //if(this.isLoaded == true)\n // this.loadFunction();\n this.survey_text = \"Start survey\";\n }\n\n //this function gets called from the above the \"aquarium.component.ts\"\n loadFunction(){\n\n //console.log(window.localStorage['TotalPoints']);\n\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n }); \n */\n\n //this.totalPoints = parseInt(window.localStorage['TotalPoints'] || \"0\");\n /*\n if(window.localStorage['TotalPoints'] == undefined)\n this.totalPoints = 0;\n else\n this.totalPoints = parseInt(window.localStorage['TotalPoints']);\n */\n //console.log(\"Inside Aquarium totalPoints: \"+this.totalPoints);\n //this.game.destroy();\n\n //height adjustment for different phone types\n var GameApp = GameApp || {};\n GameApp.CANVAS_WIDTH = 382.0;\n console.log(\"w: \" + window.innerWidth + \", h: \" + window.innerHeight + \", dp: \" + window.devicePixelRatio);\n if(window.innerWidth > GameApp.CANVAS_WIDTH)\n GameApp.CANVAS_WIDTH = window.innerWidth;\n GameApp.CANVAS_HEIGHT = window.innerHeight - 35;\n\n //var game;\n if(this.platform.is('ios')){\n if(GameApp.CANVAS_HEIGHT < 642.0){//iphone SE fix.\n GameApp.CANVAS_HEIGHT += 30;\n GameApp.CANVAS_WIDTH = window.innerWidth;\n }\n if(GameApp.CANVAS_HEIGHT > 800){//iphone XR fix.\n GameApp.CANVAS_HEIGHT -= 40;\n GameApp.CANVAS_WIDTH = window.innerWidth;\n }\n this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 45*window.devicePixelRatio, Phaser.AUTO, 'gameDiv');\n }else if(this.platform.is('android'))\n this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 74, Phaser.AUTO, 'gameDiv'); \n else\n this.game = new Phaser.Game(GameApp.CANVAS_WIDTH, GameApp.CANVAS_HEIGHT - 100, Phaser.AUTO, 'gameDiv');\n\n this.debugText = \"\" + GameApp.CANVAS_HEIGHT + \", \" + window.innerHeight + \", \" + window.devicePixelRatio;\n \n //this.totalPoints = 2125;\n\n if(this.isPreview == \"false\"){\n if(this.totalPoints < 0){\n this.game.state.add('Boot', BootGameOver);\n this.pickedGame = 'GameOver';\n var preLoader = new PreloaderGameOver();\n this.game.state.add('Preloader', preLoader);\n var gameover = new GameOver();\n this.game.state.add('GameOver', gameover);\n\n } else if(this.totalPoints <770 && this.totalPoints >= 0){\n\n this.game.state.add('Boot', BootL1);\n this.pickedGame = 'FishBowlL1';\n var preLoader = new PreloaderL1();\n this.game.state.add('Preloader', preLoader);\n var fishBowlL1 = new FishBowlL1();\n fishBowlL1.setTotalPoints(this.totalPoints);\n var surveyCompletionHistory = this.getIndicatorForSurveyDone();\n fishBowlL1.setSurveyHistory(surveyCompletionHistory);\n this.game.state.add('FishBowlL1', fishBowlL1);\n\n\n } else if ( this.totalPoints >=770 && this.totalPoints <1060 ){\n\n this.game.state.add('Boot', BootL2);\n this.pickedGame = 'FishBowlL2';\n var preLoader = new PreloaderL2();\n this.game.state.add('Preloader', preLoader);\n var fishBowlL2 = new FishBowlL2();\n fishBowlL2.setTotalPoints(this.totalPoints);\n var surveyCompletionHistory = this.getIndicatorForSurveyDone();\n fishBowlL2.setSurveyHistory(surveyCompletionHistory);\n this.game.state.add('FishBowlL2', fishBowlL2);\n\n\n } else if( this.totalPoints >=1060 && this.totalPoints <1710 ){\n\n this.game.state.add('Boot', BootL3);\n this.pickedGame = 'SeaLevelL3';\n var preLoader = new PreloaderL3();\n this.game.state.add('Preloader', preLoader);\n var seaLevelL3 = new SeaLevelL3();\n seaLevelL3.setTotalPoints(this.totalPoints);\n var surveyCompletionHistory = this.getIndicatorForSurveyDone();\n seaLevelL3.setSurveyHistory(surveyCompletionHistory);\n this.game.state.add('SeaLevelL3', seaLevelL3);\n\n } else if( this.totalPoints >=1710 && this.totalPoints <2120){\n\n this.game.state.add('Boot', BootL4);\n this.pickedGame = 'SeaLevelL4';\n var preLoader = new PreloaderL4();\n this.game.state.add('Preloader', preLoader);\n var seaLevelL4 = new SeaLevelL4();\n seaLevelL4.setTotalPoints(this.totalPoints);\n var surveyCompletionHistory = this.getIndicatorForSurveyDone();\n seaLevelL4.setSurveyHistory(surveyCompletionHistory);\n this.game.state.add('SeaLevelL4', seaLevelL4);\n\n } else if( this.totalPoints >=2120 && this.totalPoints <2720){\n\n this.game.state.add('Boot', BootTundraL5);\n this.pickedGame = \"TundraLevel1\";\n var preLoader = new PreloaderTundraL5();\n this.game.state.add('Preloader', preLoader);\n var level5 = new GameTundraL5();\n level5.setTotalPoints(this.totalPoints);\n var surveyCompletionHistory = this.getIndicatorForSurveyDone();\n level5.setSurveyHistory(surveyCompletionHistory);\n this.game.state.add('TundraLevel1', level5);\n\n }else if( this.totalPoints >=2720 && this.totalPoints <3020){\n\n this.game.state.add('Boot', BootTundraL51);\n this.pickedGame = \"TundraLevel2\";\n var preLoader = new PreloaderTundraL51();\n this.game.state.add('Preloader', preLoader);\n var level51 = new GameTundraL51();\n level51.setTotalPoints(this.totalPoints);\n var surveyCompletionHistory = this.getIndicatorForSurveyDone();\n level51.setSurveyHistory(surveyCompletionHistory);\n this.game.state.add('TundraLevel2', level51\n );\n\n }else if( this.totalPoints >=3020){\n\n this.game.state.add('Boot', BootRainforestL6);\n this.pickedGame = \"RainforestLevel6\";\n var preLoader = new PreloaderRainforestL6();\n this.game.state.add('Preloader', preLoader);\n var level6 = new GameRainforestL6();\n level6.setTotalPoints(this.totalPoints);\n var surveyCompletionHistory = this.getIndicatorForSurveyDone();\n level6.setSurveyHistory(surveyCompletionHistory);\n this.game.state.add('RainforestLevel6', level6);\n\n } else {\n //---\n var preLoader = new PreloaderL1();\n preLoader.setGameName(this.pickedGame = \"GameOver\");\n this.game.state.add('Preloader', preLoader);\n }\n }\n\n\n if(this.isPreview == \"true\"){\n \n }\n\n //this.game.state.add('GameOver', GameOver);\n this.game.state.start('Boot');\n //self = this;\n\n this.game.state.states[this.pickedGame].assignscope(this);\n\n //this.pickGameService.currentGame.subscribe(game => this.pickedGame = game)\n }\n \n ionViewDidLeaveFunction(){\n console.log(\"Aquarium, ionDidLeave\");\n //this.survey_text = \"Start survey\";\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n }); \n */\n this.game.destroy();\n }\n\n pauseGameRendering(){\n this.game.state.states[this.pickedGame].yourGamePausedFunc();\n }\n\n resumeGameRendering(){\n this.game.state.states[this.pickedGame].yourGameResumedFunc();\n }\n\n ngAfterViewInit(){\n \n } \n\n async presentAlert(alertMessage, header_text) {\n \n const alert = await this.alertCtrl.create({\n //
Thank you for completing the survey. You have unlocked a meme.
\n //header: '
Daily survey unavilable
',\n header: header_text,\n //subHeader: \"Survey is not avaibable!\",\n message: alertMessage,\n //defined in theme/variables.scss\n //buttons: [{text: 'OK', cssClass: 'secondary'}]\n buttons: [{text: 'OK'}]\n });\n \n /*\n let alert = this.alertCtrl.create({\n title: 'Low battery',\n subTitle: '10% of battery remaining',\n buttons: ['Dismiss']\n });\n */\n\n //----\n await alert.present();\n }\n}\n","export class BootL1 extends Phaser.State {\r\n preload() {\r\n this.load.image('preloaderBar', 'assets/img/loader_bar.png');\r\n }\r\n \r\n create() {\r\n this.input.maxPointers = 1;\r\n\t\tthis.stage.disableVisibilityChange = false;\r\n\t\t//this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;\r\n\t\tthis.scale.minWidth = 270;\r\n\t\tthis.scale.minHeight = 400;\r\n\t\tthis.scale.pageAlignHorizontally = true;\r\n\t\tthis.scale.pageAlignVertically = true;\r\n\t\tthis.stage.forcePortrait = true;\r\n\t\t//this.scale.setScreenSize(true);\r\n\r\n\t\tthis.input.addPointer();\r\n\r\n\t\t//Change color here \r\n\t\t//-- http://www.w3schools.com/colors/colors_picker.asp\r\n\t\tthis.stage.backgroundColor = '#095e98';\r\n \r\n\t\tthis.state.start('Preloader');\r\n\t\tconsole.log(\"Boot completed\");\r\n\t\r\n }\r\n}","export class FishBowlL1 extends Phaser.State {\r\n\r\n //componentObject;\r\n constructor(){\r\n super();\r\n this.componentObject;\r\n this.surveyHistory = [];\r\n }\r\n \r\n create() {\r\n\r\n this.gameover = false;\r\n this.totalClicks = 0;\r\n this.isPrawnAdded = false;\r\n this.isClownFishAdded = false;\r\n\r\n this.CANVAS_WIDTH = 382.0;\r\n if(window.innerWidth > this.CANVAS_WIDTH)\r\n this.CANVAS_WIDTH = window.innerWidth;\r\n \r\n //\r\n this.buildWorld();\r\n this.game.inputEnabled = false;\r\n\r\n //\r\n Phaser.Canvas.setTouchAction(this.game.canvas, \"auto\");\r\n this.game.input.touch.preventDefault = false;\r\n\r\n }\r\n\r\n buildWorld() {\r\n\r\n //\r\n this.height = this.game.height;\r\n var titlescreen = this.add.image(0, this.height-210, 'titlescreen');\r\n //titlescreen.scale.setTo(0.85, 0.85);\r\n\r\n //\r\n //var timer = this.add.sprite(5, 40, 'timer', 1);\r\n\r\n /*\r\n var fish_progress = this.add.image(175,50, 'clownfish_grey');\r\n fish_progress.scale.setTo(-0.3, 0.3);\r\n fish_progress.anchor.setTo(.5,.5);\r\n */\r\n\r\n /*\r\n var pouch = this.add.image(15,80, 'diamond');\r\n pouch.scale.setTo(0.4, 0.4);\r\n pouch.anchor.setTo(.5,.5);\r\n this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', \"\" + 2, 12);\r\n */\r\n\r\n //\r\n var treasure = this.add.image(90, this.height-80, 'treasure');\r\n treasure.scale.setTo(0.3, 0.3);\r\n treasure.inputEnabled = true;\r\n treasure.events.onInputDown.add(this.showunlockables, this);\r\n\r\n \r\n //\r\n this.buildFish();\r\n this.addFishes();\r\n\r\n this.showProgressBars();\r\n\r\n //\r\n /*\r\n var journal = this.add.image(this.CANVAS_WIDTH - 70, 10, 'journal');\r\n journal.scale.setTo(0.4, 0.4);\r\n journal.inputEnabled = true;\r\n journal.events.onInputDown.add(this.logdata, this);\r\n */\r\n\r\n \r\n\r\n //\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n\r\n //\r\n this.game.onPause.add(this.yourGamePausedFunc, this);\r\n this.game.onResume.add(this.yourGameResumedFunc, this);\r\n\r\n }\r\n\r\n showProgressBars(){\r\n\r\n var current_points = this.totalPoints;\r\n\r\n //------ Left side\r\n\r\n \r\n\r\n //level info\r\n //var levels_progress = this.add.image(5, 55, 'levels_progress');\r\n //levels_progress.scale.setTo(.27, .30);\r\n\r\n /*\r\n //\r\n var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0);\r\n levels_progress.scale.setTo(0.95, 1.2);\r\n\r\n //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1);\r\n var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1);\r\n var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n //progress_sprite.anchor.setTo(0,0);\r\n progress_sprite.scale.setTo(1,1.1);\r\n\r\n\r\n var level_up_icon = this.add.image(18, 68, 'level_up_icon');\r\n level_up_icon.scale.setTo(.5, .5);\r\n level_up_icon.anchor.setTo(.5, .5);\r\n\r\n var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite');\r\n info_level_progress.animations.add('swim');\r\n info_level_progress.animations.play('swim', 1, true);\r\n info_level_progress.scale.setTo(0.3, 0.3);\r\n info_level_progress.anchor.setTo(.5,.5);\r\n info_level_progress.inputEnabled = true;\r\n info_level_progress.events.onInputDown.add(function(){this.showInforBox(\"Info level progress bar clicked\")}, this); \r\n\r\n \r\n //progress_sprite.anchor.setTo(1,0);\r\n //progress_sprite.scale.setTo(0.8,0.8);\r\n */\r\n\r\n var SCALING_FACTOR = 0.8;\r\n\r\n //streak_info\r\n var streak_info = this.add.image(5, 5, 'streak_info');\r\n streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n\r\n /*\r\n var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite');\r\n info_level_streak.animations.add('swim');\r\n info_level_streak.animations.play('swim', 1, true);\r\n info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR);\r\n info_level_streak.anchor.setTo(.5,.5);\r\n info_level_streak.inputEnabled = true;\r\n info_level_streak.events.onInputDown.add(function(){this.showInforBox(\"Streak progress bar clicked\")}, this); \r\n */\r\n\r\n var colors = []; //['grey','grey','grey','grey','grey','grey','grey'];\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n if(this.surveyHistory[i] == 1)\r\n colors[i] = 'green';\r\n else\r\n colors[i] = 'grey';\r\n } \r\n colors = colors.reverse()\r\n \r\n //console.log(\"this.surveyHistory \" + this.surveyHistory);\r\n console.log(\"colors \" + colors);\r\n //colors = ['green','green','green','green','grey','green','grey'];\r\n var streak_tile;\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]);\r\n streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR);\r\n }\r\n\r\n\r\n //------ Right side\r\n //var progressBars = this.add.group();\r\n\r\n //points bar\r\n var vertical_position_offset = 13;\r\n var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2');\r\n points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n points_progress.anchor.setTo(1,0);\r\n //progressBars.add(points_progress);\r\n\r\n //point text\r\n var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, \"\" + this.totalPoints, {font:\"20px dumbo_regular\", fill:\"#4c3d01\"});\r\n points_text.anchor.setTo(0.5,0);\r\n points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n //progressBars.add(points_text);\r\n\r\n var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point');\r\n star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n star_icon.anchor.setTo(.5, .5);\r\n //progressBars.add(points_text);\r\n\r\n //progressBars.scale.setTo(.8, .8);\r\n\r\n /*\r\n var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite');\r\n info_points.animations.add('swim');\r\n info_points.animations.play('swim', 1, true);\r\n info_points.scale.setTo(0.3, 0.3);\r\n info_points.anchor.setTo(.5,.5);\r\n info_points.inputEnabled = true;\r\n //function(){doAlert(textString)\r\n info_points.events.onInputDown.add(function(){this.showInforBox(\"Info pregess bar cliccked 2\")}, this); \r\n */\r\n\r\n \r\n //points to get to next fish.\r\n vertical_position_offset = 35;\r\n var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1);\r\n progress_bar_fish.anchor.setTo(1,0);\r\n progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon');\r\n fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR);\r\n fish_progress_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n \r\n //points to get to meme.\r\n vertical_position_offset = 57;\r\n\r\n\r\n /*\r\n var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1);\r\n progress_bar_memes.anchor.setTo(1,0);\r\n progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_memes = 0;\r\n var total_number_of_memes = 31;\r\n var already_shown_memes = window.localStorage[\"already_shown_memes3\"];\r\n if(already_shown_memes == undefined)\r\n already_shown_memes = [{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_memes = JSON.parse(window.localStorage[\"already_shown_memes3\"]);\r\n var currently_number_of_unlocked_memes = already_shown_memes.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_memes-start_number_of_memes)/\r\n (total_number_of_memes-start_number_of_memes);\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon');\r\n meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR);\r\n meme_icon.anchor.setTo(.5, .5);\r\n\r\n\r\n //points to get to alt message.\r\n var vertical_position_offset = 79;\r\n var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1);\r\n progress_bar_altruism_message.anchor.setTo(1,0);\r\n progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_alt_messages = 0;\r\n var total_number_of_alt_messages = 21;\r\n\r\n var already_shown_altruism_msgs = window.localStorage[\"already_shown_alt_msg3\"];\r\n if(already_shown_altruism_msgs == undefined)\r\n already_shown_altruism_msgs = [{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_altruism_msgs = JSON.parse(window.localStorage[\"already_shown_alt_msg3\"]);\r\n var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/\r\n (total_number_of_alt_messages-start_number_of_alt_messages);\r\n //if(percent < 0.05)\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Alt Width, \" + rect.width + \",\" + percent);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n \r\n var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon');\r\n alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR);\r\n alt_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n\r\n //points to get to level up.\r\n var vertical_position_offset = 101;\r\n */\r\n\r\n var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1);\r\n progress_bar_level_up.anchor.setTo(1,0);\r\n progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n // end of level is 1060, start is at 0\r\n var start_point_for_level = 0;\r\n var end_point_for_level = 1060;\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level);\r\n percent = percent*0.8 + 0.2;\r\n //console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n //console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2');\r\n level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR);\r\n level_up_2.anchor.setTo(.5, .5);\r\n\r\n\r\n\r\n\r\n\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n //console.log(\"countdown.width \" + this.countdown.width);\r\n\r\n \r\n }\r\n\r\n setSurveyHistory(survey_history){\r\n console.log(\"survey_history \" + survey_history + \", length: \" + survey_history.length);\r\n //this.surveyHistory = survey_history;\r\n for(var i=0; i= data[i].points){\r\n\r\n //nemo\r\n if(data[i].name.valueOf() === \"Clown fish\")\r\n this.animateClownFish();\r\n\r\n //if(data[i].name.valueOf() === \"Puffer fish\")\r\n // this.animatePufferFish();\r\n \r\n //starfish\r\n if(data[i].name.valueOf() === \"Star fish\")\r\n this.animateStarFishes();\r\n\r\n //squid\r\n if(data[i].name.valueOf() === \"Squid\")\r\n this.animateSquid();\r\n\r\n if(data[i].name.valueOf() === \"Gold fish\")\r\n this.animateGoldFish();\r\n\r\n if(data[i].name.valueOf() === \"Octopus\")\r\n this.animateOctpus();\r\n\r\n if(data[i].name.valueOf() === \"Angel fish\")\r\n this.animateAngelFish();\r\n\r\n if(data[i].name.valueOf() === \"Crab\")\r\n this.animateCrab();\r\n\r\n if(data[i].name.valueOf() === \"Carp fish\")\r\n this.animateGreenFish();\r\n\r\n if(data[i].name.valueOf() === \"Butterfly fish\")\r\n this.animateButterflyFish();\r\n\r\n if(data[i].name.valueOf() === \"Puffer fish\")\r\n this.animatePufferFish();\r\n\r\n if(data[i].name.valueOf() === \"Tiger barb\")\r\n this.animateTigerbarb();\r\n \r\n\r\n }\r\n }\r\n\r\n //set the progres bar\r\n this.previoous_fish_point = 0;\r\n this.next_fish_point = 0;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points < data[i].points){\r\n this.next_fish_point = data[i].points;\r\n break;\r\n }else{\r\n this.previoous_fish_point = data[i].points;\r\n }\r\n }\r\n\r\n /*\r\n this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height);\r\n var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point);\r\n console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * this.progress_sprite.width);\r\n\r\n console.log(\"Width, \" + rect.width + \",\" + this.progress_sprite.width);\r\n this.progress_sprite.crop(rect);\r\n */\r\n } \r\n\r\n animateClownFish(){\r\n this.clownFish = this.add.sprite(-100, 253, 'clownfish');\r\n this.clownFish.anchor.setTo(.5,.5);\r\n this.clownFish.animations.add('swim');\r\n this.clownFish.animations.play('swim', 30, true);\r\n this.clownFish.scale.setTo(0.5, 0.5);\r\n this.clownFish.name = \"clownFish\";\r\n this.gobothways(this.clownFish);\r\n }\r\n\r\n\r\n animateSquid(){ \r\n //squid\r\n var squid = this.add.sprite(- 120, this.height-150, 'squid');\r\n squid.animations.add('swim');\r\n squid.animations.play('swim', 5, true);\r\n squid.scale.setTo(0.25, 0.25);\r\n this.gobothways(squid);\r\n }\r\n\r\n animateButterflyFish(){\r\n //angel\r\n var butterflyFish = this.add.sprite(-100, this.height-300, 'butterflyfish');\r\n butterflyFish.animations.add('swim');\r\n butterflyFish.animations.play('swim', 10, true);\r\n butterflyFish.scale.setTo(0.7, 0.7);\r\n this.gobothways(butterflyFish); \r\n }\r\n\r\n animateTigerbarb(){ \r\n //\r\n //if(this.totalPoints >= 50 && this.totalPoints < 75)\r\n var tigerbarbfish = this.add.sprite(-100, this.height-120, 'tigerbarb');\r\n tigerbarbfish.animations.add('swim');\r\n tigerbarbfish.animations.play('swim', 10, true);\r\n tigerbarbfish.scale.setTo(0.8, 0.8);\r\n this.gobothways(tigerbarbfish); \r\n }\r\n\r\n animatePufferFish(){ \r\n \r\n var pufferfish = this.add.sprite(-100, 50, 'puffer');\r\n pufferfish.animations.add('swim');\r\n pufferfish.animations.play('swim', 5, true);\r\n pufferfish.scale.setTo(0.7, 0.7);\r\n this.gobothways(pufferfish);\r\n \r\n }\r\n \r\n animateAngelFish(){\r\n //angel\r\n var angelfish = this.add.sprite(-100, this.height-250, 'angelfish');\r\n angelfish.animations.add('swim');\r\n angelfish.animations.play('swim', 10, true);\r\n angelfish.scale.setTo(0.6, 0.6);\r\n this.gobothways(angelfish); \r\n }\r\n \r\n animateGreenFish(){ \r\n //\r\n var greenFish = this.add.sprite(this.CANVAS_WIDTH + 100, 103, 'greenfish');\r\n greenFish.anchor.setTo(.5,.5);\r\n greenFish.animations.add('swim');\r\n greenFish.animations.play('swim', 30, true);\r\n greenFish.scale.setTo(0.3, 0.3);\r\n greenFish.name = \"greenfish\";\r\n this.gobothways(greenFish);\r\n }\r\n\r\n animateStarFishes(){\r\n var redstarfish = this.add.sprite(30, this.height-28, 'redstarfish');\r\n redstarfish.animations.add('swim');\r\n redstarfish.animations.play('swim', 2, true);\r\n redstarfish.anchor.setTo(0.5,0.5);\r\n redstarfish.angle -= 20;\r\n redstarfish.scale.setTo(0.10, 0.10);\r\n\r\n var bluestarfish = this.add.sprite(70, this.height-22, 'bluestarfish');\r\n bluestarfish.animations.add('swim');\r\n bluestarfish.animations.play('swim', 1, true);\r\n bluestarfish.anchor.setTo(0.5,0.5);\r\n bluestarfish.angle -= 0;\r\n bluestarfish.scale.setTo(0.06, 0.06);\r\n\r\n var greenstarfish = this.add.sprite(190, this.height-22, 'greenstarfish');\r\n greenstarfish.animations.add('swim');\r\n greenstarfish.animations.play('swim', 5, true);\r\n greenstarfish.anchor.setTo(0.5,0.5);\r\n greenstarfish.angle +=10;\r\n greenstarfish.scale.setTo(0.08, 0.08);\r\n }\r\n\r\n animateGoldFish(){\r\n var goldfish = this.add.sprite(this.CANVAS_WIDTH+100, 153, 'goldfish');\r\n goldfish.animations.add('swim');\r\n goldfish.animations.play('swim', 10, true);\r\n goldfish.scale.setTo(0.4, 0.4);\r\n this.gobothways(goldfish);\r\n }\r\n\r\n animateClownFish(){\r\n this.clownFish = this.add.sprite(-100, 253, 'clownfish');\r\n this.clownFish.anchor.setTo(.5,.5);\r\n this.clownFish.animations.add('swim');\r\n this.clownFish.animations.play('swim', 30, true);\r\n this.clownFish.scale.setTo(0.5, 0.5);\r\n this.clownFish.name = \"clownFish\";\r\n this.gobothways(this.clownFish);\r\n }\r\n\r\n animateOctpus(){\r\n var octopus = this.add.sprite(40, 200, 'octopus');\r\n octopus.animations.add('swim');\r\n octopus.animations.play('swim', 30, true);\r\n octopus.scale.setTo(0.3, 0.3);\r\n this.add.tween(octopus).to({ y: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true);\r\n }\r\n\r\n\r\n animateCrab(){\r\n var crab = this.add.sprite(230, this.height-60, 'seacreatures');\r\n crab.animations.add('swim', Phaser.Animation.generateFrameNames('crab1', 0, 25, '', 4), 30, true);\r\n crab.animations.play('swim');\r\n crab.scale.setTo(0.7, 0.7);\r\n }\r\n\r\n gobothways(b){\r\n\r\n var change_amount = Math.floor(this.rnd.realInRange(0, 150));\r\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\r\n change_amount = 3*change_amount;\r\n var pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n while((pos_y > this.height) || (pos_y < 70)){\r\n pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n }\r\n\r\n var t, X, Y;\r\n if(b.x > this.CANVAS_WIDTH){ \r\n b.scale.x = -1*b.scale.x;\r\n X = -100+Math.floor(this.rnd.realInRange(0, 50));\r\n t= this.add.tween(b).to({ x: X, y: pos_y}, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n b.scale.x = -1*b.scale.x;\r\n X = this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50));\r\n t = this.add.tween(b).to({ x: X, y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n }\r\n\r\n\r\n\r\n stopFish(b) {\r\n this.gobothways(b);\r\n }\r\n\r\n assignFishMovement(b) {\r\n xposition = Math.floor(this.rnd.realInRange(-100, this.world.width+100));\r\n yposition = Math.floor(this.rnd.realInRange(50, this.world.height-150));\r\n bdelay = 0; \r\n if(xposition < b.x){\r\n b.scale.x = -1;\r\n }else{\r\n b.scale.x = 1;\r\n }\r\n b.animations.add('swim');\r\n b.animations.play('swim', 30, true);\r\n t = this.add.tween(b).to({x:xposition, y:yposition}, 3500, Phaser.Easing.Quadratic.InOut, true, bdelay);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n\r\n yourGamePausedFunc(){\r\n console.log(\"Game paused\");\r\n if(this.game.lockRender == false) \r\n this.game.lockRender = true;\r\n }\r\n\r\n yourGameResumedFunc(){\r\n console.log(\"Game resumed\");\r\n if(this.game.lockRender == true) \r\n this.game.lockRender = false;\r\n }\r\n\r\n showunlockables(){\r\n console.log('treasure box clicked');\r\n this.componentObject.goToRewardsPage();\r\n }\r\n\r\n logdata() {\r\n console.log('show surveys');\r\n this.componentObject.goToSurveyPage();\r\n }\r\n\r\n update(){\r\n }\r\n\r\n assignscope(componentObject){\r\n this.componentObject = componentObject;\r\n }\r\n\r\n\tsetTotalPoints(totalPoints){\r\n\t\tthis.totalPoints = totalPoints;\r\n\t} \r\n}","export class PreloaderL1 extends Phaser.State {\r\n\t\r\n\tpreload(){\r\n\r\n\t\t//console.log(\"Preloader: preload called\"); \r\n\r\n\t\tthis.load.onLoadComplete.addOnce(this.onLoadComplete, this);\r\n\r\n\t\tthis.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar');\r\n\t\tthis.preloadBar.anchor.setTo(0.5, 0.5);\r\n\t\tthis.load.setPreloadSprite(this.preloadBar);\r\n \r\n //---- both aquariums\r\n this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt');\r\n\t\tthis.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points\r\n\t\tthis.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png');\r\n\t\t\r\n\t\tthis.add.text(0, 0, \"hack\", {font:\"1px dumbo_regular\", fill:\"#FFFFFF\"});\r\n\t\t//this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20);\r\n\t\tthis.load.image('points_progress_2', 'assets/img/points_progress_2.png');\r\n\t\tthis.load.image('levels_progress', 'assets/img/levels_progress_2.png');\r\n\t\tthis.load.image('streak_info', 'assets/img/streak_info_2.png');\r\n\t\tthis.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20);\r\n\t\tthis.load.image('alt_icon', 'assets/img/heart.png');\r\n\t\tthis.load.image('next_fish_icon', 'assets/img/fish_icon_2.png');\r\n\t\tthis.load.image('meme_icon', 'assets/img/smiley_face.png');\r\n\t\tthis.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20);\r\n\t\tthis.load.image('level_up_icon', 'assets/img/level_icon.png');\r\n\t\tthis.load.image('level_up_2', 'assets/img/level_up_2.png');\r\n\t\tthis.load.image('streak_green', 'assets/img/streak_green.png');\r\n\t\tthis.load.image('streak_red', 'assets/img/streak_red_2.png');\r\n\t\tthis.load.image('streak_grey', 'assets/img/streak_grey.png');\r\n\t\tthis.load.image('star_point', 'assets/img/star.png');\r\n\t\tthis.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json');\r\n\t\t\r\n\r\n\t\t//\r\n\t\t//Returns a random integer between min (inclusive) and max (inclusive)\r\n\t\t//Using Math.round() will give you a non-uniform distribution!\r\n\t\t//\r\n\t\tvar max = 8;\r\n\t\tvar min = 1;\r\n\t\tvar rand_num = Math.floor(Math.random() * (max - min + 1)) + min;\r\n\t\tconsole.log('assets/img/pirate-' + rand_num + '.png');\r\n\t\tthis.load.image('pirate', 'assets/img/pirate-' + rand_num + '.png');\r\n\r\n\t\tvar\tusername = window.localStorage['username'] || 'unknown';\r\n\r\n this.isStudyParticipant = username.indexOf('-study-') !== -1; // !== -1;\r\n\t\tthis.loadFishBowl();\r\n\r\n\t\t//--- RedBanner.png\r\n\t\t//this.load.atlasJSONArray('banner', 'sprite/RedBanner.png', 'sprite/RedBanner.json');\r\n\t\tthis.load.image('banner', 'assets/img/RedBanner.png');\r\n\t\tthis.load.image('banner_fish', 'assets/img/banner_fish.png');\r\n\r\n\r\n\t\t//----\r\n\t\tvar next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png';\r\n\t\tconsole.log(\"Next fish: \" + next_fish);\r\n\t\tthis.load.image('clownfish_grey', next_fish);\r\n\r\n\t\tthis.load.image('diamond', 'assets/img/diamond.png');\r\n\r\n\t\tvar progressDisplay = 0;\r\n\t\tvar timerEvt = this.time.events.loop(100, function (){\r\n if(this.load.progress < 100){\r\n \tprogressDisplay++;\r\n console.log('loading... '+(this.load.progress)+'%' + \"; \" + (100*progressDisplay));\r\n }else{\r\n //loadingText.text = 'Ready, Go!';\r\n console.log('Ready, Go!');\r\n this.time.events.remove(timerEvt);\r\n }\r\n\r\n }, this);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tconsole.log(\"Preloader: create called\");\r\n\t\tthis.preloadBar.cropEnabled = false;\r\n\t}\r\n\r\n\tupdate()\r\n\t{\r\n\t\tconsole.log(\"update: \"+ this.pickedGame);\r\n\t\tthis.state.start('FishBowlL1');\r\n\t}\r\n\r\n\tonLoadComplete(){\r\n\t console.log(\"Load complete\");\r\n\t this.ready = true;\r\n\t}\r\n\r\n\tloadFishBowl(){\r\n\r\n\t\t//\r\n\t\tconsole.log(\"Inside loadFishBowl\");\r\n\t\tthis.load.image('titlescreen', 'assets/img/TitleBG4.png'); \t\r\n this.load.image('journal', 'assets/img/fishjournal.png');\r\n\t\t\t \r\n\t\t//\r\n this.load.image('fish', 'assets/img/fish.png');\r\n\t\tthis.load.image('treasure', 'assets/img/treasure.png');\r\n\t\tthis.load.atlasJSONArray('clownfish', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json');\r\n\t\tthis.load.atlasJSONArray('squid', 'assets/game/sprite/squid.png', 'assets/game/sprite/squid.json');\r\n\t\tthis.load.atlasJSONArray('butterflyfish', 'assets/game/sprite/butterflyfish.png', 'assets/game/sprite/butterflyfish.json');\r\n\t\tthis.load.atlasJSONArray('tigerbarb', 'assets/game/sprite/tigerbarb.png', 'assets/game/sprite/tigerbarb.json');\r\n\t\tthis.load.atlasJSONArray('puffer', 'assets/game/sprite/pufferfish.png', 'assets/game/sprite/pufferfish.json');\r\n\t\tthis.load.atlasJSONArray('angelfish', 'assets/game/sprite/angelfish.png', 'assets/game/sprite/angelfish.json');\r\n\t\tthis.load.atlasJSONArray('greenfish', 'assets/game/sprite/swimrightgreenfish.png', 'assets/game/sprite/swimrightgreenfish.json');\r\n\t\t\r\n\t\t//\r\n\t\tthis.load.spritesheet('greenstarfish', 'assets/game/sprite/greenstarfish.png', 512, 512, 3);\r\n\t\tthis.load.spritesheet('redstarfish', 'assets/game/sprite/redstarfish.png', 512, 512, 3);\r\n\t\tthis.load.spritesheet('bluestarfish', 'assets/game/sprite/bluestarfish.png', 512, 512, 3);\r\n\r\n\t\t//\r\n\t\tthis.load.atlasJSONArray('goldfish', 'assets/game/sprite/goldfish.png', 'assets/game/sprite/goldfish.json');\r\n\t\tthis.load.atlasXML('octopus', 'assets/game/sprite/octopus.png', 'assets/game/sprite/octopus.xml');\r\n\t\tthis.load.atlasXML('seacreatures', 'assets/game/sprite/seacreatures.png', 'assets/game/sprite/seacreatures.xml');\r\n\r\n\t\t\r\n\t\t//\r\n\t\tthis.load.image('smiley', 'assets/img/smiley.png');\r\n\r\n\t}\r\n}","export class BootL2 extends Phaser.State {\r\n preload() {\r\n this.load.image('preloaderBar', 'assets/img/loader_bar.png');\r\n }\r\n \r\n create() {\r\n\t\tthis.input.maxPointers = 1;\r\n\t\tif(this.game.device.touch){\r\n\t\t\tthis.input.mouse.stop();\r\n\t\t}\r\n\t\tthis.stage.disableVisibilityChange = false;\r\n\t\t//this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;\r\n\t\tthis.scale.minWidth = 270;\r\n\t\tthis.scale.minHeight = 400;\r\n\t\tthis.scale.pageAlignHorizontally = true;\r\n\t\tthis.scale.pageAlignVertically = true;\r\n\t\tthis.stage.forcePortrait = true;\r\n\t\t//this.scale.setScreenSize(true);\r\n\r\n\t\tthis.input.addPointer();\r\n\r\n\t\t//Change color here \r\n\t\t//-- http://www.w3schools.com/colors/colors_picker.asp\r\n\t\tthis.stage.backgroundColor = '#095e98';\r\n \r\n\t\tthis.state.start('Preloader');\r\n\t\tconsole.log(\"Boot completed\");\r\n\t\r\n }\r\n}","export class FishBowlL2 extends Phaser.State {\r\n\r\n //componentObject;\r\n constructor(){\r\n super();\r\n this.componentObject;\r\n this.surveyHistory = [];\r\n }\r\n \r\n create() {\r\n\r\n this.gameover = false;\r\n this.totalClicks = 0;\r\n this.isPrawnAdded = false;\r\n this.isClownFishAdded = false;\r\n\r\n this.previoous_fish_point = 0;\r\n this.next_fish_point = 0;\r\n\r\n \r\n\r\n // = 382.0;\r\n //if(window.innerWidth > this.CANVAS_WIDTH)\r\n this.CANVAS_WIDTH = window.innerWidth;\r\n \r\n this.buildWorld();\r\n this.inputEnabled = false;\r\n\r\n //\r\n Phaser.Canvas.setTouchAction(this.game.canvas, \"auto\");\r\n this.game.input.touch.preventDefault = false;\r\n\r\n }\r\n\r\n buildWorld() {\r\n\r\n //\r\n //this.height = window.innerHeight-44;\r\n this.height = this.game.height;\r\n var titlescreen = this.add.image(0, this.height-160, 'titlescreen');\r\n titlescreen.scale.setTo(0.85, 0.85);\r\n\r\n //\r\n /*\r\n var fish_progress = this.add.image(175,50, 'clownfish_grey');\r\n fish_progress.scale.setTo(-0.3, 0.3);\r\n fish_progress.anchor.setTo(.5,.5);\r\n */\r\n\r\n //var info_progress_bar = this.add.image(175,50, 'info');\r\n //info_progress_bar.scale.setTo(0.3, 0.3);\r\n //info_progress_bar.anchor.setTo(.5,.5);\r\n\r\n /*\r\n var info_progress_bar = this.add.sprite(175,53, 'info_sprite');\r\n info_progress_bar.animations.add('swim');\r\n info_progress_bar.animations.play('swim', 1, true);\r\n info_progress_bar.scale.setTo(0.3, 0.3);\r\n info_progress_bar.anchor.setTo(.5,.5);\r\n info_progress_bar.inputEnabled = true;\r\n //function(){doAlert(textString)\r\n info_progress_bar.events.onInputDown.add(function(){this.showInforBox(\"Info pregess bar cliccked\")}, this);\r\n */\r\n\r\n /*\r\n var pouch = this.add.image(15,80, 'diamond');\r\n pouch.scale.setTo(0.4, 0.4);\r\n pouch.anchor.setTo(.5,.5);\r\n this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', \"\" + 2, 12);\r\n */\r\n\r\n var treasure = this.add.image(90, this.height-70, 'treasure');\r\n treasure.scale.setTo(0.3, 0.3);\r\n treasure.inputEnabled = true;\r\n treasure.events.onInputDown.add(this.showunlockables, this);\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Fishes Fed: ' + this.totalClicks, 20);\r\n /*\r\n this.totalPoints = 100;\r\n var points_str = \"\" + this.totalPoints;\r\n if(this.totalPoints < 10)\r\n points_str = \"000\" + this.totalPoints;\r\n if(this.totalPoints>=10 && this.totalPoints<100)\r\n points_str = \"00\" + this.totalPoints;\r\n if(this.totalPoints>=100 && this.totalPoints<1000)\r\n points_str = \"0\" + this.totalPoints;\r\n */\r\n\r\n \r\n\r\n //\r\n /*\r\n var journal = this.add.image(this.CANVAS_WIDTH - 70, 10, 'journal');\r\n journal.scale.setTo(0.4, 0.4);\r\n journal.inputEnabled = true;\r\n journal.events.onInputDown.add(this.logdata, this); \r\n */ \r\n\r\n \r\n\r\n //\r\n this.game.onPause.add(this.yourGamePausedFunc, this);\r\n this.game.onResume.add(this.yourGameResumedFunc, this);\r\n\r\n\r\n\r\n \r\n\r\n //this.totalPoints = 1000;\r\n this.buildFish();\r\n this.addFishes();\r\n\r\n //\r\n this.showProgressBars();\r\n\r\n //this.checkReinforcement();\r\n //this.showBanner();\r\n\r\n }\r\n\r\n showProgressBars(){\r\n\r\n var current_points = this.totalPoints;\r\n\r\n //------ Left side\r\n\r\n \r\n\r\n //level info\r\n //var levels_progress = this.add.image(5, 55, 'levels_progress');\r\n //levels_progress.scale.setTo(.27, .30);\r\n\r\n /*\r\n //\r\n var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0);\r\n levels_progress.scale.setTo(0.95, 1.2);\r\n\r\n //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1);\r\n var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1);\r\n var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n //progress_sprite.anchor.setTo(0,0);\r\n progress_sprite.scale.setTo(1,1.1);\r\n\r\n\r\n var level_up_icon = this.add.image(18, 68, 'level_up_icon');\r\n level_up_icon.scale.setTo(.5, .5);\r\n level_up_icon.anchor.setTo(.5, .5);\r\n\r\n var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite');\r\n info_level_progress.animations.add('swim');\r\n info_level_progress.animations.play('swim', 1, true);\r\n info_level_progress.scale.setTo(0.3, 0.3);\r\n info_level_progress.anchor.setTo(.5,.5);\r\n info_level_progress.inputEnabled = true;\r\n info_level_progress.events.onInputDown.add(function(){this.showInforBox(\"Info level progress bar clicked\")}, this); \r\n\r\n \r\n //progress_sprite.anchor.setTo(1,0);\r\n //progress_sprite.scale.setTo(0.8,0.8);\r\n */\r\n\r\n var SCALING_FACTOR = 0.8;\r\n\r\n //streak_info\r\n var streak_info = this.add.image(5, 5, 'streak_info');\r\n streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n\r\n /*\r\n var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite');\r\n info_level_streak.animations.add('swim');\r\n info_level_streak.animations.play('swim', 1, true);\r\n info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR);\r\n info_level_streak.anchor.setTo(.5,.5);\r\n info_level_streak.inputEnabled = true;\r\n info_level_streak.events.onInputDown.add(function(){this.showInforBox(\"Streak progress bar clicked\")}, this); \r\n */\r\n\r\n var colors = []; //['grey','grey','grey','grey','grey','grey','grey'];\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n if(this.surveyHistory[i] == 1)\r\n colors[i] = 'green';\r\n else\r\n colors[i] = 'grey';\r\n } \r\n colors = colors.reverse()\r\n \r\n //console.log(\"this.surveyHistory \" + this.surveyHistory);\r\n console.log(\"colors \" + colors);\r\n //colors = ['green','green','green','green','grey','green','grey'];\r\n var streak_tile;\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]);\r\n streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR);\r\n }\r\n\r\n\r\n //------ Right side\r\n //var progressBars = this.add.group();\r\n\r\n //points bar\r\n var vertical_position_offset = 13;\r\n var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2');\r\n //points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n points_progress.anchor.setTo(1,0);\r\n \r\n //progressBars.add(points_progress);\r\n\r\n //point text\r\n var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, \"\" + this.totalPoints, {font:\"20px dumbo_regular\", fill:\"#4c3d01\"});\r\n points_text.anchor.setTo(0.5,0);\r\n points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n //progressBars.add(points_text);\r\n\r\n var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point');\r\n star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n star_icon.anchor.setTo(.5, .5);\r\n //star_icon.smoothed = false;\r\n //star_icon.antialiasing = false;\r\n //progressBars.add(points_text);\r\n\r\n //progressBars.scale.setTo(.8, .8);\r\n\r\n /*\r\n var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite');\r\n info_points.animations.add('swim');\r\n info_points.animations.play('swim', 1, true);\r\n info_points.scale.setTo(0.3, 0.3);\r\n info_points.anchor.setTo(.5,.5);\r\n info_points.inputEnabled = true;\r\n //function(){doAlert(textString)\r\n info_points.events.onInputDown.add(function(){this.showInforBox(\"Info pregess bar cliccked 2\")}, this); \r\n */\r\n\r\n \r\n //points to get to next fish.\r\n vertical_position_offset = 35;\r\n\r\n \r\n var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1);\r\n progress_bar_fish.anchor.setTo(1,0);\r\n progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon');\r\n fish_progress_icon.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9**SCALING_FACTOR);\r\n fish_progress_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n \r\n //points to get to meme.\r\n vertical_position_offset = 57;\r\n \r\n /*\r\n var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1);\r\n progress_bar_memes.anchor.setTo(1,0);\r\n progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_memes = 0;\r\n var total_number_of_memes = 31;\r\n var already_shown_memes = window.localStorage[\"already_shown_memes3\"];\r\n if(already_shown_memes == undefined)\r\n already_shown_memes = [{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_memes = JSON.parse(window.localStorage[\"already_shown_memes3\"]);\r\n var currently_number_of_unlocked_memes = already_shown_memes.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_memes-start_number_of_memes)/\r\n (total_number_of_memes-start_number_of_memes);\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon');\r\n meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR);\r\n meme_icon.anchor.setTo(.5, .5);\r\n\r\n\r\n //points to get to alt message.\r\n var vertical_position_offset = 79;\r\n var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1);\r\n progress_bar_altruism_message.anchor.setTo(1,0);\r\n progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_alt_messages = 0;\r\n var total_number_of_alt_messages = 21;\r\n\r\n var already_shown_altruism_msgs = window.localStorage[\"already_shown_alt_msg3\"];\r\n if(already_shown_altruism_msgs == undefined)\r\n already_shown_altruism_msgs = [{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_altruism_msgs = JSON.parse(window.localStorage[\"already_shown_alt_msg3\"]);\r\n var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/\r\n (total_number_of_alt_messages-start_number_of_alt_messages);\r\n //if(percent < 0.05)\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Alt Width, \" + rect.width + \",\" + percent);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n \r\n var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon');\r\n alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR);\r\n alt_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n\r\n //points to get to level up.\r\n var vertical_position_offset = 101;\r\n */\r\n\r\n var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1);\r\n progress_bar_level_up.anchor.setTo(1,0);\r\n progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n // end of level is 1060, start is at 0\r\n var start_point_for_level = 0;\r\n var end_point_for_level = 1060;\r\n var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level);\r\n percent = percent*0.8 + 0.2;\r\n //console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n //console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2');\r\n level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR);\r\n level_up_2.anchor.setTo(.5, .5);\r\n\r\n\r\n\r\n\r\n\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n //console.log(\"countdown.width \" + this.countdown.width);\r\n\r\n \r\n }\r\n\r\n showBanner(){\r\n this.banner_object = this.add.group();\r\n //--- banner\r\n var banner = this.add.image(0, this.height-180, 'banner');\r\n banner.scale.setTo(.65, .95);\r\n banner.inputEnabled = true;\r\n //banner.events.onInputDown.add(this.hideBanner, this);\r\n this.banner_object.add(banner);\r\n banner.events.onInputDown.add(this.hideBanner, this);\r\n\r\n var banner_fish = this.add.image(290, this.height-210, 'info');\r\n banner_fish.scale.setTo(1, 1);\r\n banner_fish.inputEnabled = true;\r\n //banner_fish.events.onInputDown.add(this.hideBanner, this);\r\n this.banner_object.add(banner_fish);\r\n banner_fish.events.onInputDown.add(this.hideBanner, this);\r\n\r\n //\r\n var style = { font: \"18px Arial\", fill: \"#f1c40f\", align: \"left\", fontWeights: 'lighter' };\r\n var text = this.add.text(10, this.height-165, \"New sea level is unlocked.\\nClick the fish bowl\\nto go to earlier level.\", style);\r\n text.strokeThickness = 0;\r\n text.inputEnabled = true;\r\n //text.events.onInputDown.add(this.hideBanner, this);\r\n this.banner_object.add(text);\r\n text.events.onInputDown.add(this.hideBanner, this);\r\n\r\n //\r\n var style = { font: \"13px Arial\", fill: \"#f1c40f\", align: \"left\", fontStyle: 'italic', fontWeights: 'lighter'};\r\n var text2 = this.add.text(215, this.height-105, \"Tap to hide\", style);\r\n text2.strokeThickness = 0;\r\n text2.inputEnabled = true;\r\n //text2.events.onInputDown.add(this.hideBanner, this);\r\n this.banner_object.add(text2);\r\n text2.events.onInputDown.add(this.hideBanner, this);\r\n\r\n //make a left ot right animation.\r\n }\r\n\r\n hideBanner(elem){\r\n console.log(\"clicked\");\r\n this.banner_object.destroy(true);\r\n window.localStorage['banner_shown_2'] = \"1\";\r\n //deleted all the elements\r\n }\r\n \r\n\r\n buildFish() {\r\n \r\n //assign number of fish\r\n this.numfish = 0;\r\n //assign type and age of fish\r\n var fishType = [\"green1\", \"horse1\", \"purple1\", \"pink1\", \"magenta1\"]\r\n this.fishGroup = this.add.group();\r\n this.fishGroup.enableBody = true;\r\n\r\n //\r\n for(var i = 0; i < this.numfish; i++){\r\n var b = this.fishGroup.create(this.rnd.integerInRange(0, this.world.width), this.rnd.integerInRange(this.world.height-300, this.world.height-200), fishType[i]);\r\n b.anchor.setTo(0.5, 0.5);\r\n b.body.moves = false;\r\n b.inputEnabled = true; //true;\r\n b.events.onInputDown.add(this.addTally, this);\r\n this.assignFishMovement(b);\r\n }\r\n\r\n }\r\n\r\n\r\n addFishes(){\r\n\r\n var phaserJSON = this.game.cache.getJSON('fishpoints');\r\n //console.log(JSON.stringify(phaserJSON));\r\n\r\n\r\n var data = phaserJSON;\r\n var survey_string = \"\";\r\n var current_points = this.totalPoints;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points >= data[i].points){\r\n\r\n //nemo\r\n if(data[i].name.valueOf() === \"Clown fish\")\r\n this.animateClownFish();\r\n\r\n //if(data[i].name.valueOf() === \"Puffer fish\")\r\n // this.animatePufferFish();\r\n\r\n //starfish\r\n if(data[i].name.valueOf() === \"Star fish\")\r\n this.animateStarFishes();\r\n\r\n //squid\r\n if(data[i].name.valueOf() === \"Squid\")\r\n this.animateSquid();\r\n\r\n if(data[i].name.valueOf() === \"Gold fish\")\r\n this.animateGoldFish();\r\n\r\n if(data[i].name.valueOf() === \"Octopus\")\r\n this.animateOctpus();\r\n\r\n if(data[i].name.valueOf() === \"Angel fish\")\r\n this.animateAngelFish();\r\n\r\n if(data[i].name.valueOf() === \"Crab\")\r\n this.animateCrab();\r\n\r\n if(data[i].name.valueOf() === \"Carp fish\")\r\n this.animateGreenFish();\r\n\r\n if(data[i].name.valueOf() === \"Electric fish\")\r\n this.animatePurpleFish();\r\n\r\n if(data[i].name.valueOf() === \"Discus fish\")\r\n this.animateDiscusFish();\r\n\r\n if(data[i].name.valueOf() === \"Betta fish\")\r\n this.animateBettaFish(); \r\n\r\n if(data[i].name.valueOf() === \"Sea horse\")\r\n this.animateSeaHorse();\r\n\r\n if(data[i].name.valueOf() === \"Butterfly fish\")\r\n this.animateButterflyFish();\r\n\r\n if(data[i].name.valueOf() === \"Puffer fish\")\r\n this.animatePufferFish();\r\n\r\n if(data[i].name.valueOf() === \"Tiger barb\")\r\n this.animateTigerbarb();\r\n\r\n //if(data[i].name.valueOf() === \"Tiger barb\")\r\n // this.animateTigerbarb();\r\n\r\n }\r\n }\r\n\r\n //set the progres bar\r\n this.previoous_fish_point = 0;\r\n this.next_fish_point = 0;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points < data[i].points){\r\n this.next_fish_point = data[i].points;\r\n break;\r\n }else{\r\n this.previoous_fish_point = data[i].points;\r\n }\r\n }\r\n \r\n\r\n } \r\n\r\n animateClownFish(){\r\n this.clownFish = this.add.sprite(-100, 253, 'clownfish');\r\n this.clownFish.anchor.setTo(.5,.5);\r\n this.clownFish.animations.add('swim');\r\n this.clownFish.animations.play('swim', 30, true);\r\n this.clownFish.scale.setTo(0.5, 0.5);\r\n this.clownFish.name = \"clownFish\";\r\n this.gobothways(this.clownFish);\r\n }\r\n\r\n\r\n animateSquid(){ \r\n //squid\r\n var squid = this.add.sprite(- 120, this.height-150, 'squid');\r\n squid.animations.add('swim');\r\n squid.animations.play('swim', 5, true);\r\n squid.scale.setTo(0.25, 0.25);\r\n this.gobothways(squid);\r\n }\r\n\r\n \r\n animateButterflyFish(){\r\n //angel\r\n var butterflyFish = this.add.sprite(-100, this.height-300, 'butterflyfish');\r\n butterflyFish.animations.add('swim');\r\n butterflyFish.animations.play('swim', 10, true);\r\n butterflyFish.scale.setTo(0.5, 0.5);\r\n this.gobothways(butterflyFish); \r\n }\r\n\r\n animateTigerbarb(){ \r\n //\r\n //if(this.totalPoints >= 50 && this.totalPoints < 75)\r\n var tigerbarbfish = this.add.sprite(-100, this.height-120, 'tigerbarb');\r\n tigerbarbfish.animations.add('swim');\r\n tigerbarbfish.animations.play('swim', 10, true);\r\n tigerbarbfish.scale.setTo(0.6, 0.6);\r\n this.gobothways(tigerbarbfish); \r\n }\r\n\r\n animatePufferFish(){ \r\n //\r\n //if(this.totalPoints >= 50 && this.totalPoints < 75)\r\n var pufferfish = this.add.sprite(-100, 60, 'puffer');\r\n pufferfish.animations.add('swim');\r\n pufferfish.animations.play('swim', 10, true);\r\n pufferfish.scale.setTo(0.5, 0.5);\r\n this.gobothways(pufferfish); \r\n }\r\n\r\n animateSquid(){\r\n //squid\r\n var squid = this.add.sprite(- 120, this.height-190, 'squid');\r\n squid.animations.add('swim');\r\n squid.animations.play('swim', 5, true);\r\n squid.scale.setTo(0.19, 0.19);\r\n this.gobothways(squid);\r\n\r\n }\r\n\r\n\r\n animateAngelFish(){\r\n\r\n //angel\r\n var angelfish = this.add.sprite(-100, this.height-260, 'angelfish');\r\n angelfish.animations.add('swim');\r\n angelfish.animations.play('swim', 10, true);\r\n angelfish.scale.setTo(0.4, 0.4);\r\n this.gobothways(angelfish);\r\n\r\n }\r\n\r\n\r\n animateDiscusFish(){\r\n\r\n //\r\n var discusfish = this.add.sprite(-100, this.height-150, 'discusfish');\r\n discusfish.animations.add('swim');\r\n discusfish.animations.play('swim', 15, true);\r\n discusfish.scale.setTo(0.4, 0.4);\r\n this.gobothways(discusfish);\r\n\r\n }\r\n\r\n\r\n animateBettaFish(){\r\n\r\n //\r\n var bettafish = this.add.sprite(this.CANVAS_WIDTH-150, this.height-130, 'bettafish');\r\n bettafish.animations.add('swim');\r\n bettafish.animations.play('swim', 5, true);\r\n bettafish.scale.setTo(0.25, 0.25);\r\n\r\n\r\n }\r\n\r\n\r\n animateClownFish(){\r\n //\r\n this.clownFish = this.add.sprite(-100, 253, 'clownfish');\r\n this.clownFish.anchor.setTo(.5,.5);\r\n this.clownFish.animations.add('swim');\r\n this.clownFish.animations.play('swim', 30, true);\r\n this.clownFish.scale.setTo(0.35, 0.35);\r\n this.clownFish.name = \"clownFish\";\r\n this.gobothways(this.clownFish);\r\n\r\n }\r\n\r\n\r\n animateGoldFish(){\r\n //goldfish\r\n var goldfish = this.add.sprite(this.CANVAS_WIDTH+100, 193, 'goldfish');\r\n goldfish.animations.add('swim');\r\n goldfish.animations.play('swim', 10, true);\r\n goldfish.scale.setTo(0.27, 0.27);\r\n this.gobothways(goldfish);\r\n\r\n }\r\n\r\n\r\n animateGreenFish(){\r\n var greenFish = this.add.sprite(this.CANVAS_WIDTH + 100, 153, 'greenfish');\r\n greenFish.anchor.setTo(.5,.5);\r\n greenFish.animations.add('swim');\r\n greenFish.animations.play('swim', 30, true);\r\n greenFish.scale.setTo(0.2, 0.2);\r\n greenFish.name = \"greenfish\";\r\n this.gobothways(greenFish);\r\n\r\n\r\n }\r\n\r\n\r\n animateSeaHorse(){\r\n\r\n var seahorse = this.add.sprite(this.CANVAS_WIDTH-60, 150, 'seahorseyellow');\r\n seahorse.animations.add('swim');\r\n seahorse.animations.play('swim', 10, true);\r\n //seahorse.anchor.setTo(0.5, 0.5);\r\n seahorse.scale.setTo(0.08, 0.08);\r\n\r\n\r\n }\r\n\r\n\r\n animateOctpus(){\r\n var octopus = this.add.sprite(40, 200, 'octopus');\r\n octopus.animations.add('swim');\r\n octopus.animations.play('swim', 30, true);\r\n octopus.scale.setTo(0.2, 0.2);\r\n this.add.tween(octopus).to({ y: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true);\r\n\r\n }\r\n\r\n\r\n animatePurpleFish(){\r\n\r\n var purpleFish = this.add.sprite(-100, 103, 'seacreatures');\r\n purpleFish.animations.add('swim', Phaser.Animation.generateFrameNames('purpleFish', 0, 20, '', 4), 30, true);\r\n purpleFish.animations.play('swim');\r\n purpleFish.anchor.setTo(.5,.5);\r\n purpleFish.scale.setTo(0.5, 0.5);\r\n purpleFish.name = \"purplefish\";\r\n //this.add.tween(purpleFish).to({ x: -100 }, 3500, Phaser.Easing.Quadratic.InOut, true, 0, 1000, false);\r\n this.gobothways(purpleFish);\r\n\r\n\r\n }\r\n\r\n\r\n animateCrab(){\r\n var crab = this.add.sprite(190, this.height-50, 'seacreatures');\r\n crab.animations.add('swim', Phaser.Animation.generateFrameNames('crab1', 0, 25, '', 4), 30, true);\r\n crab.animations.play('swim');\r\n crab.scale.setTo(0.52, 0.52);\r\n\r\n }\r\n\r\n\r\n\r\n\r\n animateStarFishes(){\r\n //\r\n var redstarfish = this.add.sprite(30, this.height-28+7, 'redstarfish');\r\n redstarfish.animations.add('swim');\r\n redstarfish.animations.play('swim', 2, true);\r\n redstarfish.anchor.setTo(0.5,0.5);\r\n redstarfish.angle -= 20;\r\n redstarfish.scale.setTo(0.07, 0.07);\r\n\r\n var bluestarfish = this.add.sprite(70, this.height-22+7, 'bluestarfish');\r\n bluestarfish.animations.add('swim');\r\n bluestarfish.animations.play('swim', 1, true);\r\n bluestarfish.anchor.setTo(0.5,0.5);\r\n bluestarfish.angle -= 0;\r\n bluestarfish.scale.setTo(0.04, 0.04);\r\n\r\n\r\n var greenstarfish = this.add.sprite(170, this.height-22+7, 'greenstarfish');\r\n greenstarfish.animations.add('swim');\r\n greenstarfish.animations.play('swim', 5, true);\r\n greenstarfish.anchor.setTo(0.5,0.5);\r\n greenstarfish.angle +=10;\r\n greenstarfish.scale.setTo(0.04, 0.04);\r\n\r\n\r\n }\r\n\r\n\r\n gobothways(b){\r\n\r\n var change_amount = Math.floor(this.rnd.realInRange(0, 150));\r\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\r\n change_amount = 3*change_amount;\r\n var pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n while((pos_y > this.height) || (pos_y < 70)){\r\n pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n }\r\n\r\n var t, X, Y;\r\n if(b.x > this.CANVAS_WIDTH){ \r\n b.scale.x = -1*b.scale.x;\r\n X = -100+Math.floor(this.rnd.realInRange(0, 50));\r\n t= this.add.tween(b).to({ x: X, y: pos_y}, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n b.scale.x = -1*b.scale.x;\r\n X = this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50));\r\n t = this.add.tween(b).to({ x: X, y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n }\r\n\r\n\r\n\r\n stopFish(b) {\r\n this.gobothways(b);\r\n }\r\n\r\n assignFishMovement(b) {\r\n xposition = Math.floor(this.rnd.realInRange(-100, this.world.width+100));\r\n yposition = Math.floor(this.rnd.realInRange(50, this.world.height-150));\r\n bdelay = 0; \r\n if(xposition < b.x){\r\n b.scale.x = -1;\r\n }else{\r\n b.scale.x = 1;\r\n }\r\n b.animations.add('swim');\r\n b.animations.play('swim', 30, true);\r\n t = this.add.tween(b).to({x:xposition, y:yposition}, 3500, Phaser.Easing.Quadratic.InOut, true, bdelay);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n\r\n yourGamePausedFunc(){\r\n console.log(\"Game paused\");\r\n if(this.game.lockRender == false) \r\n this.game.lockRender = true;\r\n }\r\n\r\n yourGameResumedFunc(){\r\n console.log(\"Game resumed\");\r\n if(this.game.lockRender == true) \r\n this.game.lockRender = false;\r\n }\r\n\r\n showunlockables(){\r\n console.log('treasure box clicked');\r\n this.componentObject.goToRewardsPage();\r\n }\r\n\r\n showInforBox(text){\r\n //console.log('treasure box clicked');\r\n this.componentObject.showInfoModal(text);\r\n }\r\n\r\n logdata() {\r\n console.log('show surveys');\r\n this.componentObject.goToSurveyPage();\r\n }\r\n\r\n update(){\r\n }\r\n\r\n assignscope(componentObject){\r\n this.componentObject = componentObject;\r\n }\r\n\r\n\tsetTotalPoints(totalPoints){\r\n\t\tthis.totalPoints = totalPoints;\r\n } \r\n \r\n setSurveyHistory(survey_history){\r\n console.log(\"survey_history \" + survey_history + \", length: \" + survey_history.length);\r\n //this.surveyHistory = survey_history;\r\n for(var i=0; i= data[i].points){\n drawing_order_enabled[data[i].name.valueOf()] = 1;\n }\n }\n\n for(var key in drawing_order_enabled) {\n\n //means it is not included\n if(drawing_order_enabled[key] == 0)\n continue;\n\n\n if(drawing_order_enabled[key] == 1){\n\n //\n if(key === \"Squirrel\")\n this.animateSquirrel();\n \n if(key === \"Jaguar\")\n this.animateJaguar();\n\n if(key === \"Venus Flytrap\")\n this.animateCarnivorePlant();\n \n if(key === \"Lion\")\n this.animateLionMain();\n\n if(key === \"Ostrich\")\n this.animateOstrich();\n\n if(key === \"Triceratops\")\n this.animateTriceratopsMain();\n\n //if(data[i].name.valueOf() === \"Corn\")\n // this.animateCornMain(); \n\n if(key === \"Macaw\")\n this.animateMacaw(); \n\n if(key === \"Duck\")\n this.animateGooseDuck(); \n\n if(key === \"Owl\")\n this.animateOwl();\n\n if(key === \"Sparrow\")\n this.animateSparrow();\n\n if(key === \"Vulture\")\n this.animateVulture();\n\n if(key === \"Koala\")\n this.animateKoalaMain();\n\n if(key === \"Butterfly\")\n this.animateButterFly();\n\n if(key === \"Rain\"){\n //this.animateRain();\n }\n \n }\n }\n\n //set the progres bar\n this.previoous_fish_point = 0;\n this.next_fish_point = 0;\n for(var i = 0; i < data.length; i++) {\n if(current_points < data[i].points){\n this.next_fish_point = data[i].points;\n break;\n }else{\n this.previoous_fish_point = data[i].points;\n }\n }\n\n /*\n //---\n var timer = this.add.sprite(5, 40, 'timer', 1);\n\n this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0);\n var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height);\n var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point);\n //console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point + \",\" + percent);\n rect.width = Math.max(0, percent * this.progress_sprite.width);\n\n //console.log(\"Width, \" + rect.width + \",\" + this.progress_sprite.width);\n this.progress_sprite.crop(rect);\n */\n }\n\n animateRain(){\n //console.log(\"snow button loaded\");\n this.rainingswitch = this.add.image(this.game.width - 100, 10, 'rain_start');\n this.rainingswitch.scale.setTo(0.6, 0.6);\n this.rainingswitch.inputEnabled = true;\n this.rainingswitch.events.onInputDown.addOnce(this.startraining, this);\n }\n\n startraining(){\n //console.log(\"start snowing\");\n\n //var mid_emitter;\n //var back_emitter;\n\n this.rainingswitch.loadTexture(\"rain_end\",0);\n \n //this.back_emitter = this.game.add.emitter(this.game.world.centerX, -32, 600);\n this.emitter = this.game.add.emitter(this.game.world.centerX, -32, 600);\n\n this.emitter.width = this.game.world.width;\n // emitter.angle = 30; // uncomment to set an angle for the rain.\n\n this.emitter.makeParticles('rain');\n this.emitter.minParticleScale = 0.1;\n this.emitter.maxParticleScale = 0.5;\n this.emitter.setYSpeed(300, 500);\n this.emitter.setXSpeed(-5, 5);\n this.emitter.minRotation = 0;\n this.emitter.maxRotation = 0;\n this.emitter.start(false, 1600, 5, 0);\n\n this.rainingswitch.events.onInputDown.addOnce(this.stopraining, this);\n }\n\n stopraining(){\n\n this.rainingswitch.loadTexture(\"rain_start\",0);\n this.emitter.destroy();\n this.rainingswitch.events.onInputDown.addOnce(this.startraining, this);\n }\n\n animateButterFly(){\n var flowerBush = this.add.sprite(-10, this.game.height-293, 'flowerBush');\n flowerBush.scale.setTo(.2, .2);\n flowerBush.anchor.setTo(0,1);\n\n var butterfly = this.game.add.sprite(60, this.game.height-373, 'butterfly');\n butterfly.animations.add('swim');\n butterfly.animations.play('swim', 3, true);\n butterfly.scale.setTo(.6, .6);\n //this.butterfly = butterfly;\n\n\n butterfly = this.game.add.sprite(30, this.game.height-343, 'butterfly');\n butterfly.animations.add('swim');\n butterfly.animations.play('swim', 15, true);\n butterfly.scale.setTo(.4, .4);\n butterfly.rotation = -0.5;\n //this.butterfly = butterfly;\n\n butterfly = this.game.add.sprite(20, this.game.height-343, 'butterfly');\n butterfly.animations.add('swim');\n butterfly.animations.play('swim', 25, true);\n butterfly.scale.setTo(.25, .25);\n butterfly.rotation = 0.5;\n this.butterfly = butterfly;\n }\n\n animateMonkey(){\n //---\n var treeBranch = this.add.sprite(-10, 125, 'treeBranch');\n treeBranch.scale.setTo(.3, .3);\n treeBranch.rotation = -0.1;\n\n //---\n /*\n //console.log(\"adding redMonkey\");\n var redMonkey = this.game.add.sprite(5, 145, 'redMonkey');\n redMonkey.animations.add('swim');\n //redMonkey.animations.play('swim', 5, true);\n redMonkey.scale.setTo(.15, .15);\n //redMonkey.inputEnabled = true;\n this.redMonkey = redMonkey;\n\n //---\n console.log(\"adding brownMonkey\");\n var brownMonkey = this.game.add.sprite(20, 145, 'brownMonkey');\n brownMonkey.animations.add('swim');\n //brownMonkey.animations.play('swim', 5, true);\n brownMonkey.scale.setTo(.1, .1);\n //brownMonkey.inputEnabled = true;\n this.brownMonkey = brownMonkey;\n\n //---\n console.log(\"adding blackMonkey\");\n var blackMonkey = this.game.add.sprite(30, 145, 'blackMonkey');\n blackMonkey.animations.add('swim');\n //blackMonkey.animations.play('swim', 5, true);\n blackMonkey.scale.setTo(.15, .15);\n //brownMonkey.inputEnabled = true;\n this.blackMonkey = blackMonkey;\n */\n\n }\n\n animateCarnivorePlant(){\n //\n //console.log(\"adding thristy plant\");\n var thirstyplant = this.game.add.sprite(-30, this.game.height-310, 'thirstyplant');\n thirstyplant.animations.add('swim');\n thirstyplant.animations.play('swim', 15, true);\n thirstyplant.scale.setTo(.72, .72);\n thirstyplant.inputEnabled = true;\n this.thirstyplant = thirstyplant;\n thirstyplant.events.onInputDown.addOnce(this.changeToAttack, this);\n }\n\n \n animateCornMain(){\n //console.log(\"adding corn\");\n var corn = this.game.add.sprite(5, this.game.height-345, 'corn_stand');\n corn.animations.add('swim');\n corn.animations.play('swim', 5, true);\n corn.scale.setTo(.64, .64);\n corn.inputEnabled = true;\n this.corn = corn;\n corn.events.onInputDown.addOnce(this.changeToAttackCorn, this);\n }\n\n\n animateKoalaMain(){\n //\n this.koala = this.add.sprite(this.game.width+30, this.game.height-320, 'koala');\n this.animateKoala();\n }\n //\n animateKoala(){\n console.log(\"Idle koala\");\n this.koala.loadTexture('koala', 0);\n this.koala.animations.add('swim');\n this.koala.animations.play('swim', 2, true);\n this.koala.scale.setTo(-.24, .24);\n //this.triceratops.inputEnabled = true;\n //this.triceratops.events.onInputDown.addOnce(this.animateLionJump, this);\n this.koala.name = \"koala\";\n }\n\n //\n animateTriceratopsMain(){\n this.triceratops = this.add.sprite(this.game.width+30, this.game.height-240, 'triceratops');\n this.animateTriceratops();\n }\n\n //\n animateTriceratops(){\n //console.log(\"Idle triceratops\");\n this.triceratops.loadTexture('triceratops', 0);\n this.triceratops.animations.add('swim');\n this.triceratops.animations.play('swim', 2, true);\n this.triceratops.scale.setTo(-.32, .32);\n this.triceratops.name = \"triceratops\";\n }\n\n animateLionMain(){//\n //\n this.lion = this.add.sprite(this.game.width-60, this.game.height-240, 'lion');\n this.animateLion();\n }\n\n //\n animateLion(){\n console.log(\"Idle lion\");\n this.lion.loadTexture('lion', 0);\n this.lion.animations.add('swim');\n this.lion.animations.play('swim', 3, true);\n this.lion.scale.setTo(-0.8, 0.8);\n this.lion.inputEnabled = true;\n this.lion.events.onInputDown.addOnce(this.animateLionJump, this);\n this.lion.name = \"lion\";\n //this.pegions.body.velocity.x = -20;\n //this.gobothways(this.lion);\n }\n\n //\n animateLionJump(){\n \n //console.log(\"Jump lion jump\");\n\n //this.thirstyplant.loadTexture('attackplant', 0);\n\n //this.lion = this.add.sprite(this.game.width-30, this.game.height-250, 'lionjump');\n this.lion.loadTexture('lionjump', 0);\n this.lion.animations.add('swim');\n this.lion.animations.play('swim', 5, true);\n this.lion.scale.setTo(-0.8, 0.8);\n //this.lion.inputEnabled = true;\n //thirstyplant.events.onInputDown.add(this.changeToAttack, this);\n this.lion.name = \"lion\";\n //this.pegions.body.velocity.x = -20;\n //this.gobothways(this.lion);\n\n //\n //this.lion.animations.currentAnim.onComplete.add(this.animateLion, this);\n this.lion.events.onInputDown.addOnce(this.animateLion, this);\n }\n\n //\n animatePegions(){\n this.pegions = this.add.sprite(-500, 95, 'pegions');\n this.pegions.anchor.setTo(.5,.5);\n this.pegions.animations.add('swim2');\n this.pegions.animations.play('swim2', 5, true);\n this.pegions.scale.setTo(-0.7, 0.7);\n this.pegions.name = \"pegions\";\n //this.pegions.body.velocity.x = -20;\n this.gobothways(this.pegions);\n }\n\n //\n animateVulture(){\n this.vulture = this.add.sprite(-40, 75, 'vulture_flying');\n this.vulture.anchor.setTo(.5,.5);\n this.vulture.animations.add('swim2');\n this.vulture.animations.play('swim2', 5, true);\n this.vulture.scale.setTo(0.12, 0.12);\n this.vulture.name = \"vulture\";\n this.gobothways(this.vulture);\n }\n\n //\n animateSparrow(){\n this.sparrow = this.add.sprite(this.game.width+750, 215, 'sparrow_flying');\n this.sparrow.anchor.setTo(.5,.5);\n this.sparrow.animations.add('swim2');\n this.sparrow.animations.play('swim2', 15, true);\n this.sparrow.scale.setTo(-0.15, 0.15);\n this.sparrow.name = \"sparrow\";\n this.gobothways(this.sparrow);\n }\n\n //\n animateGooseDuck(){\n this.duck1 = this.add.sprite(this.game.width+250, 135, 'goose_flying');\n this.duck1.anchor.setTo(.5,.5);\n this.duck1.animations.add('swim2');\n this.duck1.animations.play('swim2', 15, true);\n this.duck1.scale.setTo(-0.12, 0.12);\n this.duck1.name = \"duck1\";\n this.gobothways(this.duck1);\n\n this.duck2 = this.add.sprite(this.game.width+300, 145, 'duck_flying');\n this.duck2.anchor.setTo(.5,.5);\n this.duck2.animations.add('swim2');\n this.duck2.animations.play('swim2', 15, true);\n this.duck2.scale.setTo(-0.11, 0.11);\n this.duck2.name = \"duck2\";\n this.gobothways(this.duck2);\n }\n\n //\n animateMacaw(){\n this.macaw = this.add.sprite(this.game.width+150, 235, 'macaw_flying');\n this.macaw.anchor.setTo(.5,.5);\n this.macaw.animations.add('swim2');\n this.macaw.animations.play('swim2', 15, true);\n this.macaw.scale.setTo(0.2, 0.2);\n this.macaw.name = \"macaw\";\n this.gobothways(this.macaw);\n }\n\n //\n animateOwl(){\n this.owl = this.add.sprite(this.game.width+550, 255, 'owl_flying');\n this.owl.anchor.setTo(.5,.5);\n this.owl.animations.add('swim2');\n this.owl.animations.play('swim2', 15, true);\n this.owl.scale.setTo(-0.1, 0.1);\n this.owl.name = \"owl\";\n this.gobothways(this.owl);\n }\n\n\n //\n /*\n animateSparrow(){\n this.sparrow = this.add.sprite(this.game.width+250, 65, 'sparrow_flying');\n this.sparrow.anchor.setTo(.5,.5);\n this.sparrow.animations.add('swim');\n this.sparrow.animations.play('swim', 5, true);\n this.sparrow.scale.setTo(0.1, 0.);\n this.sparrow.name = \"sparrow\";\n this.gobothways(this.sparrow);\n }\n */\n\n\n //if(this.totalPoints >= 0 && this.totalPoints < 25)\n animateOstrich(){\n this.clownFish = this.add.sprite(this.game.width+250, this.game.height-275, 'ostrich');\n this.clownFish.anchor.setTo(.5,.5);\n this.clownFish.animations.add('swim');\n this.clownFish.animations.play('swim', 10, true);\n this.clownFish.scale.setTo(0.4, 0.4);\n this.clownFish.name = \"squirrel\";\n this.gobothways(this.clownFish);\n\n\n //this.isPrawnAdded = true;\n //this.prawn = this.add.sprite(10, this.height-50, 'seacreatures', 'prawn0000');\n //this.prawn.scale.setTo(0.5, 0.5);\n }\n\n //if(this.totalPoints >= 0 && this.totalPoints < 25)\n animateSquirrel(){\n this.ostrich = this.add.sprite(-50, this.game.height-250, 'squirrel');\n this.ostrich.anchor.setTo(.5,.5);\n this.ostrich.animations.add('swim2');\n this.ostrich.animations.play('swim2', 25, true);\n this.ostrich.scale.setTo(-0.56, 0.56);\n this.ostrich.name = \"ostrich\";\n this.gobothways(this.ostrich);\n\n\n //this.isPrawnAdded = true;\n //this.prawn = this.add.sprite(10, this.height-50, 'seacreatures', 'prawn0000');\n //this.prawn.scale.setTo(0.5, 0.5);\n }\n\n\n animateJaguar(){\n this.jaguar = this.add.sprite(this.game.width+50, this.game.height-310, 'jaguar');\n this.jaguar.anchor.setTo(.5,.5);\n this.jaguar.animations.add('swim2');\n this.jaguar.animations.play('swim2', 10, true);\n this.jaguar.scale.setTo(0.25, 0.25);\n this.jaguar.name = \"jaguar\";\n this.gobothways(this.jaguar);\n\n\n //this.isPrawnAdded = true;\n //this.prawn = this.add.sprite(10, this.height-50, 'seacreatures', 'prawn0000');\n //this.prawn.scale.setTo(0.5, 0.5);\n }\n\n\n\n\n changeToAttack(){\n console.log(\"changed to attack\");\n this.thirstyplant.loadTexture('attackplant', 0);\n this.thirstyplant.animations.add('swim');\n this.thirstyplant.animations.play('swim', 15, true);\n this.thirstyplant.events.onInputDown.addOnce(this.changeToThirsty, this);\n }\n\n changeToThirsty(){\n //console.log(\"changed to thirsty\");\n this.thirstyplant.loadTexture('thirstyplant', 0);\n this.thirstyplant.animations.add('swim');\n this.thirstyplant.animations.play('swim', 15, true);\n this.thirstyplant.events.onInputDown.addOnce(this.changeToAttack, this);\n }\n\n changeToAttackCorn(){\n //console.log(\"changed to attack\");\n this.corn.loadTexture('corn_attach', 0);\n this.corn.animations.add('swim');\n this.corn.animations.play('swim', 5, true);\n this.corn.events.onInputDown.addOnce(this.changeToAttackCornKiss, this);\n }\n\n\n changeToAttackCornKiss(){\n //console.log(\"changed to thirsty\");\n this.corn.loadTexture('corn_stand', 0);\n this.corn.animations.add('swim');\n this.corn.animations.play('swim', 5, true);\n this.corn.events.onInputDown.addOnce(this.changeToAttackCorn, this);\n }\n\n gobothways(b){\n\n var change_amount = Math.floor(this.rnd.realInRange(0, 150));\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\n change_amount = 3*change_amount;\n var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\n while((pos_y > this.height) || (pos_y < 70)){\n pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\n }\n\n var t, X, Y;\n if(b.x > this.CANVAS_WIDTH){ \n //console.log('right to left, ' + b.x);\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\n b.scale.x = -1*b.scale.x;\n X = -200+Math.floor(this.rnd.realInRange(0, 200));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000))\n t= this.add.tween(b).to({ x: X, y: pos_y}, 7500, Phaser.Easing.Quadratic.InOut, true, 0);\n t.onComplete.add(this.stopFish, this); \n }\n\n if(b.x < 0){\n //console.log('left to right, ' + b.x);\n b.scale.x = -1*b.scale.x;\n X = this.CANVAS_WIDTH + 200 - Math.floor(this.rnd.realInRange(0, 200)); //+ Math.floor(this.rnd.realInRange(0, 2000))\n t = this.add.tween(b).to({ x: X, y: pos_y }, 9500+ Math.floor(this.rnd.realInRange(0, 5000)), Phaser.Easing.Quadratic.InOut, true, 0);\n t.onComplete.add(this.stopFish, this);\n }\n //*/\n }\n\n stopFish(b) {\n //this.assignFishMovement(b);\n //console.log('stopped');\n this.gobothways(b);\n }\n\n buildWorld() {\n\n }\n\n showunlockables(){\n //console.log('treasure box clicked');\n this.componentObject.goToRewardsPage();\n }\n\n\n setTotalPoints(totalPoints){\n\t\tthis.totalPoints = totalPoints;\n } \n\n assignscope(componentObject){\n this.componentObject = componentObject;\n }\n\n\n yourGamePausedFunc(){\n console.log(\"Game paused\");\n if(this.game.lockRender == false) \n this.game.lockRender = true;\n }\n\n yourGameResumedFunc(){\n console.log(\"Game resumed\");\n if(this.game.lockRender == true) \n this.game.lockRender = false;\n }\n \n\n \n\n}","export class PreloaderRainforestL6 extends Phaser.State {\r\n\t\r\n\tpreload(){\r\n\r\n\t\tconsole.log(\"Preload called\");\r\n\t\tthis.input.addPointer();\r\n\t\t\r\n\t\tthis.load.onLoadComplete.addOnce(this.onLoadComplete, this);\r\n\t\tthis.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar');\r\n\t\tthis.preloadBar.anchor.setTo(0.5, 0.5);\r\n\t\tthis.load.setPreloadSprite(this.preloadBar);\r\n \r\n //---- both aquariums\r\n this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt');\r\n\t\tthis.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points\r\n\t\tthis.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png');\r\n\r\n\t\t\r\n\t\tthis.add.text(0, 0, \"hack\", {font:\"1px dumbo_regular\", fill:\"#FFFFFF\"});\r\n\t\t//this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20);\r\n\t\tthis.load.image('points_progress_2', 'assets/img/points_progress_2.png');\r\n\t\tthis.load.image('levels_progress', 'assets/img/levels_progress_2.png');\r\n\t\tthis.load.image('streak_info', 'assets/img/streak_info_2.png');\r\n\t\tthis.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20);\r\n\t\tthis.load.image('alt_icon', 'assets/img/heart.png');\r\n\t\tthis.load.image('next_fish_icon', 'assets/img/fish_icon_2.png');\r\n\t\tthis.load.image('meme_icon', 'assets/img/smiley_face.png');\r\n\t\tthis.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20);\r\n\t\tthis.load.image('level_up_icon', 'assets/img/level_icon.png');\r\n\t\tthis.load.image('level_up_2', 'assets/img/level_up_2.png');\r\n\t\tthis.load.image('streak_green', 'assets/img/streak_green.png');\r\n\t\tthis.load.image('streak_red', 'assets/img/streak_red_2.png');\r\n\t\tthis.load.image('streak_grey', 'assets/img/streak_grey.png');\r\n\t\tthis.load.image('star_point', 'assets/img/star.png');\r\n\t\tthis.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json');\r\n\t\t\r\n\r\n\r\n\r\n\r\n\t\tthis.load.image('diamond', 'assets/img/diamond.png');\r\n\r\n\r\n\t\t//----\r\n\t\tvar next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png';\r\n\t\tthis.load.image('clownfish_grey', next_fish);\r\n\t\tvar progressDisplay = 0;\r\n\t\tvar timerEvt = this.time.events.loop(100, function (){\r\n if(this.load.progress < 100){\r\n \tprogressDisplay++;\r\n console.log('loading... '+(this.load.progress)+'%' + \"; \" + (100*progressDisplay));\r\n }else{\r\n //loadingText.text = 'Ready, Go!';\r\n console.log('Ready, Go!');\r\n this.time.events.remove(timerEvt);\r\n }\r\n\r\n\t\t}, this);\r\n\r\n\r\n\r\n\r\n\t\tthis.game.load.image('rock2','assets/pics/rock2.png');\r\n\t\t\r\n\t\tthis.game.load.image('reinforest1','assets/pics/bg-rainforest-top-V2.png');\r\n\t\tthis.load.image('reinforestBackgroundBottom1', 'assets/pics/bg-rainforest-bottom-1.png'); \r\n\t\tthis.load.image('reinforestBackgroundBottom2', 'assets/pics/bg-rainforest-bottom-2.png'); \r\n\r\n\r\n\t\tthis.game.load.image('treasure', 'assets/img/treasure_chest_rainforest.png');\r\n this.game.load.atlasJSONArray('attackplant', 'assets/game/sprite/attack_plant.png', 'assets/game/sprite/attack_plant.json');\r\n this.game.load.atlasJSONArray('thirstyplant', 'assets/game/sprite/thirsty_plant.png', 'assets/game/sprite/thirsty_plant.json');\r\n this.game.load.atlasJSONArray('squirrel', 'assets/game/sprite/squirrel_run-0.png', 'assets/game/sprite/squirrel_run.json');\r\n this.game.load.atlasJSONArray('ostrich', 'assets/game/sprite/ostrich_sprite.png', 'assets/game/sprite/ostrich_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('jaguar', 'assets/game/sprite/Jaquar.png', 'assets/game/sprite/Jaquar.json');\r\n\t\t\r\n\t\tthis.game.load.atlasJSONArray('pegions', 'assets/game/sprite/5-pegions.png', 'assets/game/sprite/5-pegions.json');\r\n this.game.load.atlasJSONArray('lion', 'assets/game/sprite/brave_lion_idle-0.png', 'assets/game/sprite/brave_lion_idle-0.json');\r\n this.game.load.atlasJSONArray('triceratops', 'assets/game/sprite/triceratops_idle_sprit.png', 'assets/game/sprite/triceratops_idle_sprit.json');\r\n this.game.load.atlasJSONArray('koala', 'assets/game/sprite/koala_sprite.png', 'assets/game/sprite/koala_sprite.json');\r\n this.game.load.atlasJSONArray('lionjump', 'assets/game/sprite/brave_lion_jump-0.png', 'assets/game/sprite/brave_lion_jump-0.json');\r\n\r\n //\r\n this.game.load.atlasJSONArray('corn_stand', 'assets/game/sprite/cron_stand_sprite.png', 'assets/game/sprite/cron_stand_sprite.json');\r\n this.game.load.atlasJSONArray('corn_attach', 'assets/game/sprite/cron_attack_sprite.png', 'assets/game/sprite/cron_attack_sprite.json');\r\n\r\n //\r\n this.game.load.atlasJSONArray('vulture_flying', 'assets/game/sprite/vulture_sprite.png', 'assets/game/sprite/vulture_sprite.json');\r\n this.game.load.atlasJSONArray('sparrow_flying', 'assets/game/sprite/sparrow_sprite.png', 'assets/game/sprite/sparrow_sprite.json');\r\n this.game.load.atlasJSONArray('goose_flying', 'assets/game/sprite/goose_sprite.png', 'assets/game/sprite/goose_sprite.json');\r\n this.game.load.atlasJSONArray('owl_flying', 'assets/game/sprite/owl_sprite.png', 'assets/game/sprite/owl_sprite.json');\r\n this.game.load.atlasJSONArray('duck_flying', 'assets/game/sprite/duck_sprite.png', 'assets/game/sprite/duck_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('macaw_flying', 'assets/game/sprite/Macaw.png', 'assets/game/sprite/Macaw.json');\r\n\t\t\r\n\t\t//monkeys\r\n\t\tthis.game.load.image('treeBranch','assets/img/branch-tree.png');\r\n\t\t//this.game.load.atlasJSONArray('redMonkey', 'assets/game/sprite/RedMonkey.png', 'assets/game/sprite/RedMonkey.json');\r\n //this.game.load.atlasJSONArray('brownMonkey', 'assets/game/sprite/BrownMonkey.png', 'assets/game/sprite/BrownMonkey.json');\r\n //this.game.load.atlasJSONArray('blackMonkey', 'assets/game/sprite/BlackMonkey.png', 'assets/game/sprite/BlackMonkey.json');\r\n\t\t\r\n\t\t//butter fly\r\n\t\tthis.game.load.image('flowerBush','assets/img/flower-bush.png');\r\n\t\tthis.game.load.atlasJSONArray('butterfly', 'assets/game/sprite/butterfly.png', 'assets/game/sprite/butterfly.json');\r\n \r\n\t\tthis.game.load.spritesheet('rain', 'assets/game/sprite/rain.png', 17, 17)\r\n//\r\n\t\t//this.load.image('snowgswitch', 'assets/img/snowglobe.png');\r\n\t\tthis.load.image('rain_start', 'assets/img/start_rain.png');\r\n\t\tthis.load.image('rain_end', 'assets/img/stop_rain.png');\r\n\t\t//\r\n\r\n\t\t\r\n\r\n\t}\t\r\n\r\n\tcreate(){\r\n\t\tconsole.log(\"Preloader: create called\");\r\n\t\tthis.preloadBar.cropEnabled = false;\r\n\t}\r\n\r\n\tupdate(){\r\n\t\tconsole.log(\"update: \"+ 'RainforestLevel6');\r\n\t\tthis.state.start('RainforestLevel6');\r\n\t}\r\n\r\n\tonLoadComplete(){\r\n\t console.log(\"Load complete\");\r\n\t this.ready = true;\r\n\t}\r\n}","export class BootL3 extends Phaser.State {\r\n preload() {\r\n this.load.image('preloaderBar', 'assets/img/loader_bar.png');\r\n }\r\n \r\n create() {\r\n\t\tthis.input.maxPointers = 1;\r\n\t\tif(this.game.device.touch){\r\n\t\t\tthis.input.mouse.stop();\r\n\t\t}\r\n\t\tthis.stage.disableVisibilityChange = false;\r\n\t\t//this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;\r\n\t\tthis.scale.minWidth = 270;\r\n\t\tthis.scale.minHeight = 400;\r\n\t\tthis.scale.pageAlignHorizontally = true;\r\n\t\tthis.scale.pageAlignVertically = true;\r\n\t\tthis.stage.forcePortrait = true;\r\n\t\t//this.scale.setScreenSize(true);\r\n\r\n\t\tthis.input.addPointer();\r\n\r\n\t\t//Change color here \r\n\t\t//-- http://www.w3schools.com/colors/colors_picker.asp\r\n\t\tthis.stage.backgroundColor = '#095e98';\r\n \r\n\t\tthis.state.start('Preloader');\r\n\t\tconsole.log(\"Boot completed\");\r\n\t\r\n }\r\n}","export class SeaLevelL3 extends Phaser.State {\r\n //componentObject;\r\n constructor(){\r\n super();\r\n this.componentObject;\r\n this.surveyHistory = [];\r\n }\r\n \r\n create() {\r\n this.gameover = false;\r\n this.totalClicks = 0;\r\n //this.totalPoints = this.ionic_scope.total_points;\r\n //this.music = this.add.audio('game_audio');\r\n //this.music.play('', 0, 1.0, true);\r\n \r\n this.CANVAS_WIDTH = 382.0;\r\n if(window.innerWidth > this.CANVAS_WIDTH)\r\n this.CANVAS_WIDTH = window.innerWidth;\r\n\r\n this.buildWorld();\r\n\r\n\r\n this.inputEnabled = false;\r\n\r\n Phaser.Canvas.setTouchAction(this.game.canvas, \"auto\");\r\n this.game.input.touch.preventDefault = false;\r\n }\r\n \r\n buildWorld() {\r\n //this.height = window.innerHeight-44;\r\n this.height = this.game.height;\r\n var undersea = this.add.image(0, 0, 'undersea');\r\n undersea.scale.setTo(0.8, 0.8);\r\n\r\n //coral\r\n \r\n\r\n undersea.x = -200;\r\n undersea.y = 0;\r\n undersea.height = this.game.height;\r\n undersea.width = this.game.width*5;\r\n\r\n //add water\r\n //this.addWater();\r\n \r\n //\r\n //this.add.sprite(5, 40, 'timer', 1);\r\n\r\n\r\n //\r\n /*\r\n var fish_progress = this.add.image(175,50, 'clownfish_grey');\r\n fish_progress.scale.setTo(-0.3, 0.3);\r\n fish_progress.anchor.setTo(.5,.5);\r\n */\r\n\r\n\r\n\r\n //\r\n var treasure = this.add.image(35, this.height-100, 'treasuresea');\r\n treasure.scale.setTo(0.3, 0.3);\r\n treasure.inputEnabled = true;\r\n treasure.events.onInputDown.add(this.showunlockables, this);\r\n treasure.angle += 10;\r\n\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Fishes Fed: ' + this.totalClicks, 20);\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n\r\n //\r\n /*\r\n var fishtank = this.add.image(5, 100, 'first_aq');\r\n fishtank.scale.setTo(0.2, 0.2);\r\n fishtank.inputEnabled = true;\r\n fishtank.events.onInputDown.add(this.earlyaquarium, this);\r\n */\r\n \r\n /*\r\n var pouch = this.add.image(15,80, 'diamond');\r\n pouch.scale.setTo(0.4, 0.4);\r\n pouch.anchor.setTo(.5,.5);\r\n this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', \"\" + 2, 12);\r\n */\r\n\r\n //this.buildFish();\r\n this.buildAquarium();\r\n\r\n this.showProgressBars();\r\n\r\n //\r\n /*\r\n var meme = this.add.image(window.innerWidth - 140, 1, 'meme');\r\n meme.scale.setTo(0.3, 0.3);\r\n meme.inputEnabled = true;\r\n meme.events.onInputDown.add(this.showBubbles, this);\r\n */\r\n\r\n //\r\n /*\r\n var journal = this.add.image(this.CANVAS_WIDTH - 70, 1, 'fish_journal');\r\n journal.scale.setTo(0.5, 0.5);\r\n journal.inputEnabled = true;\r\n journal.events.onInputDown.add(this.logdata, this);\r\n */\r\n\r\n\r\n //add bubbles\r\n //this.showBubbles();\r\n\r\n this.game.onPause.add(this.yourGamePausedFunc, this);\r\n this.game.onResume.add(this.yourGameResumedFunc, this);\r\n //this.game.onResume.add(yourGameResumedFunc, this);\r\n\r\n //\r\n /*\r\n var banner_shown = window.localStorage['banner_shown_2'] || \"0\";// = 1;\r\n if(banner_shown===\"0\")\r\n this.showBanner();\r\n */\r\n\r\n this.isPaused = false;\r\n\r\n //this.checkReinforcement();\r\n }\r\n\r\n showProgressBars(){\r\n\r\n var current_points = this.totalPoints;\r\n\r\n //------ Left side\r\n\r\n \r\n\r\n //level info\r\n //var levels_progress = this.add.image(5, 55, 'levels_progress');\r\n //levels_progress.scale.setTo(.27, .30);\r\n\r\n /*\r\n //\r\n var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0);\r\n levels_progress.scale.setTo(0.95, 1.2);\r\n\r\n //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1);\r\n var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1);\r\n var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n //progress_sprite.anchor.setTo(0,0);\r\n progress_sprite.scale.setTo(1,1.1);\r\n\r\n\r\n var level_up_icon = this.add.image(18, 68, 'level_up_icon');\r\n level_up_icon.scale.setTo(.5, .5);\r\n level_up_icon.anchor.setTo(.5, .5);\r\n\r\n var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite');\r\n info_level_progress.animations.add('swim');\r\n info_level_progress.animations.play('swim', 1, true);\r\n info_level_progress.scale.setTo(0.3, 0.3);\r\n info_level_progress.anchor.setTo(.5,.5);\r\n info_level_progress.inputEnabled = true;\r\n info_level_progress.events.onInputDown.add(function(){this.showInforBox(\"Info level progress bar clicked\")}, this); \r\n\r\n \r\n //progress_sprite.anchor.setTo(1,0);\r\n //progress_sprite.scale.setTo(0.8,0.8);\r\n */\r\n\r\n var SCALING_FACTOR = 0.8;\r\n\r\n //streak_info\r\n var streak_info = this.add.image(5, 5, 'streak_info');\r\n streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n\r\n /*\r\n var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite');\r\n info_level_streak.animations.add('swim');\r\n info_level_streak.animations.play('swim', 1, true);\r\n info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR);\r\n info_level_streak.anchor.setTo(.5,.5);\r\n info_level_streak.inputEnabled = true;\r\n info_level_streak.events.onInputDown.add(function(){this.showInforBox(\"Streak progress bar clicked\")}, this); \r\n */\r\n\r\n var colors = []; //['grey','grey','grey','grey','grey','grey','grey'];\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n if(this.surveyHistory[i] == 1)\r\n colors[i] = 'green';\r\n else\r\n colors[i] = 'grey';\r\n } \r\n colors = colors.reverse()\r\n \r\n //console.log(\"this.surveyHistory \" + this.surveyHistory);\r\n console.log(\"colors \" + colors);\r\n //colors = ['green','green','green','green','grey','green','grey'];\r\n var streak_tile;\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]);\r\n streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR);\r\n }\r\n\r\n\r\n //------ Right side\r\n //var progressBars = this.add.group();\r\n\r\n //points bar\r\n vertical_position_offset = 13;\r\n var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2');\r\n points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n points_progress.anchor.setTo(1,0);\r\n //progressBars.add(points_progress);\r\n\r\n //point text\r\n var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, \"\" + this.totalPoints, {font:\"20px dumbo_regular\", fill:\"#4c3d01\"});\r\n points_text.anchor.setTo(0.5,0);\r\n points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n //progressBars.add(points_text);\r\n\r\n var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point');\r\n star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n star_icon.anchor.setTo(.5, .5);\r\n //progressBars.add(points_text);\r\n\r\n //progressBars.scale.setTo(.8, .8);\r\n\r\n /*\r\n var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite');\r\n info_points.animations.add('swim');\r\n info_points.animations.play('swim', 1, true);\r\n info_points.scale.setTo(0.3, 0.3);\r\n info_points.anchor.setTo(.5,.5);\r\n info_points.inputEnabled = true;\r\n //function(){doAlert(textString)\r\n info_points.events.onInputDown.add(function(){this.showInforBox(\"Info pregess bar cliccked 2\")}, this); \r\n */\r\n\r\n \r\n //points to get to next fish.\r\n var vertical_position_offset = 35;\r\n\r\n \r\n var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1);\r\n progress_bar_fish.anchor.setTo(1,0);\r\n progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon');\r\n fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR);\r\n fish_progress_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n \r\n //points to get to meme.\r\n vertical_position_offset = 57;\r\n\r\n /*\r\n var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1);\r\n progress_bar_memes.anchor.setTo(1,0);\r\n progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_memes = 0;\r\n var total_number_of_memes = 31;\r\n var already_shown_memes = window.localStorage[\"already_shown_memes3\"];\r\n if(already_shown_memes == undefined)\r\n already_shown_memes = [{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_memes = JSON.parse(window.localStorage[\"already_shown_memes3\"]);\r\n var currently_number_of_unlocked_memes = already_shown_memes.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_memes-start_number_of_memes)/\r\n (total_number_of_memes-start_number_of_memes);\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon');\r\n meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR);\r\n meme_icon.anchor.setTo(.5, .5);\r\n\r\n\r\n //points to get to alt message.\r\n var vertical_position_offset = 79;\r\n var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1);\r\n progress_bar_altruism_message.anchor.setTo(1,0);\r\n progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_alt_messages = 0;\r\n var total_number_of_alt_messages = 21;\r\n\r\n var already_shown_altruism_msgs = window.localStorage[\"already_shown_alt_msg3\"];\r\n if(already_shown_altruism_msgs == undefined)\r\n already_shown_altruism_msgs = [{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_altruism_msgs = JSON.parse(window.localStorage[\"already_shown_alt_msg3\"]);\r\n var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/\r\n (total_number_of_alt_messages-start_number_of_alt_messages);\r\n //if(percent < 0.05)\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Alt Width, \" + rect.width + \",\" + percent);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n \r\n var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon');\r\n alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR);\r\n alt_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n\r\n //points to get to level up.\r\n var vertical_position_offset = 101;\r\n */\r\n\r\n\r\n var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1);\r\n progress_bar_level_up.anchor.setTo(1,0);\r\n progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n // end of level is 1060, start is at 0\r\n var start_point_for_level = 1060;\r\n var end_point_for_level = 2120;\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level);\r\n percent = percent*0.8 + 0.2;\r\n //console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n //console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2');\r\n level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR);\r\n level_up_2.anchor.setTo(.5, .5);\r\n\r\n\r\n\r\n\r\n\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n //console.log(\"countdown.width \" + this.countdown.width);\r\n\r\n \r\n }\r\n\r\n setSurveyHistory(survey_history){\r\n console.log(\"survey_history \" + survey_history + \", length: \" + survey_history.length);\r\n //this.surveyHistory = survey_history;\r\n for(var i=0; i2)\r\n delay += 100;\r\n //this.checkLastBubble(sprite);\r\n }\r\n }\r\n\r\n checkLastBubble2(b) {\r\n /*\r\n if(b.x > window.innerWidth){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n t= this.add.tween(b).to({ x: -100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n */\r\n\r\n //\r\n var graphics = this.add.graphics(0,50);\r\n graphics.lineStyle(0);\r\n graphics.beginFill(0x006622, 0.8);\r\n graphics.drawRect(0, 0, this.game.width, this.game.height-100);\r\n graphics.endFill();\r\n\r\n // Apply the shadow to the Stroke only\r\n //text2.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n //you earned a reward\r\n var pirate = this.add.image(this.game.width-145, 100, 'pirate');\r\n //pirate.anchor.setTo(-0.3, 1.4);\r\n pirate.scale.setTo(0.7, 0.7);\r\n\r\n //\r\n var text3 = this.add.text(10, 60, \"An extra gift\\ntoday\", { font: \"35px Arial Black\", fill: \"#b33e00\" });\r\n text3.stroke = \"#FFE0B2\";\r\n text3.strokeThickness = 4;\r\n\r\n //\r\n var text1 = this.add.text(10, 160, \"for completing\\nactive tasks\", { font: \"24px Arial Black\", fill: \"#b33e00\" });\r\n text1.stroke = \"#FFE0B2\";\r\n text1.strokeThickness = 2;\r\n // Apply the shadow to the Stroke only\r\n text1.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n\r\n //\r\n var text2 = this.add.text(10, this.game.height-130, \"Click on the gift\\nto open\", { font: \"24px Arial Black\", fill: \"#FFE0B2\" });\r\n text2.stroke = \"#FFE0B2\";\r\n text2.strokeThickness = 0;\r\n // Apply the shadow to the Stroke only\r\n //text2.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n //\r\n var sprite = this.add.sprite(this.world.centerX, this.world.centerY, 'gift');\r\n sprite.anchor.setTo(0.9, 0.2);\r\n sprite.scale.setTo(0.35,0.35);\r\n sprite.alpha = 0;\r\n this.add.tween(sprite).to( { alpha: 1 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false);\r\n sprite.inputEnabled = true;\r\n sprite.events.onInputDown.add(this.showReward, this);\r\n \r\n\r\n //\r\n console.log(\"don't know \" + b.y);\r\n }\r\n\r\n showBubbles(){\r\n //add.tween(purplediver).to({ x: this.world.centerX-20 }, 800 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n\r\n var blackdiver = this.add.sprite(this.CANVAS_WIDTH+100, 303, 'submarine');\r\n blackdiver.anchor.setTo(.5,.5);\r\n blackdiver.animations.add('swim');\r\n blackdiver.animations.play('swim', 30, true);\r\n blackdiver.scale.setTo(-1.3, 1.3);\r\n var t = this.add.tween(blackdiver).to({ x: this.world.centerX+20 }, 800 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.addBubbles, this);\r\n }\r\n\r\n addBubbles(){ \r\n var delay = 0;\r\n for (var i = 0; i < 100; i++)\r\n {\r\n var sprite = this.add.sprite(-100 + (this.world.randomX), this.height+100, 'ball');\r\n sprite.scale.set(this.rnd.realInRange(0.3, 0.6));\r\n var speed = this.rnd.between(1000, 2000);\r\n var tween = this.add.tween(sprite);\r\n tween.to({y: -256}, speed, Phaser.Easing.Sinusoidal.In, true, delay, 0, false);\r\n delay += 100;\r\n\r\n if(i==0)\r\n tween.onComplete.add(this.checkLastBubble, this);\r\n\r\n if(i>2)\r\n delay += 100;\r\n //this.checkLastBubble(sprite);\r\n }\r\n }\r\n\r\n checkLastBubble(b) {\r\n /*\r\n if(b.x > window.innerWidth){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n t= this.add.tween(b).to({ x: -100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n */\r\n\r\n //\r\n var graphics = this.add.graphics(0,50);\r\n graphics.lineStyle(0);\r\n graphics.beginFill(0x0288D1, 0.8);\r\n graphics.drawRect(0, 0, this.game.width, this.game.height-100);\r\n graphics.endFill();\r\n\r\n // Apply the shadow to the Stroke only\r\n //text2.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n //you earned a reward\r\n var pirate = this.add.image(this.game.width-145, 100, 'pirate');\r\n //pirate.anchor.setTo(-0.3, 1.4);\r\n pirate.scale.setTo(0.7, 0.7);\r\n\r\n //\r\n var text3 = this.add.text(10, 60, \"An extra gift\\ntoday\", { font: \"35px Arial Black\", fill: \"#b33e00\" });\r\n text3.stroke = \"#FFE0B2\";\r\n text3.strokeThickness = 4;\r\n\r\n //\r\n var text1 = this.add.text(10, 160, \"for filling out\\nthe survey\", { font: \"24px Arial Black\", fill: \"#b33e00\" });\r\n text1.stroke = \"#FFE0B2\";\r\n text1.strokeThickness = 2;\r\n // Apply the shadow to the Stroke only\r\n text1.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n\r\n //\r\n var text2 = this.add.text(10, this.game.height-130, \"Click on the gift\\nto open\", { font: \"24px Arial Black\", fill: \"#FFE0B2\" });\r\n text2.stroke = \"#FFE0B2\";\r\n text2.strokeThickness = 0;\r\n\r\n \r\n \r\n\r\n //\r\n var sprite = this.add.sprite(this.world.centerX, this.world.centerY, 'gift');\r\n sprite.anchor.setTo(0.9, 0.2);\r\n sprite.scale.setTo(0.35,0.35);\r\n sprite.alpha = 0;\r\n this.add.tween(sprite).to( { alpha: 1 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false);\r\n sprite.inputEnabled = true;\r\n sprite.events.onInputDown.add(this.showReward, this);\r\n \r\n\r\n //\r\n console.log(\"don't know \" + b.y);\r\n }\r\n\r\n //show the reward\r\n showReward(){\r\n this.ionic_scope.$emit('show:reinforcement',this.ionic_scope);\r\n }\r\n\r\n\r\n buildAquarium() {\r\n\r\n ////////////////////////////////////////////////////////////\r\n //upper aquarium\r\n ////////////////////////////////////////////////////////////\r\n\r\n /*\r\n this.sharkfish = this.add.sprite(window.innerWidth + 100, 70, 'sharkswim');\r\n this.sharkfish.anchor.setTo(.5,.5);\r\n this.sharkfish.animations.add('swim');\r\n this.sharkfish.animations.play('swim',10, true);\r\n this.sharkfish.scale.setTo(0.3, 0.22);\r\n this.sharkfish.name = \"sharkswim\";\r\n this.gobothways(this.sharkfish);\r\n\r\n //swordfish\r\n this.swordfish = this.add.sprite(-150, 120, 'swordfish');\r\n this.swordfish.anchor.setTo(.5,.5);\r\n this.swordfish.animations.add('swim');\r\n this.swordfish.animations.play('swim',30, true);\r\n this.swordfish.scale.setTo(0.3, 0.3);\r\n this.swordfish.name = \"swordfishswim\";\r\n this.gobothways(this.swordfish);\r\n\r\n this.dolphin = this.add.sprite(-150, 180, 'dolphin');\r\n this.dolphin.anchor.setTo(.5,.5);\r\n this.dolphin.animations.add('swim');\r\n this.dolphin.animations.play('swim',10, true);\r\n this.dolphin.scale.setTo(0.6, 0.6);\r\n this.dolphin.name = \"dolphinswim\";\r\n this.dolphin.angle -= 3;\r\n this.gobothways(this.dolphin);\r\n */\r\n\r\n var phaserJSON = this.game.cache.getJSON('fishpoints');\r\n\r\n ////////////////////////////////////////////////////////////\r\n //upper aquarium\r\n ////////////////////////////////////////////////////////////\r\n var data = phaserJSON;\r\n var survey_string = \"\";\r\n var current_points = this.totalPoints;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points >= data[i].points){\r\n\r\n //nemo\r\n if(data[i].name.valueOf() === \"Blue tang\")\r\n this.addDori();\r\n\r\n\r\n //starfish\r\n if(data[i].name.valueOf() === \"Jelly fish\")\r\n this.addJellyFish();\r\n\r\n //squid\r\n if(data[i].name.valueOf() === \"Green Crab\")\r\n this.addCrab();\r\n\r\n\r\n if(data[i].name.valueOf() === \"Achovies\")\r\n this.addAnchovies();\r\n\r\n if(data[i].name.valueOf() === \"Bubbles\")\r\n this.addYellowTang();\r\n\r\n if(data[i].name.valueOf() === \"Salmon\")\r\n this.addSalmon();\r\n\r\n if(data[i].name.valueOf() === \"Deep undersea fish\")\r\n this.addAngryFish();\r\n\r\n\r\n\r\n //if(data[i].name.valueOf() === \"Tiger barb\")\r\n // this.animateTigerbarb();\r\n }\r\n }\r\n\r\n this.addCoral();\r\n\r\n //set the progres bar\r\n this.previoous_fish_point = 0;\r\n this.next_fish_point = 0;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points < data[i].points){\r\n this.next_fish_point = data[i].points;\r\n break;\r\n }else{\r\n this.previoous_fish_point = data[i].points;\r\n }\r\n }\r\n\r\n /*\r\n //console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point);\r\n this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height);\r\n var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point);\r\n console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * this.progress_sprite.width);\r\n\r\n console.log(\"Width, \" + rect.width + \",\" + this.progress_sprite.width);\r\n this.progress_sprite.crop(rect);\r\n */\r\n\r\n }\r\n\r\n\r\n addAFish(added_point){\r\n\r\n var phaserJSON = this.game.cache.getJSON('fishpoints');\r\n //console.log(JSON.stringify(phaserJSON));\r\n\r\n\r\n var data = phaserJSON;\r\n var survey_string = \"\";\r\n var current_points = this.totalPoints;\r\n var old_points = current_points - added_point;\r\n console.log(\"\" + current_points + \", \" + old_points);\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points >= data[i].points && \r\n old_points < data[i].points){\r\n\r\n //nemo\r\n if(data[i].name.valueOf() === \"Blue tang\")\r\n this.addDori();\r\n\r\n\r\n //starfish\r\n if(data[i].name.valueOf() === \"Jelly fish\")\r\n this.addJellyFish();\r\n\r\n //squid\r\n if(data[i].name.valueOf() === \"Green Crab\")\r\n this.addCrab();\r\n\r\n\r\n if(data[i].name.valueOf() === \"Achovies\")\r\n this.addAnchovies();\r\n\r\n if(data[i].name.valueOf() === \"Bubbles\")\r\n this.addYellowTang();\r\n\r\n if(data[i].name.valueOf() === \"Salmon\")\r\n this.addSalmon();\r\n\r\n if(data[i].name.valueOf() === \"Angry fish\")\r\n this.addAngryFish();\r\n\r\n\r\n //if(data[i].name.valueOf() === \"Tiger barb\")\r\n // this.animateTigerbarb();\r\n\r\n }\r\n }\r\n\r\n //set the progres bar\r\n var previoous_fish_point = 0;\r\n var next_fish_point = 0;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points < data[i].points){\r\n next_fish_point = data[i].points;\r\n break;\r\n }else{\r\n previoous_fish_point = data[i].points;\r\n }\r\n }\r\n //console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point);\r\n var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height);\r\n var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point);\r\n console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point + \",\" + percent);\r\n this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0);\r\n rect.width = 1 * percent * this.progress_sprite.width;\r\n this.progress_sprite.crop(rect);\r\n\r\n }\r\n\r\n addDori() { \r\n ////////////////////////////////////////////////////////////\r\n // mid aquarium\r\n ////////////////////////////////////////////////////////////\r\n /*\r\n if(this.totalPoints >= 1360){//means bubbles are available\r\n var dori = this.add.sprite(90, 100, 'dori');\r\n dori.animations.add('swim');\r\n dori.animations.play('swim', 10, true);\r\n dori.angle -= 10;\r\n dori.scale.setTo(0.5, 0.5);\r\n\r\n var nemo = this.add.sprite(75, 110, 'nemo');\r\n nemo.animations.add('swim');\r\n nemo.animations.play('swim', 7, true);\r\n nemo.angle += 10;\r\n nemo.scale.setTo(-0.5, 0.5);\r\n }else\r\n */\r\n {\r\n this.clownFish = this.add.sprite(-100, 283, 'clownfish');\r\n this.clownFish.anchor.setTo(.5,.5);\r\n this.clownFish.animations.add('swim');\r\n this.clownFish.animations.play('swim', 10, true);\r\n this.clownFish.scale.setTo(0.5, 0.5);\r\n this.clownFish.name = \"clownFish\";\r\n this.gobothways(this.clownFish);\r\n\r\n this.clownFish = this.add.sprite(-100, 218, 'dori');\r\n this.clownFish.anchor.setTo(.1,.1);\r\n this.clownFish.animations.add('swim');\r\n this.clownFish.animations.play('swim', 10, true);\r\n this.clownFish.scale.setTo(0.5, 0.5);\r\n this.clownFish.name = \"clownFish\";\r\n this.gobothways(this.clownFish);\r\n }\r\n\r\n }\r\n\r\n addYellowTang() { \r\n var yellowtang = this.add.sprite(this.CANVAS_WIDTH + 70, 120, 'yellowtang');\r\n yellowtang.animations.add('swim');\r\n yellowtang.animations.play('swim', 10, true);\r\n yellowtang.scale.setTo(0.45, 0.45);\r\n //yellowtang.angle -= 10;\r\n yellowtang.anchor.setTo(.5,.5);\r\n this.gobothways(yellowtang);\r\n }\r\n\r\n\r\n addJellyFish() { \r\n\r\n //\r\n var jellyfish = this.add.sprite(this.CANVAS_WIDTH - 80, 100, 'jellyfish');\r\n jellyfish.animations.add('swim');\r\n jellyfish.animations.play('swim', 15, true);\r\n jellyfish.scale.setTo(0.25, 0.25);\r\n this.add.tween(jellyfish).to({ y: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true);\r\n\r\n }\r\n\r\n\r\n addSalmon() { \r\n var salmon = this.add.sprite(-250, 370, 'salmon');\r\n salmon.animations.add('swim');\r\n salmon.animations.play('swim', 10, true);\r\n salmon.scale.setTo(0.4, 0.4);\r\n salmon.anchor.setTo(.5,.5);\r\n this.gobothways(salmon);\r\n\r\n\r\n ////////////////////////////////////////////////////////////\r\n // bottom aquarium\r\n ////////////////////////////////////////////////////////////\r\n\r\n //\r\n /*\r\n var whale = this.add.sprite(window.innerWidth+150, this.height-100, 'whale');\r\n whale.animations.add('swim');\r\n whale.animations.play('swim', 12, true);\r\n whale.scale.setTo(1.8, 1.8);\r\n whale.anchor.setTo(.5,.5);\r\n whale.angle += 5;\r\n whale.name = \"whaleswim\";\r\n this.gobothways(whale);\r\n */\r\n\r\n }\r\n\r\n\r\n addCrab() { \r\n var redcrab = this.add.sprite(this.CANVAS_WIDTH-30, this.height-105, 'redcrab');\r\n redcrab.animations.add('swim');\r\n redcrab.animations.play('swim', 15, true);\r\n redcrab.scale.setTo(-0.3, 0.3);\r\n\r\n //\r\n var greencrab = this.add.sprite(this.CANVAS_WIDTH-240, this.height-85, 'greencrab');\r\n greencrab.animations.add('swim');\r\n greencrab.animations.play('swim', 15, true);\r\n greencrab.scale.setTo(0.3, 0.3);\r\n\r\n //angryfish\r\n //var angryfish = this.add.sprite(220, this.height-205, 'angryfish');\r\n //angryfish.animations.add('swim');\r\n //angryfish.animations.play('swim', 15, true);\r\n //angryfish.scale.setTo(0.35, 0.35);\r\n }\r\n\r\n\r\n\r\n //angryfish\r\n //var angryfish = this.add.sprite(220, this.height-205, 'angryfish');\r\n //angryfish.animations.add('swim');\r\n //angryfish.animations.play('swim', 15, true);\r\n //angryfish.scale.setTo(0.35, 0.35);\r\n\r\n addAngryFish() { \r\n this.angryfish = this.add.sprite(-100, this.height-150, 'angryfish');\r\n this.angryfish.anchor.setTo(1.2,.5);\r\n this.angryfish.animations.add('swim');\r\n this.angryfish.animations.play('swim',20, true);\r\n this.angryfish.scale.setTo(0.4, 0.4);\r\n this.angryfish.name = \"angryfishswim\";\r\n this.gobothways(this.angryfish);\r\n\r\n\r\n }\r\n\r\n addAnchovies() { \r\n //\r\n this.blueanchovy = this.add.sprite(-100, this.height-250, 'blueanchovy');\r\n this.blueanchovy.anchor.setTo(.9,.9);\r\n this.blueanchovy.animations.add('swim');\r\n this.blueanchovy.animations.play('swim',4, true);\r\n this.blueanchovy.scale.setTo(0.18, 0.18);\r\n this.blueanchovy.name = \"blueanchovyswim\";\r\n this.gobothways(this.blueanchovy);\r\n\r\n this.greenanchovy = this.add.sprite(-100, this.height-235, 'greenanchovy');\r\n this.greenanchovy.anchor.setTo(.5,.5);\r\n this.greenanchovy.animations.add('swim');\r\n this.greenanchovy.animations.play('swim',8, true);\r\n this.greenanchovy.scale.setTo(0.13, 0.13);\r\n this.greenanchovy.name = \"greenanchovyswim\";\r\n this.gobothways(this.greenanchovy);\r\n\r\n this.pinkanchovy = this.add.sprite(-100, this.height-270, 'pinkanchovy');\r\n this.pinkanchovy.anchor.setTo(.2,.2);\r\n this.pinkanchovy.animations.add('swim');\r\n this.pinkanchovy.animations.play('swim',2, true);\r\n this.pinkanchovy.scale.setTo(0.21, 0.21);\r\n this.pinkanchovy.name = \"pinkanchovyswim\";\r\n this.gobothways(this.pinkanchovy);\r\n\r\n }\r\n \r\n\r\n addCoral() { \r\n //\r\n var coral = this.add.image(0, this.height-90, 'coral');\r\n coral.scale.setTo(0.7, 0.7);\r\n \r\n }\r\n\r\n showunlockables(){\r\n console.log('treasure box clicked');\r\n this.componentObject.goToRewardsPage();\r\n }\r\n\r\n gobothways(b){\r\n //console.log('start again ' + b.name);\r\n\r\n //if()\r\n /*\r\n if(b.x > window.innerWidth){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n t= this.add.tween(b).to({ x: -100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n //console.log('left to right, ' + b.x);\r\n b.scale.x = -1*b.scale.x;\r\n t = this.add.tween(b).to({ x: window.innerWidth + 100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n */\r\n\r\n var change_amount = Math.floor(this.rnd.realInRange(0, 50));\r\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\r\n change_amount = 3*change_amount;\r\n var pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n while((pos_y > this.height) || (pos_y < 70)){\r\n pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n }\r\n\r\n\r\n var t;\r\n //if()\r\n if(b.x > this.CANVAS_WIDTH){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n //t= this.add.tween(b).to({ x: -200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t= this.add.tween(b).to({ x: -100+Math.floor(this.rnd.realInRange(0, 50)), y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 4000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n //console.log('left to right, ' + b.x);\r\n b.scale.x = -1*b.scale.x;\r\n //t = this.add.tween(b).to({ x: window.innerWidth + 200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t = this.add.tween(b).to({ x: this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)), y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 4000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n\r\n //if()\r\n /*\r\n if(b.x > window.innerWidth){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n //t= this.add.tween(b).to({ x: -200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t= this.add.tween(b).to({ x: -100 }, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n //console.log('left to right, ' + b.x);\r\n b.scale.x = -1*b.scale.x;\r\n //t = this.add.tween(b).to({ x: window.innerWidth + 200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t = this.add.tween(b).to({ x: window.innerWidth + 100 }, 7500 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }*/\r\n } \r\n \r\n buildFish() {\r\n \r\n //assign number of fish\r\n numfish = 5;\r\n //assign type and age of fish\r\n var fishType = [\"green4\", \"horse4\", \"purple4\", \"pink4\", \"magenta4\"]\r\n this.fishGroup = this.add.group();\r\n this.fishGroup.enableBody = true;\r\n for(i = 0; i < numfish; i++){\r\n var b = this.fishGroup.create(this.rnd.integerInRange(0, this.world.width), this.rnd.integerInRange(this.world.height-300, this.world.height-200), fishType[i]);\r\n b.scale.setTo(0.4, 0.8);\r\n b.anchor.setTo(0.5, 0.5);\r\n b.body.moves = false;\r\n b.inputEnabled = true;\r\n b.events.onInputDown.add(this.addTally, this);\r\n this.assignFishMovement(b);\r\n }\r\n\r\n }\r\n \r\n assignFishMovement(b) {\r\n xposition = Math.floor(this.rnd.realInRange(50, this.world.width-50));\r\n yposition = Math.floor(this.rnd.realInRange(100, this.world.height-200));\r\n bdelay = this.rnd.integerInRange(2000, 6000);\r\n if(xposition < b.x){\r\n b.scale.x = -1;\r\n }else{\r\n b.scale.x = 1;\r\n }\r\n t = this.add.tween(b).to({x:xposition, y:yposition}, 3500, Phaser.Easing.Quadratic.InOut, true, bdelay);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n \r\n stopFish(b) {\r\n //this.assignFishMovement(b);\r\n this.gobothways(b);\r\n }\r\n \r\n addTally() {\r\n this.totalClicks = this.totalClicks + 1;\r\n this.countdown.setText('Fishes Fed: ' + this.totalClicks);\r\n }\r\n\r\n updatescore (added_points) {\r\n console.log(\"Update score called inside game, \" + this.ionic_scope.total_points);\r\n this.totalPoints = this.ionic_scope.total_points;\r\n this.addAFish(added_points);\r\n this.countdown.setText('Points: ' + this.totalPoints);\r\n }\r\n\r\n setTotalPoints(totalPoints){\r\n\t\tthis.totalPoints = totalPoints;\r\n }\r\n \r\n assignscope(componentObject){\r\n this.componentObject = componentObject;\r\n }\r\n}","export class PreloaderL3 extends Phaser.State {\r\n\t\r\n\tpreload(){\r\n\r\n\t\t//console.log(\"Preloader: preload called\"); \r\n\r\n\t\tthis.load.onLoadComplete.addOnce(this.onLoadComplete, this);\r\n\r\n\t\tthis.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar');\r\n\t\tthis.preloadBar.anchor.setTo(0.5, 0.5);\r\n\t\tthis.load.setPreloadSprite(this.preloadBar);\r\n \r\n //---- both aquariums\r\n this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt');\r\n\t\tthis.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points\r\n\t\tthis.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png');\r\n\t\t//this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20);\r\n\r\n\t\tthis.add.text(0, 0, \"hack\", {font:\"1px dumbo_regular\", fill:\"#FFFFFF\"});\r\n\t\t//this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20);\r\n\t\tthis.load.image('points_progress_2', 'assets/img/points_progress_2.png');\r\n\t\tthis.load.image('levels_progress', 'assets/img/levels_progress_2.png');\r\n\t\tthis.load.image('streak_info', 'assets/img/streak_info_2.png');\r\n\t\tthis.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20);\r\n\t\tthis.load.image('alt_icon', 'assets/img/heart.png');\r\n\t\tthis.load.image('next_fish_icon', 'assets/img/fish_icon_2.png');\r\n\t\tthis.load.image('meme_icon', 'assets/img/smiley_face.png');\r\n\t\tthis.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20);\r\n\t\tthis.load.image('level_up_icon', 'assets/img/level_icon.png');\r\n\t\tthis.load.image('level_up_2', 'assets/img/level_up_2.png');\r\n\t\tthis.load.image('streak_green', 'assets/img/streak_green.png');\r\n\t\tthis.load.image('streak_red', 'assets/img/streak_red_2.png');\r\n\t\tthis.load.image('streak_grey', 'assets/img/streak_grey.png');\r\n\t\tthis.load.image('star_point', 'assets/img/star.png');\r\n\t\tthis.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json');\r\n\t\t\r\n\r\n\t\tvar max = 8;\r\n\t\tvar min = 1;\r\n\t\tvar rand_num = Math.floor(Math.random() * (max - min + 1)) + min;\r\n\t\tconsole.log('assets/img/pirate-' + rand_num + '.png');\r\n\t\tthis.load.image('pirate', 'assets/img/pirate-' + rand_num + '.png');\r\n\r\n\t\tvar\tusername = window.localStorage['username'] || 'unknown';\r\n\r\n this.isStudyParticipant = username.indexOf('-study-') !== -1; // !== -1;\r\n\t\tthis.loadSea();\r\n\r\n\t\t//--- RedBanner.png\r\n\t\tthis.load.image('banner', 'assets/img/RedBanner.png');\r\n\t\tthis.load.image('banner_fish', 'assets/img/banner_fish.png');\r\n\r\n\r\n\t\t//----\r\n\t\tvar next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png';\r\n\t\tconsole.log(\"Next fish: \" + next_fish);\r\n\t\tthis.load.image('clownfish_grey', next_fish);\r\n\r\n\t\tthis.load.image('diamond', 'assets/img/diamond.png');\r\n\r\n\t\tvar progressDisplay = 0;\r\n\t\tvar timerEvt = this.time.events.loop(100, function (){\r\n if(this.load.progress < 100){\r\n \tprogressDisplay++;\r\n console.log('loading... '+(this.load.progress)+'%' + \"; \" + (100*progressDisplay));\r\n }else{\r\n //loadingText.text = 'Ready, Go!';\r\n console.log('Ready, Go!');\r\n this.time.events.remove(timerEvt);\r\n }\r\n\r\n }, this);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tconsole.log(\"Preloader: create called\");\r\n\t\tthis.preloadBar.cropEnabled = false;\r\n\t}\r\n\r\n\tupdate()\r\n\t{\r\n\t\tconsole.log(\"update: \"+ \"SeaLevelL3\");\r\n\t\tthis.state.start('SeaLevelL3');\r\n\t}\r\n\r\n\tonLoadComplete(){\r\n\t console.log(\"Load complete\");\r\n\t this.ready = true;\r\n\t}\r\n\r\n\tloadSea(){\r\n //second aquarium\r\n //-- fish_journal\r\n\t\tconsole.log(\"Inside loadSea\");\r\n this.load.image('fish_journal', 'assets/img/fish_journal.png');\r\n\r\n //--- sea\r\n\t\tthis.load.image('undersea', 'assets/img/underwaterbr.jpg'); \t\r\n this.load.image('treasuresea', 'assets/img/treasuresea.png');\r\n\t\tthis.load.image('coral', 'assets/img/seabed.png');\r\n\t\tthis.load.atlasJSONArray('clownfish', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json');\r\n\t\tthis.load.atlasJSONArray('dori', 'assets/game/sprite/dory2.png', 'assets/game/sprite/dory2.json');\r\n\t\tthis.load.atlasJSONArray('jellyfish', 'assets/game/sprite/jellyfish.png', 'assets/game/sprite/jellyfish.json');\r\n\t\tthis.load.atlasJSONArray('redcrab', 'assets/game/sprite/redcrab.png', 'assets/game/sprite/redcrab.json');\r\n\t\tthis.load.atlasJSONArray('greencrab', 'assets/game/sprite/greencrab.png', 'assets/game/sprite/greencrab.json');\r\n\t\tthis.load.atlasJSONArray('angryfish', 'assets/game/sprite/angryfish.png', 'assets/game/sprite/angryfish.json');\r\n\t\tthis.load.atlasJSONArray('salmon', 'assets/game/sprite/salmon.png', 'assets/game/sprite/salmon.json');\r\n\t\tthis.load.atlasJSONArray('yellowtang', 'assets/game/sprite/yellowtang.png', 'assets/game/sprite/yellowtang.json');\r\n\t\tthis.load.spritesheet('blueanchovy', 'assets/game/sprite/blueanchovy.png', 512, 125, 4);\r\n\t\tthis.load.spritesheet('greenanchovy', 'assets/game/sprite/greenanchovy.png', 512, 125, 4);\r\n\t\tthis.load.spritesheet('pinkanchovy', 'assets/game/sprite/pinkanchovy.png', 512, 125, 4);\r\n\r\n\t\t//this.load.atlasJSONArray('sharkswim', 'assets/game/sprite/sharkswimming.png', 'assets/game/sprite/sharkswimming.json');\r\n //this.load.atlasJSONArray('nemo', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json');\r\n\t\t//this.load.atlasJSONArray('swordfish', 'assets/game/sprite/swordfish.png', 'assets/game/sprite/swordfish.json');\r\n\t\t//this.load.atlasJSONArray('dolphin', 'assets/game/sprite/dolphin.png', 'assets/game/sprite/dolphin.json');\r\n\t\t//this.load.atlasJSONArray('kitefish', 'assets/game/sprite/kitefish.png', 'assets/game/sprite/kitefish.json');\r\n\t\t//this.load.atlasJSONArray('whale', 'assets/game/sprite/whale.png', 'assets/game/sprite/whale.json');\r\n\r\n\t\t\r\n\t\t//\r\n\t\t//this.load.image('gotosea', 'assets/img/gotosea.png');\r\n\r\n\t\t//first_aq\r\n\t\t//this.load.image('first_aq', 'assets/img/first_aq.png');\r\n\r\n\t\t\r\n\r\n\t\t//submarine\r\n\t\t//this.load.atlasJSONArray('submarine', 'assets/game/sprite/submarine.png', 'assets/game/sprite/submarine.json');\r\n\t\t//this.load.atlasJSONArray('submarine_at', 'assets/game/sprite/submarine_at.png', 'assets/game/sprite/submarine_at.json');\r\n\r\n\t\t//this.preloadBar.destroy();\r\n\r\n\t}\r\n}","export class BootL4 extends Phaser.State {\r\n preload() {\r\n this.load.image('preloaderBar', 'assets/img/loader_bar.png');\r\n }\r\n \r\n create() {\r\n\t\tthis.input.maxPointers = 1;\r\n\t\tif(this.game.device.touch){\r\n\t\t\tthis.input.mouse.stop();\r\n\t\t}\r\n\t\tthis.stage.disableVisibilityChange = false;\r\n\t\t//this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;\r\n\t\tthis.scale.minWidth = 270;\r\n\t\tthis.scale.minHeight = 400;\r\n\t\tthis.scale.pageAlignHorizontally = true;\r\n\t\tthis.scale.pageAlignVertically = true;\r\n\t\tthis.stage.forcePortrait = true;\r\n\t\t//this.scale.setScreenSize(true);\r\n\r\n\t\tthis.input.addPointer();\r\n\r\n\t\t//Change color here \r\n\t\t//-- http://www.w3schools.com/colors/colors_picker.asp\r\n\t\tthis.stage.backgroundColor = '#095e98';\r\n \r\n\t\tthis.state.start('Preloader');\r\n\t\tconsole.log(\"Boot completed\");\r\n\t\r\n }\r\n}","export class SeaLevelL4 extends Phaser.State {\r\n //componentObject;\r\n constructor(){\r\n super();\r\n this.componentObject;\r\n this.surveyHistory = [];\r\n }\r\n \r\n create(){\r\n this.gameover = false;\r\n this.totalClicks = 0;\r\n\r\n this.CANVAS_WIDTH = 382.0;\r\n if(window.innerWidth > this.CANVAS_WIDTH)\r\n this.CANVAS_WIDTH = window.innerWidth;\r\n\r\n this.buildWorld();\r\n\r\n\r\n this.inputEnabled = false;\r\n\r\n Phaser.Canvas.setTouchAction(this.game.canvas, \"auto\");\r\n this.game.input.touch.preventDefault = false;\r\n }\r\n \r\n buildWorld() {\r\n console.log(\"Inside Level1 buildWorld()\");\r\n this.height = this.game.height;\r\n var undersea = this.add.image(0, 0, 'undersea');\r\n undersea.scale.setTo(0.8, 0.8);\r\n\r\n //coral\r\n undersea.x = -200;\r\n undersea.y = 0;\r\n undersea.height = this.game.height;\r\n undersea.width = this.game.width*5;\r\n\r\n //\r\n //this.add.sprite(5, 40, 'timer', 1);\r\n\r\n\r\n //\r\n /*\r\n var fish_progress = this.add.image(175,50, 'clownfish_grey');\r\n fish_progress.scale.setTo(-0.3, 0.3);\r\n fish_progress.anchor.setTo(.5,.5);\r\n */\r\n \r\n\r\n var treasure = this.add.image(35, this.height-80, 'treasuresea');\r\n treasure.scale.setTo(0.3, 0.3);\r\n treasure.inputEnabled = true;\r\n treasure.events.onInputDown.add(this.showunlockables, this);\r\n treasure.angle += 10;\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n\r\n //\r\n /*\r\n var fishtank = this.add.image(5, 100, 'first_aq');\r\n fishtank.scale.setTo(0.2, 0.2);\r\n fishtank.inputEnabled = true;\r\n fishtank.events.onInputDown.add(this.earlyaquarium, this);\r\n */\r\n\r\n /*\r\n var pouch = this.add.image(15,80, 'diamond');\r\n pouch.scale.setTo(0.4, 0.4);\r\n pouch.anchor.setTo(.5,.5);\r\n this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', \"\" + 2, 12);\r\n */\r\n\r\n //this.buildFish();\r\n this.buildAquarium();\r\n\r\n this.showProgressBars();\r\n\r\n //\r\n /*\r\n var journal = this.add.image(this.CANVAS_WIDTH - 70, 1, 'fish_journal');\r\n journal.scale.setTo(0.5, 0.5);\r\n journal.inputEnabled = true;\r\n journal.events.onInputDown.add(this.logdata, this);\r\n */\r\n\r\n \r\n\r\n //\r\n /*\r\n var meme = this.add.image(window.innerWidth - 140, 1, 'meme');\r\n meme.scale.setTo(0.3, 0.3);\r\n meme.inputEnabled = true;\r\n meme.events.onInputDown.add(this.showBubbles, this);\r\n */\r\n \r\n\r\n //text.anchor.set(0.5);\r\n\r\n //banner.inputEnabled = true;\r\n //banner.events.onInputDown.add(this.showBubbles, this);\r\n\r\n setTimeout(function () {\r\n //checkReinforcement(); \r\n\r\n }, 500);\r\n\r\n\r\n //\r\n // var banner_shown = window.localStorage['banner_shown'] || \"0\";// = 1;\r\n // if(banner_shown===\"0\")\r\n // this.showBanner();\r\n // this.showBanner();\r\n\r\n //\r\n /*\r\n var banner_shown = window.localStorage['banner_shown_2'] || \"0\";// = 1;\r\n if(banner_shown===\"0\")\r\n this.showBanner();\r\n */\r\n \r\n // \r\n this.game.onPause.add(this.yourGamePausedFunc, this);\r\n this.game.onResume.add(this.yourGameResumedFunc, this);\r\n\r\n //this.checkReinforcement();\r\n }\r\n\r\n showProgressBars(){\r\n\r\n var current_points = this.totalPoints;\r\n\r\n //------ Left side\r\n\r\n \r\n\r\n //level info\r\n //var levels_progress = this.add.image(5, 55, 'levels_progress');\r\n //levels_progress.scale.setTo(.27, .30);\r\n\r\n /*\r\n //\r\n var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0);\r\n levels_progress.scale.setTo(0.95, 1.2);\r\n\r\n //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1);\r\n var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1);\r\n var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n //progress_sprite.anchor.setTo(0,0);\r\n progress_sprite.scale.setTo(1,1.1);\r\n\r\n\r\n var level_up_icon = this.add.image(18, 68, 'level_up_icon');\r\n level_up_icon.scale.setTo(.5, .5);\r\n level_up_icon.anchor.setTo(.5, .5);\r\n\r\n var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite');\r\n info_level_progress.animations.add('swim');\r\n info_level_progress.animations.play('swim', 1, true);\r\n info_level_progress.scale.setTo(0.3, 0.3);\r\n info_level_progress.anchor.setTo(.5,.5);\r\n info_level_progress.inputEnabled = true;\r\n info_level_progress.events.onInputDown.add(function(){this.showInforBox(\"Info level progress bar clicked\")}, this); \r\n\r\n \r\n //progress_sprite.anchor.setTo(1,0);\r\n //progress_sprite.scale.setTo(0.8,0.8);\r\n */\r\n\r\n var SCALING_FACTOR = 0.8;\r\n\r\n //streak_info\r\n var streak_info = this.add.image(5, 5, 'streak_info');\r\n streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n\r\n /*\r\n var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite');\r\n info_level_streak.animations.add('swim');\r\n info_level_streak.animations.play('swim', 1, true);\r\n info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR);\r\n info_level_streak.anchor.setTo(.5,.5);\r\n info_level_streak.inputEnabled = true;\r\n info_level_streak.events.onInputDown.add(function(){this.showInforBox(\"Streak progress bar clicked\")}, this); \r\n */\r\n\r\n var colors = []; //['grey','grey','grey','grey','grey','grey','grey'];\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n if(this.surveyHistory[i] == 1)\r\n colors[i] = 'green';\r\n else\r\n colors[i] = 'grey';\r\n } \r\n colors = colors.reverse()\r\n \r\n //console.log(\"this.surveyHistory \" + this.surveyHistory);\r\n console.log(\"colors \" + colors);\r\n //colors = ['green','green','green','green','grey','green','grey'];\r\n var streak_tile;\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]);\r\n streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR);\r\n }\r\n\r\n\r\n //------ Right side\r\n //var progressBars = this.add.group();\r\n\r\n //points bar\r\n vertical_position_offset = 13;\r\n var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2');\r\n points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n points_progress.anchor.setTo(1,0);\r\n //progressBars.add(points_progress);\r\n\r\n //point text\r\n var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, \"\" + this.totalPoints, {font:\"20px dumbo_regular\", fill:\"#4c3d01\"});\r\n points_text.anchor.setTo(0.5,0);\r\n points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n //progressBars.add(points_text);\r\n\r\n var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point');\r\n star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n star_icon.anchor.setTo(.5, .5);\r\n //progressBars.add(points_text);\r\n\r\n //progressBars.scale.setTo(.8, .8);\r\n\r\n /*\r\n var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite');\r\n info_points.animations.add('swim');\r\n info_points.animations.play('swim', 1, true);\r\n info_points.scale.setTo(0.3, 0.3);\r\n info_points.anchor.setTo(.5,.5);\r\n info_points.inputEnabled = true;\r\n //function(){doAlert(textString)\r\n info_points.events.onInputDown.add(function(){this.showInforBox(\"Info pregess bar cliccked 2\")}, this); \r\n */\r\n\r\n \r\n //points to get to next fish.\r\n vertical_position_offset = 35;\r\n var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1);\r\n progress_bar_fish.anchor.setTo(1,0);\r\n progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon');\r\n fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR);\r\n fish_progress_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n \r\n //points to get to meme.\r\n var vertical_position_offset = 57;\r\n\r\n /*\r\n var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1);\r\n progress_bar_memes.anchor.setTo(1,0);\r\n progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_memes = 0;\r\n var total_number_of_memes = 31;\r\n var already_shown_memes = window.localStorage[\"already_shown_memes3\"];\r\n if(already_shown_memes == undefined)\r\n already_shown_memes = [{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_memes = JSON.parse(window.localStorage[\"already_shown_memes3\"]);\r\n var currently_number_of_unlocked_memes = already_shown_memes.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_memes-start_number_of_memes)/\r\n (total_number_of_memes-start_number_of_memes);\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon');\r\n meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR);\r\n meme_icon.anchor.setTo(.5, .5);\r\n\r\n\r\n //points to get to alt message.\r\n var vertical_position_offset = 79;\r\n var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1);\r\n progress_bar_altruism_message.anchor.setTo(1,0);\r\n progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_alt_messages = 0;\r\n var total_number_of_alt_messages = 21;\r\n\r\n var already_shown_altruism_msgs = window.localStorage[\"already_shown_alt_msg3\"];\r\n if(already_shown_altruism_msgs == undefined)\r\n already_shown_altruism_msgs = [{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_altruism_msgs = JSON.parse(window.localStorage[\"already_shown_alt_msg3\"]);\r\n var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/\r\n (total_number_of_alt_messages-start_number_of_alt_messages);\r\n //if(percent < 0.05)\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Alt Width, \" + rect.width + \",\" + percent);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n \r\n var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon');\r\n alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR);\r\n alt_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n\r\n //points to get to level up.\r\n var vertical_position_offset = 101;\r\n */\r\n\r\n var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1);\r\n progress_bar_level_up.anchor.setTo(1,0);\r\n progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n // end of level is 1060, start is at 0\r\n var start_point_for_level = 1060;\r\n var end_point_for_level = 2120;\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level);\r\n percent = percent*0.8 + 0.2;\r\n //console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n //console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2');\r\n level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR);\r\n level_up_2.anchor.setTo(.5, .5);\r\n\r\n\r\n\r\n\r\n\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n //console.log(\"countdown.width \" + this.countdown.width);\r\n\r\n \r\n }\r\n\r\n setSurveyHistory(survey_history){\r\n console.log(\"survey_history \" + survey_history + \", length: \" + survey_history.length);\r\n //this.surveyHistory = survey_history;\r\n for(var i=0; i2)\r\n delay += 100;\r\n //this.checkLastBubble(sprite);\r\n }\r\n }\r\n\r\n checkLastBubble2(b) {\r\n /*\r\n if(b.x > window.innerWidth){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n t= this.add.tween(b).to({ x: -100 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n */\r\n\r\n //\r\n var graphics = this.add.graphics(0,50);\r\n graphics.lineStyle(0);\r\n graphics.beginFill(0x006622, 0.8);\r\n graphics.drawRect(0, 0, this.game.width, this.game.height-100);\r\n graphics.endFill();\r\n\r\n // Apply the shadow to the Stroke only\r\n //text2.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n //you earned a reward\r\n var pirate = this.add.image(this.game.width-145, 100, 'pirate');\r\n //pirate.anchor.setTo(-0.3, 1.4);\r\n pirate.scale.setTo(0.7, 0.7);\r\n\r\n //\r\n var text3 = this.add.text(10, 60, \"An extra gift\\ntoday\", { font: \"35px Arial Black\", fill: \"#b33e00\" });\r\n text3.stroke = \"#FFE0B2\";\r\n text3.strokeThickness = 4;\r\n\r\n //\r\n var text1 = this.add.text(10, 160, \"for completing\\nactive tasks\", { font: \"24px Arial Black\", fill: \"#b33e00\" });\r\n text1.stroke = \"#FFE0B2\";\r\n text1.strokeThickness = 2;\r\n // Apply the shadow to the Stroke only\r\n text1.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n\r\n //\r\n var text2 = this.add.text(10, this.game.height-130, \"Click on the gift\\nto open\", { font: \"24px Arial Black\", fill: \"#FFE0B2\" });\r\n text2.stroke = \"#FFE0B2\";\r\n text2.strokeThickness = 0;\r\n // Apply the shadow to the Stroke only\r\n //text2.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n //\r\n var sprite = this.add.sprite(this.world.centerX, this.world.centerY, 'gift');\r\n sprite.anchor.setTo(0.9, 0.2);\r\n sprite.scale.setTo(0.35,0.35);\r\n sprite.alpha = 0;\r\n this.add.tween(sprite).to( { alpha: 1 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false);\r\n sprite.inputEnabled = true;\r\n sprite.events.onInputDown.add(this.showReward, this);\r\n \r\n\r\n //\r\n //console.log(\"don't know \" + b.y);\r\n }\r\n\r\n\r\n showBubbles(){\r\n //add.tween(purplediver).to({ x: this.world.centerX-20 }, 800 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n\r\n var blackdiver = this.add.sprite(this.CANVAS_WIDTH+100, 303, 'submarine');\r\n blackdiver.anchor.setTo(.5,.5);\r\n blackdiver.animations.add('swim');\r\n blackdiver.animations.play('swim', 30, true);\r\n blackdiver.scale.setTo(-1.3, 1.3);\r\n var t = this.add.tween(blackdiver).to({ x: this.world.centerX+20 }, 800 + Math.floor(this.rnd.realInRange(0, 2000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.addBubbles, this);\r\n }\r\n\r\n\r\n\r\n addBubbles(){ \r\n var delay = 0;\r\n for (var i = 0; i < 100; i++)\r\n {\r\n var sprite = this.add.sprite(-100 + (this.world.randomX), this.height+100, 'ball');\r\n sprite.scale.set(this.rnd.realInRange(0.3, 0.6));\r\n var speed = this.rnd.between(1000, 2000);\r\n var tween = this.add.tween(sprite);\r\n tween.to({y: -256}, speed, Phaser.Easing.Sinusoidal.In, true, delay, 0, false);\r\n delay += 100;\r\n\r\n if(i==0)\r\n tween.onComplete.add(this.checkLastBubble, this);\r\n\r\n if(i>2)\r\n delay += 100;\r\n //this.checkLastBubble(sprite);\r\n }\r\n }\r\n\r\n checkLastBubble(b) {\r\n\r\n //\r\n var graphics = this.add.graphics(0,50);\r\n graphics.lineStyle(0);\r\n graphics.beginFill(0x0288D1, 0.8);\r\n graphics.drawRect(0, 0, this.game.width, this.game.height-100);\r\n graphics.endFill();\r\n\r\n // Apply the shadow to the Stroke only\r\n //text2.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n //you earned a reward\r\n var pirate = this.add.image(this.game.width-145, 100, 'pirate');\r\n //pirate.anchor.setTo(-0.3, 1.4);\r\n pirate.scale.setTo(0.7, 0.7);\r\n\r\n //\r\n var text3 = this.add.text(10, 60, \"An extra gift\\ntoday\", { font: \"35px Arial Black\", fill: \"#b33e00\" });\r\n text3.stroke = \"#FFE0B2\";\r\n text3.strokeThickness = 4;\r\n\r\n //\r\n var text1 = this.add.text(10, 160, \"for filling out\\nthe survey\", { font: \"24px Arial Black\", fill: \"#b33e00\" });\r\n text1.stroke = \"#FFE0B2\";\r\n text1.strokeThickness = 2;\r\n // Apply the shadow to the Stroke only\r\n text1.setShadow(2, 2, \"#E65100\", 2, true, false);\r\n\r\n\r\n //\r\n var text2 = this.add.text(10, this.game.height-130, \"Click on the gift\\nto open\", { font: \"24px Arial Black\", fill: \"#FFE0B2\" });\r\n text2.stroke = \"#FFE0B2\";\r\n text2.strokeThickness = 0;\r\n\r\n \r\n \r\n\r\n //\r\n var sprite = this.add.sprite(this.world.centerX, this.world.centerY, 'gift');\r\n sprite.anchor.setTo(0.9, 0.2);\r\n sprite.scale.setTo(0.35,0.35);\r\n sprite.alpha = 0;\r\n this.add.tween(sprite).to( { alpha: 1 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false);\r\n sprite.inputEnabled = true;\r\n sprite.events.onInputDown.add(this.showReward, this);\r\n \r\n\r\n //\r\n console.log(\"don't know \" + b.y);\r\n }\r\n\r\n //show the reward\r\n showReward(){\r\n this.ionic_scope.$emit('show:reinforcement',this.ionic_scope);\r\n }\r\n\r\n\r\n buildAquarium() {\r\n\r\n var phaserJSON = this.game.cache.getJSON('fishpoints');\r\n\r\n ////////////////////////////////////////////////////////////\r\n //upper aquarium\r\n ////////////////////////////////////////////////////////////\r\n var data = phaserJSON;\r\n var survey_string = \"\";\r\n var current_points = this.totalPoints;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points >= data[i].points){\r\n\r\n //nemo\r\n if(data[i].name.valueOf() === \"Blue tang\")\r\n this.addDori();\r\n\r\n //starfish\r\n if(data[i].name.valueOf() === \"Jelly fish\")\r\n this.addJellyFish();\r\n\r\n //squid\r\n if(data[i].name.valueOf() === \"Green Crab\")\r\n this.addCrab();\r\n\r\n\r\n if(data[i].name.valueOf() === \"Achovies\")\r\n this.addAnchovies();\r\n\r\n if(data[i].name.valueOf() === \"Bubbles\")\r\n this.addYellowTang();\r\n\r\n if(data[i].name.valueOf() === \"Salmon\")\r\n this.addSalmon();\r\n\r\n if(data[i].name.valueOf() === \"Deep undersea fish\")\r\n this.addAngryFish();\r\n\r\n if(data[i].name.valueOf() === \"Sword fish\")\r\n this.addSwordFish();\r\n\r\n if(data[i].name.valueOf() === \"Shark\")\r\n this.addShark();\r\n\r\n if(data[i].name.valueOf() === \"Dophin\")\r\n this.addDolphin();\r\n\r\n if(data[i].name.valueOf() === \"Whale\")\r\n this.addWhale();\r\n\r\n if(data[i].name.valueOf() === \"Stingray fish\")\r\n this.addKiteFish();\r\n\r\n\r\n //if(data[i].name.valueOf() === \"Tiger barb\")\r\n // this.animateTigerbarb();\r\n }\r\n }\r\n\r\n this.addCoral();\r\n\r\n //set the progres bar\r\n this.previoous_fish_point = 0;\r\n this.next_fish_point = 0;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points < data[i].points){\r\n this.next_fish_point = data[i].points;\r\n break;\r\n }else{\r\n this.previoous_fish_point = data[i].points;\r\n }\r\n }\r\n\r\n /*\r\n //console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point);\r\n this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height);\r\n var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point);\r\n console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * this.progress_sprite.width);\r\n\r\n console.log(\"Width, \" + rect.width + \",\" + this.progress_sprite.width);\r\n this.progress_sprite.crop(rect);\r\n */\r\n }\r\n\r\n addAFish(added_point){\r\n\r\n var phaserJSON = this.game.cache.getJSON('fishpoints');\r\n //console.log(JSON.stringify(phaserJSON));\r\n\r\n\r\n var data = phaserJSON;\r\n var survey_string = \"\";\r\n var current_points = this.totalPoints;\r\n var old_points = current_points - added_point;\r\n console.log(\"\" + current_points + \", \" + old_points);\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points >= data[i].points && \r\n old_points < data[i].points){\r\n\r\n //nemo\r\n if(data[i].name.valueOf() === \"Blue tang\")\r\n this.addDori();\r\n\r\n\r\n //starfish\r\n if(data[i].name.valueOf() === \"Jelly fish\")\r\n this.addJellyFish();\r\n\r\n //squid\r\n if(data[i].name.valueOf() === \"Green Crab\")\r\n this.addCrab();\r\n\r\n\r\n if(data[i].name.valueOf() === \"Achovies\")\r\n this.addAnchovies();\r\n\r\n if(data[i].name.valueOf() === \"Bubbles\")\r\n this.addYellowTang();\r\n\r\n if(data[i].name.valueOf() === \"Salmon\")\r\n this.addSalmon();\r\n\r\n if(data[i].name.valueOf() === \"Angry fish\")\r\n this.addAngryFish();\r\n\r\n if(data[i].name.valueOf() === \"Sword fish\")\r\n this.addSwordFish();\r\n\r\n if(data[i].name.valueOf() === \"Shark\")\r\n this.addShark();\r\n\r\n if(data[i].name.valueOf() === \"Dophin\")\r\n this.addDolphin();\r\n\r\n if(data[i].name.valueOf() === \"Whale\")\r\n this.addWhale();\r\n\r\n if(data[i].name.valueOf() === \"Stingray fish\")\r\n this.addKiteFish();\r\n\r\n //if(data[i].name.valueOf() === \"Tiger barb\")\r\n // this.animateTigerbarb();\r\n\r\n }\r\n }\r\n\r\n //set the progres bar\r\n var previoous_fish_point = 0;\r\n var next_fish_point = 0;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points < data[i].points){\r\n next_fish_point = data[i].points;\r\n break;\r\n }else{\r\n previoous_fish_point = data[i].points;\r\n }\r\n }\r\n //console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point);\r\n var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height);\r\n var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point);\r\n console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point + \",\" + percent);\r\n this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0);\r\n rect.width = 1 * percent * this.progress_sprite.width;\r\n this.progress_sprite.crop(rect);\r\n\r\n }\r\n\r\n \r\n addShark() { \r\n this.sharkfish = this.add.sprite(this.CANVAS_WIDTH + 100, 130, 'sharkswim');\r\n this.sharkfish.anchor.setTo(.5,.5);\r\n this.sharkfish.animations.add('swim');\r\n this.sharkfish.animations.play('swim',10, true);\r\n this.sharkfish.scale.setTo(0.3, 0.22);\r\n this.sharkfish.name = \"sharkswim\";\r\n this.gobothways(this.sharkfish);\r\n }\r\n\r\n\r\n addSwordFish() { \r\n //swordfish\r\n this.swordfish = this.add.sprite(-150, 70, 'swordfish');\r\n this.swordfish.anchor.setTo(-.5,.6);\r\n this.swordfish.animations.add('swim');\r\n this.swordfish.animations.play('swim',30, true);\r\n this.swordfish.scale.setTo(0.3, 0.3);\r\n this.swordfish.name = \"swordfishswim\";\r\n this.gobothways(this.swordfish);\r\n }\r\n\r\n\r\n addDolphin() { \r\n this.dolphin = this.add.sprite(-150, 70, 'dolphin');\r\n this.dolphin.anchor.setTo(.9,.6);\r\n this.dolphin.animations.add('swim');\r\n this.dolphin.animations.play('swim',10, true);\r\n this.dolphin.scale.setTo(0.6, 0.6);\r\n this.dolphin.name = \"dolphinswim\";\r\n this.dolphin.angle -= 3;\r\n this.gobothways(this.dolphin);\r\n }\r\n\r\n addDori() { \r\n ////////////////////////////////////////////////////////////\r\n // mid aquarium\r\n ////////////////////////////////////////////////////////////\r\n /*\r\n var dori = this.add.sprite(100, this.height/3 + 20, 'dori');\r\n dori.animations.add('swim');\r\n dori.animations.play('swim', 10, true);\r\n dori.scale.setTo(0.3, 0.3);\r\n dori.angle -= 10;\r\n dori.anchor.setTo(.5,.5);\r\n\r\n var nemo = this.add.sprite(35, this.height/3 + 20, 'nemo');\r\n nemo.animations.add('swim');\r\n nemo.animations.play('swim', 7, true);\r\n nemo.scale.setTo(-0.3, 0.3);\r\n nemo.angle += 10;\r\n nemo.anchor.setTo(.5,.5);\r\n */\r\n\r\n this.clownFish = this.add.sprite(-100, this.height/3 + 20, 'clownfish');\r\n this.clownFish.anchor.setTo(.5,.5);\r\n this.clownFish.animations.add('swim');\r\n this.clownFish.animations.play('swim', 10, true);\r\n this.clownFish.scale.setTo(0.3, 0.3);\r\n this.clownFish.name = \"clownFish\";\r\n this.gobothways(this.clownFish);\r\n\r\n this.clownFish = this.add.sprite(-100, this.height/3 + 20, 'dori');\r\n this.clownFish.anchor.setTo(.1,.1);\r\n this.clownFish.animations.add('swim');\r\n this.clownFish.animations.play('swim', 10, true);\r\n this.clownFish.scale.setTo(0.3, 0.3);\r\n this.clownFish.name = \"clownFish\";\r\n this.gobothways(this.clownFish);\r\n\r\n }\r\n\r\n addYellowTang() { \r\n var yellowtang = this.add.sprite(this.CANVAS_WIDTH+100, this.height/3 + 55, 'yellowtang');\r\n yellowtang.animations.add('swim');\r\n yellowtang.animations.play('swim', 10, true);\r\n yellowtang.scale.setTo(0.22, 0.22);\r\n //yellowtang.angle -= 10;\r\n yellowtang.anchor.setTo(.5,.5);\r\n this.gobothways(yellowtang);\r\n }\r\n\r\n\r\n addJellyFish() { \r\n //\r\n var jellyfish = this.add.sprite(this.CANVAS_WIDTH - 80, this.height/3 + 0, 'jellyfish');\r\n jellyfish.animations.add('swim');\r\n jellyfish.animations.play('swim', 15, true);\r\n jellyfish.scale.setTo(0.12, 0.12);\r\n this.add.tween(jellyfish).to({ y: 300 }, 2000, Phaser.Easing.Quadratic.InOut, true, 0, 1000, true);\r\n }\r\n\r\n\r\n addSalmon() { \r\n\r\n var yellowtang = this.add.sprite(-150, this.height/3 + 70, 'salmon');\r\n yellowtang.animations.add('swim');\r\n yellowtang.animations.play('swim', 10, true);\r\n yellowtang.scale.setTo(0.2, 0.2);\r\n //yellowtang.angle -= 10;\r\n yellowtang.anchor.setTo(.5,.5);\r\n this.gobothways(yellowtang);\r\n }\r\n\r\n ////////////////////////////////////////////////////////////\r\n // bottom aquarium\r\n ////////////////////////////////////////////////////////////\r\n\r\n\r\n addWhale() { \r\n var whale = this.add.sprite(this.CANVAS_WIDTH+150, this.height-120, 'whale');\r\n whale.animations.add('swim');\r\n whale.animations.play('swim', 12, true);\r\n whale.scale.setTo(1.5, 1.5);\r\n whale.anchor.setTo(.5,.5);\r\n whale.angle += 5;\r\n whale.name = \"whaleswim\";\r\n this.gobothways(whale);\r\n }\r\n\r\n\r\n addCrab() { \r\n var redcrab = this.add.sprite(225, this.height-65, 'redcrab');\r\n redcrab.animations.add('swim');\r\n redcrab.animations.play('swim', 15, true);\r\n redcrab.scale.setTo(-0.2, 0.2);\r\n\r\n\r\n //\r\n var greencrab = this.add.sprite(90, this.height-55, 'greencrab');\r\n greencrab.animations.add('swim');\r\n greencrab.animations.play('swim', 15, true);\r\n greencrab.scale.setTo(0.2, 0.2);\r\n }\r\n \r\n\r\n addKiteFish() { \r\n var kitefish = this.add.sprite(this.CANVAS_WIDTH-120, this.height-85, 'kitefish');\r\n kitefish.animations.add('swim');\r\n kitefish.animations.play('swim', 15, true);\r\n kitefish.scale.setTo(0.5, 0.5);\r\n }\r\n\r\n\r\n addAngryFish() { \r\n this.angryfish = this.add.sprite(-100, this.height-250, 'angryfish');\r\n this.angryfish.anchor.setTo(2.2,-0.1);\r\n this.angryfish.animations.add('swim');\r\n this.angryfish.animations.play('swim',20, true);\r\n this.angryfish.scale.setTo(0.25, 0.25);\r\n this.angryfish.name = \"angryfishswim\";\r\n this.gobothways(this.angryfish);\r\n }\r\n\r\n addAnchovies() { \r\n //\r\n this.blueanchovy = this.add.sprite(-100, this.height-250, 'blueanchovy');\r\n this.blueanchovy.anchor.setTo(.9,.9);\r\n this.blueanchovy.animations.add('swim');\r\n this.blueanchovy.animations.play('swim',4, true);\r\n this.blueanchovy.scale.setTo(0.1, 0.1);\r\n this.blueanchovy.name = \"blueanchovyswim\";\r\n this.gobothways(this.blueanchovy);\r\n\r\n this.greenanchovy = this.add.sprite(-100, this.height-235, 'greenanchovy');\r\n this.greenanchovy.anchor.setTo(.5,.5);\r\n this.greenanchovy.animations.add('swim');\r\n this.greenanchovy.animations.play('swim',8, true);\r\n this.greenanchovy.scale.setTo(0.1, 0.1);\r\n this.greenanchovy.name = \"greenanchovyswim\";\r\n this.gobothways(this.greenanchovy);\r\n\r\n this.pinkanchovy = this.add.sprite(-100, this.height-270, 'pinkanchovy');\r\n this.pinkanchovy.anchor.setTo(.2,.2);\r\n this.pinkanchovy.animations.add('swim');\r\n this.pinkanchovy.animations.play('swim',2, true);\r\n this.pinkanchovy.scale.setTo(0.12, 0.12);\r\n this.pinkanchovy.name = \"pinkanchovyswim\";\r\n this.gobothways(this.pinkanchovy);\r\n }\r\n \r\n\r\n addCoral() { \r\n //\r\n var coral = this.add.image(0, this.height-60, 'coral');\r\n coral.scale.setTo(0.5, 0.5);\r\n \r\n }\r\n\r\n showunlockables(){\r\n console.log('treasure box clicked');\r\n this.componentObject.goToRewardsPage();\r\n }\r\n\r\n gobothways(b){\r\n\r\n //console.log('start again ' + b.name);\r\n var change_amount = Math.floor(this.rnd.realInRange(0, 50));\r\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\r\n change_amount = 3*change_amount;\r\n var pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n while((pos_y > this.height) || (pos_y < 70)){\r\n pos_y = b.y + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n }\r\n\r\n\r\n var t;\r\n //if()\r\n if(b.x > this.CANVAS_WIDTH){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n //t= this.add.tween(b).to({ x: -200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t= this.add.tween(b).to({ x: -100+Math.floor(this.rnd.realInRange(0, 50)), y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 4000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n //console.log('left to right, ' + b.x);\r\n b.scale.x = -1*b.scale.x;\r\n //t = this.add.tween(b).to({ x: window.innerWidth + 200 }, 10500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t = this.add.tween(b).to({ x: this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)), y: pos_y }, 7500 + Math.floor(this.rnd.realInRange(0, 4000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n } \r\n \r\n buildFish() {\r\n \r\n //assign number of fish\r\n numfish = 5;\r\n //assign type and age of fish\r\n var fishType = [\"green4\", \"horse4\", \"purple4\", \"pink4\", \"magenta4\"]\r\n this.fishGroup = this.add.group();\r\n this.fishGroup.enableBody = true;\r\n for(i = 0; i < numfish; i++){\r\n var b = this.fishGroup.create(this.rnd.integerInRange(0, this.world.width), this.rnd.integerInRange(this.world.height-300, this.world.height-200), fishType[i]);\r\n b.scale.setTo(0.4, 0.8);\r\n b.anchor.setTo(0.5, 0.5);\r\n b.body.moves = false;\r\n b.inputEnabled = true;\r\n b.events.onInputDown.add(this.addTally, this);\r\n this.assignFishMovement(b);\r\n }\r\n\r\n }\r\n \r\n assignFishMovement(b) {\r\n xposition = Math.floor(this.rnd.realInRange(50, this.world.width-50));\r\n yposition = Math.floor(this.rnd.realInRange(100, this.world.height-200));\r\n bdelay = this.rnd.integerInRange(2000, 6000);\r\n if(xposition < b.x){\r\n b.scale.x = -1;\r\n }else{\r\n b.scale.x = 1;\r\n }\r\n t = this.add.tween(b).to({x:xposition, y:yposition}, 3500, Phaser.Easing.Quadratic.InOut, true, bdelay);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n \r\n stopFish(b) {\r\n //this.assignFishMovement(b);\r\n this.gobothways(b);\r\n }\r\n \r\n addTally() {\r\n this.totalClicks = this.totalClicks + 1;\r\n this.countdown.setText('Fishes Fed: ' + this.totalClicks);\r\n }\r\n\r\n updatescore(added_points) {\r\n console.log(\"Update score called inside game, \" + this.ionic_scope.total_points);\r\n //this.totalPoints = this.ionic_scope.total_points;\r\n this.addAFish(added_points);\r\n this.countdown.setText('Points: ' + this.totalPoints);\r\n }\r\n\r\n\tsetTotalPoints(totalPoints){\r\n\t\tthis.totalPoints = totalPoints;\r\n } \r\n \r\n assignscope(componentObject){\r\n this.componentObject = componentObject;\r\n }\r\n}","export class PreloaderL4 extends Phaser.State {\r\n\t\r\n\tpreload(){\r\n\r\n\t\t//console.log(\"Preloader: preload called\"); \r\n\r\n\t\tthis.load.onLoadComplete.addOnce(this.onLoadComplete, this);\r\n\r\n\t\tthis.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar');\r\n\t\tthis.preloadBar.anchor.setTo(0.5, 0.5);\r\n\t\tthis.load.setPreloadSprite(this.preloadBar);\r\n \r\n //---- both aquariums\r\n this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt');\r\n\t\tthis.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points\r\n\t\tthis.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png');\r\n\t\t//this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20);\r\n\r\n\t\tthis.add.text(0, 0, \"hack\", {font:\"1px dumbo_regular\", fill:\"#FFFFFF\"});\r\n\t\t//this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20);\r\n\t\tthis.load.image('points_progress_2', 'assets/img/points_progress_2.png');\r\n\t\tthis.load.image('levels_progress', 'assets/img/levels_progress_2.png');\r\n\t\tthis.load.image('streak_info', 'assets/img/streak_info_2.png');\r\n\t\tthis.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20);\r\n\t\tthis.load.image('alt_icon', 'assets/img/heart.png');\r\n\t\tthis.load.image('next_fish_icon', 'assets/img/fish_icon_2.png');\r\n\t\tthis.load.image('meme_icon', 'assets/img/smiley_face.png');\r\n\t\tthis.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20);\r\n\t\tthis.load.image('level_up_icon', 'assets/img/level_icon.png');\r\n\t\tthis.load.image('level_up_2', 'assets/img/level_up_2.png');\r\n\t\tthis.load.image('streak_green', 'assets/img/streak_green.png');\r\n\t\tthis.load.image('streak_red', 'assets/img/streak_red_2.png');\r\n\t\tthis.load.image('streak_grey', 'assets/img/streak_grey.png');\r\n\t\tthis.load.image('star_point', 'assets/img/star.png');\r\n\t\tthis.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json');\r\n\t\t\r\n\r\n\t\tvar max = 8;\r\n\t\tvar min = 1;\r\n\t\tvar rand_num = Math.floor(Math.random() * (max - min + 1)) + min;\r\n\t\tconsole.log('assets/img/pirate-' + rand_num + '.png');\r\n\t\tthis.load.image('pirate', 'assets/img/pirate-' + rand_num + '.png');\r\n\r\n\t\tvar\tusername = window.localStorage['username'] || 'unknown';\r\n\r\n this.isStudyParticipant = username.indexOf('-study-') !== -1; // !== -1;\r\n\t\tthis.loadSea();\r\n\r\n\t\t//--- RedBanner.png\r\n\t\tthis.load.image('banner', 'assets/img/RedBanner.png');\r\n\t\tthis.load.image('banner_fish', 'assets/img/banner_fish.png');\r\n\r\n\r\n\t\t//----\r\n\t\tvar next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png';\r\n\t\tconsole.log(\"Next fish: \" + next_fish);\r\n\t\tthis.load.image('clownfish_grey', next_fish);\r\n\r\n\t\tthis.load.image('diamond', 'assets/img/diamond.png');\r\n\r\n\t\tvar progressDisplay = 0;\r\n\t\tvar timerEvt = this.time.events.loop(100, function (){\r\n if(this.load.progress < 100){\r\n \tprogressDisplay++;\r\n console.log('loading... '+(this.load.progress)+'%' + \"; \" + (100*progressDisplay));\r\n }else{\r\n //loadingText.text = 'Ready, Go!';\r\n console.log('Ready, Go!');\r\n this.time.events.remove(timerEvt);\r\n }\r\n\r\n }, this);\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tconsole.log(\"Preloader: create called\");\r\n\t\tthis.preloadBar.cropEnabled = false;\r\n\t}\r\n\r\n\tupdate()\r\n\t{\r\n\t\tconsole.log(\"update: \"+ \"SeaLevelL4\");\r\n\t\tthis.state.start('SeaLevelL4');\r\n\t}\r\n\r\n\tonLoadComplete(){\r\n\t console.log(\"Load complete\");\r\n\t this.ready = true;\r\n\t}\r\n\r\n\tloadSea(){\r\n //second aquarium\r\n //-- fish_journal\r\n\t\tconsole.log(\"Inside loadSea\");\r\n this.load.image('fish_journal', 'assets/img/fish_journal.png');\r\n\r\n //--- sea\r\n\t\tthis.load.image('undersea', 'assets/img/underwaterbr.jpg'); \t\r\n this.load.image('treasuresea', 'assets/img/treasuresea.png');\r\n\t\tthis.load.image('coral', 'assets/img/seabed.png');\r\n\t\tthis.load.atlasJSONArray('clownfish', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json');\r\n\t\tthis.load.atlasJSONArray('dori', 'assets/game/sprite/dory2.png', 'assets/game/sprite/dory2.json');\r\n\t\tthis.load.atlasJSONArray('jellyfish', 'assets/game/sprite/jellyfish.png', 'assets/game/sprite/jellyfish.json');\r\n\t\tthis.load.atlasJSONArray('redcrab', 'assets/game/sprite/redcrab.png', 'assets/game/sprite/redcrab.json');\r\n\t\tthis.load.atlasJSONArray('greencrab', 'assets/game/sprite/greencrab.png', 'assets/game/sprite/greencrab.json');\r\n\t\tthis.load.atlasJSONArray('angryfish', 'assets/game/sprite/angryfish.png', 'assets/game/sprite/angryfish.json');\r\n\t\tthis.load.atlasJSONArray('salmon', 'assets/game/sprite/salmon.png', 'assets/game/sprite/salmon.json');\r\n\t\tthis.load.atlasJSONArray('yellowtang', 'assets/game/sprite/yellowtang.png', 'assets/game/sprite/yellowtang.json');\r\n\t\tthis.load.spritesheet('blueanchovy', 'assets/game/sprite/blueanchovy.png', 512, 125, 4);\r\n\t\tthis.load.spritesheet('greenanchovy', 'assets/game/sprite/greenanchovy.png', 512, 125, 4);\r\n\t\tthis.load.spritesheet('pinkanchovy', 'assets/game/sprite/pinkanchovy.png', 512, 125, 4);\r\n\r\n\t\tthis.load.atlasJSONArray('sharkswim', 'assets/game/sprite/sharkswimming.png', 'assets/game/sprite/sharkswimming.json');\r\n this.load.atlasJSONArray('nemo', 'assets/game/sprite/clownfish.png', 'assets/game/sprite/clownfish.json');\r\n\t\tthis.load.atlasJSONArray('swordfish', 'assets/game/sprite/swordfish.png', 'assets/game/sprite/swordfish.json');\r\n\t\tthis.load.atlasJSONArray('dolphin', 'assets/game/sprite/dolphin.png', 'assets/game/sprite/dolphin.json');\r\n\t\tthis.load.atlasJSONArray('kitefish', 'assets/game/sprite/kitefish.png', 'assets/game/sprite/kitefish.json');\r\n\t\tthis.load.atlasJSONArray('whale', 'assets/game/sprite/whale.png', 'assets/game/sprite/whale.json');\r\n\r\n\t\t\r\n\t\t//\r\n\t\t//this.load.image('gotosea', 'assets/img/gotosea.png');\r\n\r\n\t\t//first_aq\r\n\t\t//this.load.image('first_aq', 'assets/img/first_aq.png');\r\n\r\n\t\t\r\n\r\n\t\t//submarine\r\n\t\t//this.load.atlasJSONArray('submarine', 'assets/game/sprite/submarine.png', 'assets/game/sprite/submarine.json');\r\n\t\t//this.load.atlasJSONArray('submarine_at', 'assets/game/sprite/submarine_at.png', 'assets/game/sprite/submarine_at.json');\r\n\r\n\t\t//this.preloadBar.destroy();\r\n\r\n\t}\r\n}","export class BootTundraL5 extends Phaser.State {\r\n preload() {\r\n this.load.image('preloaderBar', 'assets/img/loader_bar.png');\r\n }\r\n \r\n create() {\r\n\t\tthis.input.maxPointers = 1;\r\n\t\t//-- https://github.com/photonstorm/phaser-ce/issues/32\r\n\t\tif(this.game.device.touch){\r\n\t\t\tthis.input.mouse.stop();\r\n\t\t}\r\n\t\tthis.stage.disableVisibilityChange = false;\r\n\t\t//this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;\r\n\t\tthis.scale.minWidth = 270;\r\n\t\tthis.scale.minHeight = 400;\r\n\t\tthis.scale.pageAlignHorizontally = true;\r\n\t\tthis.scale.pageAlignVertically = true;\r\n\t\tthis.stage.forcePortrait = true;\r\n\t\t//this.scale.setScreenSize(true);\r\n\r\n\t\tthis.input.addPointer();\r\n\r\n\t\t//Change color here \r\n\t\t//-- http://www.w3schools.com/colors/colors_picker.asp\r\n\t\tthis.stage.backgroundColor = '#ffffff';\r\n \r\n\t\tthis.state.start('Preloader');\r\n\t\tconsole.log(\"Boot completed\");\r\n\t\r\n }\r\n}","export class GameTundraL5 extends Phaser.State {\r\n\r\n //componentObject;\r\n constructor(){\r\n super();\r\n this.componentObject;\r\n this.snowgswitch;\r\n this.back_emitter;\r\n this.mid_emitter;\r\n this.yeti;\r\n this.surveyHistory = [];\r\n }\r\n\r\n //\r\n create() {\r\n\r\n console.log(\"create called\");\r\n \r\n var s = this.game.add.sprite(0,0,'tundra1');\r\n s.rotation = 0.0;\r\n var aspect_ratio = s.width/s.height;\r\n s.height = this.game.height - 310;\r\n s.width = s.height*aspect_ratio;\r\n\r\n //--- this is the bottom screen, blue water thing.\r\n var titlescreen = this.add.image(0, this.game.height-60, 'titlescreen');\r\n titlescreen.scale.setTo(0.6, 0.6);\r\n\r\n\r\n this.CANVAS_WIDTH = window.innerWidth;\r\n \r\n //\r\n this.height = this.game.height;\r\n\r\n //---\r\n //this.CANVAS_WIDTH = 382.0;\r\n //if(window.innerWidth > this.CANVAS_WIDTH)\r\n // this.CANVAS_WIDTH = window.innerWidth;\r\n\r\n //---\r\n //var timer = this.add.sprite(5, 40, 'timer', 1);\r\n\r\n //--- \r\n /*\r\n var fish_progress = this.add.image(175,50, 'clownfish_grey');\r\n fish_progress.scale.setTo(-0.3, 0.3);\r\n fish_progress.anchor.setTo(.5,.5);\r\n */\r\n \r\n //--- \r\n /*\r\n var pouch = this.add.image(15,80, 'diamond');\r\n pouch.scale.setTo(0.4, 0.4);\r\n pouch.anchor.setTo(.5,.5);\r\n this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', \"\" + 2, 12);\r\n */\r\n\r\n //\r\n /*\r\n this.snowgswitch = this.add.image(5, 70, 'snowgswitch');\r\n this.snowgswitch.scale.setTo(0.15, 0.15);\r\n this.snowgswitch.inputEnabled = true;\r\n this.snowgswitch.events.onInputDown.addOnce(this.startsnowing, this);\r\n */\r\n \r\n\r\n //\r\n this.inputEnabled = false;\r\n Phaser.Canvas.setTouchAction(this.game.canvas, \"auto\");\r\n this.game.input.touch.preventDefault = false;\r\n\r\n\r\n //this.animateDuck();\r\n //this.animateSnowOwl();\r\n \r\n //\r\n var treasure = this.add.image(this.game.width/2, this.height-85, 'treasure_tundra');\r\n treasure.scale.setTo(-0.5, 0.5);\r\n treasure.anchor.setTo(.5,.5);\r\n treasure.inputEnabled = true;\r\n treasure.events.onInputDown.add(this.showunlockables, this);\r\n \r\n\r\n //\r\n this.addAnimals();\r\n\r\n this.showProgressBars();\r\n\r\n //\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n\r\n //\r\n this.game.onPause.add(this.yourGamePausedFunc, this);\r\n this.game.onResume.add(this.yourGameResumedFunc, this);\r\n\r\n }\r\n\r\n showProgressBars(){\r\n\r\n var current_points = this.totalPoints;\r\n\r\n //------ Left side\r\n\r\n \r\n\r\n //level info\r\n //var levels_progress = this.add.image(5, 55, 'levels_progress');\r\n //levels_progress.scale.setTo(.27, .30);\r\n\r\n /*\r\n //\r\n var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0);\r\n levels_progress.scale.setTo(0.95, 1.2);\r\n\r\n //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1);\r\n var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1);\r\n var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n //progress_sprite.anchor.setTo(0,0);\r\n progress_sprite.scale.setTo(1,1.1);\r\n\r\n\r\n var level_up_icon = this.add.image(18, 68, 'level_up_icon');\r\n level_up_icon.scale.setTo(.5, .5);\r\n level_up_icon.anchor.setTo(.5, .5);\r\n\r\n var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite');\r\n info_level_progress.animations.add('swim');\r\n info_level_progress.animations.play('swim', 1, true);\r\n info_level_progress.scale.setTo(0.3, 0.3);\r\n info_level_progress.anchor.setTo(.5,.5);\r\n info_level_progress.inputEnabled = true;\r\n info_level_progress.events.onInputDown.add(function(){this.showInforBox(\"Info level progress bar clicked\")}, this); \r\n\r\n \r\n //progress_sprite.anchor.setTo(1,0);\r\n //progress_sprite.scale.setTo(0.8,0.8);\r\n */\r\n\r\n var SCALING_FACTOR = 0.8;\r\n\r\n //streak_info\r\n var streak_info = this.add.image(5, 5, 'streak_info');\r\n streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n\r\n /*\r\n var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite');\r\n info_level_streak.animations.add('swim');\r\n info_level_streak.animations.play('swim', 1, true);\r\n info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR);\r\n info_level_streak.anchor.setTo(.5,.5);\r\n info_level_streak.inputEnabled = true;\r\n info_level_streak.events.onInputDown.add(function(){this.showInforBox(\"Streak progress bar clicked\")}, this); \r\n */\r\n\r\n var colors = []; //['grey','grey','grey','grey','grey','grey','grey'];\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n if(this.surveyHistory[i] == 1)\r\n colors[i] = 'green';\r\n else\r\n colors[i] = 'grey';\r\n } \r\n colors = colors.reverse()\r\n \r\n //console.log(\"this.surveyHistory \" + this.surveyHistory);\r\n console.log(\"colors \" + colors);\r\n //colors = ['green','green','green','green','grey','green','grey'];\r\n var streak_tile;\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]);\r\n streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR);\r\n }\r\n\r\n\r\n //------ Right side\r\n //var progressBars = this.add.group();\r\n\r\n //points bar\r\n vertical_position_offset = 13;\r\n var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2');\r\n points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n points_progress.anchor.setTo(1,0);\r\n //progressBars.add(points_progress);\r\n\r\n //point text\r\n var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, \"\" + this.totalPoints, {font:\"20px dumbo_regular\", fill:\"#4c3d01\"});\r\n points_text.anchor.setTo(0.5,0);\r\n points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n //progressBars.add(points_text);\r\n\r\n var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point');\r\n star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n star_icon.anchor.setTo(.5, .5);\r\n //progressBars.add(points_text);\r\n\r\n //progressBars.scale.setTo(.8, .8);\r\n\r\n /*\r\n var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite');\r\n info_points.animations.add('swim');\r\n info_points.animations.play('swim', 1, true);\r\n info_points.scale.setTo(0.3, 0.3);\r\n info_points.anchor.setTo(.5,.5);\r\n info_points.inputEnabled = true;\r\n //function(){doAlert(textString)\r\n info_points.events.onInputDown.add(function(){this.showInforBox(\"Info pregess bar cliccked 2\")}, this); \r\n */\r\n\r\n \r\n //points to get to next fish.\r\n var vertical_position_offset = 35;\r\n\r\n \r\n var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1);\r\n progress_bar_fish.anchor.setTo(1,0);\r\n progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon');\r\n fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR);\r\n fish_progress_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n \r\n //points to get to meme.\r\n vertical_position_offset = 57;\r\n\r\n /*\r\n var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1);\r\n progress_bar_memes.anchor.setTo(1,0);\r\n progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_memes = 0;\r\n var total_number_of_memes = 31;\r\n var already_shown_memes = window.localStorage[\"already_shown_memes3\"];\r\n if(already_shown_memes == undefined)\r\n already_shown_memes = [{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_memes = JSON.parse(window.localStorage[\"already_shown_memes3\"]);\r\n var currently_number_of_unlocked_memes = already_shown_memes.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_memes-start_number_of_memes)/\r\n (total_number_of_memes-start_number_of_memes);\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon');\r\n meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR);\r\n meme_icon.anchor.setTo(.5, .5);\r\n\r\n\r\n //points to get to alt message.\r\n var vertical_position_offset = 79;\r\n var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1);\r\n progress_bar_altruism_message.anchor.setTo(1,0);\r\n progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_alt_messages = 0;\r\n var total_number_of_alt_messages = 21;\r\n\r\n var already_shown_altruism_msgs = window.localStorage[\"already_shown_alt_msg3\"];\r\n if(already_shown_altruism_msgs == undefined)\r\n already_shown_altruism_msgs = [{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_altruism_msgs = JSON.parse(window.localStorage[\"already_shown_alt_msg3\"]);\r\n var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/\r\n (total_number_of_alt_messages-start_number_of_alt_messages);\r\n //if(percent < 0.05)\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Alt Width, \" + rect.width + \",\" + percent);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n \r\n var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon');\r\n alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR);\r\n alt_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n\r\n //points to get to level up.\r\n var vertical_position_offset = 101;\r\n */\r\n\r\n var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1);\r\n progress_bar_level_up.anchor.setTo(1,0);\r\n progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n // end of level is 1060, start is at 0\r\n var start_point_for_level = 2120;\r\n var end_point_for_level = 3020;\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level);\r\n percent = percent*0.8 + 0.2;\r\n //console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n //console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2');\r\n level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR);\r\n level_up_2.anchor.setTo(.5, .5);\r\n\r\n\r\n\r\n\r\n\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n //console.log(\"countdown.width \" + this.countdown.width);\r\n\r\n \r\n }\r\n\r\n setSurveyHistory(survey_history){\r\n console.log(\"survey_history \" + survey_history + \", length: \" + survey_history.length);\r\n //this.surveyHistory = survey_history;\r\n for(var i=0; i= data[i].points){\r\n drawing_order_enabled[data[i].name.valueOf()] = 1;\r\n }\r\n }\r\n \r\n\r\n for(var key in drawing_order_enabled) {\r\n\r\n //means it is not included\r\n if(drawing_order_enabled[key] == 0)\r\n continue;\r\n\r\n\r\n if(drawing_order_enabled[key] == 1){\r\n\r\n //nemo\r\n if(key === \"Penguin\")\r\n this.animatePenguin();\r\n\r\n if(key === \"Seal\")\r\n this.animateSealion();\r\n\r\n if(key === \"Grey Wolf\")\r\n this.animateWolf();\r\n\r\n if(key === \"Brown Bear\")\r\n this.animateBear(); \r\n\r\n if(key === \"Snow Bunting\")\r\n this.animateBirds();\r\n\r\n if(key === \"Hare\")\r\n this.animateHare();\r\n\r\n if(key === \"Pingu, the Penguin\")\r\n this.animatePingu(); \r\n\r\n //if(data[i].name.valueOf() === \"Coyote\")\r\n // this.animateCoyote(); \r\n\r\n //if(data[i].name.valueOf() === \"White Husky\")\r\n // this.animateWhiteHusky(); \r\n\r\n\r\n if(key === \"Snow\")\r\n this.animateSnow(); \r\n\r\n\r\n if(key === \"Grey Husky\")\r\n this.animateBrwonHusky(); \r\n\r\n if(key === \"Yeti\")\r\n this.animateYeti(); \r\n\r\n \r\n\r\n if(key === \"Reindeer\")\r\n this.animateReindeer();\r\n \r\n \r\n\r\n if(key === \"Snowy Owl\")\r\n this.animateSnowOwl();\r\n\r\n\r\n if(key === \"Ducks\")\r\n this.animateDuck();\r\n\r\n if(key === \"Mountain goat\")\r\n this.animateMountainGoat();\r\n\r\n if(key === \"Blue Jay\")\r\n this.animateBlueJay();\r\n\r\n /* \r\n if(data[i].name.valueOf() === \"Rabbit\")\r\n this.animateRabbit(); \r\n */\r\n\r\n }\r\n }\r\n \r\n\r\n //set the progres bar\r\n this.previoous_fish_point = 0;\r\n this.next_fish_point = 0;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points < data[i].points){\r\n this.next_fish_point = data[i].points;\r\n break;\r\n }else{\r\n this.previoous_fish_point = data[i].points;\r\n }\r\n }\r\n\r\n /*\r\n this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height);\r\n var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point);\r\n console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * this.progress_sprite.width);\r\n\r\n console.log(\"Width, \" + rect.width + \",\" + this.progress_sprite.width);\r\n this.progress_sprite.crop(rect);\r\n */\r\n }\r\n\r\n animateSnow(){\r\n //console.log(\"snow button loaded\");\r\n this.snowgswitch = this.add.image(5, 70, 'snow_start');\r\n this.snowgswitch.scale.setTo(0.6, 0.6);\r\n this.snowgswitch.inputEnabled = true;\r\n this.snowgswitch.events.onInputDown.addOnce(this.startsnowing, this);\r\n }\r\n\r\n \r\n\r\n //-- Add Penguin\r\n animatePenguin(){\r\n\r\n console.log(\"Device pixel ratio is: \" + window.devicePixelRatio)\r\n\r\n var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y;\r\n starting_pos_x = -15;\r\n starting_pos_y = this.game.height - 145;\r\n ending_pos_x = 45;\r\n ending_pos_y = this.game.height - 105;\r\n scale_x = 0.3;\r\n scale_y = 0.3;\r\n\r\n this.penguins = this.add.sprite(starting_pos_x, starting_pos_y, 'penguin');\r\n this.penguins.anchor.setTo(.5,.5);\r\n this.penguins.animations.add('swim2');\r\n this.penguins.animations.play('swim2', 5, true);\r\n this.penguins.scale.setTo(scale_x, scale_y);\r\n this.penguins.name = \"pegions\";\r\n var t = this.add.tween(this.penguins).to({ x: ending_pos_x, y: ending_pos_y}, 1000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.penguins.animations.stop(null, true);}, this);\r\n }\r\n \r\n //-- Add sea lion\r\n animateSealion(){\r\n\r\n var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y;\r\n \r\n \r\n //---- sea lion silver\r\n starting_pos_x = this.game.width+15;\r\n starting_pos_y = this.game.height - 105;\r\n ending_pos_x = this.game.width-75;\r\n ending_pos_y = this.game.height - 105;\r\n scale_x = 1.3;\r\n scale_y = 1.3;\r\n\r\n this.sealion = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_silver');\r\n this.sealion.anchor.setTo(.5,.5);\r\n this.sealion.animations.add('swim2');\r\n this.sealion.animations.play('swim2', 5, true);\r\n this.sealion.scale.setTo(scale_x, scale_y);\r\n this.sealion.name = \"sea_lion_silver\";\r\n var t = this.add.tween(this.sealion).to({ x: ending_pos_x, y: ending_pos_y}, 3000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion.animations.stop(null, true);}, this);\r\n\r\n\r\n //---- sea lion brown\r\n starting_pos_x = this.game.width+25;\r\n starting_pos_y = this.game.height - 135;\r\n ending_pos_x = this.game.width-45;\r\n ending_pos_y = this.game.height - 135;\r\n scale_x = 1.3;\r\n scale_y = 1.3;\r\n\r\n this.sealion_brown = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_brown');\r\n this.sealion_brown.anchor.setTo(.5,.5);\r\n this.sealion_brown.animations.add('swim2');\r\n this.sealion_brown.animations.play('swim2', 5, true);\r\n this.sealion_brown.scale.setTo(scale_x, scale_y);\r\n this.sealion_brown.name = \"sea_lion_brown\";\r\n var t = this.add.tween(this.sealion_brown).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion_brown.animations.stop(null, true);}, this);\r\n\r\n //---- sea lion pink\r\n starting_pos_x = this.game.width+125;\r\n starting_pos_y = this.game.height - 85;\r\n ending_pos_x = this.game.width-25;\r\n ending_pos_y = this.game.height - 85;\r\n scale_x = 0.8;\r\n scale_y = 0.8;\r\n\r\n this.sealion_pink = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_pink');\r\n this.sealion_pink.anchor.setTo(.5,.5);\r\n this.sealion_pink.animations.add('swim2');\r\n this.sealion_pink.animations.play('swim2', 5, true);\r\n this.sealion_pink.scale.setTo(scale_x, scale_y);\r\n this.sealion_pink.name = \"sea_lion_pink\";\r\n var t = this.add.tween(this.sealion_pink).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion_pink.animations.stop(null, true);}, this);\r\n\r\n }\r\n\r\n //\r\n animateDuck(){\r\n this.duck = this.add.sprite(this.game.width+15, this.game.height-20, 'duck');\r\n this.duck.anchor.setTo(.5,.5);\r\n this.duck.animations.add('swim2');\r\n this.duck.animations.play('swim2', 3, true);\r\n this.duck.scale.setTo(1, 1);\r\n this.duck.name = \"duck\";\r\n this.gobothways(this.duck);\r\n\r\n this.duck2 = this.add.sprite(this.game.width+55, this.game.height-20, 'duck');\r\n this.duck2.anchor.setTo(.5,.5);\r\n this.duck2.animations.add('swim2');\r\n this.duck2.animations.play('swim2', 3, true);\r\n this.duck2.scale.setTo(1, 1);\r\n this.duck2.name = \"duck2\";\r\n this.gobothways(this.duck2);\r\n }\r\n\r\n animateBearCub(){\r\n //console.log(\"snow button loaded\");\r\n this.polarBearCub = this.add.sprite(this.game.width+15, this.game.height - 290, 'polar_bear_cub');\r\n this.polarBearCub.anchor.setTo(.5,.5);\r\n this.polarBearCub.animations.add('swim2');\r\n this.polarBearCub.animations.play('swim2', 3, true);\r\n this.polarBearCub.scale.setTo(-0.8, 0.8);\r\n this.polarBearCub.name = \"polarBearCub\";\r\n this.gobothways(this.polarBearCub);\r\n }\r\n\r\n\r\n\r\n\r\n //\r\n animateSnowOwl(){\r\n //\r\n this.black_tundra_owl = this.add.sprite(this.game.width-130, 195, 'black_tundra_owl');\r\n this.black_tundra_owl.anchor.setTo(.5,.5);\r\n this.black_tundra_owl.animations.add('swim2');\r\n this.black_tundra_owl.animations.play('swim2', 5, true);\r\n this.black_tundra_owl.scale.setTo(0.9, 0.9);\r\n this.black_tundra_owl.name = \"black_tundra_owl\";\r\n this.gobothways(this.black_tundra_owl);\r\n\r\n\r\n this.brown_tundra_owl = this.add.sprite(this.game.width-100, 200, 'brown_tundra_owl');\r\n this.brown_tundra_owl.anchor.setTo(.5,.5);\r\n this.brown_tundra_owl.animations.add('swim2');\r\n this.brown_tundra_owl.animations.play('swim2', 5, true);\r\n this.brown_tundra_owl.scale.setTo(0.9, 0.9);\r\n this.brown_tundra_owl.name = \"brown_tundra_owl\";\r\n this.gobothways(this.brown_tundra_owl);\r\n\r\n\r\n this.grey_tundra_owl = this.add.sprite(this.game.width-160, 205, 'grey_tundra_owl');\r\n this.grey_tundra_owl.anchor.setTo(.5,.5);\r\n this.grey_tundra_owl.animations.add('swim2');\r\n this.grey_tundra_owl.animations.play('swim2', 5, true);\r\n this.grey_tundra_owl.scale.setTo(0.9, 0.9);\r\n this.grey_tundra_owl.name = \"grey_tundra_owl\";\r\n this.gobothways(this.grey_tundra_owl);\r\n\r\n /*\r\n this.light_brown_tundra_owl = this.add.sprite(this.game.width-170, 180, 'light_brown_tundra_owl');\r\n this.light_brown_tundra_owl.anchor.setTo(.5,.5);\r\n this.light_brown_tundra_owl.animations.add('swim2');\r\n this.light_brown_tundra_owl.animations.play('swim2', 5, true);\r\n this.light_brown_tundra_owl.scale.setTo(0.9, 0.9);\r\n this.light_brown_tundra_owl.name = \"light_brown_tundra_owl\";\r\n this.gobothways(this.light_brown_tundra_owl);\r\n */\r\n\r\n this.white_tundra_owl = this.add.sprite(this.game.width-200, 185, 'white_tundra_owl');\r\n this.white_tundra_owl.anchor.setTo(.5,.5);\r\n this.white_tundra_owl.animations.add('swim2');\r\n this.white_tundra_owl.animations.play('swim2', 5, true);\r\n this.white_tundra_owl.scale.setTo(0.9, 0.9);\r\n this.white_tundra_owl.name = \"white_tundra_owl\";\r\n this.gobothways(this.white_tundra_owl);\r\n\r\n }\r\n\r\n //\r\n animateMountainGoat(){\r\n var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y;\r\n \r\n \r\n //---- sea lion silver\r\n starting_pos_x = this.game.width/2-60;\r\n starting_pos_y = this.game.height - 185 + 40;\r\n ending_pos_x = this.game.width/2-30;\r\n ending_pos_y = this.game.height - 185 + 40;\r\n scale_x = 1.3;\r\n scale_y = 1.3;\r\n\r\n this.black_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'black_mountain_goat');\r\n this.black_mountain_goat.anchor.setTo(.5,.5);\r\n this.black_mountain_goat.animations.add('swim2');\r\n this.black_mountain_goat.animations.play('swim2', 3, true);\r\n this.black_mountain_goat.scale.setTo(scale_x, scale_y);\r\n this.black_mountain_goat.name = \"black_mountain_goat\";\r\n var t = this.add.tween(this.black_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 9000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.black_mountain_goat.animations.stop(null, true);}, this);\r\n\r\n\r\n starting_pos_x = this.game.width-10;\r\n starting_pos_y = this.game.height - 205 + 40;\r\n ending_pos_x = this.game.width/2+50;\r\n ending_pos_y = this.game.height - 205 + 40;\r\n scale_x = -1.5;\r\n scale_y = 1.5;\r\n\r\n this.white_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'white_mountain_goat');\r\n this.white_mountain_goat.anchor.setTo(.5,.5);\r\n this.white_mountain_goat.animations.add('swim2');\r\n this.white_mountain_goat.animations.play('swim2', 3, true);\r\n this.white_mountain_goat.scale.setTo(scale_x, scale_y);\r\n this.white_mountain_goat.name = \"white_mountain_goat\";\r\n t = this.add.tween(this.white_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 15000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.white_mountain_goat.animations.stop(null, true);}, this);\r\n\r\n\r\n starting_pos_x = this.game.width-10;\r\n starting_pos_y = this.game.height - 175 + 40;\r\n ending_pos_x = this.game.width/2+30;\r\n ending_pos_y = this.game.height - 175 + 40;\r\n scale_x = -1.2;\r\n scale_y = 1.2;\r\n\r\n this.brown_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'brown_mountain_goat');\r\n this.brown_mountain_goat.anchor.setTo(.5,.5);\r\n this.brown_mountain_goat.animations.add('swim2');\r\n this.brown_mountain_goat.animations.play('swim2', 3, true);\r\n this.brown_mountain_goat.scale.setTo(scale_x, scale_y);\r\n this.brown_mountain_goat.name = \"brown_mountain_goat\";\r\n t = this.add.tween(this.brown_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 9000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.brown_mountain_goat.animations.stop(null, true);}, this);\r\n\r\n /*\r\n //---- sea lion brown\r\n starting_pos_x = this.game.width+25;\r\n starting_pos_y = this.game.height - 135;\r\n ending_pos_x = this.game.width-45;\r\n ending_pos_y = this.game.height - 135;\r\n scale_x = 1.3;\r\n scale_y = 1.3;\r\n\r\n this.sealion_brown = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_brown');\r\n this.sealion_brown.anchor.setTo(.5,.5);\r\n this.sealion_brown.animations.add('swim2');\r\n this.sealion_brown.animations.play('swim2', 5, true);\r\n this.sealion_brown.scale.setTo(scale_x, scale_y);\r\n this.sealion_brown.name = \"sea_lion_brown\";\r\n var t = this.add.tween(this.sealion_brown).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion_brown.animations.stop(null, true);}, this);\r\n\r\n //---- sea lion pink\r\n starting_pos_x = this.game.width+125;\r\n starting_pos_y = this.game.height - 85;\r\n ending_pos_x = this.game.width-25;\r\n ending_pos_y = this.game.height - 85;\r\n scale_x = 0.8;\r\n scale_y = 0.8;\r\n\r\n this.sealion_pink = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_pink');\r\n this.sealion_pink.anchor.setTo(.5,.5);\r\n this.sealion_pink.animations.add('swim2');\r\n this.sealion_pink.animations.play('swim2', 5, true);\r\n this.sealion_pink.scale.setTo(scale_x, scale_y);\r\n this.sealion_pink.name = \"sea_lion_pink\";\r\n var t = this.add.tween(this.sealion_pink).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion_pink.animations.stop(null, true);}, this);\r\n */\r\n }\r\n\r\n //--- add wolf animation.\r\n animateWolf(){\r\n\r\n var starting_pos_x, starting_pos_y, scale_x, scale_y;\r\n\r\n //---- wolf walk\r\n starting_pos_x = this.game.width-100;\r\n starting_pos_y = this.game.height-335;\r\n scale_x = 0.8;\r\n scale_y = 0.8;\r\n\r\n this.wolf = this.add.sprite(starting_pos_x, starting_pos_y, 'wolf_walk');\r\n //this.wolf = this.add.sprite(this.game.width+100, this.game.height-295, 'wolf_walk');\r\n this.wolf.anchor.setTo(.5,.5);\r\n this.wolf.animations.add('swim');\r\n this.wolf.animations.play('swim', 3, true);\r\n this.wolf.scale.setTo(scale_x, scale_y);\r\n this.wolf.name = \"wolf\";\r\n this.wolf.startingDirection = \"leftToRight\";\r\n this.wolf.spriteFacesDirection = \"right\";\r\n this.gobothways(this.wolf);\r\n }\r\n\r\n animateBear(){\r\n this.brown_bear = this.add.sprite(-200, this.game.height-325, 'brown_bear');\r\n this.brown_bear.anchor.setTo(.5,.5);\r\n this.brown_bear.animations.add('swim');\r\n this.brown_bear.animations.play('swim', 6, true);\r\n this.brown_bear.scale.setTo(-.15, .15);\r\n this.brown_bear.name = \"brown_bear\";\r\n this.gobothways(this.brown_bear);\r\n\r\n this.animateBearCub();\r\n }\r\n\r\n \r\n\r\n //\r\n animateBrwonHusky(){\r\n\r\n this.white_husky = this.add.sprite(65, this.game.height - 215, 'white_husky');\r\n this.white_husky.anchor.setTo(.5,.5);\r\n this.white_husky.animations.add('swim2');\r\n this.white_husky.animations.play('swim2',15, true);\r\n this.white_husky.scale.setTo(0.35, 0.35);\r\n this.white_husky.name = \"white_husky\";\r\n\r\n\r\n this.white_husky = this.add.sprite(65, this.game.height - 185, 'grey_husky');\r\n this.white_husky.anchor.setTo(.5,.5);\r\n this.white_husky.animations.add('swim2');\r\n this.white_husky.animations.play('swim2',15, true);\r\n this.white_husky.scale.setTo(0.35, 0.35);\r\n this.white_husky.name = \"grey_husky\";\r\n }\r\n\r\n //\r\n animatePingu(){\r\n this.pingu = this.add.sprite(105, this.game.height - 105, 'pingu');\r\n this.pingu.anchor.setTo(.5,.5);\r\n this.pingu.animations.add('swim2');\r\n this.pingu.animations.play('swim2',4, true);\r\n this.pingu.scale.setTo(0.35, 0.35);\r\n this.pingu.name = \"pingu\";\r\n }\r\n\r\n \r\n\r\n animateRabbit(){\r\n this.rabbit = this.add.sprite(this.game.width+215, this.game.height-125, 'rabbit');\r\n this.rabbit.anchor.setTo(.5,.5);\r\n this.rabbit.animations.add('swim2');\r\n this.rabbit.animations.play('swim2', 20, true);\r\n this.rabbit.scale.setTo(-0.4, 0.4);\r\n this.rabbit.name = \"rabbit\";\r\n this.gobothways(this.rabbit);\r\n }\r\n\r\n\r\n\r\n\r\n //\r\n animateHare(){\r\n this.hare = this.add.sprite(this.game.width-115, this.game.height - 285, 'hare');\r\n this.hare.anchor.setTo(.5,.5);\r\n this.hare.animations.add('swim2');\r\n this.hare.animations.play('swim2', 5, true);\r\n this.hare.scale.setTo(0.4, 0.4);\r\n this.hare.name = \"hare\";\r\n this.hare.startingDirection = \"rightToLeft\";\r\n this.hare.spriteFacesDirection = \"right\";\r\n this.gobothways(this.hare);\r\n }\r\n\r\n\r\n //\r\n animateReindeer(){\r\n //this.reindeer = this.add.sprite(-115, this.game.height - 145, 'reindeer');\r\n this.reindeer = this.add.sprite(-75, this.game.height - 265, 'reindeer');\r\n this.reindeer.anchor.setTo(.5,.5);\r\n this.reindeer.animations.add('swim2');\r\n this.reindeer.animations.play('swim2', 5, true);\r\n this.reindeer.scale.setTo(-0.12, 0.12);\r\n this.reindeer.name = \"reindeer\";\r\n this.gobothways(this.reindeer);\r\n }\r\n\r\n\r\n //\r\n animateCoyote(){\r\n this.coyote = this.add.sprite(-115, this.game.height - 225, 'coyote');\r\n this.coyote.anchor.setTo(.5,.5);\r\n this.coyote.animations.add('swim2');\r\n this.coyote.animations.play('swim2', 5, true);\r\n this.coyote.scale.setTo(-1, 1);\r\n this.coyote.name = \"coyote\";\r\n this.gobothways(this.coyote);\r\n }\r\n\r\n\r\n //\r\n animateBirds(){\r\n this.birds = this.add.sprite(-50, 95, 'bird_fly');\r\n this.birds.anchor.setTo(.5,.5);\r\n this.birds.animations.add('swim2');\r\n this.birds.animations.play('swim2', 5, true);\r\n this.birds.scale.setTo(-0.3, 0.3);\r\n this.birds.name = \"birds\";\r\n //this.pegions.body.velocity.x = -20;\r\n this.gobothways(this.birds);\r\n }\r\n\r\n \r\n //\r\n animateBlueJay(){\r\n this.blue_jay = this.add.sprite(this.game.width-50, 135, 'blue_jay');\r\n this.blue_jay.anchor.setTo(.5,.5);\r\n this.blue_jay.animations.add('swim2');\r\n this.blue_jay.animations.play('swim2', 10, true);\r\n this.blue_jay.scale.setTo(0.6, 0.6);\r\n this.blue_jay.name = \"blue_jay\";\r\n //this.pegions.body.velocity.x = -20;\r\n this.gobothways(this.blue_jay);\r\n } \r\n\r\n //\r\n animateYeti(){\r\n this.yeti = this.add.sprite(this.game.width-15, this.game.height - 205, 'yeti_walk');\r\n this.yeti.anchor.setTo(.5,.5);\r\n this.yeti.animations.add('swim2');\r\n this.yeti.animations.play('swim2', 5, true);\r\n this.yeti.scale.setTo(-0.5, 0.5);\r\n this.yeti.name = \"yeti\";\r\n var t = this.add.tween(this.yeti).to({ x: this.game.width-45, y: this.game.height - 205}, 2000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){\r\n this.yeti.animations.stop(null, true);\r\n this.yeti.loadTexture('yeti_standing', 0);\r\n this.yeti.inputEnabled = true;\r\n this.yeti.events.onInputDown.addOnce(this.changeYetiLaugh, this);\r\n }, this);\r\n }\r\n\r\n changeYetiLaugh(){\r\n console.log(\"changed to laugh\");\r\n this.yeti.loadTexture('yeti_laugh', 0);\r\n this.yeti.animations.add('swim');\r\n this.yeti.animations.play('swim', 5, true);\r\n this.yeti.events.onInputDown.addOnce(this.changeToStanding, this);\r\n }\r\n\r\n changeToStanding(){\r\n console.log(\"changed to standing\");\r\n this.yeti.loadTexture('yeti_standing', 0);\r\n this.yeti.events.onInputDown.addOnce(this.changeYetiLaugh, this);\r\n }\r\n\r\n\r\n gobothways(b){\r\n\r\n //console.log('reached: ' + \"gobothways\" + \" \" + b.name);\r\n\r\n var change_amount = Math.floor(this.rnd.realInRange(0, 150));\r\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\r\n change_amount = 3*change_amount;\r\n \r\n var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n while((pos_y > this.game.height) || (pos_y < 70)){\r\n pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n }\r\n\r\n var t, X, Y;\r\n if(b.x > this.game.width){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000))\r\n t= this.add.tween(b).to({ x: X, y: pos_y}, 17500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n b.scale.x = -1*b.scale.x;\r\n X = this.game.width + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000))\r\n t = this.add.tween(b).to({ x: X, y: pos_y }, 17500+Math.floor(this.rnd.realInRange(0, 5000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n //*/ \r\n\r\n\r\n if((b.x >= 0) && (b.x <= this.game.width)){ \r\n if(b.startingDirection == \"leftToRight\"){\r\n if(b.spriteFacesDirection == \"left\"){\r\n //going \"leftToRight\", animalSprite is \"right facing\"\r\n b.scale.x = -1*b.scale.x;\r\n }\r\n\r\n var speedMultiplier = (this.game.width + 100 - b.x)/(this.game.width + 100 + 100);\r\n X = this.game.width + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000))\r\n t = this.add.tween(b).to({ x: X, y: pos_y }, speedMultiplier*(17500+Math.floor(this.rnd.realInRange(0, 5000))), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }else{\r\n //going rightToLeft\r\n if(b.spriteFacesDirection == \"right\"){ \r\n b.scale.x = -1*b.scale.x;\r\n }\r\n var speedMultiplier = (b.x + 100)/(this.game.width + 100 + 100);\r\n X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000))\r\n t= this.add.tween(b).to({ x: X, y: pos_y}, speedMultiplier*17500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n }\r\n \r\n\r\n }\r\n\r\n stopFish(b) {\r\n this.gobothways(b);\r\n }\r\n\r\n gobothways2(b,duration){\r\n\r\n var change_amount = Math.floor(this.rnd.realInRange(0, 150));\r\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\r\n change_amount = 3*change_amount;\r\n var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n while((pos_y > this.height) || (pos_y < 70)){\r\n pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n }\r\n\r\n var t, X, Y;\r\n if(b.x > this.CANVAS_WIDTH){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000))\r\n t= this.add.tween(b).to({ x: X, y: pos_y}, duration, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n //console.log('left to right, ' + b.x);\r\n b.scale.x = -1*b.scale.x;\r\n X = this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000))\r\n t = this.add.tween(b).to({ x: X, y: pos_y }, duration, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n //*/\r\n\r\n \r\n }\r\n\r\n \r\n\r\n setTotalPoints(totalPoints){\r\n\t\tthis.totalPoints = totalPoints;\r\n } \r\n \r\n assignscope(componentObject){\r\n this.componentObject = componentObject;\r\n }\r\n\r\n showunlockables(){\r\n console.log('treasure box clicked');\r\n this.componentObject.goToRewardsPage();\r\n }\r\n\r\n yourGamePausedFunc(){\r\n console.log(\"Game paused\");\r\n if(this.game.lockRender == false) \r\n this.game.lockRender = true;\r\n }\r\n\r\n yourGameResumedFunc(){\r\n console.log(\"Game resumed\");\r\n if(this.game.lockRender == true) \r\n this.game.lockRender = false;\r\n }\r\n}\r\n","export class PreloaderTundraL5 extends Phaser.State {\r\n\t\r\n\tpreload(){\r\n\r\n\t\tconsole.log(\"Preload called\");\r\n\t\tthis.input.addPointer();\r\n\t\t\r\n\r\n\t\tthis.load.onLoadComplete.addOnce(this.onLoadComplete, this);\r\n\r\n\t\tthis.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar');\r\n\t\tthis.preloadBar.anchor.setTo(0.5, 0.5);\r\n\t\tthis.load.setPreloadSprite(this.preloadBar);\r\n \r\n //---- both aquariums\r\n this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt');\r\n\t\tthis.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points\r\n\t\tthis.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png');\r\n\t\t//this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20);\r\n\r\n\t\tthis.add.text(0, 0, \"hack\", {font:\"1px dumbo_regular\", fill:\"#FFFFFF\"});\r\n\t\tthis.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20);\r\n\t\tthis.load.image('points_progress_2', 'assets/img/points_progress_2.png');\r\n\t\tthis.load.image('levels_progress', 'assets/img/levels_progress_2.png');\r\n\t\tthis.load.image('streak_info', 'assets/img/streak_info_2.png');\r\n\t\tthis.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20);\r\n\t\tthis.load.image('alt_icon', 'assets/img/heart.png');\r\n\t\tthis.load.image('next_fish_icon', 'assets/img/fish_icon_2.png');\r\n\t\tthis.load.image('meme_icon', 'assets/img/smiley_face.png');\r\n\t\tthis.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20);\r\n\t\tthis.load.image('level_up_icon', 'assets/img/level_icon.png');\r\n\t\tthis.load.image('level_up_2', 'assets/img/level_up_2.png');\r\n\t\tthis.load.image('streak_green', 'assets/img/streak_green.png');\r\n\t\tthis.load.image('streak_red', 'assets/img/streak_red_2.png');\r\n\t\tthis.load.image('streak_grey', 'assets/img/streak_grey.png');\r\n\t\tthis.load.image('star_point', 'assets/img/star.png');\r\n\t\tthis.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json');\r\n\t\t\r\n\r\n\t\tthis.load.image('diamond', 'assets/img/diamond.png');\r\n\r\n\r\n\t\t//----\r\n\t\tvar next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png';\r\n\t\tthis.load.image('clownfish_grey', next_fish);\r\n\r\n\r\n\t\tvar progressDisplay = 0;\r\n\t\tvar timerEvt = this.time.events.loop(100, function (){\r\n if(this.load.progress < 100){\r\n \tprogressDisplay++;\r\n console.log('loading... '+(this.load.progress)+'%' + \"; \" + (100*progressDisplay));\r\n }else{\r\n //loadingText.text = 'Ready, Go!';\r\n console.log('Ready, Go!');\r\n this.time.events.remove(timerEvt);\r\n }\r\n\r\n\t\t}, this);\r\n\r\n\t\t\r\n\r\n\t\t//this.game.load.image('tundra1','assets/pics/bg-tundra.png');\r\n\t\tthis.game.load.image('tundra1','assets/pics/bg-top-tundra.png');\r\n\t\tthis.load.image('titlescreen', 'assets/pics/bg-bottom-tundra.png'); \r\n \r\n\t\tthis.game.load.atlasJSONArray('penguin', 'assets/game/sprite/penguin_sprite.png', 'assets/game/sprite/penguin_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('sea_lion_silver', 'assets/game/sprite/sea_lion_silver_sprite.png', 'assets/game/sprite/sea_lion_silver_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('sea_lion_brown', 'assets/game/sprite/sea_lion_brown_sprite.png', 'assets/game/sprite/sea_lion_brown_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('sea_lion_pink', 'assets/game/sprite/PinkSeal.png', 'assets/game/sprite/PinkSeal.json');\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('wolf_walk', 'assets/game/sprite/wolf_walk_sprite.png', 'assets/game/sprite/wolf_walk_sprite.json');\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('bird_fly', 'assets/game/sprite/bird_tundra_sprite.png', 'assets/game/sprite/bird_tundra_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('blue_jay', 'assets/game/sprite/BlueJay.png', 'assets/game/sprite/BlueJay.json');\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('hare', 'assets/game/sprite/hare_tundra_sprite.png', 'assets/game/sprite/hare_tundra_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('pingu', 'assets/game/sprite/pingu_tundra_sprite.png', 'assets/game/sprite/pingu_tundra_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('coyote', 'assets/game/sprite/coyote_tundra_sprite.png', 'assets/game/sprite/coyote_tundra_sprite.json');\r\n\t\t\r\n\t\t\r\n \r\n //\r\n this.game.load.atlasJSONArray('grey_husky', 'assets/game/sprite/husky_grey_tundra_sprite.png', 'assets/game/sprite/husky_grey_tundra_sprite.json');\r\n this.game.load.atlasJSONArray('white_husky', 'assets/game/sprite/husky_white_tundra_sprite.png', 'assets/game/sprite/husky_white_tundra_sprite.json');\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('yeti_walk', 'assets/game/sprite/yeti_walk_sprite.png', 'assets/game/sprite/yeti_walk_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('yeti_laugh', 'assets/game/sprite/yeti_laugh_sprite.png', 'assets/game/sprite/yeti_laugh_sprite.json');\r\n\t\t\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('brown_bear', 'assets/game/sprite/brown_bear.png', 'assets/game/sprite/brown_bear.json');\r\n\t\tthis.game.load.atlasJSONArray('rabbit', 'assets/game/sprite/rabbit.png', 'assets/game/sprite/rabbit.json');\r\n\t\tthis.game.load.atlasJSONArray('reindeer', 'assets/game/sprite/reindeer.png', 'assets/game/sprite/reindeer.json');\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('duck', 'assets/game/sprite/Duck.png', 'assets/game/sprite/Duck.json');\r\n\t\tthis.game.load.atlasJSONArray('polar_bear_cub', 'assets/game/sprite/PolarBear.png', 'assets/game/sprite/PolarBear.json');\r\n\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('black_tundra_owl', 'assets/game/sprite/black_tundra_owl.png', 'assets/game/sprite/black_tundra_owl.json');\r\n\t\tthis.game.load.atlasJSONArray('brown_tundra_owl', 'assets/game/sprite/brown_tundra_owl.png', 'assets/game/sprite/brown_tundra_owl.json');\r\n\t\tthis.game.load.atlasJSONArray('grey_tundra_owl', 'assets/game/sprite/grey_tundra_owl.png', 'assets/game/sprite/grey_tundra_owl.json');\r\n\t\t//this.game.load.atlasJSONArray('light_brown_tundra_owl', 'assets/game/sprite/light_brown_tundra_owl.png', 'assets/game/sprite/light_brown_tundra_owl.json');\r\n\t\tthis.game.load.atlasJSONArray('white_tundra_owl', 'assets/game/sprite/white_tundra_owl.png', 'assets/game/sprite/white_tundra_owl.json');\r\n\r\n\r\n\t\t//mountain goat\r\n\t\tthis.game.load.atlasJSONArray('black_mountain_goat', 'assets/game/sprite/black_mountain_goat.png', 'assets/game/sprite/black_mountain_goat.json');\r\n\t\tthis.game.load.atlasJSONArray('brown_mountain_goat', 'assets/game/sprite/brown_mountain_goat.png', 'assets/game/sprite/brown_mountain_goat.json');\r\n\t\tthis.game.load.atlasJSONArray('white_mountain_goat', 'assets/game/sprite/white_mountain_goat.png', 'assets/game/sprite/white_mountain_goat.json');\r\n\r\n\r\n\t\t//\r\n\t\tthis.load.image('treasure_tundra', 'assets/img/tundra_treasure_chest.png');\r\n\r\n\t\t//\r\n\t\tthis.load.image('yeti_standing', 'assets/game/sprite/yeti_standing.png');\r\n\r\n\t\t//\r\n\t\t//this.load.image('snowgswitch', 'assets/img/snowglobe.png');\r\n\t\tthis.load.image('snow_start', 'assets/img/start_snow.png');\r\n\t\tthis.load.image('snow_end', 'assets/img/stop_snow.png');\r\n\r\n\t\t//\r\n\t\tthis.game.load.spritesheet('snowflakes', 'assets/game/sprite/snowflakes.png', 17, 17);\r\n\t\t//snowflakes.png\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tconsole.log(\"Preloader: create called\");\r\n\t\tthis.preloadBar.cropEnabled = false;\r\n\t}\r\n\r\n\tupdate(){\r\n\t\tconsole.log(\"update: \"+ 'TundraLevel1');\r\n\t\tthis.state.start('TundraLevel1');\r\n\t}\r\n\r\n\tonLoadComplete(){\r\n\t console.log(\"Load complete\");\r\n\t this.ready = true;\r\n\t}\r\n\r\n\t\r\n}","export class BootTundraL51 extends Phaser.State {\r\n preload() {\r\n this.load.image('preloaderBar', 'assets/img/loader_bar.png');\r\n }\r\n \r\n create() {\r\n\t\tthis.input.maxPointers = 1;\r\n\t\t//-- https://github.com/photonstorm/phaser-ce/issues/32\r\n\t\tif(this.game.device.touch){\r\n\t\t\tthis.input.mouse.stop();\r\n\t\t}\r\n\t\tthis.stage.disableVisibilityChange = false;\r\n\t\t//this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;\r\n\t\tthis.scale.minWidth = 270;\r\n\t\tthis.scale.minHeight = 400;\r\n\t\tthis.scale.pageAlignHorizontally = true;\r\n\t\tthis.scale.pageAlignVertically = true;\r\n\t\tthis.stage.forcePortrait = true;\r\n\t\t//this.scale.setScreenSize(true);\r\n\r\n\t\tthis.input.addPointer();\r\n\r\n\t\t//Change color here \r\n\t\t//-- http://www.w3schools.com/colors/colors_picker.asp\r\n\t\tthis.stage.backgroundColor = '#ffffff';\r\n \r\n\t\tthis.state.start('Preloader');\r\n\t\tconsole.log(\"Boot completed\");\r\n\t\r\n }\r\n}","export class GameTundraL51 extends Phaser.State {\r\n\r\n //componentObject;\r\n constructor(){\r\n super();\r\n this.componentObject;\r\n this.snowgswitch;\r\n this.back_emitter;\r\n this.mid_emitter;\r\n this.yeti;\r\n this.scaleFactor=0.8;\r\n this.surveyHistory = [];\r\n }\r\n\r\n //\r\n create() {\r\n\r\n console.log(\"create called\");\r\n \r\n var s = this.game.add.sprite(0,0,'tundra1');\r\n s.rotation = 0.0;\r\n var aspect_ratio = s.width/s.height;\r\n s.height = this.game.height - 310;\r\n s.width = s.height*aspect_ratio;\r\n\r\n //--- this is the bottom screen, blue water thing.\r\n var titlescreen = this.add.image(0, this.game.height-60, 'titlescreen');\r\n titlescreen.scale.setTo(0.6, 0.6);\r\n\r\n this.CANVAS_WIDTH = window.innerWidth;\r\n\r\n //\r\n this.height = this.game.height;\r\n\r\n //---\r\n //this.CANVAS_WIDTH = 382.0;\r\n //if(window.innerWidth > this.CANVAS_WIDTH)\r\n // this.CANVAS_WIDTH = window.innerWidth;\r\n\r\n //---\r\n //var timer = this.add.sprite(5, 40, 'timer', 1);\r\n\r\n //--- \r\n /*\r\n var fish_progress = this.add.image(175,50, 'clownfish_grey');\r\n fish_progress.scale.setTo(-0.3, 0.3);\r\n fish_progress.anchor.setTo(.5,.5);\r\n */\r\n \r\n //--- \r\n /*\r\n var pouch = this.add.image(15,80, 'diamond');\r\n pouch.scale.setTo(0.4, 0.4);\r\n pouch.anchor.setTo(.5,.5);\r\n this.badgecount = this.add.bitmapText(30, 73, 'eightbitwonder', \"\" + 2, 12);\r\n */\r\n\r\n //\r\n /*\r\n this.snowgswitch = this.add.image(5, 70, 'snowgswitch');\r\n this.snowgswitch.scale.setTo(0.15, 0.15);\r\n this.snowgswitch.inputEnabled = true;\r\n this.snowgswitch.events.onInputDown.addOnce(this.startsnowing, this);\r\n */\r\n \r\n\r\n //\r\n this.inputEnabled = false;\r\n Phaser.Canvas.setTouchAction(this.game.canvas, \"auto\");\r\n this.game.input.touch.preventDefault = false;\r\n\r\n\r\n //this.animateDuck();\r\n //this.animateSnowOwl();\r\n \r\n \r\n\r\n //\r\n var treasure = this.add.image(this.game.width/2, this.height-85, 'treasure_tundra');\r\n treasure.scale.setTo(-0.5*this.scaleFactor, 0.5*this.scaleFactor);\r\n treasure.anchor.setTo(.5,.5);\r\n treasure.inputEnabled = true;\r\n treasure.events.onInputDown.add(this.showunlockables, this);\r\n\r\n //\r\n this.addAnimals();\r\n\r\n //\r\n this.showProgressBars();\r\n\r\n //\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n\r\n //\r\n this.game.onPause.add(this.yourGamePausedFunc, this);\r\n this.game.onResume.add(this.yourGameResumedFunc, this);\r\n\r\n }\r\n\r\n showProgressBars(){\r\n\r\n var current_points = this.totalPoints;\r\n\r\n //------ Left side\r\n\r\n \r\n\r\n //level info\r\n //var levels_progress = this.add.image(5, 55, 'levels_progress');\r\n //levels_progress.scale.setTo(.27, .30);\r\n\r\n /*\r\n //\r\n var levels_progress = this.add.sprite(10, 58, 'level_up_progress', 0);\r\n levels_progress.scale.setTo(0.95, 1.2);\r\n\r\n //var progress_sprite = this.game.add.sprite(88, 59, 'level_up_progress', 1);\r\n var progress_sprite = this.game.add.sprite(10, 59, 'level_up_progress', 1);\r\n var rect = new Phaser.Rectangle(50, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n //progress_sprite.anchor.setTo(0,0);\r\n progress_sprite.scale.setTo(1,1.1);\r\n\r\n\r\n var level_up_icon = this.add.image(18, 68, 'level_up_icon');\r\n level_up_icon.scale.setTo(.5, .5);\r\n level_up_icon.anchor.setTo(.5, .5);\r\n\r\n var info_level_progress = this.add.sprite(2 + levels_progress.width + 18, 74, 'info_sprite');\r\n info_level_progress.animations.add('swim');\r\n info_level_progress.animations.play('swim', 1, true);\r\n info_level_progress.scale.setTo(0.3, 0.3);\r\n info_level_progress.anchor.setTo(.5,.5);\r\n info_level_progress.inputEnabled = true;\r\n info_level_progress.events.onInputDown.add(function(){this.showInforBox(\"Info level progress bar clicked\")}, this); \r\n\r\n \r\n //progress_sprite.anchor.setTo(1,0);\r\n //progress_sprite.scale.setTo(0.8,0.8);\r\n */\r\n\r\n var SCALING_FACTOR = 0.8;\r\n\r\n //streak_info\r\n var streak_info = this.add.image(5, 5, 'streak_info');\r\n streak_info.scale.setTo(.30*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n\r\n /*\r\n var info_level_streak = this.add.sprite(2 + streak_info.width + 12, 20, 'info_sprite');\r\n info_level_streak.animations.add('swim');\r\n info_level_streak.animations.play('swim', 1, true);\r\n info_level_streak.scale.setTo(0.3*SCALING_FACTOR, 0.3*SCALING_FACTOR);\r\n info_level_streak.anchor.setTo(.5,.5);\r\n info_level_streak.inputEnabled = true;\r\n info_level_streak.events.onInputDown.add(function(){this.showInforBox(\"Streak progress bar clicked\")}, this); \r\n */\r\n\r\n var colors = []; //['grey','grey','grey','grey','grey','grey','grey'];\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n if(this.surveyHistory[i] == 1)\r\n colors[i] = 'green';\r\n else\r\n colors[i] = 'grey';\r\n } \r\n colors = colors.reverse()\r\n \r\n //console.log(\"this.surveyHistory \" + this.surveyHistory);\r\n console.log(\"colors \" + colors);\r\n //colors = ['green','green','green','green','grey','green','grey'];\r\n var streak_tile;\r\n for(var i=0; i < this.surveyHistory.length; i++){\r\n streak_tile = this.add.image(32 + i*12, 10, 'streak_' + colors[i]);\r\n streak_tile.scale.setTo(.15*4*SCALING_FACTOR, .27*4*SCALING_FACTOR);\r\n }\r\n\r\n\r\n //------ Right side\r\n //var progressBars = this.add.group();\r\n\r\n //points bar\r\n vertical_position_offset = 13;\r\n var points_progress = this.add.image(this.CANVAS_WIDTH, 2, 'points_progress_2');\r\n points_progress.scale.setTo(.36*SCALING_FACTOR, .30*SCALING_FACTOR);\r\n points_progress.anchor.setTo(1,0);\r\n //progressBars.add(points_progress);\r\n\r\n //point text\r\n var points_text = this.add.text(this.CANVAS_WIDTH - 60, 8, \"\" + this.totalPoints, {font:\"20px dumbo_regular\", fill:\"#4c3d01\"});\r\n points_text.anchor.setTo(0.5,0);\r\n points_text.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n //progressBars.add(points_text);\r\n\r\n var star_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+4, 'star_point');\r\n star_icon.scale.setTo(SCALING_FACTOR, SCALING_FACTOR);\r\n star_icon.anchor.setTo(.5, .5);\r\n //progressBars.add(points_text);\r\n\r\n //progressBars.scale.setTo(.8, .8);\r\n\r\n /*\r\n var info_points = this.add.sprite(2 + points_progress.width + 13, 32, 'info_sprite');\r\n info_points.animations.add('swim');\r\n info_points.animations.play('swim', 1, true);\r\n info_points.scale.setTo(0.3, 0.3);\r\n info_points.anchor.setTo(.5,.5);\r\n info_points.inputEnabled = true;\r\n //function(){doAlert(textString)\r\n info_points.events.onInputDown.add(function(){this.showInforBox(\"Info pregess bar cliccked 2\")}, this); \r\n */\r\n\r\n \r\n //points to get to next fish.\r\n vertical_position_offset = 35;\r\n var progress_bar_fish = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 1);\r\n progress_bar_fish.anchor.setTo(1,0);\r\n progress_bar_fish.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_grey', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n var percent = (current_points-this.previoous_fish_point)/(this.next_fish_point-this.previoous_fish_point);\r\n if(percent == 0)\r\n percent = 0.05;\r\n console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var fish_progress_icon = this.add.image(this.CANVAS_WIDTH-16, vertical_position_offset+8, 'next_fish_icon');\r\n fish_progress_icon.scale.setTo(.2*0.8*SCALING_FACTOR, .2*0.8*SCALING_FACTOR);\r\n fish_progress_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n \r\n //points to get to meme.\r\n var vertical_position_offset = 57;\r\n\r\n /*\r\n var progress_bar_memes = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 1);\r\n progress_bar_memes.anchor.setTo(1,0);\r\n progress_bar_memes.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_memes = 0;\r\n var total_number_of_memes = 31;\r\n var already_shown_memes = window.localStorage[\"already_shown_memes3\"];\r\n if(already_shown_memes == undefined)\r\n already_shown_memes = [{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_memes = JSON.parse(window.localStorage[\"already_shown_memes3\"]);\r\n var currently_number_of_unlocked_memes = already_shown_memes.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_yellow', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_memes-start_number_of_memes)/\r\n (total_number_of_memes-start_number_of_memes);\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var meme_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+10, 'meme_icon');\r\n meme_icon.scale.setTo(.52*0.8*SCALING_FACTOR, .52*0.8*SCALING_FACTOR);\r\n meme_icon.anchor.setTo(.5, .5);\r\n\r\n\r\n //points to get to alt message.\r\n var vertical_position_offset = 79;\r\n var progress_bar_altruism_message = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 1);\r\n progress_bar_altruism_message.anchor.setTo(1,0);\r\n progress_bar_altruism_message.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var start_number_of_alt_messages = 0;\r\n var total_number_of_alt_messages = 21;\r\n\r\n var already_shown_altruism_msgs = window.localStorage[\"already_shown_alt_msg3\"];\r\n if(already_shown_altruism_msgs == undefined)\r\n already_shown_altruism_msgs = [{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": \"blah\"}]\r\n else\r\n already_shown_altruism_msgs = JSON.parse(window.localStorage[\"already_shown_alt_msg3\"]);\r\n var currently_number_of_unlocked_alt_messages = already_shown_altruism_msgs.length;\r\n\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (currently_number_of_unlocked_alt_messages-start_number_of_alt_messages)/\r\n (total_number_of_alt_messages-start_number_of_alt_messages);\r\n //if(percent < 0.05)\r\n percent = percent*0.8 + 0.2;\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n console.log(\"Alt Width, \" + rect.width + \",\" + percent);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n \r\n var alt_icon = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'alt_icon');\r\n alt_icon.scale.setTo(.12*0.8*SCALING_FACTOR, .12*0.8*SCALING_FACTOR);\r\n alt_icon.anchor.setTo(.5, .5);\r\n \r\n\r\n\r\n //points to get to level up.\r\n var vertical_position_offset = 101;\r\n */\r\n\r\n var progress_bar_level_up = this.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 1);\r\n progress_bar_level_up.anchor.setTo(1,0);\r\n progress_bar_level_up.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n // end of level is 1060, start is at 0\r\n var start_point_for_level = 2120;\r\n var end_point_for_level = 3020;\r\n progress_sprite = this.game.add.sprite(this.CANVAS_WIDTH-15, vertical_position_offset+5, 'timer_pumpkin', 0);\r\n rect = new Phaser.Rectangle(0, 0, 0, progress_sprite.height);\r\n percent = (current_points-start_point_for_level)/(end_point_for_level-start_point_for_level);\r\n percent = percent*0.8 + 0.2;\r\n //console.log(\"\" + current_points + \",\" + this.previoous_fish_point + \",\" + this.next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * progress_sprite.width);\r\n //console.log(\"Width, \" + rect.width + \",\" + progress_sprite.width);\r\n progress_sprite.crop(rect);\r\n progress_sprite.anchor.setTo(1,0);\r\n progress_sprite.scale.setTo(0.8*SCALING_FACTOR,0.5*SCALING_FACTOR);\r\n\r\n var level_up_2 = this.add.image(this.CANVAS_WIDTH-18, vertical_position_offset+12, 'level_up_2');\r\n level_up_2.scale.setTo(.12*0.9*SCALING_FACTOR, .12*0.9*SCALING_FACTOR);\r\n level_up_2.anchor.setTo(.5, .5);\r\n\r\n\r\n\r\n\r\n\r\n\r\n //this.countdown = this.add.bitmapText(10, 10, 'eightbitwonder', 'Points: ' + this.totalPoints, 20);\r\n //console.log(\"countdown.width \" + this.countdown.width);\r\n\r\n \r\n }\r\n\r\n setSurveyHistory(survey_history){\r\n console.log(\"survey_history \" + survey_history + \", length: \" + survey_history.length);\r\n //this.surveyHistory = survey_history;\r\n for(var i=0; i= data[i].points){\r\n drawing_order_enabled[data[i].name.valueOf()] = 1;\r\n }\r\n }\r\n \r\n\r\n for(var key in drawing_order_enabled) {\r\n\r\n //means it is not included\r\n if(drawing_order_enabled[key] == 0)\r\n continue;\r\n\r\n\r\n if(drawing_order_enabled[key] == 1){\r\n\r\n //nemo\r\n if(key === \"Penguin\")\r\n this.animatePenguin();\r\n\r\n if(key === \"Seal\")\r\n this.animateSealion();\r\n\r\n if(key === \"Grey Wolf\")\r\n this.animateWolf();\r\n\r\n if(key === \"Brown Bear\")\r\n this.animateBear(); \r\n\r\n if(key === \"Snow Bunting\")\r\n this.animateBirds();\r\n\r\n if(key === \"Hare\")\r\n this.animateHare();\r\n\r\n if(key === \"Pingu, the Penguin\")\r\n this.animatePingu(); \r\n\r\n //if(data[i].name.valueOf() === \"Coyote\")\r\n // this.animateCoyote(); \r\n\r\n //if(data[i].name.valueOf() === \"White Husky\")\r\n // this.animateWhiteHusky(); \r\n\r\n\r\n if(key === \"Snow\")\r\n this.animateSnow(); \r\n\r\n\r\n if(key === \"Grey Husky\")\r\n this.animateBrwonHusky(); \r\n\r\n if(key === \"Yeti\")\r\n this.animateYeti(); \r\n\r\n \r\n\r\n if(key === \"Reindeer\")\r\n this.animateReindeer();\r\n \r\n \r\n\r\n if(key === \"Snowy Owl\")\r\n this.animateSnowOwl();\r\n\r\n\r\n if(key === \"Ducks\")\r\n this.animateDuck();\r\n\r\n if(key === \"Mountain goat\")\r\n this.animateMountainGoat();\r\n\r\n if(key === \"Blue Jay\")\r\n this.animateBlueJay();\r\n\r\n /* \r\n if(data[i].name.valueOf() === \"Rabbit\")\r\n this.animateRabbit(); \r\n */\r\n\r\n }\r\n }\r\n \r\n\r\n //set the progres bar\r\n this.previoous_fish_point = 0;\r\n this.next_fish_point = 0;\r\n for(var i = 0; i < data.length; i++) {\r\n if(current_points < data[i].points){\r\n this.next_fish_point = data[i].points;\r\n break;\r\n }else{\r\n this.previoous_fish_point = data[i].points;\r\n }\r\n }\r\n\r\n /*\r\n this.progress_sprite = this.game.add.sprite(5, 40, 'timer', 0);\r\n var rect = new Phaser.Rectangle(0, 0, 0, this.progress_sprite.height);\r\n var percent = (current_points-previoous_fish_point)/(next_fish_point-previoous_fish_point);\r\n console.log(\"\" + current_points + \",\" + previoous_fish_point + \",\" + next_fish_point + \",\" + percent);\r\n rect.width = Math.max(0, percent * this.progress_sprite.width);\r\n\r\n console.log(\"Width, \" + rect.width + \",\" + this.progress_sprite.width);\r\n this.progress_sprite.crop(rect);\r\n */\r\n }\r\n\r\n animateSnow(){\r\n //console.log(\"snow button loaded\");\r\n this.snowgswitch = this.add.image(5, 70, 'snow_start');\r\n this.snowgswitch.scale.setTo(0.6, 0.6);\r\n this.snowgswitch.inputEnabled = true;\r\n this.snowgswitch.events.onInputDown.addOnce(this.startsnowing, this);\r\n }\r\n\r\n \r\n\r\n //-- Add Penguin\r\n animatePenguin(){\r\n\r\n console.log(\"Device pixel ratio is: \" + window.devicePixelRatio)\r\n\r\n var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y;\r\n starting_pos_x = -15;\r\n starting_pos_y = this.game.height - 145;\r\n ending_pos_x = 45;\r\n ending_pos_y = this.game.height - 105;\r\n scale_x = 0.25;\r\n scale_y = 0.25;\r\n\r\n this.penguins = this.add.sprite(starting_pos_x, starting_pos_y, 'penguin');\r\n this.penguins.anchor.setTo(.5,.5);\r\n this.penguins.animations.add('swim2');\r\n this.penguins.animations.play('swim2', 5, true);\r\n this.penguins.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor);\r\n this.penguins.name = \"pegions\";\r\n var t = this.add.tween(this.penguins).to({ x: ending_pos_x, y: ending_pos_y}, 1000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.penguins.animations.stop(null, true);}, this);\r\n }\r\n \r\n //-- Add sea lion\r\n animateSealion(){\r\n\r\n var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y;\r\n \r\n \r\n //---- sea lion silver\r\n starting_pos_x = this.game.width+15;\r\n starting_pos_y = this.game.height - 105;\r\n ending_pos_x = this.game.width-65;\r\n ending_pos_y = this.game.height - 105;\r\n scale_x = 1.3;\r\n scale_y = 1.3;\r\n\r\n this.sealion = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_silver');\r\n this.sealion.anchor.setTo(.5,.5);\r\n this.sealion.animations.add('swim2');\r\n this.sealion.animations.play('swim2', 5, true);\r\n this.sealion.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor);\r\n this.sealion.name = \"sea_lion_silver\";\r\n var t = this.add.tween(this.sealion).to({ x: ending_pos_x, y: ending_pos_y}, 3000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion.animations.stop(null, true);}, this);\r\n\r\n\r\n //---- sea lion brown\r\n starting_pos_x = this.game.width+25;\r\n starting_pos_y = this.game.height - 125;\r\n ending_pos_x = this.game.width-45;\r\n ending_pos_y = this.game.height - 125;\r\n scale_x = 1.3;\r\n scale_y = 1.3;\r\n\r\n this.sealion_brown = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_brown');\r\n this.sealion_brown.anchor.setTo(.5,.5);\r\n this.sealion_brown.animations.add('swim2');\r\n this.sealion_brown.animations.play('swim2', 5, true);\r\n this.sealion_brown.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor);\r\n this.sealion_brown.name = \"sea_lion_brown\";\r\n var t = this.add.tween(this.sealion_brown).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion_brown.animations.stop(null, true);}, this);\r\n\r\n //---- sea lion pink\r\n starting_pos_x = this.game.width+125;\r\n starting_pos_y = this.game.height - 85;\r\n ending_pos_x = this.game.width-25;\r\n ending_pos_y = this.game.height - 85;\r\n scale_x = 0.8;\r\n scale_y = 0.8;\r\n\r\n this.sealion_pink = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_pink');\r\n this.sealion_pink.anchor.setTo(.5,.5);\r\n this.sealion_pink.animations.add('swim2');\r\n this.sealion_pink.animations.play('swim2', 5, true);\r\n this.sealion_pink.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor);\r\n this.sealion_pink.name = \"sea_lion_pink\";\r\n var t = this.add.tween(this.sealion_pink).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion_pink.animations.stop(null, true);}, this);\r\n\r\n }\r\n\r\n //\r\n animateDuck(){\r\n this.duck = this.add.sprite(this.game.width+15, this.game.height-20, 'duck');\r\n this.duck.anchor.setTo(.5,.5);\r\n this.duck.animations.add('swim2');\r\n this.duck.animations.play('swim2', 3, true);\r\n this.duck.scale.setTo(1, 1);\r\n this.duck.name = \"duck\";\r\n this.gobothways(this.duck);\r\n\r\n this.duck2 = this.add.sprite(this.game.width+55, this.game.height-20, 'duck');\r\n this.duck2.anchor.setTo(.5,.5);\r\n this.duck2.animations.add('swim2');\r\n this.duck2.animations.play('swim2', 3, true);\r\n this.duck2.scale.setTo(1, 1);\r\n this.duck2.name = \"duck2\";\r\n this.gobothways(this.duck2);\r\n }\r\n\r\n animateBearCub(){\r\n //console.log(\"snow button loaded\");\r\n this.polarBearCub = this.add.sprite(this.game.width+15, this.game.height - 290, 'polar_bear_cub');\r\n this.polarBearCub.anchor.setTo(.5,.5);\r\n this.polarBearCub.animations.add('swim2');\r\n this.polarBearCub.animations.play('swim2', 3, true);\r\n this.polarBearCub.scale.setTo(-0.8, 0.8);\r\n this.polarBearCub.name = \"polarBearCub\";\r\n this.gobothways(this.polarBearCub);\r\n }\r\n\r\n\r\n\r\n\r\n //\r\n animateSnowOwl(){\r\n //\r\n this.black_tundra_owl = this.add.sprite(this.game.width-130, 195, 'black_tundra_owl');\r\n this.black_tundra_owl.anchor.setTo(.5,.5);\r\n this.black_tundra_owl.animations.add('swim2');\r\n this.black_tundra_owl.animations.play('swim2', 5, true);\r\n this.black_tundra_owl.scale.setTo(0.9*this.scaleFactor, 0.9*this.scaleFactor);\r\n this.black_tundra_owl.name = \"black_tundra_owl\";\r\n this.gobothways(this.black_tundra_owl);\r\n\r\n\r\n this.brown_tundra_owl = this.add.sprite(this.game.width-100, 200, 'brown_tundra_owl');\r\n this.brown_tundra_owl.anchor.setTo(.5,.5);\r\n this.brown_tundra_owl.animations.add('swim2');\r\n this.brown_tundra_owl.animations.play('swim2', 5, true);\r\n this.brown_tundra_owl.scale.setTo(0.9*this.scaleFactor, 0.9*this.scaleFactor);\r\n this.brown_tundra_owl.name = \"brown_tundra_owl\";\r\n this.gobothways(this.brown_tundra_owl);\r\n\r\n\r\n this.grey_tundra_owl = this.add.sprite(this.game.width-160, 205, 'grey_tundra_owl');\r\n this.grey_tundra_owl.anchor.setTo(.5,.5);\r\n this.grey_tundra_owl.animations.add('swim2');\r\n this.grey_tundra_owl.animations.play('swim2', 5, true);\r\n this.grey_tundra_owl.scale.setTo(0.9*this.scaleFactor, 0.9*this.scaleFactor);\r\n this.grey_tundra_owl.name = \"grey_tundra_owl\";\r\n this.gobothways(this.grey_tundra_owl);\r\n\r\n /*\r\n this.light_brown_tundra_owl = this.add.sprite(this.game.width-170, 180, 'light_brown_tundra_owl');\r\n this.light_brown_tundra_owl.anchor.setTo(.5,.5);\r\n this.light_brown_tundra_owl.animations.add('swim2');\r\n this.light_brown_tundra_owl.animations.play('swim2', 5, true);\r\n this.light_brown_tundra_owl.scale.setTo(0.9, 0.9);\r\n this.light_brown_tundra_owl.name = \"light_brown_tundra_owl\";\r\n this.gobothways(this.light_brown_tundra_owl);\r\n */\r\n\r\n this.white_tundra_owl = this.add.sprite(this.game.width-200, 185, 'white_tundra_owl');\r\n this.white_tundra_owl.anchor.setTo(.5,.5);\r\n this.white_tundra_owl.animations.add('swim2');\r\n this.white_tundra_owl.animations.play('swim2', 5, true);\r\n this.white_tundra_owl.scale.setTo(0.9*this.scaleFactor, 0.9*this.scaleFactor);\r\n this.white_tundra_owl.name = \"white_tundra_owl\";\r\n this.gobothways(this.white_tundra_owl);\r\n\r\n }\r\n\r\n //\r\n animateMountainGoat(){\r\n var starting_pos_x, starting_pos_y, ending_pos_x, ending_pos_y, scale_x, scale_y;\r\n \r\n \r\n //---- sea lion silver\r\n starting_pos_x = this.game.width/2-60;\r\n starting_pos_y = this.game.height - 185 + 30;\r\n ending_pos_x = this.game.width/2-15;\r\n ending_pos_y = this.game.height - 185 + 30;\r\n scale_x = 1.3;\r\n scale_y = 1.3;\r\n\r\n this.black_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'black_mountain_goat');\r\n this.black_mountain_goat.anchor.setTo(.5,.5);\r\n this.black_mountain_goat.animations.add('swim2');\r\n this.black_mountain_goat.animations.play('swim2', 3, true);\r\n this.black_mountain_goat.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor);\r\n this.black_mountain_goat.name = \"black_mountain_goat\";\r\n var t = this.add.tween(this.black_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 9000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.black_mountain_goat.animations.stop(null, true);}, this);\r\n\r\n\r\n starting_pos_x = this.game.width-10;\r\n starting_pos_y = this.game.height - 205 + 40;\r\n ending_pos_x = this.game.width/2+50;\r\n ending_pos_y = this.game.height - 205 + 40;\r\n scale_x = -1.5;\r\n scale_y = 1.5;\r\n\r\n this.white_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'white_mountain_goat');\r\n this.white_mountain_goat.anchor.setTo(.5,.5);\r\n this.white_mountain_goat.animations.add('swim2');\r\n this.white_mountain_goat.animations.play('swim2', 3, true);\r\n this.white_mountain_goat.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor);\r\n this.white_mountain_goat.name = \"white_mountain_goat\";\r\n t = this.add.tween(this.white_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 15000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.white_mountain_goat.animations.stop(null, true);}, this);\r\n\r\n\r\n starting_pos_x = this.game.width-10;\r\n starting_pos_y = this.game.height - 175 + 40;\r\n ending_pos_x = this.game.width/2+30;\r\n ending_pos_y = this.game.height - 175 + 40;\r\n scale_x = -1.2;\r\n scale_y = 1.2;\r\n\r\n this.brown_mountain_goat = this.add.sprite(starting_pos_x, starting_pos_y, 'brown_mountain_goat');\r\n this.brown_mountain_goat.anchor.setTo(.5,.5);\r\n this.brown_mountain_goat.animations.add('swim2');\r\n this.brown_mountain_goat.animations.play('swim2', 3, true);\r\n this.brown_mountain_goat.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor);\r\n this.brown_mountain_goat.name = \"brown_mountain_goat\";\r\n t = this.add.tween(this.brown_mountain_goat).to({ x: ending_pos_x, y: ending_pos_y}, 9000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.brown_mountain_goat.animations.stop(null, true);}, this);\r\n\r\n /*\r\n //---- sea lion brown\r\n starting_pos_x = this.game.width+25;\r\n starting_pos_y = this.game.height - 135;\r\n ending_pos_x = this.game.width-45;\r\n ending_pos_y = this.game.height - 135;\r\n scale_x = 1.3;\r\n scale_y = 1.3;\r\n\r\n this.sealion_brown = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_brown');\r\n this.sealion_brown.anchor.setTo(.5,.5);\r\n this.sealion_brown.animations.add('swim2');\r\n this.sealion_brown.animations.play('swim2', 5, true);\r\n this.sealion_brown.scale.setTo(scale_x, scale_y);\r\n this.sealion_brown.name = \"sea_lion_brown\";\r\n var t = this.add.tween(this.sealion_brown).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion_brown.animations.stop(null, true);}, this);\r\n\r\n //---- sea lion pink\r\n starting_pos_x = this.game.width+125;\r\n starting_pos_y = this.game.height - 85;\r\n ending_pos_x = this.game.width-25;\r\n ending_pos_y = this.game.height - 85;\r\n scale_x = 0.8;\r\n scale_y = 0.8;\r\n\r\n this.sealion_pink = this.add.sprite(starting_pos_x, starting_pos_y, 'sea_lion_pink');\r\n this.sealion_pink.anchor.setTo(.5,.5);\r\n this.sealion_pink.animations.add('swim2');\r\n this.sealion_pink.animations.play('swim2', 5, true);\r\n this.sealion_pink.scale.setTo(scale_x, scale_y);\r\n this.sealion_pink.name = \"sea_lion_pink\";\r\n var t = this.add.tween(this.sealion_pink).to({x: ending_pos_x, y: ending_pos_y}, 5000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){this.sealion_pink.animations.stop(null, true);}, this);\r\n */\r\n }\r\n\r\n //--- add wolf animation.\r\n animateWolf(){\r\n\r\n var starting_pos_x, starting_pos_y, scale_x, scale_y;\r\n\r\n //---- wolf walk\r\n starting_pos_x = this.game.width-100;\r\n starting_pos_y = this.game.height-285;\r\n scale_x = 0.8;\r\n scale_y = 0.8;\r\n\r\n this.wolf = this.add.sprite(starting_pos_x, starting_pos_y, 'wolf_walk');\r\n //this.wolf = this.add.sprite(this.game.width+100, this.game.height-295, 'wolf_walk');\r\n this.wolf.anchor.setTo(.5,.5);\r\n this.wolf.animations.add('swim');\r\n this.wolf.animations.play('swim', 3, true);\r\n this.wolf.scale.setTo(scale_x*this.scaleFactor, scale_y*this.scaleFactor);\r\n this.wolf.name = \"wolf\";\r\n this.wolf.startingDirection = \"leftToRight\";\r\n this.wolf.spriteFacesDirection = \"right\";\r\n this.gobothways(this.wolf);\r\n }\r\n\r\n animateBear(){\r\n this.brown_bear = this.add.sprite(-200, this.game.height-325, 'brown_bear');\r\n this.brown_bear.anchor.setTo(.5,.5);\r\n this.brown_bear.animations.add('swim');\r\n this.brown_bear.animations.play('swim', 6, true);\r\n this.brown_bear.scale.setTo(-.15*this.scaleFactor, .15*this.scaleFactor);\r\n this.brown_bear.name = \"brown_bear\";\r\n this.gobothways(this.brown_bear);\r\n\r\n this.animateBearCub();\r\n }\r\n\r\n \r\n\r\n //\r\n animateBrwonHusky(){\r\n\r\n this.white_husky = this.add.sprite(65, this.game.height - 205, 'white_husky');\r\n this.white_husky.anchor.setTo(.5,.5);\r\n this.white_husky.animations.add('swim2');\r\n this.white_husky.animations.play('swim2',15, true);\r\n this.white_husky.scale.setTo(0.35*this.scaleFactor, 0.35*this.scaleFactor);\r\n this.white_husky.name = \"white_husky\";\r\n\r\n\r\n this.white_husky = this.add.sprite(65, this.game.height - 175, 'grey_husky');\r\n this.white_husky.anchor.setTo(.5,.5);\r\n this.white_husky.animations.add('swim2');\r\n this.white_husky.animations.play('swim2',15, true);\r\n this.white_husky.scale.setTo(0.35*this.scaleFactor, 0.35*this.scaleFactor);\r\n this.white_husky.name = \"grey_husky\";\r\n }\r\n\r\n //\r\n animatePingu(){\r\n this.pingu = this.add.sprite(105, this.game.height - 105, 'pingu');\r\n this.pingu.anchor.setTo(.5,.5);\r\n this.pingu.animations.add('swim2');\r\n this.pingu.animations.play('swim2',4, true);\r\n this.pingu.scale.setTo(0.35*this.scaleFactor, 0.35*this.scaleFactor);\r\n this.pingu.name = \"pingu\";\r\n }\r\n\r\n \r\n\r\n animateRabbit(){\r\n this.rabbit = this.add.sprite(this.game.width+215, this.game.height-125, 'rabbit');\r\n this.rabbit.anchor.setTo(.5,.5);\r\n this.rabbit.animations.add('swim2');\r\n this.rabbit.animations.play('swim2', 20, true);\r\n this.rabbit.scale.setTo(-0.4, 0.4);\r\n this.rabbit.name = \"rabbit\";\r\n this.gobothways(this.rabbit);\r\n }\r\n\r\n\r\n\r\n\r\n //\r\n animateHare(){\r\n this.hare = this.add.sprite(this.game.width-115, this.game.height - 245, 'hare');\r\n this.hare.anchor.setTo(.5,.5);\r\n this.hare.animations.add('swim2');\r\n this.hare.animations.play('swim2', 5, true);\r\n this.hare.scale.setTo(0.4*this.scaleFactor, 0.4*this.scaleFactor);\r\n this.hare.name = \"hare\";\r\n this.hare.startingDirection = \"rightToLeft\";\r\n this.hare.spriteFacesDirection = \"right\";\r\n this.gobothways(this.hare);\r\n }\r\n\r\n\r\n //\r\n animateReindeer(){\r\n //this.reindeer = this.add.sprite(-115, this.game.height - 145, 'reindeer');\r\n this.reindeer = this.add.sprite(-75, this.game.height - 230, 'reindeer');\r\n this.reindeer.anchor.setTo(.5,.5);\r\n this.reindeer.animations.add('swim2');\r\n this.reindeer.animations.play('swim2', 5, true);\r\n this.reindeer.scale.setTo(-0.12*this.scaleFactor, 0.12*this.scaleFactor);\r\n this.reindeer.name = \"reindeer\";\r\n this.gobothways(this.reindeer);\r\n }\r\n\r\n\r\n //\r\n animateCoyote(){\r\n this.coyote = this.add.sprite(-115, this.game.height - 225, 'coyote');\r\n this.coyote.anchor.setTo(.5,.5);\r\n this.coyote.animations.add('swim2');\r\n this.coyote.animations.play('swim2', 5, true);\r\n this.coyote.scale.setTo(-1*this.scaleFactor, 1*this.scaleFactor);\r\n this.coyote.name = \"coyote\";\r\n this.gobothways(this.coyote);\r\n }\r\n\r\n\r\n //\r\n animateBirds(){\r\n this.birds = this.add.sprite(-50, 95, 'bird_fly');\r\n this.birds.anchor.setTo(.5,.5);\r\n this.birds.animations.add('swim2');\r\n this.birds.animations.play('swim2', 5, true);\r\n this.birds.scale.setTo(-0.3, 0.3);\r\n this.birds.name = \"birds\";\r\n //this.pegions.body.velocity.x = -20;\r\n this.gobothways(this.birds);\r\n }\r\n\r\n \r\n //\r\n animateBlueJay(){\r\n this.blue_jay = this.add.sprite(this.game.width-50, 135, 'blue_jay');\r\n this.blue_jay.anchor.setTo(.5,.5);\r\n this.blue_jay.animations.add('swim2');\r\n this.blue_jay.animations.play('swim2', 10, true);\r\n this.blue_jay.scale.setTo(0.6*this.scaleFactor, 0.6*this.scaleFactor);\r\n this.blue_jay.name = \"blue_jay\";\r\n //this.pegions.body.velocity.x = -20;\r\n this.gobothways(this.blue_jay);\r\n } \r\n\r\n //\r\n animateYeti(){\r\n this.yeti = this.add.sprite(this.game.width-15, this.game.height - 190, 'yeti_walk');\r\n this.yeti.anchor.setTo(.5,.5);\r\n this.yeti.animations.add('swim2');\r\n this.yeti.animations.play('swim2', 5, true);\r\n this.yeti.scale.setTo(-0.5*this.scaleFactor, 0.5*this.scaleFactor);\r\n this.yeti.name = \"yeti\";\r\n var t = this.add.tween(this.yeti).to({ x: this.game.width-45, y: this.game.height - 205}, 2000, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(function(){\r\n this.yeti.animations.stop(null, true);\r\n this.yeti.loadTexture('yeti_standing', 0);\r\n this.yeti.inputEnabled = true;\r\n this.yeti.events.onInputDown.addOnce(this.changeYetiLaugh, this);\r\n }, this);\r\n }\r\n\r\n changeYetiLaugh(){\r\n console.log(\"changed to laugh\");\r\n this.yeti.loadTexture('yeti_laugh', 0);\r\n this.yeti.animations.add('swim');\r\n this.yeti.animations.play('swim', 5, true);\r\n this.yeti.events.onInputDown.addOnce(this.changeToStanding, this);\r\n }\r\n\r\n changeToStanding(){\r\n console.log(\"changed to standing\");\r\n this.yeti.loadTexture('yeti_standing', 0);\r\n this.yeti.events.onInputDown.addOnce(this.changeYetiLaugh, this);\r\n }\r\n\r\n\r\n gobothways(b){\r\n\r\n //console.log('reached: ' + \"gobothways\" + \" \" + b.name);\r\n\r\n var change_amount = Math.floor(this.rnd.realInRange(0, 150));\r\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\r\n change_amount = 3*change_amount;\r\n \r\n var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n while((pos_y > this.game.height) || (pos_y < 70)){\r\n pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n }\r\n\r\n var t, X, Y;\r\n if(b.x > this.game.width){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000))\r\n t= this.add.tween(b).to({ x: X, y: pos_y}, 17500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n b.scale.x = -1*b.scale.x;\r\n X = this.game.width + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000))\r\n t = this.add.tween(b).to({ x: X, y: pos_y }, 17500+Math.floor(this.rnd.realInRange(0, 5000)), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n //*/ \r\n\r\n\r\n if((b.x >= 0) && (b.x <= this.game.width)){ \r\n if(b.startingDirection == \"leftToRight\"){\r\n if(b.spriteFacesDirection == \"left\"){\r\n //going \"leftToRight\", animalSprite is \"right facing\"\r\n b.scale.x = -1*b.scale.x;\r\n }\r\n\r\n var speedMultiplier = (this.game.width + 100 - b.x)/(this.game.width + 100 + 100);\r\n X = this.game.width + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000))\r\n t = this.add.tween(b).to({ x: X, y: pos_y }, speedMultiplier*(17500+Math.floor(this.rnd.realInRange(0, 5000))), Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }else{\r\n //going rightToLeft\r\n if(b.spriteFacesDirection == \"right\"){ \r\n b.scale.x = -1*b.scale.x;\r\n }\r\n var speedMultiplier = (b.x + 100)/(this.game.width + 100 + 100);\r\n X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000))\r\n t= this.add.tween(b).to({ x: X, y: pos_y}, speedMultiplier*17500, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n }\r\n \r\n\r\n }\r\n\r\n stopFish(b) {\r\n this.gobothways(b);\r\n }\r\n\r\n gobothways2(b,duration){\r\n\r\n var change_amount = Math.floor(this.rnd.realInRange(0, 150));\r\n if(Math.floor(this.rnd.realInRange(0, 10))==2)\r\n change_amount = 3*change_amount;\r\n var pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n while((pos_y > this.height) || (pos_y < 70)){\r\n pos_y = b.y;// + Math.floor(this.rnd.realInRange(-1*change_amount, change_amount));\r\n }\r\n\r\n var t, X, Y;\r\n if(b.x > this.CANVAS_WIDTH){ \r\n //console.log('right to left, ' + b.x);\r\n //b.scale.setTo(-0.4, 0.4);//b.scale.x * (-1);\r\n b.scale.x = -1*b.scale.x;\r\n X = -100+Math.floor(this.rnd.realInRange(0, 50));//+Math.floor(this.rnd.realInRange(0, 50)); + Math.floor(this.rnd.realInRange(0, 2000))\r\n t= this.add.tween(b).to({ x: X, y: pos_y}, duration, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this); \r\n }\r\n\r\n if(b.x < 0){\r\n //console.log('left to right, ' + b.x);\r\n b.scale.x = -1*b.scale.x;\r\n X = this.CANVAS_WIDTH + 100 - Math.floor(this.rnd.realInRange(0, 50)); //+ Math.floor(this.rnd.realInRange(0, 2000))\r\n t = this.add.tween(b).to({ x: X, y: pos_y }, duration, Phaser.Easing.Quadratic.InOut, true, 0);\r\n t.onComplete.add(this.stopFish, this);\r\n }\r\n //*/\r\n\r\n \r\n }\r\n\r\n \r\n\r\n setTotalPoints(totalPoints){\r\n\t\tthis.totalPoints = totalPoints;\r\n } \r\n \r\n assignscope(componentObject){\r\n this.componentObject = componentObject;\r\n }\r\n\r\n showunlockables(){\r\n console.log('treasure box clicked');\r\n this.componentObject.goToRewardsPage();\r\n }\r\n\r\n yourGamePausedFunc(){\r\n console.log(\"Game paused\");\r\n if(this.game.lockRender == false) \r\n this.game.lockRender = true;\r\n }\r\n\r\n yourGameResumedFunc(){\r\n console.log(\"Game resumed\");\r\n if(this.game.lockRender == true) \r\n this.game.lockRender = false;\r\n }\r\n}\r\n","export class PreloaderTundraL51 extends Phaser.State {\r\n\t\r\n\tpreload(){\r\n\r\n\t\tconsole.log(\"Preload called\");\r\n\t\tthis.input.addPointer();\r\n\t\t\r\n\r\n\t\tthis.load.onLoadComplete.addOnce(this.onLoadComplete, this);\r\n\r\n\t\tthis.preloadBar = this.add.sprite(this.world.centerX, this.world.centerY, 'preloaderBar');\r\n\t\tthis.preloadBar.anchor.setTo(0.5, 0.5);\r\n\t\tthis.load.setPreloadSprite(this.preloadBar);\r\n \r\n //---- both aquariums\r\n this.load.bitmapFont('eightbitwonder', 'assets/fonts/eightbitwonder.png', 'assets/fonts/eightbitwonder.fnt');\r\n\t\tthis.load.json('fishpoints', 'assets/game/fishpoints.json');//fish json, points\r\n\t\tthis.load.image('fish_progress', 'assets/game/sprite/fish_progress_s.png');\r\n\t\t\r\n\t\tthis.add.text(0, 0, \"hack\", {font:\"1px dumbo_regular\", fill:\"#FFFFFF\"});\r\n\t\t//this.load.spritesheet('timer', 'assets/game/sprite/timer.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer', 'assets/img/timer_red.png', 150, 20);\r\n\t\tthis.load.image('points_progress_2', 'assets/img/points_progress_2.png');\r\n\t\tthis.load.image('levels_progress', 'assets/img/levels_progress_2.png');\r\n\t\tthis.load.image('streak_info', 'assets/img/streak_info_2.png');\r\n\t\tthis.load.spritesheet('timer_grey', 'assets/img/timer_grey.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_yellow', 'assets/img/timer_yellow.png', 150, 20);\r\n\t\tthis.load.spritesheet('timer_pumpkin', 'assets/img/timer_pumpkin.png', 150, 20);\r\n\t\tthis.load.image('alt_icon', 'assets/img/heart.png');\r\n\t\tthis.load.image('next_fish_icon', 'assets/img/fish_icon_2.png');\r\n\t\tthis.load.image('meme_icon', 'assets/img/smiley_face.png');\r\n\t\tthis.load.spritesheet('level_up_progress', 'assets/img/level_up.png', 150, 20);\r\n\t\tthis.load.image('level_up_icon', 'assets/img/level_icon.png');\r\n\t\tthis.load.image('level_up_2', 'assets/img/level_up_2.png');\r\n\t\tthis.load.image('streak_green', 'assets/img/streak_green.png');\r\n\t\tthis.load.image('streak_red', 'assets/img/streak_red_2.png');\r\n\t\tthis.load.image('streak_grey', 'assets/img/streak_grey.png');\r\n\t\tthis.load.image('star_point', 'assets/img/star.png');\r\n\t\tthis.load.atlasJSONArray('info_sprite', 'assets/game/sprite/info_sprite.png', 'assets/game/sprite/info_sprite.json');\r\n\t\t\r\n\r\n\t\tthis.load.image('diamond', 'assets/img/diamond.png');\r\n\r\n\r\n\t\t//----\r\n\t\tvar next_fish = window.localStorage['next_fish'] || 'assets/img/aquarium_grey/clownfish.png';\r\n\t\tthis.load.image('clownfish_grey', next_fish);\r\n\r\n\r\n\t\tvar progressDisplay = 0;\r\n\t\tvar timerEvt = this.time.events.loop(100, function (){\r\n if(this.load.progress < 100){\r\n \tprogressDisplay++;\r\n console.log('loading... '+(this.load.progress)+'%' + \"; \" + (100*progressDisplay));\r\n }else{\r\n //loadingText.text = 'Ready, Go!';\r\n console.log('Ready, Go!');\r\n this.time.events.remove(timerEvt);\r\n }\r\n\r\n\t\t}, this);\r\n\r\n\t\t\r\n\r\n\t\t//this.game.load.image('tundra1','assets/pics/bg-tundra.png');\r\n\t\tthis.game.load.image('tundra1','assets/pics/bg-top-tundra.png');\r\n\t\tthis.load.image('titlescreen', 'assets/pics/bg-bottom-tundra.png'); \r\n \r\n\t\tthis.game.load.atlasJSONArray('penguin', 'assets/game/sprite/penguin_sprite.png', 'assets/game/sprite/penguin_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('sea_lion_silver', 'assets/game/sprite/sea_lion_silver_sprite.png', 'assets/game/sprite/sea_lion_silver_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('sea_lion_brown', 'assets/game/sprite/sea_lion_brown_sprite.png', 'assets/game/sprite/sea_lion_brown_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('sea_lion_pink', 'assets/game/sprite/PinkSeal.png', 'assets/game/sprite/PinkSeal.json');\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('wolf_walk', 'assets/game/sprite/wolf_walk_sprite.png', 'assets/game/sprite/wolf_walk_sprite.json');\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('bird_fly', 'assets/game/sprite/bird_tundra_sprite.png', 'assets/game/sprite/bird_tundra_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('blue_jay', 'assets/game/sprite/BlueJay.png', 'assets/game/sprite/BlueJay.json');\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('hare', 'assets/game/sprite/hare_tundra_sprite.png', 'assets/game/sprite/hare_tundra_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('pingu', 'assets/game/sprite/pingu_tundra_sprite.png', 'assets/game/sprite/pingu_tundra_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('coyote', 'assets/game/sprite/coyote_tundra_sprite.png', 'assets/game/sprite/coyote_tundra_sprite.json');\r\n\t\t\r\n\t\t\r\n \r\n //\r\n this.game.load.atlasJSONArray('grey_husky', 'assets/game/sprite/husky_grey_tundra_sprite.png', 'assets/game/sprite/husky_grey_tundra_sprite.json');\r\n this.game.load.atlasJSONArray('white_husky', 'assets/game/sprite/husky_white_tundra_sprite.png', 'assets/game/sprite/husky_white_tundra_sprite.json');\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('yeti_walk', 'assets/game/sprite/yeti_walk_sprite.png', 'assets/game/sprite/yeti_walk_sprite.json');\r\n\t\tthis.game.load.atlasJSONArray('yeti_laugh', 'assets/game/sprite/yeti_laugh_sprite.png', 'assets/game/sprite/yeti_laugh_sprite.json');\r\n\t\t\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('brown_bear', 'assets/game/sprite/brown_bear.png', 'assets/game/sprite/brown_bear.json');\r\n\t\tthis.game.load.atlasJSONArray('rabbit', 'assets/game/sprite/rabbit.png', 'assets/game/sprite/rabbit.json');\r\n\t\tthis.game.load.atlasJSONArray('reindeer', 'assets/game/sprite/reindeer.png', 'assets/game/sprite/reindeer.json');\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('duck', 'assets/game/sprite/Duck.png', 'assets/game/sprite/Duck.json');\r\n\t\tthis.game.load.atlasJSONArray('polar_bear_cub', 'assets/game/sprite/PolarBear.png', 'assets/game/sprite/PolarBear.json');\r\n\r\n\r\n\t\t//\r\n\t\tthis.game.load.atlasJSONArray('black_tundra_owl', 'assets/game/sprite/black_tundra_owl.png', 'assets/game/sprite/black_tundra_owl.json');\r\n\t\tthis.game.load.atlasJSONArray('brown_tundra_owl', 'assets/game/sprite/brown_tundra_owl.png', 'assets/game/sprite/brown_tundra_owl.json');\r\n\t\tthis.game.load.atlasJSONArray('grey_tundra_owl', 'assets/game/sprite/grey_tundra_owl.png', 'assets/game/sprite/grey_tundra_owl.json');\r\n\t\t//this.game.load.atlasJSONArray('light_brown_tundra_owl', 'assets/game/sprite/light_brown_tundra_owl.png', 'assets/game/sprite/light_brown_tundra_owl.json');\r\n\t\tthis.game.load.atlasJSONArray('white_tundra_owl', 'assets/game/sprite/white_tundra_owl.png', 'assets/game/sprite/white_tundra_owl.json');\r\n\r\n\r\n\t\t//mountain goat\r\n\t\tthis.game.load.atlasJSONArray('black_mountain_goat', 'assets/game/sprite/black_mountain_goat.png', 'assets/game/sprite/black_mountain_goat.json');\r\n\t\tthis.game.load.atlasJSONArray('brown_mountain_goat', 'assets/game/sprite/brown_mountain_goat.png', 'assets/game/sprite/brown_mountain_goat.json');\r\n\t\tthis.game.load.atlasJSONArray('white_mountain_goat', 'assets/game/sprite/white_mountain_goat.png', 'assets/game/sprite/white_mountain_goat.json');\r\n\r\n\r\n\t\t//\r\n\t\tthis.load.image('treasure_tundra', 'assets/img/tundra_treasure_chest.png');\r\n\r\n\t\t//\r\n\t\tthis.load.image('yeti_standing', 'assets/game/sprite/yeti_standing.png');\r\n\r\n\t\t//\r\n\t\t//this.load.image('snowgswitch', 'assets/img/snowglobe.png');\r\n\t\tthis.load.image('snow_start', 'assets/img/start_snow.png');\r\n\t\tthis.load.image('snow_end', 'assets/img/stop_snow.png');\r\n\r\n\t\t//\r\n\t\tthis.game.load.spritesheet('snowflakes', 'assets/game/sprite/snowflakes.png', 17, 17);\r\n\t\t//snowflakes.png\r\n\t}\r\n\r\n\tcreate(){\r\n\t\tconsole.log(\"Preloader: create called\");\r\n\t\tthis.preloadBar.cropEnabled = false;\r\n\t}\r\n\r\n\tupdate(){\r\n\t\tconsole.log(\"update: \"+ 'TundraLevel2');\r\n\t\tthis.state.start('TundraLevel2');\r\n\t}\r\n\r\n\tonLoadComplete(){\r\n\t console.log(\"Load complete\");\r\n\t this.ready = true;\r\n\t}\r\n\r\n\t\r\n}","module.exports = \"\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hcXVhcml1bS9tb2RhbC11bmxvY2tlZC1wYWdlL21vZGFsLXVubG9ja2VkLXBhZ2UuY29tcG9uZW50LnNjc3MifQ== */\"","import { Component, OnInit, Input } from '@angular/core';\nimport { NavParams, ModalController } from '@ionic/angular';\nimport * as moment from 'moment';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\n\n@Component({\n selector: 'app-modal-unlocked-page',\n templateUrl: './modal-unlocked-page.component.html',\n styleUrls: ['./modal-unlocked-page.component.scss'],\n})\nexport class ModalUnlockedPageComponent implements OnInit {\n\n // Data passed in by componentProps\n @Input() reinforcements: any;\n\n constructor(navParams: NavParams, public modalCtrl: ModalController, private userProfileService: UserProfileService) {\n // componentProps can also be accessed at construction time using NavParams\n console.log(navParams.get('firstName'));\n //this.reinforcements = [];//[{'img': \"assets/img/\" + \"nemo\" + '_tn.jpg', 'header': 'Nemo', 'text': \"Do you know the animators of \\\"Finding nemo\\\" studied dogs’ facial expressions and eyes to animate the fishes’ expressions?\"}];\n }\n\n ngOnInit() {\n\n }\n\n \n dismiss() {\n\n //pass-data: https://ionicframework.com/docs/v3/api/components/modal/ModalController/\n //let data = { 'foo': 'bar' };\n //this.modalCtrl.dismiss(data);\n this.modalCtrl.dismiss();\n\n }\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL2Zpc2hib3dsL2Zpc2hib3dsLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvYXF1YXJpdW0vcHJldmlld3MvZmlzaGJvd2wvZmlzaGJvd2wuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport { MenuController } from '@ionic/angular';\n\n@Component({\n selector: 'app-fishbowl',\n templateUrl: './fishbowl.component.html',\n styleUrls: ['./fishbowl.component.css']\n})\nexport class FishbowlComponent implements OnInit {\n\n constructor(private menuCtrl:MenuController) { }\n\n ngOnInit() {\n this.menuCtrl.close();\n }\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL3JhaW5mb3Jlc3QvcmFpbmZvcmVzdC5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0kscUJBQXFCO0FBQ3pCIiwiZmlsZSI6InNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL3JhaW5mb3Jlc3QvcmFpbmZvcmVzdC5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iXX0= */\"","import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';\nimport { MenuController, NavController } from '@ionic/angular';\nimport { DemoAquariumComponent } from '../../demo-aquarium/demo-aquarium.component';\nimport { interval } from 'rxjs';\n\n\n@Component({\n selector: 'app-rainforest',\n templateUrl: './rainforest.component.html',\n styleUrls: ['./rainforest.component.css']\n})\nexport class RainforestComponent implements OnInit, AfterViewInit {\n\n @ViewChild(DemoAquariumComponent, {static: true}) child;\n constructor(private menuCtrl:MenuController,\n public navController: NavController) { \n }\n\n ngOnInit() {\n this.menuCtrl.close();\n }\n\n goHome(){\n /*\n this.child.ionViewDidLeaveFunction();\n // Create an Observable that will publish a value on an interval\n const secondsCounter2 = interval(1000).subscribe(n =>{\n console.log(`It's been ${n} seconds since subscribing!`);\n secondsCounter2.unsubscribe();\n \n });\n */\n this.navController.navigateRoot(['/home']);\n }\n\n ionViewDidEnter() {\n console.log(\"aqarium.ts --- ionViewDidEnter\");\n //this.child.loadFunction();\n }\n\n ngAfterViewInit(){\n /*\n console.log(\"aqarium.ts --- ngAfterInit\");\n console.log(\"aqarium.ts --- \" + this.child);\n //this.child.loadFunction();\n\n // Create an Observable that will publish a value on an interval\n const secondsCounter = interval(1000).subscribe(n =>{\n console.log(`It's been ${n} seconds since subscribing!`);\n secondsCounter.unsubscribe();\n this.child.loadFunction();\n });\n */\n \n }\n\n \n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL3NlYS9zZWEuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hcXVhcml1bS9wcmV2aWV3cy9zZWEvc2VhLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */\"","import { Component, OnInit } from '@angular/core';\nimport { MenuController } from '@ionic/angular';\n\n@Component({\n selector: 'app-sea',\n templateUrl: './sea.component.html',\n styleUrls: ['./sea.component.css']\n})\nexport class SeaComponent implements OnInit {\n\n constructor(private menuCtrl:MenuController) { }\n\n ngOnInit() {\n this.menuCtrl.close();\n }\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2FxdWFyaXVtL3ByZXZpZXdzL3R1bmRyYS90dW5kcmEuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hcXVhcml1bS9wcmV2aWV3cy90dW5kcmEvdHVuZHJhLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */\"","import { Component, OnInit } from '@angular/core';\nimport { MenuController } from '@ionic/angular';\n\n@Component({\n selector: 'app-tundra',\n templateUrl: './tundra.component.html',\n styleUrls: ['./tundra.component.css']\n})\nexport class TundraComponent implements OnInit {\n\n constructor(private menuCtrl:MenuController) { }\n\n ngOnInit() {\n this.menuCtrl.close();\n }\n\n}\n","module.exports = \"\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9hd2FyZC1hbHRydWlzbS9hd2FyZC1hbHRydWlzbS5jb21wb25lbnQuc2NzcyJ9 */\"","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router, NavigationExtras } from '@angular/router';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { AwsS3Service } from 'src/app/storage/aws-s3.service';\nimport * as moment from 'moment';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-award-altruism',\n templateUrl: './award-altruism.component.html',\n styleUrls: ['./award-altruism.component.scss'],\n})\nexport class AwardAltruismComponent implements OnInit {\n\n whichImage: string;\n altruism_data: any;\n date;\n reinforcementObj = {};\n reinforcement_data = {};\n modalObjectNavigationExtras = {};\n pageTitle = \" Award_Altruism\";\n\n constructor( \n private route: ActivatedRoute, \n private userProfileService: UserProfileService,\n private awsS3Service: AwsS3Service,\n private appUsageDb: DatabaseService,\n private router: Router) { \n this.reinforcementObj['ds'] = 1;\n this.reinforcementObj['reward'] = 2;\n this.reinforcementObj['reward_type'] = 'altruistic message'; \n }\n\n ngOnInit() {\n\n this.route.queryParams.subscribe(params => {\n if (this.router.getCurrentNavigation().extras.state) {\n this.date = this.router.getCurrentNavigation().extras.state.date;\n this.reinforcementObj['prob'] = this.router.getCurrentNavigation().extras.state.prob;\n this.reinforcement_data = this.router.getCurrentNavigation().extras.state.reinforcement_data; \n this.modalObjectNavigationExtras = this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras;\n console.log(\"Inside AwardAltruism, date is: \" +this.date+\" prob is: \"+this.reinforcementObj['prob']);\n }\n }); \n }\n\n ngAfterViewInit() {\n fetch('./assets/altruism/altruism_list.json').then(async res => {\n this.altruism_data = await res.json();\n this.showaltruism();\n });\n\n }\n\n ionViewDidEnter(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.appUsageDb.saveAppUsageEnter(\"award_altruism_msg\"); \n } \n \n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n }); \n */\n this.appUsageDb.saveAppUsageExit(\"award_altruism_msg\"); \n }\n\n showaltruism(){\n console.log('Altruism data: ' + JSON.stringify(this.altruism_data));\n this.altruism_data = this.shuffle(this.altruism_data);\n //console.log('Altruism images suffled: ' + JSON.stringify(this.altruism_data));\n var picked_altruism_image = this.pick_altrusim(this.altruism_data);\n //console.log('picked_altruism_image: ' + JSON.stringify(picked_altruism_image));\n\n var already_shown = window.localStorage[\"already_shown_alt_msg4\"];\n if(already_shown == undefined)\n already_shown = {\n \"last_updated\": Date.now(),\n \"last_updated_readable_ts\": moment().format(\"MMMM Do YYYY, h:mm:ss a Z\"),\n \"unlocked_alt_msgs\":[{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": moment().format('MM/DD/YYYY')}]\n };\n else\n already_shown = JSON.parse(window.localStorage[\"already_shown_alt_msg4\"]);\n\n console.log(\"already_shown: \" + already_shown);\n already_shown[\"last_updated\"] = Date.now();\n already_shown[\"last_updated_readable_ts\"] = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n already_shown[\"unlocked_alt_msgs\"].push({\"filename\": \"assets/altruism/\"+picked_altruism_image[0][\"filename\"], \"unlock_date\": moment().format('MM/DD/YYYY')});\n window.localStorage[\"already_shown_alt_msg4\"] = JSON.stringify(already_shown);\n\n\n\n this.whichImage = \"./assets/altruism/\"+picked_altruism_image[0][\"filename\"];\n this.reinforcementObj['reward_img_link'] = \"/altruism/\"+picked_altruism_image[0][\"filename\"];\n this.reinforcement_data['reward_img_link'] = \"/altruism/\"+picked_altruism_image[0][\"filename\"];\n setTimeout(e => this.drawImageOnCanvas(this.whichImage), 200);\n \n }\n \n ratingChanged(rating){\n if(rating==0) {\n console.log(\"thumbs down\");\n this.reinforcementObj['Like'] = \"No\";\n this.reinforcement_data['Like'] = \"No\";\n window.localStorage.setItem(\"Like\", \"No\");\n this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); \n } else {\n console.log(\"thumbs up\");\n this.reinforcementObj['Like'] = \"Yes\";\n this.reinforcement_data['Like'] = \"Yes\";\n window.localStorage.setItem(\"Like\", \"Yes\");\n this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); \n }\n this.userProfileService.addReinforcementData(this.date, this.reinforcementObj);\n \n let navigationExtras: NavigationExtras = {\n state: {\n modalObjectNavigationExtras: this.modalObjectNavigationExtras\n }\n };\n this.router.navigate(['home'], navigationExtras);\n }\n\n\n /**\n * Shuffles array in place if it is not already shuffled\n * @param {Array} a items An array containing the items.\n */\n shuffle(a) {\n\n if(window.localStorage['altruism_shuffle6'] == undefined){\n //\n var j: number, x: number, i: number;\n for (i = a.length - 1; i > 0; i--) {\n j = Math.floor(Math.random() * (i + 1));\n x = a[i];\n a[i] = a[j];\n a[j] = x;\n }\n //\n window.localStorage['altruism_shuffle6'] = JSON.stringify(a);\n return a;\n }else{\n a = JSON.parse(window.localStorage['altruism_shuffle6']);\n return a;\n }\n\n }\n\n /**\n * Shuffles array in place if it is not already shuffled\n * @param {Array} a items An array containing the items.\n */\n pick_altrusim(a) {\n var picked_altruism = a.splice(0,1);\n a.push(picked_altruism[0]);\n window.localStorage['altruism_shuffle6'] = JSON.stringify(a);\n return picked_altruism;\n }\n\n drawImageOnCanvas(imageF_file_path) {\n\n /*\n //\n var imageObj = new Image();\n imageObj.src = imageF_file_path;\n \n //\n var drawingCanvas = document.getElementById(\"drawing_canvas\");\n drawingCanvas.style.width = '100%';\n drawingCanvas.width = drawingCanvas.offsetWidth;\n \n var ctx = drawingCanvas.getContext('2d');\n \n //\n imageObj.onload = function () {\n console.log(\"print: \" + (imageObj.height/imageObj.width));\n drawingCanvas.height = Math.abs(drawingCanvas.width*(imageObj.height/imageObj.width));\n \n ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle\n 0, 0, drawingCanvas.width, drawingCanvas.height); // destination rectangle\n \n //\n \n }\n */\n //this.HeartsBackground.initialize(drawingCanvas);\n this.HeartsBackground.initialize();\n }\n\n\n\n HeartsBackground = {\n heartHeight: 60,\n heartWidth: 64,\n hearts: [],\n imageNames: ['valentinesheart.png','blueflower.png','yellowrose.png','redflower.png','yellowflower.png'],\n heartImage: './assets/img/',\n //heartImage: './assets/img/petal.png',\n maxHearts: 60,\n minScale: 0.4,\n draw: function() {\n //this.setCanvasSize();\n this.ctx.clearRect(0, 0, this.w, this.h);\n //console.log(\"Hearts draw function called\");\n var ctx = this.ctx;\n for (var i = 0; i < this.hearts.length; i++) {\n var heart = this.hearts[i];\n heart.image = new Image();\n heart.image.style.height = heart.height;\n heart.image.src = this.heartImage;\n ctx.drawImage(heart.image, heart.x, heart.y, heart.width, heart.height);\n }\n this.move();\n },\n move: function() {\n //console.log(\"Move function called\");\n for(var b = 0; b < this.hearts.length; b++) {\n var heart = this.hearts[b];\n heart.y += heart.ys;\n if(heart.y > this.h) {\n //heart.x = Math.random() * this.w;\n //heart.y = -1 * this.heartHeight;\n }\n }\n },\n angularDraw: function() {\n //this.setCanvasSize();\n this.ctx.clearRect(0, 0, this.w, this.h);\n //console.log(\"Hearts draw function called\");\n var ctx = this.ctx;\n for (var i = 0; i < this.hearts.length; i++) {\n \n var heart = this.hearts[i];\n /*\n heart.image = new Image();\n heart.image.style.height = heart.height;\n heart.image.src = this.heartImage;\n */\n ctx.drawImage(heart.image, heart.angle_x, heart.angle_y, heart.width, heart.height);\n }\n this.angularMove();\n },\n angularMove: function() {\n //console.log(\"Move function called\");\n for(var b = 0; b < this.hearts.length; b++) {\n var heart = this.hearts[b];\n //heart.y += heart.ys;\n //console.log(\"\" + heart.angle_x + \",\" + heart.angle_y);\n //console.log(heart.angle);\n //console.log(\"\" + heart.angle_x + \",\" + heart.angle_y + \", \" + heart.angle_deltax + \", \" + heart.angle_deltay);\n heart.angle_x += heart.angle_deltax;\n heart.angle_y += heart.angle_deltay;\n //console.log(\"\" + heart.angle_x + \",\" + heart.angle_y);\n if(heart.y > this.h) {\n //heart.x = Math.random() * this.w;\n //heart.y = -1 * this.heartHeight;\n }\n }\n },\n setCanvasSize: function() {\n this.canvas.width = window.innerWidth;\n this.canvas.height = window.innerHeight - 170;\n console.log(\"Set canvas size function called\");\n this.w = this.canvas.width;\n this.h = this.canvas.height;\n },\n initialize: function() {\n console.log(\"Initialize hearts\");\n this.canvas = document.getElementById(\"hearts_canvas\"); //$('#canvas')[0]; hearts_canvas\n if(!this.canvas.getContext)\n return;\n \n this.setCanvasSize();\n this.ctx = this.canvas.getContext('2d'); \n \n this.canvas.addEventListener(\"touchstart\", function(event) {event.preventDefault()});\n this.canvas.addEventListener(\"touchmove\", function(event) {event.preventDefault()});\n this.canvas.addEventListener(\"touchend\", function(event) {event.preventDefault()});\n this.canvas.addEventListener(\"touchcancel\", function(event) {event.preventDefault()});\n // Attach an event handler to the document\n //this.canvas.addEventListener(\"mousemove\", function(event) {event.preventDefault()});\n \n for(var a = 0; a < this.maxHearts; a++) {\n var scale = (Math.random() * (1 - this.minScale)) + this.minScale;\n this.hearts.push({\n x: Math.random() * this.w,\n y: Math.random() * this.h,\n ys: Math.random() + 8,\n height: scale * this.heartHeight,\n width: scale * this.heartWidth,\n angle_x: this.w/2,\n angle_y: this.h/2,\n angle_deltax: this.getRandomArbitraryMoreThanX(-10,10,6),\n angle_deltay: this.getRandomArbitraryMoreThanX(-10,10,6),\n opacity: scale\n });\n }\n\n \n \n //setInterval($.proxy(this.draw, this), 30);\n //setTimeout(e => this.draw, 30);\n //this.draw();\n var intervalVar;\n if(Math.random()>0.5){\n //intervalVar = setInterval(e => this.angularDraw(), 30);\n this.heartImage = this.heartImage + 'valentinesheart.png';\n }else{\n //intervalVar = setInterval(e => this.draw(), 30);\n //choose an heart image everytime\n const randomElement = this.imageNames[Math.floor(Math.random() * this.imageNames.length)];\n this.heartImage = this.heartImage + randomElement;\n }\n\n var image = new Image();\n image.src = this.heartImage;\n var hearts = this.hearts;\n var self_this = this;\n image.onload = function () {\n for(var a = 0; a < hearts.length; a++) {\n hearts[a].image = image;\n hearts[a].image.style.height = hearts[a].height;\n }\n intervalVar = setInterval(e => self_this.angularDraw(), 15);\n }\n\n setTimeout(e => this.stopInterval(intervalVar), 800);\n \n },\n stopInterval(intervalVar) {\n this.ctx.clearRect(0, 0, this.w, this.h);\n clearInterval(intervalVar);\n },\n getRandomArbitrary(min, max) {\n return Math.random() * (max - min) + min;\n },\n getRandomArbitraryMoreThanX(min, max, X) {\n var rand_var = this.getRandomArbitrary(min, max);\n if(Math.abs(rand_var) < X){\n if(rand_var < X)\n return rand_var-X;\n if(rand_var > X)\n return rand_var+X;\n }else{\n return rand_var;\n }\n }\n };\n\n}\n","module.exports = \"img {\\n border: 2px solid black;\\n top: 85px;\\n position: absolute;\\n width: 350px;\\n margin: 5px;\\n}\\n\\n#container {\\n position: relative;\\n}\\n\\n#link {\\n position: absolute;\\n top: 10px;\\n left: 10px;\\n}\\n\\n#drawing_canvas {\\n position: absolute;\\n margin: auto;\\n width: 512px;\\n height: 350px;\\n top: 0;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaW5jZW50aXZlL2F3YXJkLW1lbWVzL2F3YXJkLW1lbWVzLmNvbXBvbmVudC5zY3NzIiwic3JjL2F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yZGVyOiAycHggc29saWQgYmxhY2s7XG4gIHRvcDogODVweDtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB3aWR0aDogMzUwcHg7XG4gIG1hcmdpbjogNXB4O1xufVxuXG4jY29udGFpbmVyIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xufVxuXG4jbGluayB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAxMHB4O1xuICBsZWZ0OiAxMHB4O1xufVxuXG4jZHJhd2luZ19jYW52YXMge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIG1hcmdpbjogYXV0bztcbiAgd2lkdGg6IDUxMnB4O1xuICBoZWlnaHQ6IDM1MHB4O1xuICB0b3A6IDA7XG4gIGJvdHRvbTogMDtcbiAgbGVmdDogMDtcbiAgcmlnaHQ6IDA7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router, NavigationExtras } from '@angular/router';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { AwsS3Service } from 'src/app/storage/aws-s3.service';\nimport * as moment from 'moment';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-award-memes',\n templateUrl: './award-memes.component.html',\n styleUrls: ['./award-memes.component.scss'],\n})\n\n//declare let confetti: any;\n\nexport class AwardMemesComponent implements OnInit {\n\n whichImage: string;\n meme_data: any;\n date;\n reinforcementObj = {};\n reinforcement_data = {};\n pageTitle = \" Award_Meme\";\n\n viewWidth = 512;\n viewHeight = 350;\n ctx;\n timeStep = (1/60);\n modalObjectNavigationExtras = {};\n\n\n //src=\"{{whichImage}}\"\n constructor(\n private route: ActivatedRoute, \n private userProfileService: UserProfileService, \n private awsS3Service: AwsS3Service,\n private appUsageDb: DatabaseService,\n private router: Router) {\n this.reinforcementObj['ds'] = 1;\n this.reinforcementObj['reward'] = 1;\n this.reinforcementObj['reward_type'] = 'meme';\n\n \n }\n\n ngOnInit() {\n \n this.route.queryParams.subscribe(params => {\n if (this.router.getCurrentNavigation().extras.state) {\n this.date = this.router.getCurrentNavigation().extras.state.date;\n this.reinforcementObj['prob'] = this.router.getCurrentNavigation().extras.state.prob;\n this.reinforcement_data = this.router.getCurrentNavigation().extras.state.reinforcement_data;\n this.modalObjectNavigationExtras = this.router.getCurrentNavigation().extras.state.modalObjectNavigationExtras;\n console.log(\"Inside AwardMemes, date is: \" +this.date+\" prob is: \"+this.reinforcementObj['prob']);\n }\n }); \n \n }\n \n\n ngAfterViewInit() {\n\n //var randomInt = Math.floor(Math.random() * 5) + 1;\n //this.whichImage = \"./assets/memes/\"+randomInt+\".jpg\";\n //console.log('Reading local json files: ' + this.fileLink);\n fetch('./assets/memes/memefile.json').then(async res => {\n this.meme_data = await res.json();\n this.showmemes();\n }); \n }\n\n ionViewDidEnter(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.appUsageDb.saveAppUsageEnter(\"award_meme\"); \n } \n\n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.appUsageDb.saveAppUsageExit(\"award_meme\"); \n }\n\n\n showmemes(){\n //window.localStorage['meme_shuffle5'] = \"[]\";\n //var randomInt = Math.floor(Math.random() * this.meme_data.length);\n //this.whichImage = \"./assets/memes/\"+this.meme_data[randomInt][\"filename\"];\n //console.log('Meme data: ' + JSON.stringify(this.meme_data));\n this.meme_data = this.shuffle(this.meme_data);\n //console.log('Meme suffled: ' + JSON.stringify(this.meme_data));\n var picked_meme = this.pick_meme(this.meme_data);\n \n var already_shown = window.localStorage[\"already_shown_memes4\"];\n if(already_shown == undefined)\n already_shown = {\n \"last_updated\": Date.now(),\n \"last_updated_readable_ts\": moment().format(\"MMMM Do YYYY, h:mm:ss a Z\"),\n \"unlocked_memes\":[{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": moment().format('MM/DD/YYYY')}]\n };\n else\n already_shown = JSON.parse(window.localStorage[\"already_shown_memes4\"]);\n\n console.log(\"already_shown: \" + already_shown);\n already_shown[\"last_updated\"] = Date.now();\n already_shown[\"last_updated_readable_ts\"] = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n already_shown[\"unlocked_memes\"].push({\"filename\": \"assets/memes/\"+picked_meme[0][\"filename\"], \"unlock_date\": moment().format('MM/DD/YYYY')});\n window.localStorage[\"already_shown_memes4\"] = JSON.stringify(already_shown);\n\n\n this.whichImage = \"./assets/memes/\"+picked_meme[0][\"filename\"];\n this.reinforcementObj['reward_img_link'] = \"/memes/\"+picked_meme[0][\"filename\"];\n this.reinforcement_data['reward_img_link'] = \"/memes/\"+picked_meme[0][\"filename\"];\n setTimeout(e => this.drawImageOnCanvas(this.whichImage), 200);\n }\n \n ratingChanged(rating){\n if(rating==0) {\n //console.log(\"thumbs down\");\n this.reinforcementObj['Like'] = \"No\";\n this.reinforcement_data['Like'] = \"No\";\n window.localStorage.setItem(\"Like\", \"No\");\n this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); \n } else {\n //console.log(\"thumbs up\");\n this.reinforcementObj['Like'] = \"Yes\";\n this.reinforcement_data['Like'] = \"Yes\";\n window.localStorage.setItem(\"Like\", \"Yes\");\n this.awsS3Service.upload('reinforcement_data', this.reinforcement_data); \n }\n \n this.userProfileService.addReinforcementData(this.date, this.reinforcementObj);\n \n let navigationExtras: NavigationExtras = {\n state: {\n modalObjectNavigationExtras: this.modalObjectNavigationExtras\n }\n };\n this.router.navigate(['home'], navigationExtras);\n }\n\n /**\n * Shuffles array in place if it is not already shuffled\n * @param {Array} a items An array containing the items.\n */\n shuffle(a) {\n\n //\n //console.log(window.localStorage['meme_shuffle5']);\n if(window.localStorage['meme_shuffle6'] == undefined){\n //\n var j: number, x: number, i: number;\n for (i = a.length - 1; i > 0; i--) {\n j = Math.floor(Math.random() * (i + 1));\n x = a[i];\n a[i] = a[j];\n a[j] = x;\n //console.log(JSON.stringify(a[i][0]) + \",\" + JSON.stringify(a[j][0]));\n //console.log('Meme data: ' + i + \", \" + JSON.stringify(a));\n }\n //\n window.localStorage['meme_shuffle6'] = JSON.stringify(a);\n return a;\n }else{\n a = JSON.parse(window.localStorage['meme_shuffle6']);\n return a;\n }\n\n }\n\n /**\n * Shuffles array in place if it is not already shuffled\n * @param {Array} a items An array containing the items.\n */\n pick_meme(a) {\n var picked_meme = a.splice(0,1);\n a.push(picked_meme[0]);\n window.localStorage['meme_shuffle6'] = JSON.stringify(a);\n return picked_meme;\n }\n\n\n //\n initDrawingCanvas() {\n /*\n this.drawingCanvas.style.width = '100%';\n this.drawingCanvas.width = this.drawingCanvas.offsetWidth;\n this.drawingCanvas.style.height = '90%';\n this.ctx = this.drawingCanvas.getContext('2d');\n */\n\n //createLoader();\n //createExploader();\n //createParticles();\n }\n\n \n\n drawImageOnCanvas(imageF_file_path) {\n\n /*\n //\n var imageObj = new Image();\n imageObj.src = imageF_file_path;\n \n //\n var drawingCanvas = document.getElementById(\"drawing_canvas\");\n drawingCanvas.style.width = '100%';\n drawingCanvas.width = drawingCanvas.offsetWidth;\n \n var ctx = drawingCanvas.getContext('2d');\n \n //\n imageObj.onload = function () {\n console.log(\"print: \" + (imageObj.height/imageObj.width));\n drawingCanvas.height = Math.abs(drawingCanvas.width*(imageObj.height/imageObj.width));\n\n ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle\n 0, 0, drawingCanvas.width, drawingCanvas.height); // destination rectangle\n\n //\n \n }\n */\n //this.HeartsBackground.initialize(drawingCanvas);\n this.drawConfetti();\n }\n\n\n //draws confetti \n drawConfetti(){\n var canvas = document.getElementById(\"hearts_canvas\"); //$('#canvas')[0]; hearts_canvas\n //https://www.kirilv.com/canvas-confetti/\n // you should only initialize a canvas once, so save this function\n // we'll save it to the canvas itself for the purpose of this demo\n\n //@ts-ignore\n canvas.confetti = canvas.confetti || confetti.create(canvas, { resize: true });\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight - 170;\n\n /*\n canvas.confetti({\n angle: this.randomInRange(55, 125),\n spread: this.randomInRange(50, 70),\n particleCount: this.randomInRange(50, 100),\n origin: { y: 0.6, x: 0.5 }\n });\n */\n //\n \n if(Math.random()>0.5)\n this.drawRealisticConfetti(canvas);\n else\n this.drawConfettiFireworks(canvas);\n \n }\n\n drawConfettiFireworks(canvas){\n var duration = 1 * 1200;\n var animationEnd = Date.now() + duration;\n var defaults = { startVelocity: 30, spread: 100, ticks: 60, zIndex: 0 };\n \n function randomInRange(min, max) {\n return Math.random() * (max - min) + min;\n }\n \n var interval = setInterval(function() {\n var timeLeft = animationEnd - Date.now();\n \n if (timeLeft <= 0) {\n return clearInterval(interval);\n }\n \n var particleCount = 50 * (timeLeft / duration);\n // since particles fall down, start a bit higher than random\n canvas.confetti(Object.assign({}, defaults, { particleCount, origin: { x: randomInRange(0.2, 0.4), y: Math.random() - 0.0}}));\n canvas.confetti(Object.assign({}, defaults, { particleCount, origin: { x: randomInRange(0.6, 0.8), y: Math.random() - 0.0}}));\n }, 250);\n }\n\n drawConfettiVanillaDirection(canvas){\n canvas.confetti({\n particleCount: 100,\n spread: 70,\n origin: { y: 0.5, x: 0.5 }\n });\n }\n\n drawConfettiRandomDirection(canvas){\n canvas.confetti({\n angle: this.randomInRange(55, 125),\n spread: this.randomInRange(50, 70),\n particleCount: this.randomInRange(50, 100),\n origin: { y: 0.5, x: 0.5 }\n });\n }\n\n drawRealisticConfetti(canvas){\n this.confettiFire(0.25, {\n spread: 26,\n startVelocity: 100,\n },canvas);\n this.confettiFire(0.2, {\n spread: 60,\n },canvas);\n this.confettiFire(0.35, {\n spread: 100,\n decay: 0.99,\n },canvas);\n this.confettiFire(0.1, {\n spread: 120,\n startVelocity: 100,\n decay: 0.99,\n },canvas);\n this.confettiFire(0.1, {\n spread: 120,\n startVelocity: 100,\n },canvas);\n\n //\n setTimeout(() => {\n canvas.confetti.reset();\n }, 1200);\n \n }\n\n confettiFire(particleRatio, opts, canvas) {\n var count = 200;\n var defaults = {\n origin: { y: 0.8 }\n };\n canvas.confetti(Object.assign({}, defaults, opts, {\n particleCount: Math.floor(count * particleRatio)\n }));\n }\n randomInRange(min, max) {\n return Math.random() * (max - min) + min;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport * as moment from 'moment';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AwardDollarService {\n \n usersCurrentDollars;\n users3DayStreakHistory;\n \n constructor(private userProfileService: UserProfileService) { \n }\n \n \n getCurrentlyEarnedDollars(){\n /*\n * \n * load current dollar amount user earned from local storage, \n * and if \"undefined\" (i.e.,user likely didn't earn anything) then assign value to zero.\n * \n * This function is called from dynamic-survey to update the current dollar amount.\n * \n */\n \n \n if(window.localStorage['AwardDollar'] == undefined)\n this.usersCurrentDollars = 0;\n else\n this.usersCurrentDollars = parseInt(window.localStorage['AwardDollar']);\n \n \n return this.usersCurrentDollars;\n }\n \n giveDollars(){\n \n /*\n * \n * Called after survey is completed.\n * Gives participants money, based on three cretia.\n * \n * Returns the total amount user has currently earned in total amount.\n * \n */\n \n \n var dailySurveyHistory = this.userProfileService.userProfile.survey_data.daily_survey;\n \n /*\n *\n * Scenario 1:\n * \n * If user completed survey on the first day of the study then reward 2 dollars.\n * \n * Since this case can't include a 3-day streak or a pause, so return this current amount\n * \n */\n\n //get the first date, by iterating through all dates and find the smallest one.\n var firstDateSurveyIsCompleted = moment().format('YYYYMMDD');\n var timestampeForFirstDataSurveyIsCompleted = moment(firstDateSurveyIsCompleted, \"YYYYMMDD\");\n var timestampDateForASurveyCompleted;\n for (var dateForASurveyCompleted in dailySurveyHistory) {\n timestampDateForASurveyCompleted = moment(dateForASurveyCompleted,\"YYYYMMDD\");\n if (timestampDateForASurveyCompleted < timestampeForFirstDataSurveyIsCompleted) {\n firstDateSurveyIsCompleted = dateForASurveyCompleted;\n timestampeForFirstDataSurveyIsCompleted = moment(firstDateSurveyIsCompleted,\"YYYYMMDD\");\n }\n }\n \n // If today is the first day then award 2 dollars for survey completion; \n // else load the last day, current amout user earned\n var todaysDate = moment().format('YYYYMMDD');\n if(todaysDate == firstDateSurveyIsCompleted){\n this.usersCurrentDollars = 2;\n //save the dollar ammount in local storage\n window.localStorage.setItem(\"AwardDollar\", \"\"+this.usersCurrentDollars); \n return this.usersCurrentDollars;\n }else\n this.usersCurrentDollars = parseInt(window.localStorage['AwardDollar']);\n \n \n\n\n /*\n *\n * Scenario 2:\n * \n * If survey is paused, and user comes back after >= 14 days, then give then extra 2 dollars\n * after they complete the survey.\n * \n */\n\n\n //\n // Get the dates when survey is turned on. This only contains days\n // that the survey on button was physically clicked.\n // \n var onDatesSurveyIsTurnedOn = this.userProfileService.userProfileFixed.onDates;\n //\n // set the last date to today, if 'onDatesSurveyPauseStarted' are not empty, will set it \n // to be the last date in 'onDatesSurveyPauseStarted'.\n // \n var maxDateInOnDatesSurveyIsTurnedOn = moment().format('YYYY-MM-DD');;\n \n var timestampForLastDate = moment(\"1970-01-01\", \"YYYY-MM-DD\");\n var timestampDateFor_date;\n for (var _date in onDatesSurveyIsTurnedOn) {\n timestampDateFor_date = moment(_date,\"YYYY-MM-DD\");\n if (timestampDateFor_date > timestampForLastDate) {\n maxDateInOnDatesSurveyIsTurnedOn = _date;\n timestampForLastDate = moment(maxDateInOnDatesSurveyIsTurnedOn, \"YYYY-MM-DD\");\n }\n }\n \n var day14BeforeToday = moment().subtract(14,\"days\").format(\"YYYY-MM-DD\");\n var timestampDay14BeforeToday = moment(day14BeforeToday,\"YYYY-MM-DD\");\n var timestampMaxDateInOnDatesSurveyIsTurnedOn = moment(maxDateInOnDatesSurveyIsTurnedOn,\"YYYY-MM-DD\");\n\n // if 14-day before today is more than (i.e., after) timestampMaxDateInOnDatesSurveyIsTurnedOn\n // then user has come back after 14 days.\n if(timestampDay14BeforeToday.isAfter(timestampMaxDateInOnDatesSurveyIsTurnedOn)){\n this.usersCurrentDollars = this.usersCurrentDollars + 2; \n //save the dollar ammount in local storage\n window.localStorage.setItem(\"AwardDollar\", \"\"+this.usersCurrentDollars); \n return this.usersCurrentDollars;\n }\n\n\n\n /*\n *\n * Scenario 3:\n * \n * Give money for a three-day streak of survey completion, that does not include\n * scenario 1 and 2. (Ideally scenario 1,2,3 are mutually exclusive).\n * \n */\n\n \n \n this.users3DayStreakHistory = window.localStorage[\"AwardDollarDates\"];\n\n\n if((this.users3DayStreakHistory == undefined) || (JSON.parse(this.users3DayStreakHistory) == null)){\n /*\n * Means, no history exist for 3-day, so start a streak with the current date.\n */\n this.users3DayStreakHistory = {};\n this.users3DayStreakHistory['dates'] = [moment().format(\"DD-MM-YYYY\")]; \n window.localStorage.setItem(\"AwardDollarDates\", JSON.stringify(this.users3DayStreakHistory));\n\n } else { \n this.users3DayStreakHistory = JSON.parse(window.localStorage[\"AwardDollarDates\"]);\n if(this.users3DayStreakHistory['dates'].length < 2) {\n \n /*\n * see if previous date exist in the current 'users3DayStreakHistory'\n * If not then clean 'users3DayStreakHistory' and start a new streak.\n */\n var previousDate = moment().subtract(1, \"days\").format(\"DD-MM-YYYY\");\n var dates = this.users3DayStreakHistory[\"dates\"];\n var dateIndex = dates.indexOf(previousDate);\n \n \n if( dateIndex > -1) {\n //previous date exist, we will pushing the current date and extend the streak.\n this.users3DayStreakHistory['dates'].push(moment().format(\"DD-MM-YYYY\"));\n } else {\n // if the date saved is not the previous day of today, remove it \n // save current date to users3DayStreakHistory. This means a new streak has started.\n this.users3DayStreakHistory['dates'] = [moment().format(\"DD-MM-YYYY\")]; \n }\n window.localStorage.setItem(\"AwardDollarDates\", JSON.stringify(this.users3DayStreakHistory));\n\n // no money here now since the streak length it most 2 here. \n\n } else {\n \n /*\n * see if previous date exist in the current 'users3DayStreakHistory'\n * If not then clean 'users3DayStreakHistory' and start a new streak.\n */\n var previousDate = moment().subtract(1, \"days\").format(\"DD-MM-YYYY\");\n var dates = this.users3DayStreakHistory[\"dates\"];\n var dateIndex = dates.indexOf(previousDate);\n \n if( dateIndex > -1 ) {\n //means a streak has been completed, so award one dollar, remove all dates\n this.usersCurrentDollars = this.usersCurrentDollars + 1;\n //empty users3DayStreakHistory by making it null, and we will start a new streak.\n window.localStorage.removeItem('AwardDollarDates'); \n } else {\n //the previous day is not in the array, means that we must have skipped the previous day,\n //Save current date to AwardDollarDates to start a new streak.\n this.users3DayStreakHistory['dates'] = [moment().format(\"DD-MM-YYYY\")]; \n window.localStorage.setItem(\"AwardDollarDates\", JSON.stringify(this.users3DayStreakHistory));\n }\n \n }\n \n } \n \n //save the dollar ammount in local storage\n window.localStorage.setItem(\"AwardDollar\", \"\"+this.usersCurrentDollars); \n \n return this.usersCurrentDollars;\n }\n}\n","import {createAction, props} from '@ngrx/store';\nimport { UnlockedIncentives } from './model/unlocked-incentives';\n\n\nexport const surveyCompletedRegisterUnlocked = createAction(\n \"[Survey Page] Survey Completed. Register Unlocked.\",\n props<{payload: Object}>()\n);\n\nexport const unlockedScreenShownAlready = createAction(\n \"[Main Page] Survey already shown.\",\n props<{isUnlockedScreenShown: boolean}>()\n);","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IonicModule } from '@ionic/angular';\n//import { AwardComponent } from './award/award.component';\nimport { AwardMemesComponent } from './award-memes/award-memes.component';\n//import { VisualizationComponent } from './visualization/visualization.component';\n//import { DemoAquariumComponent } from './aquarium/demo-aquarium/demo-aquarium.component';\n//import { SurveyModule } from '../survey/survey.module';\nimport { Routes, RouterModule } from '@angular/router';\nimport { DemoAquariumComponent } from './aquarium/demo-aquarium/demo-aquarium.component';\nimport { TreasurechestComponent } from './treasurechest/treasurechest.component';\nimport { AwardAltruismComponent } from './award-altruism/award-altruism.component';\nimport { ModalUnlockedPageComponent } from './aquarium/modal-unlocked-page/modal-unlocked-page.component';\nimport { InfoPageComponent } from './info-page/info-page.component';\nimport { StoreModule } from '@ngrx/store';\nimport {incentiveReducer} from './reducers';\nimport { UnlockedMemesComponent } from './unlocked-memes/unlocked-memes.component';\nimport { UnlockedAltuisticMessagesComponent } from './unlocked-altuistic-messages/unlocked-altuistic-messages.component';\nimport { FishbowlComponent } from './aquarium/previews/fishbowl/fishbowl.component';\nimport { SeaComponent } from './aquarium/previews/sea/sea.component';\nimport { TundraComponent } from './aquarium/previews/tundra/tundra.component';\nimport { UnlockedInspirationalQuotesComponent } from './unlocked-inspirational-quotes/unlocked-inspirational-quotes.component';\nimport { VideoInfoPageComponent } from './video-info-page/video-info-page.component';\nimport { SamplePythonViewComponent } from './life-insights/sample-python-view/sample-python-view.component';\n\nconst routes: Routes = [\n// { path: 'award', component: AwardComponent },\n { path: 'award-memes', component: AwardMemesComponent },\n// { path: 'visualization', component: VisualizationComponent }\n];\n\n@NgModule({\n declarations: [AwardMemesComponent, AwardAltruismComponent, TreasurechestComponent, \n ModalUnlockedPageComponent,InfoPageComponent, UnlockedMemesComponent, UnlockedAltuisticMessagesComponent, \n FishbowlComponent, SeaComponent, TundraComponent, UnlockedInspirationalQuotesComponent, VideoInfoPageComponent,\n SamplePythonViewComponent\n ],\n imports: [\n CommonModule,\n IonicModule.forRoot(),\n RouterModule.forChild(routes),\n StoreModule.forFeature('incentive', incentiveReducer)\n ],\n exports:[\n //AwardComponent, \n AwardMemesComponent, \n AwardAltruismComponent\n //VisualizationComponent\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n entryComponents: [ModalUnlockedPageComponent]\n})\nexport class IncentiveModule { }\n","import {createFeatureSelector, createSelector} from '@ngrx/store';\nimport { UnlockecIncentiveState } from './reducers';\nimport * as moment from 'moment';\n\n\n\nexport const selectAuthState =\n createFeatureSelector(\"incentive\");\n\n\nexport const isIncentivesUnlockedForTheDay = createSelector(\n selectAuthState,\n incentive => {\n var currentDate = moment().format('YYYYMMDD');\n if(incentive[\"timeline\"] == undefined)\n return undefined;\n else if(currentDate in incentive[\"timeline\"])\n return incentive[\"timeline\"][currentDate];\n else\n return undefined;\n }\n);\n","module.exports = \".new-background-color {\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaW5jZW50aXZlL2luZm8tcGFnZS9pbmZvLXBhZ2UuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2luY2VudGl2ZS9pbmZvLXBhZ2UvaW5mby1wYWdlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0kscUJBQUE7QUNDSiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9pbmZvLXBhZ2UvaW5mby1wYWdlLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport { MenuController } from '@ionic/angular';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-info-page',\n templateUrl: './info-page.component.html',\n styleUrls: ['./info-page.component.scss'],\n})\nexport class InfoPageComponent implements OnInit {\n\n constructor(private menuCtrl:MenuController,\n private appUsageDb: DatabaseService) { }\n\n ngOnInit() {\n this.menuCtrl.close();\n }\n\n ionViewDidEnter(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.appUsageDb.saveAppUsageEnter(\"reward_info_page\"); \n } \n\n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.appUsageDb.saveAppUsageExit(\"reward_info_page\"); \n }\n\n}\n","\n/* \n The profile for questions is stored in /assets/data/life_insight.json\n*/\n\nimport { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IonicModule } from '@ionic/angular';\nimport { Q1MotivatedComponent } from './q1-motivated/q1-motivated.component';\nimport { SampleLifeInsightsComponent } from './sample-life-insights/sample-life-insights.component';\nimport { Routes, RouterModule } from '@angular/router';\nimport { FormsModule } from '@angular/forms';\nimport { SamplePythonViewComponent } from './sample-python-view/sample-python-view.component';\n\n\nconst routes: Routes = [\n { path: 'sample-life-insights', component: SampleLifeInsightsComponent }\n];\n\n@NgModule({\n declarations: [Q1MotivatedComponent, SampleLifeInsightsComponent],\n imports: [\n CommonModule,\n FormsModule,\n IonicModule.forRoot(),\n RouterModule.forChild(routes)\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n exports:[Q1MotivatedComponent,SampleLifeInsightsComponent]\n})\nexport class LifeInsightsModule { }\n","module.exports = \"\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9saWZlLWluc2lnaHRzL3ExLW1vdGl2YXRlZC9xMS1tb3RpdmF0ZWQuY29tcG9uZW50LnNjc3MifQ== */\"","import { Component, OnInit, ViewChild, ElementRef, Input } from '@angular/core';\nimport { Chart } from 'chart.js';\n\n\n@Component({\n selector: 'app-q1-motivated',\n templateUrl: './q1-motivated.component.html',\n styleUrls: ['./q1-motivated.component.scss'],\n})\nexport class Q1MotivatedComponent implements OnInit {\n\n @ViewChild('lineCanvas', {static: true}) lineCanvas: ElementRef;\n //@Input() inputStr : string;\n //@Input() jsonObj : any;\n private _jsonObj: any;\n\n //jsonObj;\n\n imgloc;\n title;\n subtext;\n bottomSubtext;\n topSubtext;\n question;\n data;\n options;\n labels;\n qYaxis;\n\n\n private lineChart: Chart;\n\n constructor() { \n }\n\n get jsonObj(): any {\n // transform value for display\n return this._jsonObj;\n }\n \n @Input()\n set jsonObj(jsonObj: any) {\n console.log('prev _jsonObj: ', this._jsonObj);\n console.log('got jsonObj: ', jsonObj);\n this._jsonObj = jsonObj;\n }\n\n ngOnInit(){\n\n //console.log(this.inputStr);\n //this.jsonObj = JSON.parse(this.inputStr);\n console.log(\"Q1MotivatedComponent \"+JSON.stringify(this._jsonObj));\n this.imgloc = this._jsonObj.imgloc;\n this.title = this._jsonObj.title;\n this.subtext = this._jsonObj.subtext;\n this.topSubtext = this._jsonObj.topSubtext;\n this.bottomSubtext = this._jsonObj.bottomSubtext;\n this.question =this._jsonObj.question;\n this.data = this._jsonObj.data; \n this.labels = this._jsonObj.labels;\n this.qYaxis = this._jsonObj.qYaxis;\n\n\n\n this.lineChart = new Chart(this.lineCanvas.nativeElement, {\n type: \"line\",\n data: {\n labels: this.labels, //[\"9/13\", \"9/14\", \"9/15\", \"9/16\", \"9/17\", \"9/18\", \"Today\"], //x-label\n datasets: [\n {\n label: \"My First dataset\",\n fill: false,\n lineTension: 0.1,\n backgroundColor: \"rgba(75,192,192,0.4)\",\n borderColor: \"rgba(75,192,192,1)\",\n borderCapStyle: \"butt\",\n borderDash: [],\n borderDashOffset: 0.0,\n borderJoinStyle: \"miter\",\n pointBorderColor: \"rgba(75,192,192,1)\",\n pointBackgroundColor: \"rgba(75,192,192,1)\",\n pointBorderWidth: 1,\n pointHoverRadius: 5,\n pointHoverBackgroundColor: \"rgba(75,192,192,1)\",\n pointHoverBorderColor: \"rgba(220,220,220,1)\",\n pointHoverBorderWidth: 2,\n pointRadius: 4,\n pointHitRadius: 10,\n data: this.data, //y-label\n spanGaps: false\n }\n ]\n },\n options: {\n tooltips: {enabled: false},\n hover: {mode: null},\n legend: {\n display: false\n },\n maintainAspectRatio: false,\n layout: {\n padding: {\n left: 5,\n right: 5,\n top: 15,\n bottom: 5\n }\n },\n scales: {\n yAxes: [{\n scaleLabel: {\n display: true,\n labelString: this.qYaxis,\n fontColor: \"#000\"\n },\n ticks: {\n max: 4,\n min: 0,\n stepSize: 1,\n display: true\n }\n }],\n xAxes: [{\n scaleLabel: {\n display: true,\n labelString: 'Day',\n fontColor: \"#000\"\n }\n }],\n }\n }\n });\n }\n\n\n /*\n {\n this.options = {\n chart: {\n type: 'lineChart',\n useInteractiveGuideline: true,\n height: 450,\n transitionDuration: 350,\n showLegend: false,\n margin: {\n top: 20,\n right: 20,\n bottom: 40,\n left: 55\n },\n x: (d) => { return d.x; },\n y: (d) => { return d.y; },\n xScale: d3.time.scale(),\n xAxis: {\n ticks: d3.time.months,\n tickFormat: (d) => {\n return d3.time.format('%b')(new Date(d));\n }\n },\n yAxis: {\n axisLabel: 'Gross volume',\n tickFormat: (d) => {\n if (d == null) {\n return 0;\n }\n return d3.format('.02f')(d);\n },\n axisLabelDistance: 400\n }\n }\n }\n\n this.data = [\n {\n key: \"Cumulative Return\",\n values: [\n {\n \"label\" : \"A\" ,\n \"value\" : -29.765957771107\n } ,\n {\n \"label\" : \"B\" ,\n \"value\" : 0\n } ,\n {\n \"label\" : \"C\" ,\n \"value\" : 32.807804682612\n } ,\n ]\n }\n ];\n }\n */\n\n}\n","module.exports = \"\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS9saWZlLWluc2lnaHRzL3NhbXBsZS1saWZlLWluc2lnaHRzL3NhbXBsZS1saWZlLWluc2lnaHRzLmNvbXBvbmVudC5zY3NzIn0= */\"","import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';\nimport { Chart } from 'chart.js';\nimport * as moment from 'moment';\n\n//import * as lifeInsightProfile from \"../../../../assets/data/life_insight.json\";\n//import { PreLoad } from '../../../PreLoad';\n\n@Component({\n selector: 'app-sample-life-insights',\n templateUrl: './sample-life-insights.component.html',\n styleUrls: ['./sample-life-insights.component.scss'],\n})\n\n//@PreLoad('q1lifeinsight')\nexport class SampleLifeInsightsComponent implements OnInit {\n\n @ViewChild('lineCanvas', {static: true}) lineCanvas: ElementRef;\n //@Input() jsonObj : any;\n //private _jsonObj: any;\n\n //jsonObj;\n\n imgloc;\n title;\n subtext;\n bottomSubtext;\n topSubtext;\n question;\n data;\n options;\n labels;\n qYaxis;\n\n qYaxisArray;\n index = 0;\n //inputJson = {};\n selectedValue;\n \n\n\n private lineChart: Chart;\n\n constructor() { \n }\n\n/* get jsonObj(): any {\n // transform value for display\n return this._jsonObj;\n }\n \n @Input()\n set jsonObj(jsonObj: any) {\n console.log('prev _jsonObj: ', this._jsonObj);\n console.log('got jsonObj: ', jsonObj);\n this._jsonObj = jsonObj;\n } */\n\n ngOnInit(){\n this.init(this.index);\n\n }\n\n init(index: number){\n //console.log(this.inputStr);\n //this.jsonObj = JSON.parse(this.inputStr);\n\n var lifeInsightProfile = {\n \"questions\":[\"Q3d\",\"Q4d\",\"Q5d\",\"Q8d\"],\n \"qimgs\": [\"assets/img/stress.png\",\"assets/img/freetime.png\",\"assets/img/dance2.png\",\"assets/img/social.png\"],\n \"lifeInsightsTitle\": [\"How much pain are you currently experiencing?\", \n \"How much fatigue are you currently experiencing?\", \n \"How much nausea are you currently experiencing?\", \n \"How motivated are you to take 6MP today?\"],\n \"qYaxis\": [\"Pain level\",\"Fatigue level\",\"Nausea level\",\"Degree of motivation\"],\n \"qSubText\": [\"0 = low pain, 4 = severe pain\", \n \"0 = low fatigue, 4 = severe fatigue\",\n \"0 = low nausea, 4 = severe nausea\",\n \"0 = less motivated, 4 = highly motivated\"],\n \"lifeInsightsHighStress\": [\n \"Stressed \", \n \"Fatigued \", \n \"Nausea \",\n \"Motivated \"],\n \"lifeInsightsLowStress\": [\n \"Relaxed \", \n \"Fatigued \", \n \"Nausea \", \n \"Motivated \"] \n };\n\n this.index = Math.floor(Math.random() * lifeInsightProfile.questions.length); \n this.question = lifeInsightProfile.questions[this.index]; \n this.imgloc = lifeInsightProfile.qimgs[this.index];\n this.title = lifeInsightProfile.lifeInsightsTitle[this.index];\n this.qYaxis = lifeInsightProfile.qYaxis[this.index];\n this.subtext = lifeInsightProfile.qSubText[this.index];\n this.topSubtext = lifeInsightProfile.lifeInsightsHighStress[this.index];\n this.bottomSubtext = lifeInsightProfile.lifeInsightsLowStress[this.index];\n\n this.qYaxisArray = lifeInsightProfile.qYaxis;\n this.selectedValue = lifeInsightProfile.qYaxis[this.index];\n\n //read data from localStorage \n if(window.localStorage.getItem(\"lifeInsight\") == undefined) {\n console.log(\"Undefined!\");\n this.data = [0, 1, 3, 4, null, 3, 1];\n //this.inputString = JSON.stringify(this.inputJson);\n }\n else {\n var lifeInsightObj= JSON.parse(window.localStorage.getItem(\"lifeInsight\"));\n console.log(JSON.stringify(lifeInsightObj));\n this.data = [];\n this.labels = [];\n for(var i = 6; i>= 0; i--){\n var currentdate = moment().subtract(i, \"days\").format(\"DD-MM-YYYY\");\n //console.log(\"Inside loop: currentdate: \"+currentdate);\n if(i==0) {\n this.labels.push(\"Today\");\n } else {\n this.labels.push(moment().subtract(i, \"days\").format(\"MM/DD\"));\n }\n //console.log(\"Local Storage save: \"+question+\" \"+JSON.stringify(lifeInsightObj[question]));\n var dates = lifeInsightObj[this.question][\"dates\"];\n var dateIndex = dates.lastIndexOf(currentdate);\n if( dateIndex > -1) {\n this.data.push(lifeInsightObj[this.question]['data'][dateIndex]);\n }\n else{\n this.data.push(null);\n }\n }\n //this.data = [null, null, null, null, null, null, 1];\n console.log(\"Data, \" + this.data);\n \n }\n\n\n this.lineChart = new Chart(this.lineCanvas.nativeElement, {\n type: \"line\",\n data: {\n labels: this.labels, //[\"9/13\", \"9/14\", \"9/15\", \"9/16\", \"9/17\", \"9/18\", \"Today\"], //x-label\n datasets: [\n {\n label: \"My First dataset\",\n fill: false,\n lineTension: 0.1,\n backgroundColor: \"rgba(75,192,192,0.4)\",\n borderColor: \"rgba(75,192,192,1)\",\n borderCapStyle: \"butt\",\n borderDash: [],\n borderDashOffset: 0.0,\n borderJoinStyle: \"miter\",\n pointBorderColor: \"rgba(75,192,192,1)\",\n pointBackgroundColor: \"rgba(75,192,192,1)\",\n pointBorderWidth: 1,\n pointHoverRadius: 5,\n pointHoverBackgroundColor: \"rgba(75,192,192,1)\",\n pointHoverBorderColor: \"rgba(220,220,220,1)\",\n pointHoverBorderWidth: 2,\n pointRadius: 4,\n pointHitRadius: 10,\n data: this.data, //y-label\n spanGaps: false\n }\n ]\n },\n options: {\n tooltips: {enabled: false},\n hover: {mode: null},\n legend: {\n display: false\n },\n maintainAspectRatio: false,\n layout: {\n padding: {\n left: 5,\n right: 5,\n top: 15,\n bottom: 5\n }\n },\n scales: {\n yAxes: [{\n scaleLabel: {\n display: true,\n labelString: this.qYaxis,\n fontColor: \"#000\"\n },\n ticks: {\n max: 4,\n min: 0,\n stepSize: 1,\n display: true\n }\n }],\n xAxes: [{\n scaleLabel: {\n display: true,\n labelString: 'Day',\n fontColor: \"#000\"\n }\n }],\n }\n }\n });\n }\n\n ratingChanged(rating){\n if(rating==0)\n console.log(\"thumbs down\");\n else\n console.log(\"thumbs up\");\n \n //this.router.navigate(['incentive/aquarium/aquariumone']);\n //this.router.navigate(['/home']);\n window.location.href = '/home';\n }\n\n /*onChangeCategorySelect(){\n console.log(\"onChangeCategorySelect: \"+this.selectedValue);\n this.index = this.qYaxisArray.indexOf(this.selectedValue);\n this.init(this.index); \n\n }*/\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL2xpZmUtaW5zaWdodHMvc2FtcGxlLXB5dGhvbi12aWV3L3NhbXBsZS1weXRob24tdmlldy5jb21wb25lbnQuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0lBQ0kscUJBQXFCO0FBQ3pCIiwiZmlsZSI6InNyYy9hcHAvaW5jZW50aXZlL2xpZmUtaW5zaWdodHMvc2FtcGxlLXB5dGhvbi12aWV3L3NhbXBsZS1weXRob24tdmlldy5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iXX0= */\"","import { Component, OnInit } from '@angular/core';\nimport { MenuController } from '@ionic/angular';\nimport { DatabaseService } from 'src/app/monitor/database.service';\nimport { InAppBrowser } from '@ionic-native/in-app-browser/ngx';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\n\n@Component({\n selector: 'app-sample-python-view',\n templateUrl: './sample-python-view.component.html',\n styleUrls: ['./sample-python-view.component.css']\n})\nexport class SamplePythonViewComponent implements OnInit {\n helpUrl: any;\n moodInsightImage;\n concentrationInsightImage;\n stressInsightImage;\n\n constructor(private userProfileService: UserProfileService,\n private menuCtrl:MenuController,\n private appUsageDb: DatabaseService,\n private sanitizer: DomSanitizer) { \n\n }\n\n ngOnInit() {\n this.menuCtrl.close();\n\n\n /*\n const browser = this.iab.create('https://cnn.com/');\n\n //browser.executeScript(...);\n\n //browser.insertCSS(...);\n browser.on('loadstop').subscribe(event => {\n browser.insertCSS({ code: \"body{color: red;\" });\n });\n\n browser.close();\n */\n\n ////'http://54.146.43.246:5000/'\n\n }\n\n ionViewDidEnter(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.moodInsightImage = \"http://ec2-52-201-144-36.compute-1.amazonaws.com:56735/get_daily_plot?username=\" + this.userProfileService.username + \"&plot_type=edu.harvard.srl.MoodVisualization&cachebreaker=\" + new Date().getTime();\n this.concentrationInsightImage = \"http://ec2-52-201-144-36.compute-1.amazonaws.com:56735/get_daily_plot?username=\" + this.userProfileService.username + \"&plot_type=edu.harvard.srl.ConcentrationVisualization&cachebreaker=\" + new Date().getTime();\n this.stressInsightImage = \"http://ec2-52-201-144-36.compute-1.amazonaws.com:56735/get_daily_plot?username=\" + this.userProfileService.username + \"&plot_type=edu.harvard.srl.GoodDayVisualization&cachebreaker=\" + new Date().getTime();\n\n this.appUsageDb.saveAppUsageEnter(\"python_life_insight_page_sample\"); \n } \n\n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.appUsageDb.saveAppUsageExit(\"python_life_insight_page_sample\"); \n }\n\n}\n","import { UnlockedIncentives } from '../model/unlocked-incentives';\nimport { createReducer, on } from '@ngrx/store';\nimport { IncentiveActions } from '../action-types';\nimport * as moment from 'moment';\n\nexport interface UnlockecIncentiveState{\n unlockedIncentives : UnlockedIncentives\n}\n\n\nexport const initialUnlockedIncentiveState: UnlockecIncentiveState = {\n unlockedIncentives: undefined \n}\n\n\nexport const incentiveReducer = createReducer(\n\n initialUnlockedIncentiveState,\n on(IncentiveActions.surveyCompletedRegisterUnlocked, (state, payload) => {\n console.log(\"Incentive State: \" + JSON.stringify(state));\n console.log(\"Incentive payload: \" + JSON.stringify(payload));\n var currentDate = moment().format('YYYYMMDD');\n var unlockedIncentiveObject = {};\n\n let new_state = {};\n let payload_data = payload[\"payload\"]\n new_state['user_id'] = payload_data[\"user_id\"];\n new_state['last_date'] = payload_data[\"last_date\"];\n \n let currentIncentiveTimeline: Object = Object.assign({},state[\"timeline\"]);\n if(currentIncentiveTimeline == undefined) //means initial state with no timeline\n currentIncentiveTimeline = {};\n \n let key = currentDate;\n let value = {\n unlocked_points: payload_data[\"unlocked_points\"], \n unlocked_money: payload_data[\"unlocked_money\"], \n current_point: payload_data[\"current_point\"],\n date: moment().format('YYYYMMDD'),\n isUnlockedViewShown: payload_data[\"isUnlockedViewShown\"],\n }\n currentIncentiveTimeline[key] = value;\n new_state[\"timeline\"] = currentIncentiveTimeline;\n console.log(\"Incentive State: \" + JSON.stringify(new_state));\n return new_state;\n }),\n\n\n on(IncentiveActions.unlockedScreenShownAlready, (state, payload) => {\n var currentDate = moment().format('YYYYMMDD');\n\n //let clone = Object.assign({}, obj);\n let currentIncentiveTimeline: Object = Object.assign({},state[\"timeline\"]);\n currentIncentiveTimeline[currentDate] = {...currentIncentiveTimeline[currentDate],\n isUnlockedViewShown: true};\n \n return {\n ...state, \n timeline: currentIncentiveTimeline\n }; \n })\n\n\n //this.store.dispatch(surveyCompletedRegisterUnlocked({unlockedIncentives}));\n\n /*\n on(AuthActions.login, (state, action) => {\n return {\n user: action.user\n }\n }),\n\n on(AuthActions.logout, (state, action) => {\n return {\n user: undefined\n }\n })\n */\n\n\n\n);","module.exports = \".new-background-color {\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvaW5jZW50aXZlL3RyZWFzdXJlY2hlc3QvdHJlYXN1cmVjaGVzdC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvaW5jZW50aXZlL3RyZWFzdXJlY2hlc3QvdHJlYXN1cmVjaGVzdC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHFCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvdHJlYXN1cmVjaGVzdC90cmVhc3VyZWNoZXN0LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-treasurechest',\n templateUrl: './treasurechest.component.html',\n styleUrls: ['./treasurechest.component.scss'],\n})\nexport class TreasurechestComponent implements OnInit {\n\n amount_earned = \"$0\";\n pearlsAndGems = [];\n pointsdata = [];\n\n\n constructor(private appUsageDb: DatabaseService) { \n }\n\n ngOnInit() {\n\n //load reward data\n var badges;\n //badges = JSON.parse(window.localStorage['badges'] || \"{}\");\n var user_data = JSON.parse(window.localStorage['user_data'] || \"{}\");\n badges = user_data['badges'] || {};\n if('money' in badges){ //means things are empty.\n }else{\n badges['daily_survey'] = [0,0,0,0,0,0];\n badges['weekly_survey'] = [0,0,0,0];\n badges['active_tasks'] = [0,0,0,0,0,0];\n badges['money'] = 10;\n }\n\n\n //add the money\n this.amount_earned = \"$\" + badges['money']\n\n //\n if(window.localStorage['AwardDollar'] == undefined)\n this.amount_earned = \"$\" + 0;\n else\n this.amount_earned = \"$\" + parseInt(window.localStorage['AwardDollar']);\n\n\n\n //add the badges for daily survey\n var daily_survey_tasks = [2,1,0,3,1,1];//badges['daily_survey'];\n //daily_survey_tasks = [3,2,0,2,2,1]; \n //daily_survey_tasks = [0,0,0,0,0];\n //badges['weekly_survey'] = [0,0,0,0];\n var daily_width = [50,30,42,30,42,40,46];\n var ds_tasks_badges = ['img/backgroud_daily.png','img/green.png','img/blue.png','img/red.png','img/bronze.png','img/silver.png','img/gold.png'];\n for(var i = 1; i < ds_tasks_badges.length; i++){\n if(daily_survey_tasks[i-1] > 0){\n for(var q = 0; q < daily_survey_tasks[i-1]; q++)\n this.pearlsAndGems.push({\"img\": \"assets/\" + ds_tasks_badges[i], \"count\": daily_survey_tasks[i-1], \"width\": daily_width[i]*3/2});\n }\n }\n\n\n\n fetch('../../../assets/game/fishpoints.json').then(async res => {\n //console.log(\"Fishes: \" + data);\n\n var data = await res.json();\n var current_points = 700;\n\n var survey_string = \"\";\n var isNextAvailableStillMasked = false;\n for(var i = 0; i < data.length; i++) {\n data[i].class = 'nonshade';\n data[i].img = \"assets/\" + data[i].img.substring(0, data[i].img.length-4) + '_tn.jpg';\n data[i].fish_index = i; \n data[i].show_trivia = 1;\n \n /*\n if(current_points < data[i].points){\n if(isNextAvailableStillMasked == false){\n //\n data[i].img = data[i].img.substring(0, data[i].img.length-7) + '-grey_tn.jpg';\n isNextAvailableStillMasked = true;\n //data[i].class = 'shade';\n }\n else{\n data[i].img = 'assets/img/cryptocoin_tn.jpg';\n }\n\n data[i].show_trivia = 0; \n }\n\n if(data[i].name === 'Sea environment'){\n data[i].show_trivia = 0; \n }\n */\n }\n \n this.pointsdata = data;\n //console.log(\"Fishes: \" + JSON.stringify(this.pointsdata));\n\n\n //console.log(\"Fishes: \" + JSON.stringify($scope.pointsdata));\n //$scope.$apply();\n });\n\n \n\n //add the fish to be unlocked\n\n\n }\n\n sum(arr){\n var total=0;\n for(var i in arr){\n total += arr[i]; \n }\n return total;\n }\n\n ionViewDidEnter() {\n //\n this.appUsageDb.saveAppUsageEnter(\"treasure_chest\"); \n }\n\n ionViewDidLeave(){\n this.appUsageDb.saveAppUsageExit(\"treasure_chest\"); \n }\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL3VubG9ja2VkLWFsdHVpc3RpYy1tZXNzYWdlcy91bmxvY2tlZC1hbHR1aXN0aWMtbWVzc2FnZXMuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL2luY2VudGl2ZS91bmxvY2tlZC1hbHR1aXN0aWMtbWVzc2FnZXMvdW5sb2NrZWQtYWx0dWlzdGljLW1lc3NhZ2VzLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */\"","import { Component, OnInit } from '@angular/core';\nimport * as moment from 'moment';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { environment } from '../../../environments/environment';\nimport { HttpClient } from '@angular/common/http';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-unlocked-altuistic-messages',\n templateUrl: './unlocked-altuistic-messages.component.html',\n styleUrls: ['./unlocked-altuistic-messages.component.css']\n})\nexport class UnlockedAltuisticMessagesComponent implements OnInit {\n already_shown_altruism_msgs: any;\n unlockedAltMessagesCount: number;\n list_of_alt_msg_to_display: any;\n\n constructor(private userProfileService: UserProfileService,\n private httpClient: HttpClient,\n private appUsageDb: DatabaseService) { }\n\n get username(){\n if(this.userProfileService == undefined)\n return \"test\";\n else{\n return this.userProfileService.username;\n }\n }\n\n ngOnInit() {\n }\n\n ionViewDidEnter(){\n this.already_shown_altruism_msgs = window.localStorage[\"already_shown_alt_msg4\"];\n\n if(this.already_shown_altruism_msgs == undefined){\n this.already_shown_altruism_msgs = {\n \"last_updated\": Date.now(),\n \"last_updated_readable_ts\": moment().format(\"MMMM Do YYYY, h:mm:ss a Z\"),\n \"unlocked_alt_msgs\":[{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": moment().format('MM/DD/YYYY')}]\n };\n window.localStorage[\"already_shown_alt_msg4\"] = JSON.stringify(this.already_shown_altruism_msgs);\n }else\n this.already_shown_altruism_msgs = JSON.parse(window.localStorage[\"already_shown_alt_msg4\"]);\n\n if(this.already_shown_altruism_msgs.unlocked_alt_msgs.length == 0){\n this.already_shown_altruism_msgs = {\n \"last_updated\": Date.now(),\n \"last_updated_readable_ts\": moment().format(\"MMMM Do YYYY, h:mm:ss a Z\"),\n \"unlocked_alt_msgs\":[{\"filename\": \"assets/altruism/altruism_1.png\", \"unlock_date\": moment().format('MM/DD/YYYY')}]\n };\n window.localStorage[\"already_shown_alt_msg4\"] = JSON.stringify(this.already_shown_altruism_msgs);\n }\n\n this.unlockedAltMessagesCount = this.already_shown_altruism_msgs.unlocked_alt_msgs.length;\n this.list_of_alt_msg_to_display = this.already_shown_altruism_msgs[\"unlocked_alt_msgs\"];\n //this.list_of_alt_msg_to_display.reverse();\n console.log(\"already_shown_altruism_msgs \" + this.already_shown_altruism_msgs);\n\n this.downloadAndUpdateUnlockedAltsMsgsList();\n\n //\n this.appUsageDb.saveAppUsageEnter(\"unlocked_altruism_message_tab\"); \n }\n\n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.appUsageDb.saveAppUsageExit(\"unlocked_altruism_message_tab\"); \n }\n\n async downloadAndUpdateUnlockedAltsMsgsList() {\n \n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n this.httpClient.post(flaskServerAPIEndpoint + '/get-unlocked-incentive', { \"user_id\": this.username, \"incentive_type\": \"alt_msg\" }).subscribe({\n next: data => {\n\n var json_data = JSON.parse(JSON.stringify(data));\n\n /*\n \n Sample of returned data\n\n {\n \"last_updated\": 1591509230223,\n \"last_updated_readable_ts\": \"June 6th 2020, 10:53:50 pm -07:00\",\n \"unlocked_memes\": [\n {\n \"filename\": \"assets/memes/4.jpg\",\n \"unlock_date\": \"06/06/2020\"\n }\n ]\n }\n */\n\n var lastUpdatedSeverSide: number;\n var lastUpdatedReadableTsSeverSide: any;\n var unlockedAltMsgsServerSide: any;\n if(\"last_updated\" in json_data){\n lastUpdatedSeverSide = json_data[\"last_updated\"];\n lastUpdatedReadableTsSeverSide = json_data[\"last_updated_readable_ts\"];\n unlockedAltMsgsServerSide = json_data[\"unlocked_alt_msgs\"];\n //console.log(\"--unlockedAltMsgsServerSide--- \" + JSON.stringify(unlockedAltMsgsServerSide));\n }else{\n lastUpdatedSeverSide = -1;\n lastUpdatedReadableTsSeverSide = -1;\n unlockedAltMsgsServerSide = [];\n //console.log(\"--unlockedAltMsgsServerSide--- \" + JSON.stringify(unlockedAltMsgsServerSide));\n }\n\n var localAltMsgsRecord = JSON.parse(window.localStorage[\"already_shown_alt_msg4\"]);\n var lastUpdatedLocalStorage = localAltMsgsRecord[\"last_updated\"];\n var lastUpdatedReadableTsLocalStorage = localAltMsgsRecord[\"last_updated_readable_ts\"];\n var unlockedAltMsgLocalStorage = localAltMsgsRecord[\"unlocked_alt_msgs\"];\n //console.log(\"--unlockedAltMsgLocalStorage--- \" + JSON.stringify(unlockedAltMsgLocalStorage));\n\n\n //Following code creats a union of unlockedMemesServerSide and unlockedMemesLocalStorage\n var unionOfLocalAndServer = {};\n for(var i=0; i < unlockedAltMsgsServerSide.length; i++)\n unionOfLocalAndServer[unlockedAltMsgsServerSide[i][\"filename\"]] = unlockedAltMsgsServerSide[i];\n for(var i=0; i < unlockedAltMsgLocalStorage.length; i++)\n unionOfLocalAndServer[unlockedAltMsgLocalStorage[i][\"filename\"]] = unlockedAltMsgLocalStorage[i];\n\n //console.log(\"--unionOfLocalAndServer--- \" + JSON.stringify(unionOfLocalAndServer));\n\n //\n var unlockedAltMessagesOrderedByDate = {};\n for(var key in unionOfLocalAndServer)\n unlockedAltMessagesOrderedByDate[unionOfLocalAndServer[key][\"unlock_date\"]] = unionOfLocalAndServer[key];\n \n //console.log(\"--unlockedAltMessagesOrderedByDate--- \" + JSON.stringify(unlockedAltMessagesOrderedByDate));\n var res = [];\n var sortedDates = Object.keys(unlockedAltMessagesOrderedByDate).sort();\n for (var k=0; k < sortedDates.length; k++){\n res.push(unlockedAltMessagesOrderedByDate[sortedDates[k]]);\n }\n this.list_of_alt_msg_to_display = res.reverse();\n this.unlockedAltMessagesCount = res.length;\n\n\n localAltMsgsRecord[\"unlocked_alt_msgs\"] = this.list_of_alt_msg_to_display;\n localAltMsgsRecord[\"last_updated\"] = Date.now();\n localAltMsgsRecord[\"last_updated_readable_ts\"] = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n window.localStorage[\"already_shown_alt_msg4\"] = JSON.stringify(localAltMsgsRecord);\n\n //console.log(\"--localAltMsgsRecord--- \" + JSON.stringify(localAltMsgsRecord));\n //\n this.uploadCurrentlyUnlockedAltMsgsList(localAltMsgsRecord);\n },\n error: error => console.error('There was an error!', error)\n });\n }\n\n uploadCurrentlyUnlockedAltMsgsList(already_shown_alt_msgs){\n\n /*\n {\n \"user_id\": \"test\",\n \"incentiveString\": \"test\",\n \"whenInserted\": \"test\",\n \"whenInsertedReadableTs\": 1234,\n \"incentiveType\": \"test\"\n }\n */\n\n var username = this.userProfileService.username;\n var currentTimeTs = Date.now();\n var currentTimeReadableTs = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n const headers = { \"Content-Type\": \"application/json;charset=UTF-8\"};\n const body = {\n \"user_id\": username, \n \"whenInserted\": currentTimeTs, \n \"whenInsertedReadableTs\": currentTimeReadableTs,\n \"incentiveType\": \"alt_msg\",\n \"incentiveString\": JSON.stringify(already_shown_alt_msgs)\n };\n \n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n this.httpClient.post(flaskServerAPIEndpoint + \"/store-unlocked-incentive\", body)\n .subscribe({\n next: data => console.log(\"--unlocked_alt_msg-- \" + JSON.stringify(data)),\n error: error => console.error('There was an error!', error)\n });\n }\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL3VubG9ja2VkLWluc3BpcmF0aW9uYWwtcXVvdGVzL3VubG9ja2VkLWluc3BpcmF0aW9uYWwtcXVvdGVzLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvdW5sb2NrZWQtaW5zcGlyYXRpb25hbC1xdW90ZXMvdW5sb2NrZWQtaW5zcGlyYXRpb25hbC1xdW90ZXMuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { HttpClient } from '@angular/common/http';\nimport { environment } from '../../../environments/environment';\nimport * as moment from 'moment';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-unlocked-inspirational-quotes',\n templateUrl: './unlocked-inspirational-quotes.component.html',\n styleUrls: ['./unlocked-inspirational-quotes.component.css']\n})\nexport class UnlockedInspirationalQuotesComponent implements OnInit {\n\n unlockedInspirationalQuotes = [];\n\n constructor(\n private userProfileService: UserProfileService,\n private httpClient: HttpClient,\n private appUsageDb: DatabaseService\n ) { }\n\n\n get username(){\n if(this.userProfileService == undefined)\n return \"test\";\n else{\n return this.userProfileService.username;\n }\n }\n\n ngOnInit() {\n \n }\n\n ionViewDidEnter() {\n //pre-populate\n this.unlockedInspirationalQuotes = JSON.parse(window.localStorage.getItem(\"saved_quotes\") || '[]');\n this.getInspirationalQuotes();\n\n //\n this.appUsageDb.saveAppUsageEnter(\"unlocked_inspirational_quote_tab\"); \n }\n\n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.appUsageDb.saveAppUsageExit(\"unlocked_inspirational_quote_tab\"); \n }\n\n\n getInspirationalQuotes() {\n \n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n this.httpClient.post(flaskServerAPIEndpoint + '/get-inspirational-quote', { \"user_id\": this.username }).subscribe({\n next: data => {\n //console.log(\"Inspirational quote: \" + JSON.stringify(data));\n var json_data = JSON.parse(JSON.stringify(data));\n this.unlockedInspirationalQuotes = [];\n for(var i=0; i < json_data.length; i++){\n\n //exclude today if it is not yet 4PM.\n var todaysDate = moment().format('YYYYMMDD');\n if(json_data[i].date == todaysDate){\n var currentTime = moment(); \n var startTime = moment({hour: 16}); // 6pm\n var endTime = moment({hour: 23, minute: 59, second: 59}); // 11:59pm\n if(!currentTime.isBetween(startTime, endTime)) \n continue;\n }\n\n //sometimes tomorrow can get scheduled as well\n var tomorrowsDate = moment().add(1,\"days\").format('YYYYMMDD');\n if(json_data[i].date == tomorrowsDate)\n continue;\n\n var date = json_data[i].date;\n date = date.substring(4, 6) + \"/\" + date.substring(6, 8) + \"/\" + date.substring(0, 4);\n\n this.unlockedInspirationalQuotes.push({\n \"image\": \"https://aws-website-sara-ubicomp-h28yp.s3.amazonaws.com/sarapp/engagement_images/\" + json_data[i].image,\n \"author\": json_data[i].author,\n \"quote_text\": json_data[i].quote_text,\n \"date\": date\n });\n }\n window.localStorage.setItem('saved_quotes', JSON.stringify(this.unlockedInspirationalQuotes));\n },\n error: error => console.error('There was an error!', error)\n });\n }\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL3VubG9ja2VkLW1lbWVzL3VubG9ja2VkLW1lbWVzLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbmNlbnRpdmUvdW5sb2NrZWQtbWVtZXMvdW5sb2NrZWQtbWVtZXMuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport * as moment from 'moment';\nimport { environment } from '../../../environments/environment';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { HttpClient } from '@angular/common/http';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-unlocked-memes',\n templateUrl: './unlocked-memes.component.html',\n styleUrls: ['./unlocked-memes.component.css']\n})\nexport class UnlockedMemesComponent implements OnInit {\n already_shown_memes: any;\n list_of_meme_to_display: any;\n unlockedMemeCount: number;\n\n constructor(private userProfileService: UserProfileService,\n private httpClient: HttpClient,\n private appUsageDb: DatabaseService) { \n }\n\n get username(){\n if(this.userProfileService == undefined)\n return \"test\";\n else{\n return this.userProfileService.username;\n }\n }\n\n ngOnInit() {\n }\n\n ionViewDidEnter(){\n \n this.already_shown_memes = window.localStorage[\"already_shown_memes4\"];\n\n if(this.already_shown_memes == undefined){\n this.already_shown_memes = {\n \"last_updated\": Date.now(),\n \"last_updated_readable_ts\": moment().format(\"MMMM Do YYYY, h:mm:ss a Z\"),\n \"unlocked_memes\":[{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": moment().format('MM/DD/YYYY')}]\n };\n window.localStorage[\"already_shown_memes4\"] = JSON.stringify(this.already_shown_memes);\n }else\n this.already_shown_memes = JSON.parse(window.localStorage[\"already_shown_memes4\"]);\n\n if(this.already_shown_memes.unlocked_memes.length == 0){\n this.already_shown_memes = {\n \"last_updated\": Date.now(),\n \"last_updated_readable_ts\": moment().format(\"MMMM Do YYYY, h:mm:ss a Z\"),\n \"unlocked_memes\":[{\"filename\": \"assets/memes/4.jpg\", \"unlock_date\": moment().format('MM/DD/YYYY')}]\n };\n window.localStorage[\"already_shown_memes4\"] = JSON.stringify(this.already_shown_memes);\n }\n\n\n this.unlockedMemeCount = this.already_shown_memes[\"unlocked_memes\"].length;\n\n //var unlockedMemeUnorderDateList = this.already_shown_memes[\"unlocked_memes\"];\n //for(var key in unlockedMemeUnorderDateList)\n // unlockedMemesOrderedByDate[unionOfLocalAndServer[key][\"unlock_date\"]] = unionOfLocalAndServer[key];\n //console.log(\"unlockedMemeUnorderDateList \" + JSON.stringify(unlockedMemeUnorderDateList.reverse()));\n \n this.list_of_meme_to_display = this.already_shown_memes[\"unlocked_memes\"];\n //this.list_of_meme_to_display.reverse();\n console.log(\"already_shown_memes \" + JSON.stringify(this.already_shown_memes));\n\n \n this.downloadAndUpdateUnlockedMemeList();\n\n //\n this.appUsageDb.saveAppUsageEnter(\"unlocked_meme_tab\"); \n }\n\n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.appUsageDb.saveAppUsageExit(\"unlocked_meme_tab\"); \n }\n\n \n async downloadAndUpdateUnlockedMemeList() {\n \n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n this.httpClient.post(flaskServerAPIEndpoint + '/get-unlocked-incentive', { \"user_id\": this.username, \"incentive_type\": \"meme\" }).subscribe({\n next: data => {\n\n var json_data = JSON.parse(JSON.stringify(data));\n\n /*\n \n Sample of returned data\n\n {\n \"last_updated\": 1591509230223,\n \"last_updated_readable_ts\": \"June 6th 2020, 10:53:50 pm -07:00\",\n \"unlocked_memes\": [\n {\n \"filename\": \"assets/memes/4.jpg\",\n \"unlock_date\": \"06/06/2020\"\n }\n ]\n }\n */\n\n var lastUpdatedSeverSide: number;\n var lastUpdatedReadableTsSeverSide: any;\n var unlockedMemesServerSide: any;\n if(\"last_updated\" in json_data){\n lastUpdatedSeverSide = json_data[\"last_updated\"];\n lastUpdatedReadableTsSeverSide = json_data[\"last_updated_readable_ts\"];\n unlockedMemesServerSide = json_data[\"unlocked_memes\"];\n //console.log(\"--unlockedMemesServerSide--- \" + JSON.stringify(unlockedMemesServerSide));\n }else{\n lastUpdatedSeverSide = -1;\n lastUpdatedReadableTsSeverSide = -1;\n unlockedMemesServerSide = [];\n //console.log(\"--unlockedMemesServerSide--- \" + JSON.stringify(unlockedMemesServerSide));\n }\n\n var localMemeRecord = JSON.parse(window.localStorage[\"already_shown_memes4\"]);\n var lastUpdatedLocalStorage = localMemeRecord[\"last_updated\"];\n var lastUpdatedReadableTsLocalStorage = localMemeRecord[\"last_updated_readable_ts\"];\n var unlockedMemesLocalStorage = localMemeRecord[\"unlocked_memes\"];\n //console.log(\"--unlockedMemesLocalStorage--- \" + JSON.stringify(unlockedMemesLocalStorage));\n\n\n //Following code creates a union of unlockedMemesServerSide and unlockedMemesLocalStorage\n var unionOfLocalAndServer = {};\n \n \n for(var i=0; i < unlockedMemesServerSide.length; i++)\n unionOfLocalAndServer[unlockedMemesServerSide[i][\"filename\"]] = unlockedMemesServerSide[i];\n for(var i=0; i < unlockedMemesLocalStorage.length; i++)\n unionOfLocalAndServer[unlockedMemesLocalStorage[i][\"filename\"]] = unlockedMemesLocalStorage[i];\n\n //\n var unlockedMemesOrderedByDate = {};\n for(var key in unionOfLocalAndServer)\n unlockedMemesOrderedByDate[unionOfLocalAndServer[key][\"unlock_date\"]] = unionOfLocalAndServer[key];\n \n\n\n //console.log(\"--unlockedMemesOrderedByDate--- \" + JSON.stringify(unlockedMemesOrderedByDate));\n var res = []\n var sortedDates = Object.keys(unlockedMemesOrderedByDate).sort();\n for (var k=0; k < sortedDates.length; k++){\n res.push(unlockedMemesOrderedByDate[sortedDates[k]]);\n }\n //console.log(\"--sortedDates--- \" + JSON.stringify(sortedDates));\n this.list_of_meme_to_display = res.reverse();\n this.unlockedMemeCount = res.length;\n\n\n localMemeRecord[\"unlocked_memes\"] = this.list_of_meme_to_display;\n localMemeRecord[\"last_updated\"] = Date.now();\n localMemeRecord[\"last_updated_readable_ts\"] = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n window.localStorage[\"already_shown_memes4\"] = JSON.stringify(localMemeRecord);\n\n //console.log(\"--localMemeRecord--- \" + JSON.stringify(localMemeRecord));\n //\n this.uploadCurrentlyUnlockedMemeList(localMemeRecord);\n },\n error: error => console.error('There was an error!', error)\n });\n }\n \n\n uploadCurrentlyUnlockedMemeList(already_shown_memes){\n\n /*\n {\n \"user_id\": \"test\",\n \"incentiveString\": \"test\",\n \"whenInserted\": \"test\",\n \"whenInsertedReadableTs\": 1234,\n \"incentiveType\": \"test\"\n }\n */\n\n var username = this.userProfileService.username;\n var currentTimeTs = Date.now();\n var currentTimeReadableTs = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n const headers = { \"Content-Type\": \"application/json;charset=UTF-8\"};\n const body = {\n \"user_id\": username, \n \"whenInserted\": currentTimeTs, \n \"whenInsertedReadableTs\": currentTimeReadableTs,\n \"incentiveType\": \"meme\",\n \"incentiveString\": JSON.stringify(already_shown_memes)\n };\n \n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n this.httpClient.post(flaskServerAPIEndpoint + \"/store-unlocked-incentive\", body)\n .subscribe({\n next: data => console.log(\"--unlocked_meme-- \" + JSON.stringify(data)),\n error: error => console.error('There was an error!', error)\n });\n }\n\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n\\n.video-responsive{\\n overflow:hidden;\\n padding-bottom:56.25%;\\n position:relative;\\n height:650px;\\n}\\n\\n.video-responsive iframe{\\n left:0;\\n top:0;\\n height:100%;\\n width:100%;\\n position:absolute;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW5jZW50aXZlL3ZpZGVvLWluZm8tcGFnZS92aWRlby1pbmZvLXBhZ2UuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6Qjs7QUFFQTtJQUNJLGVBQWU7SUFDZixxQkFBcUI7SUFDckIsaUJBQWlCO0lBQ2pCLFlBQVk7QUFDaEI7O0FBQ0E7SUFDSSxNQUFNO0lBQ04sS0FBSztJQUNMLFdBQVc7SUFDWCxVQUFVO0lBQ1YsaUJBQWlCO0FBQ3JCIiwiZmlsZSI6InNyYy9hcHAvaW5jZW50aXZlL3ZpZGVvLWluZm8tcGFnZS92aWRlby1pbmZvLXBhZ2UuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59XG5cbi52aWRlby1yZXNwb25zaXZle1xuICAgIG92ZXJmbG93OmhpZGRlbjtcbiAgICBwYWRkaW5nLWJvdHRvbTo1Ni4yNSU7XG4gICAgcG9zaXRpb246cmVsYXRpdmU7XG4gICAgaGVpZ2h0OjY1MHB4O1xufVxuLnZpZGVvLXJlc3BvbnNpdmUgaWZyYW1le1xuICAgIGxlZnQ6MDtcbiAgICB0b3A6MDtcbiAgICBoZWlnaHQ6MTAwJTtcbiAgICB3aWR0aDoxMDAlO1xuICAgIHBvc2l0aW9uOmFic29sdXRlO1xufSJdfQ== */\"","import { Component, OnInit } from '@angular/core';\nimport { MenuController } from '@ionic/angular';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-video-info-page',\n templateUrl: './video-info-page.component.html',\n styleUrls: ['./video-info-page.component.css']\n})\nexport class VideoInfoPageComponent implements OnInit {\n\n constructor(private menuCtrl:MenuController,\n private appUsageDb: DatabaseService) { }\n\n ngOnInit() {\n this.menuCtrl.close();\n }\n\n ionViewDidEnter(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.appUsageDb.saveAppUsageEnter(\"reward_video_info_page\"); \n } \n\n ionViewDidLeave(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.appUsageDb.saveAppUsageExit(\"reward_video_info_page\"); \n }\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaW50ZXJ2ZW50aW9uL2hhcnZhcmQtYXJjLWFwcHMvZnJvbnQtcGFnZS9mcm9udC1wYWdlLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9pbnRlcnZlbnRpb24vaGFydmFyZC1hcmMtYXBwcy9mcm9udC1wYWdlL2Zyb250LXBhZ2UuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport { MenuController, NavController } from '@ionic/angular';\nimport { Router } from '@angular/router';\n\nexport interface ArcApp {\n name: string;\n url: string;\n}\n\nexport interface ArcAppWithImageAndDescriptions {\n name: string;\n url: string;\n img: string;\n description: string;\n}\n\n@Component({\n selector: 'app-front-page',\n templateUrl: './front-page.component.html',\n styleUrls: ['./front-page.component.css']\n})\n\nexport class FrontPageComponent implements OnInit {\n\n TM_apps_thumbs: ArcAppWithImageAndDescriptions[] = [\n {\n name: \"Tomato Timer\",\n url: \"https://tomato-timer.com/\",\n img: \"./assets/img/arcapps/tomatoapp.png\",\n description: \"Tomato timer chunks larger-works into a set of intervals separated by short breaks.\"\n },\n\n {\n name: \"Forest\",\n url: \"https://www.forestapp.cc/\",\n img: \"./assets/img/arcapps/forestapp.png\",\n description: \"Forest is an app that helps you stay focused on the important things in life.\"\n },\n\n {\n name: \"Focus\",\n url: \"https://heyfocus.com/\",\n img: \"./assets/img/arcapps/focusapp.png\",\n description: \"Focus is a distraction blocker that helps you improve your productivity.\"\n },\n\n {\n name: \"MyStudyLife\",\n url: \"https://www.mystudylife.com/\",\n img: \"./assets/img/arcapps/mystudylifeapp.png\",\n description: \"MyStudyLife is a cross-platform planner that stores classes, homework, and exams in the cloud.\"\n },\n\n {\n name: \"Week Plan\",\n url: \"https://weekplan.net/\",\n img: \"./assets/img/arcapps/weekplanapp.png\",\n description: \"Week Plan is a priority planner for highly effective people.\"\n },\n\n {\n name: \"SelfControl\",\n url: \"https://selfcontrolapp.com/\",\n img: \"./assets/img/arcapps/selfcontrolapp.png\",\n description: \"SelfControl is a free Mac application to help you avoid distracting websites.\"\n },\n\n {\n name: \"Freedom\",\n url: \"https://freedom.to/\",\n img: \"./assets/img/arcapps/freedomapp.jpg\",\n description: \"Freedom is an app and website blocker used by over 1,000,000 people to reclaim focus and productivity.\"\n },\n\n {\n name: \"StayFocusd\",\n url: \"https://chrome.google.com/webstore/detail/stayfocusd/laankejkbhbdhmipfmgcngdelahlfoji?hl=en\",\n img: \"./assets/img/arcapps/stayfocusdapp.png\",\n description: \"StayFocusd is a productivity extension for Google Chrome that restricts the amount of time you can spend on time-wasting websites.\"\n },\n\n {\n name: \"Cold Turkey\",\n url: \"https://getcoldturkey.com/\",\n img: \"./assets/img/arcapps/coldturkeyapp.png\",\n description: \"Cold Turkey is a free website blocker designed for studying or focusing on work.\"\n },\n\n ];\n\n TM_apps: ArcApp[] = [\n { name: \"Tomato Timer\", url: \"https://tomato-timer.com/\" },\n { name: \"Forest\", url: \"https://www.forestapp.cc/\" },\n { name: \"Focus\", url: \"https://heyfocus.com/\" },\n { name: \"mystudylife\", url: \"https://tomato-timer.com/\" },\n { name: \"weekplan\", url: \"https://tomato-timer.com/\" },\n ];\n\n Internet_Blocking_Tools: ArcApp[] = [\n { name: \"SelfControlapp\", url: \"https://selfcontrolapp.com/\" },\n { name: \"Freedom\", url: \"https://tomato-timer.com/\" },\n { name: \"Stayfocusd\", url: \"https://tomato-timer.com/\" },\n { name: \"getcoldturckey\", url: \"https://tomato-timer.com/\" },\n ];\n\n Task_Management: ArcApp[] = [\n { name: \"Asana: Organize Tasks and Work\", url: \"https://selfcontrolapp.com/\" },\n { name: \"Trello\", url: \"https://tomato-timer.com/\" },\n { name: \"Wunderlist\", url: \"https://tomato-timer.com/\" },\n { name: \"Google Calendar\", url: \"https://tomato-timer.com/\" },\n { name: \"Toodledo\", url: \"https://tomato-timer.com/\" },\n ];\n\n constructor(private router: Router,\n public navController: NavController,\n private menuCtrl: MenuController) { }\n\n ngOnInit() {\n this.menuCtrl.close();\n }\n\n goHome() {\n this.navController.navigateRoot(['home']);\n }\n\n //\"window.open('http://example.com/login/{{user._id}}', '_system', 'location=yes'); return false;\"\n visitTheURL(url){\n console.log(\"visitTheURL\");\n window.open(url, '_system', 'location=yes'); \n return false;\n }\n}\n","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FrontPageComponent } from './front-page/front-page.component';\n\n\n\n@NgModule({\n declarations: [FrontPageComponent],\n imports: [\n CommonModule\n ],\n exports: [FrontPageComponent],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class HarvardArcAppsModule { }\n","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HarvardArcAppsModule } from './harvard-arc-apps/harvard-arc-apps.module';\n\n\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n HarvardArcAppsModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class InterventionModule { }\n","/* Installation:\n\nionic install @ionic-native/sqlite @ionic-native/sqlite-porter\nionic cordova plugin add cordova-sqlite-storage\nionic cordova plugin add uk.co.workingedge.cordova.plugin.sqliteporter\n\nFollow reference: https://devdactic.com/ionic-4-sqlite-queries/\n*/\n\nimport { Platform } from '@ionic/angular';\nimport { Injectable } from '@angular/core';\nimport { SQLitePorter } from '@ionic-native/sqlite-porter/ngx';\nimport { HttpClient } from '@angular/common/http';\nimport { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport * as moment from 'moment';\nimport { UserProfileService } from '../user/user-profile/user-profile.service';\n\nexport interface TrackObj {\n id: number,\n pageName: string,\n eventTime: Date,\n eventDate: string,\n unix_ts: number, \n day_count: number,\n eventStatus: string,\n username: string\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DatabaseService {\n private database: SQLiteObject;\n private dbReady: BehaviorSubject = new BehaviorSubject(false);\n \n tracks = new BehaviorSubject([]);\n\n constructor(\n private plt: Platform, \n private sqlitePorter: SQLitePorter, \n private sqlite: SQLite, \n private userProfileService: UserProfileService,\n private http: HttpClient) { \n this.plt.ready().then(() => {\n this.sqlite.create({\n name: 'tracks.db',\n location: 'default'\n }).then((db: SQLiteObject) => {\n this.database = db;\n //this.dropTable();\n //console.log(\"table deleted!\");\n this.createDatabase();\n }); \n }); \n }\n\n createDatabase() {\n console.log(\"start seedDatabase!\");\n return this.http.get('assets/track.sql', { responseType: 'text' })\n .subscribe(sql => {\n this.sqlitePorter.importSqlToDb(this.database, sql)\n .then(_ => {\n console.log('Before displayTracks');\n this.displayTracks();\n console.log('Tracks displayed');\n this.dbReady.next(true);\n })\n .catch(e => console.error(\"In seedDatabase:\" + e));\n });\n } \n\n getDatabaseState() {\n return this.dbReady.asObservable();\n }\n \n getTracks(): Observable {\n return this.tracks.asObservable();\n } \n\n dropTable(){\n return this.database.executeSql('DROP TABLE IF EXISTS tracks').then(data => {\n console.log('Table deleted!');\n }).catch(e => {\n console.log(\"dropTable:\"+JSON.stringify(e));\n //this.isTableExist();\n }); \n }\n\n emptyTable(){\n return this.database.executeSql('DELETE FROM tracks').then(data => {\n console.log('Table emptied!');\n }).catch(e => {\n console.log(\"deleteTable:\"+JSON.stringify(e));\n }); \n }\n\n \n isTableExist() : Promise {\n console.log(\"Inside isTableEmpty:\");\n //return this.database.executeSql('SELECT * FROM tracks', []).then(data => {\n return this.database.executeSql(\"SELECT * FROM sqlite_master WHERE name ='tracks' and type='table'\", []).then(data => {\n var rowlength = data.rows.length;\n console.log(\"isTableEmpty rowlength= \"+rowlength);\n return rowlength != 0;\n }).catch(e => {\n console.log(\"At isTableNotEmpty:\"+JSON.stringify(e));\n return false;\n });\n }\n\n isTableEmpty() : Promise {\n console.log(\"Inside isTableEmpty:\");\n return this.database.executeSql('SELECT * FROM tracks', []).then(data => {\n var rowlength = data.rows.length;\n console.log(\"isTableEmpty rowlength= \"+rowlength);\n return rowlength == 0;\n }).catch(e => {\n console.log(\"At isTableNotEmpty:\"+JSON.stringify(e));\n return true;\n });\n }\n\n saveAppUsageEnter(pageName){\n this.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n var day_count = Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length; \n this.addTrack(pageName, \"Enter\", this.userProfileService.username, day_count); \n }\n }); \n }\n\n saveAppUsageExit(pageName){\n this.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n var day_count = Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length; \n this.addTrack(pageName, \"Exit\", this.userProfileService.username, day_count); \n }\n }); \n }\n\n\n //save usage\n /*\n saveAppUsage(pageName, eventStatus, username, day_count){\n this.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.addTrack(pageName, eventStatus, username, day_count); \n }\n }); \n }\n */\n \n addTrack(pageName, eventStatus, username, day_count) {\n var currentTime = moment().format('MMMM Do YYYY, h:mm:ss a Z');\n var currentDate = moment().format('YYYYMMDD');\n var unix_ts = new Date().getTime();\n let data = [pageName, currentTime, currentDate, unix_ts, day_count, eventStatus, username];\n return this.database.executeSql('INSERT INTO tracks (pageName, eventTime, eventDate, unix_ts, day_count, eventStatus, username) VALUES (?, ?, ?, ?, ?, ?, ?)', data).then(data => {\n console.log('App usage added!! ' + pageName + \", \" + eventStatus);\n //this.displayTracks();\n }).catch(e => console.log(\"In addTrack:\"+pageName+\" \"+JSON.stringify(e)));\n\n } \n \n displayTracks() {\n //let query = 'SELECT product.name, product.id, developer.name AS creator FROM product JOIN developer ON developer.id = product.creatorId';\n return this.database.executeSql('SELECT * FROM tracks', []).then(data => {\n let currentTracks: TrackObj[] = [];\n var rowlength = data.rows.length;\n console.log(\"data.rows= \"+rowlength);\n if (rowlength > 0) {\n for (var i = 0; i < rowlength; i++) {\n console.log(\"data.rows= \"+rowlength);\n console.log(\"displayTracks \"+i+\" pageName: \"+ data.rows.item(i).pageName + \", eventTime \" + data.rows.item(i).eventStatus);\n //console.log(\"displayTracks \"+i+\" time: \"+data.rows.item(i).eventTime);\n currentTracks.push({ \n id: data.rows.item(i).id,\n pageName: data.rows.item(i).pageName,\n eventTime: data.rows.item(i).eventTime,\n eventDate: data.rows.item(i).eventDate,\n unix_ts: data.rows.item(i).unix_ts,\n day_count: data.rows.item(i).day_count,\n eventStatus: data.rows.item(i).eventStatus,\n username: data.rows.item(i).username,\n });\n }\n //console.log(\"currentTracks length: \"+currentTracks.length);\n }\n //this.tracks.next(currentTracks); announce new value to all subscribers\n }).catch(e => console.log(\"In displayTracks:\"+e));\n }\n \n exportDatabaseToJson() : Promise { \n return this.sqlitePorter.exportDbToJson(this.database).then(res => {\n //console.log('Exported '+JSON.stringify(res));\n return res;\n }).catch(e => console.error(e));\n\n }\n\n}","/*\n\nInstall following, then this module shall work.\nionic cordova plugin add onesignal-cordova-plugin\nnpm install @ionic-native/onesignal\n\nThis module can handle notificationReceive/Open when app is not killed.\notherwise:\n\nImplement in android/ios platform if need to receive notification\nwhen app is killed.\n\nCopy MyNotificationExtenderBareBones.java file to src.io.ionic folder\nadd below to androidmanifest.xml \n\n \n \n \n \n \n\n*/\n\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { OneSignalService } from './one-signal.service';\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule\n ],\n providers: [ OneSignalService ]\n\n})\nexport class NotificationModule { }\n","import { Injectable } from '@angular/core';\nimport { OneSignal } from '@ionic-native/onesignal/ngx';\nimport { AlertController } from '@ionic/angular';\n\nimport * as moment from 'moment';\nimport { environment } from 'src/environments/environment';\nimport { HttpClient } from '@angular/common/http';\nimport { UserProfileService } from '../user/user-profile/user-profile.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OneSignalService {\n time;\n formattedTime;\n\n constructor(\n private oneSignal: OneSignal,\n private alertCtrl: AlertController,\n private http: HttpClient,\n private userProfileService: UserProfileService\n ) { }\n\n\n initOneSignal(){\n //link for one signal tutorial ==========> https://devdactic.com/push-notifications-ionic-onesignal/\n \n //this.oneSignal.startInit('YOUR ONESIGNAL APP ID', 'YOUR ANDROID ID');\n console.log(\"--Onesignal-- \" + \"init called\");\n this.oneSignal.startInit(environment.oneSignalAppId, environment.firebaseConfig.messagingSenderId);\n\n this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.None);\n //this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.InAppAlert);\n \n //Sets a notification received handler. Only called if the app is \n //running in the foreground at the time the notification was received.\n this.oneSignal.handleNotificationReceived().subscribe(data => {\n this.time = new Date().getTime();\n this.formattedTime = moment().format('MMMM Do YYYY, h:mm:ss a Z');\n console.log(\"notification is received at: \"+this.time+\" formatted: \"+this.formattedTime);\n\n let title = data.payload.title;\n let msg = data.payload.body;\n //let additionalData = data.payload.additionalData;\n //this.showAlert(title, msg, additionalData.task);\n //this.showAlert(title+\" \"+msg, \"notification is received at: \"+this.time+\" formatted: \"+this.formattedTime);\n\n });\n \n \n //Sets a notification opened handler. The instance will be called when \n //a notification is tapped on from the notification shade (ANDROID) or \n //notification center (iOS), or when closing an Alert notification shown in the app \n //(if InAppAlert is enabled in inFocusDisplaying, below).\n\n this.oneSignal.handleNotificationOpened().subscribe(data => {\n // do something when a notification is opened\n this.time = new Date().getTime();\n this.formattedTime = moment().format('MMMM Do YYYY, h:mm:ss a Z');\n console.log(\"notification is opened at: \"+this.time+\" formatted: \"+this.formattedTime);\n let additionalData = data.notification.payload.additionalData;\n //this.showAlert('Notification opened', 'You already read this before', additionalData.task); \n //this.showAlert('Notification opened', \"notification is opened at: \"+this.time+\" formatted: \"+this.formattedTime);\n });\n\n\n //--- clearOneSignalNotifications\n //--- https://documentation.onesignal.com/docs/cordova-sdk\n \n this.oneSignal.endInit(); \n \n this.oneSignal.getPermissionSubscriptionState().then(status=>{\n console.log(\"--Onesignal-- \" + JSON.stringify(status));\n window.localStorage.setItem(\"oneSignalPlayerId\", \"\"+status.subscriptionStatus.userId); \n /*\n this.userProfileService.userProfile.oneSignalPlayerId = status.subscriptionStatus.userId;\n this.userProfileService.saveProfileToDevice();\n this.userProfileService.saveToServer();\n */\n }); \n }\n\n async showAlert(title, msg) {\n const alert = await this.alertCtrl.create({\n header: title,\n subHeader: msg,\n buttons: [\n 'OK'\n /* {\n text: `Action: ${task}`,\n handler: () => {\n // E.g: Navigate to a specific screen\n }\n } */\n ]\n })\n alert.present();\n } \n}\n","import {\n ActionReducer,\n ActionReducerMap,\n createFeatureSelector,\n createSelector,\n MetaReducer\n} from '@ngrx/store';\nimport { environment } from '../../environments/environment';\n\n\n//this is the overall state.\nexport interface AppState {\n\n}\n\nexport const reducers: ActionReducerMap = {\n \n};\n\n\nexport const metaReducers: MetaReducer[] = !environment.production ? [] : [];\n","//\n//--- The goal of this file is to serve as base class for all storeage classes,\n// for example, store to firebase, azure, aws s3. All common functions used \n// to them will be added here in the future,\n\nimport { Injectable } from '@angular/core';\nimport { environment } from '../../environments/environment';\nimport { StoreBaseService } from './storage-base.service';\nimport { EncrDecrService } from './encrdecrservice.service';\nimport { NetworkService, ConnectionStatus } from './network.service';\n\nimport * as AWS from 'aws-sdk';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AwsS3Service extends StoreBaseService {\n currentFile: File;\n bucketName;\n s3;\n subfolder;\n\n constructor(\n private networkSvc: NetworkService,\n private EncrDecr: EncrDecrService) { \n super();\n }\n\n upload(subfolder, result){\n this.bucketName = environment.awsConfig.bucketName;\n var bucketRegion = environment.awsConfig.bucketRegion;\n var IdentityPoolId = environment.awsConfig.IdentityPoolId;\n //var accessKeyId = environment.awsConfig.accessKeyId;\n //var secretAccessKey = environment.awsConfig.secretAccessKey;\n\n //set properties after creating AWS.Config using the update method\n AWS.config.update({\n region: bucketRegion,\n credentials: new AWS.CognitoIdentityCredentials({\n IdentityPoolId: IdentityPoolId\n })\n });\n \n //creates a new Amazon S3 service object\n this.s3 = new AWS.S3({\n apiVersion: '2006-03-01',\n params: {Bucket: this.bucketName}\n }); \n\n /*const myS3Credentials = {\n accessKeyId: accessKeyId,\n secretAcccessKey: secretAccessKey,\n };\n \n var s3 = new AWS.S3({\n apiVersion: '2006-03-01',\n params: {Bucket: bucketName},\n accessKeyId: accessKeyId,\n secretAccessKey: secretAccessKey\n }); */\n\n //create a file from result passed as a JSONObject\n var fileName = \"result_\" + (new Date().getTime()) + \"_\" + this.EncrDecr.getSHA256(localStorage.getItem('loggedInUser')) + \".json\";\n this.currentFile = new File([JSON.stringify(result)], fileName, {type: \"text/plain\"});\n //upload currentFile to the subfolder in S3 bucket\n this.STORAGE_REQ_KEY = subfolder+\"_result\";\n this.subfolder = subfolder;\n\n // Upload data and data saved in local Storage to AWS when online, save data\n // to local storage when offline.\n if(this.networkSvc.getCurrentNetworkStatus() == ConnectionStatus.Online){\n if(window.localStorage.getItem(this.STORAGE_REQ_KEY) != undefined ) \n this.uploadLocalData();\n\n this.uploadToS3(subfolder+\"/\"+fileName, result).catch(err => {\n if (err ) {\n console.log('Caught thrown error: '+err.message);\n this.storeResultLocally(result); \n }\n });\n \n } else {\n this.storeResultLocally(result);\n }\n }\n\n async uploadToS3(key, result) {\n this.s3.upload({\n Bucket: this.bucketName,\n Key: key,\n Body: JSON.stringify(result) \n //Body: this.currentFile\n }, function(err, data) {\n if (err) {\n console.log('There was an error uploading your file: '+err.message);\n throw new Error(err.message);\n } \n });\n\n }\n\n // upload data in local storage to AWS and clear local Data, if failed, save\n // data in local storage.\n uploadLocalData() { \n var storedObj = this.getLocalData();\n this.clearLocalData();\n if (storedObj.length > 0) {\n for (let op of storedObj) {\n console.log(JSON.stringify(op));\n var fileName = \"result_\" + (new Date().getTime()) + \"_\" + this.EncrDecr.getSHA256(localStorage.getItem('loggedInUser')) + \".json\";\n this.uploadToS3(this.subfolder+\"/\"+fileName, [op.data]).catch(err => {\n if (err ) {\n console.log('Caught thrown error: '+err.message);\n this.saveJsonObjLocally(op); \n }\n console.log('In uploadLocalData: update file successfully');\n }); \n } \n } \n }\n\n}\n","import { Injectable } from '@angular/core';\nimport * as CryptoJS from 'crypto-js';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EncrDecrService {\n constructor() { }\n \n //The set method is use for encrypt the value.\n set(keys, value){\n var key = CryptoJS.enc.Utf8.parse(keys);\n var iv = CryptoJS.enc.Utf8.parse(keys);\n var encrypted = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(value.toString()), key,\n {\n keySize: 128 / 8,\n iv: iv,\n mode: CryptoJS.mode.CBC,\n padding: CryptoJS.pad.Pkcs7\n });\n\n return encrypted.toString();\n }\n\n //The get method is use for decrypt the value.\n get(keys, value){\n var key = CryptoJS.enc.Utf8.parse(keys);\n var iv = CryptoJS.enc.Utf8.parse(keys);\n var decrypted = CryptoJS.AES.decrypt(value, key, {\n keySize: 128 / 8,\n iv: iv,\n mode: CryptoJS.mode.CBC,\n padding: CryptoJS.pad.Pkcs7\n });\n\n return decrypted.toString(CryptoJS.enc.Utf8);\n }\n\n\n encrypt(msg, pass) {\n\n // Code goes here\n var keySize = 256;\n var ivSize = 128;\n var iterations = 100;\n\n //var message = \"Hello World\";\n //var password = \"Secret Password\";\n var salt = CryptoJS.lib.WordArray.random(128 / 8);\n\n var key = CryptoJS.PBKDF2(pass, salt, {\n keySize: keySize / 32,\n iterations: iterations\n });\n\n var iv = CryptoJS.lib.WordArray.random(128 / 8);\n\n var encrypted = CryptoJS.AES.encrypt(msg, key, {\n iv: iv,\n padding: CryptoJS.pad.Pkcs7,\n mode: CryptoJS.mode.CBC\n\n });\n\n // salt, iv will be hex 32 in length\n // append them to the ciphertext for use in decryption\n var transitmessage = salt.toString() + iv.toString() + encrypted.toString();\n return transitmessage;\n }\n\n decrypt(transitmessage, pass) {\n\n // Code goes here\n var keySize = 256;\n var ivSize = 128;\n var iterations = 100;\n\n var salt = CryptoJS.enc.Hex.parse(transitmessage.substr(0, 32));\n var iv = CryptoJS.enc.Hex.parse(transitmessage.substr(32, 32))\n var encrypted = transitmessage.substring(64);\n\n var key = CryptoJS.PBKDF2(pass, salt, {\n keySize: keySize / 32,\n iterations: iterations\n });\n\n var decrypted = CryptoJS.AES.decrypt(encrypted, key, {\n iv: iv,\n padding: CryptoJS.pad.Pkcs7,\n mode: CryptoJS.mode.CBC\n });\n return decrypted.toString(CryptoJS.enc.Utf8);\n }\n\n getSHA256(inputStr){\n return CryptoJS.SHA256(inputStr);\n }\n\n\n}\n\n","import { Injectable } from '@angular/core';\nimport { Network } from '@ionic-native/network/ngx'\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { ToastController, Platform } from '@ionic/angular';\n\nexport enum ConnectionStatus {\n Online,\n Offline\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NetworkService {\n private status: BehaviorSubject = new BehaviorSubject(ConnectionStatus.Offline);\n\n constructor(\n private network: Network, \n private toastController: ToastController, \n private plt: Platform) {\n this.plt.ready().then(() => {\n this.initializeNetworkEvents();\n let status = this.network.type !== 'none' ? ConnectionStatus.Online : ConnectionStatus.Offline;\n this.status.next(status);\n }); \n }\n\n public initializeNetworkEvents() {\n \n this.network.onDisconnect().subscribe(() => {\n if (this.status.getValue() === ConnectionStatus.Online) {\n console.log('WE ARE OFFLINE');\n this.updateNetworkStatus(ConnectionStatus.Offline);\n }\n });\n \n this.network.onConnect().subscribe(() => {\n if (this.status.getValue() === ConnectionStatus.Offline) {\n console.log('WE ARE ONLINE');\n this.updateNetworkStatus(ConnectionStatus.Online);\n }\n });\n }\n\n private async updateNetworkStatus(status: ConnectionStatus) {\n this.status.next(status);\n \n let connection = status == ConnectionStatus.Offline ? 'Offline' : 'Online';\n let toast = this.toastController.create({\n message: `You are now ${connection}`,\n duration: 3000,\n position: 'bottom'\n });\n toast.then(toast => toast.present());\n }\n\n public onNetworkChange(): Observable {\n return this.status.asObservable();\n }\n\n public getCurrentNetworkStatus(): ConnectionStatus {\n return this.status.getValue();\n } \n\n}\n","//\n//--- The goal of this file is to serve as base class for all storeage classes,\n// for example, store to firebase, azure, aws s3. All common functions used \n// to them will be added here in the future,\n\nimport { Injectable } from '@angular/core';\nimport * as moment from 'moment';\n\ninterface StoreObj {\n date: string,\n data: any\n}\n\n@Injectable({\n providedIn: 'root'\n})\n\nexport class StoreBaseService {\n protected STORAGE_REQ_KEY;\n\n constructor() { \n }\n\n protected storeResultLocally(surveyResult) {\n let obj: StoreObj = {\n date: moment().format('YYYYMMDD'),\n data: surveyResult\n };\n \n console.log(\"Before saveJsonObjLocally: \"+this.STORAGE_REQ_KEY);\n if(window.localStorage.getItem(this.STORAGE_REQ_KEY) == undefined ) {\n var storedObj = [obj];\n window.localStorage.setItem(this.STORAGE_REQ_KEY, JSON.stringify(storedObj));\n } else {\n this.saveJsonObjLocally(obj);\n }\n } \n \n protected saveJsonObjLocally(obj) {\n var storedObj = this.getLocalData(); \n console.log(\"before push survey to local storage: \"+JSON.stringify(storedObj));\n storedObj.push(obj);\n console.log(\"after push survey to loca storage: \"+JSON.stringify(storedObj));\n // Save old & new local transactions back to Storage\n window.localStorage.setItem(this.STORAGE_REQ_KEY, JSON.stringify(storedObj));\n \n } \n \n protected getLocalData(){ \n return JSON.parse(window.localStorage.getItem(this.STORAGE_REQ_KEY));\n }\n\n protected clearLocalData(){\n window.localStorage.removeItem(this.STORAGE_REQ_KEY);\n } \n}\n\n ","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { StoreToFirebaseService } from './store-to-firebase.service';\n\nimport { AngularFireModule } from '@angular/fire';\nimport { environment } from '../../environments/environment';\nimport { AngularFirestoreModule } from '@angular/fire/firestore';\nimport { EncrDecrService } from './encrdecrservice.service';\nimport { AwsS3Service } from './aws-s3.service';\nimport { Network } from '@ionic-native/network/ngx';\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n AngularFireModule.initializeApp(environment.firebaseConfig),\n AngularFirestoreModule\n ],\n providers: [ StoreToFirebaseService, EncrDecrService, AwsS3Service, Network]\n})\nexport class StorageModule { }\n","//\n//--- The goal of this file is to upload an object to firebase, the configuration\n//--- is at app/environments/environment.ts. At app/storage/storage.module.ts, \n//--- we load the environment configuration and setup our module to use the \n//--- AngularFire package \n\nimport { Injectable } from '@angular/core';\nimport { AngularFirestore } from '@angular/fire/firestore';\nimport { StoreBaseService } from './storage-base.service';\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StoreToFirebaseService extends StoreBaseService {\n\n constructor(\n private afs: AngularFirestore\n ) { \n super();\n }\n\n //upload obj to path in firebase\n addSurvey(path, obj: object){\n console.log(\"Start to addSurvey!\");\n return new Promise((resolve, reject) => {\n this.afs.collection(path).add(obj)\n .then(\n (res) => {\n resolve(res)\n },\n err => reject(err)\n )\n }) \n } \n\n}\n","import * as SurveyActions from './survey.actions';\n\nexport {SurveyActions};","module.exports = \".new-background-color {\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvc3VydmV5L2F5YS1zYW1wbGUtc3VydmV5L2F5YS1zYW1wbGUtc3VydmV5LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9zdXJ2ZXkvYXlhLXNhbXBsZS1zdXJ2ZXkvYXlhLXNhbXBsZS1zdXJ2ZXkuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSxxQkFBQTtBQ0NKIiwiZmlsZSI6InNyYy9hcHAvc3VydmV5L2F5YS1zYW1wbGUtc3VydmV5L2F5YS1zYW1wbGUtc3VydmV5LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport { DatabaseService } from 'src/app/monitor/database.service';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { MobileAccessibility } from '@ionic-native/mobile-accessibility/ngx';\n\n@Component({\n selector: 'app-aya-sample-survey',\n templateUrl: './aya-sample-survey.component.html',\n styleUrls: ['./aya-sample-survey.component.scss'],\n})\nexport class AyaSampleSurveyComponent implements OnInit {\n\n constructor(\n private userProfileService: UserProfileService,\n private mobileAccessibility: MobileAccessibility,\n private appUsageDb: DatabaseService) { }\n\n ngOnInit() {\n this.mobileAccessibility.usePreferredTextZoom(false);\n }\n\n ionViewDidEnter(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.appUsageDb.saveAppUsageEnter(\"aya_survey_page\");\n } \n\n ionViewDidLeave(){\n /*\n console.log(this.pageTitle+\": ionViewDidLeave\");\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.mobileAccessibility.usePreferredTextZoom(true);\n this.appUsageDb.saveAppUsageExit(\"aya_survey_page\");\n \n }\n \n}\n","module.exports = \"\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3N1cnZleS9keW5hbWljLXN1cnZleS9keW5hbWljLXN1cnZleS5jb21wb25lbnQuc2NzcyJ9 */\"","//\n//--- The goal of this file is to dynamically generate a survey from a JSON file. \n//--- Example JSON files are located in assets/survey folder. \n//--- For more details on how to create a survey please see: https://github.com/StatisticalReinforcementLearningLab/SARAv2/tree/master/src/app/survey\n//--- At a high level, this file does the following:\n// (i) reads a JSON file in the \"ngAfterViewInit\" \n// (ii) calls the \"generateSurvey\" function to create html codes for the survey\n// (iii) creates a component dynamically and attached it to the \"vc\" component.\n//\n\nimport { Component, OnInit, ViewChild, ViewContainerRef, NgModule, Compiler, Injector, NgModuleRef, ElementRef, Input, ChangeDetectorRef } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AwsS3Service } from '../../storage/aws-s3.service';\nimport { EncrDecrService } from '../../storage/encrdecrservice.service';\n\nimport { Platform, AlertController } from '@ionic/angular';\nimport { Router, NavigationExtras } from '@angular/router';\nimport * as moment from 'moment';\nimport { AppVersion } from '@ionic-native/app-version/ngx';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { AwardDollarService } from 'src/app/incentive/award-money/award-dollar.service';\nimport { environment } from '../../../environments/environment';\nimport { Store } from '@ngrx/store';\nimport { AppState } from 'src/app/reducers';\nimport { surveyCompleted } from '../survey.actions';\nimport { SurveyTimeline } from '../model/surveyTimeline';\nimport { UnlockedIncentives } from '../../incentive/model/unlocked-incentives';\nimport { surveyCompletedRegisterUnlocked } from 'src/app/incentive/incentive.actions';\nimport { JSONOutput } from 'aws-sdk/clients/s3';\n\n@Component({\n selector: 'app-dynamic-survey',\n templateUrl: './dynamic-survey.component.html',\n styleUrls: ['./dynamic-survey.component.scss']\n})\n\n\nexport class DynamicSurveyComponent implements OnInit {\n\n\n @Input() jsonFileLinkForSurvey: string; //inputs the json file used to generate a survey\n public isLoading = true;\n public loadingComplete = false;\n\n //surveyQuestionsInHTMLString = \"\";\n surveyQuestionsDict = {};\n surveyQuestionsInJSONDictFormat: any;\n versionNumber;\n\n @ViewChild('vc', { read: ViewContainerRef, static: false }) vc: ViewContainerRef;\n\n constructor(private _compiler: Compiler,\n private _injector: Injector,\n private _m: NgModuleRef,\n private awsS3Service: AwsS3Service,\n private EncrDecr: EncrDecrService,\n private router: Router,\n private changeDetector: ChangeDetectorRef,\n private appVersion: AppVersion,\n private alertCtrl: AlertController,\n public plt: Platform,\n private userProfileService: UserProfileService,\n //private lifeInsightsProfileService: LifeInsightsProfileService,\n private store: Store,\n private awardDollarService: AwardDollarService) {\n\n }\n\n ngOnInit() { }\n\n ngAfterViewInit() {\n this.fetchSurveyQuestionsAndGenerateSurvey();\n this.getAppVersionNumber(); // to track which users has the latest version of the app.\n\n //initiate the life-insight object\n //this.lifeInsightsProfileService.importLifeInsightProfile(this.jsonFileLinkForSurvey);\n }\n\n\n fetchSurveyQuestionsAndGenerateSurvey() {\n fetch('../../../assets/data/' + this.jsonFileLinkForSurvey + '.json').then(async res => {\n let surveyQuestionsInJSONDictFormat = await res.json();\n let surveyQuestionsInHTMLString = this.generateHTMLCodeForSurveyFromJSON(surveyQuestionsInJSONDictFormat);\n this.surveyQuestionsInJSONDictFormat = surveyQuestionsInJSONDictFormat;\n this.generateDynamicSurveyComponentFromHTML(surveyQuestionsInHTMLString);\n });\n }\n\n\n generateHTMLCodeForSurveyFromJSON(surveyQuestionsInJSONDictFormat: any): string {\n // This function takes the JSON object with questions\n // and generate HTML codes for the survey. \n // The HTML code is later used in a dynamically generated component to \n // show it to the user.\n this.surveyQuestionsDict = {};\n let surveyQuestionsInHTMLString: string;\n\n //questions JSON format are a list. This loop goes through each questions and adds it to the HTML string\n for (var i = 0; i < surveyQuestionsInJSONDictFormat.length; i++) {\n var singleSurveyQuestionObj = surveyQuestionsInJSONDictFormat[i];\n this.surveyQuestionsDict[singleSurveyQuestionObj.name] = \"\";\n\n //the following line crates a html string for the survey.\n surveyQuestionsInHTMLString = this.process_survey(singleSurveyQuestionObj, surveyQuestionsInHTMLString, singleSurveyQuestionObj.name);\n }\n\n // the final step to create HTML from JSON file. It adds a submit button right at the end.\n surveyQuestionsInHTMLString = surveyQuestionsInHTMLString + '
';\n\n return surveyQuestionsInHTMLString;\n }\n\n\n generateDynamicSurveyComponentFromHTML(surveyQuestionsInHTMLString: string) {\n\n //---\n //--- Generate a survey component dynamically from the \"surveyQuestionsInHTMLString.\"\n //--- The \"surveyQuestionsInHTMLString\" contains all the HTML for the template for dynamic component\n //--- \n const surveyComponent = Component({ template: surveyQuestionsInHTMLString })(class implements OnInit {\n\n //IMPORTANT: contains all the questions in the \n surveyAnswersJSONObject = {};\n\n\n isQuestionIncomplete = {};\n fileLink: string | string[];\n versionNumber: string;\n lifeInsightObj = {};\n //storeToFirebaseService: StoreToFirebaseService;\n\n EncrDecr: EncrDecrService;\n awsS3Service: AwsS3Service;\n totalPoints = 0;\n plt: Platform;\n router: Router;\n userProfileService: UserProfileService;\n awardDollarService: AwardDollarService;\n surveyQuestionsInJSONDictFormat = [];\n alertCtrl;\n store: Store;\n\n constructor() {\n }\n\n ngOnInit() {\n this.initializeSurveyAnswersJSONObject();\n }\n\n \n\n initializeSurveyAnswersJSONObject() {\n\n //set start time when participants started the survey.\n this.surveyAnswersJSONObject['surveyStartTimeUTC'] = new Date().getTime();\n\n //isQuestionIncomplete list tracks if questions are answered or not.\n for (var i = 0; i < this.surveyQuestionsInJSONDictFormat.length; i++)\n this.isQuestionIncomplete[this.surveyQuestionsInJSONDictFormat[i].name] = { \"tag\": this.surveyQuestionsInJSONDictFormat[i].tag };\n\n //initialize when different survey questions are clicked\n this.surveyAnswersJSONObject['onclickTimeForDifferentQuestions'] = {};\n\n }\n\n\n inputchanged(question) {\n //This function tracks if users clicked on a survey question and reacts. \n console.log(\"Clicked on question: \" + question);\n\n //store in the answer object when `question` has been clicked.\n this.surveyAnswersJSONObject['onclickTimeForDifferentQuestions'][question] = {};\n this.surveyAnswersJSONObject['onclickTimeForDifferentQuestions'][question].ts = Date.now();\n this.surveyAnswersJSONObject['onclickTimeForDifferentQuestions'][question].readable_ts = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n\n delete this.isQuestionIncomplete[question]; //remove the key from isQuestionIncomplete\n }\n\n inputchangedRangeTime(question, startTime){\n \n //--- console.log('holla: ' + question+\" \"+JSON.stringify($event.detail));\n\n //\n startTime = startTime.replace(\"
\", \" \");\n var startTimeSplit = startTime.split(\" \");\n var startTimeHour = parseInt(startTimeSplit[0]);\n var amPmPart = startTimeSplit[1];\n if(amPmPart == 'PM')\n startTimeHour = startTimeHour + 12;\n\n\n //console.log(\"Clicked on question: \" + question);\n //console.log(\"Time: \" + startTime + \", startTimeHour: \" + startTimeHour);\n\n\n var changedHourAfterInput;\n var changedMinuteAfterInput;\n var changedAMPMAfterInput;\n if((this.surveyAnswersJSONObject[question]*10)%10 == 5){\n changedHourAfterInput = startTimeHour + this.surveyAnswersJSONObject[question] - 0.5;\n changedMinuteAfterInput = \"30\";\n }else{\n changedHourAfterInput = startTimeHour + this.surveyAnswersJSONObject[question];\n changedMinuteAfterInput = \"00\";\n }\n\n changedHourAfterInput = changedHourAfterInput%24; //if goes above 24 then change to zero.\n\n if(changedHourAfterInput == 0){\n changedHourAfterInput = 12;\n changedAMPMAfterInput = \"AM\";\n }else if(changedHourAfterInput>0 && changedHourAfterInput<12)\n changedAMPMAfterInput = \"AM\";\n else if(changedHourAfterInput == 12){\n changedAMPMAfterInput = \"PM\";\n changedHourAfterInput = 12;\n }else{\n changedAMPMAfterInput = \"PM\";\n changedHourAfterInput = changedHourAfterInput - 12;\n }\n this.surveyAnswersJSONObject[question + \"_modified\"] = \"\" + changedHourAfterInput + \":\" + changedMinuteAfterInput + \" \" + changedAMPMAfterInput;\n \n /*\n //\n //\n if(this.surveyAnswersJSONObject[question] < 4){\n if((this.surveyAnswersJSONObject[question]*10)%10 == 5)\n this.surveyAnswersJSONObject[question + \"_modified\"] = \"\" + (8 + this.surveyAnswersJSONObject[question] - 0.5) + \":30 PM\";\n else\n this.surveyAnswersJSONObject[question + \"_modified\"] = \"\" + (8 + this.surveyAnswersJSONObject[question]) + \":00 PM\";\n }else if((this.surveyAnswersJSONObject[question]>=4) || (this.surveyAnswersJSONObject[question]<5)){\n if((this.surveyAnswersJSONObject[question]*10)%10 == 5)\n this.surveyAnswersJSONObject[question + \"_modified\"] = \"12:30 AM\";\n else\n this.surveyAnswersJSONObject[question + \"_modified\"] = \"12:00 AM\";\n }else{\n if((this.surveyAnswersJSONObject[question]*10)%10 == 5)\n this.surveyAnswersJSONObject[question + \"_modified\"] = \"\" + (8 + this.surveyAnswersJSONObject[question] - 0.5 - 12) + \":30 AM\";\n else\n this.surveyAnswersJSONObject[question + \"_modified\"] = \"\" + (8 + this.surveyAnswersJSONObject[question] - 12) + \":00 AM\";\n }\n //console.log(JSON.stringify(this.surveyAnswersJSONObject));\n */\n \n this.inputchanged(question);\n }\n\n inputChangedForCheckBox(question, item, $event) {\n //console.log('holla: ' + question+\" \"+JSON.stringify($event.detail));\n this.surveyAnswersJSONObject[item] = $event.detail.checked;\n //console.log(JSON.stringify(this.surveyAnswersJSONObject));\n\n //this.processExtraCondition(question);\n }\n\n inputChangedWithEvent(question, $event) {\n //console.log(\"Qs:\" + questions + \", ts:\" + Date.now() + \", readable_time:\" + moment().format(\"MMMM Do YYYY, h:mm:ss a\"));\n console.log('holla: ' + question + \" \" + JSON.stringify($event.detail));\n this.surveyAnswersJSONObject[question] = $event.detail.value;\n console.log(JSON.stringify(this.surveyAnswersJSONObject));\n //this.processExtraCondition(question);\n }\n\n /*\n processExtraCondition(question) {\n\n console.log(\"processDisplayCondition for \" + question);\n console.log(JSON.stringify(this.dependentQuestionsArray));\n if (this.dependentQuestionsArray[question] != null) {\n for (var j = 0; j < this.dependentQuestionsArray[question].length; j++) {\n var dependentQuestion = this.dependentQuestionsArray[question][j];\n if (this.dependencyExpression != undefined && this.dependencyExpression[dependentQuestion + question] != undefined) {\n console.log(JSON.stringify(this.dependencyExpression));\n this.getDisplayFlagForDependentSurvey(this.dependencyExpression[dependentQuestion + question], dependentQuestion + question);\n }\n\n //handle the case when there is empty space in answer when clicked, for example, \"With someone\"\n if (this.showArrayForEachDependency != undefined && this.showArrayForEachDependency[dependentQuestion + question] != undefined) {\n console.log(JSON.stringify(this.showArrayForEachDependency));\n this.getDisplayFlagForDependentSurveyWithSpaceInShowEntry(this.showArrayForEachDependency[dependentQuestion + question], dependentQuestion + question, question);\n }\n }\n }\n //this.update.next(\"\");\n }\n\n getDisplayFlagForDependentSurvey(conditionExpression, label) {\n console.log(conditionExpression + \" \" + label);\n this.display_flag[label + \"Show\"] = eval(conditionExpression);\n console.log(\"getDisplayFlagForDependentSurvey \" + label + \"Show \" + this.display_flag[label + \"Show\"]);\n }\n\n getDisplayFlagForDependentSurveyWithSpaceInShowEntry(conditionExpression, label, questions) {\n //console.log(\"True \" + ($scope.survey.Q3d==undefined || $scope.survey.Q3d=='0' || $scope.survey.Q3d=='0.5'));\n var sel = this.survey2[questions];\n var dep = conditionExpression;\n //console.log(\"compareSelectionWithDependency \"+questions+\" \"+sel+\" \"+s);\n if (sel != undefined && conditionExpression != undefined) {\n sel = sel.replace(/\\s+/g, \"\");\n dep = conditionExpression.replace(/\\s+/g, \"\");\n }\n this.display_flag[label + \"Show\"] = false;\n if (sel === dep) {\n this.display_flag[label + \"Show\"] = true;\n }\n\n console.log(\"getDisplayFlagForDependentSurveyWithSpaceInShowEntry \" + name + \" for \" + questions + \" \" + this.display_flag[label + \"Show\"]);\n\n }\n */\n\n submitSurvey() {\n\n // This function is called when user presses the \"Submit button\"\n // We first check if participant completed all the questions. If they do submit the survey.\n // If participant did not complete all the survey then show a prompt which questions they forgot to complete.\n\n if (this.isEmpty(this.isQuestionIncomplete)) //--- means all questions has been completed\n this.storeData();\n else { //--- means all questions has been completed\n var incompleteQuestions = \"\";\n for (var incompleteQuestion in this.isQuestionIncomplete)\n incompleteQuestions = incompleteQuestions + \" \" + this.isQuestionIncomplete[incompleteQuestion][\"tag\"] + \",\";\n\n incompleteQuestions = incompleteQuestions.substring(0, incompleteQuestions.length - 1);\n this.presentAlertForIncompleteQuestions(\"You haven't completed questions:\" + incompleteQuestions);\n }\n }\n\n\n async presentAlertForIncompleteQuestions(alertMessage: string) {\n const alert = await this.alertCtrl.create({\n header: 'Oops! You missed some questions',\n message: alertMessage,\n buttons: [{ text: 'OK', cssClass: 'secondary' }]\n });\n await alert.present();\n }\n\n isEmpty(obj: {}) {\n return JSON.stringify(obj) === JSON.stringify({});\n }\n\n\n storeData() {\n\n //--- add meta information to the survey, which could be interesting for data science\n this.addMetaTagsToSurvey();\n\n //--- encrypt the survey and upload it to S3.\n this.enycryptSurveyDataAndUploadToS3();\n\n //-- store survey completed into ngrx to send to server and any other listener.\n this.storeToNgrxAndUpdateState();\n\n //start giving all the incentives from here\n this.provideIncentives();\n }\n\n addMetaTagsToSurvey() {\n var surveyEndTime = new Date().getTime();\n this.surveyAnswersJSONObject['endtimeUTC'] = surveyEndTime;\n var readableSurveyEndTime = moment().format('MMMM Do YYYY, h:mm:ss a Z');\n this.surveyAnswersJSONObject['ts'] = readableSurveyEndTime;\n this.surveyAnswersJSONObject['userName'] = this.userProfileService.username;\n this.surveyAnswersJSONObject['devicInfo'] = this.plt.platforms(); //Type of device; iOS or Android\n this.surveyAnswersJSONObject['appVersion'] = this.versionNumber;\n this.surveyAnswersJSONObject['surveyName'] = this.fileLink;\n }\n\n enycryptSurveyDataAndUploadToS3() {\n var encrypted = this.EncrDecr.encrypt(JSON.stringify(this.surveyAnswersJSONObject), environment.encyptString);\n var surveyEncrypted = {};\n surveyEncrypted['encrypted'] = encrypted;\n this.surveyAnswersJSONObject['encrypted'] = encrypted;\n this.awsS3Service.upload(this.fileLink, surveyEncrypted);\n }\n\n storeToNgrxAndUpdateState() {\n\n //update survey timeline in ngrx store.\n let surveyTimeline: SurveyTimeline = {\n user_id: this.userProfileService.username,\n timeline: [{ dateOfCompletion: moment().format('YYYYMMDD'), timestamp: new Date().getTime(), readableTimestamp: moment().format('MMMM Do YYYY, h:mm:ss a Z') }]\n };\n this.store.dispatch(surveyCompleted({ surveyTimeline }));\n }\n\n\n provideIncentives() {\n\n // incremenet point. Points automatically update the aquarium.\n this.awardANdUpdatePoints();\n\n\n //compute new money and store it in local storage.\n let { pastTotalDollars, awardedTotalDollarAfterCurrentSurvey } = this.awardAndUpdateMoney();\n\n // ToDo: change this. Dan is saving user profile here to save the money to server.\n this.userProfileService.surveyCompleted();\n\n\n //TODO: needs to add fix from Liying.\n this.lifeInsightCodesUnfinished();\n\n\n\n //navigate to award-memes/award-altruism with equal probability after submit survey\n var currentProb = Math.random();\n window.localStorage.setItem(\"Prob\", \"\" + currentProb);\n var currentDate = moment().format('YYYYMMDD');\n let navigationExtras: NavigationExtras = {\n state: {\n date: currentDate,\n prob: currentProb\n }\n };\n\n //prepare reinforcement data to upload to AWS S3\n var reinforcement_data = {};\n reinforcement_data['userName'] = this.userProfileService.username;\n reinforcement_data['appVersion'] = this.versionNumber;\n reinforcement_data['Prob'] = currentProb;\n reinforcement_data['day_count'] = Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length;\n reinforcement_data['isRandomized'] = 1;//what is this one??\n reinforcement_data['unix_ts'] = new Date().getTime();\n reinforcement_data['readable_ts'] = moment().format('MMMM Do YYYY, h:mm:ss a Z');\n reinforcement_data['date'] = currentDate;\n\n\n //add for the modal object\n var modalObjectNavigationExtras = {};\n modalObjectNavigationExtras[\"LastSurveyCompletionDate\"] = moment().format('YYYYMMDD');\n modalObjectNavigationExtras[\"CurrentPoints\"] = this.userProfileService.points;\n modalObjectNavigationExtras[\"PreviousPoints\"] = this.userProfileService.points - 60;\n modalObjectNavigationExtras[\"AwardedDollar\"] = awardedTotalDollarAfterCurrentSurvey - pastTotalDollars;\n modalObjectNavigationExtras[\"IsModalShownYet\"] = false;\n\n\n //currentProb = 0.8;\n if (this.fileLink.includes('caregiver') || currentProb <= 0.4) {\n var reinforcementObj = {};\n reinforcementObj['ds'] = 1;\n reinforcementObj['reward'] = 0;\n reinforcementObj['prob'] = currentProb;\n reinforcement_data['reward'] = \"No push\";\n reinforcement_data['reward_img_link'] = \"\";\n reinforcement_data['Like'] = \"\";\n this.awsS3Service.upload('reinforcement_data', reinforcement_data);\n this.userProfileService.addReinforcementData(currentDate, reinforcementObj);\n navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras;\n this.router.navigate(['home'], navigationExtras);\n } else if ((currentProb > 0.4) && (currentProb <= 0.7)) {\n reinforcement_data['reward'] = \"Meme\";\n navigationExtras['state']['reinforcement_data'] = reinforcement_data;\n navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras;\n this.router.navigate(['incentive/award-memes'], navigationExtras);\n } else if (currentProb > 0.7) {\n reinforcement_data['reward'] = \"Altruistic message\";\n navigationExtras['state']['reinforcement_data'] = reinforcement_data;\n navigationExtras['state']['modalObjectNavigationExtras'] = modalObjectNavigationExtras;\n this.router.navigate(['incentive/award-altruism'], navigationExtras);\n }\n\n\n //update unlocked incentive data in ngrx store.\n //This ngrx store state is used to show unlocked incentives at\n //the start of aquarium reload\n this.updataUnlockedIncentiveInNgrxStore(awardedTotalDollarAfterCurrentSurvey - pastTotalDollars);\n }\n\n awardANdUpdatePoints() {\n //get current points from local storage, update, and store it back.\n //TODO: rather than storage use the Ngrx store to store points and update.\n if (window.localStorage['TotalPoints'] == undefined)\n this.totalPoints = 0;\n else\n this.totalPoints = parseInt(window.localStorage['TotalPoints']);\n\n this.totalPoints = this.totalPoints + 60; //\n window.localStorage.setItem(\"TotalPoints\", \"\" + this.totalPoints);\n }\n\n awardAndUpdateMoney() {\n //get current dollars, \n let pastTotalDollars = this.awardDollarService.getCurrentlyEarnedDollars();\n let awardedTotalDollarAfterCurrentSurvey = this.awardDollarService.giveDollars();\n return {\n pastTotalDollars,\n awardedTotalDollarAfterCurrentSurvey\n };\n\n }\n\n updataUnlockedIncentiveInNgrxStore(unlockedMoney) {\n var payload: Object = {\n user_id: this.userProfileService.username,\n last_date: moment().format('YYYYMMDD'),\n unlocked_points: 60,\n unlocked_money: unlockedMoney,\n current_point: this.userProfileService.points,\n date: moment().format('YYYYMMDD'),\n isUnlockedViewShown: false\n };\n this.store.dispatch(surveyCompletedRegisterUnlocked({ payload }));\n }\n\n\n\n\n\n lifeInsightCodesUnfinished() {\n //Save 7-day date and value for each question in localStorage to generate lifeInsight chart\n var lifeInsightProfile = {\n \"questions\": [\"Q3d\", \"Q4d\", \"Q5d\", \"Q8d\"],\n \"qimgs\": [\"assets/img/stress.png\", \"assets/img/freetime.png\", \"assets/img/dance2.png\", \"assets/img/social.png\"],\n \"lifeInsightsTitle\": [\"How much pain are you currently experiencing?\",\n \"How much fatigue are you currently experiencing?\",\n \"How much nausea are you currently experiencing?\",\n \"How motivated are you to take 6MP today?\"],\n \"qYaxis\": [\"Pain level\", \"Fatigue level\", \"Nausea level\", \"Degree of motivation\"],\n \"qSubText\": [\"0 = low pain, 4 = severe pain\",\n \"0 = low fatigue, 4 = severe fatigue\",\n \"0 = low nausea, 4 = severe nausea\",\n \"0 = less motivated, 4 = highly motivated\"],\n \"lifeInsightsHighStress\": [\n \"Stressed \",\n \"Fatigued \",\n \"Nausea \",\n \"Motivated \"],\n \"lifeInsightsLowStress\": [\n \"Relaxed \",\n \"Fatigued \",\n \"Nausea \",\n \"Motivated \"]\n };\n\n var questionsArray = lifeInsightProfile.questions; //[\"Q3d\",\"Q4d\",\"Q5d\",\"Q8d\"]\n if (window.localStorage['lifeInsight'] == undefined) {\n\n for (let question of questionsArray) {\n this.lifeInsightObj[question] = {};\n this.lifeInsightObj[question]['dates'] = [moment().format(\"DD-MM-YYYY\")];\n if (this.surveyAnswersJSONObject.hasOwnProperty(question)) {\n this.lifeInsightObj[question]['data'] = [parseInt(this.surveyAnswersJSONObject[question])];\n }\n else {\n this.lifeInsightObj[question]['data'] = [null];\n }\n }\n } else {\n this.lifeInsightObj = JSON.parse(window.localStorage[\"lifeInsight\"]);\n\n for (let question of questionsArray) {\n var dateslength = this.lifeInsightObj[question]['dates'].length;\n if (dateslength == 7) {\n this.lifeInsightObj[question]['dates'].shift();\n this.lifeInsightObj[question]['data'].shift();\n }\n var currentdate = moment().format(\"DD-MM-YYYY\");\n var dates = this.lifeInsightObj[question][\"dates\"];\n var dateIndex = dates.indexOf(currentdate);\n console.log(\"Current date exist? \" + dateIndex);\n if (dateIndex > -1) {\n this.lifeInsightObj[question]['dates'][dateIndex] = currentdate;\n if (this.surveyAnswersJSONObject.hasOwnProperty(question)) {\n this.lifeInsightObj[question]['data'][dateIndex] = (parseInt(this.surveyAnswersJSONObject[question]));\n }\n else {\n this.lifeInsightObj[question][dateIndex] = null;\n }\n } else {\n this.lifeInsightObj[question]['dates'].push(currentdate);\n if (this.surveyAnswersJSONObject.hasOwnProperty(question)) {\n this.lifeInsightObj[question]['data'].push(parseInt(this.surveyAnswersJSONObject[question]));\n }\n else {\n this.lifeInsightObj[question]['data'].push(null);\n }\n }\n }\n }\n //console.log(\"lifeInsightObj: \"+JSON.stringify(this.lifeInsightObj));\n window.localStorage.setItem(\"lifeInsight\", JSON.stringify(this.lifeInsightObj));\n }\n\n ngAfterViewInit() {\n setTimeout(e => this.drawMoodGrid(this), 200);\n }\n\n drawMoodGrid(self2) {\n\n var c = document.getElementById(\"myCanvas\");\n if (c == null) {\n //console.log(\"is null\");\n return;\n }\n\n c.style.width = '100%';\n c.width = c.offsetWidth;\n c.height = c.width;\n\n var ctx = c.getContext(\"2d\");\n var imageObj = new Image();\n imageObj.src = 'assets/pics/affect_grid.png';\n imageObj.onload = function () {\n ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle\n 0, 0, c.width, c.height); // destination rectangle\n }\n\n //corner points\n var top_x = (42.0 / 354.0) * c.width;\n var top_y = (32.0 / 354.0) * c.height;\n var bottom_x = (320.0 / 354.0) * c.width;\n var bottom_y = (320.0 / 354.0) * c.height;\n\n c.addEventListener(\"click\", function (e) {\n //drawing = true;\n var rect = c.getBoundingClientRect();\n var lastPos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n //console.log(\"x:\" + lastPos.x + \", y:\" + lastPos.y + \":::: \" + c.width + \",\" + c.height);\n\n var x = -1;\n var y = -1;\n if ((lastPos.x >= top_x) && (lastPos.y >= top_y) && (lastPos.x <= bottom_x) && (lastPos.y <= bottom_y)) {\n x = 10 * (lastPos.x - top_x) / (bottom_x - top_x) - 5;\n y = 5 - 10 * (lastPos.y - top_y) / (bottom_y - top_y) - 5;\n console.log(\"x:\" + x + \", y:\" + y);\n\n //self2.survey2['QMood'] = \"\" + x + \":\" + y;\n self2.surveyAnswersJSONObject['QMood'] = \"\" + x + \":\" + y;\n\n\n //\n self2.inputchanged(\"QMood\");\n } else {\n return;\n }\n\n var rect = c.getBoundingClientRect();\n ctx.beginPath();\n ctx.clearRect(0, 0, rect.right - rect.left, rect.bottom - rect.top);\n ctx.closePath();\n\n //\n ctx.drawImage(imageObj, 0, 0, imageObj.width, imageObj.height, // source rectangle\n 0, 0, c.width, c.height); // destination rectangle\n\n //ctx.drawImage(imageObj, 0, 0);\n ctx.beginPath();\n ctx.arc(lastPos.x, lastPos.y, 10, 0, 2 * Math.PI);\n ctx.fillStyle = 'red';\n ctx.fill();\n ctx.lineWidth = 1;\n ctx.strokeStyle = 'red';\n ctx.stroke();\n }, false);\n }\n\n });\n\n const tmpModule = NgModule({ declarations: [surveyComponent], imports: [FormsModule] })(class {\n });\n\n this._compiler.compileModuleAndAllComponentsAsync(tmpModule)\n .then((factories) => {\n this.isLoading = false;\n this.loadingComplete = true;\n //setTimeout(function(){ console.log(\"holla\") }, 3000);\n this.changeDetector.detectChanges();\n const f = factories.componentFactories[0];\n const cmpRef = this.vc.createComponent(f);\n cmpRef.instance.awsS3Service = this.awsS3Service;\n //cmpRef.instance.surveyAnswersJSONObject = this.surveyQuestionsDict;\n cmpRef.instance.surveyAnswersJSONObject = this.surveyQuestionsDict;\n cmpRef.instance.fileLink = this.jsonFileLinkForSurvey;\n cmpRef.instance.versionNumber = this.versionNumber;\n cmpRef.instance.surveyQuestionsInJSONDictFormat = this.surveyQuestionsInJSONDictFormat;\n cmpRef.instance.alertCtrl = this.alertCtrl;\n cmpRef.instance.userProfileService = this.userProfileService;\n cmpRef.instance.awardDollarService = this.awardDollarService;\n cmpRef.instance.EncrDecr = this.EncrDecr;\n cmpRef.instance.plt = this.plt;\n cmpRef.instance.router = this.router;// Router,\n cmpRef.instance.store = this.store;\n cmpRef.instance.name = 'dynamic';\n });\n }\n\n\n //\n // process survey for all types of objects\n // Our current questionaire only has radio buttons. We have codes for other types of inputs, which we will gradually add.\n //\n\n process_survey(obj: { text: any; type: string; }, survey_string: string, i: any) {\n\n survey_string = [survey_string,\n '
',\n obj.text,\n '
'\n ].join(\" \");\n\n if (obj.type == 'random') {\n //this.process_survey_random(obj, survey_string, i);\n\n } else {\n //\n if (obj.type == \"captcha\") {\n\n //survey_string = this.process_survey_captcha(obj, survey_string);\n\n }\n\n\n //------------------------------------------------------ \n //text box \n //------------------------------------------------------ \n if (obj.type == \"textbox\") {\n //survey_string = this.process_survey_textbox(survey_string, i);\n }\n\n //------------------------------------------------------ \n //time picker\n //------------------------------------------------------ \n if (obj.type == \"timepicker\") {\n //survey_string = this.process_survey_timepicker(survey_string, i);\n }\n\n //------------------------------------------------------ \n //paragraph\n //------------------------------------------------------ \n if (obj.type == \"comment\") {\n //survey_string = this.process_survey_comment(survey_string);\n }\n\n //------------------------------------------------------ \n //image\n //------------------------------------------------------ \n if (obj.type == \"image\") {\n //survey_string = this.process_survey_image(obj, survey_string);\n }\n\n\n //------------------------------------------------------\n // mood\n //------------------------------------------------------\n if (obj.type == 'mood') {\n //survey_string = this.process_survey_mood(survey_string, i);\n }\n\n\n //------------------------------------------------------\n // mood-grid\n //------------------------------------------------------\n if (obj.type == 'moodgrid') {\n //survey_string = this.process_survey_moodgrid(survey_string, i);\n }\n\n if (obj.type == \"moodgrid2\") {\n survey_string = this.process_survey_moodgrid2(survey_string);\n }\n\n\n\n //------------------------------------------------------ \n // Autocomplete \n //------------------------------------------------------ \n // 'component-id=\"Q' + i + '\" ' + \n if (obj.type == 'autocomplete') {\n //survey_string = this.process_survey_autocomplete(obj, survey_string, i);\n }\n\n\n //------------------------------------------------------ \n // radio button \n //------------------------------------------------------ \n if (obj.type == \"radiobutton\") {\n survey_string = this.process_survey_radiobutton(obj, survey_string, i);\n }\n\n //------------------------------------------------------ \n // range\n //------------------------------------------------------ \n if (obj.type == \"range\") {\n //survey_string = this.process_survey_range(obj, survey_string, i);\n }\n\n if (obj.type == \"range_time\") {\n survey_string = this.process_survey_range_time(obj, survey_string, i);\n }\n\n if (obj.type == \"range2\") {\n //survey_string = this.process_survey_range2(obj, survey_string, i);\n }\n\n\n //------------------------------------------------------ \n //checkbox \n //------------------------------------------------------ \n if (obj.type == \"checkbox\") {\n //survey_string = this.process_survey_checkbox(obj, survey_string, i);\n }\n\n survey_string = survey_string + '
';\n }\n return survey_string;\n }\n\n process_survey_range_time(obj: any, survey_string: string, i: any): string {\n //throw new Error(\"Method not implemented.\");\n\n //\n var min = obj.extra.choices[2];\n var max = obj.extra.choices[3];\n var step = obj.extra.choices[4];\n this.surveyQuestionsDict[i + \"_modified\"] = obj.extra.choices[5]; //\"12:00 AM\";\n survey_string = [survey_string,\n '
',\n /*\n '

' + min + '

',\n */\n '
',\n '

{{surveyAnswersJSONObject.' + i + '_modified}}

',\n '
',\n /*\n '

' + max + '

',\n */\n '
',\n \n '
',\n '

' + obj.extra.choices[0] + \"

\",\n '',\n //'',\n '

' + obj.extra.choices[1] + \"

\",\n '
', \n\n //'',\n //'',\n \n /*\n '',\n \n '' + obj.extra.choices[0] + '',\n '' + obj.extra.choices[1] + '',\n '',\n '',\n */\n \n ].join(\" \");\n\n return survey_string;\n }\n\n\n // process survey if obj type is radiobutton\n process_survey_radiobutton(obj, survey_string, i) {\n //------------------------------------------------------ \n //radio button, vertical \n //------------------------------------------------------ \n\n if (obj.extra.orientation == \"vertical\") {\n survey_string = survey_string + '
    ';\n\n for (var j = 0; j < obj.extra.choices.length; j++) {\n\n survey_string = [survey_string,\n '
  • ',\n '',\n '
  • '\n ].join(\" \");\n\n }\n\n //if(this.choices == undefined) this.choices = {};\n //this.choices[obj.name]= obj.extra.choices;\n survey_string = survey_string + '
';\n }\n\n //------------------------------------------------------ \n //radio button, horizontal \n //------------------------------------------------------\n //console.log(\"Here: \" + JSON.stringify(obj.extra.orientation) + \", \" + obj.extra.choices.length);\n if (obj.extra.orientation == \"horizontal\") {\n\n survey_string = survey_string + '
    ';\n\n //starting text\n survey_string = survey_string + '
  • ' + obj.extra.choices[0] + '

  • ';\n\n //middle text\n for (var j = 0; j < obj.extra.levels; j++) {\n survey_string = [survey_string,\n '
  • ',\n '',\n '
  • '\n ].join(\" \");\n //console.log(\"\" + j + \", \" + obj.extra.choices.length);\n }\n\n //ending text\n survey_string = survey_string + '
  • ' + obj.extra.choices[obj.extra.choices.length - 1] + '

  • ';\n survey_string = survey_string + '
';\n }\n\n\n return survey_string;\n }\n\n process_survey_moodgrid2(survey_string: string): string {\n survey_string = [survey_string,\n '',\n 'Your browser does not support the HTML5 canvas tag.',\n ''\n ].join(\" \");\n\n return survey_string;\n }\n\n\n\n getAppVersionNumber() {\n //Get the app version to put inside the survey data. \n //The goal of this app version number is to track in the backend that \n //participants has the latest version of the app.\n this.appVersion.getVersionNumber().then(value => {\n this.versionNumber = value;\n console.log(\"VersionNumber: \" + this.versionNumber);\n\n //store the version number to the userProfile\n this.userProfileService.versionNumber = this.versionNumber;\n }).catch(err => {\n console.log(err);\n });\n }\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3VydmV5L2hhcnZhcmQtc3VydmV5L2hhcnZhcmQtc3VydmV5LmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxxQkFBcUI7QUFDekIiLCJmaWxlIjoic3JjL2FwcC9zdXJ2ZXkvaGFydmFyZC1zdXJ2ZXkvaGFydmFyZC1zdXJ2ZXkuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZXctYmFja2dyb3VuZC1jb2xvcntcbiAgICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { MobileAccessibility } from '@ionic-native/mobile-accessibility/ngx';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-harvard-survey',\n templateUrl: './harvard-survey.component.html',\n styleUrls: ['./harvard-survey.component.css']\n})\nexport class HarvardSurveyComponent implements OnInit {\n\n constructor(private userProfileService: UserProfileService,\n private mobileAccessibility: MobileAccessibility,\n private appUsageDb: DatabaseService) { }\n\n ngOnInit() {\n this.mobileAccessibility.usePreferredTextZoom(false);\n }\n \n ionViewDidEnter(){\n /*\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.appUsageDb.saveAppUsageEnter(\"harvard_survey_page\");\n } \n \n ionViewDidLeave(){\n /*\n console.log(this.pageTitle+\": ionViewDidLeave\");\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */ \n this.mobileAccessibility.usePreferredTextZoom(true);\n this.appUsageDb.saveAppUsageExit(\"harvard_survey_page\");\n \n }\n\n}\n","import { SurveyTimeline } from '../model/surveyTimeline';\nimport { createReducer, on } from '@ngrx/store';\nimport { SurveyActions } from '../action-types';\nimport * as moment from 'moment';\n\nexport interface SurveyState{\n surveyTimeLine : SurveyTimeline\n}\n\n\nexport const initialSurveyState: SurveyState = {\n surveyTimeLine: undefined \n}\n\n\nexport const surveyReducer = createReducer(\n\n initialSurveyState,\n on(SurveyActions.surveyCompleted, (state, action) => {\n var currentDate = moment().format('YYYYMMDD');\n var surveyObject = {};\n surveyObject[currentDate] = action.surveyTimeline;\n return surveyObject;\n })\n\n /*\n on(AuthActions.login, (state, action) => {\n return {\n user: action.user\n }\n }),\n\n on(AuthActions.logout, (state, action) => {\n return {\n user: undefined\n }\n })\n */\n\n\n\n);","module.exports = \".new-background-color {\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvc3VydmV5L3NhbXBsZS1zdXJ2ZXkvc2FtcGxlLXN1cnZleS5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvc3VydmV5L3NhbXBsZS1zdXJ2ZXkvc2FtcGxlLXN1cnZleS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHFCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9zdXJ2ZXkvc2FtcGxlLXN1cnZleS9zYW1wbGUtc3VydmV5LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzAwNTQ4Njtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMwMDU0ODY7XG59Il19 */\"","import { Component, OnInit } from '@angular/core';\n//import { PreLoad } from '../../PreLoad';\nimport { DatabaseService } from 'src/app/monitor/database.service';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { MobileAccessibility } from '@ionic-native/mobile-accessibility/ngx';\n\n@Component({\n selector: 'app-sample-survey',\n templateUrl: './sample-survey.component.html',\n styleUrls: ['./sample-survey.component.scss'],\n})\n\n//@PreLoad('life-insights')\nexport class SampleSurveyComponent implements OnInit {\n pageTitle = \"Survey_caregiver\";\n\n constructor(\n private userProfileService: UserProfileService,\n private mobileAccessibility: MobileAccessibility,\n private appUsageDb: DatabaseService\n ) { }\n\n ngOnInit() {\n this.mobileAccessibility.usePreferredTextZoom(false);\n }\n \n ionViewDidEnter(){\n //\n this.appUsageDb.saveAppUsageEnter(\"cg_survey_page\"); \n\n } \n\n ionViewDidLeave(){\n //\n this.mobileAccessibility.usePreferredTextZoom(true);\n this.appUsageDb.saveAppUsageExit(\"cg_survey_page\"); \n\n }\n\n}\n","module.exports = \".new-background-color{\\n --background: #005486;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3VydmV5L3NsZWVwLXN1cnZleS9zbGVlcC1zdXJ2ZXkuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLHFCQUFxQjtBQUN6QiIsImZpbGUiOiJzcmMvYXBwL3N1cnZleS9zbGVlcC1zdXJ2ZXkvc2xlZXAtc3VydmV5LmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubmV3LWJhY2tncm91bmQtY29sb3J7XG4gICAgLS1iYWNrZ3JvdW5kOiAjMDA1NDg2O1xufSJdfQ== */\"","import { Component, OnInit } from '@angular/core';\nimport { UserProfileService } from 'src/app/user/user-profile/user-profile.service';\nimport { MobileAccessibility } from '@ionic-native/mobile-accessibility/ngx';\nimport { DatabaseService } from 'src/app/monitor/database.service';\n\n@Component({\n selector: 'app-sleep-survey',\n templateUrl: './sleep-survey.component.html',\n styleUrls: ['./sleep-survey.component.css']\n})\n\nexport class SleepSurveyComponent implements OnInit {\n\n whichImage;\n\n constructor(private userProfileService: UserProfileService,\n private mobileAccessibility: MobileAccessibility,\n private appUsageDb: DatabaseService) { }\n\n ngOnInit() {\n this.mobileAccessibility.usePreferredTextZoom(false);\n }\n \n ionViewDidEnter(){\n\n /* \n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Enter\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n this.whichImage = \"http://ec2-52-201-144-36.compute-1.amazonaws.com:56735/get_daily_plot?username=\" + this.userProfileService.username + \"&plot_type=edu.harvard.srl.SleepAppUsageVisualization&cachebreaker=\" + new Date().getTime();\n this.appUsageDb.saveAppUsageEnter(\"sleep_survey_page\");\n\n } \n\n reloadPage() {\n window.location.reload();\n }\n \n ionViewDidLeave(){\n /*\n console.log(this.pageTitle+\": ionViewDidLeave\");\n this.db.getDatabaseState().subscribe(rdy => {\n if (rdy) { \n this.db.addTrack(this.pageTitle, \"Leave\", this.userProfileService.username, Object.keys(this.userProfileService.userProfile.survey_data.daily_survey).length); \n }\n });\n */\n \n this.mobileAccessibility.usePreferredTextZoom(true);\n this.appUsageDb.saveAppUsageExit(\"sleep_survey_page\");\n \n }\n\n}\n","import {createAction, props} from '@ngrx/store';\nimport { SurveyTimeline } from './model/surveyTimeline';\n\n\nexport const surveyCompleted = createAction(\n \"[Survey Page] Survey Completed\",\n props<{surveyTimeline: SurveyTimeline}>()\n);","import {Injectable} from '@angular/core';\nimport {Actions, createEffect, ofType} from '@ngrx/effects';\nimport {tap} from 'rxjs/operators';\nimport {Router} from '@angular/router';\nimport { SurveyActions } from './action-types';\nimport { UserProfileService } from '../user/user-profile/user-profile.service';\nimport { HttpClient } from '@angular/common/http';\nimport * as moment from 'moment';\nimport { environment } from '../../environments/environment';\n\n\n@Injectable()\nexport class SurveyEffects {\n \n login$ = createEffect(() =>\n this.actions$.pipe(\n ofType(SurveyActions.surveyCompleted),\n tap(action => {\n //store on a server\n localStorage.setItem('surveyTimeline',\n JSON.stringify(action.surveyTimeline));\n\n\n //\n var username = this.userProfileService.username;\n var currentTimeTs = Date.now();\n var currentTimeReadableTs = moment().format(\"MMMM Do YYYY, h:mm:ss a Z\");\n var dataString = moment().format(\"YYYYMMDD\");\n const headers = { \"Content-Type\": \"application/json;charset=UTF-8\"};\n const body = {\"user_id\": username, \"dataString\": dataString, \"whenCompletedTs\": currentTimeTs, \"whenCompletedReadableTs\": currentTimeReadableTs};\n /*\n this.httpClient.post(\"http://ec2-54-91-131-166.compute-1.amazonaws.com:56733/store-onesignal-id\", body, { headers }).subscribe({\n next: data => console.log(data),\n error: error => console.error('There was an error!', error)\n });\n */\n var flaskServerAPIEndpoint = environment.flaskServerForIncentives;\n this.httpClient.post(flaskServerAPIEndpoint + \"/store-survey-completed\", body)\n .subscribe({\n next: data => console.log(\"--survey_completed-- \" + JSON.stringify(data)),\n error: error => console.error('There was an error!', error)\n }); \n })\n )\n ,\n {dispatch: false});\n\n\n constructor(private actions$: Actions,\n private router: Router,\n private userProfileService: UserProfileService,\n private httpClient: HttpClient) {\n\n }\n\n}","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n//import { PromptedSurveyComponent } from './prompted-survey/prompted-survey.component';\n//import { MorningReportComponent } from './morning-report/morning-report.component';\n//import { InitiatedDrinkComponent } from './initiated-drink/initiated-drink.component';\nimport { IonicModule } from '@ionic/angular';\nimport { FormsModule } from '@angular/forms';\nimport { StorageModule } from '../storage/storage.module';\n//import { ActivetaskComponent } from './activetask/activetask.component';\n//import { ActiveTask2Component } from './active-task2/active-task2.component';\nimport { DynamicSurveyComponent } from './dynamic-survey/dynamic-survey.component';\nimport { SampleSurveyComponent } from './sample-survey/sample-survey.component';\nimport { Routes, RouterModule } from '@angular/router';\nimport { IncentiveModule } from '../incentive/incentive.module';\nimport { AyaSampleSurveyComponent } from './aya-sample-survey/aya-sample-survey.component';\nimport { StoreModule } from '@ngrx/store';\nimport {surveyReducer} from './reducers';\nimport {EffectsModule} from '@ngrx/effects';\nimport { SurveyEffects } from './survey.effects';\nimport { HarvardSurveyComponent } from './harvard-survey/harvard-survey.component';\nimport { SleepSurveyComponent } from './sleep-survey/sleep-survey.component';\n\nconst routes: Routes = [\n { path: 'samplesurvey', component: SampleSurveyComponent }\n];\n\n@NgModule({\n declarations: [\n DynamicSurveyComponent,\n AyaSampleSurveyComponent,\n SampleSurveyComponent,\n HarvardSurveyComponent,\n SleepSurveyComponent],\n imports: [\n CommonModule,\n IonicModule.forRoot(),\n FormsModule,\n StorageModule,\n IncentiveModule,\n RouterModule.forChild(routes),\n StoreModule.forFeature('survey', surveyReducer),\n EffectsModule.forFeature([SurveyEffects])\n ],\n exports:[\n DynamicSurveyComponent,\n SampleSurveyComponent,\n AyaSampleSurveyComponent,\n HarvardSurveyComponent,\n SleepSurveyComponent\n ],\n schemas: [ CUSTOM_ELEMENTS_SCHEMA ]\n})\nexport class SurveyModule { }\n","module.exports = \".new-background-color {\\n --background: #3F51B5;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9tYXNoMi9Ecm9wYm94IChQQUMgTEFCKS9jb2Rlcy9pb25pY19wcm9qZWN0cy9TQVJBVjMvU0FSQV9tb2R1bGFyL3NyYy9hcHAvdXNlci9hdXRoL2F1dGguY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3VzZXIvYXV0aC9hdXRoLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0kscUJBQUE7QUNDSiIsImZpbGUiOiJzcmMvYXBwL3VzZXIvYXV0aC9hdXRoLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm5ldy1iYWNrZ3JvdW5kLWNvbG9ye1xuICAgIC0tYmFja2dyb3VuZDogIzNGNTFCNTtcbn0iLCIubmV3LWJhY2tncm91bmQtY29sb3Ige1xuICAtLWJhY2tncm91bmQ6ICMzRjUxQjU7XG59Il19 */\"","//this component will register/login a user\n\nimport { Component, OnInit, OnDestroy } from '@angular/core';\nimport { NgForm } from '@angular/forms';\nimport { AuthService, AuthResponseData } from './auth.service';\nimport { Observable, Subscription } from 'rxjs';\nimport { Router } from '@angular/router';\nimport { environment } from 'src/environments/environment';\nimport { UserProfileService } from '../user-profile/user-profile.service';\nimport { tap } from 'rxjs/operators';\nimport { OneSignal } from '@ionic-native/onesignal/ngx';\n\n@Component({ \n selector: 'app-auth',\n templateUrl: './auth.component.html',\n styleUrls: ['./auth.component.scss'],\n})\nexport class AuthComponent implements OnInit, OnDestroy {\n isLoginMode = true;\n isLoading = false;\n error: string = null;\n private userSub: Subscription;\n private authSub: Subscription;\n\n constructor(private authService: AuthService, \n private router: Router,\n private userProfileService: UserProfileService,\n private oneSignal: OneSignal){}\n\n // was used to switch mode between login and register\n // onSwitchMode(){\n // this.isLoginMode = !this.isLoginMode;\n // }\n\n ngOnInit(){\n console.log(\"in auth.component - ngOnInit\");\n if(this.authService.isLoggedIn()){\n console.log(\"auth.component.ts - ngOnInit - is logged in\");\n this.router.navigate(['home']);\n\n }\n console.log(environment.userServer);\n }\n\n //login button was clicked\n onSubmit(form: NgForm){\n console.log(\"auth.component.ts - onSubmit method - begin\");\n\n if(!form.valid){\n console.log('invalid');\n return;\n }\n const userName = form.value.userName;\n const password = form.value.password;\n let authObs: Observable;\n\n this.isLoading = true;\n\n // if(this.isLoginMode){\n\n // login returns an observable\n authObs = this.authService.login(userName,password);\n // }else{\n // authObs = this.authService.signup(userName, password);\n // }\n\n this.authSub = authObs.subscribe(resData => {\n console.log(\"auth.component.ts - onSubmit method - authService.login response: \"+ JSON.stringify(resData));\n \n if(resData.hasOwnProperty('access_token') && resData.hasOwnProperty('refresh_token') ){\n // the response contains an access token and refresh token\n console.log(\"auth.component.ts - onSubmit method - has access token\");\n \n // userProfileService.initializeObs returns an observable, \n // then below we can get the OneSignal Player id when UserProfile has been intialized \n this.userSub = this.userProfileService.initializeObs()\n .pipe(\n tap(\n ()=>{\n this.userProfileService.addOneSignalPlayerId();\n }\n )\n )\n .subscribe(\n ()=>\n {\n console.log(\"in subscribe - got profiles init\");\n this.router.navigate(['home']);\n console.log(\"in subscribe - got profiles init - post navigate to home\");\n });\n\n }\n else\n {\n console.log(\"doesn't have access token\");\n this.isLoading = false;\n this.authService.loggedInUser.next(null);\n \n if(resData.hasOwnProperty('message')){\n this.error = resData.message;\n }\n else{\n this.error = \"Unknown error\\n\" + JSON.stringify(resData);\n }\n }\n }, errorMessage=> {\n console.log(errorMessage);\n this.error = errorMessage;\n this.isLoading = false;\n });\n form.reset();\n\n }\n\n\n ngOnDestroy(){\n if(this.userSub){\n this.userSub.unsubscribe();\n }\n if(this.authSub){\n this.authSub.unsubscribe();\n }\n }\n}\n","import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, UrlTree } from '@angular/router';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { AuthService } from './auth.service';\nimport { map, take } from 'rxjs/operators';\n\n@Injectable({providedIn: 'root'})\nexport class AuthGuard implements CanActivate{\n constructor(private authService: AuthService, private router: Router){}\n\n canActivate(route: ActivatedRouteSnapshot, router: RouterStateSnapshot): boolean| UrlTree | Promise | Observable {\n \n //This using reactive programming\n //--- pipe: is a series of operation to be executed when the observables \"loggedInUser\" state changes\n //--- take: an observable can emit a series of values. take(1) means only the first value will be used\n //--- map: function takes an observable, do some transformation and returns a observable.\n //--- search documentation here: https://rxjs-dev.firebaseapp.com/\n \n return this.authService.loggedInUser.pipe(take(1),map(loggedInUser => {\n const isAuth = !!loggedInUser;\n if(isAuth){\n console.log(\"auth.guard.ts - (isAuth): true\");\n return true;\n } else {\n console.log(\"auth.guard.ts - (isAuth): false\");\n return this.router.createUrlTree(['auth']);\n }\n }));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';\nimport { catchError, tap } from 'rxjs/operators';\nimport { throwError, Subject, BehaviorSubject, Observable, Subscription } from 'rxjs';\n// import { User } from './user.model';\nimport { Router } from '@angular/router';\n// import { AngularFireAuth } from '@angular/fire/auth';\nimport { environment } from 'src/environments/environment';\n// import { UserProfileService } from '../user-profile/user-profile.service';\n\n//I don't believe this interface is being used anymore\nexport interface AuthResponseData{\n message?: string;\n access_token?: string;\n refresh_token?: string;\n access_expires?: string;\n refresh_expires?: string;\n registered? : boolean;\n}\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthService {\n //new\n loggedInUser = new BehaviorSubject(localStorage.getItem('loggedInUser')); //localStorage.getItem('loggedInUser') \n\n userSub:Subscription = this.loggedInUser.subscribe(loggedInUser => {\n if(loggedInUser === null){\n localStorage.removeItem('loggedInUser');\n localStorage.removeItem('userProfile');\n }\n else{\n localStorage.setItem('loggedInUser', loggedInUser);\n }\n });\n\n private readonly ACCESS_TOKEN = 'ACCESS_TOKEN';\n private readonly ACCESS_TOKEN_EXPIRATION = 'ACCESS_TOKEN_EXPIRATION';\n private readonly REFRESH_TOKEN = 'REFRESH_TOKEN';\n private readonly REFRESH_TOKEN_EXPIRATION = 'REFRESH_TOKEN_EXPIRATION';\n\n private tokenExpirationTimer: any;\n\n constructor(private http: HttpClient,\n private router: Router) { }\n\n // used to register new user\n signup(userName: string, password: string){\n return this.http\n .post(environment.userServer+'/registration',\n {\n username: userName,\n password: password\n }).pipe(catchError(this.handleError),tap(resData => {\n this.loggedInUser.next(userName);\n this.storeAccessToken(resData.access_token, resData.access_expires);\n this.storeRefreshToken(resData.refresh_token, resData.refresh_expires);\n\n console.log(\"resData: \" + JSON.stringify(resData));\n }));\n }\n\n // initializes loggedinUsder\n autoLogin(){\n console.log(\"auth.service.ts - autoLogin method - begin\");\n const loggedInUser = localStorage.getItem('loggedInUser');\n if(loggedInUser===null){\n console.log(\"auth.service.ts - autoLogin method - (loggedInUser===null)\");\n return;\n }\n else{\n console.log(\"auth.service.ts - autoLogin method - (sending saved observable)\");\n this.loggedInUser.next(loggedInUser);\n }\n }\n\n logout(){\n this.loggedInUser.next(null);\n this.router.navigate(['/home']);\n localStorage.removeItem('loggedInUser');\n this.removeTokens();\n }\n\n //may not need \n // autoLogout(expirationDuration: number){\n // console.log(expirationDuration);\n // this.tokenExpirationTimer= setTimeout(() => {\n // this.logout();\n // },expirationDuration);\n // }\n\n login(userName: string, password: string){\n console.log(\"auth.service.ts -login method - begin\");\n return this.http\n .post(environment.userServer+'/login',\n {\n username: userName,\n password: password\n }).pipe(catchError(this.handleError),tap(resData => {\n\n this.loggedInUser.next(userName);\n this.storeAccessToken(resData.access_token, resData.access_token);\n this.storeRefreshToken(resData.refresh_token, resData.refresh_expires);\n \n console.log(\"auth.service.ts -login method - loggedInUser: \" + this.loggedInUser.getValue());\n console.log(\"auth.service.ts -login method - resData: \" + JSON.stringify(resData));\n }));\n }\n\n private handleError(errorRes: HttpErrorResponse){\n console.log(\"auth.service.ts - handleError method - begin\");\n if(errorRes.message.startsWith('Http failure response for')){\n let errorMessage = 'You appear to be offline or unable to reach ' + errorRes.url;\n return throwError(errorMessage);\n }\n let errorMessage = 'An unknown error occurred!!!! \\n' + JSON.stringify(errorRes);\n if(!errorRes.error || !errorRes.error.error){\n return throwError(errorMessage);\n }\n switch(errorRes.error.error.message){\n case 'EMAIL_EXISTS':\n errorMessage = 'This email exists already!';\n break;\n case 'EMAIL_NOT_FOUND':\n errorMessage = 'Email address not found!';\n break;\n case 'INVALID_PASSWORD':\n errorMessage= 'This password is not correct.'\n break;\n\n }\n return throwError(errorMessage);\n }\n\n //use refresh token to get a new access token\n refreshToken() {\n console.log(\"auth.service.ts - refreshToken method - begin\");\n const token = this.getRefreshToken();\n const httpOptions = {\n headers: new HttpHeaders({\n 'Authorization': `Bearer ${token}`\n })\n };\n\n return this.http.post(`${environment.userServer}/token/refresh`, {\n 'refreshToken': this.getRefreshToken() \n },httpOptions ).pipe(tap((\n resData: {\n \"access_token\": string, \n \"access_expires\": string}) => {\n this.storeAccessToken(resData.access_token, resData.access_expires);\n }));\n }\n\n // private removeUser(){\n // localStorage.removeItem('user');\n // }\n\n// check if loggedInUser has a value and in which case, the user is logged in\nisLoggedIn() {\n console.log(\"auth.service.ts - isLoggedIn method - begin\");\n return !!this.loggedInUser.getValue();\n}\n\ngetAccessToken() {\n console.log(\"auth.service.ts - getAccessToken method - begin\");\n return localStorage.getItem(this.ACCESS_TOKEN);\n}\n\nprivate doLogoutUser() {\n this.loggedInUser = null;\n this.removeTokens();\n}\n\nprivate getRefreshToken() {\n console.log(\"auth.service.ts - getRefreshToken method - begin\");\n return localStorage.getItem(this.REFRESH_TOKEN);\n}\n\nprivate storeAccessToken(token: string, expires: string) {\n console.log(\"auth.service.ts - storeAccessToken method - begin\");\n localStorage.setItem(this.ACCESS_TOKEN, token);\n \n const expirationDate = new Date(new Date().getTime() + +expires * 1000);\n localStorage.ACCESS_TOKEN_EXPIRATION = expirationDate;\n}\n\nprivate storeRefreshToken(token: string, expires: string) {\n console.log(\"auth.service.ts - storeRefreshToken method - begin\");\n localStorage.setItem(this.REFRESH_TOKEN, token);\n const expirationDate = new Date(new Date().getTime() + +expires * 1000);\n localStorage.REFRESH_TOKEN_EXPIRATION = expirationDate;\n}\n\nprivate removeTokens() {\n console.log(\"auth.service.ts - removeTokens method - begin\");\n localStorage.removeItem(this.ACCESS_TOKEN);\n localStorage.removeItem(this.ACCESS_TOKEN_EXPIRATION);\n localStorage.removeItem(this.REFRESH_TOKEN);\n localStorage.removeItem(this.REFRESH_TOKEN_EXPIRATION);\n\n}\n\n}\n","module.exports = \".lds-circle {\\n display: inline-block;\\n -webkit-transform: translateZ(1px);\\n transform: translateZ(1px);\\n}\\n.lds-circle > div {\\n display: inline-block;\\n width: 51px;\\n height: 51px;\\n margin: 6px;\\n border-radius: 50%;\\n background: rgb(19, 12, 226);\\n -webkit-animation: lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;\\n animation: lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;\\n}\\n@-webkit-keyframes lds-circle {\\n 0%, 100% {\\n -webkit-animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);\\n animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);\\n }\\n 0% {\\n -webkit-transform: rotateY(0deg);\\n transform: rotateY(0deg);\\n }\\n 50% {\\n -webkit-transform: rotateY(1800deg);\\n transform: rotateY(1800deg);\\n -webkit-animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);\\n animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);\\n }\\n 100% {\\n -webkit-transform: rotateY(3600deg);\\n transform: rotateY(3600deg);\\n }\\n}\\n@keyframes lds-circle {\\n 0%, 100% {\\n -webkit-animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);\\n animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);\\n }\\n 0% {\\n -webkit-transform: rotateY(0deg);\\n transform: rotateY(0deg);\\n }\\n 50% {\\n -webkit-transform: rotateY(1800deg);\\n transform: rotateY(1800deg);\\n -webkit-animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);\\n animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);\\n }\\n 100% {\\n -webkit-transform: rotateY(3600deg);\\n transform: rotateY(3600deg);\\n }\\n}\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvdXNlci9hdXRoL2xvYWRpbmctc3Bpbm5lci9sb2FkaW5nLXNwaW5uZXIuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHFCQUFxQjtFQUNyQixrQ0FBMEI7VUFBMUIsMEJBQTBCO0FBQzVCO0FBQ0E7RUFDRSxxQkFBcUI7RUFDckIsV0FBVztFQUNYLFlBQVk7RUFDWixXQUFXO0VBQ1gsa0JBQWtCO0VBQ2xCLDRCQUE0QjtFQUM1Qix3RUFBZ0U7VUFBaEUsZ0VBQWdFO0FBQ2xFO0FBQ0E7RUFDRTtJQUNFLCtEQUF1RDtZQUF2RCx1REFBdUQ7RUFDekQ7RUFDQTtJQUNFLGdDQUF3QjtZQUF4Qix3QkFBd0I7RUFDMUI7RUFDQTtJQUNFLG1DQUEyQjtZQUEzQiwyQkFBMkI7SUFDM0IsK0RBQXVEO1lBQXZELHVEQUF1RDtFQUN6RDtFQUNBO0lBQ0UsbUNBQTJCO1lBQTNCLDJCQUEyQjtFQUM3QjtBQUNGO0FBZEE7RUFDRTtJQUNFLCtEQUF1RDtZQUF2RCx1REFBdUQ7RUFDekQ7RUFDQTtJQUNFLGdDQUF3QjtZQUF4Qix3QkFBd0I7RUFDMUI7RUFDQTtJQUNFLG1DQUEyQjtZQUEzQiwyQkFBMkI7SUFDM0IsK0RBQXVEO1lBQXZELHVEQUF1RDtFQUN6RDtFQUNBO0lBQ0UsbUNBQTJCO1lBQTNCLDJCQUEyQjtFQUM3QjtBQUNGIiwiZmlsZSI6InNyYy9hcHAvdXNlci9hdXRoL2xvYWRpbmctc3Bpbm5lci9sb2FkaW5nLXNwaW5uZXIuY29tcG9uZW50LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5sZHMtY2lyY2xlIHtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVooMXB4KTtcbn1cbi5sZHMtY2lyY2xlID4gZGl2IHtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICB3aWR0aDogNTFweDtcbiAgaGVpZ2h0OiA1MXB4O1xuICBtYXJnaW46IDZweDtcbiAgYm9yZGVyLXJhZGl1czogNTAlO1xuICBiYWNrZ3JvdW5kOiByZ2IoMTksIDEyLCAyMjYpO1xuICBhbmltYXRpb246IGxkcy1jaXJjbGUgMi40cyBjdWJpYy1iZXppZXIoMCwgMC4yLCAwLjgsIDEpIGluZmluaXRlO1xufVxuQGtleWZyYW1lcyBsZHMtY2lyY2xlIHtcbiAgMCUsIDEwMCUge1xuICAgIGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjUsIDAsIDEsIDAuNSk7XG4gIH1cbiAgMCUge1xuICAgIHRyYW5zZm9ybTogcm90YXRlWSgwZGVnKTtcbiAgfVxuICA1MCUge1xuICAgIHRyYW5zZm9ybTogcm90YXRlWSgxODAwZGVnKTtcbiAgICBhbmltYXRpb24tdGltaW5nLWZ1bmN0aW9uOiBjdWJpYy1iZXppZXIoMCwgMC41LCAwLjUsIDEpO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogcm90YXRlWSgzNjAwZGVnKTtcbiAgfVxufVxuIl19 */\"","import { Component } from '@angular/core';\n\n@Component({ \n selector: 'app-loading-spinner',\n template: '
Facebook
',\n styleUrls: ['./loading-spinner.component.css']\n}) \nexport class LoadingSpinnerComponent{} \n","// logic borrowed from https://angular-academy.com/angular-jwt/\n// all http requests will be intercepted by this token interceptor\n// which adds the access token to the request, unless URL contains refresh\n\nimport { Injectable } from '@angular/core';\nimport { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor, HttpErrorResponse } from '@angular/common/http';\n\nimport { Observable, throwError, BehaviorSubject } from 'rxjs';\nimport { catchError, filter, take, switchMap } from 'rxjs/operators';\nimport { AuthService } from './auth.service';\n\n@Injectable()\nexport class TokenInterceptor implements HttpInterceptor {\n\n private isRefreshing = false;\n private refreshTokenSubject: BehaviorSubject = new BehaviorSubject(null);\n\n constructor(public authService: AuthService) { }\n\n intercept(request: HttpRequest, next: HttpHandler): Observable> { \n console.log(\"token.interceptorts - intercept method - begin\");\n if (this.authService.loggedInUser.getValue()) {\n //if it's a refresh request, don't overwrite the token since it was already added\n if(request.url.indexOf('refresh')<0){\n request = this.addToken(request, this.authService.getAccessToken()); \n }\n }\n\n return next.handle(request).pipe(catchError(error => {\n if (error instanceof HttpErrorResponse && error.status === 401) {\n return this.handle401Error(request, next);\n }\n else {\n return throwError(error);\n }\n }));\n }\n\n private addToken(request: HttpRequest, token: string) {\n console.log(\"token.interceptorts - addToken method - begin\");\n return request.clone({\n setHeaders: {\n 'Authorization': `Bearer ${token}`\n }\n });\n }\n\n private handle401Error(request: HttpRequest, next: HttpHandler) {\n console.log(\"token.interceptorts - handle401Error method - begin\");\n if (!this.isRefreshing) {\n this.isRefreshing = true;\n this.refreshTokenSubject.next(null);\n\n return this.authService.refreshToken().pipe(\n switchMap((token: any) => {\n this.isRefreshing = false;\n this.refreshTokenSubject.next(token.access_token);\n return next.handle(this.addToken(request, token.access_token));\n }));\n\n } else {\n return this.refreshTokenSubject.pipe(\n filter(token => token != null),\n take(1),\n switchMap(access_token => {\n return next.handle(this.addToken(request, access_token));\n }));\n }\n }\n}","//contains the two classes UserProfile and UserProfileFixed\n\nexport class UserProfile {\n public badges= { 'daily_survey': [],\n 'money': 0,\n };\n public daily_streak ={};\n public imei:string = \"0\";\n public dollars: number = 0 ;\n\n public life_insights = {\"daily_survey\": {}};\n public reinfrocement_data = {};\n\n public oneSignalPlayerId?: string; \n public AwardDollarDates?: {}; \n\n public lastupdate: number;\n public readable_ts: string;\n public survey_data = {\n 'daily_survey':{}, \n 'points': 0,\n 'weekly_survey':{}\n };\n\n \n public username: string;\n public versionNumber: string;\n public datesTaken: string[];\n public points: number;\n public badgeCount: number;\n public firstlogin: any;\n\n // created constructor to initialize UserProfile - early on\n constructor(username: string, \n datesTaken: string[], \n points: number,\n badgeCount: number,\n lastupdate: number,\n readable_ts: string){ \n this.username = username;\n this.datesTaken = datesTaken;\n this.points = points;\n this.badgeCount = badgeCount;\n this.lastupdate = lastupdate;\n this.readable_ts = readable_ts;\n }\n}\n \nexport class UserProfileFixed {\n public isActive?: boolean; \n public isParent?: boolean;\n public onDates? ={};\n}","import { Injectable } from '@angular/core';\nimport { UserProfile, UserProfileFixed } from './user-profile.model';\nimport { HttpClient } from '@angular/common/http';\nimport * as firebase from 'firebase';\nimport { environment } from 'src/environments/environment';\nimport { BehaviorSubject, forkJoin, Subscription } from 'rxjs';\nimport { tap, map } from 'rxjs/operators';\nimport * as moment from 'moment';\nimport { OneSignal } from '@ionic-native/onesignal/ngx';\nimport { NetworkService, ConnectionStatus } from '../../storage/network.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UserProfileService {\n userProfile: UserProfile;\n userProfileFixed: UserProfileFixed;\n me = this;\n saveToServerRequestInQueue = false;\n initialLoading = new BehaviorSubject(true);\n\n constructor(private http: HttpClient,\n private networkSvc: NetworkService,\n private oneSignal: OneSignal) { }\n\n //returns Observable that we can subscribed to so as to trigger an action after \n //user profiles have been initialized\n initializeObs(){\n //get profiles from server\n console.log(\"user-profile.service.ts - initializeObs method\");\n let getProfile = this.http.post(environment.userServer+'/userinfo',{\"empty\":\"empty\"}); \n let getProfileFixed = this.http.get(environment.userServer+'/userinfofixed');\n\n // forkJoin will return an observable that waits till both http requests have received responses\n return forkJoin([getProfile, getProfileFixed])\n .pipe(tap(\n response =>\n {\n console.log(\"in response of forkjoin\");\n let response1=response[0];\n let response2=response[1];\n console.log(\"initializeObs response1: \"+ JSON.stringify(response1));\n console.log(\"initializeObs response2: \"+ JSON.stringify(response2));\n // console.log(\"initializeOb - response1.username: \" + response1.username);\n // console.log(\"initializeOb - !response1.username: \" + !response1.username);\n // console.log(\"initializeOb - !response1.hasOwnProperty('username'): \" + !response1.hasOwnProperty('username'));\n\n if (!response1.username || !response1.hasOwnProperty('username') ){\n console.log(\"blank or empty user_name\");\n const username = localStorage.getItem('loggedInUser');\n const currenttime:Date = new Date();\n const dateString: string = moment(currenttime).format('MMMM Do YYYY, h:mm:ss a Z');\n this.userProfile = new UserProfile(username,[],0,0,currenttime.getTime(), dateString);\n }\n else{\n this.userProfile = response1;\n if(this.userProfile.hasOwnProperty(\"AwardDollarDates\")){\n localStorage.setItem(\"AwardDollarDates\", JSON.stringify( this.userProfile.AwardDollarDates));\n }\n localStorage.setItem(\"AwardDollar\", JSON.stringify(this.userProfile.dollars));\n }\n this.userProfileFixed = response2;\n this.saveProfileToDevice();\n this.initialLoading.next(false);\n }\n ));\n }\n\n fetchUserProfile(){\n //get userProfile from server\n console.log(\"user-profile.service.ts - fetchUserProfile method\");\n let getProfile = this.http.post(environment.userServer+'/userinfo',{\"empty\":\"empty\"}); \n\n return getProfile\n .pipe(tap(\n response =>\n {\n let serverCopyNewer = false;\n console.log(\"fetchUserProfile response: \"+ JSON.stringify(response));\n // check if server copy is newer\n if(response.hasOwnProperty(\"lastupdate\") && response.lastupdate > this.userProfile.lastupdate)\n {\n this.userProfile = response;\n if(this.userProfile.hasOwnProperty(\"AwardDollarDates\")){\n localStorage.setItem(\"AwardDollarDates\", JSON.stringify( this.userProfile.AwardDollarDates));\n }\n localStorage.setItem(\"AwardDollar\", JSON.stringify(this.userProfile.dollars));\n this.userProfileFixed = response;\n this.saveProfileToDevice();\n serverCopyNewer = true;\n }\n else{\n serverCopyNewer = false;\n } \n return { \"serverCopyNewer\": serverCopyNewer}\n }\n ));\n }\n\n\n fetchUserProfileFixed(){\n //get userProfileFixed from server\n console.log(\"user-profile.service.ts - fetchUserProfileFixed method\");\n let getProfileFixed = this.http.get(environment.userServer+'/userinfofixed');\n\n return getProfileFixed\n .pipe(tap(\n response =>\n {\n let changed = false;\n console.log(\"fetchUserProfileFixed response: \"+ JSON.stringify(response));\n let receivedUserFixedProfile:UserProfileFixed = response;\n if(receivedUserFixedProfile.isActive !== this.userProfileFixed.isActive){\n this.userProfileFixed = response;\n this.saveProfileToDevice();\n changed = true;\n }\n return { \"changed\": changed}\n }\n ));\n }\n\n addOneSignalPlayerId(){\n this.oneSignal.getIds().then(async (id) => {\n const playerId = id.userId;\n this.userProfile.oneSignalPlayerId = id.userId;\n console.log(\"onesignal player id: \" + id);\n this.saveProfileToDevice();\n this.saveToServer();\n });\n }\n /* \n addReinforcementData returns true if successful at adding the element (it doesn't already exist for the given date)\n date is a string of the format YYYYMMDD (e.g. \"20170430\")\n \n reinforcementObj is an object of the form:\n {\n \"ds\": 1, //means participants completed the survey\n \"prob\": 0.23,\n \"Like\": \"yes\", //no if participants hated it.\n \"reward\": 1, //0 means users were not randomized\n \"reward_type\": \"meme\", //'altruistic message'\n \"reward_img_link\": \"img/reinforcements/memes/IM25.jpg\"\n }\n */\n addReinforcementData(date:string, reinforcementObj:any):boolean{\n if(!(date in this.userProfile.reinfrocement_data)){\n this.userProfile.reinfrocement_data[date] = reinforcementObj;\n return true;\n }\n else{\n return false;\n }\n }\n\n // not currenlty using below method (wich calcs dollars based on days survey is taken in UserProfile)\n // instead allowing award-dollar.service to calc streaks\n calcDollars(){\n //this method calculates the number of three day streaks\n //then sets dollars = to number of three day streaks\n let previousDate = new Date(\"1970-01-01\");\n let numStreaks = 0;\n let streak = 1;\n // console.log(\"calcDollars, # dates: \" + this.userProfile.datesTaken.length);\n for(var i=0;i{\n console.log(response);\n this.saveToServerRequestInQueue = false;\n });\n }\n else{\n this.saveToServerSub = this.networkSvc.onNetworkChange().subscribe(()=>{\n if(this.networkSvc.getCurrentNetworkStatus() == ConnectionStatus.Online){\n this.loadProfileFromDevice(); \n const userProfile: UserProfile = this.userProfile;\n \n this.http\n .post(environment.userServer+'/setuserinfo',userProfile)\n .subscribe(response =>{\n console.log(response);\n this.saveToServerRequestInQueue = false;\n this.saveToServerSub.unsubscribe();\n });\n }\n });\n\n }\n\n\n // console.log(\"saveToServer userProfile: \" + JSON.stringify(userProfile));\n } \n\n retrieve(userID: string){\n }\n getProfile(){\n }\n\n initTestProfile(){\n const currenttime:Date = new Date();\n const dateString: string = moment(currenttime).format('MMMM Do YYYY, h:mm:ss a Z');\n const userProfile = new UserProfile('testy', [], 0, 3, currenttime.getTime(), dateString);\n this.userProfile = userProfile;\n this.saveProfileToDevice();\n //STORE ON DEVICE\n }\n\n saveProfileToDevice(){\n localStorage.setItem('userProfile', JSON.stringify(this.userProfile));\n \n // maybe use this logic in case it's undefined: https://stackoverflow.com/questions/37417012/unexpected-token-u-in-json-at-position-0\n localStorage.setItem('userProfileFixed', JSON.stringify(this.userProfileFixed));\n\n }\n\n profileIsOnDevice(){\n if(localStorage.getItem('userProfile')!==null){\n return true;\n }\n else{\n return false;\n }\n }\n\n loadProfileFromDevice(){\n this.userProfile = JSON.parse(localStorage.getItem('userProfile'));\n this.userProfileFixed = JSON.parse(localStorage.getItem('userProfileFixed'));\n //temporarily commenting out below line (see other instance for more info)\n // this.userProfileFixed = JSON.parse(localStorage.getItem('userProfileFixed'));\n\n }\n\n // below method can be called when a survey has been completed\n // it does all the needed accounting\n // adds current date to dict (and array)\n public surveyCompleted(){\n console.log(\"user-profile.service.ts - surveyCompleted method - begin\");\n\n const username = localStorage.getItem('loggedInUser'); //this.authService.loggedInUser.getValue()\n // check if survey has already been take for the current day or admin is contained in the username\n // console.log('surveyCompleted - before if loop');\n if(!this.surveyTakenForCurrentDay()|| username.indexOf('admin')>=0){\n // console.log('surveyCompleted - in if loop');\n this.addDateTaken();\n this.addSurveyPoints();\n //this.calcDollars();\n this.userProfile.lastupdate =this.numericCurrenDateTime;\n const dateString: string = moment(this.userProfile.lastupdate).format('MMMM Do YYYY, h:mm:ss a Z');\n this.userProfile.readable_ts = dateString;\n // console.log(\"in SurveyCompleted, AwardDollarDates: \"+ localStorage.getItem(\"AwardDollarDates\"));\n this.userProfile.AwardDollarDates = JSON.parse(localStorage.getItem(\"AwardDollarDates\")); //fetch AwardDollarDates from local storage and add it to the UserProfile\n try{\n this.userProfile.dollars = JSON.parse(localStorage.getItem(\"AwardDollar\"));\n }catch(error){\n window.localStorage.setItem(\"AwardDollar\", \"\"+0); \n this.userProfile.dollars = 0;\n }\n this.saveProfileToDevice();\n this.saveToServer();\n }\n }\n\n get stringCurrenDate(){\n console.log(\"user-profile.service.ts - stringCurrenDate getter - begin\");\n \n //shift hours back by 2, so that 2am, will register as 12am\n const hoursShift: number = 2;\n const currentDateTime : Date = new Date();\n currentDateTime.setHours(currentDateTime.getHours() - hoursShift);\n //now, set hours, min, sec to zero\n currentDateTime.setHours(0,0,0,0);\n return currentDateTime.getFullYear()\n + \"\" + ('0' + (currentDateTime.getMonth()+1)).slice(-2) \n + \"\" + ('0' + currentDateTime.getDate()).slice(-2);\n }\n \n get numericCurrenDateTime(){\n console.log(\"user-profile.service.ts - numericCurrenDateTime getter - begin\");\n\n //shift hours back by 2, so that 2am, will register as 12am\n const hoursShift: number = 2;\n const currentDateTime : Date = new Date();\n currentDateTime.setHours(currentDateTime.getHours() - hoursShift);\n //now, set hours, min, sec to zero\n currentDateTime.setHours(0,0,0,0);\n return currentDateTime.getTime();\n }\n\n addDateTaken(){\n console.log(\"user-profile.service.ts - addDateTaken method - begin\");\n\n this.loadProfileFromDevice();\n const stringCurrenDate = this.stringCurrenDate;\n this.userProfile.datesTaken.push(stringCurrenDate);\n this.userProfile.survey_data.daily_survey[stringCurrenDate] = 1;\n this.saveProfileToDevice();\n }\n\n // boolean function, checks if survey has been taken for the current date.\n surveyTakenForCurrentDay(){\n console.log(\"user-profile.service.ts - surveyTakenForCurrentDay method - begin\");\n\n this.loadProfileFromDevice();\n //check if date already exists in dict of dates, otherwise add the date to dict \n // var hasMatch = false;\n if( this.stringCurrenDate in this.userProfile.survey_data.daily_survey){\n return true;\n }\n else{\n return false;\n }\n }\n\n addSurveyPoints(){\n console.log(\"user-profile.service.ts - addSurveyPoints method - begin\");\n\n const pointsPerSurvey = 60;\n this.addPoints(pointsPerSurvey);\n }\n\n addPoints(points: number){\n console.log(\"user-profile.service.ts - addPoints method - begin\");\n \n this.userProfile.points += points;\n this.userProfile.survey_data.points += points;\n this.saveProfileToDevice();\n this.saveToServer();\n }\n\n cheatPoints(points: number){\n console.log(\"user-profile.service.ts - cheatPoints method - begin\");\n\n this.userProfile.points = points;\n this.userProfile.survey_data.points = points;\n this.saveProfileToDevice();\n this.saveToServer();\n }\n\n\n removeUserProfile(){\n localStorage.removeItem('userProfile');\n }\n\n}\n","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AuthComponent } from './auth/auth.component';\nimport { FormsModule } from '@angular/forms';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { IonicModule } from '@ionic/angular';\nimport { AuthService } from './auth/auth.service';\nimport { environment } from 'src/environments/environment';\nimport { AngularFireModule } from '@angular/fire';\nimport { AngularFireAuthModule } from '@angular/fire/auth';\nimport { UserProfileService } from './user-profile/user-profile.service';\nimport { UserProfile } from './user-profile/user-profile.model';\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\nimport { TokenInterceptor } from './auth/token.interceptor';\nimport { LoadingSpinnerComponent } from './auth/loading-spinner/loading-spinner.component';\n\n@NgModule({\n declarations: [AuthComponent, LoadingSpinnerComponent],\n imports: [\n CommonModule,\n FormsModule,\n IonicModule.forRoot(),\n // AngularFireModule.initializeApp(environment.firebase),\n AngularFireAuthModule\n \n ],\n exports: [AuthComponent],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: TokenInterceptor,\n multi: true\n }\n // , UserProfile\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class UserModule { }\n\nexport { UserProfile } from './user-profile/user-profile.model';\n","// This file can be replaced during build by using the `fileReplacements` array.\r\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\r\n// The list of file replacements can be found in `angular.json`.\r\n\r\n\r\nexport const environment = {\r\n production: false,\r\n //userServer:\"http://adaptsdata.research.chop.edu:5000\",\r\n userServer:\"http://52.201.144.36:5000\",\r\n oneSignalAppId: \"f9c4370d-cbcb-4e6f-ab1f-25d1c41b8f3a\",\r\n //oneSignalAppId: \"de3580a2-4aae-42c4-87cf-2c319c2df0c3\",\r\n encyptString: \"+Xr?SwA?EJ7m+g$c\",\r\n flaskServerForIncentives: \"http://ec2-52-201-144-36.compute-1.amazonaws.com:56733\",\r\n //flaskServerForIncentives: \"http://adaptsdata.research.chop.edu:5000\",\r\n\r\n firebaseConfig: {\r\n apiKey: \"AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0\",\r\n authDomain: \"sarav2-6a033.firebaseapp.com\",\r\n databaseURL: \"https://sarav2-6a033.firebaseio.com\",\r\n projectId: \"sarav2-6a033\",\r\n storageBucket: \"sarav2-6a033.appspot.com\",\r\n messagingSenderId: \"110945766941\", // only one updated\r\n appId: \"1:489827689493:web:7f72eb7033e9acf5\"\r\n },\r\n​\r\n azureConfig: {\r\n sas: '?sv=2018-03-28&ss=b&srt=sco&sp=rwl&st=2019-06-27T18%3A15%3A56Z&se=2020-06-28T18%3A15%3A00Z&sig=vccYOEN3SG%2BErA4%2FzmDNn0w4qOn%2FT4tB8jGnEIJoXh4%3D',\r\n storageAccount: 'securebloblyh',\r\n containerName: 'mycontainer' \r\n },\r\n​\r\n awsConfig: {\r\n /* \r\n // CHOP\r\n bucketName: 'chop-sara', \r\n bucketRegion: 'us-east-1', \r\n IdentityPoolId: 'us-east-1:667b1ad5-ccdc-4d90-b94f-300732b55448'\r\n */\r\n\r\n //Harvard\r\n bucketName: 'sara-dev-data-storage', \r\n bucketRegion: 'us-east-2', \r\n IdentityPoolId: 'us-east-2:bce8a68d-d3f3-4ac1-a16c-eab1d92597a4'\r\n\r\n },\r\n​\r\n googleAnalytic: {\r\n id: 'UA-152399644-1' \r\n }\r\n \r\n​}\r\n​\r\n\r\n\r\n\r\n\r\n// export const environment = {\r\n// production: false,\r\n// userServer:\"http://autherServerName.com\",\r\n// oneSignalAppId: \"\",\r\n\r\n// firebase: {\r\n// apiKey: \"AIzaSyDM8d1yG2rNPc8AotB0NoN3Q2wMq4HDooo\",\r\n// authDomain: \"adapts-331ee.firebaseapp.com\",\r\n// databaseURL: \"https://adapts-331ee.firebaseio.com\",\r\n// projectId: \"adapts-331ee\",\r\n// storageBucket: \"adapts-331ee.appspot.com\",\r\n// messagingSenderId: \"110945766941\",\r\n// appId: \"1:110945766941:web:7c940aefa53553c39bc0f4\",\r\n// measurementId: \"G-TL8MFZNE2M\"\r\n// // apiKey: \"AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0\",\r\n// // authDomain: \"sarav2-6a033.firebaseapp.com\",\r\n// // databaseURL: \"https://sarav2-6a033.firebaseio.com\",\r\n// // projectId: \"sarav2-6a033\",\r\n// // storageBucket: \"sarav2-6a033.appspot.com\",\r\n// // messagingSenderId: \"489827689493\",\r\n// // appId: \"1:489827689493:web:7f72eb7033e9acf5\"\r\n// },\r\n\r\n// firebaseConfig: {\r\n// // apiKey: \"AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0\",\r\n// // authDomain: \"sarav2-6a033.firebaseapp.com\",\r\n// // databaseURL: \"https://sarav2-6a033.firebaseio.com\",\r\n// // projectId: \"sarav2-6a033\",\r\n// // storageBucket: \"sarav2-6a033.appspot.com\",\r\n// messagingSenderId: \"489827689493\",\r\n// // appId: \"1:489827689493:web:7f72eb7033e9acf5\"\r\n \r\n// }\r\n\r\n// };\r\n\r\n\r\n\r\n\r\n/*\r\n * For easier debugging in development mode, you can import the following file\r\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\r\n *\r\n * This import should be commented out in production mode because it will have a negative impact\r\n * on performance if an error is thrown.\r\n */\r\n// import 'zone.js/dist/zone-error'; // Included with Angular CLI.\r\n","\nimport './polyfills.ts';\n\nimport { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.log(err));\n","/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\n * file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/** IE10 and IE11 requires the following for NgClass support on SVG elements */\n// import 'classlist.js'; // Run `npm install --save classlist.js`.\n\n/**\n * Web Animations `@angular/platform-browser/animations`\n * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.\n * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).\n */\n// import 'web-animations-js'; // Run `npm install --save web-animations-js`.\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags.ts';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n * (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n\nimport './zone-flags.ts';\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\n\nimport 'zone.js/dist/zone'; // Included with Angular CLI.\n\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n\n // aws-sdk requires global to exist\n(window as any).global = window;\n\n","/**\n * Prevents Angular change detection from\n * running with certain Web Component callbacks\n */\n(window as any).__Zone_disable_customElements = true;\n","/* (ignored) */"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/android.json b/plugins/android.json new file mode 100644 index 000000000..1677f29be --- /dev/null +++ b/plugins/android.json @@ -0,0 +1,54 @@ +{ + "prepare_queue": { + "installed": [], + "uninstalled": [] + }, + "config_munge": { + "files": {} + }, + "installed_plugins": { + "cordova-plugin-device": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "cordova-plugin-ionic-keyboard": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "cordova-plugin-splashscreen": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "cordova-plugin-statusbar": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "cordova-plugin-whitelist": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "onesignal-cordova-plugin": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "uk.co.workingedge.cordova.plugin.sqliteporter": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "cordova-sqlite-storage": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "cordova-plugin-ionic-webview": { + "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+", + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "sentry-cordova": { + "SENTRY_ANDROID_SDK_VERSION": "1+", + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "phonegap-plugin-mobile-accessibility": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + } + }, + "dependent_plugins": { + "cordova-plugin-app-version": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + }, + "cordova-plugin-network-information": { + "PACKAGE_NAME": "edu.harvard.srl.SARA" + } + } +} diff --git a/plugins/cordova-plugin-app-version/CHANGELOG.md b/plugins/cordova-plugin-app-version/CHANGELOG.md new file mode 100644 index 000000000..1b7882025 --- /dev/null +++ b/plugins/cordova-plugin-app-version/CHANGELOG.md @@ -0,0 +1,42 @@ +### 0.1.9 +* Renamed Windows8 platform to Windows + +### 0.1.7 + +* Add getPackageName feature (thanks to @gprasanth) +* Add getAppName feature (thanks to @mirko77) +* Fix for windows 8 (thanks to @deliriousrhino) +* Fix version number in plugin.xml file + +### 0.1.6 + +* Split into two functions getAppVersion.getVersionNumber() and getAppVersion.getVersionCode() to return build number +* Fix a deprecation warning in iOS version + +### 0.1.5 + +* iOS: Return version number but log and fall back to build number if it is nil (thanks to [Eddy Verbruggen](https://github.com/EddyVerbruggen)) + +### 0.1.4 + +* Return version number, not build number on iOS (thanks to http://www.humancopy.net) +* Support for Windows phone 8 (thanks to Cristi Badila / Gediminas Å altenis) +* Support for AngularJS as well as jQuery (thanks to Matias Singers, [Red Ape Solutions](http://www.redapesolutions.com/)) + +### 0.1.3 + +* Fixes to Android for Corova 3 and above (thanks to AxoInsanit) + +### 0.1.2 + +* Updated for Cordova 3 and above (thanks to Russell Keith-Magee [freakboy3742](https://github.com/freakboy3742) + +### 0.1.1 + +* Improved README +* Bug fix for non-jQuery use +* Tidy plugin.xml + +### 0.1.0 + +* First release diff --git a/plugins/cordova-plugin-app-version/LICENSE b/plugins/cordova-plugin-app-version/LICENSE new file mode 100644 index 000000000..484859fde --- /dev/null +++ b/plugins/cordova-plugin-app-version/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 White October + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/cordova-plugin-app-version/README.md b/plugins/cordova-plugin-app-version/README.md new file mode 100644 index 000000000..3f333de16 --- /dev/null +++ b/plugins/cordova-plugin-app-version/README.md @@ -0,0 +1,71 @@ +# Cordova AppVersion plugin + +Reads the version of your app from the target build settings. + +## Installation + +### With cordova-cli + +If you are using [cordova-cli](https://github.com/apache/cordova-cli), install +with: + + cordova plugin add cordova-plugin-app-version + +### With plugman + +With a plain [plugman](https://github.com/apache/cordova-plugman), you should be +able to install with something like: + + plugman --platform --project --plugin https://github.com/whiteoctober/cordova-plugin-app-version.git + +### Manually in iOS + +TODO: Write these instructions + +### Manually in Android + +TODO: Write these instructions + +## Use from Javascript + +If you are using jQuery, AngularJS, WinJS or any Promise/A library (Bluebird), promise style is supported. Use something like: + + cordova.getAppVersion.getVersionNumber().then(function (version) { + $('.version').text(version); + }); + +If not, pass a callback function: + + cordova.getAppVersion.getVersionNumber(function (version) { + alert(version); + }); + +In addition to the version number you can also retrieve other details about your application: + +### getAppName + +Returns the name of the app. E.g. "My Awesome App" + +### getPackageName + +Returns the package name of the app - the reversed domain name app identifier like com.example.myawesomeapp + +### getVersionCode + +Returns the build identifier of the app + +### getVersionNumber + +Returns the version number of the app + +## Credits + +Written by [Robert (Jamie) Munro](http://twitter.com/rjmunro) at +[White October](http://whiteoctober.co.uk/) + +Various others have contributed fixes and new features. See the CHANGELOG.md for details. + +Original code based on the following Stack Overflow posts: + +* [iOS](http://stackoverflow.com/a/14713364/3408) +* [Android](http://stackoverflow.com/a/3637686/3408) diff --git a/plugins/cordova-plugin-app-version/VERSION b/plugins/cordova-plugin-app-version/VERSION new file mode 100644 index 000000000..1a030947e --- /dev/null +++ b/plugins/cordova-plugin-app-version/VERSION @@ -0,0 +1 @@ +0.1.9 diff --git a/plugins/cordova-plugin-app-version/package.json b/plugins/cordova-plugin-app-version/package.json new file mode 100644 index 000000000..502c3599e --- /dev/null +++ b/plugins/cordova-plugin-app-version/package.json @@ -0,0 +1,56 @@ +{ + "_args": [ + [ + "cordova-plugin-app-version@0.1.9", + "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular" + ] + ], + "_from": "cordova-plugin-app-version@0.1.9", + "_id": "cordova-plugin-app-version@0.1.9", + "_inBundle": false, + "_integrity": "sha1-nbBgeGMzenEEiTAuX1CpBPFEm9s=", + "_location": "/cordova-plugin-app-version", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cordova-plugin-app-version@0.1.9", + "name": "cordova-plugin-app-version", + "escapedName": "cordova-plugin-app-version", + "rawSpec": "0.1.9", + "saveSpec": null, + "fetchSpec": "0.1.9" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/cordova-plugin-app-version/-/cordova-plugin-app-version-0.1.9.tgz", + "_spec": "0.1.9", + "_where": "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular", + "author": { + "name": "whiteoctober" + }, + "bugs": { + "url": "https://github.com/whiteoctober/cordova-plugin-app-version/issues" + }, + "description": "Cordova plugin to return the version number of the current app", + "homepage": "https://github.com/whiteoctober/cordova-plugin-app-version#readme", + "keywords": [ + "cordova", + "ecosystem:cordova", + "app", + "version", + "appversion", + "plugin" + ], + "license": "MIT", + "name": "cordova-plugin-app-version", + "repository": { + "type": "git", + "url": "git+https://github.com/whiteoctober/cordova-plugin-app-version.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "0.1.9" +} diff --git a/plugins/cordova-plugin-app-version/plugin.xml b/plugins/cordova-plugin-app-version/plugin.xml new file mode 100644 index 000000000..97ff02cb5 --- /dev/null +++ b/plugins/cordova-plugin-app-version/plugin.xml @@ -0,0 +1,79 @@ + + + + AppVersion + + This plugin will return the version of your App that you have set in + packaging it. I.e. it will always match the version in the app store. + + MIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-app-version/src/android/AppVersion.java b/plugins/cordova-plugin-app-version/src/android/AppVersion.java new file mode 100644 index 000000000..204ed7e86 --- /dev/null +++ b/plugins/cordova-plugin-app-version/src/android/AppVersion.java @@ -0,0 +1,45 @@ +package uk.co.whiteoctober.cordova; + +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CallbackContext; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager.NameNotFoundException; +import android.content.pm.PackageManager; + +public class AppVersion extends CordovaPlugin { + @Override + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + + try { + if (action.equals("getAppName")) { + PackageManager packageManager = this.cordova.getActivity().getPackageManager(); + ApplicationInfo app = packageManager.getApplicationInfo(this.cordova.getActivity().getPackageName(), 0); + callbackContext.success((String)packageManager.getApplicationLabel(app)); + return true; + } + if (action.equals("getPackageName")) { + callbackContext.success(this.cordova.getActivity().getPackageName()); + return true; + } + if (action.equals("getVersionNumber")) { + PackageManager packageManager = this.cordova.getActivity().getPackageManager(); + callbackContext.success(packageManager.getPackageInfo(this.cordova.getActivity().getPackageName(), 0).versionName); + return true; + } + if (action.equals("getVersionCode")) { + PackageManager packageManager = this.cordova.getActivity().getPackageManager(); + callbackContext.success(packageManager.getPackageInfo(this.cordova.getActivity().getPackageName(), 0).versionCode); + return true; + } + return false; + } catch (NameNotFoundException e) { + callbackContext.success("N/A"); + return true; + } + } + +} diff --git a/plugins/cordova-plugin-app-version/src/ios/AppVersion.h b/plugins/cordova-plugin-app-version/src/ios/AppVersion.h new file mode 100644 index 000000000..87c0330bc --- /dev/null +++ b/plugins/cordova-plugin-app-version/src/ios/AppVersion.h @@ -0,0 +1,13 @@ +#import + +@interface AppVersion : CDVPlugin + +- (void)getAppName:(CDVInvokedUrlCommand*)command; + +- (void)getPackageName:(CDVInvokedUrlCommand*)command; + +- (void)getVersionNumber:(CDVInvokedUrlCommand*)command; + +- (void)getVersionCode:(CDVInvokedUrlCommand*)command; + +@end diff --git a/plugins/cordova-plugin-app-version/src/ios/AppVersion.m b/plugins/cordova-plugin-app-version/src/ios/AppVersion.m new file mode 100644 index 000000000..a73c78f98 --- /dev/null +++ b/plugins/cordova-plugin-app-version/src/ios/AppVersion.m @@ -0,0 +1,47 @@ +#import "AppVersion.h" +#import + +@implementation AppVersion + +- (void)getAppName : (CDVInvokedUrlCommand *)command +{ + NSString * callbackId = command.callbackId; + NSString * version =[[[NSBundle mainBundle]infoDictionary]objectForKey :@"CFBundleDisplayName"]; + CDVPluginResult * pluginResult =[CDVPluginResult resultWithStatus : CDVCommandStatus_OK messageAsString : version]; + [self.commandDelegate sendPluginResult : pluginResult callbackId : callbackId]; +} + +- (void)getPackageName:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* packageName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:packageName]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; +} + +- (void)getVersionNumber:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; + if (version == nil) { + NSLog(@"CFBundleShortVersionString was nil, attempting CFBundleVersion"); + version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]; + if (version == nil) { + NSLog(@"CFBundleVersion was also nil, giving up"); + // not calling error callback here to maintain backward compatibility + } + } + + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:version]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; +} + +- (void)getVersionCode:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:version]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId]; +} + +@end diff --git a/plugins/cordova-plugin-app-version/src/windows/AppVersionProxy.js b/plugins/cordova-plugin-app-version/src/windows/AppVersionProxy.js new file mode 100644 index 000000000..9c1792785 --- /dev/null +++ b/plugins/cordova-plugin-app-version/src/windows/AppVersionProxy.js @@ -0,0 +1,33 @@ +AppVersionProxy = { + getVersionNumber: function (successCallback, failCallback, args) { + var version = Windows.ApplicationModel.Package.current.id.version; + successCallback([version.major, version.minor, version.build, version.revision].join('.')); + }, + getAppName: function (successCallback, failCallback, args) { + if(Windows.ApplicationModel.Package.current && Windows.ApplicationModel.Package.current.displayName){ + var name = Windows.ApplicationModel.Package.current.displayName; + successCallback(name); + } else { + Windows.ApplicationModel.Package.current.installedLocation.getFileAsync("AppxManifest.xml").then(function (file) { + Windows.Data.Xml.Dom.XmlDocument.loadFromFileAsync(file).then(function (xdoc) { + var displayName = xdoc.getElementsByTagName("DisplayName"); + if (displayName && displayName.length === 1) { + var name = displayName[0].innerText; + successCallback(name); + } else { + (failCallback || function(){})({ code: -1, message: "ERR_DISPLAY_NAME_NOT_FOUND" }); + } + }, (failCallback || function(){})); + }, (failCallback || function(){})); + } + }, + getPackageName: function (successCallback, failCallback, args) { + var name = Windows.ApplicationModel.Package.current.id.name; + successCallback(name); + }, + getVersionCode: function (successCallback, failCallback, args) { + var build = Windows.ApplicationModel.Package.current.id.version.build; + successCallback(build); + } +}; +cordova.commandProxy.add("AppVersion", AppVersionProxy); diff --git a/plugins/cordova-plugin-app-version/src/wp8/AppVersion.cs b/plugins/cordova-plugin-app-version/src/wp8/AppVersion.cs new file mode 100644 index 000000000..bb94ab086 --- /dev/null +++ b/plugins/cordova-plugin-app-version/src/wp8/AppVersion.cs @@ -0,0 +1,53 @@ +using System; +using System.Reflection; +using System.Xml.Linq; +using Windows.ApplicationModel; +using WPCordovaClassLib.Cordova; +using WPCordovaClassLib.Cordova.Commands; + +namespace Cordova.Extension.Commands +{ + public class AppVersion : BaseCommand + { + public void getVersionNumber(string empty) + { + string version; + if (Environment.OSVersion.Version.Major <= 8) + { + // Package.Current.Id is NOT working in Windows Phone 8 + // Workaround based on http://stackoverflow.com/questions/14371275/how-can-i-get-my-windows-store-apps-title-and-version-info + version = XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value; + } + else + { + version = Package.Current.Id.Version.ToString(); + } + + this.DispatchCommandResult(new PluginResult(PluginResult.Status.OK, version)); + } + + public void getAppName(string empty) + { + string name; + if (Environment.OSVersion.Version.Major <= 8) + { + //Windows.ApplicationModel.Package.Current.Id is NOT working in Windows Phone 8 + //Workaround based on http://stackoverflow.com/questions/14371275/how-can-i-get-my-windows-store-apps-title-and-version-info + name = XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Title").Value; + } + else + { + name = Package.Current.Id.Name; + } + + this.DispatchCommandResult(new PluginResult(PluginResult.Status.OK, name)); + } + + public void getPackageName(string empty) + { + string package = Assembly.GetExecutingAssembly().GetName().Name; + + this.DispatchCommandResult(new PluginResult(PluginResult.Status.OK, package)); + } + } +} \ No newline at end of file diff --git a/plugins/cordova-plugin-device/.appveyor.yml b/plugins/cordova-plugin-device/.appveyor.yml new file mode 100644 index 000000000..a7b2426e0 --- /dev/null +++ b/plugins/cordova-plugin-device/.appveyor.yml @@ -0,0 +1,28 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml + +max_jobs: 1 + +shallow_clone: true + +init: + - git config --global core.autocrlf true + +image: + - Visual Studio 2017 + +environment: + nodejs_version: "4" + matrix: + - PLATFORM: windows-10-store + JUST_BUILD: --justBuild +install: + - npm cache clean -f + - node --version + - npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git + - npm install -g cordova + +build: off + +test_script: + - cordova-paramedic --config pr\%PLATFORM% --plugin . %JUST_BUILD% diff --git a/plugins/cordova-plugin-device/.eslintrc.yml b/plugins/cordova-plugin-device/.eslintrc.yml new file mode 100644 index 000000000..0cccb8c7a --- /dev/null +++ b/plugins/cordova-plugin-device/.eslintrc.yml @@ -0,0 +1,10 @@ +root: true +extends: semistandard +rules: + indent: + - error + - 4 + camelcase: off + padded-blocks: off + operator-linebreak: off + no-throw-literal: off \ No newline at end of file diff --git a/plugins/cordova-plugin-device/.github/PULL_REQUEST_TEMPLATE.md b/plugins/cordova-plugin-device/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..91582f4ef --- /dev/null +++ b/plugins/cordova-plugin-device/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,22 @@ + + +### Platforms affected + + +### What does this PR do? + + +### What testing has been done on this change? + + +### Checklist +- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database +- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. +- [ ] Added automated test coverage as appropriate for this change. diff --git a/plugins/cordova-plugin-device/.npmignore b/plugins/cordova-plugin-device/.npmignore new file mode 100644 index 000000000..6964ea05b --- /dev/null +++ b/plugins/cordova-plugin-device/.npmignore @@ -0,0 +1,23 @@ +#If ignorance is bliss, then somebody knock the smile off my face + +*.csproj.user +*.suo +*.cache +Thumbs.db +*.DS_Store + +*.bak +*.cache +*.log +*.swp +*.user + +node_modules + + + + + + + + \ No newline at end of file diff --git a/plugins/cordova-plugin-device/.travis.yml b/plugins/cordova-plugin-device/.travis.yml new file mode 100644 index 000000000..ae0b308e0 --- /dev/null +++ b/plugins/cordova-plugin-device/.travis.yml @@ -0,0 +1,87 @@ +sudo: false +addons: + jwt: + secure: egTo2EERSKVWdBoP+6ewd/JIyyly2XTT1xOVj27v2L148c453uRNPjXwiGRYu7vTw5rkGK+H54n4FG3rUOuEVNX9NDNC5TlkhTfmecXNzjyOIuV7xD0qg5s6Q3IXg8kAp9+JXWbVVR6hoPzmAAnTT4rcoh6cPg4Tf327W2sRGkw= +env: + global: + - SAUCE_USERNAME=snay + - TRAVIS_NODE_VERSION="4.2" +matrix: + include: + - env: PLATFORM=browser-chrome + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-firefox + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-safari + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-edge + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=ios-9.3 + os: osx + osx_image: xcode7.3 + language: node_js + node_js: '4.2' + - env: PLATFORM=ios-10.0 + os: osx + osx_image: xcode7.3 + language: node_js + node_js: '4.2' + - env: PLATFORM=android-4.4 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - build-tools-26.0.2 + - env: PLATFORM=android-5.1 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - build-tools-26.0.2 + - env: PLATFORM=android-6.0 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - build-tools-26.0.2 + - env: PLATFORM=android-7.0 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - build-tools-26.0.2 +before_install: +- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm + && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm + install $TRAVIS_NODE_VERSION +- node --version +- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi +- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi +- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26; + fi +- git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic + && npm install && popd +- npm install -g cordova +install: +- npm install +script: +- npm test +- node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce + --buildName travis-plugin-device-$TRAVIS_JOB_NUMBER + diff --git a/plugins/cordova-plugin-device/CONTRIBUTING.md b/plugins/cordova-plugin-device/CONTRIBUTING.md new file mode 100644 index 000000000..4c8e6a5ea --- /dev/null +++ b/plugins/cordova-plugin-device/CONTRIBUTING.md @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff --git a/plugins/cordova-plugin-device/LICENSE b/plugins/cordova-plugin-device/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/plugins/cordova-plugin-device/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-device/NOTICE b/plugins/cordova-plugin-device/NOTICE new file mode 100644 index 000000000..8ec56a524 --- /dev/null +++ b/plugins/cordova-plugin-device/NOTICE @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/plugins/cordova-plugin-device/README.md b/plugins/cordova-plugin-device/README.md new file mode 100644 index 000000000..048f02890 --- /dev/null +++ b/plugins/cordova-plugin-device/README.md @@ -0,0 +1,267 @@ +--- +title: Device +description: Get device information. +--- + + +|AppVeyor|Travis CI| +|:-:|:-:| +|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-device?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-device)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)| + +# cordova-plugin-device + +This plugin defines a global `device` object, which describes the device's hardware and software. +Although the object is in the global scope, it is not available until after the `deviceready` event. + +```js +document.addEventListener("deviceready", onDeviceReady, false); +function onDeviceReady() { + console.log(device.cordova); +} +``` + +Report issues with this plugin on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Device%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) + + +## Installation + + cordova plugin add cordova-plugin-device + +## Properties + +- device.cordova +- device.model +- device.platform +- device.uuid +- device.version +- device.manufacturer +- device.isVirtual +- device.serial + +## device.cordova + +Get the version of Cordova running on the device. + +### Supported Platforms + +- Android +- Browser +- iOS +- Windows +- OSX + +## device.model + +The `device.model` returns the name of the device's model or +product. The value is set by the device manufacturer and may be +different across versions of the same product. + +### Supported Platforms + +- Android +- Browser +- iOS +- Windows +- OSX + +### Quick Example + +```js +// Android: Nexus One returns "Passion" (Nexus One code name) +// Motorola Droid returns "voles" +// BlackBerry: Torch 9800 returns "9800" +// Browser: Google Chrome returns "Chrome" +// Safari returns "Safari" +// iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models +// OSX: returns "x86_64" +// +var model = device.model; +``` + +### Android Quirks + +- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`. + +## device.platform + +Get the device's operating system name. + +```js +var string = device.platform; +``` +### Supported Platforms + +- Android +- Browser +- iOS +- Windows +- OSX + +### Quick Example + +```js +// Depending on the device, a few examples are: +// - "Android" +// - "BlackBerry 10" +// - "browser" +// - "iOS" +// - "WinCE" +// - "Tizen" +// - "Mac OS X" +var devicePlatform = device.platform; +``` + +## device.uuid + +Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)). + +```js +var string = device.uuid; +``` + +### Description + +The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model. + +### Supported Platforms + +- Android +- iOS +- Windows +- OSX + +### Quick Example + +```js +// Android: Returns a random 64-bit integer (as a string, again!) +// The integer is generated on the device's first boot +// +// BlackBerry: Returns the PIN number of the device +// This is a nine-digit unique integer (as a string, though!) +// +// iPhone: (Paraphrased from the UIDevice Class documentation) +// Returns the [UIDevice identifierForVendor] UUID which is unique and the same for all apps installed by the same vendor. However the UUID can be different if the user deletes all apps from the vendor and then reinstalls it. +// Windows Phone 7 : Returns a hash of device+current user, +// if the user is not defined, a guid is generated and will persist until the app is uninstalled +// Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number +// unique to every GSM and UMTS mobile phone. +var deviceID = device.uuid; +``` + +### iOS Quirk + +The `uuid` on iOS uses the identifierForVendor property. It is unique to the device across the same vendor, but will be different for different vendors and will change if all apps from the vendor are deleted and then reinstalled. +Refer [here](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/occ/instp/UIDevice/identifierForVendor) for details. +The UUID will be the same if app is restored from a backup or iCloud as it is saved in preferences. Users using older versions of this plugin will still receive the same previous UUID generated by another means as it will be retrieved from preferences. + +### OSX Quirk + +The `uuid` on OSX is generated automatically if it does not exist yet and is stored in the `standardUserDefaults` in the `CDVUUID` property. + +## device.version + +Get the operating system version. + + var string = device.version; + +### Supported Platforms + +- Android 2.1+ +- Browser +- iOS +- Windows +- OSX + +### Quick Example + +```js +// Android: Froyo OS would return "2.2" +// Eclair OS would return "2.1", "2.0.1", or "2.0" +// Version can also return update level "2.1-update1" +// +// BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" +// +// Browser: Returns version number for the browser +// +// iPhone: iOS 3.2 returns "3.2" +// +// Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 +// Windows 8: return the current OS version, ex on Windows 8.1 returns 6.3.9600.16384 +// Tizen: returns "TIZEN_20120425_2" +// OSX: El Capitan would return "10.11.2" +// +var deviceVersion = device.version; +``` + +## device.manufacturer + +Get the device's manufacturer. + + var string = device.manufacturer; + +### Supported Platforms + +- Android +- iOS +- Windows + +### Quick Example + +```js +// Android: Motorola XT1032 would return "motorola" +// BlackBerry: returns "BlackBerry" +// iPhone: returns "Apple" +// +var deviceManufacturer = device.manufacturer; +``` + +## device.isVirtual + +whether the device is running on a simulator. + +```js +var isSim = device.isVirtual; +``` + +### Supported Platforms + +- Android 2.1+ +- Browser +- iOS +- Windows +- OSX + +### OSX and Browser Quirk + +The `isVirtual` property on OS X and Browser always returns false. + +## device.serial + +Get the device hardware serial number ([SERIAL](http://developer.android.com/reference/android/os/Build.html#SERIAL)). + +```js +var string = device.serial; +``` + +### Supported Platforms + +- Android +- OSX + diff --git a/plugins/cordova-plugin-device/RELEASENOTES.md b/plugins/cordova-plugin-device/RELEASENOTES.md new file mode 100644 index 000000000..12d40082b --- /dev/null +++ b/plugins/cordova-plugin-device/RELEASENOTES.md @@ -0,0 +1,181 @@ + +# Release Notes + +### 2.0.2 (Apr 12, 2018) +* [CB-13893](https://issues.apache.org/jira/browse/CB-13893) **iOS** delete `libz.tbd` from device plugin + +### 2.0.1 (Dec 27, 2017) +* [CB-13702](https://issues.apache.org/jira/browse/CB-13702) Fix to allow 2.0.0 version install + +### 2.0.0 (Dec 15, 2017) +* [CB-13670](https://issues.apache.org/jira/browse/CB-13670) Remove deprecated platforms + +### 1.1.7 (Nov 06, 2017) +* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again +* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) setup `eslint` and removed `jshint` +* [CB-13113](https://issues.apache.org/jira/browse/CB-13113) (browser) `device.isVirtual` is always false +* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis and AppVeyor +* [CB-13000](https://issues.apache.org/jira/browse/CB-13000) (CI) Speed up **Android** builds +* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. + +### 1.1.6 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder +* [CB-12105](https://issues.apache.org/jira/browse/CB-12105) (browser) Properly detect Edge + +### 1.1.5 (Feb 28, 2017) +* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml` +* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` +* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** +* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges + +### 1.1.4 (Dec 07, 2016) +* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.1.4 +* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. + +### 1.1.3 (Sep 08, 2016) +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* Add badges for paramedic builds on Jenkins +* Add pull request template. +* Readme: Add fenced code blocks with langauage hints +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to `README.md` + +### 1.1.2 (Apr 15, 2016) +* Use passed device, follow create policy forf `CFUUIDCreate` +* [CB-10631](https://issues.apache.org/jira/browse/CB-10631) Fix for `device.uuid` in **iOS 5.1.1** +* Updating the comment to exclude URL +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins +* Refactored `deviceInfo` on **iOS** for better readability. + +### 1.1.1 (Jan 15, 2016) +* [CB-10238](https://issues.apache.org/jira/browse/CB-10238) **OSX** Move `device-plugin` out from `cordovalib` to the plugin repository +* [CB-9923](https://issues.apache.org/jira/browse/CB-9923) Update `device.platform` documentation for **Browser** platform + +### 1.1.0 (Nov 18, 2015) +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest +* Add `isVirtual` for **Windows Phone 8.x** +* Added basic **Android** support for hardware serial number +* [CB-9865](https://issues.apache.org/jira/browse/CB-9865) Better simulator detection for **iOS** +* Fixing contribute link. +* Added **WP8** implementation +* update to use `TARGET_OS_SIMULATOR` as `TARGET_IPHONE_SIMULATOR` is deprecated. +* update code to use 'isVirtual' +* create test to verify existence and type of new property 'isVirtual' +* add `isSimulator` for **iOS** & **Android** device +* Updated documentation to mention backwards compatibility +* Updated **README** to reflect new behaviour and quirks on **iOS** +* Check user defaults first to maintain backwards compatibility +* Changed `UUID` to use `[UIDevice identifierForVendor]` + +### 1.0.1 (Jun 17, 2015) +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-device documentation translation: cordova-plugin-device +* Attempts to corrent npm markdown issue + +### 1.0.0 (Apr 15, 2015) +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* remove defunct windows8 version +* add travis badge +* Add cross-plugin ios paramedic test running for TravisCI +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file + +### 0.3.0 (Feb 04, 2015) +* Added device.manufacturer property for Android, iOS, Blackberry, WP8 +* Support for Windows Phone 8 ANID2 ANID is only supported up to Windows Phone 7.5 +* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) Use a local copy of uniqueAppInstanceIdentifier rather than CordovaLib's version +* browser: Fixed a bug that caused an "cannot call method of undefined" error if the browser's user agent wasn't recognized + +### 0.2.13 (Dec 02, 2014) +* Changing `device.platform` to always report the platform as "browser". +* [CB-5892](https://issues.apache.org/jira/browse/CB-5892) - Remove deprecated `window.Settings` +* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-device documentation translation: cordova-plugin-device +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin + +### 0.2.12 (Sep 17, 2014) +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-device documentation translation +* [CB-7552](https://issues.apache.org/jira/browse/CB-7552) device.name docs have not been removed +* [fxos] Fix cordova version +* added status box and documentation to manual tests +* [fxos] Fix cordova version +* added status box and documentation to manual tests +* Added plugin support for the browser +* [CB-7262](https://issues.apache.org/jira/browse/CB-7262) Adds support for universal windows apps. + +### 0.2.11 (Aug 06, 2014) +* [FFOS] update DeviceProxy.js +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs +* Use Windows system calls to get better info + +### 0.2.10 (Jun 05, 2014) +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and French Translations added. Github close #12 +* Changing 1.5 to 2.0 +* added firefoxos version - conversion +* added firefoxos version +* [CB-6800](https://issues.apache.org/jira/browse/CB-6800) Add license +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md + +### 0.2.9 (Apr 17, 2014) +* [CB-5105](https://issues.apache.org/jira/browse/CB-5105): [Android, windows8, WP, BlackBerry10] Removed dead code for device.version +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers +* Add NOTICE file + +### 0.2.8 (Feb 05, 2014) +* Tizen support added + +### 0.2.7 (Jan 07, 2014) +* [CB-5737](https://issues.apache.org/jira/browse/CB-5737) Fix exception on close caused by left over telephony code from [CB-5504](https://issues.apache.org/jira/browse/CB-5504) + +### 0.2.6 (Jan 02, 2014) +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for Device plugin +* [CB-5504](https://issues.apache.org/jira/browse/CB-5504) Moving Telephony Logic out of Device + +### 0.2.5 (Dec 4, 2013) +* [CB-5316](https://issues.apache.org/jira/browse/CB-5316) Spell Cordova as a brand unless it's a command or script +* [ubuntu] use cordova/exec/proxy +* add ubuntu platform +* Modify Device.platform logic to use amazon-fireos as the platform for Amazon Devices +* 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos' + +### 0.2.4 (Oct 28, 2013) +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag in plugin.xml for device plugin +* [CB-5085](https://issues.apache.org/jira/browse/CB-5085) device.cordova returning wrong value +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. + +### 0.2.3 (Sept 25, 2013) +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [windows8] commandProxy has moved +* [BlackBerry10] removed uneeded permission tags in plugin.xml +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.device to org.apache.cordova.device +* Rename CHANGELOG.md -> RELEASENOTES.md +* updated to use commandProxy for ffos +* add firefoxos support +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. + +### 0.2.1 (Sept 5, 2013) +* removed extraneous print statement +* [CB-4432](https://issues.apache.org/jira/browse/CB-4432) copyright notice change diff --git a/plugins/cordova-plugin-device/doc/de/README.md b/plugins/cordova-plugin-device/doc/de/README.md new file mode 100644 index 000000000..81f89e998 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/de/README.md @@ -0,0 +1,203 @@ + + +# cordova-plugin-device + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device) + +Dieses Plugin definiert eine globale `device` -Objekt, das des Geräts Hard- und Software beschreibt. Das Objekt im globalen Gültigkeitsbereich ist es zwar nicht verfügbar bis nach dem `deviceready` Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installation + + cordova plugin add cordova-plugin-device + + +## Eigenschaften + + * device.cordova + * device.model + * device.platform + * device.uuid + * device.version + +## device.cordova + +Rufen Sie die Version von Cordova, die auf dem Gerät ausgeführt. + +### Unterstützte Plattformen + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Browser + * Firefox OS + * iOS + * Tizen + * Windows Phone 7 und 8 + * Windows 8 + +## device.model + +Die `device.model` gibt den Namen der Modell- oder des Geräts zurück. Der Wert wird vom Gerätehersteller festgelegt und kann zwischen den Versionen des gleichen Produkts unterschiedlich sein. + +### Unterstützte Plattformen + + * Android + * BlackBerry 10 + * Browser + * iOS + * Tizen + * Windows Phone 7 und 8 + * Windows 8 + +### Kurzes Beispiel + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Finden Sie unter http://theiphonewiki.com/wiki/index.php?title=Models / / Var-Modell = device.model; + + +### Android Eigenarten + + * Ruft den [Produktname](http://developer.android.com/reference/android/os/Build.html#PRODUCT) anstelle des [Modellnamens](http://developer.android.com/reference/android/os/Build.html#MODEL), das ist oft der Codename für die Produktion. Beispielsweise das Nexus One gibt `Passion` , und Motorola Droid gibt`voles`. + +### Tizen Macken + + * Gibt z. B. das Gerätemodell von dem Kreditor zugeordnet,`TIZEN` + +### Windows Phone 7 und 8 Eigenarten + + * Gibt das vom Hersteller angegebenen Gerätemodell zurück. Beispielsweise gibt der Samsung-Fokus`SGH-i917`. + +## device.platform + +Name des Betriebssystems des Geräts zu erhalten. + + var string = device.platform; + + +### Unterstützte Plattformen + + * Android + * BlackBerry 10 + * Browser4 + * Firefox OS + * iOS + * Tizen + * Windows Phone 7 und 8 + * Windows 8 + +### Kurzes Beispiel + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 Macken + +Windows Phone 7 Geräte melden die Plattform als`WinCE`. + +### Windows Phone 8 Macken + +Windows Phone 8 Geräte melden die Plattform als`Win32NT`. + +## device.uuid + +Des Geräts Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier) zu erhalten). + + var string = device.uuid; + + +### Beschreibung + +Die Details wie eine UUID generiert wird werden vom Gerätehersteller und beziehen sich auf die Plattform oder das Modell des Geräts. + +### Unterstützte Plattformen + + * Android + * BlackBerry 10 + * iOS + * Tizen + * Windows Phone 7 und 8 + * Windows 8 + +### Kurzes Beispiel + + / / Android: wird eine zufällige 64-Bit-Ganzzahl (als Zeichenfolge, wieder!) / / die ganze Zahl wird beim ersten Start des Geräts erzeugt / / / / BlackBerry: gibt die PIN-Nummer des Gerätes / / Dies ist eine neunstellige eindeutige Ganzzahl (als String, obwohl!) / / / / iPhone: (paraphrasiert aus der Dokumentation zur UIDevice-Klasse) / / liefert eine Reihe von Hash-Werte, die aus mehreren Hardware erstellt identifiziert. + / / Es ist gewährleistet, dass für jedes Gerät eindeutig sein und kann nicht gebunden werden / / an den Benutzer weitergeleitet. + / / Windows Phone 7: gibt einen Hash des Gerät + aktueller Benutzer, / / wenn der Benutzer nicht definiert ist, eine Guid generiert und wird weiter bestehen, bis die app deinstalliert wird / / Tizen: gibt das Gerät IMEI (International Mobile Equipment Identity oder IMEI ist eine Zahl / / einzigartig für jedes GSM- und UMTS-Handy. + var deviceID = device.uuid; + + +### iOS Quirk + +Die `uuid` auf iOS ist nicht eindeutig zu einem Gerät, aber für jede Anwendung, für jede Installation variiert. Es ändert sich, wenn Sie löschen und neu die app installieren, und möglicherweise auch beim iOS zu aktualisieren, oder auch ein Upgrade möglich die app pro Version (scheinbaren in iOS 5.1). Die `uuid` ist kein zuverlässiger Wert. + +### Windows Phone 7 und 8 Eigenarten + +Die `uuid` für Windows Phone 7 die Berechtigung erfordert `ID_CAP_IDENTITY_DEVICE` . Microsoft wird diese Eigenschaft wahrscheinlich bald abzuschaffen. Wenn die Funktion nicht verfügbar ist, generiert die Anwendung eine persistente Guid, die für die Dauer der Installation der Anwendung auf dem Gerät gewährleistet ist. + +## device.version + +Version des Betriebssystems zu erhalten. + + var string = device.version; + + +### Unterstützte Plattformen + + * Android 2.1 + + * BlackBerry 10 + * Browser + * iOS + * Tizen + * Windows Phone 7 und 8 + * Windows 8 + +### Kurzes Beispiel + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/doc/de/index.md b/plugins/cordova-plugin-device/doc/de/index.md new file mode 100644 index 000000000..e3a537ed4 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/de/index.md @@ -0,0 +1,206 @@ + + +# cordova-plugin-device + +Dieses Plugin definiert eine globale `device` -Objekt, das des Geräts Hard- und Software beschreibt. Das Objekt im globalen Gültigkeitsbereich ist es zwar nicht verfügbar bis nach dem `deviceready` Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installation + + cordova plugin add cordova-plugin-device + + +## Eigenschaften + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Rufen Sie die Version von Cordova, die auf dem Gerät ausgeführt. + +### Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Browser +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +## device.model + +Die `device.model` gibt den Namen der Modell- oder des Geräts zurück. Der Wert wird vom Gerätehersteller festgelegt und kann zwischen den Versionen des gleichen Produkts unterschiedlich sein. + +### Unterstützte Plattformen + +* Android +* BlackBerry 10 +* Browser +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Kurzes Beispiel + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Finden Sie unter http://theiphonewiki.com/wiki/index.php?title=Models / / Var-Modell = device.model; + + +### Android Eigenarten + +* Ruft den [Produktname][1] anstelle des [Modellnamens][2], das ist oft der Codename für die Produktion. Beispielsweise das Nexus One gibt `Passion` , und Motorola Droid gibt`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Tizen Macken + +* Gibt z. B. das Gerätemodell von dem Kreditor zugeordnet,`TIZEN` + +### Windows Phone 7 und 8 Eigenarten + +* Gibt das vom Hersteller angegebenen Gerätemodell zurück. Beispielsweise gibt der Samsung-Fokus`SGH-i917`. + +## device.platform + +Name des Betriebssystems des Geräts zu erhalten. + + var string = device.platform; + + +### Unterstützte Plattformen + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Kurzes Beispiel + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 Macken + +Windows Phone 7 Geräte melden die Plattform als`WinCE`. + +### Windows Phone 8 Macken + +Windows Phone 8 Geräte melden die Plattform als`Win32NT`. + +## device.uuid + +Des Geräts Universally Unique Identifier ([UUID][3] zu erhalten). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Beschreibung + +Die Details wie eine UUID generiert wird werden vom Gerätehersteller und beziehen sich auf die Plattform oder das Modell des Geräts. + +### Unterstützte Plattformen + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Kurzes Beispiel + + / / Android: wird eine zufällige 64-Bit-Ganzzahl (als Zeichenfolge, wieder!) / / die ganze Zahl wird beim ersten Start des Geräts erzeugt / / / / BlackBerry: gibt die PIN-Nummer des Gerätes / / Dies ist eine neunstellige eindeutige Ganzzahl (als String, obwohl!) / / / / iPhone: (paraphrasiert aus der Dokumentation zur UIDevice-Klasse) / / liefert eine Reihe von Hash-Werte, die aus mehreren Hardware erstellt identifiziert. + / / Es ist gewährleistet, dass für jedes Gerät eindeutig sein und kann nicht gebunden werden / / an den Benutzer weitergeleitet. + / / Windows Phone 7: gibt einen Hash des Gerät + aktueller Benutzer, / / wenn der Benutzer nicht definiert ist, eine Guid generiert und wird weiter bestehen, bis die app deinstalliert wird / / Tizen: gibt das Gerät IMEI (International Mobile Equipment Identity oder IMEI ist eine Zahl / / einzigartig für jedes GSM- und UMTS-Handy. + var deviceID = device.uuid; + + +### iOS Quirk + +Die `uuid` auf iOS ist nicht eindeutig zu einem Gerät, aber für jede Anwendung, für jede Installation variiert. Es ändert sich, wenn Sie löschen und neu die app installieren, und möglicherweise auch beim iOS zu aktualisieren, oder auch ein Upgrade möglich die app pro Version (scheinbaren in iOS 5.1). Die `uuid` ist kein zuverlässiger Wert. + +### Windows Phone 7 und 8 Eigenarten + +Die `uuid` für Windows Phone 7 die Berechtigung erfordert `ID_CAP_IDENTITY_DEVICE` . Microsoft wird diese Eigenschaft wahrscheinlich bald abzuschaffen. Wenn die Funktion nicht verfügbar ist, generiert die Anwendung eine persistente Guid, die für die Dauer der Installation der Anwendung auf dem Gerät gewährleistet ist. + +## device.version + +Version des Betriebssystems zu erhalten. + + var string = device.version; + + +### Unterstützte Plattformen + +* Android 2.1 + +* BlackBerry 10 +* Browser +* iOS +* Tizen +* Windows Phone 7 und 8 +* Windows 8 + +### Kurzes Beispiel + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/doc/es/README.md b/plugins/cordova-plugin-device/doc/es/README.md new file mode 100644 index 000000000..a27abfb86 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/es/README.md @@ -0,0 +1,216 @@ + + +# cordova-plugin-device + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device) + +Este plugin define un global `device` objeto que describe del dispositivo hardware y software. Aunque el objeto está en el ámbito global, no está disponible hasta después de la `deviceready` evento. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Instalación + + cordova plugin add cordova-plugin-device + + +## Propiedades + + * device.cordova + * device.model + * device.platform + * device.uuid + * device.version + +## device.cordova + +Obtener la versión de Cordova que se ejecuta en el dispositivo. + +### Plataformas soportadas + + * Amazon fire OS + * Android + * BlackBerry 10 + * Explorador + * Firefox OS + * iOS + * Tizen + * Windows Phone 7 y 8 + * Windows 8 + +## device.model + +El `device.model` devuelve el nombre de modelo del dispositivo o producto. El valor es fijado por el fabricante del dispositivo y puede ser diferente a través de versiones del mismo producto. + +### Plataformas soportadas + + * Android + * BlackBerry 10 + * Explorador + * iOS + * Tizen + * Windows Phone 7 y 8 + * Windows 8 + +### Ejemplo rápido + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + + +### Rarezas Android + + * Obtiene el [nombre del producto](http://developer.android.com/reference/android/os/Build.html#PRODUCT) en lugar del [nombre de la modelo](http://developer.android.com/reference/android/os/Build.html#MODEL), que es a menudo el nombre de código de producción. Por ejemplo, el Nexus One devuelve `Passion` y Motorola Droid devuelve `voles`. + +### Rarezas Tizen + + * Devuelve que el modelo de dispositivo asignado por el proveedor, por ejemplo, `TIZEN` + +### Windows Phone 7 y 8 rarezas + + * Devuelve el modelo de dispositivo especificado por el fabricante. Por ejemplo, el Samsung Focus devuelve `SGH-i917`. + +## device.platform + +Obtener el nombre del sistema operativo del dispositivo. + + var string = device.platform; + + +### Plataformas soportadas + + * Android + * BlackBerry 10 + * Browser4 + * Firefox OS + * iOS + * Tizen + * Windows Phone 7 y 8 + * Windows 8 + +### Ejemplo rápido + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 rarezas + +Dispositivos Windows Phone 7 informe de la plataforma como `WinCE`. + +### Windows Phone 8 rarezas + +Dispositivos Windows Phone 8 Informe la plataforma como `Win32NT`. + +## device.uuid + +Obtener identificador universalmente única del dispositivo ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)). + + var string = device.uuid; + + +### Descripción + +Los detalles de cómo se genera un UUID son determinados por el fabricante del dispositivo y son específicos a la plataforma del dispositivo o modelo. + +### Plataformas soportadas + + * Android + * BlackBerry 10 + * iOS + * Tizen + * Windows Phone 7 y 8 + * Windows 8 + +### Ejemplo rápido + + // Android: Returns a random 64-bit integer (as a string, again!) + // The integer is generated on the device's first boot + // + // BlackBerry: Returns the PIN number of the device + // This is a nine-digit unique integer (as a string, though!) + // + // iPhone: (Paraphrased from the UIDevice Class documentation) + // Returns a string of hash values created from multiple hardware identifies. + // It is guaranteed to be unique for every device and can't be tied + // to the user account. + // Windows Phone 7 : Returns a hash of device+current user, + // if the user is not defined, a guid is generated and will persist until the app is uninstalled + // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number + // unique to every GSM and UMTS mobile phone. + var deviceID = device.uuid; + + +### Rarezas de iOS + +El `uuid` en iOS no es exclusiva de un dispositivo, pero varía para cada aplicación, para cada instalación. Cambia si puedes borrar y volver a instalar la aplicación, y posiblemente también cuándo actualizar iOS, o incluso mejorar la aplicación por la versión (evidente en iOS 5.1). El `uuid` no es un valor confiable. + +### Windows Phone 7 y 8 rarezas + +El `uuid` para Windows Phone 7 requiere el permiso `ID_CAP_IDENTITY_DEVICE`. Microsoft pronto probablemente desaprueban esta propiedad. Si la capacidad no está disponible, la aplicación genera un guid persistente que se mantiene durante la duración de la instalación de la aplicación en el dispositivo. + +## device.version + +Obtener la versión del sistema operativo. + + var string = device.version; + + +### Plataformas soportadas + + * Android 2.1 + + * BlackBerry 10 + * Explorador + * iOS + * Tizen + * Windows Phone 7 y 8 + * Windows 8 + +### Ejemplo rápido + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/doc/es/index.md b/plugins/cordova-plugin-device/doc/es/index.md new file mode 100644 index 000000000..f4a589779 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/es/index.md @@ -0,0 +1,220 @@ + + +# cordova-plugin-device + +Este plugin define un global `device` objeto que describe del dispositivo hardware y software. Aunque el objeto está en el ámbito global, no está disponible hasta después de la `deviceready` evento. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Instalación + + cordova plugin add cordova-plugin-device + + +## Propiedades + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Obtener la versión de Cordova que se ejecuta en el dispositivo. + +### Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* Explorador +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +## device.model + +El `device.model` devuelve el nombre de modelo del dispositivo o producto. El valor es fijado por el fabricante del dispositivo y puede ser diferente a través de versiones del mismo producto. + +### Plataformas soportadas + +* Android +* BlackBerry 10 +* Explorador +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Ejemplo rápido + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + + +### Rarezas Android + +* Obtiene el [nombre del producto][1] en lugar del [nombre de la modelo][2], que es a menudo el nombre de código de producción. Por ejemplo, el Nexus One devuelve `Passion` y Motorola Droid devuelve `voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Rarezas Tizen + +* Devuelve que el modelo de dispositivo asignado por el proveedor, por ejemplo, `TIZEN` + +### Windows Phone 7 y 8 rarezas + +* Devuelve el modelo de dispositivo especificado por el fabricante. Por ejemplo, el Samsung Focus devuelve `SGH-i917`. + +## device.platform + +Obtener el nombre del sistema operativo del dispositivo. + + var string = device.platform; + + +### Plataformas soportadas + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Ejemplo rápido + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 rarezas + +Dispositivos Windows Phone 7 informe de la plataforma como `WinCE`. + +### Windows Phone 8 rarezas + +Dispositivos Windows Phone 8 Informe la plataforma como `Win32NT`. + +## device.uuid + +Obtener identificador universalmente única del dispositivo ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Descripción + +Los detalles de cómo se genera un UUID son determinados por el fabricante del dispositivo y son específicos a la plataforma del dispositivo o modelo. + +### Plataformas soportadas + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Ejemplo rápido + + // Android: devuelve un entero de 64 bits al azar (como una cadena, otra vez!) + // el entero es generado en el primer arranque del dispositivo + // + // BlackBerry: devuelve el número PIN del dispositivo + // este es un entero único de nueve dígitos (como una cadena, aunque!) + // + // iPhone: (parafraseado de la documentación de la clase UIDevice) + // devuelve una cadena de valores hash creado a partir + // de múltiples hardware identifica. + / / Está garantizado para ser único para cada dispositivo y no puede ser atado / / a la cuenta de usuario. + // Windows Phone 7: devuelve un hash de dispositivo + usuario actual, + // si el usuario no está definido, un guid generado y persistirá hasta que se desinstala la aplicación + // + // Tizen: devuelve el dispositivo IMEI (identidad de equipo móvil internacional o IMEI es un número + // único para cada teléfono móvil GSM y UMTS. + var deviceID = device.uuid; + + +### iOS chanfle + +El `uuid` en iOS no es exclusiva de un dispositivo, pero varía para cada aplicación, para cada instalación. Cambia si puedes borrar y volver a instalar la aplicación, y posiblemente también cuándo actualizar iOS, o incluso mejorar la aplicación por la versión (evidente en iOS 5.1). El `uuid` no es un valor confiable. + +### Windows Phone 7 y 8 rarezas + +El `uuid` para Windows Phone 7 requiere el permiso `ID_CAP_IDENTITY_DEVICE`. Microsoft pronto probablemente desaprueban esta propiedad. Si la capacidad no está disponible, la aplicación genera un guid persistente que se mantiene durante la duración de la instalación de la aplicación en el dispositivo. + +## device.version + +Obtener la versión del sistema operativo. + + var string = device.version; + + +### Plataformas soportadas + +* Android 2.1 + +* BlackBerry 10 +* Explorador +* iOS +* Tizen +* Windows Phone 7 y 8 +* Windows 8 + +### Ejemplo rápido + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. el Mango se vuelve 7.10.7720 + // Tizen: devuelve "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/doc/fr/README.md b/plugins/cordova-plugin-device/doc/fr/README.md new file mode 100644 index 000000000..4101fd945 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/fr/README.md @@ -0,0 +1,215 @@ + + +# cordova-plugin-device + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device) + +Ce plugin définit un global `device` objet qui décrit le matériel et les logiciels de l'appareil. Bien que l'objet est dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installation + + cordova plugin add cordova-plugin-device + + +## Propriétés + + * device.cordova + * device.model + * device.platform + * device.uuid + * device.version + +## device.cordova + +Retourne la version de Cordova en cours d'exécution sur l'appareil. + +### Plates-formes supportées + + * Amazon Fire OS + * Android + * BlackBerry 10 + * Navigateur + * Firefox OS + * iOS + * Paciarelli + * Windows Phone 7 et 8 + * Windows 8 + +## device.model + +L'objet `device.model` retourne le nom du modèle de l'appareil/produit. Cette valeur est définie par le fabricant du périphérique et peut varier entre les différentes versions d'un même produit. + +### Plates-formes supportées + + * Android + * BlackBerry 10 + * Navigateur + * iOS + * Paciarelli + * Windows Phone 7 et 8 + * Windows 8 + +### Exemple court + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Voir http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + + +### Quirks Android + + * Retourne le [nom du produit](http://developer.android.com/reference/android/os/Build.html#PRODUCT) au lieu du [nom du modèle](http://developer.android.com/reference/android/os/Build.html#MODEL), ce qui équivaut souvent au nom de code de production. Par exemple, `Passion` pour le Nexus One et `voles` pour le Motorola Droid. + +### Bizarreries de paciarelli + + * Retourne le modèle du dispositif, assigné par le vendeur, par exemple `TIZEN` + +### Notes au sujet de Windows Phone 7 et 8 + + * Retourne le modèle de l'appareil spécifié par le fabricant. Par exemple `SGH-i917` pour le Samsung Focus. + +## device.platform + +Obtenir le nom de système d'exploitation de l'appareil. + + var string = device.platform; + + +### Plates-formes supportées + + * Android + * BlackBerry 10 + * Browser4 + * Firefox OS + * iOS + * Paciarelli + * Windows Phone 7 et 8 + * Windows 8 + +### Exemple court + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 Quirks + +Appareils Windows Phone 7 rapport de la plate-forme comme`WinCE`. + +### Notes au sujet de Windows Phone 8 + +Appareils Windows Phone 8 rapport de la plate-forme comme`Win32NT`. + +## device.uuid + +Obtenir Universally Unique Identifier de l'appareil ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)). + + var string = device.uuid; + + +### Description + +Les détails de comment un UUID généré sont déterminées par le fabricant du périphérique et sont spécifiques à la plate-forme ou le modèle de l'appareil. + +### Plates-formes supportées + + * Android + * BlackBerry 10 + * iOS + * Paciarelli + * Windows Phone 7 et 8 + * Windows 8 + +### Exemple court + + // Android : retourne un nombre entier 64-bit aléatoire (sous la forme d'une chaîne de caractères, encore !) + // Ce nombre entier est généré lors du premier démarrage de l'appareil + // + // BlackBerry : retourne le numéro PIN de l'appareil + // Il s'agit d'un nombre entier unique à neuf chiffres (sous la forme d'une chaîne de caractères cependant !) + // + // iPhone : (copié depuis la documentation de la classe UIDevice) + // Retourne une chaîne de caractères générée à partir de plusieurs caractéristiques matérielles. + / / Il est garanti pour être unique pour chaque appareil et ne peut pas être lié / / pour le compte d'utilisateur. + // Windows Phone 7 : retourne un hashage généré à partir de appareil+utilisateur actuel, + // si aucun utilisateur n'est défini, un guid est généré persistera jusqu'à ce que l'application soit désinstallée + // Tizen : retourne le numéro IMEI (International Mobile Equipment Identity) de l'appareil, ce numéro est + // unique pour chaque téléphone GSM et UMTS. + var deviceID = device.uuid; + + +### Spécificités iOS + +Le `uuid` sur iOS n'est pas propre à un périphérique, mais varie pour chaque application, pour chaque installation. Elle change si vous supprimez, puis réinstallez l'application, et éventuellement aussi quand vous mettre à jour d'iOS, ou même mettre à jour le soft par version (apparent dans iOS 5.1). Le `uuid` n'est pas une valeur fiable. + +### Notes au sujet de Windows Phone 7 et 8 + +Le `uuid` pour Windows Phone 7 requiert l'autorisation `ID_CAP_IDENTITY_DEVICE` . Microsoft va probablement bientôt obsolète de cette propriété. Si la capacité n'est pas disponible, l'application génère un guid persistant qui est maintenu pendant toute la durée de l'installation de l'application sur le périphérique. + +## device.version + +Téléchargez la version de système d'exploitation. + + var string = device.version; + + +### Plates-formes supportées + + * Android 2.1+ + * BlackBerry 10 + * Navigateur + * iOS + * Paciarelli + * Windows Phone 7 et 8 + * Windows 8 + +### Exemple court + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/doc/fr/index.md b/plugins/cordova-plugin-device/doc/fr/index.md new file mode 100644 index 000000000..163e498cb --- /dev/null +++ b/plugins/cordova-plugin-device/doc/fr/index.md @@ -0,0 +1,218 @@ + + +# cordova-plugin-device + +Ce plugin définit un global `device` objet qui décrit le matériel et les logiciels de l'appareil. Bien que l'objet est dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installation + + cordova plugin add cordova-plugin-device + + +## Propriétés + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Retourne la version de Cordova en cours d'exécution sur l'appareil. + +### Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Navigateur +* Firefox OS +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +## device.model + +L'objet `device.model` retourne le nom du modèle de l'appareil/produit. Cette valeur est définie par le fabricant du périphérique et peut varier entre les différentes versions d'un même produit. + +### Plates-formes prises en charge + +* Android +* BlackBerry 10 +* Navigateur +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Petit exemple + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Voir http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + + +### Quirks Android + +* Retourne le [nom du produit][1] au lieu du [nom du modèle][2], ce qui équivaut souvent au nom de code de production. Par exemple, `Passion` pour le Nexus One et `voles` pour le Motorola Droid. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Bizarreries de paciarelli + +* Retourne le modèle du dispositif, assigné par le vendeur, par exemple `TIZEN` + +### Windows Phone 7 et 8 Quirks + +* Retourne le modèle de l'appareil spécifié par le fabricant. Par exemple `SGH-i917` pour le Samsung Focus. + +## device.platform + +Obtenir le nom de système d'exploitation de l'appareil. + + var string = device.platform; + + +### Plates-formes prises en charge + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Petit exemple + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 Quirks + +Appareils Windows Phone 7 rapport de la plate-forme comme`WinCE`. + +### Notes au sujet de Windows Phone 8 + +Appareils Windows Phone 8 rapport de la plate-forme comme`Win32NT`. + +## device.uuid + +Obtenir Universally Unique Identifier de l'appareil ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Description + +Les détails de comment un UUID généré sont déterminées par le fabricant du périphérique et sont spécifiques à la plate-forme ou le modèle de l'appareil. + +### Plates-formes prises en charge + +* Android +* BlackBerry 10 +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Petit exemple + + // Android : retourne un nombre entier 64-bit aléatoire (sous la forme d'une chaîne de caractères, encore !) + // Ce nombre entier est généré lors du premier démarrage de l'appareil + // + // BlackBerry : retourne le numéro PIN de l'appareil + // Il s'agit d'un nombre entier unique à neuf chiffres (sous la forme d'une chaîne de caractères cependant !) + // + // iPhone : (copié depuis la documentation de la classe UIDevice) + // Retourne une chaîne de caractères générée à partir de plusieurs caractéristiques matérielles. + / / Il est garanti pour être unique pour chaque appareil et ne peut pas être lié / / pour le compte d'utilisateur. + // Windows Phone 7 : retourne un hashage généré à partir de appareil+utilisateur actuel, + // si aucun utilisateur n'est défini, un guid est généré persistera jusqu'à ce que l'application soit désinstallée + // Tizen : retourne le numéro IMEI (International Mobile Equipment Identity) de l'appareil, ce numéro est + // unique pour chaque téléphone GSM et UMTS. + var deviceID = device.uuid; + + +### Spécificités iOS + +Le `uuid` sur iOS n'est pas propre à un périphérique, mais varie pour chaque application, pour chaque installation. Elle change si vous supprimez, puis réinstallez l'application, et éventuellement aussi quand vous mettre à jour d'iOS, ou même mettre à jour le soft par version (apparent dans iOS 5.1). Le `uuid` n'est pas une valeur fiable. + +### Windows Phone 7 et 8 Quirks + +Le `uuid` pour Windows Phone 7 requiert l'autorisation `ID_CAP_IDENTITY_DEVICE` . Microsoft va probablement bientôt obsolète de cette propriété. Si la capacité n'est pas disponible, l'application génère un guid persistant qui est maintenu pendant toute la durée de l'installation de l'application sur le périphérique. + +## device.version + +Téléchargez la version de système d'exploitation. + + var string = device.version; + + +### Plates-formes prises en charge + +* Android 2.1+ +* BlackBerry 10 +* Navigateur +* iOS +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +### Petit exemple + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/doc/it/README.md b/plugins/cordova-plugin-device/doc/it/README.md new file mode 100644 index 000000000..79749626f --- /dev/null +++ b/plugins/cordova-plugin-device/doc/it/README.md @@ -0,0 +1,203 @@ + + +# cordova-plugin-device + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device) + +Questo plugin definisce un global `device` oggetto che descrive il dispositivo hardware e software. Sebbene l'oggetto sia in ambito globale, non è disponibile fino a dopo il `deviceready` evento. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installazione + + cordova plugin add cordova-plugin-device + + +## Proprietà + + * device.cordova + * device.model + * device.platform + * device.uuid + * device.version + +## device.cordova + +Ottenere la versione di Cordova in esecuzione nel dispositivo. + +### Piattaforme supportate + + * Amazon fuoco OS + * Android + * BlackBerry 10 + * Browser + * Firefox OS + * iOS + * Tizen + * Windows Phone 7 e 8 + * Windows 8 + +## device.model + +Il `device.model` restituisce il nome del modello del dispositivo o del prodotto. Il valore viene impostato dal produttore del dispositivo e può essere differente tra le versioni dello stesso prodotto. + +### Piattaforme supportate + + * Android + * BlackBerry 10 + * Browser + * iOS + * Tizen + * Windows Phone 7 e 8 + * Windows 8 + +### Esempio rapido + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Vedi http://theiphonewiki.com/wiki/index.php?title=Models / / modello var = device.model; + + +### Stranezze Android + + * Ottiene il [nome del prodotto](http://developer.android.com/reference/android/os/Build.html#PRODUCT) anziché il [nome del modello](http://developer.android.com/reference/android/os/Build.html#MODEL), che è spesso il nome di codice di produzione. Ad esempio, restituisce il Nexus One `Passion` , e Motorola Droid restituisce`voles`. + +### Tizen stranezze + + * Restituisce il modello di dispositivo assegnato dal fornitore, ad esempio,`TIZEN` + +### Windows Phone 7 e 8 stranezze + + * Restituisce il modello di dispositivo specificato dal produttore. Ad esempio, restituisce il Samsung Focus`SGH-i917`. + +## device.platform + +Ottenere il nome del sistema operativo del dispositivo. + + var string = device.platform; + + +### Piattaforme supportate + + * Android + * BlackBerry 10 + * Browser4 + * Firefox OS + * iOS + * Tizen + * Windows Phone 7 e 8 + * Windows 8 + +### Esempio rapido + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 capricci + +Windows Phone 7 dispositivi segnalano la piattaforma come`WinCE`. + +### Windows Phone 8 stranezze + +Dispositivi Windows Phone 8 segnalano la piattaforma come`Win32NT`. + +## device.uuid + +Ottenere identificatore del dispositivo univoco universale ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)). + + var string = device.uuid; + + +### Descrizione + +I dettagli di come viene generato un UUID sono determinati dal produttore del dispositivo e sono specifici per la piattaforma o il modello del dispositivo. + +### Piattaforme supportate + + * Android + * BlackBerry 10 + * iOS + * Tizen + * Windows Phone 7 e 8 + * Windows 8 + +### Esempio rapido + + / / Android: restituisce un intero casuale di 64 bit (come stringa, ancora una volta!) / / il numero intero è generato al primo avvio del dispositivo / / / / BlackBerry: restituisce il numero PIN del dispositivo / / questo è un valore integer univoco a nove cifre (come stringa, benchè!) / / / / iPhone: (parafrasato dalla documentazione della classe UIDevice) / / restituisce una stringa di valori hash creata dall'hardware più identifica. + / / È garantito per essere unica per ogni dispositivo e non può essere legato / / per l'account utente. + / / Windows Phone 7: restituisce un hash dell'utente corrente, + dispositivo / / se l'utente non è definito, un guid generato e persisterà fino a quando l'applicazione viene disinstallata / / Tizen: restituisce il dispositivo IMEI (International Mobile Equipment Identity o IMEI è un numero / / unico per ogni cellulare GSM e UMTS. + var deviceID = device.uuid; + + +### iOS Quirk + +Il `uuid` su iOS non è univoco per un dispositivo, ma varia per ogni applicazione, per ogni installazione. Cambia se si elimina e re-installare l'app, e possibilmente anche quando aggiornare iOS o anche aggiornare l'app per ogni versione (apparente in iOS 5.1). Il `uuid` non è un valore affidabile. + +### Windows Phone 7 e 8 stranezze + +Il `uuid` per Windows Phone 7 richiede l'autorizzazione `ID_CAP_IDENTITY_DEVICE` . Microsoft probabilmente sarà presto deprecare questa proprietà. Se la funzionalità non è disponibile, l'applicazione genera un guid persistente che viene mantenuto per la durata dell'installazione dell'applicazione sul dispositivo. + +## device.version + +Ottenere la versione del sistema operativo. + + var string = device.version; + + +### Piattaforme supportate + + * Android 2.1 + + * BlackBerry 10 + * Browser + * iOS + * Tizen + * Windows Phone 7 e 8 + * Windows 8 + +### Esempio rapido + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/doc/it/index.md b/plugins/cordova-plugin-device/doc/it/index.md new file mode 100644 index 000000000..98c6200a5 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/it/index.md @@ -0,0 +1,206 @@ + + +# cordova-plugin-device + +Questo plugin definisce un global `device` oggetto che descrive il dispositivo hardware e software. Sebbene l'oggetto sia in ambito globale, non è disponibile fino a dopo il `deviceready` evento. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Installazione + + cordova plugin add cordova-plugin-device + + +## Proprietà + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Ottenere la versione di Cordova in esecuzione nel dispositivo. + +### Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* Browser +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +## device.model + +Il `device.model` restituisce il nome del modello del dispositivo o del prodotto. Il valore viene impostato dal produttore del dispositivo e può essere differente tra le versioni dello stesso prodotto. + +### Piattaforme supportate + +* Android +* BlackBerry 10 +* Browser +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Esempio rapido + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Vedi http://theiphonewiki.com/wiki/index.php?title=Models / / modello var = device.model; + + +### Stranezze Android + +* Ottiene il [nome del prodotto][1] anziché il [nome del modello][2], che è spesso il nome di codice di produzione. Ad esempio, restituisce il Nexus One `Passion` , e Motorola Droid restituisce`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Tizen stranezze + +* Restituisce il modello di dispositivo assegnato dal fornitore, ad esempio,`TIZEN` + +### Windows Phone 7 e 8 stranezze + +* Restituisce il modello di dispositivo specificato dal produttore. Ad esempio, restituisce il Samsung Focus`SGH-i917`. + +## device.platform + +Ottenere il nome del sistema operativo del dispositivo. + + var string = device.platform; + + +### Piattaforme supportate + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Esempio rapido + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 capricci + +Windows Phone 7 dispositivi segnalano la piattaforma come`WinCE`. + +### Windows Phone 8 stranezze + +Dispositivi Windows Phone 8 segnalano la piattaforma come`Win32NT`. + +## device.uuid + +Ottenere identificatore del dispositivo univoco universale ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Descrizione + +I dettagli di come viene generato un UUID sono determinati dal produttore del dispositivo e sono specifici per la piattaforma o il modello del dispositivo. + +### Piattaforme supportate + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Esempio rapido + + / / Android: restituisce un intero casuale di 64 bit (come stringa, ancora una volta!) / / il numero intero è generato al primo avvio del dispositivo / / / / BlackBerry: restituisce il numero PIN del dispositivo / / questo è un valore integer univoco a nove cifre (come stringa, benchè!) / / / / iPhone: (parafrasato dalla documentazione della classe UIDevice) / / restituisce una stringa di valori hash creata dall'hardware più identifica. + / / È garantito per essere unica per ogni dispositivo e non può essere legato / / per l'account utente. + / / Windows Phone 7: restituisce un hash dell'utente corrente, + dispositivo / / se l'utente non è definito, un guid generato e persisterà fino a quando l'applicazione viene disinstallata / / Tizen: restituisce il dispositivo IMEI (International Mobile Equipment Identity o IMEI è un numero / / unico per ogni cellulare GSM e UMTS. + var deviceID = device.uuid; + + +### iOS Quirk + +Il `uuid` su iOS non è univoco per un dispositivo, ma varia per ogni applicazione, per ogni installazione. Cambia se si elimina e re-installare l'app, e possibilmente anche quando aggiornare iOS o anche aggiornare l'app per ogni versione (apparente in iOS 5.1). Il `uuid` non è un valore affidabile. + +### Windows Phone 7 e 8 stranezze + +Il `uuid` per Windows Phone 7 richiede l'autorizzazione `ID_CAP_IDENTITY_DEVICE` . Microsoft probabilmente sarà presto deprecare questa proprietà. Se la funzionalità non è disponibile, l'applicazione genera un guid persistente che viene mantenuto per la durata dell'installazione dell'applicazione sul dispositivo. + +## device.version + +Ottenere la versione del sistema operativo. + + var string = device.version; + + +### Piattaforme supportate + +* Android 2.1 + +* BlackBerry 10 +* Browser +* iOS +* Tizen +* Windows Phone 7 e 8 +* Windows 8 + +### Esempio rapido + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/doc/ja/README.md b/plugins/cordova-plugin-device/doc/ja/README.md new file mode 100644 index 000000000..5a345f879 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/ja/README.md @@ -0,0 +1,203 @@ + + +# cordova-plugin-device + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device) + +ã“ã®ãƒ—ラグインをグローãƒãƒ«å®šç¾©ã—ã¾ã™ `device` オブジェクトã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã¨ã‚½ãƒ•トウェアã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ ãれã¯å¾Œã¾ã§åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ–ジェクトãŒã‚°ãƒ­ãƒ¼ãƒãƒ« スコープã§ã¯ã€ `deviceready` イベント。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## インストール + + cordova plugin add cordova-plugin-device + + +## プロパティ + + * device.cordova + * device.model + * device.platform + * device.uuid + * device.version + +## device.cordova + +デãƒã‚¤ã‚¹ã§å®Ÿè¡Œã•れã¦ã„るコルドãƒã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ã€‚ + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * ã‚¢ãƒžã‚¾ãƒ³ç« OS + * アンドロイド + * ブラックベリー 10 + * ブラウザー + * Firefox ã® OS + * iOS + * Tizen + * Windows Phone 7 㨠8 + * Windows 8 + +## device.model + +`device.model`ã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã¾ãŸã¯è£½å“ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚値ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®è£½é€ å…ƒã«ã‚ˆã£ã¦è¨­å®šã•れã€åŒã˜è£½å“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * アンドロイド + * ブラックベリー 10 + * ブラウザー + * iOS + * Tizen + * Windows Phone 7 㨠8 + * Windows 8 + +### ç°¡å˜ãªä¾‹ + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models ã‚’å‚ç…§ã—ã¦ãã ã•ã„//var モデル = device.model; + + +### Android ã®ç™– + + * 生産コードåã¯[モデルå](http://developer.android.com/reference/android/os/Build.html#MODEL)ã®ä»£ã‚りã«[製å“å](http://developer.android.com/reference/android/os/Build.html#PRODUCT)ã‚’å–å¾—ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒã‚¯ã‚µã‚¹ 1 ã¤ã‚’è¿”ã—ã¾ã™ `Passion` ã€Motorola ã®ãƒ‰ãƒ­ã‚¤ãƒ‰ã‚’è¿”ã—ã¾ã™`voles`. + +### Tizen ã®ç™– + + * ãŸã¨ãˆã°ã€ãƒ™ãƒ³ãƒ€ãƒ¼ã«ã‚ˆã£ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るデãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’è¿”ã—ã¾ã™`TIZEN` + +### Windows Phone 7 㨠8 ç™– + + * 製造元ã«ã‚ˆã£ã¦æŒ‡å®šã•れãŸãƒ‡ãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸‰æ˜Ÿãƒ•ォーカスを返ã—ã¾ã™`SGH-i917`. + +## device.platform + +デãƒã‚¤ã‚¹ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚° システムåã‚’å–å¾—ã—ã¾ã™ã€‚ + + var string = device.platform; + + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * アンドロイド + * ブラックベリー 10 + * Browser4 + * Firefox ã® OS + * iOS + * Tizen + * Windows Phone 7 㨠8 + * Windows 8 + +### ç°¡å˜ãªä¾‹ + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 ã®ç™– + +Windows Phone 7 デãƒã‚¤ã‚¹ã¨ãƒ—ラットフォームを報告ã—ã¾ã™ã€‚`WinCE`. + +### Windows Phone 8 ç™– + +Windows Phone 8 デãƒã‚¤ã‚¹ã¨ãƒ—ラットフォームを報告ã—ã¾ã™ã€‚`Win32NT`. + +## device.uuid + +デãƒã‚¤ã‚¹ã®ãƒ¦ãƒ‹ãƒãƒ¼ã‚µãƒ« ・ ãƒ¦ãƒ‹ãƒ¼ã‚¯è­˜åˆ¥å­ ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)ã‚’å–å¾—ã—ã¾ã™ã€‚). + + var string = device.uuid; + + +### 解説 + +UUID を生æˆã™ã‚‹æ–¹æ³•ã®è©³ç´°ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®è£½é€ å…ƒã«ã‚ˆã£ã¦æ±ºå®šã•れã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒ—ラットフォームやモデルã«å›ºæœ‰ã§ã™ã€‚ + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * アンドロイド + * ブラックベリー 10 + * iOS + * Tizen + * Windows Phone 7 㨠8 + * Windows 8 + +### ç°¡å˜ãªä¾‹ + + //アンドロイド: ランダム㪠64 ãƒ“ãƒƒãƒˆã®æ•´æ•° (を文字列ã¨ã—ã¦è¿”ã—ã¾ã™ã€å†ã³ ï¼ï¼‰/デãƒã‚¤ã‚¹ã®æœ€åˆã®èµ·å‹•時ã«ç”Ÿæˆã•れる整数/////ブラックベリー: デãƒã‚¤ã‚¹ã®ãƒ”ン番å·ã‚’è¿”ã—ã¾ã™//ã“れ㯠9 æ¡ã®ä¸€æ„ãªæ•´æ•° (を文字列ã¨ã—ã¦ã‚‚ ï¼)////iPhone: (UIDevice クラスã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‹ã‚‰è¨€ã„æ›ãˆï¼‰//識別複数ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‹ã‚‰ä½œæˆã•れãŸãƒãƒƒã‚·ãƒ¥å€¤ã®æ–‡å­—列を返ã—ã¾ã™ã€‚。 + //ãれã¯ã™ã¹ã¦ã®ãƒ‡ãƒã‚¤ã‚¹ã«å¯¾ã—ã¦ä¸€æ„ã§ã‚ã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã€æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“//ユーザー アカウント。 + //Windows Phone 7: デãƒã‚¤ã‚¹ + ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒãƒƒã‚·ãƒ¥ã‚’è¿”ã—ã¾ã™//ユーザーãŒå®šç¾©ã•れã¦ã„ãªã„å ´åˆ guid ãŒç”Ÿæˆã•れã€ã‚¢ãƒ—リãŒã‚¢ãƒ³ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れるã¾ã§ä¿æŒã•れã¾ã™//Tizen: デãƒã‚¤ã‚¹ã® IMEI ã‚’è¿”ã—ã¾ã™ (国際モãƒã‚¤ãƒ«æ©Ÿå™¨ã‚¢ã‚¤ãƒ‡ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¾ãŸã¯ IMEI ã¯ç•ªå·ã§ã™//ã™ã¹ã¦ã® GSM ãŠã‚ˆã³ UMTS ã®æºå¸¯é›»è©±ã«å›ºæœ‰ã§ã™ã€‚ + var deviceID = device.uuid; + + +### iOS ã®æ°—ã¾ãれ + +`uuid`IOS ã§ã€ãƒ‡ãƒã‚¤ã‚¹ã«å›ºæœ‰ã§ã¯ãªã„インストールã”ã¨ã€ã‚¢ãƒ—リケーションã”ã¨ã«ç•°ãªã‚Šã¾ã™ã€‚ 削除ã€ã‚¢ãƒ—リをå†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸå ´åˆã«å¤‰æ›´ã¨å¤šåˆ†ã¾ãŸã¨ãアップグレード iOS ã®, ã¾ãŸã¯ã‚‚アップグレードã™ã‚‹ã‚¢ãƒ—リ (iOS ã® 5.1 ã§æ˜Žã‚‰ã‹ã«ï¼‰ ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã”ã¨ã€‚ `uuid`ã¯ä¿¡é ¼æ€§ã®é«˜ã„値ã§ã¯ã‚りã¾ã›ã‚“。 + +### Windows Phone 7 㨠8 ç™– + +`uuid`ã®ãŸã‚ã« Windows Phone 7 ã«ã¯ã€æ¨©é™ãŒå¿…è¦ã§ã™ `ID_CAP_IDENTITY_DEVICE` 。 Microsoft ã¯ã™ãã«ã“ã®ãƒ—ロパティを廃止ã—ã¦å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ 機能ãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ã‚¢ãƒ—リケーションã¯ãƒ‡ãƒã‚¤ã‚¹ã¸ã®ã‚¢ãƒ—リケーションã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã®æŒç¶šæœŸé–“ã®ãŸã‚ã«ä¿æŒã•れã¦ã„る永続的㪠guid を生æˆã—ã¾ã™ã€‚ + +## device.version + +オペレーティング システムã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ã€‚ + + var string = device.version; + + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * アンドロイド 2.1 + + * ブラックベリー 10 + * ブラウザー + * iOS + * Tizen + * Windows Phone 7 㨠8 + * Windows 8 + +### ç°¡å˜ãªä¾‹ + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/doc/ja/index.md b/plugins/cordova-plugin-device/doc/ja/index.md new file mode 100644 index 000000000..b4030fd05 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/ja/index.md @@ -0,0 +1,206 @@ + + +# cordova-plugin-device + +ã“ã®ãƒ—ラグインをグローãƒãƒ«å®šç¾©ã—ã¾ã™ `device` オブジェクトã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã¨ã‚½ãƒ•トウェアã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ ãれã¯å¾Œã¾ã§åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ–ジェクトãŒã‚°ãƒ­ãƒ¼ãƒãƒ« スコープã§ã¯ã€ `deviceready` イベント。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## インストール + + cordova plugin add cordova-plugin-device + + +## プロパティ + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +デãƒã‚¤ã‚¹ã§å®Ÿè¡Œã•れã¦ã„るコルドãƒã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ã€‚ + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* ã‚¢ãƒžã‚¾ãƒ³ç« OS +* アンドロイド +* ブラックベリー 10 +* ブラウザー +* Firefox ã® OS +* iOS +* Tizen +* Windows Phone 7 㨠8 +* Windows 8 + +## device.model + +`device.model`ã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã¾ãŸã¯è£½å“ã®åå‰ã‚’è¿”ã—ã¾ã™ã€‚値ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®è£½é€ å…ƒã«ã‚ˆã£ã¦è¨­å®šã•れã€åŒã˜è£½å“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* アンドロイド +* ブラックベリー 10 +* ブラウザー +* iOS +* Tizen +* Windows Phone 7 㨠8 +* Windows 8 + +### ç°¡å˜ãªä¾‹ + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models ã‚’å‚ç…§ã—ã¦ãã ã•ã„//var モデル = device.model; + + +### Android ã®ç™– + +* 生産コードåã¯[モデルå][1]ã®ä»£ã‚りã«[製å“å][2]ã‚’å–å¾—ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒã‚¯ã‚µã‚¹ 1 ã¤ã‚’è¿”ã—ã¾ã™ `Passion` ã€Motorola ã®ãƒ‰ãƒ­ã‚¤ãƒ‰ã‚’è¿”ã—ã¾ã™`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#MODEL + [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + +### Tizen ã®ç™– + +* ãŸã¨ãˆã°ã€ãƒ™ãƒ³ãƒ€ãƒ¼ã«ã‚ˆã£ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るデãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’è¿”ã—ã¾ã™`TIZEN` + +### Windows Phone 7 㨠8 ç™– + +* 製造元ã«ã‚ˆã£ã¦æŒ‡å®šã•れãŸãƒ‡ãƒã‚¤ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€ä¸‰æ˜Ÿãƒ•ォーカスを返ã—ã¾ã™`SGH-i917`. + +## device.platform + +デãƒã‚¤ã‚¹ã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚° システムåã‚’å–å¾—ã—ã¾ã™ã€‚ + + var string = device.platform; + + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* アンドロイド +* ブラックベリー 10 +* Browser4 +* Firefox ã® OS +* iOS +* Tizen +* Windows Phone 7 㨠8 +* Windows 8 + +### ç°¡å˜ãªä¾‹ + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 ã®ç™– + +Windows Phone 7 デãƒã‚¤ã‚¹ã¨ãƒ—ラットフォームを報告ã—ã¾ã™ã€‚`WinCE`. + +### Windows Phone 8 ç™– + +Windows Phone 8 デãƒã‚¤ã‚¹ã¨ãƒ—ラットフォームを報告ã—ã¾ã™ã€‚`Win32NT`. + +## device.uuid + +デãƒã‚¤ã‚¹ã®ãƒ¦ãƒ‹ãƒãƒ¼ã‚µãƒ« ・ ãƒ¦ãƒ‹ãƒ¼ã‚¯è­˜åˆ¥å­ ([UUID][3]ã‚’å–å¾—ã—ã¾ã™ã€‚). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### 説明 + +UUID を生æˆã™ã‚‹æ–¹æ³•ã®è©³ç´°ã¯ã€ãƒ‡ãƒã‚¤ã‚¹ã®è£½é€ å…ƒã«ã‚ˆã£ã¦æ±ºå®šã•れã€ãƒ‡ãƒã‚¤ã‚¹ã®ãƒ—ラットフォームやモデルã«å›ºæœ‰ã§ã™ã€‚ + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* アンドロイド +* ブラックベリー 10 +* iOS +* Tizen +* Windows Phone 7 㨠8 +* Windows 8 + +### ç°¡å˜ãªä¾‹ + + //アンドロイド: ランダム㪠64 ãƒ“ãƒƒãƒˆã®æ•´æ•° (を文字列ã¨ã—ã¦è¿”ã—ã¾ã™ã€å†ã³ ï¼ï¼‰/デãƒã‚¤ã‚¹ã®æœ€åˆã®èµ·å‹•時ã«ç”Ÿæˆã•れる整数/////ブラックベリー: デãƒã‚¤ã‚¹ã®ãƒ”ン番å·ã‚’è¿”ã—ã¾ã™//ã“れ㯠9 æ¡ã®ä¸€æ„ãªæ•´æ•° (を文字列ã¨ã—ã¦ã‚‚ ï¼)////iPhone: (UIDevice クラスã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‹ã‚‰è¨€ã„æ›ãˆï¼‰//識別複数ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‹ã‚‰ä½œæˆã•れãŸãƒãƒƒã‚·ãƒ¥å€¤ã®æ–‡å­—列を返ã—ã¾ã™ã€‚。 + //ãれã¯ã™ã¹ã¦ã®ãƒ‡ãƒã‚¤ã‚¹ã«å¯¾ã—ã¦ä¸€æ„ã§ã‚ã‚‹ã“ã¨ãŒä¿è¨¼ã•ã‚Œã€æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“//ユーザー アカウント。 + //Windows Phone 7: デãƒã‚¤ã‚¹ + ç¾åœ¨ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒãƒƒã‚·ãƒ¥ã‚’è¿”ã—ã¾ã™//ユーザーãŒå®šç¾©ã•れã¦ã„ãªã„å ´åˆ guid ãŒç”Ÿæˆã•れã€ã‚¢ãƒ—リãŒã‚¢ãƒ³ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れるã¾ã§ä¿æŒã•れã¾ã™//Tizen: デãƒã‚¤ã‚¹ã® IMEI ã‚’è¿”ã—ã¾ã™ (国際モãƒã‚¤ãƒ«æ©Ÿå™¨ã‚¢ã‚¤ãƒ‡ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¾ãŸã¯ IMEI ã¯ç•ªå·ã§ã™//ã™ã¹ã¦ã® GSM ãŠã‚ˆã³ UMTS ã®æºå¸¯é›»è©±ã«å›ºæœ‰ã§ã™ã€‚ + var deviceID = device.uuid; + + +### iOS ã®æ°—ã¾ãれ + +`uuid`IOS ã§ã€ãƒ‡ãƒã‚¤ã‚¹ã«å›ºæœ‰ã§ã¯ãªã„インストールã”ã¨ã€ã‚¢ãƒ—リケーションã”ã¨ã«ç•°ãªã‚Šã¾ã™ã€‚ 削除ã€ã‚¢ãƒ—リをå†ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸå ´åˆã«å¤‰æ›´ã¨å¤šåˆ†ã¾ãŸã¨ãアップグレード iOS ã®, ã¾ãŸã¯ã‚‚アップグレードã™ã‚‹ã‚¢ãƒ—リ (iOS ã® 5.1 ã§æ˜Žã‚‰ã‹ã«ï¼‰ ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã”ã¨ã€‚ `uuid`ã¯ä¿¡é ¼æ€§ã®é«˜ã„値ã§ã¯ã‚りã¾ã›ã‚“。 + +### Windows Phone 7 㨠8 ç™– + +`uuid`ã®ãŸã‚ã« Windows Phone 7 ã«ã¯ã€æ¨©é™ãŒå¿…è¦ã§ã™ `ID_CAP_IDENTITY_DEVICE` 。 Microsoft ã¯ã™ãã«ã“ã®ãƒ—ロパティを廃止ã—ã¦å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ 機能ãŒåˆ©ç”¨ã§ããªã„å ´åˆã€ã‚¢ãƒ—リケーションã¯ãƒ‡ãƒã‚¤ã‚¹ã¸ã®ã‚¢ãƒ—リケーションã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã®æŒç¶šæœŸé–“ã®ãŸã‚ã«ä¿æŒã•れã¦ã„る永続的㪠guid を生æˆã—ã¾ã™ã€‚ + +## device.version + +オペレーティング システムã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ã€‚ + + var string = device.version; + + +### サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* アンドロイド 2.1 + +* ブラックベリー 10 +* ブラウザー +* iOS +* Tizen +* Windows Phone 7 㨠8 +* Windows 8 + +### ç°¡å˜ãªä¾‹ + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/doc/ko/README.md b/plugins/cordova-plugin-device/doc/ko/README.md new file mode 100644 index 000000000..a818aacba --- /dev/null +++ b/plugins/cordova-plugin-device/doc/ko/README.md @@ -0,0 +1,203 @@ + + +# cordova-plugin-device + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device) + +ì´ í”ŒëŸ¬ê·¸ì¸ ì •ì˜ ì „ì—­ `device` 개체, 디바ì´ìŠ¤ì˜ í•˜ë“œì›¨ì–´ ë° ì†Œí”„íŠ¸ì›¨ì–´ì— ì„¤ëª… 합니다. 개체는 ì „ì—­ 범위ì—서 ë¹„ë¡ ê·¸ê²ƒì€ í›„ê¹Œì§€ 사용할 수 있는 `deviceready` ì´ë²¤íЏ. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## 설치 + + cordova plugin add cordova-plugin-device + + +## ì†ì„± + + * device.cordova + * device.model + * device.platform + * device.uuid + * device.version + +## device.cordova + +코르ë„바는 장치ì—서 실행 ì¤‘ì¸ ë²„ì „ì„ ì–»ì„. + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * 아마존 화재 ìš´ì˜ ì²´ì œ + * 안 드 로ì´ë“œ + * 블랙베리 10 + * 브ë¼ìš°ì € + * Firefox ìš´ì˜ ì²´ì œ + * iOS + * Tizen + * Windows Phone 7ê³¼ 8 + * 윈ë„ìš° 8 + +## device.model + +`device.model`소ìžì˜ ëª¨ë¸ ë˜ëŠ” ì œí’ˆì˜ ì´ë¦„ì„ ë°˜í™˜ 합니다. ê°’ 장치 제조업체ì—서 설정 ë˜ ê³  ë™ì¼ ì œí’ˆì˜ ë²„ì „ ê°„ì— ë‹¤ë¥¼ 수 있습니다. + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * 안 드 로ì´ë“œ + * 블랙베리 10 + * 브ë¼ìš°ì € + * iOS + * Tizen + * Windows Phone 7ê³¼ 8 + * 윈ë„ìš° 8 + +### 빠른 예제 + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models 참조 / / var ëª¨ë¸ = device.model; + + +### 안 드 로ì´ë“œ ë‹¨ì  + + * ì–´ë–¤ì€ ì¢…ì¢… 프로ë•ì…˜ 코드 ì´ë¦„ 대신 [제품 ëª¨ë¸ ì´ë¦„](http://developer.android.com/reference/android/os/Build.html#MODEL), [제품 ì´ë¦„](http://developer.android.com/reference/android/os/Build.html#PRODUCT) ì„ ê°€ì ¸ì˜µë‹ˆë‹¤. 예를 들어 넥서스 하나 반환 합니다 `Passion` , ëª¨í† ë¡œë¼ Droid를 반환 합니다`voles`. + +### Tizen 특수 + + * 예를 들어, 공급 ì—…ì²´ì— ì˜í•´ 할당 ëœ ë””ë°”ì´ìФ 모ë¸ì„ 반환 합니다.`TIZEN` + +### Windows Phone 7, 8 특수 + + * 제조업체ì—서 지정 하는 장치 모ë¸ì„ 반환 합니다. 예를 들어 삼성 í¬ì»¤ìŠ¤ë¥¼ 반환 합니다.`SGH-i917`. + +## device.platform + +ìž¥ì¹˜ì˜ ìš´ì˜ ì²´ì œ ì´ë¦„ì„ ì–»ì„. + + var string = device.platform; + + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * 안 드 로ì´ë“œ + * 블랙베리 10 + * Browser4 + * Firefox ìš´ì˜ ì²´ì œ + * iOS + * Tizen + * Windows Phone 7ê³¼ 8 + * 윈ë„ìš° 8 + +### 빠른 예제 + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 ë‹¨ì  + +Windows Phone 7 장치 ë³´ê³  플랫í¼ìœ¼ë¡œ`WinCE`. + +### Windows Phone 8 ë‹¨ì  + +Windows Phone 8 장치 ë³´ê³  플랫í¼ìœ¼ë¡œ`Win32NT`. + +## device.uuid + +소ìžì˜ 보편ì ìœ¼ë¡œ 고유 ì‹ë³„ìž ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier) 를 ì–»ì„합니다). + + var string = device.uuid; + + +### 설명 + +UUID ìƒì„± ë°©ë²•ì˜ ìžì„¸í•œ ë‚´ìš©ì€ ìž¥ì¹˜ ì œì¡°ì—…ì²´ì— ì˜í•´ ê²°ì • ë©ë‹ˆë‹¤ ë° ì†Œìžì˜ í”Œëž«í¼ ì´ë‚˜ 모ë¸. + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * 안 드 로ì´ë“œ + * 블랙베리 10 + * iOS + * Tizen + * Windows Phone 7ê³¼ 8 + * 윈ë„ìš° 8 + +### 빠른 예제 + + / / 안 드 로ì´ë“œ: (문ìžì—´ë¡œ 다시!) ìž„ì˜ì˜ 64 비트 정수를 반환 합니다 / / 정수 ìž¥ì¹˜ì˜ ì²« 번째 부팅ì—서 ìƒì„± / / / / 블랙베리: 디바ì´ìŠ¤ì˜ í•€ 번호를 반환 합니다 / / ì´ê²ƒì€ 9 ìžë¦¬ 고유 정수 (문ìžì—´ë¡œ 비ë¡!) / / / / ì•„ì´í°: (UIDevice í´ëž˜ìФ 설명서ì—서 ìŠ ì—ˆ) / / 문ìžì—´ 여러 하드웨어ì—서 ìƒì„± 하는 해시 ê°’ì„ ì‹ë³„ 하는 반환 합니다. + / ê·¸ê²ƒì€ ëª¨ë“  ìž¥ì¹˜ì— ëŒ€ 한 고유 해야 보장 ë˜ ê³  ë¬¶ì¼ ìˆ˜ 없습니다 / / / ì‚¬ìš©ìž ê³„ì •ì—. + / / Windows Phone 7: 장치 + 현재 사용ìžì˜ 해시를 반환 합니다 / / ì‚¬ìš©ìž ì •ì˜ ë˜ì§€ ì•Šì€ ê²½ìš° guid ìƒì„± ë˜ ê³  ì‘ìš© í”„ë¡œê·¸ëž¨ì„ ì œê±°í•  때까지 유지 ë©ë‹ˆë‹¤ / / Tizen: 반환 장치 IMEI (êµ­ì œ ëª¨ë°”ì¼ ê¸°ê¸° ì‹ë³„ ë˜ëŠ” IMEI 숫ìžìž…니다 / / 모든 GSM와 UMTS 휴대 ì „í™” 고유. + var deviceID = device.uuid; + + +### iOS 특질 + +`uuid`ios ìž¥ì¹˜ì— ê³ ìœ  하지 않습니다 하지만 ê° ì„¤ì¹˜ì— ëŒ€ 한 ì‘ìš© 프로그램 마다 다릅니다. ì‚­ì œ 하 ê³  다시 애플 리 ì¼€ì´ ì…˜ì„ ì„¤ì¹˜ 하는 경우 변경 가능 하 게 ë˜í•œ iOS를 업그레ì´ë“œ 하거나 때 버전 (iOS 5.1ì—ì—서 명백한) 당 ì‘ìš© 프로그램 업그레ì´ë“œë„ 하 ê³ . `uuid`ì€ ì‹ ë¢°í•  수 있는 ê°’ì´ ì•„ë‹™ë‹ˆë‹¤. + +### Windows Phone 7, 8 특수 + +`uuid`Windows Phone 7 í•„ìš” 허가 `ID_CAP_IDENTITY_DEVICE` . Microsoft는 ê³§ì´ ì†ì„±ì„ 세ì›ë‹ˆë‹¤ ê°€ëŠ¥ì„±ì´ ê²ƒìž…ë‹ˆë‹¤. ê¸°ëŠ¥ì„ ì‚¬ìš©í•  수 없는 경우 ì‘ìš© 프로그램 ìž¥ì¹˜ì— ì‘ìš© í”„ë¡œê·¸ëž¨ì˜ ì„¤ì¹˜ 하는 ë™ì•ˆ 유지 하는 ì˜êµ¬ guid를 ìƒì„± 합니다. + +## device.version + +ìš´ì˜ ì²´ì œ ë²„ì „ì„ ì–»ì„. + + var string = device.version; + + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * 안 드 로ì´ë“œ 2.1 + + * 블랙베리 10 + * 브ë¼ìš°ì € + * iOS + * Tizen + * Windows Phone 7ê³¼ 8 + * 윈ë„ìš° 8 + +### 빠른 예제 + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/doc/ko/index.md b/plugins/cordova-plugin-device/doc/ko/index.md new file mode 100644 index 000000000..0fe38a7ae --- /dev/null +++ b/plugins/cordova-plugin-device/doc/ko/index.md @@ -0,0 +1,206 @@ + + +# cordova-plugin-device + +ì´ í”ŒëŸ¬ê·¸ì¸ ì •ì˜ ì „ì—­ `device` 개체, 디바ì´ìŠ¤ì˜ í•˜ë“œì›¨ì–´ ë° ì†Œí”„íŠ¸ì›¨ì–´ì— ì„¤ëª… 합니다. 개체는 ì „ì—­ 범위ì—서 ë¹„ë¡ ê·¸ê²ƒì€ í›„ê¹Œì§€ 사용할 수 있는 `deviceready` ì´ë²¤íЏ. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## 설치 + + cordova plugin add cordova-plugin-device + + +## ì†ì„± + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +코르ë„바는 장치ì—서 실행 ì¤‘ì¸ ë²„ì „ì„ ì–»ì„. + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* 아마존 화재 ìš´ì˜ ì²´ì œ +* 안 드 로ì´ë“œ +* 블랙베리 10 +* 브ë¼ìš°ì € +* Firefox ìš´ì˜ ì²´ì œ +* iOS +* Tizen +* Windows Phone 7ê³¼ 8 +* 윈ë„ìš° 8 + +## device.model + +`device.model`소ìžì˜ ëª¨ë¸ ë˜ëŠ” ì œí’ˆì˜ ì´ë¦„ì„ ë°˜í™˜ 합니다. ê°’ 장치 제조업체ì—서 설정 ë˜ ê³  ë™ì¼ ì œí’ˆì˜ ë²„ì „ ê°„ì— ë‹¤ë¥¼ 수 있습니다. + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* 안 드 로ì´ë“œ +* 블랙베리 10 +* 브ë¼ìš°ì € +* iOS +* Tizen +* Windows Phone 7ê³¼ 8 +* 윈ë„ìš° 8 + +### 빠른 예제 + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models 참조 / / var ëª¨ë¸ = device.model; + + +### 안 드 로ì´ë“œ ë‹¨ì  + +* ì–´ë–¤ì€ ì¢…ì¢… 프로ë•ì…˜ 코드 ì´ë¦„ 대신 [제품 ëª¨ë¸ ì´ë¦„][1], [제품 ì´ë¦„][2] ì„ ê°€ì ¸ì˜µë‹ˆë‹¤. 예를 들어 넥서스 하나 반환 합니다 `Passion` , ëª¨í† ë¡œë¼ Droid를 반환 합니다`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#MODEL + [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + +### Tizen 특수 + +* 예를 들어, 공급 ì—…ì²´ì— ì˜í•´ 할당 ëœ ë””ë°”ì´ìФ 모ë¸ì„ 반환 합니다.`TIZEN` + +### Windows Phone 7, 8 특수 + +* 제조업체ì—서 지정 하는 장치 모ë¸ì„ 반환 합니다. 예를 들어 삼성 í¬ì»¤ìŠ¤ë¥¼ 반환 합니다.`SGH-i917`. + +## device.platform + +ìž¥ì¹˜ì˜ ìš´ì˜ ì²´ì œ ì´ë¦„ì„ ì–»ì„. + + var string = device.platform; + + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* 안 드 로ì´ë“œ +* 블랙베리 10 +* Browser4 +* Firefox ìš´ì˜ ì²´ì œ +* iOS +* Tizen +* Windows Phone 7ê³¼ 8 +* 윈ë„ìš° 8 + +### 빠른 예제 + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 ë‹¨ì  + +Windows Phone 7 장치 ë³´ê³  플랫í¼ìœ¼ë¡œ`WinCE`. + +### Windows Phone 8 ë‹¨ì  + +Windows Phone 8 장치 ë³´ê³  플랫í¼ìœ¼ë¡œ`Win32NT`. + +## device.uuid + +소ìžì˜ 보편ì ìœ¼ë¡œ 고유 ì‹ë³„ìž ([UUID][3] 를 ì–»ì„합니다). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### 설명 + +UUID ìƒì„± ë°©ë²•ì˜ ìžì„¸í•œ ë‚´ìš©ì€ ìž¥ì¹˜ ì œì¡°ì—…ì²´ì— ì˜í•´ ê²°ì • ë©ë‹ˆë‹¤ ë° ì†Œìžì˜ í”Œëž«í¼ ì´ë‚˜ 모ë¸. + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* 안 드 로ì´ë“œ +* 블랙베리 10 +* iOS +* Tizen +* Windows Phone 7ê³¼ 8 +* 윈ë„ìš° 8 + +### 빠른 예제 + + / / 안 드 로ì´ë“œ: (문ìžì—´ë¡œ 다시!) ìž„ì˜ì˜ 64 비트 정수를 반환 합니다 / / 정수 ìž¥ì¹˜ì˜ ì²« 번째 부팅ì—서 ìƒì„± / / / / 블랙베리: 디바ì´ìŠ¤ì˜ í•€ 번호를 반환 합니다 / / ì´ê²ƒì€ 9 ìžë¦¬ 고유 정수 (문ìžì—´ë¡œ 비ë¡!) / / / / ì•„ì´í°: (UIDevice í´ëž˜ìФ 설명서ì—서 ìŠ ì—ˆ) / / 문ìžì—´ 여러 하드웨어ì—서 ìƒì„± 하는 해시 ê°’ì„ ì‹ë³„ 하는 반환 합니다. + / ê·¸ê²ƒì€ ëª¨ë“  ìž¥ì¹˜ì— ëŒ€ 한 고유 해야 보장 ë˜ ê³  ë¬¶ì¼ ìˆ˜ 없습니다 / / / ì‚¬ìš©ìž ê³„ì •ì—. + / / Windows Phone 7: 장치 + 현재 사용ìžì˜ 해시를 반환 합니다 / / ì‚¬ìš©ìž ì •ì˜ ë˜ì§€ ì•Šì€ ê²½ìš° guid ìƒì„± ë˜ ê³  ì‘ìš© í”„ë¡œê·¸ëž¨ì„ ì œê±°í•  때까지 유지 ë©ë‹ˆë‹¤ / / Tizen: 반환 장치 IMEI (êµ­ì œ ëª¨ë°”ì¼ ê¸°ê¸° ì‹ë³„ ë˜ëŠ” IMEI 숫ìžìž…니다 / / 모든 GSM와 UMTS 휴대 ì „í™” 고유. + var deviceID = device.uuid; + + +### iOS 특질 + +`uuid`ios ìž¥ì¹˜ì— ê³ ìœ  하지 않습니다 하지만 ê° ì„¤ì¹˜ì— ëŒ€ 한 ì‘ìš© 프로그램 마다 다릅니다. ì‚­ì œ 하 ê³  다시 애플 리 ì¼€ì´ ì…˜ì„ ì„¤ì¹˜ 하는 경우 변경 가능 하 게 ë˜í•œ iOS를 업그레ì´ë“œ 하거나 때 버전 (iOS 5.1ì—ì—서 명백한) 당 ì‘ìš© 프로그램 업그레ì´ë“œë„ 하 ê³ . `uuid`ì€ ì‹ ë¢°í•  수 있는 ê°’ì´ ì•„ë‹™ë‹ˆë‹¤. + +### Windows Phone 7, 8 특수 + +`uuid`Windows Phone 7 í•„ìš” 허가 `ID_CAP_IDENTITY_DEVICE` . Microsoft는 ê³§ì´ ì†ì„±ì„ 세ì›ë‹ˆë‹¤ ê°€ëŠ¥ì„±ì´ ê²ƒìž…ë‹ˆë‹¤. ê¸°ëŠ¥ì„ ì‚¬ìš©í•  수 없는 경우 ì‘ìš© 프로그램 ìž¥ì¹˜ì— ì‘ìš© í”„ë¡œê·¸ëž¨ì˜ ì„¤ì¹˜ 하는 ë™ì•ˆ 유지 하는 ì˜êµ¬ guid를 ìƒì„± 합니다. + +## device.version + +ìš´ì˜ ì²´ì œ ë²„ì „ì„ ì–»ì„. + + var string = device.version; + + +### ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* 안 드 로ì´ë“œ 2.1 + +* 블랙베리 10 +* 브ë¼ìš°ì € +* iOS +* Tizen +* Windows Phone 7ê³¼ 8 +* 윈ë„ìš° 8 + +### 빠른 예제 + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/doc/pl/README.md b/plugins/cordova-plugin-device/doc/pl/README.md new file mode 100644 index 000000000..c38832df4 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/pl/README.md @@ -0,0 +1,214 @@ + + +# cordova-plugin-device + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device) + +Ten plugin okreÅ›la globalne `device` obiekt, który opisuje urzÄ…dzenia sprzÄ™towe i programowe. Mimo, że obiekt jest w globalnym zasiÄ™gu, nie jest dostÄ™pne dopiero po `deviceready` zdarzenie. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Instalacja + + cordova plugin add cordova-plugin-device + + +## WÅ‚aÅ›ciwoÅ›ci + + * device.cordova + * device.model + * device.platform + * device.uuid + * device.version + +## device.cordova + +Pobierz wersjÄ™ Cordova dziaÅ‚a na urzÄ…dzeniu. + +### ObsÅ‚ugiwane platformy + + * Amazon Fire OS + * Android + * BlackBerry 10 + * PrzeglÄ…darka + * Firefox OS + * iOS + * Tizen + * Windows Phone 7 i 8 + * Windows 8 + +## device.model + +`device.model`Zwraca nazwÄ™ modelu lub produktu. Wartość jest zestaw przez producenta urzÄ…dzenia i mogÄ… siÄ™ różnić miÄ™dzy wersjami tego samego produktu. + +### ObsÅ‚ugiwane platformy + + * Android + * BlackBerry 10 + * PrzeglÄ…darka + * iOS + * Tizen + * Windows Phone 7 i 8 + * Windows 8 + +### Szybki przykÅ‚ad + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Zobacz http://theiphonewiki.com/wiki/index.php?title=Models / / modelu var = device.model; + + +### Dziwactwa Androida + + * Pobiera [nazwÄ™ produktu](http://developer.android.com/reference/android/os/Build.html#PRODUCT) zamiast [nazwy modelu](http://developer.android.com/reference/android/os/Build.html#MODEL), który czÄ™sto jest nazwÄ… kod produkcji. Na przykÅ‚ad, Nexus One zwraca `Passion` , i zwraca Motorola Droid`voles`. + +### Dziwactwa Tizen + + * Zwraca modelu urzÄ…dzenia przypisane przez dostawcÄ™, na przykÅ‚ad,`TIZEN` + +### Windows Phone 7 i 8 dziwactwa + + * Zwraca modelu urzÄ…dzenia, okreÅ›lonej przez producenta. Na przykÅ‚ad Samsung ostroÅ›ci zwraca`SGH-i917`. + +## device.platform + +Uzyskać nazwÄ™ systemu operacyjnego urzÄ…dzenia. + + var string = device.platform; + + +### ObsÅ‚ugiwane platformy + + * Android + * BlackBerry 10 + * Browser4 + * Firefox OS + * iOS + * Tizen + * Windows Phone 7 i 8 + * Windows 8 + +### Szybki przykÅ‚ad + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Dziwactwa Windows Phone 7 + +UrzÄ…dzenia Windows Phone 7 raport platformy jako`WinCE`. + +### Windows Phone 8 dziwactwa + +UrzÄ…dzenia Windows Phone 8 raport platformy jako`Win32NT`. + +## device.uuid + +SiÄ™ urzÄ…dzenia uniwersalnie unikatowy identyfikator ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)). + + var string = device.uuid; + + +### Opis + +Szczegóły jak UUID jest generowane sÄ… okreÅ›lane przez producenta urzÄ…dzenia i sÄ… specyficzne dla platformy lub modelu urzÄ…dzenia. + +### ObsÅ‚ugiwane platformy + + * Android + * BlackBerry 10 + * iOS + * Tizen + * Windows Phone 7 i 8 + * Windows 8 + +### Szybki przykÅ‚ad + + // Android: Returns a random 64-bit integer (as a string, again!) + // The integer is generated on the device's first boot + // + // BlackBerry: Returns the PIN number of the device + // This is a nine-digit unique integer (as a string, though!) + // + // iPhone: (Paraphrased from the UIDevice Class documentation) + // Returns a string of hash values created from multiple hardware identifies. + // It is guaranteed to be unique for every device and can't be tied + // to the user account. + // Windows Phone 7 : Returns a hash of device+current user, + // if the user is not defined, a guid is generated and will persist until the app is uninstalled + // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number + // unique to every GSM and UMTS mobile phone. + var deviceID = device.uuid; + + +### iOS dziwactwo + +`uuid`Na iOS nie jest przypisany do urzÄ…dzenia, ale różni siÄ™ dla każdej aplikacji, dla każdej instalacji. Zmienia siÄ™ jeÅ›li możesz usunąć i ponownie zainstalować aplikacjÄ™, a ewentualnie także po aktualizacji iOS czy nawet uaktualnienia aplikacji dla wersji (widoczny w iOS 5.1). `uuid`Jest nie wiarygodne wartoÅ›ci. + +### Windows Phone 7 i 8 dziwactwa + +`uuid`Dla Windows Phone 7 wymaga uprawnieÅ„ `ID_CAP_IDENTITY_DEVICE` . Microsoft bÄ™dzie prawdopodobnie potÄ™piać ten wkrótce. JeÅ›li funkcja nie jest dostÄ™pna, aplikacja generuje trwaÅ‚e identyfikator guid, który jest utrzymywany przez czas trwania instalacji aplikacji na urzÄ…dzeniu. + +## device.version + +Pobierz wersjÄ™ systemu operacyjnego. + + var string = device.version; + + +### ObsÅ‚ugiwane platformy + + * Android 2.1 + + * BlackBerry 10 + * PrzeglÄ…darka + * iOS + * Tizen + * Windows Phone 7 i 8 + * Windows 8 + +### Szybki przykÅ‚ad + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/doc/pl/index.md b/plugins/cordova-plugin-device/doc/pl/index.md new file mode 100644 index 000000000..acc8f9c8f --- /dev/null +++ b/plugins/cordova-plugin-device/doc/pl/index.md @@ -0,0 +1,206 @@ + + +# cordova-plugin-device + +Ten plugin okreÅ›la globalne `device` obiekt, który opisuje urzÄ…dzenia sprzÄ™towe i programowe. Mimo, że obiekt jest w globalnym zasiÄ™gu, nie jest dostÄ™pne dopiero po `deviceready` zdarzenie. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## Instalacja + + cordova plugin add cordova-plugin-device + + +## WÅ‚aÅ›ciwoÅ›ci + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Pobierz wersjÄ™ Cordova dziaÅ‚a na urzÄ…dzeniu. + +### ObsÅ‚ugiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* PrzeglÄ…darka +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +## device.model + +`device.model`Zwraca nazwÄ™ modelu lub produktu. Wartość jest zestaw przez producenta urzÄ…dzenia i mogÄ… siÄ™ różnić miÄ™dzy wersjami tego samego produktu. + +### ObsÅ‚ugiwane platformy + +* Android +* BlackBerry 10 +* PrzeglÄ…darka +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Szybki przykÅ‚ad + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Zobacz http://theiphonewiki.com/wiki/index.php?title=Models / / modelu var = device.model; + + +### Dziwactwa Androida + +* Pobiera [nazwÄ™ produktu][1] zamiast [nazwy modelu][2], który czÄ™sto jest nazwÄ… kod produkcji. Na przykÅ‚ad, Nexus One zwraca `Passion` , i zwraca Motorola Droid`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Dziwactwa Tizen + +* Zwraca modelu urzÄ…dzenia przypisane przez dostawcÄ™, na przykÅ‚ad,`TIZEN` + +### Windows Phone 7 i 8 dziwactwa + +* Zwraca modelu urzÄ…dzenia, okreÅ›lonej przez producenta. Na przykÅ‚ad Samsung ostroÅ›ci zwraca`SGH-i917`. + +## device.platform + +Uzyskać nazwÄ™ systemu operacyjnego urzÄ…dzenia. + + var string = device.platform; + + +### ObsÅ‚ugiwane platformy + +* Android +* BlackBerry 10 +* Browser4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Szybki przykÅ‚ad + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Dziwactwa Windows Phone 7 + +UrzÄ…dzenia Windows Phone 7 raport platformy jako`WinCE`. + +### Windows Phone 8 dziwactwa + +UrzÄ…dzenia Windows Phone 8 raport platformy jako`Win32NT`. + +## device.uuid + +SiÄ™ urzÄ…dzenia uniwersalnie unikatowy identyfikator ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### Opis + +Szczegóły jak UUID jest generowane sÄ… okreÅ›lane przez producenta urzÄ…dzenia i sÄ… specyficzne dla platformy lub modelu urzÄ…dzenia. + +### ObsÅ‚ugiwane platformy + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Szybki przykÅ‚ad + + / / Android: zwraca losowe 64-bitowa liczba caÅ‚kowita (jako ciÄ…g, znowu!) / / liczba caÅ‚kowita jest generowany na pierwszego uruchomienia urzÄ…dzenia / / / / BlackBerry: zwraca numer PIN urzÄ…dzenia / / to jest unikatowÄ… liczbÄ… caÅ‚kowitÄ… dziewiÄ™ciu cyfr (jako ciÄ…g, choć!) / / / / iPhone: (zacytowana w dokumentacji klasy UIDevice) / / zwraca ciÄ…g wartoÅ›ci mieszania utworzone z wielu sprzÄ™tu identyfikuje. + Zapewniona jest unikatowy dla każdego urzÄ…dzenia i nie może być zwiÄ…zane z / do konta użytkownika. + / / Windows Phone 7: zwraca wartość mieszania urzÄ…dzenia + bieżący użytkownik, / / jeÅ›li nie zdefiniowane przez użytkownika, identyfikator guid jest generowany i bÄ™dzie trwać do czasu odinstalowania aplikacji / / Tizen: zwraca urzÄ…dzenia IMEI (International Mobile Equipment Identity lub IMEI jest liczbÄ… / / unikatowe dla każdego telefonu komórkowego GSM i UMTS. + var deviceID = device.uuid; + + +### iOS dziwactwo + +`uuid`Na iOS nie jest przypisany do urzÄ…dzenia, ale różni siÄ™ dla każdej aplikacji, dla każdej instalacji. Zmienia siÄ™ jeÅ›li możesz usunąć i ponownie zainstalować aplikacjÄ™, a ewentualnie także po aktualizacji iOS czy nawet uaktualnienia aplikacji dla wersji (widoczny w iOS 5.1). `uuid`Jest nie wiarygodne wartoÅ›ci. + +### Windows Phone 7 i 8 dziwactwa + +`uuid`Dla Windows Phone 7 wymaga uprawnieÅ„ `ID_CAP_IDENTITY_DEVICE` . Microsoft bÄ™dzie prawdopodobnie potÄ™piać ten wkrótce. JeÅ›li funkcja nie jest dostÄ™pna, aplikacja generuje trwaÅ‚e identyfikator guid, który jest utrzymywany przez czas trwania instalacji aplikacji na urzÄ…dzeniu. + +## device.version + +Pobierz wersjÄ™ systemu operacyjnego. + + var string = device.version; + + +### ObsÅ‚ugiwane platformy + +* Android 2.1 + +* BlackBerry 10 +* PrzeglÄ…darka +* iOS +* Tizen +* Windows Phone 7 i 8 +* Windows 8 + +### Szybki przykÅ‚ad + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/doc/ru/index.md b/plugins/cordova-plugin-device/doc/ru/index.md new file mode 100644 index 000000000..263b1cd90 --- /dev/null +++ b/plugins/cordova-plugin-device/doc/ru/index.md @@ -0,0 +1,219 @@ + + +# cordova-plugin-device + +Этот плагин определÑет глобальный объект `device`, который опиÑывает оборудование и программное обеÑпечение уÑтройÑтва. ÐеÑÐ¼Ð¾Ñ‚Ñ€Ñ Ð½Ð° то что объект в глобальной облаÑти видимоÑти, он не доÑтупен до того момента пока не произойдет Ñобытие `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## УÑтановка + + cordova plugin add cordova-plugin-device + + +## Параметры + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +Возвращает верÑию Cordova, работающую на уÑтройÑтве. + +### Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* Обозреватель +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +## device.model + +СвойÑтво `device.model` возвращает Ð¸Ð¼Ñ ÑƒÑтройÑтва модели или продукта. Значение уÑтанавливаетÑÑ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´Ð¸Ñ‚ÐµÐ»ÐµÐ¼ уÑтройÑтва и могут отличатьÑÑ Ð² разных верÑиÑÑ… одного и того же продукта. + +### Поддерживаемые платформы + +* Android +* BlackBerry 10 +* Обозреватель +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Краткий пример + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models + // + var model = device.model; + + +### ОÑобенноÑти Android + +* Возвращает [Ð¸Ð¼Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°][1] , а не [Ð¸Ð¼Ñ Ð¼Ð¾Ð´ÐµÐ»Ð¸][2], которое чаÑто ÑвлÑетÑÑ Ð¿Ñ€Ð¾Ð¸Ð·Ð²Ð¾Ð´Ñтвенным кодом. Ðапример, Nexus One из них возвращает `Passion` , и Motorola Droid возвращает `voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### ОÑобенноÑти Tizen + +* Возвращает модель уÑтройÑтва, назначенного вендором, например,`TIZEN` + +### ОÑобенноÑти Windows Phone 7 и 8 + +* Возвращает модель уÑтройÑтва, указанной заводом-изготовителем. Ðапример Samsung Focus возвращает `SGH-i917`. + +## device.platform + +Получите Ð¸Ð¼Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð¾Ð¹ ÑиÑтемы уÑтройÑтва. + + var string = device.platform; + + +### Поддерживаемые платформы + +* Android +* BlackBerry 10 +* Браузером4 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Краткий пример + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### ОÑобенноÑти Windows Phone 7 + +Windows Phone 7 уÑтройÑтва Ñообщают платформу как `WinCE`. + +### ОÑобенноÑти Windows Phone 8 + +УÑтройÑтва Windows Phone 8 Ñообщают платформу как `Win32NT`. + +## device.uuid + +Возвращает универÑальный уникального идентификатора ([UUID][3] уÑтройÑтва). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### ОпиÑание + +ÐŸÐ¾Ð´Ñ€Ð¾Ð±Ð½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ том как UUID генерируетÑÑ, определÑÑŽÑ‚ÑÑ Ð¸Ð·Ð³Ð¾Ñ‚Ð¾Ð²Ð¸Ñ‚ÐµÐ»ÐµÐ¼ уÑтройÑтва и ÑвлÑÑŽÑ‚ÑÑ ÑпецифичеÑкими Ð´Ð»Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ñ‹ или модели уÑтройÑтва. + +### Поддерживаемые платформы + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Краткий пример + + // Android: Возвращает Ñлучайное 64-разрÑдное целое чиÑло (в виде Ñтроки, опÑть!) + // целое чиÑло генерируетÑÑ Ð¿Ñ€Ð¸ первой загрузке уÑтройÑтва + // + // BlackBerry: Возвращает номер PIN уÑтройÑтва + // Ñто 9 значный уникальный целочиÑленный (как Ñтрока, хотÑ!) + // + // iPhone: (Перефразировано из документации клаÑÑа UIDevice) + // возвращает Ñтроку Ñ…Ñш-значениÑ, Ñозданные из неÑкольких аппаратных определÑет. + // Это значение гарантированно ÑвлÑетÑÑ ÑƒÐ½Ð¸ÐºÐ°Ð»ÑŒÐ½Ñ‹Ð¼ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ уÑтройÑтва и не может быть привÑзано + // к учетной запиÑи пользователÑ. + // Windows Phone 7: Возвращает Ñ…Ñш уÑтройÑтво + текущего пользователÑ, + // еÑли пользователь не определен, формируетÑÑ guid который и будет ÑохранÑтьÑÑ Ð´Ð¾ тех пор, пока приложение не удалитьÑÑ + // Tizen: возвращает IMEI уÑтройÑтва (Международный идентификатор мобильного Ð¾Ð±Ð¾Ñ€ÑƒÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸Ð»Ð¸ IMEI Ñто чиÑло + // уникальное Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ мобильного телефона GSM и UMTS. + var deviceID = device.uuid; + + +### ОÑобенноÑти iOS + +Ðа iOS `uuid` не ÑвлÑетÑÑ ÑƒÐ½Ð¸ÐºÐ°Ð»ÑŒÐ½Ñ‹Ð¼ Ð´Ð»Ñ ÑƒÑтройÑтва, но варьируетÑÑ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ приложениÑ, и Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ уÑтановки. Значение менÑетÑÑ, еÑли удалить и повторно уÑтановить приложение, и возможно также когда вы обновите iOS, или даже обновить приложение до Ñледующей верÑии (очевидно в iOS 5.1). Значение `uuid` не ÑвлÑетÑÑ Ð½Ð°Ð´ÐµÐ¶Ð½Ñ‹Ð¼. + +### ОÑобенноÑти Windows Phone 7 и 8 + +Ð”Ð»Ñ Windows Phone 7 `uuid` требует Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ `ID_CAP_IDENTITY_DEVICE` . Microsoft Ñкорее вÑего Ñкоро Ñделает Ñто ÑвойÑтво уÑтаревшим. ЕÑли возможноÑть недоÑтупна, приложение Ñоздает поÑтоÑнные guid, который ÑохранÑетÑÑ Ð½Ð° вÑе Ð²Ñ€ÐµÐ¼Ñ ÑƒÑтановки Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð½Ð° уÑтройÑтве. + +## device.version + +Возвращает верÑию операционной ÑиÑтемы. + + var string = device.version; + + +### Поддерживаемые платформы + +* Android 2.1 + +* BlackBerry 10 +* Обозреватель +* iOS +* Tizen +* Windows Phone 7 и 8 +* Windows 8 + +### Краткий пример + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/doc/zh/README.md b/plugins/cordova-plugin-device/doc/zh/README.md new file mode 100644 index 000000000..9a18a55ed --- /dev/null +++ b/plugins/cordova-plugin-device/doc/zh/README.md @@ -0,0 +1,203 @@ + + +# cordova-plugin-device + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device) + +這個外掛程å¼å®šç¾©å…¨çƒ `device` 物件,æè¿°è©²è¨­å‚™çš„硬體和軟體。 雖然物件是在全çƒç¯„åœå…§ï¼Œä½†ä¸æ˜¯å¯ç”¨ï¼Œç›´åˆ°å¾Œ `deviceready` 事件。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## å®‰è£ + + cordova plugin add cordova-plugin-device + + +## 屬性 + + * device.cordova + * device.model + * device.platform + * device.uuid + * device.version + +## device.cordova + +ç²å–科爾多瓦在設備上é‹è¡Œçš„版本。 + +### 支æ´çš„平臺 + + * 亞馬éœç« OS + * Android 系統 + * 黑莓 10 + * ç€è¦½å™¨ + * ç«ç‹ç€è¦½å™¨ä½œæ¥­ç³»çµ± + * iOS + * Tizen + * Windows Phone 7 å’Œ 8 + * Windows 8 + +## device.model + +`device.model`返回設備的模型或產å“çš„å稱。值由設備製造商設置和åŒä¸€ç”¢å“çš„ä¸åŒç‰ˆæœ¬å¯èƒ½ä¸åŒã€‚ + +### 支æ´çš„平臺 + + * Android 系統 + * 黑莓 10 + * ç€è¦½å™¨ + * iOS + * Tizen + * Windows Phone 7 å’Œ 8 + * Windows 8 + +### 快速的示例 + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. è«‹åƒé–± HTTP://theiphonewiki.com/wiki/index.php?title=Models / / var 模型 = device.model ï¼› + + +### Android 的怪癖 + + * ç²å–[產å“å稱](http://developer.android.com/reference/android/os/Build.html#PRODUCT)è€Œä¸æ˜¯[產å“型號å稱](http://developer.android.com/reference/android/os/Build.html#MODEL),這往往是生產代碼å稱。 例如,Nexus One 返回 `Passion` ,和摩托羅拉 Droid 返回`voles`. + +### Tizen 怪癖 + + * 例如,返回與供應商指派的設備模型`TIZEN` + +### Windows Phone 7 å’Œ 8 怪癖 + + * 返回由製造商指定的設備模型。例如,三星焦點返回`SGH-i917`. + +## device.platform + +ç²å–設備的作業系統å稱。 + + var string = device.platform; + + +### 支æ´çš„平臺 + + * Android 系統 + * 黑莓 10 + * Browser4 + * ç«ç‹ç€è¦½å™¨ä½œæ¥­ç³»çµ± + * iOS + * Tizen + * Windows Phone 7 å’Œ 8 + * Windows 8 + +### 快速的示例 + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 的怪癖 + +Windows Phone 7 設備報告作為平臺`WinCE`. + +### Windows Phone 8 怪癖 + +Windows Phone 8 設備報告作為平臺`Win32NT`. + +## device.uuid + +ç²å–設備的通用唯一識別碼 ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)). + + var string = device.uuid; + + +### 說明 + +如何生æˆä¸€å€‹ UUID 的細節由設備製造商和特定于設備的平臺或模型。 + +### 支æ´çš„平臺 + + * Android 系統 + * 黑莓 10 + * iOS + * Tizen + * Windows Phone 7 å’Œ 8 + * Windows 8 + +### 快速的示例 + + / / Android: 一個隨機的 64 使•´æ•¸ ï¼ˆä½œç‚ºå­—ä¸²è¿”å›žï¼Œå†æ¬¡!) / / 上設備的第一次啟動生æˆçš„æ•´æ•¸ / / / / 黑莓手機: 返回設備的 PIN 號碼 / / 這是ä¹å€‹æ•¸å­—的唯一整數 (作為字串,雖然!) / / / / iPhone: (從 UIDevice 類文檔解釋) / / 返回一個字串的雜湊值創建的多個硬體標識。 + / / 它ä¿è­‰æ˜¯å”¯ä¸€çš„æ¯å€‹è¨­å‚™ä¸¦ä¸èƒ½ç¶ / / 到使用者帳戶。 + / / Windows Phone 7: 返回的雜湊代碼的設備 + ç•¶å‰ä½¿ç”¨è€…,/ / 如果未定義使用者,則一個 guid 生æˆçš„並且將會ä¿ç•™ç›´åˆ°å¸è¼‰è©²æ‡‰ç”¨ç¨‹å¼ / / Tizen: 返回設備 IMEI (國際行動è£ç½®èº«ä»½æˆ– IMEI æ˜¯ä¸€å€‹æ•¸ä½ / / ç¨æœ‰çš„æ¯ä¸€å€‹ UMTS å’Œ GSM 行動電話。 + var deviceID = device.uuid; + + +### iOS 怪癖 + +`uuid`在 iOS 䏿˜¯å”¯ä¸€çš„一種è£ç½®ï¼Œä½†å°æ–¼æ¯å€‹æ‡‰ç”¨ç¨‹å¼ï¼Œç‚ºæ¯å€‹å®‰è£è€Œç•°ã€‚ å¦‚æžœæ‚¨åˆªé™¤ä¸¦é‡æ–°å®‰è£è©²æ‡‰ç”¨ç¨‹å¼ï¼Œå®ƒæ›´æ”¹å’Œå¯èƒ½é‚„ç•¶ä½ å‡ç´š iOS,或甚至å‡ç´šæ¯å€‹ç‰ˆæœ¬ (iOS 5.1 中存在明顯的) 的應用程å¼ã€‚ `uuid`䏿˜¯ä¸€å€‹å¯é çš„值。 + +### Windows Phone 7 å’Œ 8 怪癖 + +`uuid`為 Windows Phone 7 é ˆç¶“è¨±å¯ `ID_CAP_IDENTITY_DEVICE` 。 Microsoft å¯èƒ½æœƒå¾ˆå¿«æ£„用此屬性。 如果沒有å¯ç”¨çš„能力,應用程å¼å°‡ç”Ÿæˆè¨­å‚™ä¸Šæ‡‰ç”¨ç¨‹å¼çš„安è£éŽç¨‹ä¸­ä¿æŒæŒçºŒçš„ guid。 + +## device.version + +ç²å–作業系統版本。 + + var string = device.version; + + +### 支æ´çš„平臺 + + * Android 2.1 + + * 黑莓 10 + * ç€è¦½å™¨ + * iOS + * Tizen + * Windows Phone 7 å’Œ 8 + * Windows 8 + +### 快速的示例 + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/doc/zh/index.md b/plugins/cordova-plugin-device/doc/zh/index.md new file mode 100644 index 000000000..5626d696e --- /dev/null +++ b/plugins/cordova-plugin-device/doc/zh/index.md @@ -0,0 +1,206 @@ + + +# cordova-plugin-device + +這個外掛程å¼å®šç¾©å…¨çƒ `device` 物件,æè¿°è©²è¨­å‚™çš„硬體和軟體。 雖然物件是在全çƒç¯„åœå…§ï¼Œä½†ä¸æ˜¯å¯ç”¨ï¼Œç›´åˆ°å¾Œ `deviceready` 事件。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(device.cordova); + } + + +## å®‰è£ + + cordova plugin add cordova-plugin-device + + +## 屬性 + +* device.cordova +* device.model +* device.platform +* device.uuid +* device.version + +## device.cordova + +ç²å–科爾多瓦在設備上é‹è¡Œçš„版本。 + +### 支æ´çš„平臺 + +* 亞馬éœç« OS +* Android 系統 +* 黑莓 10 +* ç€è¦½å™¨ +* ç«ç‹ç€è¦½å™¨çš„作業系統 +* iOS +* æ³° +* Windows Phone 7 å’Œ 8 +* Windows 8 + +## device.model + +`device.model`返回設備的模型或產å“çš„å稱。值由設備製造商設置和åŒä¸€ç”¢å“çš„ä¸åŒç‰ˆæœ¬å¯èƒ½ä¸åŒã€‚ + +### 支æ´çš„平臺 + +* Android 系統 +* 黑莓 10 +* ç€è¦½å™¨ +* iOS +* æ³° +* Windows Phone 7 å’Œ 8 +* Windows 8 + +### 快速的示例 + + // Android: Nexus One returns "Passion" (Nexus One code name) + // Motorola Droid returns "voles" + // BlackBerry: Torch 9800 returns "9800" + // Browser: Google Chrome returns "Chrome" + // Safari returns "Safari" + // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. è«‹åƒé–± HTTP://theiphonewiki.com/wiki/index.php?title=Models / / var 模型 = device.model ï¼› + + +### Android 的怪癖 + +* ç²å–[產å“å稱][1]è€Œä¸æ˜¯[產å“型號å稱][2],這往往是生產代碼å稱。 例如,Nexus One 返回 `Passion` ,和摩托羅拉 Droid 返回`voles`. + + [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT + [2]: http://developer.android.com/reference/android/os/Build.html#MODEL + +### Tizen 怪癖 + +* 例如,返回與供應商指派的設備模型`TIZEN` + +### Windows Phone 7 å’Œ 8 怪癖 + +* 返回由製造商指定的設備模型。例如,三星焦點返回`SGH-i917`. + +## device.platform + +ç²å–設備的作業系統å稱。 + + var string = device.platform; + + +### 支æ´çš„平臺 + +* Android 系統 +* 黑莓 10 +* Browser4 +* ç«ç‹ç€è¦½å™¨çš„作業系統 +* iOS +* æ³° +* Windows Phone 7 å’Œ 8 +* Windows 8 + +### 快速的示例 + + // Depending on the device, a few examples are: + // - "Android" + // - "BlackBerry 10" + // - Browser: returns "MacIntel" on Mac + // returns "Win32" on Windows + // - "iOS" + // - "WinCE" + // - "Tizen" + var devicePlatform = device.platform; + + +### Windows Phone 7 的怪癖 + +Windows Phone 7 設備報告作為平臺`WinCE`. + +### Windows Phone 8 怪癖 + +Windows Phone 8 設備報告作為平臺`Win32NT`. + +## device.uuid + +ç²å–設備的通用唯一識別碼 ([UUID][3]). + + [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier + + var string = device.uuid; + + +### 說明 + +如何生æˆä¸€å€‹ UUID 的細節由設備製造商和特定于設備的平臺或模型。 + +### 支æ´çš„平臺 + +* Android 系統 +* 黑莓 10 +* iOS +* Tizen +* Windows Phone 7 å’Œ 8 +* Windows 8 + +### 快速的示例 + + / / Android: 一個隨機的 64 使•´æ•¸ ï¼ˆä½œç‚ºå­—ä¸²è¿”å›žï¼Œå†æ¬¡!) / / 上設備的第一次啟動生æˆçš„æ•´æ•¸ / / / / 黑莓手機: 返回設備的 PIN 號碼 / / 這是ä¹å€‹æ•¸å­—的唯一整數 (作為字串,雖然!) / / / / iPhone: (從 UIDevice 類文檔解釋) / / 返回一個字串的雜湊值創建的多個硬體標識。 + / / 它ä¿è­‰æ˜¯å”¯ä¸€çš„æ¯å€‹è¨­å‚™ä¸¦ä¸èƒ½ç¶ / / 到使用者帳戶。 + / / Windows Phone 7: 返回的雜湊代碼的設備 + ç•¶å‰ä½¿ç”¨è€…,/ / 如果未定義使用者,則一個 guid 生æˆçš„並且將會ä¿ç•™ç›´åˆ°å¸è¼‰è©²æ‡‰ç”¨ç¨‹å¼ / / Tizen: 返回設備 IMEI (國際行動è£ç½®èº«ä»½æˆ– IMEI æ˜¯ä¸€å€‹æ•¸ä½ / / ç¨æœ‰çš„æ¯ä¸€å€‹ UMTS å’Œ GSM 行動電話。 + var deviceID = device.uuid; + + +### iOS 怪癖 + +`uuid`在 iOS 䏿˜¯å”¯ä¸€çš„一種è£ç½®ï¼Œä½†å°æ–¼æ¯å€‹æ‡‰ç”¨ç¨‹å¼ï¼Œç‚ºæ¯å€‹å®‰è£è€Œç•°ã€‚ å¦‚æžœæ‚¨åˆªé™¤ä¸¦é‡æ–°å®‰è£è©²æ‡‰ç”¨ç¨‹å¼ï¼Œå®ƒæ›´æ”¹å’Œå¯èƒ½é‚„ç•¶ä½ å‡ç´š iOS,或甚至å‡ç´šæ¯å€‹ç‰ˆæœ¬ (iOS 5.1 中存在明顯的) 的應用程å¼ã€‚ `uuid`䏿˜¯ä¸€å€‹å¯é çš„值。 + +### Windows Phone 7 å’Œ 8 怪癖 + +`uuid`為 Windows Phone 7 é ˆç¶“è¨±å¯ `ID_CAP_IDENTITY_DEVICE` 。 Microsoft å¯èƒ½æœƒå¾ˆå¿«æ£„用此屬性。 如果沒有å¯ç”¨çš„能力,應用程å¼å°‡ç”Ÿæˆè¨­å‚™ä¸Šæ‡‰ç”¨ç¨‹å¼çš„安è£éŽç¨‹ä¸­ä¿æŒæŒçºŒçš„ guid。 + +## device.version + +ç²å–作業系統版本。 + + var string = device.version; + + +### 支æ´çš„平臺 + +* Android 2.1 + +* 黑莓 10 +* ç€è¦½å™¨ +* iOS +* æ³° +* Windows Phone 7 å’Œ 8 +* Windows 8 + +### 快速的示例 + + // Android: Froyo OS would return "2.2" + // Eclair OS would return "2.1", "2.0.1", or "2.0" + // Version can also return update level "2.1-update1" + // + // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" + // + // Browser: Returns version number for the browser + // + // iPhone: iOS 3.2 returns "3.2" + // + // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 + // Tizen: returns "TIZEN_20120425_2" + var deviceVersion = device.version; diff --git a/plugins/cordova-plugin-device/package.json b/plugins/cordova-plugin-device/package.json new file mode 100644 index 000000000..64b736b60 --- /dev/null +++ b/plugins/cordova-plugin-device/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + "cordova-plugin-device@2.0.2", + "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular" + ] + ], + "_from": "cordova-plugin-device@2.0.2", + "_id": "cordova-plugin-device@2.0.2", + "_inBundle": false, + "_integrity": "sha1-/Ajzci5n7ve2xnv8mag99q3Quro=", + "_location": "/cordova-plugin-device", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cordova-plugin-device@2.0.2", + "name": "cordova-plugin-device", + "escapedName": "cordova-plugin-device", + "rawSpec": "2.0.2", + "saveSpec": null, + "fetchSpec": "2.0.2" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/cordova-plugin-device/-/cordova-plugin-device-2.0.2.tgz", + "_spec": "2.0.2", + "_where": "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular", + "author": { + "name": "Apache Software Foundation" + }, + "bugs": { + "url": "https://issues.apache.org/jira/browse/CB" + }, + "cordova": { + "id": "cordova-plugin-device", + "platforms": [ + "android", + "ios", + "windows", + "browser", + "osx" + ] + }, + "description": "Cordova Device Plugin", + "devDependencies": { + "eslint": "^3.19.0", + "eslint-config-semistandard": "^11.0.0", + "eslint-config-standard": "^10.2.1", + "eslint-plugin-import": "^2.3.0", + "eslint-plugin-node": "^5.0.0", + "eslint-plugin-promise": "^3.5.0", + "eslint-plugin-standard": "^3.0.1" + }, + "engines": { + "cordovaDependencies": { + "3.0.0": { + "cordova": ">100" + } + } + }, + "homepage": "https://github.com/apache/cordova-plugin-device#readme", + "keywords": [ + "cordova", + "device", + "ecosystem:cordova", + "cordova-android", + "cordova-ios", + "cordova-windows", + "cordova-browser", + "cordova-osx" + ], + "license": "Apache-2.0", + "name": "cordova-plugin-device", + "repository": { + "type": "git", + "url": "git+https://github.com/apache/cordova-plugin-device.git" + }, + "scripts": { + "eslint": "node node_modules/eslint/bin/eslint www && node node_modules/eslint/bin/eslint src && node node_modules/eslint/bin/eslint tests", + "test": "npm run eslint" + }, + "types": "./types/index.d.ts", + "version": "2.0.2" +} diff --git a/plugins/cordova-plugin-device/plugin.xml b/plugins/cordova-plugin-device/plugin.xml new file mode 100644 index 000000000..7f600241a --- /dev/null +++ b/plugins/cordova-plugin-device/plugin.xml @@ -0,0 +1,93 @@ + + + + + Device + Cordova Device Plugin + Apache 2.0 + cordova,device + https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git + https://issues.apache.org/jira/browse/CB/component/12320648 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-device/src/android/Device.java b/plugins/cordova-plugin-device/src/android/Device.java new file mode 100644 index 000000000..e9efcb49b --- /dev/null +++ b/plugins/cordova-plugin-device/src/android/Device.java @@ -0,0 +1,174 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.device; + +import java.util.TimeZone; + +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaInterface; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.provider.Settings; + +public class Device extends CordovaPlugin { + public static final String TAG = "Device"; + + public static String platform; // Device OS + public static String uuid; // Device UUID + + private static final String ANDROID_PLATFORM = "Android"; + private static final String AMAZON_PLATFORM = "amazon-fireos"; + private static final String AMAZON_DEVICE = "Amazon"; + + /** + * Constructor. + */ + public Device() { + } + + /** + * Sets the context of the Command. This can then be used to do things like + * get file paths associated with the Activity. + * + * @param cordova The context of the main Activity. + * @param webView The CordovaWebView Cordova is running in. + */ + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + Device.uuid = getUuid(); + } + + /** + * Executes the request and returns PluginResult. + * + * @param action The action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackContext The callback id used when calling back into JavaScript. + * @return True if the action was valid, false if not. + */ + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + if ("getDeviceInfo".equals(action)) { + JSONObject r = new JSONObject(); + r.put("uuid", Device.uuid); + r.put("version", this.getOSVersion()); + r.put("platform", this.getPlatform()); + r.put("model", this.getModel()); + r.put("manufacturer", this.getManufacturer()); + r.put("isVirtual", this.isVirtual()); + r.put("serial", this.getSerialNumber()); + callbackContext.success(r); + } + else { + return false; + } + return true; + } + + //-------------------------------------------------------------------------- + // LOCAL METHODS + //-------------------------------------------------------------------------- + + /** + * Get the OS name. + * + * @return + */ + public String getPlatform() { + String platform; + if (isAmazonDevice()) { + platform = AMAZON_PLATFORM; + } else { + platform = ANDROID_PLATFORM; + } + return platform; + } + + /** + * Get the device's Universally Unique Identifier (UUID). + * + * @return + */ + public String getUuid() { + String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); + return uuid; + } + + public String getModel() { + String model = android.os.Build.MODEL; + return model; + } + + public String getProductName() { + String productname = android.os.Build.PRODUCT; + return productname; + } + + public String getManufacturer() { + String manufacturer = android.os.Build.MANUFACTURER; + return manufacturer; + } + + public String getSerialNumber() { + String serial = android.os.Build.SERIAL; + return serial; + } + + /** + * Get the OS version. + * + * @return + */ + public String getOSVersion() { + String osversion = android.os.Build.VERSION.RELEASE; + return osversion; + } + + public String getSDKVersion() { + @SuppressWarnings("deprecation") + String sdkversion = android.os.Build.VERSION.SDK; + return sdkversion; + } + + public String getTimeZoneID() { + TimeZone tz = TimeZone.getDefault(); + return (tz.getID()); + } + + /** + * Function to check if the device is manufactured by Amazon + * + * @return + */ + public boolean isAmazonDevice() { + if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) { + return true; + } + return false; + } + + public boolean isVirtual() { + return android.os.Build.FINGERPRINT.contains("generic") || + android.os.Build.PRODUCT.contains("sdk"); + } + +} diff --git a/plugins/cordova-plugin-device/src/browser/DeviceProxy.js b/plugins/cordova-plugin-device/src/browser/DeviceProxy.js new file mode 100644 index 000000000..4dc80ec06 --- /dev/null +++ b/plugins/cordova-plugin-device/src/browser/DeviceProxy.js @@ -0,0 +1,84 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +var browser = require('cordova/platform'); + +function getPlatform () { + return 'browser'; +} + +function getModel () { + return getBrowserInfo(true); +} + +function getVersion () { + return getBrowserInfo(false); +} + +function getBrowserInfo (getModel) { + var userAgent = navigator.userAgent; + var returnVal = ''; + var offset; + + if ((offset = userAgent.indexOf('Edge')) !== -1) { + returnVal = (getModel) ? 'Edge' : userAgent.substring(offset + 5); + } else if ((offset = userAgent.indexOf('Chrome')) !== -1) { + returnVal = (getModel) ? 'Chrome' : userAgent.substring(offset + 7); + } else if ((offset = userAgent.indexOf('Safari')) !== -1) { + if (getModel) { + returnVal = 'Safari'; + } else { + returnVal = userAgent.substring(offset + 7); + + if ((offset = userAgent.indexOf('Version')) !== -1) { + returnVal = userAgent.substring(offset + 8); + } + } + } else if ((offset = userAgent.indexOf('Firefox')) !== -1) { + returnVal = (getModel) ? 'Firefox' : userAgent.substring(offset + 8); + } else if ((offset = userAgent.indexOf('MSIE')) !== -1) { + returnVal = (getModel) ? 'MSIE' : userAgent.substring(offset + 5); + } else if ((offset = userAgent.indexOf('Trident')) !== -1) { + returnVal = (getModel) ? 'MSIE' : '11'; + } + + if ((offset = returnVal.indexOf(';')) !== -1 || (offset = returnVal.indexOf(' ')) !== -1) { + returnVal = returnVal.substring(0, offset); + } + + return returnVal; +} + +module.exports = { + getDeviceInfo: function (success, error) { + setTimeout(function () { + success({ + cordova: browser.cordovaVersion, + platform: getPlatform(), + model: getModel(), + version: getVersion(), + uuid: null, + isVirtual: false + }); + }, 0); + } +}; + +require('cordova/exec/proxy').add('Device', module.exports); diff --git a/plugins/cordova-plugin-device/src/ios/CDVDevice.h b/plugins/cordova-plugin-device/src/ios/CDVDevice.h new file mode 100644 index 000000000..a146d8829 --- /dev/null +++ b/plugins/cordova-plugin-device/src/ios/CDVDevice.h @@ -0,0 +1,30 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface CDVDevice : CDVPlugin +{} + ++ (NSString*)cordovaVersion; + +- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; + +@end diff --git a/plugins/cordova-plugin-device/src/ios/CDVDevice.m b/plugins/cordova-plugin-device/src/ios/CDVDevice.m new file mode 100644 index 000000000..4d75a5748 --- /dev/null +++ b/plugins/cordova-plugin-device/src/ios/CDVDevice.m @@ -0,0 +1,112 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#include +#include +#include "TargetConditionals.h" + +#import +#import "CDVDevice.h" + +@implementation UIDevice (ModelVersion) + +- (NSString*)modelVersion +{ + size_t size; + + sysctlbyname("hw.machine", NULL, &size, NULL, 0); + char* machine = malloc(size); + sysctlbyname("hw.machine", machine, &size, NULL, 0); + NSString* platform = [NSString stringWithUTF8String:machine]; + free(machine); + + return platform; +} + +@end + +@interface CDVDevice () {} +@end + +@implementation CDVDevice + +- (NSString*)uniqueAppInstanceIdentifier:(UIDevice*)device +{ + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; + static NSString* UUID_KEY = @"CDVUUID"; + + // Check user defaults first to maintain backwards compaitibility with previous versions + // which didn't user identifierForVendor + NSString* app_uuid = [userDefaults stringForKey:UUID_KEY]; + if (app_uuid == nil) { + if ([device respondsToSelector:@selector(identifierForVendor)]) { + app_uuid = [[device identifierForVendor] UUIDString]; + } else { + CFUUIDRef uuid = CFUUIDCreate(NULL); + app_uuid = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, uuid); + CFRelease(uuid); + } + + [userDefaults setObject:app_uuid forKey:UUID_KEY]; + [userDefaults synchronize]; + } + + return app_uuid; +} + +- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command +{ + NSDictionary* deviceProperties = [self deviceProperties]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (NSDictionary*)deviceProperties +{ + UIDevice* device = [UIDevice currentDevice]; + + return @{ + @"manufacturer": @"Apple", + @"model": [device modelVersion], + @"platform": @"iOS", + @"version": [device systemVersion], + @"uuid": [self uniqueAppInstanceIdentifier:device], + @"cordova": [[self class] cordovaVersion], + @"isVirtual": @([self isVirtual]) + }; +} + ++ (NSString*)cordovaVersion +{ + return CDV_VERSION; +} + +- (BOOL)isVirtual +{ + #if TARGET_OS_SIMULATOR + return true; + #elif TARGET_IPHONE_SIMULATOR + return true; + #else + return false; + #endif +} + +@end diff --git a/plugins/cordova-plugin-device/src/osx/CDVDevice.h b/plugins/cordova-plugin-device/src/osx/CDVDevice.h new file mode 100644 index 000000000..9def25487 --- /dev/null +++ b/plugins/cordova-plugin-device/src/osx/CDVDevice.h @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVDevice : CDVPlugin + ++ (NSString*) cordovaVersion; + +- (void) getDeviceInfo:(CDVInvokedUrlCommand*)command; + +@end diff --git a/plugins/cordova-plugin-device/src/osx/CDVDevice.m b/plugins/cordova-plugin-device/src/osx/CDVDevice.m new file mode 100644 index 000000000..3a63588fa --- /dev/null +++ b/plugins/cordova-plugin-device/src/osx/CDVDevice.m @@ -0,0 +1,113 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#include + +#import "CDVDevice.h" + +#define SYSTEM_VERSION_PLIST @"/System/Library/CoreServices/SystemVersion.plist" + +@implementation CDVDevice + +- (NSString*) modelVersion { + size_t size; + + sysctlbyname("hw.machine", NULL, &size, NULL, 0); + char* machine = malloc(size); + sysctlbyname("hw.machine", machine, &size, NULL, 0); + NSString* modelVersion = [NSString stringWithUTF8String:machine]; + free(machine); + + return modelVersion; +} + + +- (NSString*) getSerialNr { + NSString* serialNr; + io_service_t platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")); + if (platformExpert) { + CFTypeRef serialNumberAsCFString = + IORegistryEntryCreateCFProperty(platformExpert, + CFSTR(kIOPlatformSerialNumberKey), + kCFAllocatorDefault, 0); + if (serialNumberAsCFString) { + serialNr = (__bridge NSString*) serialNumberAsCFString; + } + IOObjectRelease(platformExpert); + } + return serialNr; +} + +- (NSString*) uniqueAppInstanceIdentifier { + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; + static NSString* UUID_KEY = @"CDVUUID"; + + NSString* app_uuid = [userDefaults stringForKey:UUID_KEY]; + + if (app_uuid == nil) { + CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); + CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); + + app_uuid = [NSString stringWithString:(__bridge NSString*) uuidString]; + [userDefaults setObject:app_uuid forKey:UUID_KEY]; + [userDefaults synchronize]; + + CFRelease(uuidString); + CFRelease(uuidRef); + } + + return app_uuid; +} + +- (NSString*) platform { + return [NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST][@"ProductName"]; +} + +- (NSString*) systemVersion { + return [NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST][@"ProductVersion"]; +} + +- (void) getDeviceInfo:(CDVInvokedUrlCommand*) command { + NSDictionary* deviceProperties = [self deviceProperties]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (NSDictionary*) deviceProperties { + NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4]; + + devProps[@"manufacturer"] = @"Apple"; + devProps[@"model"] = [self modelVersion]; + devProps[@"platform"] = [self platform]; + devProps[@"version"] = [self systemVersion]; + devProps[@"uuid"] = [self uniqueAppInstanceIdentifier]; + devProps[@"cordova"] = [[self class] cordovaVersion]; + devProps[@"serial"] = [self getSerialNr]; + devProps[@"isVirtual"] = @NO; + + NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps]; + return devReturn; +} + ++ (NSString*) cordovaVersion { + return CDV_VERSION; +} + +@end diff --git a/plugins/cordova-plugin-device/src/windows/DeviceProxy.js b/plugins/cordova-plugin-device/src/windows/DeviceProxy.js new file mode 100644 index 000000000..ccaaaee6d --- /dev/null +++ b/plugins/cordova-plugin-device/src/windows/DeviceProxy.js @@ -0,0 +1,96 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* global Windows, createUUID */ + +var ROOT_CONTAINER = '{00000000-0000-0000-FFFF-FFFFFFFFFFFF}'; +var DEVICE_CLASS_KEY = '{A45C254E-DF1C-4EFD-8020-67D146A850E0},10'; +var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10'; +var ROOT_CONTAINER_QUERY = 'System.Devices.ContainerId:="' + ROOT_CONTAINER + '"'; +var HAL_DEVICE_CLASS = '4d36e966-e325-11ce-bfc1-08002be10318'; +var DEVICE_DRIVER_VERSION_KEY = '{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3'; + +module.exports = { + + getDeviceInfo: function (win, fail, args) { + + // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId + var deviceId; + // get deviceId, or create and store one + var localSettings = Windows.Storage.ApplicationData.current.localSettings; + if (localSettings.values.deviceId) { + deviceId = localSettings.values.deviceId; + } else { + // App-specific hardware id could be used as uuid, but it changes if the hardware changes... + try { + var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id; + deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid(); + } catch (e) { + // Couldn't get the hardware UUID + deviceId = createUUID(); + } + // ...so cache it per-install + localSettings.values.deviceId = deviceId; + } + + var userAgent = window.clientInformation.userAgent; + // this will report "windows" in windows8.1 and windows phone 8.1 apps + // and "windows8" in windows 8.0 apps similar to cordova.js + // See https://github.com/apache/cordova-js/blob/master/src/windows/platform.js#L25 + var devicePlatform = userAgent.indexOf('MSAppHost/1.0') === -1 ? 'windows' : 'windows8'; + var versionString = userAgent.match(/Windows (?:Phone |NT )?([0-9.]+)/)[1]; + + var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation(); + // Running in the Windows Simulator is a remote session. + // Running in the Windows Phone Emulator has the systemProductName set to "Virtual" + var isVirtual = Windows.System.RemoteDesktop.InteractiveSession.isRemote || deviceInfo.systemProductName === 'Virtual'; + var manufacturer = deviceInfo.systemManufacturer; + var model = deviceInfo.systemProductName; + + var Pnp = Windows.Devices.Enumeration.Pnp; + + Pnp.PnpObject.findAllAsync(Pnp.PnpObjectType.device, + [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], + ROOT_CONTAINER_QUERY) + .then(function (rootDevices) { + for (var i = 0; i < rootDevices.length; i++) { + var rootDevice = rootDevices[i]; + if (!rootDevice.properties) continue; + if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] === HAL_DEVICE_CLASS) { + versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY]; + break; + } + } + + setTimeout(function () { + win({ platform: devicePlatform, + version: versionString, + uuid: deviceId, + isVirtual: isVirtual, + model: model, + manufacturer: manufacturer}); + }, 0); + }); + } + +}; // exports + +require('cordova/exec/proxy').add('Device', module.exports); diff --git a/plugins/cordova-plugin-device/tests/package.json b/plugins/cordova-plugin-device/tests/package.json new file mode 100644 index 000000000..0fa99787e --- /dev/null +++ b/plugins/cordova-plugin-device/tests/package.json @@ -0,0 +1,14 @@ +{ + "name": "cordova-plugin-device-tests", + "version": "1.1.6-dev", + "description": "", + "cordova": { + "id": "cordova-plugin-device-tests", + "platforms": [] + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "", + "license": "Apache 2.0" +} diff --git a/plugins/cordova-plugin-device/tests/plugin.xml b/plugins/cordova-plugin-device/tests/plugin.xml new file mode 100644 index 000000000..afb700bc8 --- /dev/null +++ b/plugins/cordova-plugin-device/tests/plugin.xml @@ -0,0 +1,31 @@ + + + + + Cordova Device Plugin Tests + Apache 2.0 + + + + diff --git a/plugins/cordova-plugin-device/tests/tests.js b/plugins/cordova-plugin-device/tests/tests.js new file mode 100644 index 000000000..03e1fc77b --- /dev/null +++ b/plugins/cordova-plugin-device/tests/tests.js @@ -0,0 +1,113 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* eslint-env jasmine */ + +exports.defineAutoTests = function () { + describe('Device Information (window.device)', function () { + it('should exist', function () { + expect(window.device).toBeDefined(); + }); + + it('should contain a platform specification that is a string', function () { + expect(window.device.platform).toBeDefined(); + expect((String(window.device.platform)).length > 0).toBe(true); + }); + + it('should contain a version specification that is a string', function () { + expect(window.device.version).toBeDefined(); + expect((String(window.device.version)).length > 0).toBe(true); + }); + + it('should contain a UUID specification that is a string or a number', function () { + expect(window.device.uuid).toBeDefined(); + if (typeof window.device.uuid === 'string' || typeof window.device.uuid === 'object') { + expect((String(window.device.uuid)).length > 0).toBe(true); + } else { + expect(window.device.uuid > 0).toBe(true); + } + }); + + it('should contain a cordova specification that is a string', function () { + expect(window.device.cordova).toBeDefined(); + expect((String(window.device.cordova)).length > 0).toBe(true); + }); + + it('should depend on the presence of cordova.version string', function () { + expect(window.cordova.version).toBeDefined(); + expect((String(window.cordova.version)).length > 0).toBe(true); + }); + + it('should contain device.cordova equal to cordova.version', function () { + expect(window.device.cordova).toBe(window.cordova.version); + }); + + it('should contain a model specification that is a string', function () { + expect(window.device.model).toBeDefined(); + expect((String(window.device.model)).length > 0).toBe(true); + }); + + it('should contain a manufacturer property that is a string', function () { + expect(window.device.manufacturer).toBeDefined(); + expect((String(window.device.manufacturer)).length > 0).toBe(true); + }); + + it('should contain an isVirtual property that is a boolean', function () { + expect(window.device.isVirtual).toBeDefined(); + expect(typeof window.device.isVirtual).toBe('boolean'); + }); + + it('should contain a serial number specification that is a string', function () { + expect(window.device.serial).toBeDefined(); + expect((String(window.device.serial)).length > 0).toBe(true); + + }); + + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + var logMessage = function (message, color) { + var log = document.getElementById('info'); + var logLine = document.createElement('div'); + if (color) { + logLine.style.color = color; + } + logLine.innerHTML = message; + log.appendChild(logLine); + }; + + var clearLog = function () { + var log = document.getElementById('info'); + log.innerHTML = ''; + }; + + var device_tests = '

Press Dump Device button to get device information

' + + '
' + + 'Expected result: Status box will get updated with device info. (i.e. platform, version, uuid, model, etc)'; + + contentEl.innerHTML = '
' + device_tests; + + createActionButton('Dump device', function () { + clearLog(); + logMessage(JSON.stringify(window.device, null, '\t')); + }, 'dump_device'); +}; diff --git a/plugins/cordova-plugin-device/types/index.d.ts b/plugins/cordova-plugin-device/types/index.d.ts new file mode 100644 index 000000000..d4450b4de --- /dev/null +++ b/plugins/cordova-plugin-device/types/index.d.ts @@ -0,0 +1,36 @@ +// Type definitions for Apache Cordova Device plugin +// Project: https://github.com/apache/cordova-plugin-device +// Definitions by: Microsoft Open Technologies Inc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies Inc +// Licensed under the MIT license + +/** + * This plugin defines a global device object, which describes the device's hardware and software. + * Although the object is in the global scope, it is not available until after the deviceready event. + */ +interface Device { + /** Get the version of Cordova running on the device. */ + cordova: string; + /** Indicates that Cordova initialize successfully. */ + available: boolean; + /** + * The device.model returns the name of the device's model or product. The value is set + * by the device manufacturer and may be different across versions of the same product. + */ + model: string; + /** Get the device's operating system name. */ + platform: string; + /** Get the device's Universally Unique Identifier (UUID). */ + uuid: string; + /** Get the operating system version. */ + version: string; + /** Get the device's manufacturer. */ + manufacturer: string; + /** Whether the device is running on a simulator. */ + isVirtual: boolean; + /** Get the device hardware serial number. */ + serial: string;} + +declare var device: Device; \ No newline at end of file diff --git a/plugins/cordova-plugin-ionic-keyboard/LICENSE b/plugins/cordova-plugin-ionic-keyboard/LICENSE new file mode 100644 index 000000000..623c70a83 --- /dev/null +++ b/plugins/cordova-plugin-ionic-keyboard/LICENSE @@ -0,0 +1,23 @@ +Copyright 2015-present Drifty Co. +http://drifty.com/ + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/cordova-plugin-ionic-keyboard/README.md b/plugins/cordova-plugin-ionic-keyboard/README.md new file mode 100644 index 000000000..4674035d5 --- /dev/null +++ b/plugins/cordova-plugin-ionic-keyboard/README.md @@ -0,0 +1,220 @@ +# cordova-plugin-ionic-keyboard + +This plugin has been designed to work seamlessly with `cordova-plugin-ionic-webview`, so make sure you have it installed first: + + - https://github.com/ionic-team/cordova-plugin-ionic-webview + - https://ionicframework.com/docs/wkwebview/ + +## Installation + +``` +cordova plugin add cordova-plugin-ionic-keyboard --save +``` + +## Preferences + +### KeyboardResize (for iOS only) + +> Boolean (true by default) + +#### Possible values +- `true`: Showing/hiding the keyboard will trigger some kind of resizing of the app (see KeyboardResizeMode) +- `false`: Web will not be resized when the keyboard shows up. + +```xml + +``` + +### KeyboardResizeMode (for iOS only) + +> String ('native' by default) + +#### Possible values + +- `native`: The whole native webview will be resized when the keyboard shows/hides, it will affect the `vh` relative unit. +- `body`: Only the html `` element will be resized. Relative units are not affected, because the viewport does not change. +- `ionic`: Only the html `ion-app` element will be resized. Only for ionic apps. + +```xml + +``` + +### KeyboardStyle (for iOS only) + +> String ('light' by default) + +#### Possible values + +- `light` +- `dark` + +```xml + +``` + +### HideKeyboardFormAccessoryBar (for iOS only) + +> Boolean (true by default) + +#### Possible values +- `true`: hides the keyboard accessory bar. +- `false`: shows the keyboard accessory bar. + +```xml + +``` + +### resizeOnFullScreen (for Android only) + +There is an Android bug that prevents the keyboard from resizing the WebView when the app is in full screen (i.e. if StatusBar plugin is used to hide the StatusBar). This setting, if set to true, add a workaround that resizes the WebView even when the app is in full screen. + +> Boolean (false by default) + +#### Possible values +- `false`: doesn't resize the WebView when the app is in full screen. +- `true`: resizes the WebView when the app is in full screen. + + +```xml + +``` + + +## Methods + +### Keyboard.hideFormAccessoryBar (for iOS only) + +> Hide the keyboard toolbar. + +Set to true to hide the additional toolbar that is on top of the keyboard. This toolbar features the Prev, Next, and Done buttons. + +```js +Keyboard.hideFormAccessoryBar(value, successCallback); +``` + +#### Quick Example + +```js +Keyboard.hideFormAccessoryBar(true); +Keyboard.hideFormAccessoryBar(false); +Keyboard.hideFormAccessoryBar(null, (currentValue) => { console.log(currentValue); }); +``` + +### Keyboard.hide + +> Hide the keyboard + +Call this method to hide the keyboard + +```js +Keyboard.hide(); +``` + +### Keyboard.show (for Android only) + +> Show the keyboard + +Call this method to show the keyboard. + +```js +Keyboard.show(); +``` + +### Keyboard.setResizeMode (for iOS only) + +> Programmatically set the resize mode + +Call the method with parameter to set the resize mode. + +```js +// Possible values are the same as for 'KeyboardResizeMode' preference +Keyboard.setResizeMode('native'); +Keyboard.setResizeMode('body'); +Keyboard.setResizeMode('ionic'); +``` + +### Keyboard.setKeyboardStyle (for iOS only) + +> Programmatically set the keyboard style + +```js +// Possible values are the same as for 'KeyboardStyle' preference +Keyboard.setKeyboardStyle('light'); // <- default +Keyboard.setKeyboardStyle('dark'); +``` + +### Keyboard.disableScroll (for iOS only) + +> Programmatically enable or disable the WebView scroll + +```js +Keyboard.disableScroll(true); // <- default +Keyboard.disableScroll(false); +``` + + +## Properties + +### Keyboard.isVisible + +> Determine if the keyboard is visible. + +Read this property to determine if the keyboard is visible. + +```js +if (Keyboard.isVisible) { + // do something +} +``` + +## Events + +### keyboardDidHide + +> This event is fired when the keyboard is fully closed. + +Attach handler to this event to be able to receive notification when keyboard is closed. + +```js +window.addEventListener('keyboardDidHide', () => { + // Describe your logic which will be run each time keyboard is closed. +}); +``` + +### keyboardDidShow + +> This event is fired when the keyboard is fully open. + +Attach handler to this event to be able to receive notification when keyboard is opened. + +```js +window.addEventListener('keyboardDidShow', (event) => { + // Describe your logic which will be run each time when keyboard is about to be shown. + console.log(event.keyboardHeight); +}); +``` + +### keyboardWillShow + +> This event fires before keyboard will be shown. + +Attach handler to this event to be able to receive notification when keyboard is about to be shown on the screen. + +```js +window.addEventListener('keyboardWillShow', (event) => { + // Describe your logic which will be run each time when keyboard is about to be shown. + console.log(event.keyboardHeight); +}); +``` + +### keyboardWillHide + +> This event fires before keyboard will be closed. + +Attach handler to this event to be able to receive notification when keyboard is about to be closed. + +```js +window.addEventListener('keyboardWillHide', () => { + // Describe your logic which will be run each time when keyboard is about to be closed. +}); +``` diff --git a/plugins/cordova-plugin-ionic-keyboard/package.json b/plugins/cordova-plugin-ionic-keyboard/package.json new file mode 100644 index 000000000..a9872dd96 --- /dev/null +++ b/plugins/cordova-plugin-ionic-keyboard/package.json @@ -0,0 +1,61 @@ +{ + "_args": [ + [ + "cordova-plugin-ionic-keyboard@2.2.0", + "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular" + ] + ], + "_from": "cordova-plugin-ionic-keyboard@2.2.0", + "_id": "cordova-plugin-ionic-keyboard@2.2.0", + "_inBundle": false, + "_integrity": "sha512-yDUG+9ieKVRitq5mGlNxjaZh/MgEhFFIgTIPhqSbUaQ8UuZbawy5mhJAVClqY97q8/rcQtL6dCDa7x2sEtCLcA==", + "_location": "/cordova-plugin-ionic-keyboard", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cordova-plugin-ionic-keyboard@2.2.0", + "name": "cordova-plugin-ionic-keyboard", + "escapedName": "cordova-plugin-ionic-keyboard", + "rawSpec": "2.2.0", + "saveSpec": null, + "fetchSpec": "2.2.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/cordova-plugin-ionic-keyboard/-/cordova-plugin-ionic-keyboard-2.2.0.tgz", + "_spec": "2.2.0", + "_where": "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular", + "author": { + "name": "Apache Software Foundation" + }, + "bugs": { + "url": "https://github.com/ionic-team/cordova-plugin-ionic-keyboard/issues" + }, + "description": "Ionic Keyboard Plugin", + "devDependencies": { + "np": "^5.0.3", + "sync-cordova-xml": "^0.4.0" + }, + "homepage": "https://github.com/ionic-team/cordova-plugin-ionic-keyboard#readme", + "keywords": [ + "cordova", + "keyboard", + "ecosystem:cordova", + "cordova-ios", + "cordova-android" + ], + "license": "Apache 2.0", + "name": "cordova-plugin-ionic-keyboard", + "repository": { + "type": "git", + "url": "git+https://github.com/ionic-team/cordova-plugin-ionic-keyboard.git" + }, + "scripts": { + "deploy": "np --yolo", + "sync_plugin_xml": "sync-cordova-xml package.json plugin.xml --output=plugin.xml", + "version": "npm run sync_plugin_xml && git add plugin.xml" + }, + "version": "2.2.0" +} diff --git a/plugins/cordova-plugin-ionic-keyboard/plugin.xml b/plugins/cordova-plugin-ionic-keyboard/plugin.xml new file mode 100644 index 000000000..5badf01c8 --- /dev/null +++ b/plugins/cordova-plugin-ionic-keyboard/plugin.xml @@ -0,0 +1,47 @@ + + + + cordova-plugin-ionic-keyboard + Ionic Keyboard Plugin + Apache 2.0 + cordova,keyboard,ecosystem:cordova,cordova-ios,cordova-android + https://github.com/ionic-team/cordova-plugin-ionic-keyboard.git + https://github.com/ionic-team/cordova-plugin-ionic-keyboard/issues + Apache Software Foundation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-ionic-keyboard/src/android/CDVIonicKeyboard.java b/plugins/cordova-plugin-ionic-keyboard/src/android/CDVIonicKeyboard.java new file mode 100644 index 000000000..b7ec4556b --- /dev/null +++ b/plugins/cordova-plugin-ionic-keyboard/src/android/CDVIonicKeyboard.java @@ -0,0 +1,165 @@ +package io.ionic.keyboard; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.PluginResult; +import org.apache.cordova.PluginResult.Status; +import org.json.JSONArray; +import org.json.JSONException; + +import android.content.Context; +import android.graphics.Rect; +import android.util.DisplayMetrics; +import android.view.View; +import android.view.ViewTreeObserver; +import android.view.ViewTreeObserver.OnGlobalLayoutListener; +import android.view.inputmethod.InputMethodManager; + +// import additionally required classes for calculating screen height +import android.view.Display; +import android.graphics.Point; +import android.os.Build; +import android.widget.FrameLayout; + +public class CDVIonicKeyboard extends CordovaPlugin { + private OnGlobalLayoutListener list; + private View rootView; + private View mChildOfContent; + private int usableHeightPrevious; + private FrameLayout.LayoutParams frameLayoutParams; + + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + } + + public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException { + if ("hide".equals(action)) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + //http://stackoverflow.com/a/7696791/1091751 + InputMethodManager inputManager = (InputMethodManager) cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); + View v = cordova.getActivity().getCurrentFocus(); + + if (v == null) { + callbackContext.error("No current focus"); + } else { + inputManager.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); + callbackContext.success(); // Thread-safe. + } + } + }); + return true; + } + if ("show".equals(action)) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + ((InputMethodManager) cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY); + callbackContext.success(); // Thread-safe. + } + }); + return true; + } + if ("init".equals(action)) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + //calculate density-independent pixels (dp) + //http://developer.android.com/guide/practices/screens_support.html + DisplayMetrics dm = new DisplayMetrics(); + cordova.getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm); + final float density = dm.density; + + //http://stackoverflow.com/a/4737265/1091751 detect if keyboard is showing + FrameLayout content = (FrameLayout) cordova.getActivity().findViewById(android.R.id.content); + rootView = content.getRootView(); + list = new OnGlobalLayoutListener() { + int previousHeightDiff = 0; + @Override + public void onGlobalLayout() { + boolean resize = preferences.getBoolean("resizeOnFullScreen", false); + if (resize) { + possiblyResizeChildOfContent(); + } + Rect r = new Rect(); + //r will be populated with the coordinates of your view that area still visible. + rootView.getWindowVisibleDisplayFrame(r); + + PluginResult result; + + // cache properties for later use + int rootViewHeight = rootView.getRootView().getHeight(); + int resultBottom = r.bottom; + + // calculate screen height differently for android versions >= 21: Lollipop 5.x, Marshmallow 6.x + //http://stackoverflow.com/a/29257533/3642890 beware of nexus 5 + int screenHeight; + + if (Build.VERSION.SDK_INT >= 21) { + Display display = cordova.getActivity().getWindowManager().getDefaultDisplay(); + Point size = new Point(); + display.getSize(size); + screenHeight = size.y; + } else { + screenHeight = rootViewHeight; + } + + int heightDiff = screenHeight - resultBottom; + + int pixelHeightDiff = (int)(heightDiff / density); + if (pixelHeightDiff > 100 && pixelHeightDiff != previousHeightDiff) { // if more than 100 pixels, its probably a keyboard... + String msg = "S" + Integer.toString(pixelHeightDiff); + result = new PluginResult(PluginResult.Status.OK, msg); + result.setKeepCallback(true); + callbackContext.sendPluginResult(result); + } + else if ( pixelHeightDiff != previousHeightDiff && ( previousHeightDiff - pixelHeightDiff ) > 100 ){ + String msg = "H"; + result = new PluginResult(PluginResult.Status.OK, msg); + result.setKeepCallback(true); + callbackContext.sendPluginResult(result); + } + previousHeightDiff = pixelHeightDiff; + } + + private void possiblyResizeChildOfContent() { + int usableHeightNow = computeUsableHeight(); + if (usableHeightNow != usableHeightPrevious) { + int usableHeightSansKeyboard = mChildOfContent.getRootView().getHeight(); + int heightDifference = usableHeightSansKeyboard - usableHeightNow; + if (heightDifference > (usableHeightSansKeyboard/4)) { + frameLayoutParams.height = usableHeightSansKeyboard - heightDifference; + } else { + frameLayoutParams.height = usableHeightSansKeyboard; + } + mChildOfContent.requestLayout(); + usableHeightPrevious = usableHeightNow; + } + } + + private int computeUsableHeight() { + Rect r = new Rect(); + mChildOfContent.getWindowVisibleDisplayFrame(r); + return (r.bottom - r.top); + } + }; + + mChildOfContent = content.getChildAt(0); + rootView.getViewTreeObserver().addOnGlobalLayoutListener(list); + frameLayoutParams = (FrameLayout.LayoutParams) mChildOfContent.getLayoutParams(); + PluginResult dataResult = new PluginResult(PluginResult.Status.OK); + dataResult.setKeepCallback(true); + callbackContext.sendPluginResult(dataResult); + } + }); + return true; + } + return false; // Returning false results in a "MethodNotFound" error. + } + + @Override + public void onDestroy() { + rootView.getViewTreeObserver().removeOnGlobalLayoutListener(list); + } + +} diff --git a/plugins/cordova-plugin-ionic-keyboard/src/ios/CDVIonicKeyboard.h b/plugins/cordova-plugin-ionic-keyboard/src/ios/CDVIonicKeyboard.h new file mode 100644 index 000000000..aae6766ab --- /dev/null +++ b/plugins/cordova-plugin-ionic-keyboard/src/ios/CDVIonicKeyboard.h @@ -0,0 +1,24 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVIonicKeyboard : CDVPlugin + +@end diff --git a/plugins/cordova-plugin-ionic-keyboard/src/ios/CDVIonicKeyboard.m b/plugins/cordova-plugin-ionic-keyboard/src/ios/CDVIonicKeyboard.m new file mode 100644 index 000000000..e4615a844 --- /dev/null +++ b/plugins/cordova-plugin-ionic-keyboard/src/ios/CDVIonicKeyboard.m @@ -0,0 +1,411 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVIonicKeyboard.h" +#import +#import +#import + +typedef enum : NSUInteger { + ResizeNone, + ResizeNative, + ResizeBody, + ResizeIonic, +} ResizePolicy; + +#ifndef __CORDOVA_3_2_0 +#warning "The keyboard plugin is only supported in Cordova 3.2 or greater, it may not work properly in an older version. If you do use this plugin in an older version, make sure the HideKeyboardFormAccessoryBar and KeyboardShrinksView preference values are false." +#endif + +@interface CDVIonicKeyboard () + +@property (readwrite, assign, nonatomic) BOOL disableScroll; +@property (readwrite, assign, nonatomic) BOOL hideFormAccessoryBar; +@property (readwrite, assign, nonatomic) BOOL keyboardIsVisible; +@property (nonatomic, readwrite) ResizePolicy keyboardResizes; +@property (readwrite, assign, nonatomic) NSString* keyboardStyle; +@property (nonatomic, readwrite) BOOL isWK; +@property (nonatomic, readwrite) int paddingBottom; + +@end + +@implementation CDVIonicKeyboard + +NSTimer *hideTimer; + +- (id)settingForKey:(NSString *)key +{ + return [self.commandDelegate.settings objectForKey:[key lowercaseString]]; +} + +#pragma mark Initialize + +NSString* UIClassString; +NSString* WKClassString; +NSString* UITraitsClassString; + +- (void)pluginInitialize +{ + UIClassString = [@[@"UI", @"Web", @"Browser", @"View"] componentsJoinedByString:@""]; + WKClassString = [@[@"WK", @"Content", @"View"] componentsJoinedByString:@""]; + UITraitsClassString = [@[@"UI", @"Text", @"Input", @"Traits"] componentsJoinedByString:@""]; + + NSDictionary *settings = self.commandDelegate.settings; + + self.disableScroll = ![settings cordovaBoolSettingForKey:@"ScrollEnabled" defaultValue:NO]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarDidChangeFrame:) name: UIApplicationDidChangeStatusBarFrameNotification object:nil]; + + self.keyboardResizes = ResizeNative; + BOOL doesResize = [settings cordovaBoolSettingForKey:@"KeyboardResize" defaultValue:YES]; + if (!doesResize) { + self.keyboardResizes = ResizeNone; + NSLog(@"CDVIonicKeyboard: no resize"); + + } else { + NSString *resizeMode = [settings cordovaSettingForKey:@"KeyboardResizeMode"]; + if (resizeMode) { + if ([resizeMode isEqualToString:@"ionic"]) { + self.keyboardResizes = ResizeIonic; + } else if ([resizeMode isEqualToString:@"body"]) { + self.keyboardResizes = ResizeBody; + } + } + NSLog(@"CDVIonicKeyboard: resize mode %lu", (unsigned long)self.keyboardResizes); + } + self.hideFormAccessoryBar = [settings cordovaBoolSettingForKey:@"HideKeyboardFormAccessoryBar" defaultValue:YES]; + + NSString *keyboardStyle = [settings cordovaSettingForKey:@"KeyboardStyle"]; + if (keyboardStyle) { + [self setKeyboardStyle:keyboardStyle]; + } + + if ([settings cordovaBoolSettingForKey:@"KeyboardAppearanceDark" defaultValue:NO]) { + [self setKeyboardStyle:@"dark"]; + } + + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + [nc addObserver:self selector:@selector(onKeyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; + [nc addObserver:self selector:@selector(onKeyboardDidHide:) name:UIKeyboardDidHideNotification object:nil]; + [nc addObserver:self selector:@selector(onKeyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; + [nc addObserver:self selector:@selector(onKeyboardDidShow:) name:UIKeyboardDidShowNotification object:nil]; + + // Prevent WKWebView to resize window + BOOL isWK = self.isWK = [self.webView isKindOfClass:NSClassFromString(@"WKWebView")]; + if (!isWK) { + NSLog(@"CDVIonicKeyboard: WARNING!!: Keyboard plugin works better with WK"); + } + + if (isWK) { + [nc removeObserver:self.webView name:UIKeyboardWillHideNotification object:nil]; + [nc removeObserver:self.webView name:UIKeyboardWillShowNotification object:nil]; + [nc removeObserver:self.webView name:UIKeyboardWillChangeFrameNotification object:nil]; + [nc removeObserver:self.webView name:UIKeyboardDidChangeFrameNotification object:nil]; + } +} + +-(void)statusBarDidChangeFrame:(NSNotification*)notification +{ + [self _updateFrame]; +} + + +#pragma mark Keyboard events + +- (void)resetScrollView +{ + UIScrollView *scrollView = [self.webView scrollView]; + [scrollView setContentInset:UIEdgeInsetsZero]; +} + +- (void)onKeyboardWillHide:(NSNotification *)sender +{ + if (self.isWK) { + [self setKeyboardHeight:0 delay:0.01]; + [self resetScrollView]; + } + hideTimer = [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(fireOnHiding) userInfo:nil repeats:NO]; +} + +- (void)fireOnHiding { + [self.commandDelegate evalJs:@"Keyboard.fireOnHiding();"]; +} + +- (void)onKeyboardWillShow:(NSNotification *)note +{ + if (hideTimer != nil) { + [hideTimer invalidate]; + } + CGRect rect = [[note.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; + double height = rect.size.height; + + if (self.isWK) { + double duration = [[note.userInfo valueForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]; + [self setKeyboardHeight:height delay:duration+0.2]; + [self resetScrollView]; + } + + [self setKeyboardStyle:self.keyboardStyle]; + + NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnShowing(%d);", (int)height]; + [self.commandDelegate evalJs:js]; +} + +- (void)onKeyboardDidShow:(NSNotification *)note +{ + CGRect rect = [[note.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; + double height = rect.size.height; + + if (self.isWK) { + [self resetScrollView]; + } + + NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnShow(%d);", (int)height]; + [self.commandDelegate evalJs:js]; +} + +- (void)onKeyboardDidHide:(NSNotification *)sender +{ + [self.commandDelegate evalJs:@"Keyboard.fireOnHide();"]; + [self resetScrollView]; +} + +- (void)setKeyboardHeight:(int)height delay:(NSTimeInterval)delay +{ + if (self.keyboardResizes != ResizeNone) { + [self setPaddingBottom: height delay:delay]; + } +} + +- (void)setPaddingBottom:(int)paddingBottom delay:(NSTimeInterval)delay +{ + if (self.paddingBottom == paddingBottom) { + return; + } + + self.paddingBottom = paddingBottom; + + __weak CDVIonicKeyboard* weakSelf = self; + SEL action = @selector(_updateFrame); + [NSObject cancelPreviousPerformRequestsWithTarget:weakSelf selector:action object:nil]; + if (delay == 0) { + [self _updateFrame]; + } else { + [weakSelf performSelector:action withObject:nil afterDelay:delay]; + } +} + +- (void)_updateFrame +{ + CGSize statusBarSize = [[UIApplication sharedApplication] statusBarFrame].size; + int statusBarHeight = MIN(statusBarSize.width, statusBarSize.height); + + int _paddingBottom = (int)self.paddingBottom; + + if (statusBarHeight == 40) { + _paddingBottom = _paddingBottom + 20; + } + NSLog(@"CDVIonicKeyboard: updating frame"); + // NOTE: to handle split screen correctly, the application's window bounds must be used as opposed to the screen's bounds. + CGRect f = [[[[UIApplication sharedApplication] delegate] window] bounds]; + CGRect wf = self.webView.frame; + switch (self.keyboardResizes) { + case ResizeBody: + { + NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnResize(%d, %d, document.body);", + _paddingBottom, (int)f.size.height]; + [self.commandDelegate evalJs:js]; + break; + } + case ResizeIonic: + { + NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnResize(%d, %d, document.querySelector('ion-app'));", + _paddingBottom, (int)f.size.height]; + [self.commandDelegate evalJs:js]; + break; + } + case ResizeNative: + { + [self.webView setFrame:CGRectMake(wf.origin.x, wf.origin.y, f.size.width - wf.origin.x, f.size.height - wf.origin.y - self.paddingBottom)]; + break; + } + default: + break; + } + [self resetScrollView]; +} + +#pragma mark Keyboard Style + + - (void)setKeyboardStyle:(NSString*)style +{ + IMP newImp = [style isEqualToString:@"dark"] ? imp_implementationWithBlock(^(id _s) { + return UIKeyboardAppearanceDark; + }) : imp_implementationWithBlock(^(id _s) { + return UIKeyboardAppearanceLight; + }); + + if (self.isWK) { + for (NSString* classString in @[WKClassString, UITraitsClassString]) { + Class c = NSClassFromString(classString); + Method m = class_getInstanceMethod(c, @selector(keyboardAppearance)); + + if (m != NULL) { + method_setImplementation(m, newImp); + } else { + class_addMethod(c, @selector(keyboardAppearance), newImp, "l@:"); + } + } + } + else { + for (NSString* classString in @[UIClassString, UITraitsClassString]) { + Class c = NSClassFromString(classString); + Method m = class_getInstanceMethod(c, @selector(keyboardAppearance)); + + if (m != NULL) { + method_setImplementation(m, newImp); + } else { + class_addMethod(c, @selector(keyboardAppearance), newImp, "l@:"); + } + } + } + + _keyboardStyle = style; +} + +#pragma mark HideFormAccessoryBar + +static IMP UIOriginalImp; +static IMP WKOriginalImp; + +- (void)setHideFormAccessoryBar:(BOOL)hideFormAccessoryBar +{ + if (hideFormAccessoryBar == _hideFormAccessoryBar) { + return; + } + + Method UIMethod = class_getInstanceMethod(NSClassFromString(UIClassString), @selector(inputAccessoryView)); + Method WKMethod = class_getInstanceMethod(NSClassFromString(WKClassString), @selector(inputAccessoryView)); + + if (hideFormAccessoryBar) { + UIOriginalImp = method_getImplementation(UIMethod); + WKOriginalImp = method_getImplementation(WKMethod); + + IMP newImp = imp_implementationWithBlock(^(id _s) { + return nil; + }); + + method_setImplementation(UIMethod, newImp); + method_setImplementation(WKMethod, newImp); + } else { + method_setImplementation(UIMethod, UIOriginalImp); + method_setImplementation(WKMethod, WKOriginalImp); + } + + _hideFormAccessoryBar = hideFormAccessoryBar; +} + +#pragma mark scroll + +- (void)setDisableScroll:(BOOL)disableScroll { + if (disableScroll == _disableScroll) { + return; + } + if (disableScroll) { + self.webView.scrollView.scrollEnabled = NO; + self.webView.scrollView.delegate = self; + } + else { + self.webView.scrollView.scrollEnabled = YES; + self.webView.scrollView.delegate = nil; + } + _disableScroll = disableScroll; +} + +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + [scrollView setContentOffset: CGPointZero]; +} + +#pragma mark Plugin interface + +- (void)hideFormAccessoryBar:(CDVInvokedUrlCommand *)command +{ + if (command.arguments.count > 0) { + id value = [command.arguments objectAtIndex:0]; + if (!([value isKindOfClass:[NSNumber class]])) { + value = [NSNumber numberWithBool:NO]; + } + + self.hideFormAccessoryBar = [value boolValue]; + } + + [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:self.hideFormAccessoryBar] + callbackId:command.callbackId]; +} + +- (void)hide:(CDVInvokedUrlCommand *)command +{ + [self.webView endEditing:YES]; +} + +- (void)setResizeMode:(CDVInvokedUrlCommand *)command +{ + NSString * mode = [command.arguments objectAtIndex:0]; + if ([mode isEqualToString:@"ionic"]) { + self.keyboardResizes = ResizeIonic; + } else if ([mode isEqualToString:@"body"]) { + self.keyboardResizes = ResizeBody; + } else if ([mode isEqualToString:@"native"]) { + self.keyboardResizes = ResizeNative; + } else { + self.keyboardResizes = ResizeNone; + } +} + +- (void)keyboardStyle:(CDVInvokedUrlCommand*)command +{ + id value = [command.arguments objectAtIndex:0]; + if ([value isKindOfClass:[NSString class]]) { + value = [(NSString*)value lowercaseString]; + } else { + value = @"light"; + } + + self.keyboardStyle = value; +} + +- (void)disableScroll:(CDVInvokedUrlCommand*)command { + if (!command.arguments || ![command.arguments count]){ + return; + } + id value = [command.arguments objectAtIndex:0]; + if (value != [NSNull null]) { + self.disableScroll = [value boolValue]; + } +} + +#pragma mark dealloc + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +@end diff --git a/plugins/cordova-plugin-ionic-webview/.circleci/config.yml b/plugins/cordova-plugin-ionic-webview/.circleci/config.yml new file mode 100644 index 000000000..c61021839 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/.circleci/config.yml @@ -0,0 +1,57 @@ +version: 2 + +aliases: + - &restore-cache + keys: + - dependency-cache-{{ checksum "package.json" }}-1 + + - &save-cache + key: dependency-cache-{{ checksum "package.json" }}-1 + paths: + - node_modules + +defaults: &defaults + docker: + - image: circleci/node:10 + working_directory: /tmp/workspace + +jobs: + build: + <<: *defaults + steps: + - checkout + - restore_cache: *restore-cache + - run: npm install + - save_cache: *save-cache + - persist_to_workspace: + root: /tmp/workspace + paths: + - "*" + + deploy: + <<: *defaults + environment: + GIT_AUTHOR_NAME: Ionitron + GIT_AUTHOR_EMAIL: hi@ionicframework.com + GIT_COMMITTER_NAME: Ionitron + GIT_COMMITTER_EMAIL: hi@ionicframework.com + steps: + - add_ssh_keys: + fingerprints: + - "ae:6d:3a:f1:cf:39:e1:94:6e:22:2a:9f:54:f9:b0:1b" # ionitron user key + - checkout + - attach_workspace: + at: /tmp/workspace + - run: npx semantic-release + + +workflows: + version: 2 + build: + jobs: + - build + - deploy: + requires: [build] + filters: + branches: + only: stable diff --git a/plugins/cordova-plugin-ionic-webview/CHANGELOG.md b/plugins/cordova-plugin-ionic-webview/CHANGELOG.md new file mode 100644 index 000000000..4b77112b6 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/CHANGELOG.md @@ -0,0 +1,248 @@ +## [4.2.1](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v4.2.0...v4.2.1) (2020-04-28) + + +### Bug Fixes + +* **ios:** release userAgentLock for IAB compat ([#558](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/558)) ([4c027f3](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/4c027f3e1dadf790b1d699936b90b670b401db9e)), closes [#551](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/551) + +# [4.2.0](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v4.1.3...v4.2.0) (2020-04-14) + + +### Bug Fixes + +* **ionassethandler.m:** fix startPath is getting null ([#463](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/463)) ([0bf16f1](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/0bf16f1b73b853f40781c5de83964457cc4493d5)) +* **ios:** avoid app scrolling to top on keyboard hide ([#533](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/533)) ([7974eb4](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/7974eb4160f5e83cf4b3e98905beba1f874464a6)) +* **ios:** Replace deprecated APIs ([#539](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/539)) ([27b9021](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/27b9021d5d76b3e6dc6bfc83ab46b98cd301e694)) + + +### Features + +* **android:** proxy service worker requests through local server ([#452](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/452)) ([c672175](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/c672175b7527d64b077f7715b2ff145325524add)) +* **ios:** implement custom userAgent handling ([#537](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/537)) ([8587114](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/85871147ba8e5b23b693e518bf5ea800cccce8cc)) + +## [4.1.3](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v4.1.2...v4.1.3) (2019-10-30) + + +### Bug Fixes + +* **android:** return proper mimeType for .mjs files ([#455](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/455)) ([173a313](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/173a313)) +* **ios:** mitigate media memory usage ([#459](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/459)) ([cbd526d](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/cbd526d)) +* **ios:** remove itms-services private scheme ([#464](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/464)) ([d7d2600](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/d7d2600)) + +## [4.1.2](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v4.1.1...v4.1.2) (2019-09-25) + + +### Bug Fixes + +* **android:** allow schemes that start by https ([#437](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/437)) ([fab9d1f](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/fab9d1f)) +* **Android:** return proper mimeType for wasm files ([0eb8a37](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/0eb8a37)) +* **ios:** make programmatically focus work on iOS 13 ([#438](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/438)) ([7a514b0](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/7a514b0)), closes [#435](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/435) + +## [4.1.1](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v4.1.0...v4.1.1) (2019-06-26) + + +### Bug Fixes + +* **ios:** show error message when app fails to load ([#382](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/382)) ([cb1f026](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/cb1f026)) + +# [4.1.0](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v4.0.1...v4.1.0) (2019-06-10) + + +### Features + +* **ios:** Add WKSuspendInBackground preference ([#356](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/356)) ([3613602](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/3613602)) + +## [4.0.1](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v4.0.0...v4.0.1) (2019-03-26) + + +### Bug Fixes + +* **ios:** Fix autofocus on iOS 12.2 ([#334](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/334)) ([cb4c491](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/cb4c491)), closes [#330](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/330) +* account port on resolving uri path ([#321](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/321)) ([fdfe8aa](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/fdfe8aa)) + +# [4.0.0](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v3.1.2...v4.0.0) (2019-02-18) + + +### Features + +* **ios:** Make iOS app Scheme configurable with a preference ([#307](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/307)) ([d52d37e](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/d52d37e)), closes [#282](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/282) +* **ios:** Remove WKSuspendInBackground preference ([#309](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/309)) ([73b6659](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/73b6659)), closes [#286](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/286) + + +### BREAKING CHANGES + +* **ios:** Remove the WKSuspendInBackground preference, so app relying on that prefere will +not behave as expected + +## [3.1.2](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v3.1.1...v3.1.2) (2019-02-04) + + +### Bug Fixes + +* **Android:** Handle Range Requests for proper media file handling ([#298](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/298)) ([6f18248](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/6f18248)), closes [#248](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/248) [#205](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/205) [#141](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/141) + +## [3.1.1](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v3.1.0...v3.1.1) (2019-01-18) + + +### Bug Fixes + +* **ios:** Remove unused code ([#281](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/281)) ([fc7ea27](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/fc7ea27)) + +# [3.1.0](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v3.0.0...v3.1.0) (2019-01-17) + + +### Bug Fixes + +* **ios:** Fix video playback of files with uppercase extension ([#264](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/264)) ([2c4b225](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/2c4b225)), closes [#260](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/260) +* Set engines to require Cordova CLI 7.1.0 or newer ([#276](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/276)) ([40f42e1](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/40f42e1)), closes [#263](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/263) +* Use a single scheme for all files ([#270](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/270)) ([3d1bcdd](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/3d1bcdd)), closes [#258](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/258) + + +### Features + +* **Android:** Make app Scheme configurable with a preference ([#274](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/274)) ([18d9f2c](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/18d9f2c)), closes [#269](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/269) [#255](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/255) + +# [3.0.0](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v2.3.1...v3.0.0) (2019-01-03) + + +### Bug Fixes + +* **iOS:** Remove unused code ([#247](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/247)) ([bceb17a](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/bceb17a)) + + +### Features + +* Allows configuration of Mixed Content Mode ([#240](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/240)) ([486d412](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/486d412)), closes [#231](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/231) +* **Android:** Implement ionic-file and ionic-content urls ([#242](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/242)) ([8ef0c30](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/8ef0c30)), closes [#204](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/204) [#183](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/183) +* **iOS:** Remove GCDWebServer ([#244](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/244)) ([0dee0cf](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/0dee0cf)) +* **WebViewLocalServer.java:** return 404 error code when a local file is not found ([#217](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/217)) ([f7a551e](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/f7a551e)), closes [#216](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/216) + + +### BREAKING CHANGES + +* **iOS:** Sets deployment-target to 11, so will only work on iOS 11+ + +* Address changes +* changes the default from 1 (never) to 0 (always) +* **WebViewLocalServer.java:** Until now, the Android part of the plugin was returning a 200 http code even though +the requested file didn't exist. This behavior was inconsistent with the historical behavior of the +iOS webView. This change makes them both work in the same manner but introduces a breaking change +for the current Android users that are expecting a 200 http code no matter what and are testing the +not found error just by checking if the body is null. + +## [2.3.1](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v2.3.0...v2.3.1) (2018-12-06) + + +### Bug Fixes + +* Handle convertFileSrc when using ionic:// scheme ([#236](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/236)) ([89ce899](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/89ce899)) + +# [2.3.0](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v2.2.5...v2.3.0) (2018-12-05) + + +### Features + +* **ios:** Add URLSchemeHandler for iOS 11+ ([#221](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/221)) ([4a973f4](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/4a973f4)) + +## [2.2.5](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v2.2.4...v2.2.5) (2018-11-20) + + +### Bug Fixes + +* Add option for Dark keyboard appearance ([#44](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/44)) ([6c0fe56](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/6c0fe56)) + +## [2.2.4](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v2.2.3...v2.2.4) (2018-11-20) + + +### Bug Fixes + +* fix keyboard displacement bug in iOS 12 WKWebView ([#201](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/201)) ([a670568](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/a670568)) + +## [2.2.3](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v2.2.2...v2.2.3) (2018-11-09) + + +### Bug Fixes + +* Remove main and fix description ([d52db66](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/d52db66)) + +## [2.2.2](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v2.2.1...v2.2.2) (2018-11-09) + +### Bug Fixes + +* Add more server checks before loading urls or reloading ([#211](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/211)) ([60eff2f](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/60eff2f)) + +## [2.2.1](https://github.com/ionic-team/cordova-plugin-ionic-webview/compare/v2.2.0...v2.2.1) (2018-11-07) + + +### Bug Fixes + +* Show error page if server is not running ([#207](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/207)) ([6a2e07e](https://github.com/ionic-team/cordova-plugin-ionic-webview/commit/6a2e07e)) + + +### 2.2.0 (2018-10-04) + +* Fix issue where two apps running on the same port could conflict with each other ([#169](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/165) & [#186](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/186)) +* Add kitkat support (API 19) ([#144](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/144)) [@leo6104](https://github.com/leo6104) +* Fix issue where local server was being used if launch URL is external ([#169](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/169)) + + +### 2.1.4 (2018-09-13) + +* Allow Ionic Deploy `DisableDeploy` preference to disable loading of deploy updates ([#172](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/172)) + + +### 2.1.3 (2018-09-06) + +* Make server path relative ([#164](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/164)) + + +### 2.1.2 (2018-09-05) + +* Return 404 response when file doesn't exist ([#162](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/162)) +* Load local assets if the app is a freshly installed binary ([#155](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/155)) +* Reset stored server path on new binary ([#161](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/161)) + + +### 2.1.1 (2018-09-04) + +* Allow range requests for local files ([#154](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/154)) + + +### 2.1.0 (2018-08-23) + +* Add support for `cordova-android` 6 ([#150](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/150)) + + +### 2.0.3 (2018-08-14) + +* Fix nil reference by setting up the server URL before routes are set up. ([#135](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/135)) [@matejkramny](https://github.com/matejkramny) +* Resolve issue when app is launched in background. ([#124](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/124)) [@ghenry22](https://github.com/ghenry22) + + +### 2.0.2 (2018-07-30) + +* Immediately load new server base path upon setting it. ([#132](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/132)) + + +### 2.0.1 (2018-07-25) + +* Avoid "not modified" response on iOS by always overriding last modified date. ([#127](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/127)) + + +### 2.0.0 (2018-07-23) + +* **BREAKING**: HTTP server now runs for iOS **and** Android, instead of just iOS. The server is configured the same for both platforms. +* **BREAKING**: HTTP server now loads the app from a base href of `/`. The app URL behaves like `http://localhost:8080/index.html` instead of `http://localhost:8080/Users/.../index.html`. +* **BREAKING**: HTTP server is configured to run in HTML5 routing mode (push state) by default. +* **BREAKING**: File access through the Web View must be served by the HTTP server to avoid security errors in the Web View. Loading files via `file://` is not allowed by the Web View. The HTTP server will serve files via the `_file_` prefix, e.g. `http://localhost:8080/_file_/Users/.../file.png`. +* `window.Ionic.normalizeURL()` has been deprecated. Use `window.Ionic.WebView.convertFileSrc()`. +* iOS update HTTP server to latest upstream version (GCDwebserve 3.4.2) +* iOS update HTTP server to restart sockets with error state when resuming from background +* iOS enable HTTP server to continue running in background if the webview is running. +* iOS enable Webview to continue running in background. Requires background mode capability enabled in xcode + valid use case as per app store requirements. If your app is not performing valid background tasks it will still be suspended by the OS as usual. As long as valid background tasks are running the webview will continue to function as expected. +* iOS add config.xml options: + * WKSuspendInBackground - defaults to true, if set to false then the webview and HTTP server will continue to run when the app is in the background or screen is locked + * WKPort - defaults to 8080, define the port that the HTTP server will listen on + * WKBind - defaults to localhost, if set to 127.0.0.1 then this IP will be used instead of the localhost hostname for the HTTP server + +See [Github releases](https://github.com/ionic-team/cordova-plugin-ionic-webview/releases) for earlier changes. diff --git a/plugins/cordova-plugin-ionic-webview/CONTRIBUTING.md b/plugins/cordova-plugin-ionic-webview/CONTRIBUTING.md new file mode 100644 index 000000000..07fab3fbc --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributing + +:mega: **Support/Questions?**: Please see our [Support Page](https://ionicframework.com/support) for general support questions. The issues on GitHub should be reserved for bug reports and feature requests. + +### Bug Reports + +Please create an issue describing the bug in detail. + +### Feature Requests + +Please create an issue! + +## Developing + +Please familiarize yourself with [Cordova plugin development](https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/). + +You can use `cordova plugin add` with a local directory to copy and compile plugin changes into a test project. + +### Workflow + +This repo uses [semantic-release](https://github.com/semantic-release/semantic-release), so it's important to follow a strict workflow to ensure properly automated releases. + +* Work off of `master` branch (create new branch or fork) +* Make changes +* Use `npm run cz` (or `git cz` if [commitizen](https://github.com/commitizen/cz-cli) is installed globally) to make commits +* Create a pull request + * Pull requests will be approved and squashed into the `master` branch + * Try to make pull requests with a single objective (don't have multiple features in one PR, don't mix fixes and features in one PR, etc.) + +### Publishing + +Releases are automated in CI using [semantic-release](https://github.com/semantic-release/semantic-release) when the `stable` branch is pushed to Github. Rebase `master` with `stable`. Commits in `master` should be appropriately formatted from the PR workflow (see [Workflow](#workflow)). diff --git a/plugins/cordova-plugin-ionic-webview/LICENSE b/plugins/cordova-plugin-ionic-webview/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-ionic-webview/README.md b/plugins/cordova-plugin-ionic-webview/README.md new file mode 100644 index 000000000..b9bf625f1 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/README.md @@ -0,0 +1,181 @@ + + + + +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) +[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&identifier=104773211)](https://dependabot.com) +[![npm](https://img.shields.io/npm/v/cordova-plugin-ionic-webview.svg)](https://www.npmjs.com/package/cordova-plugin-ionic-webview) + +# Ionic Web View for Cordova + +A Web View plugin for Cordova, focused on providing the highest performance experience for Ionic apps (but can be used with any Cordova app). + +This plugin uses WKWebView on iOS and the latest evergreen webview on Android. Additionally, this plugin makes it easy to use HTML5 style routing that web developers expect for building single-page apps. + +Note: This repo and its documentation are for `cordova-plugin-ionic-webview` @ `4.x`, which uses the new features that may not work with all apps. See [Requirements](#plugin-requirements) and [Migrating to 4.x](#migrating-to-4x). + +2.x documentation can be found [here](https://github.com/ionic-team/cordova-plugin-ionic-webview/blob/2.x/README.md). + +:book: **Documentation**: [https://beta.ionicframework.com/docs/building/webview][ionic-webview-docs] + +:mega: **Support/Questions?** Please see our [Support Page][ionic-support] for general support questions. The issues on GitHub should be reserved for bug reports and feature requests. + +:sparkling_heart: **Want to contribute?** Please see [CONTRIBUTING.md](https://github.com/ionic-team/cordova-plugin-ionic-webview/blob/master/CONTRIBUTING.md). + +## Configuration + +This plugin has several configuration options that can be set in `config.xml`. + +### Android and iOS Preferences + +Preferences available for both iOS and Android + +#### Hostname + +`` + +Default value is `localhost`. + +Example `ionic://app` on iOS, `http://app` on Android. + +If you change it, you'll need to add a new `allow-navigation` entry in the `config.xml` for the configured url (i.e `` if `Hostname` is set to `app`). +This is only needed for the Android url when using `http://`, `https://` or a custom scheme. All `ionic://` urls are whitelisted by the plugin. + +### Android Preferences + +Preferences only available Android platform + +#### Scheme + +```xml + +``` + +Default value is `http` + +Configures the Scheme the app uses to load the content. + +#### ResolveServiceWorkerRequests + +```xml + +``` + +Default value is `false` + +Enable to resolve requests made by Service Workers through the local server. + +#### MixedContentMode + +```xml + +``` + +Configures the WebView's behavior when an origin attempts to load a resource from a different origin. + +Default value is `0` (`MIXED_CONTENT_ALWAYS_ALLOW`), which allows loading resources from other origins. + +Other possible values are `1` (`MIXED_CONTENT_NEVER_ALLOW`) and `2` (`MIXED_CONTENT_COMPATIBILITY_MODE`) + + +[Android documentation](https://developer.android.com/reference/android/webkit/WebSettings.html#setMixedContentMode(int)) + + +### iOS Preferences + +Preferences only available for iOS platform + +#### iosScheme + +```xml + +``` + +Default value is `ionic` + +Configures the Scheme the app uses to load the content. + +Values like `http`, `https` or `file` are not valid and will use default value instead. + +If you change it, you'll need to add a new `allow-navigation` entry in the `config.xml` for the configured scheme (i.e `` if `iosScheme` is set to `httpsionic`). + +#### WKSuspendInBackground + + ```xml + +``` + +Default value is `true` (suspend). + +Set to false to stop WKWebView suspending in background too eagerly. + +#### KeyboardAppearanceDark + +```xml + +``` + +Whether to use a dark styled keyboard on iOS + +#### ScrollEnabled + +```xml + +``` + +Ionic apps work better if the WKWebView is not scrollable, so the scroll is disabled by default, but can be enabled with this preference. This only affects the main ScrollView of the WKWebView, so only affects the body, not other scrollable components. + +## Plugin Requirements + +* **Cordova CLI**: 7.1.0+ +* **iOS**: iOS 11+ and `cordova-ios` 4+ +* **Android**: Android 4.4+ and `cordova-android` 6.4+ + +## Migrating to 4.x + +1. Remove and re-add the Web View plugin: + + ``` + cordova plugin rm cordova-plugin-ionic-webview + cordova plugin add cordova-plugin-ionic-webview@latest + ``` + +1. Apps are now served from HTTP on Android by default. + + * The default origin for requests from the Android WebView is `http://localhost`. If `Hostname` and `Scheme` preferences are set, then origin will be `schemeValue://HostnameValue`. + +1. Apps are now served from `ionic://` scheme on iOS by default. + + * The default origin for requests from the iOS WebView is `ionic://localhost`. If `Hostname` and `iosScheme` preferences are set, then origin will be `iosSchemeValue://HostnameValue`. + +1. The WebView is not able to display images, videos or other files from file or content protocols or if it doesn't have protocol at all. For those cases use `window.Ionic.WebView.convertFileSrc()` to get the proper url. + +1. Replace any usages of `window.Ionic.normalizeURL()` with `window.Ionic.WebView.convertFileSrc()`. + + * For Ionic Angular projects, there is an [Ionic Native wrapper](https://beta.ionicframework.com/docs/native/ionic-webview): + + ``` + npm install @ionic-native/ionic-webview@beta + ``` + +[ionic-homepage]: https://ionicframework.com +[ionic-docs]: https://ionicframework.com/docs +[ionic-webview-docs]: https://beta.ionicframework.com/docs/building/webview +[ionic-support]: https://ionicframework.com/support diff --git a/plugins/cordova-plugin-ionic-webview/package.json b/plugins/cordova-plugin-ionic-webview/package.json new file mode 100644 index 000000000..d1c5ad237 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/package.json @@ -0,0 +1,107 @@ +{ + "_from": "cordova-plugin-ionic-webview@4.2.1", + "_id": "cordova-plugin-ionic-webview@4.2.1", + "_inBundle": false, + "_integrity": "sha512-7KrmqLaOGq1RP8N2z1ezN1kqkWFzTwwMvQ3/qAkd+exxFZuOe3DIN4eaU1gdNphsxdirI8Ajnr9q4So5vQbWqw==", + "_location": "/cordova-plugin-ionic-webview", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cordova-plugin-ionic-webview@4.2.1", + "name": "cordova-plugin-ionic-webview", + "escapedName": "cordova-plugin-ionic-webview", + "rawSpec": "4.2.1", + "saveSpec": null, + "fetchSpec": "4.2.1" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/cordova-plugin-ionic-webview/-/cordova-plugin-ionic-webview-4.2.1.tgz", + "_shasum": "42a67bef248472659d421494feb8245ef27becfa", + "_spec": "cordova-plugin-ionic-webview@4.2.1", + "_where": "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular", + "author": { + "name": "Ionic Team" + }, + "bugs": { + "url": "https://github.com/ionic-team/cordova-plugin-ionic-webview/issues" + }, + "bundleDependencies": false, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + }, + "deprecated": false, + "description": "Ionic Web View Engine Plugin", + "devDependencies": { + "@semantic-release/changelog": "^3.0.0", + "@semantic-release/exec": "^3.3.0", + "@semantic-release/git": "^7.0.4", + "@semantic-release/github": "^5.0.6", + "@semantic-release/npm": "^5.0.4", + "commitizen": "^4.0.3", + "cz-conventional-changelog": "^3.0.2", + "semantic-release": "^15.9.17", + "sync-cordova-xml": "^0.4.0" + }, + "engines": { + "cordovaDependencies": { + "2.0.0": { + "cordova-android": ">=6.4.0", + "cordova-ios": ">=4.0.0-dev" + }, + "3.1.0": { + "cordova": ">=7.1.0", + "cordova-android": ">=6.4.0", + "cordova-ios": ">=4.0.0-dev" + } + } + }, + "homepage": "https://github.com/ionic-team/cordova-plugin-ionic-webview#readme", + "keywords": [ + "cordova", + "wkwebview" + ], + "license": "Apache-2.0", + "name": "cordova-plugin-ionic-webview", + "release": { + "branch": "stable", + "verifyConditions": [ + "@semantic-release/changelog", + "@semantic-release/npm", + "@semantic-release/git", + "@semantic-release/github" + ], + "prepare": [ + "@semantic-release/changelog", + "@semantic-release/npm", + "@semantic-release/exec", + "@semantic-release/git" + ], + "publish": [ + "@semantic-release/github", + "@semantic-release/npm" + ], + "success": [ + "@semantic-release/github" + ], + "failure": [ + "@semantic-release/github" + ], + "prepareCmd": "npm run version" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ionic-team/cordova-plugin-ionic-webview.git" + }, + "scripts": { + "cz": "git-cz", + "sync_plugin_xml": "sync-cordova-xml package.json plugin.xml --output=plugin.xml", + "version": "npm run sync_plugin_xml && git add plugin.xml" + }, + "version": "4.2.1" +} diff --git a/plugins/cordova-plugin-ionic-webview/plugin.xml b/plugins/cordova-plugin-ionic-webview/plugin.xml new file mode 100644 index 000000000..f8f442e6a --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/plugin.xml @@ -0,0 +1,88 @@ + + + + + + cordova-plugin-ionic-webview + Ionic Web View Engine Plugin + Apache-2.0 + cordova,wkwebview + https://github.com/ionic-team/cordova-plugin-ionic-webview + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://github.com/ionic-team/cordova-plugin-ionic-webview/issues + Ionic Team + diff --git a/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/AndroidProtocolHandler.java b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/AndroidProtocolHandler.java new file mode 100644 index 000000000..6202a5b91 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/AndroidProtocolHandler.java @@ -0,0 +1,107 @@ +package com.ionicframework.cordova.webview; + +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import android.content.Context; +import android.content.res.AssetManager; +import android.net.Uri; +import android.util.Log; +import android.util.TypedValue; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + + +public class AndroidProtocolHandler { + private static final String TAG = "AndroidProtocolHandler"; + + private Context context; + + public AndroidProtocolHandler(Context context) { + this.context = context; + } + + public InputStream openAsset(String path) throws IOException { + return context.getAssets().open(path, AssetManager.ACCESS_STREAMING); + } + + public InputStream openResource(Uri uri) { + assert uri.getPath() != null; + // The path must be of the form ".../asset_type/asset_name.ext". + List pathSegments = uri.getPathSegments(); + String assetType = pathSegments.get(pathSegments.size() - 2); + String assetName = pathSegments.get(pathSegments.size() - 1); + + // Drop the file extension. + assetName = assetName.split("\\.")[0]; + try { + // Use the application context for resolving the resource package name so that we do + // not use the browser's own resources. Note that if 'context' here belongs to the + // test suite, it does not have a separate application context. In that case we use + // the original context object directly. + if (context.getApplicationContext() != null) { + context = context.getApplicationContext(); + } + int fieldId = getFieldId(context, assetType, assetName); + int valueType = getValueType(context, fieldId); + if (valueType == TypedValue.TYPE_STRING) { + return context.getResources().openRawResource(fieldId); + } else { + Log.e(TAG, "Asset not of type string: " + uri); + return null; + } + } catch (ClassNotFoundException e) { + Log.e(TAG, "Unable to open resource URL: " + uri, e); + return null; + } catch (NoSuchFieldException e) { + Log.e(TAG, "Unable to open resource URL: " + uri, e); + return null; + } catch (IllegalAccessException e) { + Log.e(TAG, "Unable to open resource URL: " + uri, e); + return null; + } + } + + public InputStream openFile(String filePath) throws IOException { + String realPath = filePath.replace(WebViewLocalServer.fileStart, ""); + File localFile = new File(realPath); + return new FileInputStream(localFile); + } + + public InputStream openContentUrl(Uri uri) throws IOException { + Integer port = uri.getPort(); + String realPath; + if (port == -1) { + realPath = uri.toString().replace(uri.getScheme() + "://" + uri.getHost() + WebViewLocalServer.contentStart, "content:/"); + } else { + realPath = uri.toString().replace(uri.getScheme() + "://" + uri.getHost() + ":" + port + WebViewLocalServer.contentStart, "content:/"); + } + InputStream stream = null; + try { + stream = context.getContentResolver().openInputStream(Uri.parse(realPath)); + } catch (SecurityException e) { + Log.e(TAG, "Unable to open content URL: " + uri, e); + } + return stream; + } + + private static int getFieldId(Context context, String assetType, String assetName) + throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException { + Class d = context.getClassLoader() + .loadClass(context.getPackageName() + ".R$" + assetType); + java.lang.reflect.Field field = d.getField(assetName); + int id = field.getInt(null); + return id; + } + + private static int getValueType(Context context, int fieldId) { + TypedValue value = new TypedValue(); + context.getResources().getValue(fieldId, value, true); + return value.type; + } +} diff --git a/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/IonicWebView.java b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/IonicWebView.java new file mode 100644 index 000000000..ff771371e --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/IonicWebView.java @@ -0,0 +1,41 @@ +package com.ionicframework.cordova.webview; + +import android.app.Activity; +import android.content.SharedPreferences; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.json.JSONArray; +import org.json.JSONException; + +public class IonicWebView extends CordovaPlugin { + + public static final String WEBVIEW_PREFS_NAME = "WebViewSettings"; + public static final String CDV_SERVER_PATH = "serverBasePath"; + + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + + if (action.equals("setServerBasePath")) { + final String path = args.getString(0); + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + ((IonicWebViewEngine)webView.getEngine()).setServerBasePath(path); + } + }); + return true; + } else if (action.equals("getServerBasePath")) { + callbackContext.success(((IonicWebViewEngine)webView.getEngine()).getServerBasePath()); + return true; + } else if (action.equals("persistServerBasePath")) { + String path = ((IonicWebViewEngine)webView.getEngine()).getServerBasePath(); + SharedPreferences prefs = cordova.getActivity().getApplicationContext().getSharedPreferences(WEBVIEW_PREFS_NAME, Activity.MODE_PRIVATE); + SharedPreferences.Editor editor = prefs.edit(); + editor.putString(CDV_SERVER_PATH, path); + editor.apply(); + return true; + } + return false; + } + +} + diff --git a/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/IonicWebViewEngine.java b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/IonicWebViewEngine.java new file mode 100644 index 000000000..02bdaf8cb --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/IonicWebViewEngine.java @@ -0,0 +1,181 @@ +package com.ionicframework.cordova.webview; + +import android.app.Activity; +import android.content.Context; +import android.content.SharedPreferences; +import android.content.pm.PackageInfo; +import android.annotation.TargetApi; +import android.graphics.Bitmap; +import android.net.Uri; +import android.os.Build; +import android.support.annotation.RequiresApi; +import android.util.Log; +import android.webkit.ServiceWorkerController; +import android.webkit.ServiceWorkerClient; +import android.webkit.WebResourceRequest; +import android.webkit.WebResourceResponse; +import android.webkit.WebSettings; +import android.webkit.WebView; +import org.apache.cordova.ConfigXmlParser; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPreferences; +import org.apache.cordova.CordovaResourceApi; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.CordovaWebViewEngine; +import org.apache.cordova.NativeToJsMessageQueue; +import org.apache.cordova.PluginManager; +import org.apache.cordova.engine.SystemWebViewClient; +import org.apache.cordova.engine.SystemWebViewEngine; +import org.apache.cordova.engine.SystemWebView; + +public class IonicWebViewEngine extends SystemWebViewEngine { + public static final String TAG = "IonicWebViewEngine"; + + private WebViewLocalServer localServer; + private String CDV_LOCAL_SERVER; + private String scheme; + private static final String LAST_BINARY_VERSION_CODE = "lastBinaryVersionCode"; + private static final String LAST_BINARY_VERSION_NAME = "lastBinaryVersionName"; + + /** + * Used when created via reflection. + */ + public IonicWebViewEngine(Context context, CordovaPreferences preferences) { + super(new SystemWebView(context), preferences); + Log.d(TAG, "Ionic Web View Engine Starting Right Up 1..."); + } + + public IonicWebViewEngine(SystemWebView webView) { + super(webView, null); + Log.d(TAG, "Ionic Web View Engine Starting Right Up 2..."); + } + + public IonicWebViewEngine(SystemWebView webView, CordovaPreferences preferences) { + super(webView, preferences); + Log.d(TAG, "Ionic Web View Engine Starting Right Up 3..."); + } + + @Override + public void init(CordovaWebView parentWebView, CordovaInterface cordova, final CordovaWebViewEngine.Client client, + CordovaResourceApi resourceApi, PluginManager pluginManager, + NativeToJsMessageQueue nativeToJsMessageQueue) { + ConfigXmlParser parser = new ConfigXmlParser(); + parser.parse(cordova.getActivity()); + + String hostname = preferences.getString("Hostname", "localhost"); + scheme = preferences.getString("Scheme", "http"); + CDV_LOCAL_SERVER = scheme + "://" + hostname; + + localServer = new WebViewLocalServer(cordova.getActivity(), hostname, true, parser, scheme); + localServer.hostAssets("www"); + + webView.setWebViewClient(new ServerClient(this, parser)); + + super.init(parentWebView, cordova, client, resourceApi, pluginManager, nativeToJsMessageQueue); + if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + final WebSettings settings = webView.getSettings(); + int mode = preferences.getInteger("MixedContentMode", 0); + settings.setMixedContentMode(mode); + } + SharedPreferences prefs = cordova.getActivity().getApplicationContext().getSharedPreferences(IonicWebView.WEBVIEW_PREFS_NAME, Activity.MODE_PRIVATE); + String path = prefs.getString(IonicWebView.CDV_SERVER_PATH, null); + if (!isDeployDisabled() && !isNewBinary() && path != null && !path.isEmpty()) { + setServerBasePath(path); + } + + boolean setAsServiceWorkerClient = preferences.getBoolean("ResolveServiceWorkerRequests", false); + ServiceWorkerController controller = null; + + if (setAsServiceWorkerClient && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) { + controller = ServiceWorkerController.getInstance(); + controller.setServiceWorkerClient(new ServiceWorkerClient(){ + @Override + public WebResourceResponse shouldInterceptRequest(WebResourceRequest request) { + return localServer.shouldInterceptRequest(request.getUrl(), request); + } + }); + } + } + + private boolean isNewBinary() { + String versionCode = ""; + String versionName = ""; + SharedPreferences prefs = cordova.getActivity().getApplicationContext().getSharedPreferences(IonicWebView.WEBVIEW_PREFS_NAME, Activity.MODE_PRIVATE); + String lastVersionCode = prefs.getString(LAST_BINARY_VERSION_CODE, null); + String lastVersionName = prefs.getString(LAST_BINARY_VERSION_NAME, null); + + try { + PackageInfo pInfo = this.cordova.getActivity().getPackageManager().getPackageInfo(this.cordova.getActivity().getPackageName(), 0); + versionCode = Integer.toString(pInfo.versionCode); + versionName = pInfo.versionName; + } catch(Exception ex) { + Log.e(TAG, "Unable to get package info", ex); + } + + if (!versionCode.equals(lastVersionCode) || !versionName.equals(lastVersionName)) { + SharedPreferences.Editor editor = prefs.edit(); + editor.putString(LAST_BINARY_VERSION_CODE, versionCode); + editor.putString(LAST_BINARY_VERSION_NAME, versionName); + editor.putString(IonicWebView.CDV_SERVER_PATH, ""); + editor.apply(); + return true; + } + return false; + } + + private boolean isDeployDisabled() { + return preferences.getBoolean("DisableDeploy", false); + } + private class ServerClient extends SystemWebViewClient { + private ConfigXmlParser parser; + + public ServerClient(SystemWebViewEngine parentEngine, ConfigXmlParser parser) { + super(parentEngine); + this.parser = parser; + } + + @RequiresApi(Build.VERSION_CODES.LOLLIPOP) + @Override + public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) { + return localServer.shouldInterceptRequest(request.getUrl(), request); + } + + @TargetApi(Build.VERSION_CODES.KITKAT) + @Override + public WebResourceResponse shouldInterceptRequest(WebView view, String url) { + return localServer.shouldInterceptRequest(Uri.parse(url), null); + } + + @Override + public void onPageStarted(WebView view, String url, Bitmap favicon) { + super.onPageStarted(view, url, favicon); + String launchUrl = parser.getLaunchUrl(); + if (!launchUrl.contains(WebViewLocalServer.httpsScheme) && !launchUrl.contains(WebViewLocalServer.httpScheme) && url.equals(launchUrl)) { + view.stopLoading(); + // When using a custom scheme the app won't load if server start url doesn't end in / + String startUrl = CDV_LOCAL_SERVER; + if (!scheme.equalsIgnoreCase(WebViewLocalServer.httpsScheme) && !scheme.equalsIgnoreCase(WebViewLocalServer.httpScheme)) { + startUrl += "/"; + } + view.loadUrl(startUrl); + } + } + + @Override + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + view.loadUrl("javascript:(function() { " + + "window.WEBVIEW_SERVER_URL = '" + CDV_LOCAL_SERVER + "';" + + "})()"); + } + } + + public void setServerBasePath(String path) { + localServer.hostFiles(path); + webView.loadUrl(CDV_LOCAL_SERVER); + } + + public String getServerBasePath() { + return this.localServer.getBasePath(); + } +} diff --git a/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/UriMatcher.java b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/UriMatcher.java new file mode 100644 index 000000000..d8addb9b9 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/UriMatcher.java @@ -0,0 +1,183 @@ +package com.ionicframework.cordova.webview; + +/* + * Copyright (C) 2006 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +//package com.google.webviewlocalserver.third_party.android; + +import android.net.Uri; + +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Pattern; + +public class UriMatcher { + /** + * Creates the root node of the URI tree. + * + * @param code the code to match for the root URI + */ + public UriMatcher(Object code) { + mCode = code; + mWhich = -1; + mChildren = new ArrayList(); + mText = null; + } + + private UriMatcher() { + mCode = null; + mWhich = -1; + mChildren = new ArrayList(); + mText = null; + } + + /** + * Add a URI to match, and the code to return when this URI is + * matched. URI nodes may be exact match string, the token "*" + * that matches any text, or the token "#" that matches only + * numbers. + *

+ * Starting from API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}, + * this method will accept a leading slash in the path. + * + * @param authority the authority to match + * @param path the path to match. * may be used as a wild card for + * any text, and # may be used as a wild card for numbers. + * @param code the code that is returned when a URI is matched + * against the given components. Must be positive. + */ + public void addURI(String scheme, String authority, String path, Object code) { + if (code == null) { + throw new IllegalArgumentException("Code can't be null"); + } + + String[] tokens = null; + if (path != null) { + String newPath = path; + // Strip leading slash if present. + if (path.length() > 0 && path.charAt(0) == '/') { + newPath = path.substring(1); + } + tokens = PATH_SPLIT_PATTERN.split(newPath); + } + + int numTokens = tokens != null ? tokens.length : 0; + UriMatcher node = this; + for (int i = -2; i < numTokens; i++) { + String token; + if (i == -2) + token = scheme; + else if (i == -1) + token = authority; + else + token = tokens[i]; + ArrayList children = node.mChildren; + int numChildren = children.size(); + UriMatcher child; + int j; + for (j = 0; j < numChildren; j++) { + child = children.get(j); + if (token.equals(child.mText)) { + node = child; + break; + } + } + if (j == numChildren) { + // Child not found, create it + child = new UriMatcher(); + if (token.equals("**")) { + child.mWhich = REST; + } else if (token.equals("*")) { + child.mWhich = TEXT; + } else { + child.mWhich = EXACT; + } + child.mText = token; + node.mChildren.add(child); + node = child; + } + } + node.mCode = code; + } + + static final Pattern PATH_SPLIT_PATTERN = Pattern.compile("/"); + + /** + * Try to match against the path in a url. + * + * @param uri The url whose path we will match against. + * @return The code for the matched node (added using addURI), + * or null if there is no matched node. + */ + public Object match(Uri uri) { + final List pathSegments = uri.getPathSegments(); + final int li = pathSegments.size(); + + UriMatcher node = this; + + if (li == 0 && uri.getAuthority() == null) { + return this.mCode; + } + + for (int i = -2; i < li; i++) { + String u; + if (i == -2) + u = uri.getScheme(); + else if (i == -1) + u = uri.getAuthority(); + else + u = pathSegments.get(i); + ArrayList list = node.mChildren; + if (list == null) { + break; + } + node = null; + int lj = list.size(); + for (int j = 0; j < lj; j++) { + UriMatcher n = list.get(j); + which_switch: + switch (n.mWhich) { + case EXACT: + if (n.mText.equals(u)) { + node = n; + } + break; + case TEXT: + node = n; + break; + case REST: + return n.mCode; + } + if (node != null) { + break; + } + } + if (node == null) { + return null; + } + } + + return node.mCode; + } + + private static final int EXACT = 0; + private static final int TEXT = 1; + private static final int REST = 2; + + private Object mCode; + private int mWhich; + private String mText; + private ArrayList mChildren; +} diff --git a/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/WebViewLocalServer.java b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/WebViewLocalServer.java new file mode 100644 index 000000000..cf134932b --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/android/com/ionicframework/cordova/webview/WebViewLocalServer.java @@ -0,0 +1,645 @@ +/* +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + */ +package com.ionicframework.cordova.webview; + +import android.content.Context; +import android.net.Uri; +import android.os.Build; +import android.util.Log; +import android.webkit.WebResourceRequest; +import android.webkit.WebResourceResponse; + +import org.apache.cordova.ConfigXmlParser; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.SocketTimeoutException; +import java.net.URL; +import java.net.URLConnection; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * Helper class meant to be used with the android.webkit.WebView class to enable hosting assets, + * resources and other data on 'virtual' http(s):// URL. + * Hosting assets and resources on http(s):// URLs is desirable as it is compatible with the + * Same-Origin policy. + *

+ * This class is intended to be used from within the + * {@link android.webkit.WebViewClient#shouldInterceptRequest(android.webkit.WebView, String)} and + * {@link android.webkit.WebViewClient#shouldInterceptRequest(android.webkit.WebView, + * android.webkit.WebResourceRequest)} + * methods. + */ +public class WebViewLocalServer { + private static String TAG = "WebViewAssetServer"; + private String basePath; + public final static String httpScheme = "http"; + public final static String httpsScheme = "https"; + public final static String fileStart = "/_app_file_"; + public final static String contentStart = "/_app_content_"; + + private final UriMatcher uriMatcher; + private final AndroidProtocolHandler protocolHandler; + private final String authority; + private final String customScheme; + // Whether we're serving local files or proxying (for example, when doing livereload on a + // non-local endpoint (will be false in that case) + private boolean isAsset; + // Whether to route all requests to paths without extensions back to `index.html` + private final boolean html5mode; + private ConfigXmlParser parser; + + public String getAuthority() { return authority; } + + /** + * A handler that produces responses for paths on the virtual asset server. + *

+ * Methods of this handler will be invoked on a background thread and care must be taken to + * correctly synchronize access to any shared state. + *

+ * On Android KitKat and above these methods may be called on more than one thread. This thread + * may be different than the thread on which the shouldInterceptRequest method was invoke. + * This means that on Android KitKat and above it is possible to block in this method without + * blocking other resources from loading. The number of threads used to parallelize loading + * is an internal implementation detail of the WebView and may change between updates which + * means that the amount of time spend blocking in this method should be kept to an absolute + * minimum. + */ + public abstract static class PathHandler { + protected String mimeType; + private String encoding; + private String charset; + private int statusCode; + private String reasonPhrase; + private Map responseHeaders; + + public PathHandler() { + this(null, null, 200, "OK", null); + } + + public PathHandler(String encoding, String charset, int statusCode, + String reasonPhrase, Map responseHeaders) { + this.encoding = encoding; + this.charset = charset; + this.statusCode = statusCode; + this.reasonPhrase = reasonPhrase; + Map tempResponseHeaders; + if (responseHeaders == null) { + tempResponseHeaders = new HashMap(); + } else { + tempResponseHeaders = responseHeaders; + } + tempResponseHeaders.put("Cache-Control", "no-cache"); + this.responseHeaders = tempResponseHeaders; + } + + abstract public InputStream handle(Uri url); + + public String getEncoding() { + return encoding; + } + + public String getCharset() { + return charset; + } + + public int getStatusCode() { + return statusCode; + } + + public String getReasonPhrase() { + return reasonPhrase; + } + + public Map getResponseHeaders() { + return responseHeaders; + } + } + + /** + * Information about the URLs used to host the assets in the WebView. + */ + public static class AssetHostingDetails { + private Uri httpPrefix; + private Uri httpsPrefix; + + /*package*/ AssetHostingDetails(Uri httpPrefix, Uri httpsPrefix) { + this.httpPrefix = httpPrefix; + this.httpsPrefix = httpsPrefix; + } + + /** + * Gets the http: scheme prefix at which assets are hosted. + * + * @return the http: scheme prefix at which assets are hosted. Can return null. + */ + public Uri getHttpPrefix() { + return httpPrefix; + } + + /** + * Gets the https: scheme prefix at which assets are hosted. + * + * @return the https: scheme prefix at which assets are hosted. Can return null. + */ + public Uri getHttpsPrefix() { + return httpsPrefix; + } + } + + WebViewLocalServer(Context context, String authority, boolean html5mode, ConfigXmlParser parser, String customScheme) { + uriMatcher = new UriMatcher(null); + this.html5mode = html5mode; + this.parser = parser; + this.protocolHandler = new AndroidProtocolHandler(context.getApplicationContext()); + this.authority = authority; + this.customScheme = customScheme; + } + + private static Uri parseAndVerifyUrl(String url) { + if (url == null) { + return null; + } + Uri uri = Uri.parse(url); + if (uri == null) { + Log.e(TAG, "Malformed URL: " + url); + return null; + } + String path = uri.getPath(); + if (path == null || path.length() == 0) { + Log.e(TAG, "URL does not have a path: " + url); + return null; + } + return uri; + } + + private static WebResourceResponse createWebResourceResponse(String mimeType, String encoding, int statusCode, String reasonPhrase, Map responseHeaders, InputStream data) { + if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + int finalStatusCode = statusCode; + try { + if (data.available() == 0) { + finalStatusCode = 404; + } + } catch (IOException e) { + finalStatusCode = 500; + } + return new WebResourceResponse(mimeType, encoding, finalStatusCode, reasonPhrase, responseHeaders, data); + } else { + return new WebResourceResponse(mimeType, encoding, data); + } + } + + /** + * Attempt to retrieve the WebResourceResponse associated with the given request. + * This method should be invoked from within + * {@link android.webkit.WebViewClient#shouldInterceptRequest(android.webkit.WebView, + * android.webkit.WebResourceRequest)}. + * + * @param uri the request Uri to process. + * @return a response if the request URL had a matching handler, null if no handler was found. + */ + public WebResourceResponse shouldInterceptRequest(Uri uri, WebResourceRequest request) { + PathHandler handler; + synchronized (uriMatcher) { + handler = (PathHandler) uriMatcher.match(uri); + } + if (handler == null) { + return null; + } + + if (isLocalFile(uri) || uri.getAuthority().equals(this.authority)) { + Log.d("SERVER", "Handling local request: " + uri.toString()); + return handleLocalRequest(uri, handler, request); + } else { + return handleProxyRequest(uri, handler); + } + } + + private boolean isLocalFile(Uri uri) { + String path = uri.getPath(); + if (path.startsWith(contentStart) || path.startsWith(fileStart)) { + return true; + } + return false; + } + + + private WebResourceResponse handleLocalRequest(Uri uri, PathHandler handler, WebResourceRequest request) { + String path = uri.getPath(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && request != null && request.getRequestHeaders().get("Range") != null) { + InputStream responseStream = new LollipopLazyInputStream(handler, uri); + String mimeType = getMimeType(path, responseStream); + Map tempResponseHeaders = handler.getResponseHeaders(); + int statusCode = 206; + try { + int totalRange = responseStream.available(); + String rangeString = request.getRequestHeaders().get("Range"); + String[] parts = rangeString.split("="); + String[] streamParts = parts[1].split("-"); + String fromRange = streamParts[0]; + int range = totalRange-1; + if (streamParts.length > 1) { + range = Integer.parseInt(streamParts[1]); + } + tempResponseHeaders.put("Accept-Ranges", "bytes"); + tempResponseHeaders.put("Content-Range", "bytes " + fromRange + "-" + range + "/" + totalRange); + } catch (IOException e) { + statusCode = 404; + } + return createWebResourceResponse(mimeType, handler.getEncoding(), + statusCode, handler.getReasonPhrase(), tempResponseHeaders, responseStream); + } + if (isLocalFile(uri)) { + InputStream responseStream = new LollipopLazyInputStream(handler, uri); + String mimeType = getMimeType(path, responseStream); + return createWebResourceResponse(mimeType, handler.getEncoding(), + handler.getStatusCode(), handler.getReasonPhrase(), handler.getResponseHeaders(), responseStream); + } + + if (path.equals("") || path.equals("/") || (!uri.getLastPathSegment().contains(".") && html5mode)) { + InputStream stream; + String launchURL = parser.getLaunchUrl(); + String launchFile = launchURL.substring(launchURL.lastIndexOf("/") + 1, launchURL.length()); + try { + String startPath = this.basePath + "/" + launchFile; + if (isAsset) { + stream = protocolHandler.openAsset(startPath); + } else { + stream = protocolHandler.openFile(startPath); + } + + } catch (IOException e) { + Log.e(TAG, "Unable to open " + launchFile, e); + return null; + } + + return createWebResourceResponse("text/html", handler.getEncoding(), + handler.getStatusCode(), handler.getReasonPhrase(), handler.getResponseHeaders(), stream); + } + + int periodIndex = path.lastIndexOf("."); + if (periodIndex >= 0) { + InputStream responseStream = new LollipopLazyInputStream(handler, uri); + String mimeType = getMimeType(path, responseStream); + return createWebResourceResponse(mimeType, handler.getEncoding(), + handler.getStatusCode(), handler.getReasonPhrase(), handler.getResponseHeaders(), responseStream); + } + + return null; + } + + /** + * Instead of reading files from the filesystem/assets, proxy through to the URL + * and let an external server handle it. + * @param uri + * @param handler + * @return + */ + private WebResourceResponse handleProxyRequest(Uri uri, PathHandler handler) { + try { + String path = uri.getPath(); + URL url = new URL(uri.toString()); + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("GET"); + conn.setReadTimeout(30 * 1000); + conn.setConnectTimeout(30 * 1000); + + InputStream stream = conn.getInputStream(); + + if (path.equals("/") || (!uri.getLastPathSegment().contains(".") && html5mode)) { + return createWebResourceResponse("text/html", handler.getEncoding(), + handler.getStatusCode(), handler.getReasonPhrase(), handler.getResponseHeaders(), stream); + } + + int periodIndex = path.lastIndexOf("."); + if (periodIndex >= 0) { + String ext = path.substring(path.lastIndexOf("."), path.length()); + + // TODO: Conjure up a bit more subtlety than this + if (ext.equals(".html")) { + } + + String mimeType = getMimeType(path, stream); + + return createWebResourceResponse(mimeType, handler.getEncoding(), + handler.getStatusCode(), handler.getReasonPhrase(), handler.getResponseHeaders(), stream); + } + + return createWebResourceResponse("", handler.getEncoding(), + handler.getStatusCode(), handler.getReasonPhrase(), handler.getResponseHeaders(), stream); + + } catch (SocketTimeoutException ex) { + // bridge.handleAppUrlLoadError(ex); + } catch (Exception ex) { + // bridge.handleAppUrlLoadError(ex); + } + return null; + } + + private String getMimeType(String path, InputStream stream) { + String mimeType = null; + try { + mimeType = URLConnection.guessContentTypeFromName(path); // Does not recognize *.js + if (mimeType != null && path.endsWith(".js") && mimeType.equals("image/x-icon")) { + Log.d(IonicWebViewEngine.TAG, "We shouldn't be here"); + } + if (mimeType == null) { + if (path.endsWith(".js") || path.endsWith(".mjs")) { + // Make sure JS files get the proper mimetype to support ES modules + mimeType = "application/javascript"; + } else if (path.endsWith(".wasm")) { + mimeType = "application/wasm"; + } else { + mimeType = URLConnection.guessContentTypeFromStream(stream); + } + } + } catch (Exception ex) { + Log.e(TAG, "Unable to get mime type" + path, ex); + } + return mimeType; + } + + /** + * Registers a handler for the given uri. The handler will be invoked + * every time the shouldInterceptRequest method of the instance is called with + * a matching uri. + * + * @param uri the uri to use the handler for. The scheme and authority (domain) will be matched + * exactly. The path may contain a '*' element which will match a single element of + * a path (so a handler registered for /a/* will be invoked for /a/b and /a/c.html + * but not for /a/b/b) or the '**' element which will match any number of path + * elements. + * @param handler the handler to use for the uri. + */ + void register(Uri uri, PathHandler handler) { + synchronized (uriMatcher) { + uriMatcher.addURI(uri.getScheme(), uri.getAuthority(), uri.getPath(), handler); + } + } + + /** + * Hosts the application's assets on an http(s):// URL. Assets from the local path + * assetPath/... will be available under + * http(s)://{uuid}.androidplatform.net/assets/.... + * + * @param assetPath the local path in the application's asset folder which will be made + * available by the server (for example "/www"). + */ + public void hostAssets(String assetPath) { + hostAssets(authority, assetPath); + } + + + /** + * Hosts the application's assets on an http(s):// URL. Assets from the local path + * assetPath/... will be available under + * http(s)://{domain}/{virtualAssetPath}/.... + * + * @param domain custom domain on which the assets should be hosted (for example "example.com"). + * @param assetPath the local path in the application's asset folder which will be made + * available by the server (for example "/www"). + * @return prefixes under which the assets are hosted. + */ + public void hostAssets(final String domain, + final String assetPath) { + this.isAsset = true; + this.basePath = assetPath; + + createHostingDetails(); + } + + private void createHostingDetails() { + final String assetPath = this.basePath; + + if (assetPath.indexOf('*') != -1) { + throw new IllegalArgumentException("assetPath cannot contain the '*' character."); + } + + PathHandler handler = new PathHandler() { + @Override + public InputStream handle(Uri url) { + InputStream stream = null; + String path = url.getPath(); + try { + if (path.startsWith(contentStart)) { + stream = protocolHandler.openContentUrl(url); + } else if (path.startsWith(fileStart) || !isAsset) { + if (!path.startsWith(fileStart)) { + path = basePath + url.getPath(); + } + stream = protocolHandler.openFile(path); + } else { + stream = protocolHandler.openAsset(assetPath + path); + } + } catch (IOException e) { + Log.e(TAG, "Unable to open asset URL: " + url); + return null; + } + + return stream; + } + }; + + registerUriForScheme(httpScheme, handler, authority); + registerUriForScheme(httpsScheme, handler, authority); + if (!customScheme.equals(httpScheme) && !customScheme.equals(httpsScheme)) { + registerUriForScheme(customScheme, handler, authority); + } + + } + + private void registerUriForScheme(String scheme, PathHandler handler, String authority) { + Uri.Builder uriBuilder = new Uri.Builder(); + uriBuilder.scheme(scheme); + uriBuilder.authority(authority); + uriBuilder.path(""); + Uri uriPrefix = uriBuilder.build(); + + register(Uri.withAppendedPath(uriPrefix, "/"), handler); + register(Uri.withAppendedPath(uriPrefix, "**"), handler); + } + + /** + * Hosts the application's resources on an http(s):// URL. Resources + * http(s)://{uuid}.androidplatform.net/res/{resource_type}/{resource_name}. + * + * @return prefixes under which the resources are hosted. + */ + public AssetHostingDetails hostResources() { + return hostResources(authority, "/res", true, true); + } + + /** + * Hosts the application's resources on an http(s):// URL. Resources + * http(s)://{uuid}.androidplatform.net/{virtualResourcesPath}/{resource_type}/{resource_name}. + * + * @param virtualResourcesPath the path on the local server under which the resources + * should be hosted. + * @param enableHttp whether to enable hosting using the http scheme. + * @param enableHttps whether to enable hosting using the https scheme. + * @return prefixes under which the resources are hosted. + */ + public AssetHostingDetails hostResources(final String virtualResourcesPath, boolean enableHttp, + boolean enableHttps) { + return hostResources(authority, virtualResourcesPath, enableHttp, enableHttps); + } + + /** + * Hosts the application's resources on an http(s):// URL. Resources + * http(s)://{domain}/{virtualResourcesPath}/{resource_type}/{resource_name}. + * + * @param domain custom domain on which the assets should be hosted (for example "example.com"). + * If untrusted content is to be loaded into the WebView it is advised to make + * this random. + * @param virtualResourcesPath the path on the local server under which the resources + * should be hosted. + * @param enableHttp whether to enable hosting using the http scheme. + * @param enableHttps whether to enable hosting using the https scheme. + * @return prefixes under which the resources are hosted. + */ + public AssetHostingDetails hostResources(final String domain, + final String virtualResourcesPath, boolean enableHttp, + boolean enableHttps) { + if (virtualResourcesPath.indexOf('*') != -1) { + throw new IllegalArgumentException( + "virtualResourcesPath cannot contain the '*' character."); + } + + Uri.Builder uriBuilder = new Uri.Builder(); + uriBuilder.scheme(httpScheme); + uriBuilder.authority(domain); + uriBuilder.path(virtualResourcesPath); + + Uri httpPrefix = null; + Uri httpsPrefix = null; + + PathHandler handler = new PathHandler() { + @Override + public InputStream handle(Uri url) { + InputStream stream = protocolHandler.openResource(url); + String mimeType = null; + try { + mimeType = URLConnection.guessContentTypeFromStream(stream); + } catch (Exception ex) { + Log.e(TAG, "Unable to get mime type" + url); + } + + return stream; + } + }; + + if (enableHttp) { + httpPrefix = uriBuilder.build(); + register(Uri.withAppendedPath(httpPrefix, "**"), handler); + } + if (enableHttps) { + uriBuilder.scheme(httpsScheme); + httpsPrefix = uriBuilder.build(); + register(Uri.withAppendedPath(httpsPrefix, "**"), handler); + } + return new AssetHostingDetails(httpPrefix, httpsPrefix); + } + + + /** + * Hosts the application's files on an http(s):// URL. Files from the basePath + * basePath/... will be available under + * http(s)://{uuid}.androidplatform.net/.... + * + * @param basePath the local path in the application's data folder which will be made + * available by the server (for example "/www"). + */ + public void hostFiles(final String basePath) { + this.isAsset = false; + this.basePath = basePath; + createHostingDetails(); + } + + /** + * The KitKat WebView reads the InputStream on a separate threadpool. We can use that to + * parallelize loading. + */ + private static abstract class LazyInputStream extends InputStream { + protected final PathHandler handler; + private InputStream is = null; + + public LazyInputStream(PathHandler handler) { + this.handler = handler; + } + + private InputStream getInputStream() { + if (is == null) { + is = handle(); + } + return is; + } + + protected abstract InputStream handle(); + + @Override + public int available() throws IOException { + InputStream is = getInputStream(); + return (is != null) ? is.available() : 0; + } + + @Override + public int read() throws IOException { + InputStream is = getInputStream(); + return (is != null) ? is.read() : -1; + } + + @Override + public int read(byte b[]) throws IOException { + InputStream is = getInputStream(); + return (is != null) ? is.read(b) : -1; + } + + @Override + public int read(byte b[], int off, int len) throws IOException { + InputStream is = getInputStream(); + return (is != null) ? is.read(b, off, len) : -1; + } + + @Override + public long skip(long n) throws IOException { + InputStream is = getInputStream(); + return (is != null) ? is.skip(n) : 0; + } + } + + // For L and above. + private static class LollipopLazyInputStream extends LazyInputStream { + private Uri uri; + private InputStream is; + + public LollipopLazyInputStream(PathHandler handler, Uri uri) { + super(handler); + this.uri = uri; + } + + @Override + protected InputStream handle() { + return handler.handle(uri); + } + } + + public String getBasePath(){ + return this.basePath; + } +} diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKProcessPoolFactory.h b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKProcessPoolFactory.h new file mode 100644 index 000000000..f4f8816e0 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKProcessPoolFactory.h @@ -0,0 +1,27 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVWKProcessPoolFactory : NSObject +@property (nonatomic, retain) WKProcessPool* sharedPool; + ++(instancetype) sharedFactory; +-(WKProcessPool*) sharedProcessPool; +@end diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKProcessPoolFactory.m b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKProcessPoolFactory.m new file mode 100644 index 000000000..48ac09e66 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKProcessPoolFactory.m @@ -0,0 +1,49 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import "CDVWKProcessPoolFactory.h" + +static CDVWKProcessPoolFactory *factory = nil; + +@implementation CDVWKProcessPoolFactory + ++ (instancetype)sharedFactory +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + factory = [[CDVWKProcessPoolFactory alloc] init]; + }); + + return factory; +} + +- (instancetype)init +{ + if (self = [super init]) { + _sharedPool = [[WKProcessPool alloc] init]; + } + return self; +} + +- (WKProcessPool*) sharedProcessPool { + return _sharedPool; +} +@end diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewEngine.h b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewEngine.h new file mode 100644 index 000000000..9dd7b24c4 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewEngine.h @@ -0,0 +1,31 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface CDVWKWebViewEngine : CDVPlugin + +@property (nonatomic, strong, readonly) id uiDelegate; +@property (nonatomic, strong) NSString * basePath; + +-(void)setServerBasePath:(CDVInvokedUrlCommand*)command; +-(void)getServerBasePath:(CDVInvokedUrlCommand*)command; + +@end diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewEngine.m b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewEngine.m new file mode 100644 index 000000000..d6b24084e --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewEngine.m @@ -0,0 +1,825 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import +#import +#import + +#import "CDVWKWebViewEngine.h" +#import "CDVWKWebViewUIDelegate.h" +#import "CDVWKProcessPoolFactory.h" +#import "IONAssetHandler.h" + +#define CDV_BRIDGE_NAME @"cordova" +#define CDV_IONIC_STOP_SCROLL @"stopScroll" +#define CDV_SERVER_PATH @"serverBasePath" +#define LAST_BINARY_VERSION_CODE @"lastBinaryVersionCode" +#define LAST_BINARY_VERSION_NAME @"lastBinaryVersionName" + +@implementation UIScrollView (BugIOS11) + ++ (void)load { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + Class class = [self class]; + SEL originalSelector = @selector(init); + SEL swizzledSelector = @selector(xxx_init); + + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); + + BOOL didAddMethod = + class_addMethod(class, + originalSelector, + method_getImplementation(swizzledMethod), + method_getTypeEncoding(swizzledMethod)); + + if (didAddMethod) { + class_replaceMethod(class, + swizzledSelector, + method_getImplementation(originalMethod), + method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, swizzledMethod); + } + }); +} + +#pragma mark - Method Swizzling + +- (id)xxx_init { + id a = [self xxx_init]; + NSArray *stack = [NSThread callStackSymbols]; + for(NSString *trace in stack) { + if([trace containsString:@"WebKit"]) { + [a setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever]; + break; + } + } + return a; +} + +@end + + +@interface CDVWKWeakScriptMessageHandler : NSObject + +@property (nonatomic, weak, readonly) idscriptMessageHandler; + +- (instancetype)initWithScriptMessageHandler:(id)scriptMessageHandler; + +@end + + +@interface CDVWKWebViewEngine () + +@property (nonatomic, strong, readwrite) UIView* engineWebView; +@property (nonatomic, strong, readwrite) id uiDelegate; +@property (nonatomic, weak) id weakScriptMessageHandler; +@property (nonatomic, readwrite) CGRect frame; +@property (nonatomic, strong) NSString *userAgentCreds; +@property (nonatomic, strong) IONAssetHandler * handler; + +@property (nonatomic, readwrite) NSString *CDV_LOCAL_SERVER; +@end + +// expose private configuration value required for background operation +@interface WKWebViewConfiguration () + +@end + + +// see forwardingTargetForSelector: selector comment for the reason for this pragma +#pragma clang diagnostic ignored "-Wprotocol" + +@implementation CDVWKWebViewEngine + +@synthesize engineWebView = _engineWebView; + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super init]; + if (self) { + if (NSClassFromString(@"WKWebView") == nil) { + return nil; + } + // add to keyWindow to ensure it is 'active' + [UIApplication.sharedApplication.keyWindow addSubview:self.engineWebView]; + + self.frame = frame; + } + return self; +} + +-(NSString *) getStartPath { + NSString * wwwPath = [[NSBundle mainBundle] pathForResource:@"www" ofType: nil]; + + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; + NSString * persistedPath = [userDefaults objectForKey:CDV_SERVER_PATH]; + if (![self isDeployDisabled] && ![self isNewBinary] && persistedPath && ![persistedPath isEqualToString:@""]) { + NSString *libPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + NSString * cordovaDataDirectory = [libPath stringByAppendingPathComponent:@"NoCloud"]; + NSString * snapshots = [cordovaDataDirectory stringByAppendingPathComponent:@"ionic_built_snapshots"]; + wwwPath = [snapshots stringByAppendingPathComponent:[persistedPath lastPathComponent]]; + } + self.basePath = wwwPath; + return wwwPath; +} + +-(BOOL) isNewBinary +{ + NSString * versionCode = [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"]; + NSString * versionName = [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"]; + NSUserDefaults * prefs = [NSUserDefaults standardUserDefaults]; + NSString * lastVersionCode = [prefs stringForKey:LAST_BINARY_VERSION_CODE]; + NSString * lastVersionName = [prefs stringForKey:LAST_BINARY_VERSION_NAME]; + if (![versionCode isEqualToString:lastVersionCode] || ![versionName isEqualToString:lastVersionName]) { + [prefs setObject:versionCode forKey:LAST_BINARY_VERSION_CODE]; + [prefs setObject:versionName forKey:LAST_BINARY_VERSION_NAME]; + [prefs setObject:@"" forKey:CDV_SERVER_PATH]; + [prefs synchronize]; + return YES; + } + return NO; +} + +-(BOOL) isDeployDisabled { + return [[self.commandDelegate.settings objectForKey:[@"DisableDeploy" lowercaseString]] boolValue]; +} + +- (WKWebViewConfiguration*) createConfigurationFromSettings:(NSDictionary*)settings +{ + WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init]; + configuration.processPool = [[CDVWKProcessPoolFactory sharedFactory] sharedProcessPool]; + configuration.mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeNone; + + if (settings == nil) { + return configuration; + } + + if(![settings cordovaBoolSettingForKey:@"WKSuspendInBackground" defaultValue:YES]){ + NSString* _BGStatus; + if (@available(iOS 12.2, *)) { + // do stuff for iOS 12.2 and newer + NSLog(@"iOS 12.2+ detected"); + NSString* str = @"YWx3YXlzUnVuc0F0Rm9yZWdyb3VuZFByaW9yaXR5"; + NSData* data = [[NSData alloc] initWithBase64EncodedString:str options:0]; + _BGStatus = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + } else { + // do stuff for iOS 12.1 and older + NSLog(@"iOS Below 12.2 detected"); + NSString* str = @"X2Fsd2F5c1J1bnNBdEZvcmVncm91bmRQcmlvcml0eQ=="; + NSData* data = [[NSData alloc] initWithBase64EncodedString:str options:0]; + _BGStatus = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + } + [configuration setValue:[NSNumber numberWithBool:YES] + forKey:_BGStatus]; + } + NSString *userAgent = configuration.applicationNameForUserAgent; + if ( + [settings cordovaSettingForKey:@"OverrideUserAgent"] == nil && + [settings cordovaSettingForKey:@"AppendUserAgent"] != nil + ) { + userAgent = [NSString stringWithFormat:@"%@ %@", userAgent, [settings cordovaSettingForKey:@"AppendUserAgent"]]; + } + configuration.applicationNameForUserAgent = userAgent; + configuration.allowsInlineMediaPlayback = [settings cordovaBoolSettingForKey:@"AllowInlineMediaPlayback" defaultValue:YES]; + configuration.suppressesIncrementalRendering = [settings cordovaBoolSettingForKey:@"SuppressesIncrementalRendering" defaultValue:NO]; + configuration.allowsAirPlayForMediaPlayback = [settings cordovaBoolSettingForKey:@"MediaPlaybackAllowsAirPlay" defaultValue:YES]; + return configuration; +} + +- (void)pluginInitialize +{ + // viewController would be available now. we attempt to set all possible delegates to it, by default + NSDictionary* settings = self.commandDelegate.settings; + NSString *bind = [settings cordovaSettingForKey:@"Hostname"]; + if(bind == nil){ + bind = @"localhost"; + } + NSString *scheme = [settings cordovaSettingForKey:@"iosScheme"]; + if(scheme == nil || [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [scheme isEqualToString:@"file"]){ + scheme = @"ionic"; + } + self.CDV_LOCAL_SERVER = [NSString stringWithFormat:@"%@://%@", scheme, bind]; + + self.uiDelegate = [[CDVWKWebViewUIDelegate alloc] initWithTitle:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]]; + + CDVWKWeakScriptMessageHandler *weakScriptMessageHandler = [[CDVWKWeakScriptMessageHandler alloc] initWithScriptMessageHandler:self]; + + WKUserContentController* userContentController = [[WKUserContentController alloc] init]; + [userContentController addScriptMessageHandler:weakScriptMessageHandler name:CDV_BRIDGE_NAME]; + [userContentController addScriptMessageHandler:weakScriptMessageHandler name:CDV_IONIC_STOP_SCROLL]; + + // Inject XHR Polyfill + NSLog(@"CDVWKWebViewEngine: trying to inject XHR polyfill"); + WKUserScript *wkScript = [self wkPluginScript]; + if (wkScript) { + [userContentController addUserScript:wkScript]; + } + + WKUserScript *configScript = [self configScript]; + if (configScript) { + [userContentController addUserScript:configScript]; + } + + BOOL autoCordova = [settings cordovaBoolSettingForKey:@"AutoInjectCordova" defaultValue:NO]; + if (autoCordova){ + NSLog(@"CDVWKWebViewEngine: trying to inject XHR polyfill"); + WKUserScript *cordova = [self autoCordovify]; + if (cordova) { + [userContentController addUserScript:cordova]; + } + } + + BOOL audioCanMix = [settings cordovaBoolSettingForKey:@"AudioCanMix" defaultValue:NO]; + if (audioCanMix) { + [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord + withOptions:AVAudioSessionCategoryOptionMixWithOthers + error:nil]; + } + + WKWebViewConfiguration* configuration = [self createConfigurationFromSettings:settings]; + configuration.userContentController = userContentController; + + self.handler = [[IONAssetHandler alloc] initWithBasePath:[self getStartPath] andScheme:scheme]; + [configuration setURLSchemeHandler:self.handler forURLScheme:scheme]; + + // re-create WKWebView, since we need to update configuration + // remove from keyWindow before recreating + [self.engineWebView removeFromSuperview]; + WKWebView* wkWebView = [[WKWebView alloc] initWithFrame:self.frame configuration:configuration]; + + [wkWebView.scrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever]; + + wkWebView.UIDelegate = self.uiDelegate; + self.engineWebView = wkWebView; + // add to keyWindow to ensure it is 'active' + [UIApplication.sharedApplication.keyWindow addSubview:self.engineWebView]; + + NSString * overrideUserAgent = [settings cordovaSettingForKey:@"OverrideUserAgent"]; + if (overrideUserAgent != nil) { + wkWebView.customUserAgent = overrideUserAgent; + } + + if ([self.viewController conformsToProtocol:@protocol(WKUIDelegate)]) { + wkWebView.UIDelegate = (id )self.viewController; + } + + if ([self.viewController conformsToProtocol:@protocol(WKNavigationDelegate)]) { + wkWebView.navigationDelegate = (id )self.viewController; + } else { + wkWebView.navigationDelegate = (id )self; + } + + if ([self.viewController conformsToProtocol:@protocol(WKScriptMessageHandler)]) { + [wkWebView.configuration.userContentController addScriptMessageHandler:(id < WKScriptMessageHandler >)self.viewController name:CDV_BRIDGE_NAME]; + } + + [self keyboardDisplayDoesNotRequireUserAction]; + + if ([settings cordovaBoolSettingForKey:@"KeyboardAppearanceDark" defaultValue:NO]) { + [self setKeyboardAppearanceDark]; + } + + [self updateSettings:settings]; + + // check if content thread has died on resume + NSLog(@"%@", @"CDVWKWebViewEngine will reload WKWebView if required on resume"); + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(onAppWillEnterForeground:) + name:UIApplicationWillEnterForegroundNotification object:nil]; + + // If less than ios 13.4 + if (@available(iOS 13.4, *)) {} else { + // For keyboard dismissal leaving viewport shifted (can potentially be removed when apple releases the fix for the issue discussed here: https://github.com/apache/cordova-ios/issues/417#issuecomment-423340885) + // Apple has released a fix in 13.4, but not in 12.x (as of 12.4.6) + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(keyboardWillHide) + name:UIKeyboardWillHideNotification object:nil]; + } + + NSLog(@"Using Ionic WKWebView"); + +} + +// https://github.com/Telerik-Verified-Plugins/WKWebView/commit/04e8296adeb61f289f9c698045c19b62d080c7e3#L609-L620 +- (void) keyboardDisplayDoesNotRequireUserAction { + Class class = NSClassFromString(@"WKContentView"); + NSOperatingSystemVersion iOS_11_3_0 = (NSOperatingSystemVersion){11, 3, 0}; + NSOperatingSystemVersion iOS_12_2_0 = (NSOperatingSystemVersion){12, 2, 0}; + NSOperatingSystemVersion iOS_13_0_0 = (NSOperatingSystemVersion){13, 0, 0}; + char * methodSignature = "_startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:"; + + if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion: iOS_13_0_0]) { + methodSignature = "_elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:"; + } else if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion: iOS_12_2_0]) { + methodSignature = "_elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:"; + } + + if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion: iOS_11_3_0]) { + SEL selector = sel_getUid(methodSignature); + Method method = class_getInstanceMethod(class, selector); + IMP original = method_getImplementation(method); + IMP override = imp_implementationWithBlock(^void(id me, void* arg0, BOOL arg1, BOOL arg2, BOOL arg3, id arg4) { + ((void (*)(id, SEL, void*, BOOL, BOOL, BOOL, id))original)(me, selector, arg0, TRUE, arg2, arg3, arg4); + }); + method_setImplementation(method, override); + } else { + SEL selector = sel_getUid("_startAssistingNode:userIsInteracting:blurPreviousNode:userObject:"); + Method method = class_getInstanceMethod(class, selector); + IMP original = method_getImplementation(method); + IMP override = imp_implementationWithBlock(^void(id me, void* arg0, BOOL arg1, BOOL arg2, id arg3) { + ((void (*)(id, SEL, void*, BOOL, BOOL, id))original)(me, selector, arg0, TRUE, arg2, arg3); + }); + method_setImplementation(method, override); + } +} + +- (void)setKeyboardAppearanceDark +{ + IMP darkImp = imp_implementationWithBlock(^(id _s) { + return UIKeyboardAppearanceDark; + }); + for (NSString* classString in @[@"WKContentView", @"UITextInputTraits"]) { + Class c = NSClassFromString(classString); + Method m = class_getInstanceMethod(c, @selector(keyboardAppearance)); + if (m != NULL) { + method_setImplementation(m, darkImp); + } else { + class_addMethod(c, @selector(keyboardAppearance), darkImp, "l@:"); + } + } +} + + + +- (void)onAppWillEnterForeground:(NSNotification *)notification { + if ([self shouldReloadWebView]) { + NSLog(@"%@", @"CDVWKWebViewEngine reloading!"); + [(WKWebView*)_engineWebView reload]; + } +} + + +-(void)keyboardWillHide +{ + // For keyboard dismissal leaving viewport shifted (can potentially be removed when apple releases the fix for the issue discussed here: https://github.com/apache/cordova-ios/issues/417#issuecomment-423340885) + UIScrollView * scrollView = self.webView.scrollView; + // Calculate some vars for convenience + CGFloat contentLengthWithInsets = scrollView.contentSize.height + scrollView.adjustedContentInset.top + scrollView.adjustedContentInset.bottom; + CGFloat contentOffsetY = scrollView.contentOffset.y; + CGFloat screenHeight = scrollView.frame.size.height; + CGFloat maxAllowedOffsetY = fmax(contentLengthWithInsets - screenHeight, 0); // 0 is for the case where content is shorter than screen + + // If the keyboard allowed the user to get to an offset beyond the max + if (contentOffsetY > maxAllowedOffsetY) { + // Reset the scroll to the max allowed so that there is no additional empty white space at the bottom where the keyboard occupied! + CGPoint bottomOfPage = CGPointMake(scrollView.contentOffset.x, maxAllowedOffsetY); + [scrollView setContentOffset:bottomOfPage]; + } +} + +- (BOOL)shouldReloadWebView +{ + WKWebView* wkWebView = (WKWebView*)_engineWebView; + return [self shouldReloadWebView:wkWebView.URL title:wkWebView.title]; +} + +- (BOOL)shouldReloadWebView:(NSURL *)location title:(NSString*)title +{ + BOOL title_is_nil = (title == nil); + BOOL location_is_blank = [[location absoluteString] isEqualToString:@"about:blank"]; + + BOOL reload = (title_is_nil || location_is_blank); + +#ifdef DEBUG + NSLog(@"%@", @"CDVWKWebViewEngine shouldReloadWebView::"); + NSLog(@"CDVWKWebViewEngine shouldReloadWebView title: %@", title); + NSLog(@"CDVWKWebViewEngine shouldReloadWebView location: %@", [location absoluteString]); + NSLog(@"CDVWKWebViewEngine shouldReloadWebView reload: %u", reload); +#endif + + return reload; +} + + +- (id)loadRequest:(NSURLRequest *)request +{ + if (request.URL.fileURL) { + NSURL* startURL = [NSURL URLWithString:((CDVViewController *)self.viewController).startPage]; + NSString* startFilePath = [self.commandDelegate pathForResource:[startURL path]]; + NSURL *url = [[NSURL URLWithString:self.CDV_LOCAL_SERVER] URLByAppendingPathComponent:request.URL.path]; + if ([request.URL.path isEqualToString:startFilePath]) { + url = [NSURL URLWithString:self.CDV_LOCAL_SERVER]; + } + if(request.URL.query) { + url = [NSURL URLWithString:[@"?" stringByAppendingString:request.URL.query] relativeToURL:url]; + } + if(request.URL.fragment) { + url = [NSURL URLWithString:[@"#" stringByAppendingString:request.URL.fragment] relativeToURL:url]; + } + request = [NSURLRequest requestWithURL:url]; + } + return [(WKWebView*)_engineWebView loadRequest:request]; +} + +- (id)loadHTMLString:(NSString *)string baseURL:(NSURL*)baseURL +{ + return [(WKWebView*)_engineWebView loadHTMLString:string baseURL:baseURL]; +} + +- (NSURL*) URL +{ + return [(WKWebView*)_engineWebView URL]; +} + +- (BOOL)canLoadRequest:(NSURLRequest *)request +{ + return TRUE; +} + +- (void)updateSettings:(NSDictionary *)settings +{ + WKWebView* wkWebView = (WKWebView *)_engineWebView; + + // By default, DisallowOverscroll is false (thus bounce is allowed) + BOOL bounceAllowed = !([settings cordovaBoolSettingForKey:@"DisallowOverscroll" defaultValue:NO]); + + // prevent webView from bouncing + if (!bounceAllowed) { + if ([wkWebView respondsToSelector:@selector(scrollView)]) { + ((UIScrollView*)[wkWebView scrollView]).bounces = NO; + } else { + for (id subview in wkWebView.subviews) { + if ([[subview class] isSubclassOfClass:[UIScrollView class]]) { + ((UIScrollView*)subview).bounces = NO; + } + } + } + } + + wkWebView.configuration.preferences.minimumFontSize = [settings cordovaFloatSettingForKey:@"MinimumFontSize" defaultValue:0.0]; + wkWebView.allowsLinkPreview = [settings cordovaBoolSettingForKey:@"AllowLinkPreview" defaultValue:NO]; + wkWebView.scrollView.scrollEnabled = [settings cordovaBoolSettingForKey:@"ScrollEnabled" defaultValue:NO]; + wkWebView.allowsBackForwardNavigationGestures = [settings cordovaBoolSettingForKey:@"AllowBackForwardNavigationGestures" defaultValue:NO]; +} + +- (void)updateWithInfo:(NSDictionary *)info +{ + NSDictionary* scriptMessageHandlers = [info objectForKey:kCDVWebViewEngineScriptMessageHandlers]; + NSDictionary* settings = [info objectForKey:kCDVWebViewEngineWebViewPreferences]; + id navigationDelegate = [info objectForKey:kCDVWebViewEngineWKNavigationDelegate]; + id uiDelegate = [info objectForKey:kCDVWebViewEngineWKUIDelegate]; + + WKWebView* wkWebView = (WKWebView*)_engineWebView; + + if (scriptMessageHandlers && [scriptMessageHandlers isKindOfClass:[NSDictionary class]]) { + NSArray* allKeys = [scriptMessageHandlers allKeys]; + + for (NSString* key in allKeys) { + id object = [scriptMessageHandlers objectForKey:key]; + if ([object conformsToProtocol:@protocol(WKScriptMessageHandler)]) { + [wkWebView.configuration.userContentController addScriptMessageHandler:object name:key]; + } + } + } + + if (navigationDelegate && [navigationDelegate conformsToProtocol:@protocol(WKNavigationDelegate)]) { + wkWebView.navigationDelegate = navigationDelegate; + } + + if (uiDelegate && [uiDelegate conformsToProtocol:@protocol(WKUIDelegate)]) { + wkWebView.UIDelegate = uiDelegate; + } + + if (settings && [settings isKindOfClass:[NSDictionary class]]) { + [self updateSettings:settings]; + } +} + +// This forwards the methods that are in the header that are not implemented here. +// loadHTMLString:baseURL: +// loadRequest: +- (id)forwardingTargetForSelector:(SEL)aSelector +{ + return _engineWebView; +} + +- (UIView *)webView +{ + return self.engineWebView; +} + +- (WKUserScript *)wkPluginScript +{ + NSString *scriptFile = [[NSBundle mainBundle] pathForResource:@"www/wk-plugin" ofType:@"js"]; + if (scriptFile == nil) { + NSLog(@"CDVWKWebViewEngine: WK plugin was not found"); + return nil; + } + NSError *error = nil; + NSString *source = [NSString stringWithContentsOfFile:scriptFile encoding:NSUTF8StringEncoding error:&error]; + if (source == nil || error != nil) { + NSLog(@"CDVWKWebViewEngine: WK plugin can not be loaded: %@", error); + return nil; + } + source = [source stringByAppendingString:[NSString stringWithFormat:@"window.WEBVIEW_SERVER_URL = '%@';", self.CDV_LOCAL_SERVER]]; + + return [[WKUserScript alloc] initWithSource:source + injectionTime:WKUserScriptInjectionTimeAtDocumentStart + forMainFrameOnly:YES]; +} + +- (WKUserScript *)configScript +{ + Class keyboard = NSClassFromString(@"CDVIonicKeyboard"); + BOOL keyboardPlugin = keyboard != nil; + if(!keyboardPlugin) { + return nil; + } + + BOOL keyboardResizes = [self.commandDelegate.settings cordovaBoolSettingForKey:@"KeyboardResize" defaultValue:YES]; + NSString *source = [NSString stringWithFormat: + @"window.Ionic = window.Ionic || {};" + @"window.Ionic.keyboardPlugin=true;" + @"window.Ionic.keyboardResizes=%@", + keyboardResizes ? @"true" : @"false"]; + + return [[WKUserScript alloc] initWithSource:source + injectionTime:WKUserScriptInjectionTimeAtDocumentStart + forMainFrameOnly:YES]; +} + +- (WKUserScript *)autoCordovify +{ + NSURL *cordovaURL = [[NSBundle mainBundle] URLForResource:@"www/cordova" withExtension:@"js"]; + if (cordovaURL == nil) { + NSLog(@"CDVWKWebViewEngine: cordova.js WAS NOT FOUND"); + return nil; + } + NSError *error = nil; + NSString *source = [NSString stringWithContentsOfURL:cordovaURL encoding:NSUTF8StringEncoding error:&error]; + if (source == nil || error != nil) { + NSLog(@"CDVWKWebViewEngine: cordova.js can not be loaded: %@", error); + return nil; + } + NSLog(@"CDVWKWebViewEngine: auto injecting cordova"); + NSString *cordovaPath = [self.CDV_LOCAL_SERVER stringByAppendingString:cordovaURL.URLByDeletingLastPathComponent.path]; + NSString *replacement = [NSString stringWithFormat:@"var pathPrefix = '%@/';", cordovaPath]; + source = [source stringByReplacingOccurrencesOfString:@"var pathPrefix = findCordovaPath();" withString:replacement]; + + return [[WKUserScript alloc] initWithSource:source + injectionTime:WKUserScriptInjectionTimeAtDocumentStart + forMainFrameOnly:YES]; +} + +#pragma mark WKScriptMessageHandler implementation + +- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message +{ + if ([message.name isEqualToString:CDV_BRIDGE_NAME]) { + [self handleCordovaMessage: message]; + } else if ([message.name isEqualToString:CDV_IONIC_STOP_SCROLL]) { + [self handleStopScroll]; + } +} + +- (void)handleCordovaMessage:(WKScriptMessage*)message +{ + CDVViewController *vc = (CDVViewController*)self.viewController; + + NSArray *jsonEntry = message.body; // NSString:callbackId, NSString:service, NSString:action, NSArray:args + CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry]; + CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName); + + if (![vc.commandQueue execute:command]) { +#ifdef DEBUG + NSError* error = nil; + NSString* commandJson = nil; + NSData* jsonData = [NSJSONSerialization dataWithJSONObject:jsonEntry + options:0 + error:&error]; + + if (error == nil) { + commandJson = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + } + + static NSUInteger maxLogLength = 1024; + NSString* commandString = ([commandJson length] > maxLogLength) ? + [NSString stringWithFormat : @"%@[...]", [commandJson substringToIndex:maxLogLength]] : + commandJson; + + NSLog(@"FAILED pluginJSON = %@", commandString); +#endif + } +} + +- (void)handleStopScroll +{ + WKWebView* wkWebView = (WKWebView*)_engineWebView; + NSLog(@"CDVWKWebViewEngine: handleStopScroll"); + [self recursiveStopScroll:[wkWebView scrollView]]; + [wkWebView evaluateJavaScript:@"window.IonicStopScroll.fire()" completionHandler:nil]; +} + +- (void)recursiveStopScroll:(UIView *)node +{ + if([node isKindOfClass: [UIScrollView class]]) { + UIScrollView *nodeAsScroll = (UIScrollView *)node; + + if([nodeAsScroll isScrollEnabled] && ![nodeAsScroll isHidden]) { + [nodeAsScroll setScrollEnabled: NO]; + [nodeAsScroll setScrollEnabled: YES]; + } + } + + // iterate tree recursivelly + for (UIView *child in [node subviews]) { + [self recursiveStopScroll:child]; + } +} + + +#pragma mark WKNavigationDelegate implementation + +- (void)webView:(WKWebView*)webView didStartProvisionalNavigation:(WKNavigation*)navigation +{ + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginResetNotification object:webView]]; +} + +- (void)webView:(WKWebView*)webView didFinishNavigation:(WKNavigation*)navigation +{ + #ifndef __CORDOVA_6_0_0 + CDVViewController* vc = (CDVViewController*)self.viewController; + [CDVUserAgentUtil releaseLock:vc.userAgentLockToken]; + #endif + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPageDidLoadNotification object:webView]]; +} + +- (void)webView:(WKWebView*)theWebView didFailProvisionalNavigation:(WKNavigation*)navigation withError:(NSError*)error +{ + [self webView:theWebView didFailNavigation:navigation withError:error]; +} + +- (void)webView:(WKWebView*)theWebView didFailNavigation:(WKNavigation*)navigation withError:(NSError*)error +{ + CDVViewController* vc = (CDVViewController*)self.viewController; + #ifndef __CORDOVA_6_0_0 + [CDVUserAgentUtil releaseLock:vc.userAgentLockToken]; + #endif + + NSString* message = [NSString stringWithFormat:@"Failed to load webpage with error: %@", [error localizedDescription]]; + NSLog(@"%@", message); + + NSURL* errorUrl = vc.errorURL; + if (errorUrl) { + NSCharacterSet *charSet = [NSCharacterSet URLFragmentAllowedCharacterSet]; + errorUrl = [NSURL URLWithString:[NSString stringWithFormat:@"?error=%@", [message stringByAddingPercentEncodingWithAllowedCharacters:charSet]] relativeToURL:errorUrl]; + NSLog(@"%@", [errorUrl absoluteString]); + [theWebView loadRequest:[NSURLRequest requestWithURL:errorUrl]]; + } +#ifdef DEBUG + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] message:message preferredStyle:UIAlertControllerStyleAlert]; + [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil) style:UIAlertActionStyleDefault handler:nil]]; + [vc presentViewController:alertController animated:YES completion:nil]; +#endif +} + +- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView +{ + [webView reload]; +} + +- (BOOL)defaultResourcePolicyForURL:(NSURL*)url +{ + // all file:// urls are allowed + if ([url isFileURL]) { + return YES; + } + + return NO; +} + +- (void) webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler +{ + NSURL* url = [navigationAction.request URL]; + CDVViewController* vc = (CDVViewController*)self.viewController; + + /* + * Give plugins the chance to handle the url + */ + BOOL anyPluginsResponded = NO; + BOOL shouldAllowRequest = NO; + + for (NSString* pluginName in vc.pluginObjects) { + CDVPlugin* plugin = [vc.pluginObjects objectForKey:pluginName]; + SEL selector = NSSelectorFromString(@"shouldOverrideLoadWithRequest:navigationType:"); + if ([plugin respondsToSelector:selector]) { + anyPluginsResponded = YES; + // https://issues.apache.org/jira/browse/CB-12497 + int navType = (int)navigationAction.navigationType; + if (WKNavigationTypeOther == navigationAction.navigationType) { + #ifdef __CORDOVA_6_0_0 + navType = -1; + #else + navType = 5; + #endif + } + shouldAllowRequest = (((BOOL (*)(id, SEL, id, int))objc_msgSend)(plugin, selector, navigationAction.request, navType)); + if (!shouldAllowRequest) { + break; + } + } + } + + if (!anyPluginsResponded) { + /* + * Handle all other types of urls (tel:, sms:), and requests to load a url in the main webview. + */ + shouldAllowRequest = [self defaultResourcePolicyForURL:url]; + if (!shouldAllowRequest) { + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; + } + } + + if (shouldAllowRequest) { + NSString *scheme = url.scheme; + if ([scheme isEqualToString:@"tel"] || + [scheme isEqualToString:@"mailto"] || + [scheme isEqualToString:@"facetime"] || + [scheme isEqualToString:@"sms"] || + [scheme isEqualToString:@"maps"]) { + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; + decisionHandler(WKNavigationActionPolicyCancel); + } else { + decisionHandler(WKNavigationActionPolicyAllow); + } + } else { + decisionHandler(WKNavigationActionPolicyCancel); + } +} + +-(void)getServerBasePath:(CDVInvokedUrlCommand*)command +{ + [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:self.basePath] callbackId:command.callbackId]; +} + +-(void)setServerBasePath:(CDVInvokedUrlCommand*)command +{ + NSString * path = [command argumentAtIndex:0]; + self.basePath = path; + [self.handler setAssetPath:path]; + + NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.CDV_LOCAL_SERVER]]; + [(WKWebView*)_engineWebView loadRequest:request]; +} + +-(void)persistServerBasePath:(CDVInvokedUrlCommand*)command +{ + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; + [userDefaults setObject:[self.basePath lastPathComponent] forKey:CDV_SERVER_PATH]; + [userDefaults synchronize]; +} + +@end + +#pragma mark - CDVWKWeakScriptMessageHandler + +@implementation CDVWKWeakScriptMessageHandler + +- (instancetype)initWithScriptMessageHandler:(id)scriptMessageHandler +{ + self = [super init]; + if (self) { + _scriptMessageHandler = scriptMessageHandler; + } + return self; +} + +- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message +{ + [self.scriptMessageHandler userContentController:userContentController didReceiveScriptMessage:message]; +} + +@end diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewUIDelegate.h b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewUIDelegate.h new file mode 100644 index 000000000..33a179b0c --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewUIDelegate.h @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVWKWebViewUIDelegate : NSObject + +@property (nonatomic, copy) NSString* title; + +- (instancetype)initWithTitle:(NSString*)title; + +@end diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewUIDelegate.m b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewUIDelegate.m new file mode 100644 index 000000000..a7a16f2c6 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/CDVWKWebViewUIDelegate.m @@ -0,0 +1,123 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVWKWebViewUIDelegate.h" + +@implementation CDVWKWebViewUIDelegate + +- (instancetype)initWithTitle:(NSString*)title +{ + self = [super init]; + if (self) { + self.title = title; + } + + return self; +} + +- (void) webView:(WKWebView*)webView runJavaScriptAlertPanelWithMessage:(NSString*)message + initiatedByFrame:(WKFrameInfo*)frame completionHandler:(void (^)(void))completionHandler +{ + UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title + message:message + preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK") + style:UIAlertActionStyleDefault + handler:^(UIAlertAction* action) + { + completionHandler(); + [alert dismissViewControllerAnimated:YES completion:nil]; + }]; + + [alert addAction:ok]; + + UIViewController* rootController = [UIApplication sharedApplication].delegate.window.rootViewController; + + [rootController presentViewController:alert animated:YES completion:nil]; +} + +- (void) webView:(WKWebView*)webView runJavaScriptConfirmPanelWithMessage:(NSString*)message + initiatedByFrame:(WKFrameInfo*)frame completionHandler:(void (^)(BOOL result))completionHandler +{ + UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title + message:message + preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK") + style:UIAlertActionStyleDefault + handler:^(UIAlertAction* action) + { + completionHandler(YES); + [alert dismissViewControllerAnimated:YES completion:nil]; + }]; + + [alert addAction:ok]; + + UIAlertAction* cancel = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel") + style:UIAlertActionStyleDefault + handler:^(UIAlertAction* action) + { + completionHandler(NO); + [alert dismissViewControllerAnimated:YES completion:nil]; + }]; + [alert addAction:cancel]; + + UIViewController* rootController = [UIApplication sharedApplication].delegate.window.rootViewController; + + [rootController presentViewController:alert animated:YES completion:nil]; +} + +- (void) webView:(WKWebView*)webView runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt + defaultText:(NSString*)defaultText initiatedByFrame:(WKFrameInfo*)frame + completionHandler:(void (^)(NSString* result))completionHandler +{ + UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title + message:prompt + preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK") + style:UIAlertActionStyleDefault + handler:^(UIAlertAction* action) + { + completionHandler(((UITextField*)alert.textFields[0]).text); + [alert dismissViewControllerAnimated:YES completion:nil]; + }]; + + [alert addAction:ok]; + + UIAlertAction* cancel = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel") + style:UIAlertActionStyleDefault + handler:^(UIAlertAction* action) + { + completionHandler(nil); + [alert dismissViewControllerAnimated:YES completion:nil]; + }]; + [alert addAction:cancel]; + + [alert addTextFieldWithConfigurationHandler:^(UITextField* textField) { + textField.text = defaultText; + }]; + + UIViewController* rootController = [UIApplication sharedApplication].delegate.window.rootViewController; + + [rootController presentViewController:alert animated:YES completion:nil]; +} + +@end diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/IONAssetHandler.h b/plugins/cordova-plugin-ionic-webview/src/ios/IONAssetHandler.h new file mode 100644 index 000000000..aee8d1c7f --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/IONAssetHandler.h @@ -0,0 +1,13 @@ +#import +#import + +@interface IONAssetHandler : NSObject + +@property (nonatomic, strong) NSString * basePath; +@property (nonatomic, strong) NSString * scheme; + +-(void)setAssetPath:(NSString *)assetPath; +- (instancetype)initWithBasePath:(NSString *)basePath andScheme:(NSString *)scheme; + + +@end diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/IONAssetHandler.m b/plugins/cordova-plugin-ionic-webview/src/ios/IONAssetHandler.m new file mode 100644 index 000000000..64cf5ec30 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/IONAssetHandler.m @@ -0,0 +1,92 @@ +#import "IONAssetHandler.h" +#import +#import "CDVWKWebViewEngine.h" + +@implementation IONAssetHandler + +-(void)setAssetPath:(NSString *)assetPath { + self.basePath = assetPath; +} + +- (instancetype)initWithBasePath:(NSString *)basePath andScheme:(NSString *)scheme { + self = [super init]; + if (self) { + _basePath = basePath; + _scheme = scheme; + } + return self; +} + +- (void)webView:(WKWebView *)webView startURLSchemeTask:(id )urlSchemeTask +{ + NSString * startPath = @""; + NSURL * url = urlSchemeTask.request.URL; + NSString * stringToLoad = url.path; + NSString * scheme = url.scheme; + + if ([scheme isEqualToString:self.scheme]) { + if ([stringToLoad hasPrefix:@"/_app_file_"]) { + startPath = [stringToLoad stringByReplacingOccurrencesOfString:@"/_app_file_" withString:@""]; + } else { + startPath = self.basePath ? self.basePath : @""; + if ([stringToLoad isEqualToString:@""] || [url.pathExtension isEqualToString:@""]) { + startPath = [startPath stringByAppendingString:@"/index.html"]; + } else { + startPath = [startPath stringByAppendingString:stringToLoad]; + } + } + } + NSError * fileError = nil; + NSData * data = nil; + if ([self isMediaExtension:url.pathExtension]) { + data = [NSData dataWithContentsOfFile:startPath options:NSDataReadingMappedIfSafe error:&fileError]; + } + if (!data || fileError) { + data = [[NSData alloc] initWithContentsOfFile:startPath]; + } + NSInteger statusCode = 200; + if (!data) { + statusCode = 404; + } + NSURL * localUrl = [NSURL URLWithString:url.absoluteString]; + NSString * mimeType = [self getMimeType:url.pathExtension]; + id response = nil; + if (data && [self isMediaExtension:url.pathExtension]) { + response = [[NSURLResponse alloc] initWithURL:localUrl MIMEType:mimeType expectedContentLength:data.length textEncodingName:nil]; + } else { + NSDictionary * headers = @{ @"Content-Type" : mimeType, @"Cache-Control": @"no-cache"}; + response = [[NSHTTPURLResponse alloc] initWithURL:localUrl statusCode:statusCode HTTPVersion:nil headerFields:headers]; + } + + [urlSchemeTask didReceiveResponse:response]; + [urlSchemeTask didReceiveData:data]; + [urlSchemeTask didFinish]; + +} + +- (void)webView:(nonnull WKWebView *)webView stopURLSchemeTask:(nonnull id)urlSchemeTask +{ + NSLog(@"stop"); +} + +-(NSString *) getMimeType:(NSString *)fileExtension { + if (fileExtension && ![fileExtension isEqualToString:@""]) { + NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)fileExtension, NULL); + NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); + return contentType ? contentType : @"application/octet-stream"; + } else { + return @"text/html"; + } +} + +-(BOOL) isMediaExtension:(NSString *) pathExtension { + NSArray * mediaExtensions = @[@"m4v", @"mov", @"mp4", + @"aac", @"ac3", @"aiff", @"au", @"flac", @"m4a", @"mp3", @"wav"]; + if ([mediaExtensions containsObject:pathExtension.lowercaseString]) { + return YES; + } + return NO; +} + + +@end diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/LICENSE b/plugins/cordova-plugin-ionic-webview/src/ios/LICENSE new file mode 100644 index 000000000..a73ffc914 --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012 Niklas von Hertzen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/plugins/cordova-plugin-ionic-webview/src/ios/wk-plugin.js b/plugins/cordova-plugin-ionic-webview/src/ios/wk-plugin.js new file mode 100644 index 000000000..336ab8b2d --- /dev/null +++ b/plugins/cordova-plugin-ionic-webview/src/ios/wk-plugin.js @@ -0,0 +1,51 @@ + +(function _wk_plugin() { + // Check if we are running in WKWebView + if (!window.webkit || !window.webkit.messageHandlers) { + return; + } + + // Initialize Ionic + window.Ionic = window.Ionic || {}; + + function normalizeURL(url) { + console.warn('normalizeURL is deprecated, use window.Ionic.WebView.convertFileSrc'); + return window.Ionic.WebView.convertFileSrc(url); + } + if (typeof window.wkRewriteURL === 'undefined') { + window.wkRewriteURL = function (url) { + console.warn('wkRewriteURL is deprecated, use window.Ionic.WebView.convertFileSrc instead'); + return window.Ionic.WebView.convertFileSrc(url); + } + } + window.Ionic.normalizeURL = normalizeURL; + + var stopScrollHandler = window.webkit.messageHandlers.stopScroll; + if (!stopScrollHandler) { + console.error('Can not find stopScroll handler'); + return; + } + + var stopScrollFunc = null; + var stopScroll = { + stop: function stop(callback) { + if (!stopScrollFunc) { + stopScrollFunc = callback; + stopScrollHandler.postMessage(''); + } + }, + fire: function fire() { + stopScrollFunc && stopScrollFunc(); + stopScrollFunc = null; + }, + cancel: function cancel() { + stopScrollFunc = null; + } + }; + + window.Ionic.StopScroll = stopScroll; + // deprecated + window.IonicStopScroll = stopScroll; + + console.debug("Ionic Stop Scroll injected!"); +})(); diff --git a/plugins/cordova-plugin-network-information/CONTRIBUTING.md b/plugins/cordova-plugin-network-information/CONTRIBUTING.md new file mode 100644 index 000000000..21a93d72a --- /dev/null +++ b/plugins/cordova-plugin-network-information/CONTRIBUTING.md @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Check for Github issues that corresponds to your contribution and link or create them if necessary. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! + diff --git a/plugins/cordova-plugin-network-information/LICENSE b/plugins/cordova-plugin-network-information/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/plugins/cordova-plugin-network-information/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-network-information/NOTICE b/plugins/cordova-plugin-network-information/NOTICE new file mode 100644 index 000000000..fb19cbdb4 --- /dev/null +++ b/plugins/cordova-plugin-network-information/NOTICE @@ -0,0 +1,8 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This product includes software developed by Apple Inc. License can be found in the header of the affected files. (src/ios/CDVReachability.h, src/ios/CDVReachability.m) + diff --git a/plugins/cordova-plugin-network-information/README.md b/plugins/cordova-plugin-network-information/README.md new file mode 100644 index 000000000..421439524 --- /dev/null +++ b/plugins/cordova-plugin-network-information/README.md @@ -0,0 +1,315 @@ +--- +title: Network Information +description: Get information about wireless connectivity. +--- + + +|AppVeyor|Travis CI| +|:-:|:-:| +|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-network-information?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-network-information)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-network-information.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-network-information)| + +# cordova-plugin-network-information + + +This plugin provides an implementation of an old version of the +[Network Information API](http://www.w3.org/TR/2011/WD-netinfo-api-20110607/). +It provides information about the device's cellular and +wifi connection, and whether the device has an internet connection. + +> To get a few ideas how to use the plugin, check out the [sample](#sample) at the bottom of this page or go straight to the [reference](#reference) content. + +## Installation + + cordova plugin add cordova-plugin-network-information + +## Supported Platforms + +- Android +- Browser +- iOS +- Windows + +# Connection + +> The `connection` object, exposed via `navigator.connection`, provides information about the device's cellular and wifi connection. + +## Properties + +- connection.type + +## Constants + +- Connection.UNKNOWN +- Connection.ETHERNET +- Connection.WIFI +- Connection.CELL_2G +- Connection.CELL_3G +- Connection.CELL_4G +- Connection.CELL +- Connection.NONE + +## connection.type + +This property offers a fast way to determine the device's network +connection state, and type of connection. + +### Quick Example + +```js +function checkConnection() { + var networkState = navigator.connection.type; + + var states = {}; + states[Connection.UNKNOWN] = 'Unknown connection'; + states[Connection.ETHERNET] = 'Ethernet connection'; + states[Connection.WIFI] = 'WiFi connection'; + states[Connection.CELL_2G] = 'Cell 2G connection'; + states[Connection.CELL_3G] = 'Cell 3G connection'; + states[Connection.CELL_4G] = 'Cell 4G connection'; + states[Connection.CELL] = 'Cell generic connection'; + states[Connection.NONE] = 'No network connection'; + + alert('Connection type: ' + states[networkState]); +} + +checkConnection(); +``` + +### iOS Quirks + +- + +The code examples in this section show examples of changing app behavior using the online and offline events and your network connection status. + +To start with, create a new FileEntry object (data.txt) to use for sample data. Call this function from the `deviceready` handler. + +>*Note* This code example requires the File plugin. + +```js +var dataFileEntry; + +function createSomeData() { + + window.requestFileSystem(window.TEMPORARY, 5 * 1024 * 1024, function (fs) { + + console.log('file system open: ' + fs.name); + // Creates a new file or returns an existing file. + fs.root.getFile("data.txt", { create: true, exclusive: false }, function (fileEntry) { + + dataFileEntry = fileEntry; + + }, onErrorCreateFile); + + }, onErrorLoadFs); +} +``` + +Next, add listeners for the online and offline events in the `deviceready` handler. + +```js +document.addEventListener("offline", onOffline, false); +document.addEventListener("online", onOnline, false); +``` + +The app's `onOnline` function handles the online event. In the event handler, check the current network state. In this app, treat any connection type as good except Connection.NONE. If you have a connection, you try to upload a file. + +```js +function onOnline() { + // Handle the online event + var networkState = navigator.connection.type; + + if (networkState !== Connection.NONE) { + if (dataFileEntry) { + tryToUploadFile(); + } + } + display('Connection type: ' + networkState); +} +``` + +When the online event fires in the preceding code, call the app's `tryToUploadFile` function. + +If the upload fails, then call the app's `offlineWrite` function to save the current data somewhere. + +>*Note* For simplicity, file reading & writing was omitted. Refer to the [cordova-plugin-file](https://github.com/apache/cordova-plugin-file#cordova-plugin-file) documentation for more information on file handling. + +```js +function tryToUploadFile() { + // !! Assumes variable fileURL contains a valid URL to a text file on the device, + var fileURL = getDataFileEntry().toURL(); + + getFileBlobSomehow(fileURL, function(fileBlob) { + var success = function (r) { + console.log("Response = " + r.response); + display("Uploaded. Response: " + r.response); + }; + + var fail = function (error) { + console.log("An error has occurred: Code = " + error.code || error.status); + offlineWrite("Failed to upload: some offline data"); + } + + var xhr = new XMLHttpRequest(); + + xhr.onerror = fail; + xhr.ontimeout = fail; + xhr.onload = function() { + // If the response code was successful... + if (xhr.status >= 200 && xhr.status < 400) { + success(xhr); + } + else { + fail(xhr) + } + } + + // Make sure you add the domain of your server URL to the + // Content-Security-Policy element in index.html. + xhr.open("POST", encodeURI(SERVER)); + + xhr.setRequestHeader("Content-Type", "text/plain"); + + // The server request handler could read this header to + // set the filename. + xhr.setRequestHeader("X-Filename", fileURL.substr(fileURL.lastIndexOf("/") + 1)); + + xhr.send(fileBlob); + }); +}; +``` + +Here is the code for the `offlineWrite` function. + +>*Note* This code examples requires the File plugin. + +```js +function offlineWrite(offlineData) { + // Create a FileWriter object for our FileEntry. + dataFileEntry.createWriter(function (fileWriter) { + + fileWriter.onwriteend = function () { + console.log("Successful file write..."); + display(offlineData); + }; + + fileWriter.onerror = function (e) { + console.log("Failed file write: " + e.toString()); + }; + + fileWriter.write(offlineData); + }); +} +``` + +If the offline event occurs, just do something like notify the user (for this example, just log it). + +```js +function onOffline() { + // Handle the offline event + console.log("lost connection"); +} +``` diff --git a/plugins/cordova-plugin-network-information/RELEASENOTES.md b/plugins/cordova-plugin-network-information/RELEASENOTES.md new file mode 100644 index 000000000..603f69e7e --- /dev/null +++ b/plugins/cordova-plugin-network-information/RELEASENOTES.md @@ -0,0 +1,192 @@ + +# Release Notes + +### 2.0.2 (Jun 19, 2019) + +- fix(android): Fix bug [cordova-plugin-network-information] connection info is not reliable on Android 6 ([#74](https://github.com/apache/cordova-plugin-network-information/issues/74)) ([`db0d4b5`](https://github.com/apache/cordova-plugin-network-information/commit/db0d4b5), [`9a45d63`](https://github.com/apache/cordova-plugin-network-information/commit/9a45d63), [`60ab69f`](https://github.com/apache/cordova-plugin-network-information/commit/60ab69f), [`acc02f2`](https://github.com/apache/cordova-plugin-network-information/commit/acc02f2), [`0869800`](https://github.com/apache/cordova-plugin-network-information/commit/0869800), [`394452a`](https://github.com/apache/cordova-plugin-network-information/commit/394452a), [`cafdd67`](https://github.com/apache/cordova-plugin-network-information/commit/cafdd67)) +- chore(release): fix repo and issue link ([`9ec1e21`](https://github.com/apache/cordova-plugin-network-information/commit/9ec1e21)) +- docs: remove outdated translations ([`24e50f8`](https://github.com/apache/cordova-plugin-network-information/commit/24e50f8)) +- build: add .npmignore to remove unneeded files from npm package ([`d31e135`](https://github.com/apache/cordova-plugin-network-information/commit/d31e135)) +- build: add .gitattributes to force LF (instead of possible CRLF on Windows) ([`f35341e`](https://github.com/apache/cordova-plugin-network-information/commit/f35341e)) +- ci(travis): Update Travis CI configuration for new paramedic ([#89](https://github.com/apache/cordova-plugin-network-information/issues/89)) ([`102f757`](https://github.com/apache/cordova-plugin-network-information/commit/102f757)) +- ci(travis): add android-28 ([`27b0e39`](https://github.com/apache/cordova-plugin-network-information/commit/27b0e39)) +- ci: drop Node.js v4 support ([#87](https://github.com/apache/cordova-plugin-network-information/issues/87)) ([`5158556`](https://github.com/apache/cordova-plugin-network-information/commit/5158556)) +- chore(github): Add or update GitHub pull request and issue template ([`0cd2771`](https://github.com/apache/cordova-plugin-network-information/commit/0cd2771)) +- docs: remove JIRA link ([`0796cf9`](https://github.com/apache/cordova-plugin-network-information/commit/0796cf9)) +- ci: also accept terms for android sdk `android-27` ([`2cde33a`](https://github.com/apache/cordova-plugin-network-information/commit/2cde33a)) +- ci(travis): CB-13757: Add build-tools-26.0.2 to travis ([`5b0933d`](https://github.com/apache/cordova-plugin-network-information/commit/5b0933d), [`e816db4`](https://github.com/apache/cordova-plugin-network-information/commit/e816db4)) +- chore: Fix release notes ([#61](https://github.com/apache/cordova-plugin-network-information/issues/61)) ([`629a6ab`](https://github.com/apache/cordova-plugin-network-information/commit/629a6ab)) + +### 2.0.1 (Dec 27, 2017) +* [CB-13708](https://issues.apache.org/jira/browse/CB-13708) Fix to allow 2.0.0 version install (#60) + +### 2.0.0 (Dec 15, 2017) +* [CB-13663](https://issues.apache.org/jira/browse/CB-13663) : Removed deprecated platforms + +### 1.3.4 (Nov 06, 2017) +* [CB-12751](https://issues.apache.org/jira/browse/CB-12751) (ios) Fix connection type when airplane mode is on +* [CB-13299](https://issues.apache.org/jira/browse/CB-13299) (CI) Fix **Android** builds +* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) added `eslint` and removed `jshint` +* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis and AppVeyor +* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. + +### 1.3.3 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Add **Android 6.0** build badge to `README` +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder + +### 1.3.2 (Feb 28, 2017) +* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` +* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** +* [CB-11838](https://issues.apache.org/jira/browse/CB-11838) **iOS:** Unregister callback function at the right timing. +* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges + +### 1.3.1 (Dec 07, 2016) +* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.3.1 +* [CB-11230](https://issues.apache.org/jira/browse/CB-11230) [CB-11505](https://issues.apache.org/jira/browse/CB-11505) iOS: Add compatibility with IPv6 +* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. + +### 1.3.0 (Sep 08, 2016) +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* [CB-11734](https://issues.apache.org/jira/browse/CB-11734) Network Plugin uses `Android Log class` and not `Cordova LOG class` +* [CB-11300](https://issues.apache.org/jira/browse/CB-11300) (**android**) Recognize `2G`, `3G` and `4G` network connection subtype names +* Update `NetworkManager.java` +* Detection of Ethernet Network Type on **Android** +* fixed two potential memory leaks when doing Analyze on **iOS 9** +* [CB-11384](https://issues.apache.org/jira/browse/CB-11384) **android**: Does not pass sonarqube scan +* Add badges for paramedic builds on Jenkins +* Add pull request template. +* Readme: Add fenced code blocks with langauage hints +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md + +### 1.2.1 (Apr 15, 2016) +* [CB-10763](https://issues.apache.org/jira/browse/CB-10763) Remove emoji in `cordova-plugin-network-information` +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins + +### 1.2.0 (Jan 15, 2016) +* Adding `CoreTelephony` to `plugin.xml` +* Adding notification for `CT radio` information +* Adding `CT radio` information +* [CB-10160](https://issues.apache.org/jira/browse/CB-10160) Fixed the case mismatch issue + +### 1.1.0 (Nov 18, 2015) +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest +* Fixing contribute link. +* These notifications are objects so their address always evaluates to true. +* Update `NetworkManager.java` +* [CB-9542](https://issues.apache.org/jira/browse/CB-9542) `Browser Proxy` not defined correctly +* Solved `toLowerCase` issue with `Locale.US` + +### 1.0.1 (Jun 17, 2015) +* Adding .ratignore file. +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-network-information documentation translation: cordova-plugin-network-information +* fix npm md issue + +### 1.0.0 (Apr 15, 2015) +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* [CB-8185](https://issues.apache.org/jira/browse/CB-8185) Fixes typo in `cordova.platformId` +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8185](https://issues.apache.org/jira/browse/CB-8185) Use `navigator.onLine` as connection information source on browser platform +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* [CB-8659](https://issues.apache.org/jira/browse/CB-8659): ios: 4.0.x Compatibility: Remove use of initWebView method +* [CB-8573](https://issues.apache.org/jira/browse/CB-8573) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-network-information documentation translation: cordova-plugin-network-information +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file + +### 0.2.15 (Feb 04, 2015) +* [CB-8384](https://issues.apache.org/jira/browse/CB-8384) Network status change support on Windows +* [CB-8384](https://issues.apache.org/jira/browse/CB-8384) Fixes the way we detect online status on Windows +* [CB-8384](https://issues.apache.org/jira/browse/CB-8384) Add Windows platform quirks +* [CB-8384](https://issues.apache.org/jira/browse/CB-8384) Add Windows section to Network Information plugin + +### 0.2.14 (Dec 02, 2014) +* [CB-7976](https://issues.apache.org/jira/browse/CB-7976) **Android**: Use webView's context rather than Activity's context for intent receiver +* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-network-information documentation translation: cordova-plugin-network-information + +### 0.2.13 (Oct 03, 2014) +* [CB-7595](https://issues.apache.org/jira/browse/CB-7595): Android L changes the type from Mobile to Cellular, I'm pretty sure this isn't documented + +### 0.2.12 (Sep 17, 2014) +* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-network-information documentation translation +* Fix network information type exception on fxos 2 +* Added support for the browser +* [CB-6724](https://issues.apache.org/jira/browse/CB-6724) added documentation for manual tests +* remove reference to test assets, they are optional +* Renamed test dir and added nested plugin.xml +* [CB-6964](https://issues.apache.org/jira/browse/CB-6964) ported manual tests +* Port network tests to plugin-test-framework +* Fix naviagtor typo + +### 0.2.11 (Aug 06, 2014) +* **FFOS** update NetworkProxy.js +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs +* [CB-7019](https://issues.apache.org/jira/browse/CB-7019) Updated version and RELEASENOTES.md for release 0.2.10 +* Fixed docs for online/offline event being backwards + +### 0.2.10 (Jun 24, 2014) +* [CB-6907](https://issues.apache.org/jira/browse/CB-6907): [android] Don't crash on startup if no networks available + +### 0.2.9 (Jun 05, 2014) +* updated notice file to include missing license +* Cached extra info to better detect changes. +* [CB-6809](https://issues.apache.org/jira/browse/CB-6809) Add license to CONTRIBUTING.md +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* [CB-6350](https://issues.apache.org/jira/browse/CB-6350) - Fix networkStatusForFlags return value type to work with 64-bit iOS (closes #8) +* Initial version of firefox os network information plugin +* there was an error in the object definition + +### 0.2.8 (Apr 17, 2014) +* [CB-6342](https://issues.apache.org/jira/browse/CB-6342): [iOS] iOS reports a cellular connection even when in Airplane mode +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers +* [CB-6465](https://issues.apache.org/jira/browse/CB-6465): Add license headers to Tizen code +* Add NOTICE file + +### 0.2.7 (Feb 05, 2014) +* Initial implementation of Tizen plugin. + +### 0.2.6 (Jan 02, 2014) +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for netinfo plugin + +### 0.2.5 (Dec 4, 2013) +* [ubuntu] specify policy_group +* add ubuntu platform +* Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos' + +### 0.2.4 (Oct 28, 2013) +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): add repo + issue tag to plugin.xml for network information plugin +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. + +### 0.2.3 (Sept 25, 2013) +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [windows8] commandProxy was moved +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.network-information to org.apache.cordova.network-information +* removed duplicate comment line from plugin.xml +* added Network APIs for FirefoxOS +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. + +### 0.2.1 (Sept 5, 2013) +* [CB-4432](https://issues.apache.org/jira/browse/CB-4432) copyright notice change diff --git a/plugins/cordova-plugin-network-information/package.json b/plugins/cordova-plugin-network-information/package.json new file mode 100644 index 000000000..81fa7ab7a --- /dev/null +++ b/plugins/cordova-plugin-network-information/package.json @@ -0,0 +1,77 @@ +{ + "_from": "git+https://github.com/apache/cordova-plugin-network-information.git", + "_id": "cordova-plugin-network-information@3.0.0-dev", + "_inBundle": false, + "_integrity": "", + "_location": "/cordova-plugin-network-information", + "_phantomChildren": {}, + "_requested": { + "type": "git", + "raw": "https://github.com/apache/cordova-plugin-network-information.git", + "rawSpec": "https://github.com/apache/cordova-plugin-network-information.git", + "saveSpec": "git+https://github.com/apache/cordova-plugin-network-information.git", + "fetchSpec": "https://github.com/apache/cordova-plugin-network-information.git", + "gitCommittish": null + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "git+https://github.com/apache/cordova-plugin-network-information.git#310b38f42b26b26f493d89f4e83aad6b98568e54", + "_spec": "https://github.com/apache/cordova-plugin-network-information.git", + "_where": "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular", + "author": { + "name": "Apache Software Foundation" + }, + "bugs": { + "url": "https://github.com/apache/cordova-plugin-network-information/issues" + }, + "bundleDependencies": false, + "cordova": { + "id": "cordova-plugin-network-information", + "platforms": [ + "android", + "ios", + "windows", + "browser" + ] + }, + "deprecated": false, + "description": "Cordova Network Information Plugin", + "devDependencies": { + "@cordova/eslint-config": "^3.0.0" + }, + "engines": { + "cordovaDependencies": { + "3.0.0": { + "cordova": ">=9" + }, + "4.0.0": { + "cordova": ">100" + } + } + }, + "homepage": "https://github.com/apache/cordova-plugin-network-information#readme", + "keywords": [ + "cordova", + "network", + "information", + "ecosystem:cordova", + "cordova-android", + "cordova-ios", + "cordova-windows", + "cordova-browser" + ], + "license": "Apache-2.0", + "name": "cordova-plugin-network-information", + "repository": { + "type": "git", + "url": "git+https://github.com/apache/cordova-plugin-network-information.git" + }, + "scripts": { + "lint": "eslint .", + "test": "npm run lint" + }, + "types": "./types/index.d.ts", + "version": "3.0.0-dev" +} diff --git a/plugins/cordova-plugin-network-information/plugin.xml b/plugins/cordova-plugin-network-information/plugin.xml new file mode 100644 index 000000000..a05111ff4 --- /dev/null +++ b/plugins/cordova-plugin-network-information/plugin.xml @@ -0,0 +1,87 @@ + + + + + + Network Information + Cordova Network Information Plugin + Apache 2.0 + cordova,network,information + https://github.com/apache/cordova-plugin-network-information + https://github.com/apache/cordova-plugin-network-information/issues + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-network-information/src/android/NetworkManager.java b/plugins/cordova-plugin-network-information/src/android/NetworkManager.java new file mode 100755 index 000000000..8698d4966 --- /dev/null +++ b/plugins/cordova-plugin-network-information/src/android/NetworkManager.java @@ -0,0 +1,334 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +package org.apache.cordova.networkinformation; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.apache.cordova.CordovaWebView; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.net.ConnectivityManager; +import android.net.NetworkInfo; +import android.os.Build; + +import java.util.Locale; + +public class NetworkManager extends CordovaPlugin { + + public static int NOT_REACHABLE = 0; + public static int REACHABLE_VIA_CARRIER_DATA_NETWORK = 1; + public static int REACHABLE_VIA_WIFI_NETWORK = 2; + + public static final String WIFI = "wifi"; + public static final String WIMAX = "wimax"; + // mobile + public static final String MOBILE = "mobile"; + + // Android L calls this Cellular, because I have no idea! + public static final String CELLULAR = "cellular"; + // 2G network types + public static final String TWO_G = "2g"; + public static final String GSM = "gsm"; + public static final String GPRS = "gprs"; + public static final String EDGE = "edge"; + // 3G network types + public static final String THREE_G = "3g"; + public static final String CDMA = "cdma"; + public static final String UMTS = "umts"; + public static final String HSPA = "hspa"; + public static final String HSUPA = "hsupa"; + public static final String HSDPA = "hsdpa"; + public static final String ONEXRTT = "1xrtt"; + public static final String EHRPD = "ehrpd"; + // 4G network types + public static final String FOUR_G = "4g"; + public static final String LTE = "lte"; + public static final String UMB = "umb"; + public static final String HSPA_PLUS = "hspa+"; + // return type + public static final String TYPE_UNKNOWN = "unknown"; + public static final String TYPE_ETHERNET = "ethernet"; + public static final String TYPE_ETHERNET_SHORT = "eth"; + public static final String TYPE_WIFI = "wifi"; + public static final String TYPE_2G = "2g"; + public static final String TYPE_3G = "3g"; + public static final String TYPE_4G = "4g"; + public static final String TYPE_NONE = "none"; + + private static final String LOG_TAG = "NetworkManager"; + + private CallbackContext connectionCallbackContext; + + ConnectivityManager sockMan; + BroadcastReceiver receiver; + private JSONObject lastInfo = null; + + /** + * Sets the context of the Command. This can then be used to do things like + * get file paths associated with the Activity. + * + * @param cordova The context of the main Activity. + * @param webView The CordovaWebView Cordova is running in. + */ + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + this.sockMan = (ConnectivityManager) cordova.getActivity().getSystemService(Context.CONNECTIVITY_SERVICE); + this.connectionCallbackContext = null; + + this.registerConnectivityActionReceiver(); + } + + /** + * Executes the request and returns PluginResult. + * + * @param action The action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackContext The callback id used when calling back into JavaScript. + * @return True if the action was valid, false otherwise. + */ + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) { + if (action.equals("getConnectionInfo")) { + this.connectionCallbackContext = callbackContext; + NetworkInfo info = sockMan.getActiveNetworkInfo(); + String connectionType = ""; + try { + connectionType = this.getConnectionInfo(info).get("type").toString(); + } catch (JSONException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + + PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, connectionType); + pluginResult.setKeepCallback(true); + callbackContext.sendPluginResult(pluginResult); + return true; + } + return false; + } + + /** + * Stop network receiver. + */ + public void onDestroy() { + this.unregisterReceiver(); + } + + @Override + public void onPause(boolean multitasking) { + this.unregisterReceiver(); + } + + @Override + public void onResume(boolean multitasking) { + super.onResume(multitasking); + + this.unregisterReceiver(); + this.registerConnectivityActionReceiver(); + } + + //-------------------------------------------------------------------------- + // LOCAL METHODS + //-------------------------------------------------------------------------- + + private void registerConnectivityActionReceiver() { + // We need to listen to connectivity events to update navigator.connection + IntentFilter intentFilter = new IntentFilter(); + intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); + if (this.receiver == null) { + this.receiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + // (The null check is for the ARM Emulator, please use Intel Emulator for better results) + if (NetworkManager.this.webView != null) { + updateConnectionInfo(sockMan.getActiveNetworkInfo()); + } + + String connectionType = null; + if(NetworkManager.this.lastInfo == null) { + connectionType = TYPE_NONE; + } else { + try { + connectionType = NetworkManager.this.lastInfo.get("type").toString(); + } catch (JSONException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + connectionType = TYPE_NONE; + } + } + + // Lollipop always returns false for the EXTRA_NO_CONNECTIVITY flag => fix for Android M and above. + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && TYPE_NONE.equals(connectionType)) { + boolean noConnectivity = intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); + LOG.d(LOG_TAG, "Intent no connectivity: " + noConnectivity); + if(noConnectivity) { + LOG.d(LOG_TAG, "Really no connectivity"); + } else { + LOG.d(LOG_TAG, "!!! Switching to unknown, Intent states there is a connectivity."); + sendUpdate(TYPE_UNKNOWN); + } + } + } + }; + } + + webView.getContext().registerReceiver(this.receiver, intentFilter); + } + + private void unregisterReceiver() { + if (this.receiver != null) { + try { + webView.getContext().unregisterReceiver(this.receiver); + } catch (Exception e) { + LOG.e(LOG_TAG, "Error unregistering network receiver: " + e.getMessage(), e); + } finally { + receiver = null; + } + } + } + + /** + * Updates the JavaScript side whenever the connection changes + * + * @param info the current active network info + * @return + */ + private void updateConnectionInfo(NetworkInfo info) { + // send update to javascript "navigator.connection" + // Jellybean sends its own info + JSONObject thisInfo = this.getConnectionInfo(info); + if(!thisInfo.equals(lastInfo)) + { + String connectionType = ""; + try { + connectionType = thisInfo.get("type").toString(); + } catch (JSONException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + + sendUpdate(connectionType); + lastInfo = thisInfo; + } + } + + /** + * Get the latest network connection information + * + * @param info the current active network info + * @return a JSONObject that represents the network info + */ + private JSONObject getConnectionInfo(NetworkInfo info) { + String type = TYPE_NONE; + String extraInfo = ""; + if (info != null) { + // If we are not connected to any network set type to none + if (!info.isConnected()) { + type = TYPE_NONE; + } + else { + type = getType(info); + } + extraInfo = info.getExtraInfo(); + } + + LOG.d(LOG_TAG, "Connection Type: " + type); + LOG.d(LOG_TAG, "Connection Extra Info: " + extraInfo); + + JSONObject connectionInfo = new JSONObject(); + + try { + connectionInfo.put("type", type); + connectionInfo.put("extraInfo", extraInfo); + } catch (JSONException e) { + LOG.d(LOG_TAG, e.getLocalizedMessage()); + } + + return connectionInfo; + } + + /** + * Create a new plugin result and send it back to JavaScript + * + * @param connection the network info to set as navigator.connection + */ + private void sendUpdate(String type) { + if (connectionCallbackContext != null) { + PluginResult result = new PluginResult(PluginResult.Status.OK, type); + result.setKeepCallback(true); + connectionCallbackContext.sendPluginResult(result); + } + webView.postMessage("networkconnection", type); + } + + /** + * Determine the type of connection + * + * @param info the network info so we can determine connection type. + * @return the type of mobile network we are on + */ + private String getType(NetworkInfo info) { + if (info != null) { + String type = info.getTypeName().toLowerCase(Locale.US); + + LOG.d(LOG_TAG, "toLower : " + type.toLowerCase()); + LOG.d(LOG_TAG, "wifi : " + WIFI); + if (type.equals(WIFI)) { + return TYPE_WIFI; + } + else if (type.toLowerCase().equals(TYPE_ETHERNET) || type.toLowerCase().startsWith(TYPE_ETHERNET_SHORT)) { + return TYPE_ETHERNET; + } + else if (type.equals(MOBILE) || type.equals(CELLULAR)) { + type = info.getSubtypeName().toLowerCase(Locale.US); + if (type.equals(GSM) || + type.equals(GPRS) || + type.equals(EDGE) || + type.equals(TWO_G)) { + return TYPE_2G; + } + else if (type.startsWith(CDMA) || + type.equals(UMTS) || + type.equals(ONEXRTT) || + type.equals(EHRPD) || + type.equals(HSUPA) || + type.equals(HSDPA) || + type.equals(HSPA) || + type.equals(THREE_G)) { + return TYPE_3G; + } + else if (type.equals(LTE) || + type.equals(UMB) || + type.equals(HSPA_PLUS) || + type.equals(FOUR_G)) { + return TYPE_4G; + } + } + } + else { + return TYPE_NONE; + } + return TYPE_UNKNOWN; + } +} diff --git a/plugins/cordova-plugin-network-information/src/browser/network.js b/plugins/cordova-plugin-network-information/src/browser/network.js new file mode 100644 index 000000000..6e453ee28 --- /dev/null +++ b/plugins/cordova-plugin-network-information/src/browser/network.js @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var cordova = require('cordova'); +var proxy = require('cordova/exec/proxy'); +var Connection = require('./Connection'); + +var type = navigator.onLine ? Connection.UNKNOWN : Connection.NONE; + +// Subscribe to 'native' online/offline events +function onStatusChange (evt) { + type = navigator.onLine ? Connection.UNKNOWN : Connection.NONE; + // force async + setTimeout(function () { + cordova.fireDocumentEvent(evt.type); + }, 0); +} + +window.addEventListener('online', onStatusChange); +window.addEventListener('offline', onStatusChange); + +proxy.add('NetworkStatus', { + getConnectionInfo: function (cbSuccess) { + // force async + setTimeout(function () { + cbSuccess(type); + }, 0); + } +}); diff --git a/plugins/cordova-plugin-network-information/src/ios/CDVConnection.h b/plugins/cordova-plugin-network-information/src/ios/CDVConnection.h new file mode 100644 index 000000000..8add02794 --- /dev/null +++ b/plugins/cordova-plugin-network-information/src/ios/CDVConnection.h @@ -0,0 +1,34 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import "CDVReachability.h" + +@interface CDVConnection : CDVPlugin { + NSString* type; + NSString* _callbackId; + + CDVReachability* internetReach; +} + +@property (copy) NSString* connectionType; +@property (strong) CDVReachability* internetReach; + +@end diff --git a/plugins/cordova-plugin-network-information/src/ios/CDVConnection.m b/plugins/cordova-plugin-network-information/src/ios/CDVConnection.m new file mode 100644 index 000000000..40b2e4223 --- /dev/null +++ b/plugins/cordova-plugin-network-information/src/ios/CDVConnection.m @@ -0,0 +1,162 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ +#import + +#import "CDVConnection.h" +#import "CDVReachability.h" + +@interface CDVConnection (PrivateMethods) +- (void)updateOnlineStatus; +- (void)sendPluginResult; +@end + +@implementation CDVConnection + +@synthesize connectionType, internetReach; + +- (void)getConnectionInfo:(CDVInvokedUrlCommand*)command +{ + _callbackId = command.callbackId; + [self sendPluginResult]; +} + +- (void)sendPluginResult +{ + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:self.connectionType]; + + [result setKeepCallbackAsBool:YES]; + [self.commandDelegate sendPluginResult:result callbackId:_callbackId]; +} + +- (NSString*)w3cConnectionTypeFor:(CDVReachability*)reachability +{ + NetworkStatus networkStatus = [reachability currentReachabilityStatus]; + + switch (networkStatus) { + case NotReachable: + return @"none"; + + case ReachableViaWWAN: + { + BOOL isConnectionRequired = [reachability connectionRequired]; + if (isConnectionRequired) { + return @"none"; + } else { + if ([[[UIDevice currentDevice] systemVersion] compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending) { + CTTelephonyNetworkInfo *telephonyInfo = [CTTelephonyNetworkInfo new]; + if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyGPRS]) { + return @"2g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyEdge]) { + return @"2g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyWCDMA]) { + return @"3g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyHSDPA]) { + return @"3g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyHSUPA]) { + return @"3g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyCDMA1x]) { + return @"3g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyCDMAEVDORev0]) { + return @"3g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyCDMAEVDORevA]) { + return @"3g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyCDMAEVDORevB]) { + return @"3g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyeHRPD]) { + return @"3g"; + } else if ([telephonyInfo.currentRadioAccessTechnology isEqualToString:CTRadioAccessTechnologyLTE]) { + return @"4g"; + } + } + return @"cellular"; + } + } + case ReachableViaWiFi: + { + BOOL isConnectionRequired = [reachability connectionRequired]; + if (isConnectionRequired) { + return @"none"; + } else { + return @"wifi"; + } + } + default: + return @"unknown"; + } +} + +- (BOOL)isCellularConnection:(NSString*)theConnectionType +{ + return [theConnectionType isEqualToString:@"2g"] || + [theConnectionType isEqualToString:@"3g"] || + [theConnectionType isEqualToString:@"4g"] || + [theConnectionType isEqualToString:@"cellular"]; +} + +- (void)updateReachability:(CDVReachability*)reachability +{ + if (reachability) { + // check whether the connection type has changed + NSString* newConnectionType = [self w3cConnectionTypeFor:reachability]; + if ([newConnectionType isEqualToString:self.connectionType]) { // the same as before, remove dupes + return; + } else { + self.connectionType = [self w3cConnectionTypeFor:reachability]; + } + } + [self sendPluginResult]; +} + +- (void)updateConnectionType:(NSNotification*)note +{ + CDVReachability* curReach = [note object]; + + if ((curReach != nil) && [curReach isKindOfClass:[CDVReachability class]]) { + [self updateReachability:curReach]; + } +} + +- (void)onPause +{ + [self.internetReach stopNotifier]; +} + +- (void)onResume +{ + [self.internetReach startNotifier]; + [self updateReachability:self.internetReach]; +} + +- (void)pluginInitialize +{ + self.connectionType = @"none"; + self.internetReach = [CDVReachability reachabilityForInternetConnection]; + self.connectionType = [self w3cConnectionTypeFor:self.internetReach]; + [self.internetReach startNotifier]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:) + name:kReachabilityChangedNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:) + name:CTRadioAccessTechnologyDidChangeNotification object:nil]; + if (UIApplicationDidEnterBackgroundNotification && UIApplicationWillEnterForegroundNotification) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil]; + } +} + +@end diff --git a/plugins/cordova-plugin-network-information/src/ios/CDVReachability.h b/plugins/cordova-plugin-network-information/src/ios/CDVReachability.h new file mode 100644 index 000000000..852d37b49 --- /dev/null +++ b/plugins/cordova-plugin-network-information/src/ios/CDVReachability.h @@ -0,0 +1,81 @@ +/* + + File: Reachability.h + Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs. + Version: 2.2 + + Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. + ("Apple") in consideration of your agreement to the following terms, and your + use, installation, modification or redistribution of this Apple software + constitutes acceptance of these terms. If you do not agree with these terms, + please do not use, install, modify or redistribute this Apple software. + + In consideration of your agreement to abide by the following terms, and subject + to these terms, Apple grants you a personal, non-exclusive license, under + Apple's copyrights in this original Apple software (the "Apple Software"), to + use, reproduce, modify and redistribute the Apple Software, with or without + modifications, in source and/or binary forms; provided that if you redistribute + the Apple Software in its entirety and without modifications, you must retain + this notice and the following text and disclaimers in all such redistributions + of the Apple Software. + Neither the name, trademarks, service marks or logos of Apple Inc. may be used + to endorse or promote products derived from the Apple Software without specific + prior written permission from Apple. Except as expressly stated in this notice, + no other rights or licenses, express or implied, are granted by Apple herein, + including but not limited to any patent rights that may be infringed by your + derivative works or by other works in which the Apple Software may be + incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO + WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN + COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR + DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF + CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF + APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Copyright (C) 2010 Apple Inc. All Rights Reserved. + +*/ + +#import +#import +#import + +typedef enum { + NotReachable = 0, + ReachableViaWWAN, // this value has been swapped with ReachableViaWiFi for Cordova backwards compat. reasons + ReachableViaWiFi // this value has been swapped with ReachableViaWWAN for Cordova backwards compat. reasons +} NetworkStatus; +#define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification" + +@interface CDVReachability : NSObject +{ + SCNetworkReachabilityRef reachabilityRef; +} + +// reachabilityWithHostName- Use to check the reachability of a particular host name. ++ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName; + +// reachabilityWithAddress- Use to check the reachability of a particular IP address. ++ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr*)hostAddress; + +// reachabilityForInternetConnection- checks whether the default route is available. +// Should be used by applications that do not connect to a particular host ++ (CDVReachability*)reachabilityForInternetConnection; + +// Start listening for reachability notifications on the current run loop +- (BOOL)startNotifier; +- (void)stopNotifier; + +- (NetworkStatus)currentReachabilityStatus; +// WWAN may be available, but not active until a connection has been established. +// WiFi may require a connection for VPN on Demand. +- (BOOL)connectionRequired; +@end diff --git a/plugins/cordova-plugin-network-information/src/ios/CDVReachability.m b/plugins/cordova-plugin-network-information/src/ios/CDVReachability.m new file mode 100644 index 000000000..b43a62def --- /dev/null +++ b/plugins/cordova-plugin-network-information/src/ios/CDVReachability.m @@ -0,0 +1,237 @@ +/* + + File: Reachability.m + Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs. + Version: 2.2 + + Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. + ("Apple") in consideration of your agreement to the following terms, and your + use, installation, modification or redistribution of this Apple software + constitutes acceptance of these terms. If you do not agree with these terms, + please do not use, install, modify or redistribute this Apple software. + + In consideration of your agreement to abide by the following terms, and subject + to these terms, Apple grants you a personal, non-exclusive license, under + Apple's copyrights in this original Apple software (the "Apple Software"), to + use, reproduce, modify and redistribute the Apple Software, with or without + modifications, in source and/or binary forms; provided that if you redistribute + the Apple Software in its entirety and without modifications, you must retain + this notice and the following text and disclaimers in all such redistributions + of the Apple Software. + Neither the name, trademarks, service marks or logos of Apple Inc. may be used + to endorse or promote products derived from the Apple Software without specific + prior written permission from Apple. Except as expressly stated in this notice, + no other rights or licenses, express or implied, are granted by Apple herein, + including but not limited to any patent rights that may be infringed by your + derivative works or by other works in which the Apple Software may be + incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO + WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN + COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR + DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF + CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF + APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Copyright (C) 2010 Apple Inc. All Rights Reserved. + +*/ + +#import +#import +#import +#import +#import +#import + +#import + +#import "CDVReachability.h" + +#define kShouldPrintReachabilityFlags 0 + +static void CDVPrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment) +{ +#if kShouldPrintReachabilityFlags + NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n", + (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', + (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', + + (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', + (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', + (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', + (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-', + comment + ); +#endif +} + +@implementation CDVReachability + +static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) +{ +#pragma unused (target, flags) + // NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback"); + // NSCAssert([(NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback"); + + // Converted the asserts above to conditionals, with safe return from the function + if (info == NULL) { + NSLog(@"info was NULL in ReachabilityCallback"); + return; + } + + if (![(__bridge NSObject*)info isKindOfClass :[CDVReachability class]]) { + NSLog(@"info was wrong class in ReachabilityCallback"); + return; + } + + // We're on the main RunLoop, so an NSAutoreleasePool is not necessary, but is added defensively + // in case someon uses the Reachability object in a different thread. + @autoreleasepool { + CDVReachability* noteObject = (__bridge CDVReachability*)info; + // Post a notification to notify the client that the network reachability changed. + [[NSNotificationCenter defaultCenter] postNotificationName:kReachabilityChangedNotification object:noteObject]; + } +} + +- (BOOL)startNotifier +{ + BOOL retVal = NO; + SCNetworkReachabilityContext context = {0, (__bridge void*)(self), NULL, NULL, NULL}; + + if (SCNetworkReachabilitySetCallback(reachabilityRef, CDVReachabilityCallback, &context)) { + if (SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) { + retVal = YES; + } + } + return retVal; +} + +- (void)stopNotifier +{ + if (reachabilityRef != NULL) { + SCNetworkReachabilitySetCallback(reachabilityRef, NULL, NULL); + SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + } +} + +- (void)dealloc +{ + [self stopNotifier]; + if (reachabilityRef != NULL) { + CFRelease(reachabilityRef); + } +} + ++ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName; +{ + CDVReachability* retVal = NULL; + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]); + if (reachability != NULL) { + retVal = [[self alloc] init]; + if (retVal != NULL) { + retVal->reachabilityRef = reachability; + } + else { + CFRelease(reachability); + } + } + return retVal; +} + ++ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr*)hostAddress; +{ + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, hostAddress); + CDVReachability* retVal = NULL; + if (reachability != NULL) { + retVal = [[self alloc] init]; + if (retVal != NULL) { + retVal->reachabilityRef = reachability; + } + else { + CFRelease(reachability); + } + } + return retVal; +} + +// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing +// status of the device, both IPv4 and IPv6. ++ (CDVReachability*)reachabilityForInternetConnection; +{ + struct sockaddr_in zeroAddress; + bzero(&zeroAddress, sizeof(zeroAddress)); + zeroAddress.sin_len = sizeof(zeroAddress); + zeroAddress.sin_family = AF_INET; + return [self reachabilityWithAddress:(const struct sockaddr*) &zeroAddress]; +} + +#pragma mark Network Flag Handling + +- (NetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags +{ + CDVPrintReachabilityFlags(flags, "networkStatusForFlags"); + if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) { + // if target host is not reachable + return NotReachable; + } + + NetworkStatus retVal = NotReachable; + + if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) { + // if target host is reachable and no connection is required + // then we'll assume (for now) that your on Wi-Fi + retVal = ReachableViaWiFi; + } + + if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand) != 0) || + ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0))) { + // ... and the connection is on-demand (or on-traffic) if the + // calling application is using the CFSocketStream or higher APIs + + if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) { + // ... and no [user] intervention is needed + retVal = ReachableViaWiFi; + } + } + + if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN) { + // ... but WWAN connections are OK if the calling application + // is using the CFNetwork (CFSocketStream?) APIs. + retVal = ReachableViaWWAN; + } + return retVal; +} + +- (BOOL)connectionRequired; +{ + NSAssert(reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef"); + SCNetworkReachabilityFlags flags; + if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) { + return flags & kSCNetworkReachabilityFlagsConnectionRequired; + } + return NO; +} + +- (NetworkStatus)currentReachabilityStatus +{ + NSAssert(reachabilityRef != NULL, @"currentNetworkStatus called with NULL reachabilityRef"); + NetworkStatus retVal = NotReachable; + SCNetworkReachabilityFlags flags; + if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) { + retVal = [self networkStatusForFlags:flags]; + } + return retVal; +} + +@end diff --git a/plugins/cordova-plugin-network-information/src/windows/NetworkInfoProxy.js b/plugins/cordova-plugin-network-information/src/windows/NetworkInfoProxy.js new file mode 100644 index 000000000..c4f05408f --- /dev/null +++ b/plugins/cordova-plugin-network-information/src/windows/NetworkInfoProxy.js @@ -0,0 +1,81 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* global Windows:true */ + +var Connection = require('./Connection'); + +var winNetConn = Windows.Networking.Connectivity; +var networkInfo = winNetConn.NetworkInformation; + +function getCurrrentConnectionType () { + var profile = networkInfo.getInternetConnectionProfile(); + + if (!profile) { + return Connection.NONE; + } + + var conLevel = profile.getNetworkConnectivityLevel(); + var interfaceType = profile.networkAdapter.ianaInterfaceType; + + // since we use this to detect whether we are online or offline we do check agains InternetAccess + // localAccess (airplane mode as an example) or constrainedInternetAccess mean there is no access to the internet available + // https://msdn.microsoft.com/library/windows/apps/windows.networking.connectivity.networkconnectivitylevel.aspx + if (conLevel !== Windows.Networking.Connectivity.NetworkConnectivityLevel.internetAccess) { + return Connection.NONE; + } + + var connectionType; + + switch (interfaceType) { + case 71: + connectionType = Connection.WIFI; + break; + case 6: + connectionType = Connection.ETHERNET; + break; + case 243: // (3GPP WWAN) // Fallthrough is intentional + case 244: // (3GPP2 WWAN) + connectionType = Connection.CELL_3G; + break; + default: + connectionType = Connection.UNKNOWN; + break; + } + + return connectionType; +} + +module.exports = { + + getConnectionInfo: function (win, fail, args) { + var reportConnectionInfoOnce = function () { + win(getCurrrentConnectionType(), { keepCallback: true }); + }; + + // report current connection type + setTimeout(reportConnectionInfoOnce, 0); + // start traking future changes + networkInfo.addEventListener('networkstatuschanged', reportConnectionInfoOnce); + } +}; + +require('cordova/exec/proxy').add('NetworkStatus', module.exports); diff --git a/plugins/cordova-plugin-network-information/types/index.d.ts b/plugins/cordova-plugin-network-information/types/index.d.ts new file mode 100644 index 000000000..60b6c267a --- /dev/null +++ b/plugins/cordova-plugin-network-information/types/index.d.ts @@ -0,0 +1,62 @@ +// Type definitions for Apache Cordova Network Information plugin +// Project: https://github.com/apache/cordova-plugin-network-information +// Definitions by: Microsoft Open Technologies Inc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies Inc +// Licensed under the MIT license + +interface Navigator { + /** + * This plugin provides an implementation of an old version of the Network Information API. + * It provides information about the device's cellular and wifi connection, and whether the device has an internet connection. + */ + connection: Connection; + // see https://github.com/apache/cordova-plugin-network-information/blob/dev/doc/index.md#api-change + // for + network: { + /** + * This plugin provides an implementation of an old version of the Network Information API. + * It provides information about the device's cellular and wifi connection, and whether the device has an internet connection. + */ + connection: Connection + } +} + +interface Document { + addEventListener(type: "online", connectionStateCallback: () => any, useCapture?: boolean): void; + addEventListener(type: "offline", connectionStateCallback: () => any, useCapture?: boolean): void; +} + +/** + * The connection object, exposed via navigator.connection, provides information + * about the device's cellular and wifi connection. + */ +interface Connection { + /** + * This property offers a fast way to determine the device's network connection state, and type of connection. + * One of: + * Connection.UNKNOWN + * Connection.ETHERNET + * Connection.WIFI + * Connection.CELL_2G + * Connection.CELL_3G + * Connection.CELL_4G + * Connection.CELL + * Connection.NONE + */ + type: string; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var Connection: { + UNKNOWN: string; + ETHERNET: string; + WIFI: string; + CELL_2G: string; + CELL_3G: string; + CELL_4G: string; + CELL: string; + NONE: string; +} \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/.appveyor.yml b/plugins/cordova-plugin-splashscreen/.appveyor.yml new file mode 100644 index 000000000..a7b2426e0 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/.appveyor.yml @@ -0,0 +1,28 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml + +max_jobs: 1 + +shallow_clone: true + +init: + - git config --global core.autocrlf true + +image: + - Visual Studio 2017 + +environment: + nodejs_version: "4" + matrix: + - PLATFORM: windows-10-store + JUST_BUILD: --justBuild +install: + - npm cache clean -f + - node --version + - npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git + - npm install -g cordova + +build: off + +test_script: + - cordova-paramedic --config pr\%PLATFORM% --plugin . %JUST_BUILD% diff --git a/plugins/cordova-plugin-splashscreen/.github/PULL_REQUEST_TEMPLATE.md b/plugins/cordova-plugin-splashscreen/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..91582f4ef --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,22 @@ + + +### Platforms affected + + +### What does this PR do? + + +### What testing has been done on this change? + + +### Checklist +- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database +- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. +- [ ] Added automated test coverage as appropriate for this change. diff --git a/plugins/cordova-plugin-splashscreen/.jshintignore b/plugins/cordova-plugin-splashscreen/.jshintignore new file mode 100644 index 000000000..09bc22e0b --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/.jshintignore @@ -0,0 +1 @@ +tests/ios diff --git a/plugins/cordova-plugin-splashscreen/.jshintrc b/plugins/cordova-plugin-splashscreen/.jshintrc new file mode 100644 index 000000000..cf48aaca6 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/.jshintrc @@ -0,0 +1,16 @@ +{ + "browser": true + , "devel": true + , "bitwise": true + , "undef": true + , "trailing": true + , "quotmark": false + , "indent": 4 + , "unused": "vars" + , "latedef": "nofunc" + , "globals": { + "module": false, + "exports": false, + "require": false + } +} diff --git a/plugins/cordova-plugin-splashscreen/.npmignore b/plugins/cordova-plugin-splashscreen/.npmignore new file mode 100644 index 000000000..7d3b1ce0c --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/.npmignore @@ -0,0 +1,28 @@ +#If ignorance is bliss, then somebody knock the smile off my face + +*.csproj.user +*.suo +*.cache +Thumbs.db +*.DS_Store + +*.bak +*.cache +*.log +*.swp +*.user + + + + + + + + + + +node_modules + +/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcuserdata/ + +/tests/ios/CDVSplashScreenTest.xcworkspace/xcuserdata/ diff --git a/plugins/cordova-plugin-splashscreen/.travis.yml b/plugins/cordova-plugin-splashscreen/.travis.yml new file mode 100644 index 000000000..c5d3cdd43 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/.travis.yml @@ -0,0 +1,98 @@ +sudo: false +addons: + jwt: + secure: UmbBQ73ydIzhTCfaTb/g0beTwnOHjYxlILmQYK2Tl9Gna/KbpawiVmbloX1eZakevkeYgzQmAHEF0LyDINy5AUk97azYeP0Sz/IOjIDfXAdc6U6sZb7BScneBMt6ET/hCprG4f3mbmleQ+gx+dmNWez6rlb3Xu+XWfJuwDfAWm0= +env: + global: + - SAUCE_USERNAME=snay + - TRAVIS_NODE_VERSION="4.2" +matrix: + include: + - env: PLATFORM=browser-chrome + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-firefox + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-safari + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-edge + os: linux + language: node_js + node_js: '4.2' + - env: TEST_DIR=. + language: objective-c + osx_image: xcode7 + - env: TEST_DIR=./tests/ios + language: objective-c + osx_image: xcode7 + - env: PLATFORM=ios-9.3 + os: osx + osx_image: xcode7.3 + language: node_js + node_js: '4.2' + - env: PLATFORM=ios-10.0 + os: osx + osx_image: xcode7.3 + language: node_js + node_js: '4.2' + - env: PLATFORM=android-4.4 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - extra-android-m2repository + - build-tools-26.0.2 + - env: PLATFORM=android-5.1 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - extra-android-m2repository + - build-tools-26.0.2 + - env: PLATFORM=android-6.0 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - extra-android-m2repository + - build-tools-26.0.2 + - env: PLATFORM=android-7.0 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - extra-android-m2repository + - build-tools-26.0.2 +before_install: +- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm + && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm + install $TRAVIS_NODE_VERSION +- node --version +- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi +- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi +- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26; + fi +- git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic + && npm install && popd +- npm install -g cordova +install: +- npm install +script: +- if [[ "$TEST_DIR" != "" ]]; + then cd $TEST_DIR && npm install && (npm test || npm test); + else node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce + --buildName travis-plugin-splashscreen-$TRAVIS_JOB_NUMBER; + fi diff --git a/plugins/cordova-plugin-splashscreen/CONTRIBUTING.md b/plugins/cordova-plugin-splashscreen/CONTRIBUTING.md new file mode 100644 index 000000000..4c8e6a5ea --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/CONTRIBUTING.md @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff --git a/plugins/cordova-plugin-splashscreen/LICENSE b/plugins/cordova-plugin-splashscreen/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/NOTICE b/plugins/cordova-plugin-splashscreen/NOTICE new file mode 100644 index 000000000..8ec56a524 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/NOTICE @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/plugins/cordova-plugin-splashscreen/README.md b/plugins/cordova-plugin-splashscreen/README.md new file mode 100644 index 000000000..49ff0ef4f --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/README.md @@ -0,0 +1,522 @@ +--- +title: Splashscreen +description: Control the splash screen for your app. +--- + + +|AppVeyor|Travis CI| +|:-:|:-:| +|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-splashscreen?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-splashscreen)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-splashscreen)| + +# cordova-plugin-splashscreen + +This plugin is required to work with splash screens. This plugin displays and hides a splash screen during application launch. + +Report issues with this plugin on the [Apache Cordova issue tracker][Apache Cordova issue tracker]. + +## Installation + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + +## Supported Platforms + +- Android +- iOS +- Windows (`cordova-windows` version >= 4.4.0 is required) +- Browser + +__Note__: Extended splashscreen does not require the plugin on Windows (as opposed to Android and iOS) in case you don't use the plugin API, i.e. programmatic hide/show. + +### iOS-specific information + +There are two mechanisms for displaying a launch screen on iOS: + +1. Legacy launch images: images are sized exactly for the device's screen size. Does not support the iPad Pro 12.9's native resolution or split-screen/slide-over multitasking. + +2. Launch storyboard images: Images are sized based on scale, idiom, and size classes. Supports all devices, and can be used with split-screen/slide-over multitasking. + +Apple is moving away from legacy launch images. There is no official support for providing a native-resolution launch image for the iPad Pro 12.9 or for providing launch images that work with split-screen multitasking or slide-over. If your app doesn't need to support these contexts, then you can continue to use legacy launch images for as long as you like. + +The preferred method of providing launch images is to use a launch storyboard. For native app developers, the ideal launch storyboard is an unpopulated version of the app's user interface at launch. For non-native app developers who don't wish to learn Interface Builder, however, this plugin simulates the legacy launch image method as much as is feasible. + +#### Legacy launch images + +If you choose to use legacy launch images, you will use the following syntax in `config.xml`: + +``` + + + + + + + + + +``` + +Technically the filename for the `src` attribute can be anything you want; the filenames are used because they match what will be used when your project is compiled. The width and height attributes determine which launch images are displayed on which devices as follows: + +| width | height | device (orientation) | +|:-----------:|:------------:|:--------------------------------:| +| 320 | 480 | All non-retina iPhones and iPods | +| 640 | 960 | iPhone 4/4s (portrait) | +| 640 | 1136 | iPhone 5/5s/SE (portrait) | +| 750 | 1334 | iPhone 6/6s/7 (portrait) | +| 1242 | 2208 | iPhone 6+/6s+/7+ (portrait) | +| 2208 | 1242 | iPhone 6+/6s+/7+ (landscape) | +| 768 | 1024 | All non-retina iPads (portrait) | +| 1024 | 768 | All non-retina iPads (landscape) | +| 1536 | 2048 | All retina iPads (portrait) | +| 2048 | 1536 | All retina iPads (landscape) | + +Note: It is vitally important that the source image actually matches the size specified in the `width` and `height` attributes. If it does not, the device may fail to render it properly, if at all. + +#### Launch storyboard images + +In order to support newer form factors and split-screen/slide-over multitasking, you should use launch storyboard images. These are similar to the legacy launch images above, but there are crucial differences: + + - images are not specific to a given device. + + - images are scaled to fill the available viewport (while maintaining the aspect ratio). + + - the outer edges of the images will be cropped, and the amount will vary based on device an viewport. + + - there is no need to provide an image for each possible device, viewport, and orientation; iOS will choose the best image for the situation automatically. + +##### Designing launch storyboard images + +The key to designing a launch storyboard image is understanding that the edges of the image will almost certainly be cropped. Therefore, one should not place any important information near the edges of any images provided to the launch storyboard. Only the center is a safe area, and this all but guarantees that following Apple's advice of presenting an unpopulated user interface will not work well. + +Instead, the following tips should enable you to create a launch image that works across a multitude of form factors, viewports, and orientations: + + - Important graphics (logos, icons, titles) should be centered. The safe bounding region will vary, so you will need to test to ensure that the important graphics are never cropped. Better yet, don't supply any important graphics in the first place. + + - You _can_ fine-tune the placement and size of these graphics, but you don't have the same fine-grained control as you did with legacy launch images. + + - Use a simple color wash. If you use two colors, you'll want one color to fill the top half of the image, and the second to fill the bottom half. If you use a gradient, you'll probably want to ensure that the middle of the gradient lines up with the center of the image. + + - Don't worry about pixel perfection -- because the images are scaled, there's almost no chance the images will be perfectly fit to the pixel grid. Since all supported iOS devices use retina screens, users will be hard pressed to notice it anyway. + +It is important to understand the concept of scale, idiom, and size class traits in order to use launch storyboard images effectively. Of the images supplied to the launch storyboard, iOS will choose the image that best matches the device and viewport and render that image. It is possible to supply only one launch image if so desired, but it is also possible to fine-tune the displayed launch image based on traits. When fine-tuning, one can ignore traits that aren't targeted or supported by the app. + +> Note: If you are using launch storyboard images, there is no need to include legacy images. If you do, the legacy images will be copied, but not used. + +##### Scale + +| scale | devices | +|:-----------:|:----------------------:| +| 1x | All non-retina devices | +| 2x | Most retina devices | +| 3x | iPhone 6+/6s+,7s+ | + +In general, you'll want to supply 2x and 3x images. Cordova only supports retina devices now, so there's no point in supplying 1x images. + +##### Idioms + +| idiom | devices | +|:-----------:|:-------------:| +| ipad | All iPads | +| iphone | All iPhones and iPod Touches | +| universal | All devices | + +You only need to provide universal images unless you need to fine-tune for a specific device idiom. + +##### Size classes + +There are two size classes applies to both screen axes. Narrow viewports are considered to be the "compact" size class, and remaining viewports are considered "regular". When supplying images to Xcode, however, one must choose between "any & compact" and "any & regular". To stay consistent with the native terminology, this feature will match based on "any" and "compact". `any` will match regular-sized viewports. + +Note: this feature uses `com` as an abbreviation for "compact" classes. + +The following classes are supported by this feature: + +| width | height | orientation | +|:-----------:|:------------:|:-----------------:| +| any | any | any | +| com | any | portrait | +| any | com | landscape (wide) | +| com | com | landscape (narrow)| + +To see the complete list of size classes associated with devices and viewports, see . + +##### Single-image launch screen + +If your launch image is simple, you may be able to avoid creating a lot of different launch images and supply only one. The launch image needs to meet the following requirements: + + - the image should be square + + - the image should be large enough to fit on an iPad Pro 12.9": 2732x2732 + + - anything important should fit within the center + + Keep in mind that the image will be cropped, possibly quite severely, depending upon the viewport. + +Once the image is created, you can include it in your project by adding the following to `config.xml`: + +``` + +``` + +Because only one image is provided, iOS will utilize it in every context. + +##### Multi-image launch screen + +If a single launch image won't meet your needs, you will probably need to supply at least six images, if not more. Furthermore, keep in mind that it will not be possible to fine tune the image to a specific device, but only to a device class, display factor, and viewport size. + +If you don't need to target images to a specific idiom, you should create six images, as follows: + +| scale | idiom | width | height | size | filename | +|:-----------:|:-----------:|:-----------:|:------------:|:----------:|:--------------:| +| 2x* | universal | any | any | 2732x2732 | `Default@2x~universal~anyany.png` | +| 2x | universal | com | any | 1278x2732 | `Default@2x~universal~comany.png` | +| 2x | universal | com | com | 1334x750 | `Default@2x~universal~comcom.png` | +| 3x* | universal | any | any | 2208x2208 | `Default@3x~universal~anyany.png` | +| 3x | universal | any | com | 2208x1242 | `Default@3x~universal~anycom.png` | +| 3x | universal | com | any | 1242x2208 | `Default@3x~universal~comany.png` | + +\* this image is required in order for iOS utilize the other images within this scale and idiom. + +> Note: If the 3x sizes look small too you, that's because there's only one device class that currently has a 3x density: the iPhone 6+/6s+/7+. + +The above looks like the following snippet when present in `config.xml`: + +``` + + + + + + +``` + +Should one need to further fine tune based upon device idiom, one can do so. This might look like so: + +| scale | idiom | width | height | size | filename | +|:-----------:|:-----------:|:-----------:|:------------:|:----------:|:--------------:| +| 2x* | iphone | any | any | 1334x1334 | `Default@2x~iphone~anyany.png` | +| 2x | iphone | com | any | 750x1334 | `Default@2x~iphone~comany.png` | +| 2x | iphone | com | com | 1334x750 | `Default@2x~iphone~comcom.png` | +| 3x* | iphone | any | any | 2208x2208 | `Default@3x~iphone~anyany.png` | +| 3x | iphone | any | com | 2208x1242 | `Default@3x~iphone~anycom.png` | +| 3x | iphone | com | any | 1242x2208 | `Default@3x~iphone~comany.png` | +| 2x* | ipad | any | any | 2732x2732 | `Default@2x~ipad~anyany.png` | +| 2x | ipad | com | any | 1278x2732 | `Default@2x~ipad~comany.png` | + +\* this image is required in order for iOS utilize the other images within this scale and idiom. + +The above looks like the following in `config.xml`: + +``` + + + + + + + + +``` + +##### Quirks and Known Issues + +1. **App on target may not reflect changes to images** + Once you run the app on a target, iOS caches the launch image. Unfortunately, when you chance the images, iOS does _not_ invalidate the cache, which means you'll still see the old launch image. You should either: delete the app, or reset content & settings (simulator). + +2. **Simulator may not show expected images when launched from CLI** + When Xcode deploys to a specific simulator, it only copies the assets that match the simulator's characteristics. For example, if you try to run an app on the iPhone 6s Plus simulator, only @3x launch images are copied. When compiling from the CLI, however, the default is to assume an iPhone 5s, which means only @2x launch images are copied. Unless your launch images are markedly different, chances are good the difference would go unnoticed, but this does mean that the only accurate method of testing is to test on a physical device. + +3. **`anyany` must be provided for other variations to be used** + If you don't provide an `anyany` version of the launch image for a specific scale and idiom, the other variations (like `anycom`, `comany`, and `comcom`) will ignored. + +## Windows-specific information + +Splash screen images can be defined using the [MRT](https://cordova.apache.org/docs/en/dev/config_ref/images.html#windows) concept. +If you specify src="res/windows/splashscreen.png" the following files will be copied into the application's images folder: +`res/windows/splashscreen.png` | `res/windows/splashscreen.scale-100.png`, `res/windows/splashscreen.scale-125.png`, etc. +The following are supported: + +| Scale, % | Project | Width | Height | Filename | +|:------------:|:-------------------:|:-----------:|:------------:|:---------------------------------:| +| 100 | Windows 10/8.1 | 620 | 300 | `splashscreen.png` \| `splashscreen.scale-100.png` | +| 125 | Windows 10 | 775 | 375 | `splashscreen.scale-125.png` | +| 150 | Windows 10 | 930 | 450 | `splashscreen.scale-150.png` | +| 200 | Windows 10 | 1240 | 600 | `splashscreen.scale-200.png` | +| 400 | Windows 10 | 2480 | 1200 | `splashscreen.scale-400.png` | +| 140 | Windows 8.1 | 868 | 420 | `splashscreen.scale-140.png` | +| 180 | Windows 8.1 | 1116 | 540 | `splashscreen.scale-180.png` | +| 100 | Windows Phone 8.1 | 480 | 800 | `splashscreenphone.png` \| `splashscreenphone.scale-100.png` | +| 140 | Windows Phone 8.1 | 672 | 1120 | `splashscreenphone.scale-140.png` | +| 240 | Windows Phone 8.1 | 1152 | 1920 | `splashscreenphone.scale-240.png` | + +__Note__: SplashScreens size for Windows 10 project should not exceed 200 KBytes. +__Note__: Supported formats are `.png`, `.jpg`, `.jpeg`. Mixing of the extensions within a target is not supported. I.e. you can have `splashscreen.jpg` and `splashscreenphone.png` but not `splashscreen.scale-100.png`, `splashscreen.scale-400.jpg`. +__Note__: You may need to reopen Visual Studio solution after changing the images and doing a `cordova prepare` for the changes to take effect. + +## Example Configuration +In the top-level `config.xml` file (not the one in `platforms`), add configuration elements like those specified here. + +Please notice that the value of the "src" attribute is relative to the project root directory and not to the www directory (see `Directory structure` below). You can name the source image whatever you like. The internal name in the app is determined by Cordova. + +Directory structure: + +``` +projectRoot + hooks + platforms + plugins + www + css + img + js + res + screen + android + ios + windows +``` + +```xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +## Preferences + +#### config.xml + +- `AutoHideSplashScreen` (boolean, default to `true`). Indicates whether to hide splash screen automatically or not. Splash screen hidden after amount of time specified in the `SplashScreenDelay` preference. + +```xml + +``` + +- `SplashScreenDelay` (number, default to 3000). Amount of time in milliseconds to wait before automatically hide splash screen. + +```xml + +``` + +Note also that this value used to be seconds, and not milliseconds, so values less than 30 will still be treated as seconds. ( Consider this a deprecated patch that will disapear in some future version. ) + +To disable the splashscreen add the following preference to `config.xml`: +```xml + +``` + +**Windows Quirk**: You should disable the splashscreen in case you are updating the entire document body dynamically (f.e. with a SPA router) to avoid affecting UI/controls. +Note that you should also directly reference `WinJS/base.js` in the page HTML in this case to avoid the issues with activation context ([CB-11658](https://issues.apache.org/jira/browse/CB-11658)). + +**iOS Quirk**: to disable the splashscreen on `ios` platform you should also add `` to `config.xml`. + +- `FadeSplashScreen` (boolean, defaults to `true`): Set to `false` to + prevent the splash screen from fading in and out when its display + state changes. + +```xml + +``` + +- `FadeSplashScreenDuration` (float, defaults to `500`): Specifies the + number of milliseconds for the splash screen fade effect to execute. + +```xml + +``` + +_Note_: `FadeSplashScreenDuration` is included into `SplashScreenDelay`, for example if you have `` and `` defined in `config.xml`: + +- 00:00 - splashscreen is shown +- 00:02 - fading has started +- 00:03 - splashscreen is hidden + +Turning the fading off via `` technically means fading duration to be `0` so that in this example the overall splash delay will still be 3 seconds. + +_Note_: This only applies to the app startup - you need to take the fading timeout into account when manually showing/hiding the splashscreen in the code: + +```javascript +navigator.splashscreen.show(); +window.setTimeout(function () { + navigator.splashscreen.hide(); +}, splashDuration - fadeDuration); +``` + +- `ShowSplashScreenSpinner` (boolean, defaults to `true`): Set to `false` + to hide the splash-screen spinner. + +```xml + +``` + +### Android Quirks + +In your `config.xml`, you can add the following preferences: + +```xml + + + +``` + +"SplashMaintainAspectRatio" preference is optional. If set to true, splash screen drawable is not stretched to fit screen, but instead simply "covers" the screen, like CSS "background-size:cover". This is very useful when splash screen images cannot be distorted in any way, for example when they contain scenery or text. This setting works best with images that have large margins (safe areas) that can be safely cropped on screens with different aspect ratios. + +The plugin reloads splash drawable whenever orientation changes, so you can specify different drawables for portrait and landscape orientations. + +"SplashShowOnlyFirstTime" preference is also optional and defaults to `true`. When set to `true` splash screen will only appear on application launch. However, if you plan to use `navigator.app.exitApp()` to close application and force splash screen appear on next launch, you should set this property to `false` (this also applies to closing the App with Back button). + +"SplashScreenSpinnerColor" preference is also optional and is ignored when not set. Setting it to a valid color name or HEX color code will change the color of the spinner on Android 5.0+ devices. + +### Browser Quirks + +You can use the following preferences in your `config.xml`: + +```xml + + + + + + + + + +``` + +__Note__: `SplashScreen` value should be absolute in order to work in a sub-page. The `SplashScreen` value is used only for the browser platform. The value will be ignored for other platforms. + +### iOS Quirks + +- In iOS, the splashscreen images are called launch images. These images are mandatory on iOS. + +### Windows Quirks + +- `SplashScreenSpinnerColor` (string, defaults to system accent color): hash, rgb notation or CSS color name. + +```xml + + + +``` + +- `SplashScreenBackgroundColor` (string, defaults to #464646): hex notation. + +```xml + +``` + +## Methods + +- splashscreen.show +- splashscreen.hide + +## splashscreen.hide + +Dismiss the splash screen. + +```js +navigator.splashscreen.hide(); +``` + + +### iOS Quirk + +The `config.xml` file's `AutoHideSplashScreen` setting must be +`false`. To delay hiding the splash screen for two seconds, add a +timer such as the following in the `deviceready` event handler: + +```js +setTimeout(function() { + navigator.splashscreen.hide(); +}, 2000); +``` + +## splashscreen.show + +Displays the splash screen. + +```js +navigator.splashscreen.show(); +``` + +Your application cannot call `navigator.splashscreen.show()` until the app has +started and the `deviceready` event has fired. But since typically the splash +screen is meant to be visible before your app has started, that would seem to +defeat the purpose of the splash screen. Providing some configuration in +`config.xml` will automatically `show` the splash screen immediately after your +app launch and before it has fully started and received the `deviceready` +event. For this reason, it is unlikely you need to call `navigator.splashscreen.show()` to make the splash +screen visible for app startup. + +[Apache Cordova issue tracker]: https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Splashscreen%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC diff --git a/plugins/cordova-plugin-splashscreen/RELEASENOTES.md b/plugins/cordova-plugin-splashscreen/RELEASENOTES.md new file mode 100644 index 000000000..e0c90c93b --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/RELEASENOTES.md @@ -0,0 +1,238 @@ + +# Release Notes + +### 5.0.2 (Jan 24, 2018) +* [CB-13750](https://issues.apache.org/jira/browse/CB-13750) Add build-tools-26.0.2 to travis +* [CB-13737](https://issues.apache.org/jira/browse/CB-13737) (iOS): fix Splash screen images for iPhone X + +### 5.0.1 (Dec 27, 2017) +* [CB-13709](https://issues.apache.org/jira/browse/CB-13709) Fix to allow 5.0.0 version install (#144) + +### 5.0.0 (Dec 15, 2017) +* [CB-13677](https://issues.apache.org/jira/browse/CB-13677) Remove deprecated platforms + +### 4.1.0 (Nov 06, 2017) +* [CB-13473](https://issues.apache.org/jira/browse/CB-13473) (CI) Removed **Browser** builds from AppVeyor +* [CB-12011](https://issues.apache.org/jira/browse/CB-12011) (android) added the possibility to change the spinner color on **Android 5.0**+ apps +* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis and AppVeyor +* [CB-13094](https://issues.apache.org/jira/browse/CB-13094) (android) Don't show splash when activity being finished +* [CB-11487](https://issues.apache.org/jira/browse/CB-11487) (browser) Documented `AutoHideSplashScreen` for **Browser** +* [CB-11488](https://issues.apache.org/jira/browse/CB-11488) (browser) The `hide()` call became non re-entrant after the addition of fade out. This fixes the issue. +* [CB-11487](https://issues.apache.org/jira/browse/CB-11487) (browser) The standard `AutoHideSplashScreen` `config.xml` property is now supported by the **Browser** platform. +* [CB-11486](https://issues.apache.org/jira/browse/CB-11486) (browser) `splashScreenDelay` now feed through `parseInt` to ensure it is an integer by the time it's value is passed in to `setTimeout()` in `hide()`. +* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. + +### 4.0.3 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder + +### 4.0.2 (Feb 28, 2017) +* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml` +* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` +* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** +* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges + +### 4.0.1 (Dec 07, 2016) +* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 4.0.1 +* [CB-11751](https://issues.apache.org/jira/browse/CB-11751) 'extendedSplashScreen' is undefined Document that splashscreen needs to be disabled on Windows in case of updating entire document body +* [CB-9287](https://issues.apache.org/jira/browse/CB-9287) Not enough Icons and Splashscreens for **Windows 8.1** and Windows Phone 8.1 +* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" +* [CB-11830](https://issues.apache.org/jira/browse/CB-11830) (iOS) Fix doc typos in PR#114 +* [CB-11829](https://issues.apache.org/jira/browse/CB-11829) (iOS) Support for CB-9762; docs (CB-11830) +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. + +### 4.0.0 (Sep 08, 2016) +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* [CB-11326](https://issues.apache.org/jira/browse/CB-11326) Prevent crash when initializing plugin after navigating to another URL +* Fix crash on **iOS** when reloading page from remote **Safari** +* Add badges for paramedic builds on Jenkins +* Add pull request template. +* [CB-11179](https://issues.apache.org/jira/browse/CB-11179) Extend the windows-splashscreen docs +* [CB-11159](https://issues.apache.org/jira/browse/CB-11159) Fix flaky splashscreen native tests +* [CB-11156](https://issues.apache.org/jira/browse/CB-11156) Change default `FadeSplashScreenDuration` value +* [CB-8056](https://issues.apache.org/jira/browse/CB-8056) Updated the dependency version, added it to the docs +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md +* [CB-8056](https://issues.apache.org/jira/browse/CB-8056) Implement splashscreen for **Windows** platform +* [CB-6498](https://issues.apache.org/jira/browse/CB-6498) Misleading documentation in **Android** Quirks + +### 3.2.2 (Apr 15, 2016) +* [CB-10979](https://issues.apache.org/jira/browse/CB-10979) Fix splashscreen **iOS** native tests. Added `jshintignore` for tests/ios +* [CB-10895](https://issues.apache.org/jira/browse/CB-10895) Transparent Splashscreen view sometimes remains +* [CB-10562](https://issues.apache.org/jira/browse/CB-10562) `hide()` not working in latest splashscreen plug in 3.1.0 in **iOS** +* [CB-10688](https://issues.apache.org/jira/browse/CB-10688) Plugin Splashscreen Readme must have examples. +* [CB-10864](https://issues.apache.org/jira/browse/CB-10864) Run **iOS** native tests on Travis + +### 3.2.1 (Mar 09, 2016) +* [CB-10764](https://issues.apache.org/jira/browse/CB-10764) Remove emoji in cordova-plugin-splashscreen +* [CB-10650](https://issues.apache.org/jira/browse/CB-10650) Non-index content.src causes Splashscreen to be not displayed on **Browser** +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add JSHint for plugins +* [CB-10606](https://issues.apache.org/jira/browse/CB-10606) fix deprecation warning for interfaceOrientation on **iOS** +* chore: edit package.json license to match SPDX id + +### 3.2.0 (Feb 09, 2016) +* [CB-10422](https://issues.apache.org/jira/browse/CB-10422) Splashscreen displays black screen with no image on Android +* [CB-10412](https://issues.apache.org/jira/browse/CB-10412) AutoHideSplashScreen "false" isn't taken in account on iOS +* [CB-9516](https://issues.apache.org/jira/browse/CB-9516) Android SplashScreen - Spinner Does Not Display +* [CB-9094](https://issues.apache.org/jira/browse/CB-9094) Smarter autohide logic on Android +* [CB-8396](https://issues.apache.org/jira/browse/CB-8396) Add AutoHideSplashScreen logic to Android's Splashscreen + +### 3.1.0 (Jan 15, 2016) +* [CB-9538](https://issues.apache.org/jira/browse/CB-9538) Implementing `FadeSplashScreen` feature for **Android** +* [CB-9240](https://issues.apache.org/jira/browse/CB-9240) Cordova splash screen plugin **iPad** landscape mode issue +* [CB-10263](https://issues.apache.org/jira/browse/CB-10263) Fix splashscreen plugin filenames for Asset Catalog +* [CB-9374](https://issues.apache.org/jira/browse/CB-9374) **Android** add `SplashShowOnlyFirstTime` as preference +* [CB-10244](https://issues.apache.org/jira/browse/CB-10244) Don't rotate the **iPhone 6 Plus** splash +* [CB-9043](https://issues.apache.org/jira/browse/CB-9043) Fix the **ios** splashscreen being deformed on orientation change +* [CB-10079](https://issues.apache.org/jira/browse/CB-10079) Splashscreen plugin does not honor `SplashScreenDelay` on **iOS** +* [CB-10231](https://issues.apache.org/jira/browse/CB-10231) Fix `FadeSplashScreen` to default to true on **iOS** + +### 3.0.0 (Nov 18, 2015) +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest +* Fixing contribute link. +* [CB-9750](https://issues.apache.org/jira/browse/CB-9750) `FadeSplashDuration` is now in `msecs` +* [CB-8875](https://issues.apache.org/jira/browse/CB-8875) `FadeSplashScreen` was not fading +* [CB-9467](https://issues.apache.org/jira/browse/CB-9467) SplashScreen does not show any image in hosted app on **Windows 10** +* [CB-7282](https://issues.apache.org/jira/browse/CB-7282) Document `AutoHideSplashScreenpreference` +* [CB-9327](https://issues.apache.org/jira/browse/CB-9327) - Splashscreen not receiving `CDVPageLoadNotification` +* WP8: Avoid config `value` of a wrong element. + +### 2.1.0 (Jun 17, 2015) +* added missing license headers +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-splashscreen documentation translation: cordova-plugin-splashscreen +* fix npm md issue +* Fixed iOS unit tests. +* [CB-3562](https://issues.apache.org/jira/browse/CB-3562): Disable screen rotation for iPhone when splash screen is shown. (closes #47) +* [CB-8988](https://issues.apache.org/jira/browse/CB-8988): Fix rotation on iOS/iPad (closes #46) +* [CB-8904](https://issues.apache.org/jira/browse/CB-8904): Don't reset the static variable when it's destroyed, otherwise we might as well just have a member variable +* Removed wp7 from `plugin.xml` and package.json +* [CB-8750](https://issues.apache.org/jira/browse/CB-8750) [wp8]: Rewrite resoultion helper +* [CB-8750](https://issues.apache.org/jira/browse/CB-8750) [wp8]: Allow resolution-specific splashscreen images +* [CB-8758](https://issues.apache.org/jira/browse/CB-8758) [wp8]: UnauthorizedAccessException on hide() + +### 2.0.0 (Apr 15, 2015) +* give users a way to install the bleeding edge. +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-8797](https://issues.apache.org/jira/browse/CB-8797) - Splashscreen preferences FadeSplashScreenDuration and FadeSplashScreen (iOS) are missing +* [CB-8836](https://issues.apache.org/jira/browse/CB-8836) - Crashes after animating splashscreen +* [CB-8753](https://issues.apache.org/jira/browse/CB-8753) android: Fix missing import in previous commit +* [CB-8753](https://issues.apache.org/jira/browse/CB-8753) android: Adds `SplashMaintainAspectRatio` preference (close #43) +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* [CB-8345](https://issues.apache.org/jira/browse/CB-8345) Make default for splashscreen resource "screen" (which is what template and CLI assume it to be) +* Revert "CB-8345 android: Make "splash" the default resource ID instead of null" +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8345](https://issues.apache.org/jira/browse/CB-8345) android: Make "splash" the default resource ID instead of null +* docs: added Windows to supported platforms +* [CB-7964](https://issues.apache.org/jira/browse/CB-7964) Add cordova-plugin-splashscreen support for browser platform +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* [wp8] oops, Added back config parse result checks +* [WP8] code cleanup, minor refactors, comments to clarify some stuff. +* Extend WP8 Splash Screen to respect SplashScreen and SplashScreenDelay preferences from config file +* [CB-8574](https://issues.apache.org/jira/browse/CB-8574) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-splashscreen documentation translation: cordova-plugin-splashscreen +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file +* [CB-8397](https://issues.apache.org/jira/browse/CB-8397) Add support to 'windows' for showing the Windows Phone splashscreen + +### 1.0.0 (Feb 04, 2015) +* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Stop using deprecated IsIpad macro +* [CB-3679](https://issues.apache.org/jira/browse/CB-3679) Add engine tag for Android >= 3.6.0 due to use of `preferences` +* [CB-3679](https://issues.apache.org/jira/browse/CB-3679) Make SplashScreen plugin compatible with cordova-android@4.0.x + +### 0.3.5 (Dec 02, 2014) +* [CB-7204](https://issues.apache.org/jira/browse/CB-7204) - Race condition when hiding and showing spinner (closes #21) +* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-splashscreen documentation translation: cordova-plugin-splashscreen + +### 0.3.4 (Oct 03, 2014) +* Finalized iOS splash screen (image name) tests. 176 tests in all, 44 for each type of device (iPad, iPhone, iPhone5, iPhone6, iPhone 6 Plus). +* [CB-7633](https://issues.apache.org/jira/browse/CB-7633) - (Re-fix based on updated unit tests) iPhone 6 Plus support +* Updated iOS tests for locked orientations +* Added more iOS splash screen tests. +* [CB-7633](https://issues.apache.org/jira/browse/CB-7633) - Add support for iPhone 6/6+ +* Added failing iPhone 6/6 Plus tests. +* Added 'npm test' +* [CB-7663](https://issues.apache.org/jira/browse/CB-7663) - iOS unit tests for splash screen +* Properly formatted splashscreen preference docs. + +### 0.3.3 (Sep 17, 2014) +* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-splashscreen documentation translation +* Renamed test dir, added nested `plugin.xml` +* added documentation for manual tests +* [CB-7196](https://issues.apache.org/jira/browse/CB-7196) port splashscreen tests to framework + +### 0.3.2 (Aug 06, 2014) +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs +* [CB-7041](https://issues.apache.org/jira/browse/CB-7041) ios: Fix image filename logic when setting the iPad splash screen +* fixes Splashscreen crash on WP8 +* Remove outdated doc + +### 0.3.1 (Jun 05, 2014) +* documentation translation: cordova-plugin-splashscreen +* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen +* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen +* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen +* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen +* [CB-6810](https://issues.apache.org/jira/browse/CB-6810) Add license to CONTRIBUTING.md +* [wp8] updated quirk for and combined iOS,WP8,BB10 quirks as they are all the same +* [wp] implemented OnInit so splash screen can be shown before cordova page is loaded +* [wp] plugin must be autoloaded for AutoHideSplashScreen preference to work +* [CB-6483](https://issues.apache.org/jira/browse/CB-6483) Use splash screen image from manifest on Windows8 +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* Revert "Merge branch 'tizen' of http://github.com/siovene/cordova-plugin-splashscreen" + +### 0.3.0 (Apr 17, 2014) +* Add Tizen support to plugin +* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy +* [CB-4051](https://issues.apache.org/jira/browse/CB-4051): [ios] - Re-fix - Splashscreen rotation problem (closes #13) +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers +* [CB-6465](https://issues.apache.org/jira/browse/CB-6465): Add license headers to Tizen code +* Add NOTICE file + +### 0.2.7 (Feb 05, 2014) +* [CB-3562](https://issues.apache.org/jira/browse/CB-3562) Fix aspect ratio on landscape-only iPhone applications +* [CB-4051](https://issues.apache.org/jira/browse/CB-4051) fix for splashscreen rotation problem + +### 0.2.6 (Jan 02, 2014) +* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for Splashscreen plugin +* Handle error when splash image is missing. + +### 0.2.5 (Dec 4, 2013) +* add ubuntu platform +* Added amazon-fireos platform. Change to use amazon-fireos as a platform if the user agent string contains 'cordova-amazon-fireos' +* [CB-5124](https://issues.apache.org/jira/browse/CB-5124) - Remove splashscreen config.xml values from iOS Configuration Docs, move to plugin docs + +### 0.2.4 (Oct 28, 2013) +* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): add repo + issue tag to `plugin.xml` for splashscreen plugin +* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. + +### 0.2.3 (Oct 9, 2013) +* [CB-4806](https://issues.apache.org/jira/browse/CB-4806) Re-fix Update splashscreen image bounds for iOS 7 +* [CB-4934](https://issues.apache.org/jira/browse/CB-4934) plugin-splashscreen should not show by default on Windows8 +* [CB-4929](https://issues.apache.org/jira/browse/CB-4929) plugin-splashscreen not loading proxy windows8 +* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. + +### 0.2.2 (Sept 25, 2013) +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version +* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.splashscreen to org.apache.cordova.splashscreen +* Rename CHANGELOG.md -> RELEASENOTES.md +* [CB-4806](https://issues.apache.org/jira/browse/CB-4806) Update splashscreen image bounds for iOS 7 +* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. diff --git a/plugins/cordova-plugin-splashscreen/doc/de/README.md b/plugins/cordova-plugin-splashscreen/doc/de/README.md new file mode 100644 index 000000000..f876eff85 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/de/README.md @@ -0,0 +1,119 @@ + + +# cordova-plugin-splashscreen + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen) + +Dieses Plugin zeigt und verbirgt einen Splash-Screen beim Start der Anwendung. + +## Installation + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + + +## Unterstützte Plattformen + + * Amazon Fire OS + * Android + * BlackBerry 10 + * iOS + * Windows Phone 7 und 8 + * Windows 8 + * Windows + * Browser + +## Methoden + + * SplashScreen.Show + * SplashScreen.Hide + +### Android Eigenarten + +Sie müssen in Ihrem `"config.xml"`fügen Sie die folgenden Einstellungen: + + + + + + +Wo Foo ist der Name der Datei Splashscreen, vorzugsweise eine 9-Patch-Datei. Stellen Sie sicher, Splashcreen Dateien zu Ihrem res/xml-Verzeichnis unter den entsprechenden Ordnern hinzuzufügen. Der zweite Parameter stellt dar, wie lange das Splashscreen in Millisekunden angezeigt werden. Es wird standardmäßig auf 3000 ms. Weitere Informationen finden Sie unter [Symbole und Splash-Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). + +"SplashMaintainAspectRatio" Präferenz ist optional. Wenn wahr, Splash-Screen zeichenbaren nicht gestreckt wird, um den Bildschirm passen, sondern stattdessen einfach "" den Bildschirm, wie CSS abdeckt "Hintergrund-Größe: Schutz vor". Dies ist sehr nützlich, wenn Splash-Bildschirm Bilder können nicht, in keiner Weise, zum Beispiel verzerrt werden wenn sie Landschaft oder Text enthalten. Diese Einstellung funktioniert am besten mit Bildern, die große Margen (sichere Bereiche) haben, die sicher auf Bildschirme mit unterschiedlichen Seitenverhältnissen zugeschnitten werden können. + +Das Plugin lädt platsch zeichenbaren wenn Ausrichtung ändert, sodass Sie verschiedene Drawables für hoch- und Querformat Ausrichtungen angeben können. + +### Browser-Eigenheiten + +In Ihrem `"config.xml"`können Sie die folgenden Einstellungen: + + + + + + + + + + + +### iOS Macken + + * `FadeSplashScreen` (Boolean, standardmäßig auf `true festgelegt`): um zu verhindern, dass den Begrüßungsbildschirm ein-und ausblenden bei ihrer Anzeige Statusänderungen auf `false` festgelegt. + + + + + * `FadeSplashScreenDuration` (float, Standardwert ist `2`): gibt die Anzahl der Sekunden für den Begrüßungsbildschirm fade Effekt ausgeführt. + + + + + * `ShowSplashScreenSpinner` (Boolean, standardmäßig auf `true festgelegt`): auf `false` festgelegt wird, um den Begrüßungsbildschirm Spinner auszublenden. + + + + +## SplashScreen.Hide + +Schließen Sie den Splash-Screen. + + navigator.splashscreen.hide(); + + +### BlackBerry 10, WP8, iOS Eigenarten + +Die Datei `config.xml` `AutoHideSplashScreen` Einstellung muss `false` sein. Verstecken des Begrüßungsbildschirms für zwei Sekunden Verzögerung, fügen Sie einen Timer wie die folgende in der `deviceready`-Ereignishandler: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## SplashScreen.Show + +Zeigt den Begrüßungsbildschirm. + + navigator.splashscreen.show(); + + +Ihre Anwendung kann nicht `navigator.splashscreen.show()` aufrufen, bis die app begonnen hat und das `deviceready`-Ereignis ausgelöst hat. Aber da in der Regel der Splash-Screen soll sichtbar sein, bevor die Anwendung gestartet wurde, scheint die Niederlage der Zweck des Begrüßungsbildschirms. Somit einige Konfiguration in der Datei `config.xml` werden automatisch die Splash `show` sofort nach Ihrer app-Start und Bildschirm bevor es voll begonnen hat, und das `deviceready`-Ereignis empfangen. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). Aus diesem Grund ist es unwahrscheinlich, dass Sie `navigator.splashscreen.show()` damit den Splash-Screen sichtbar ist für app-Start aufrufen müssen. \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/doc/de/index.md b/plugins/cordova-plugin-splashscreen/doc/de/index.md new file mode 100644 index 000000000..b9fc40d27 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/de/index.md @@ -0,0 +1,78 @@ + + +# cordova-plugin-splashscreen + +Dieses Plugin zeigt und verbirgt einen Splash-Screen beim Start der Anwendung. + +## Installation + + cordova plugin add cordova-plugin-splashscreen + + +## Unterstützte Plattformen + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 und 8 +* Windows 8 + +## Methoden + +* SplashScreen.Show +* SplashScreen.Hide + +### Android Eigenarten + +Sie müssen in der config.xml folgende Einstellungen vornehmen: + + + + + +Wo Foo ist der Name der Datei Splashscreen, vorzugsweise eine 9-Patch-Datei. Stellen Sie sicher, Splashcreen Dateien zu Ihrem res/xml-Verzeichnis unter den entsprechenden Ordnern hinzuzufügen. Der zweite Parameter stellt dar, wie lange das Splashscreen in Millisekunden angezeigt werden. Es wird standardmäßig auf 3000 ms. Weitere Informationen finden Sie unter [Symbole und Splash-Screens][1]. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## SplashScreen.Hide + +Schließen Sie den Splash-Screen. + + navigator.splashscreen.hide(); + + +### BlackBerry 10, WP8, iOS Eigenarten + +Die Datei `config.xml` `AutoHideSplashScreen` Einstellung muss `false` sein. Verstecken des Begrüßungsbildschirms für zwei Sekunden Verzögerung, fügen Sie einen Timer wie die folgende in der `deviceready`-Ereignishandler: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## SplashScreen.Show + +Zeigt den Begrüßungsbildschirm. + + navigator.splashscreen.show(); + + +Ihre Anwendung kann nicht `navigator.splashscreen.show()` aufrufen, bis die app begonnen hat und das `deviceready`-Ereignis ausgelöst hat. Aber da in der Regel der Splash-Screen soll sichtbar sein, bevor die Anwendung gestartet wurde, scheint die Niederlage der Zweck des Begrüßungsbildschirms. Somit einige Konfiguration in der Datei `config.xml` werden automatisch die Splash `show` sofort nach Ihrer app-Start und Bildschirm bevor es voll begonnen hat, und das `deviceready`-Ereignis empfangen. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens][1]. Aus diesem Grund ist es unwahrscheinlich, dass Sie `navigator.splashscreen.show()` damit den Splash-Screen sichtbar ist für app-Start aufrufen müssen. diff --git a/plugins/cordova-plugin-splashscreen/doc/es/README.md b/plugins/cordova-plugin-splashscreen/doc/es/README.md new file mode 100644 index 000000000..1a94161af --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/es/README.md @@ -0,0 +1,119 @@ + + +# cordova-plugin-splashscreen + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen) + +Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la aplicación. + +## Instalación + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + + +## Plataformas soportadas + + * Amazon fire OS + * Android + * BlackBerry 10 + * iOS + * Windows Phone 7 y 8 + * Windows 8 + * Windows + * Explorador + +## Métodos + + * splashscreen.show + * splashscreen.hide + +### Rarezas Android + +En el `archivo config.xml`, es necesario agregar las siguientes preferencias: + + + + + + +Donde foo es el nombre del archivo splashscreen, preferiblemente un archivo de 9 parche. Asegúrese de agregar tus archivos splashcreen en tu directorio res/xml bajo las carpetas apropiadas. El segundo parámetro representa cuánto aparecerán el splashscreen en milisegundos. Valor predeterminado es ms 3000. Ver [los iconos y salpicadura pantallas](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) para obtener más información. + +Preferencia "SplashMaintainAspectRatio" es opcional. Si establece en true, pantalla dibujable no es estirado para caber la pantalla, pero en su lugar simplemente "cover" la pantalla, como CSS "background-size: cover". Esto es muy útil cuando las imágenes de pantallas splash no distorsionadas de cualquier manera, por ejemplo cuando contienen texto o paisaje. Esta opción funciona mejor con imágenes que tienen bordes grandes (zonas seguras) que pueden ser recortadas con seguridad en pantallas con diferentes relaciones de aspecto. + +El plugin recarga splash dibujable cuando cambia de orientación, por lo que puede especificar diferente dibujo para orientaciones vertical y horizontal. + +### Navegador rarezas + +Puede utilizar las siguientes preferencias en el `archivo config.xml`: + + + + + + + + + + + +### iOS rarezas + + * `FadeSplashScreen` (booleano, por defecto `true`): establecida en `false` para evitar que la pantalla de bienvenida de descolorarse adentro y hacia fuera cuando cambia su estado de presentación. + + + + + * `FadeSplashScreenDuration` (float, por defecto es `2`): especifica el número de segundos para que la pantalla se descolora efecto para ejecutar. + + + + + * `ShowSplashScreenSpinner` (booleano, por defecto `true`): establecida en `false` para ocultar la ruleta de la pantalla de bienvenida. + + + + +## splashscreen.hide + +Despedir a la pantalla de bienvenida. + + navigator.splashscreen.hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `false` . Para retrasar oculta la pantalla splash durante dos segundos, agregue un temporizador como la siguiente en el `deviceready` controlador de eventos: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +Muestra la pantalla de bienvenida. + + navigator.splashscreen.show(); + + +La aplicación no se puede llamar `navigator.splashscreen.show()` hasta que haya iniciado la aplicación y el `deviceready` evento ha despedido. Pero puesto que normalmente la pantalla está destinada a ser visible antes de que comience su aplicación, que parecería que el propósito de la pantalla de bienvenida. Proporcionar cierta configuración en `config.xml` automáticamente `show` la pantalla de presentación inmediatamente después de su lanzamiento de la aplicación y antes de ser completamente ha iniciado y recibió el `deviceready` evento. Ver [los iconos y salpicadura pantallas](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) para obtener más información sobre haciendo esta configuración. Por esta razón, es poco probable que necesitas llamar a `navigator.splashscreen.show()` para hacer la pantalla visible para el inicio de la aplicación. \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/doc/es/index.md b/plugins/cordova-plugin-splashscreen/doc/es/index.md new file mode 100644 index 000000000..3295c27fb --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/es/index.md @@ -0,0 +1,76 @@ + + +# cordova-plugin-splashscreen + +Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la aplicación. + +## Instalación + + cordova plugin add cordova-plugin-splashscreen + + +## Plataformas soportadas + +* Amazon fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 y 8 +* Windows 8 + +## Métodos + +* splashscreen.show +* splashscreen.hide + +### Rarezas Android + +En el archivo config.xml, tienes que añadir las siguientes preferencias: + + < nombre de preferencia = "SplashScreen" value = "foo" / >< nombre de preferencia = "SplashScreenDelay" value = "10000" / > + + +Donde foo es el nombre del archivo splashscreen, preferiblemente un archivo de 9 parche. Asegúrese de agregar tus archivos splashcreen en tu directorio res/xml bajo las carpetas apropiadas. El segundo parámetro representa cuánto aparecerán el splashscreen en milisegundos. Valor predeterminado es ms 3000. Ver [los iconos y salpicadura pantallas][1] para obtener más información. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +Despedir a la pantalla de bienvenida. + + Navigator.SplashScreen.Hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `false` . Para retrasar oculta la pantalla splash durante dos segundos, agregue un temporizador como la siguiente en el `deviceready` controlador de eventos: + + setTimeout(function() {navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +Muestra la pantalla de bienvenida. + + Navigator.SplashScreen.Show(); + + +La aplicación no se puede llamar `navigator.splashscreen.show()` hasta que haya iniciado la aplicación y el `deviceready` evento ha despedido. Pero puesto que normalmente la pantalla está destinada a ser visible antes de que comience su aplicación, que parecería que el propósito de la pantalla de bienvenida. Proporcionar cierta configuración en `config.xml` automáticamente `show` la pantalla de presentación inmediatamente después de su lanzamiento de la aplicación y antes de ser completamente ha iniciado y recibió el `deviceready` evento. Ver [los iconos y salpicadura pantallas][1] para obtener más información sobre haciendo esta configuración. Por esta razón, es poco probable que necesitas llamar a `navigator.splashscreen.show()` para hacer la pantalla visible para el inicio de la aplicación. diff --git a/plugins/cordova-plugin-splashscreen/doc/fr/README.md b/plugins/cordova-plugin-splashscreen/doc/fr/README.md new file mode 100644 index 000000000..65f58803c --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/fr/README.md @@ -0,0 +1,119 @@ + + +# cordova-plugin-splashscreen + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen) + +Ce plugin affiche et masque un écran de démarrage lors du lancement de l'application. + +## Installation + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + + +## Plates-formes supportées + + * Amazon Fire OS + * Android + * BlackBerry 10 + * iOS + * Windows Phone 7 et 8 + * Windows 8 + * Windows + * Navigateur + +## Méthodes + + * splashscreen.Show + * splashscreen.Hide + +### Quirks Android + +Dans votre `fichier config.xml`, vous devez ajouter les préférences suivantes : + + + + + + +Où foo est le nom du fichier splashscreen, préférablement un fichier de 9 correctif. Assurez-vous d'ajouter vos fichiers splashcreen dans votre répertoire res/xml dans les dossiers appropriés. Le deuxième paramètre représente combien de temps le splashscreen apparaîtra en millisecondes. Il est par défaut à 3000 ms. Pour plus d'informations, consultez [icônes et écrans de démarrage](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). + +Préférence de « SplashMaintainAspectRatio » est facultative. Si défini à true, écran de démarrage drawable n'est pas étirée pour s'adapter écran, mais plutôt simplement « couvre » l'écran, comme CSS "fond-taille : couverture". Ceci est très utile lorsque images écran de démarrage ne peut pas être déformées en quelque sorte, par exemple lorsqu'ils contiennent des décors ou texte. Ce paramètre fonctionne mieux avec des images qui ont des marges importantes (zones de sécurité) qui peuvent être recadrées en toute sécurité sur les écrans avec des proportions différentes. + +Le plugin recharge splash drawable chaque fois que l'orientation change, donc vous pouvez spécifier différents drawables pour les orientations portrait et paysage. + +### Bizarreries navigateur + +Vous pouvez utiliser les préférences suivantes dans votre `fichier config.xml`: + + + + + + + + + + + +### Notes au sujet d'iOS + + * `FadeSplashScreen` (boolean, par défaut est `true`): la valeur `false` pour empêcher l'écran de démarrage de fading in et out lorsque son état d'affichage est modifié. + + + + + * `FadeSplashScreenDuration` (float, la valeur par défaut `2`): spécifie le nombre de secondes que l'écran de démarrage s'estomper l'effet d'exécuter. + + + + + * `ShowSplashScreenSpinner` (boolean, par défaut est `true`): la valeur `false` pour masquer le cône de l'écran de démarrage. + + + + +## splashscreen.Hide + +Faire disparaître de l'écran de démarrage. + + navigator.splashscreen.hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +Paramètre `AutoHideSplashScreen` du fichier `config.xml` doit avoir la valeur `false`. Pour retarder la cacher l'écran de démarrage pendant deux secondes, ajouter un minuteur semblable à la suivante dans le gestionnaire d'événements `deviceready` : + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.Show + +Affiche l'écran de démarrage. + + navigator.splashscreen.show(); + + +Votre application ne peut pas appeler `navigator.splashscreen.show()` jusqu'à ce que l'application a commencé et l'événement `deviceready` est déclenché. Mais puisqu'en général, l'écran de démarrage est destiné à être visible avant que votre application a commencé, qui semblerait à l'encontre des objectifs de l'écran de démarrage. Fournir une configuration dans le fichier `config.xml` automatiquement `show` le splash projettera immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu l'événement `deviceready`. Voir les [icônes et les écrans de démarrage](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) pour plus d'informations sur la conduite de cette configuration. Pour cette raison, il est peu probable que vous devez appeler `navigator.splashscreen.show()` pour rendre l'écran de démarrage visible pour le démarrage de l'application. \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/doc/fr/index.md b/plugins/cordova-plugin-splashscreen/doc/fr/index.md new file mode 100644 index 000000000..6d2fd0881 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/fr/index.md @@ -0,0 +1,78 @@ + + +# cordova-plugin-splashscreen + +Ce plugin affiche et masque un écran de démarrage lors du lancement de l'application. + +## Installation + + cordova plugin add cordova-plugin-splashscreen + + +## Plates-formes prises en charge + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 et 8 +* Windows 8 + +## Méthodes + +* splashscreen.Show +* splashscreen.Hide + +### Quirks Android + +Dans votre fichier config.xml, vous devez ajouter les préférences suivantes : + + + + + +Où foo est le nom du fichier splashscreen, préférablement un fichier de 9 correctif. Assurez-vous d'ajouter vos fichiers splashcreen dans votre répertoire res/xml dans les dossiers appropriés. Le deuxième paramètre représente combien de temps le splashscreen apparaîtra en millisecondes. Il est par défaut à 3000 ms. Pour plus d'informations, consultez [icônes et écrans de démarrage][1]. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.Hide + +Faire disparaître de l'écran de démarrage. + + navigator.splashscreen.hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +Paramètre `AutoHideSplashScreen` du fichier `config.xml` doit avoir la valeur `false`. Pour retarder la cacher l'écran de démarrage pendant deux secondes, ajouter un minuteur semblable à la suivante dans le gestionnaire d'événements `deviceready` : + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.Show + +Affiche l'écran de démarrage. + + navigator.splashscreen.show(); + + +Votre application ne peut pas appeler `navigator.splashscreen.show()` jusqu'à ce que l'application a commencé et l'événement `deviceready` est déclenché. Mais puisqu'en général, l'écran de démarrage est destiné à être visible avant que votre application a commencé, qui semblerait à l'encontre des objectifs de l'écran de démarrage. Fournir une configuration dans le fichier `config.xml` automatiquement `show` le splash projettera immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu l'événement `deviceready`. Voir les [icônes et les écrans de démarrage][1] pour plus d'informations sur la conduite de cette configuration. Pour cette raison, il est peu probable que vous devez appeler `navigator.splashscreen.show()` pour rendre l'écran de démarrage visible pour le démarrage de l'application. diff --git a/plugins/cordova-plugin-splashscreen/doc/it/README.md b/plugins/cordova-plugin-splashscreen/doc/it/README.md new file mode 100644 index 000000000..2a6c6ba4c --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/it/README.md @@ -0,0 +1,119 @@ + + +# cordova-plugin-splashscreen + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen) + +Questo plugin Visualizza e nasconde una schermata iniziale durante l'avvio dell'applicazione. + +## Installazione + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + + +## Piattaforme supportate + + * Amazon fuoco OS + * Android + * BlackBerry 10 + * iOS + * Windows Phone 7 e 8 + * Windows 8 + * Windows + * Browser + +## Metodi + + * splashscreen + * splashscreen.Hide + +### Stranezze Android + +Nel vostro `config. XML`, è necessario aggiungere le seguenti preferenze: + + + + + + +Dove foo è il nome del file splashscreen, preferibilmente un file 9 patch. Assicurati di aggiungere i tuoi file splashcreen res/xml nella directory sotto cartelle appropriate. Il secondo parametro rappresenta quanto tempo lo splashscreen apparirà in millisecondi. Il valore predefinito è 3000 ms. Per ulteriori informazioni, vedere [icone e schermate iniziali](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). + +"SplashMaintainAspectRatio" preferenza è facoltativo. Se impostato su true, schermata iniziale drawable non viene adattata per misura lo schermo, ma invece semplicemente "copre" lo schermo, come CSS "sfondo-dimensione: copertina". Questo è molto utile quando immagini schermata iniziale non possono essere distorta in qualche modo, per esempio quando contengono testo o scenario. Questa impostazione funziona meglio con immagini che hanno grandi margini (zone sicure) che possono essere ritagliati in modo sicuro su schermi con proporzioni diverse. + +Il plugin viene ricaricata splash drawable ogni volta che cambia orientamento, è possibile specificare diversi parte per orientamento verticale e orizzontale. + +### Stranezze browser + +Nel vostro `config. XML`, è possibile utilizzare le seguenti preferenze: + + + + + + + + + + + +### iOS stranezze + + * `FadeSplashScreen` (boolean, impostazioni predefinite a `true`): impostare su `false` per impedire che la schermata iniziale e scompaiono quando cambia il relativo stato di visualizzazione. + + + + + * `FadeSplashScreenDuration` (float, il valore predefinito è `2`): specifica il numero di secondi per la schermata iniziale dissolvenza effetto da eseguire. + + + + + * `ShowSplashScreenSpinner` (boolean, impostazioni predefinite a `true`): impostare su `false` per nascondere la filatrice schermata iniziale. + + + + +## splashscreen.Hide + +Respingere la schermata iniziale. + + navigator.splashscreen.hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +Impostazione `AutoHideSplashScreen` del file `config.xml` deve essere `false`. Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel gestore eventi `deviceready`: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen + +Visualizza la schermata iniziale. + + navigator.splashscreen.show(); + + +L'applicazione non può chiamare `navigator.splashscreen.show()` fino a quando l'app ha iniziato e ha generato l'evento `deviceready`. Ma poiché in genere la schermata iniziale è destinata ad essere visibile prima app ha iniziato, che sembrerebbe per sconfiggere lo scopo della schermata iniziale. Fornendo qualche configurazione nel `file config.xml` sarà automaticamente `show` il tonfo schermo subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto l'evento `deviceready`. Per ulteriori informazioni su facendo questa configurazione, vedere [icone e schermate iniziali](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). Per questo motivo, è improbabile che dovete chiamare `navigator.splashscreen.show()` per rendere la schermata visibile per avvio di app. \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/doc/it/index.md b/plugins/cordova-plugin-splashscreen/doc/it/index.md new file mode 100644 index 000000000..70435415a --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/it/index.md @@ -0,0 +1,78 @@ + + +# cordova-plugin-splashscreen + +Questo plugin Visualizza e nasconde una schermata iniziale durante l'avvio dell'applicazione. + +## Installazione + + cordova plugin add cordova-plugin-splashscreen + + +## Piattaforme supportate + +* Amazon fuoco OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 e 8 +* Windows 8 + +## Metodi + +* splashscreen +* splashscreen.Hide + +### Stranezze Android + +Nel vostro config. xml, è necessario aggiungere le seguenti preferenze: + + + + + +Dove foo è il nome del file splashscreen, preferibilmente un file 9 patch. Assicurati di aggiungere i tuoi file splashcreen res/xml nella directory sotto cartelle appropriate. Il secondo parametro rappresenta quanto tempo lo splashscreen apparirà in millisecondi. Il valore predefinito è 3000 ms. Per ulteriori informazioni, vedere [icone e schermate iniziali][1]. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.Hide + +Respingere la schermata iniziale. + + navigator.splashscreen.hide(); + + +### BlackBerry 10, WP8, iOS Quirk + +Impostazione `AutoHideSplashScreen` del file `config.xml` deve essere `false`. Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel gestore eventi `deviceready`: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen + +Visualizza la schermata iniziale. + + navigator.splashscreen.show(); + + +L'applicazione non può chiamare `navigator.splashscreen.show()` fino a quando l'app ha iniziato e ha generato l'evento `deviceready`. Ma poiché in genere la schermata iniziale è destinata ad essere visibile prima app ha iniziato, che sembrerebbe per sconfiggere lo scopo della schermata iniziale. Fornendo qualche configurazione nel `file config.xml` sarà automaticamente `show` il tonfo schermo subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto l'evento `deviceready`. Per ulteriori informazioni su facendo questa configurazione, vedere [icone e schermate iniziali][1]. Per questo motivo, è improbabile che dovete chiamare `navigator.splashscreen.show()` per rendere la schermata visibile per avvio di app. diff --git a/plugins/cordova-plugin-splashscreen/doc/ja/README.md b/plugins/cordova-plugin-splashscreen/doc/ja/README.md new file mode 100644 index 000000000..a688b2798 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/ja/README.md @@ -0,0 +1,119 @@ + + +# cordova-plugin-splashscreen + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen) + +ã“ã®ãƒ—ラグインãŒè¡¨ç¤ºã•れã€ã‚¢ãƒ—リケーションã®èµ·å‹•中ã«ã‚¹ãƒ—ラッシュ スクリーンをéžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ + +## インストール + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * ã‚¢ãƒžã‚¾ãƒ³ç« OS + * アンドロイド + * ブラックベリー 10 + * iOS + * Windows Phone 7 㨠8 + * Windows 8 + * Windows + * ブラウザー + +## メソッド + + * splashscreen.show + * splashscreen.hide + +### Android ã®ç™– + +ã‚ãªãŸã®`config.xml`å†…ã®æ¬¡ã®è¨­å®šã‚’追加ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + + + + + +Foo ãŒã§ãれ㰠9 パッãƒãƒ•ァイル splashscreen ファイルã®åå‰ã§ã™ã€‚ è§£åƒåº¦/xml ディレクトリã®é©åˆ‡ãªãƒ•ォルダーã®ä¸‹ã« splashcreen ファイルを追加ã™ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ 2 番目ã®ãƒ‘ラメーターã¯ã€ã‚¹ãƒ—ラッシュ ・ スクリーンãŒã®è¡¨ç¤ºæ™‚é–“ (ミリ秒å˜ä½) を表ã—ã¾ã™ã€‚ デフォルトã§ã¯ 3000 ミリ秒ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã€[アイコンã¨ã‚¹ãƒ—ラッシュ画é¢](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +"SplashMaintainAspectRatio"ã®è¨­å®šã¯ã‚ªãƒ—ションã§ã™ã€‚ True ã®å ´åˆã€ã‚¹ãƒ—ãƒ©ãƒƒã‚·ãƒ¥ç”»é¢æç”»ã«è¨­å®šç”»é¢ã‚’埋ã‚ã‚‹ãŸã‚ã«æ‹¡å¤§ã•れã¾ã›ã‚“ãŒã€ä»£ã‚りã«å˜ã«ã€Œã‚«ãƒãƒ¼ã€ç”»é¢ã§ã¯ã€CSS ã®ã‚ˆã†ãªå ´åˆã€ŒèƒŒæ™¯-サイズ: ã‚«ãƒãƒ¼ã€. ã“れã¯ã€ãŸã¨ãˆã°é¢¨æ™¯ã¾ãŸã¯ãƒ†ã‚­ã‚¹ãƒˆãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ä»»æ„ã®æ–¹æ³•ã§ã‚¹ãƒ—ラッシュ画é¢ç”»åƒãŒæ­ªã‚€ã“ã¨ãŒã§ããªã„éžå¸¸ã«ä¾¿åˆ©ã§ã™ã€‚ ã“ã®è¨­å®šã¯ã€ç”»é¢ã¨ç•°ãªã‚‹ç¸¦æ¨ªæ¯”ã§å®‰å…¨ã«ãƒˆãƒªãƒŸãƒ³ã‚°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™å¤§è¦æ¨¡ãªãƒžãƒ¼ã‚¸ãƒ³ (安全ãªåœ°åŸŸ) ã®ç”»åƒã«é©ã—ã¦ã„ã¾ã™ã€‚ + +ç¸¦é•·ã¨æ¨ªé•·ã®ç•°ãªã‚‹ãƒ‰ãƒ­ã‚¦ã‚¢ãƒ–ルを指定ã§ãるよã†ã«ã€ãƒ—ラグインã¯å‘ãを変更ã™ã‚‹ãŸã³ã«ã‚¹ãƒ—ラッシュ ドロウアブルをリロードã—ã¾ã™ã€‚ + +### ブラウザーã®ç™– + +ã‚ãªãŸã®`config.xml`ã§æ¬¡ã®è¨­å®šã‚’使用ã§ãã¾ã™ã€‚ + + + + + + + + + + + +### iOS ã®ç™– + + * `FadeSplashScreen`(ãƒ–ãƒ¼ãƒ«å€¤ã€æ—¢å®šã§ [ `true`): スプラッシュ画é¢ãŒãƒ•ェードインã¨ãƒ•ェードアウトã®è¡¨ç¤ºçŠ¶æ…‹ãŒå¤‰æ›´ã•れãŸã¨ãã™ã‚‹ã“ã¨ã‚’防ããŸã‚ã«`false`ã«è¨­å®šã—ã¾ã™ã€‚ + + + + + * `FadeSplashScreenDuration`(float, デフォルトã¯`2`): スプラッシュ画é¢ã®ç§’æ•°ã®ãƒ•ェードを実行ã™ã‚‹åŠ¹æžœã‚’æŒ‡å®šã—ã¾ã™ã€‚ + + + + + * `ShowSplashScreenSpinner`(ãƒ–ãƒ¼ãƒ«å€¤ã€æ—¢å®šã§ [ `true`): スプラッシュ スクリーン スピナーをéžè¡¨ç¤ºã«ã™ã‚‹ã‚’`false`ã«è¨­å®šã—ã¾ã™ã€‚ + + + + +## splashscreen.hide + +スプラッシュ スクリーンを閉ã˜ã¾ã™ã€‚ + + navigator.splashscreen.hide(); + + +### ブラックベリー 10ã€WP8ã€iOS ã®æ°—ã¾ãれ + +`config.xml` ファイル㮠`AutoHideSplashScreen` ã®è¨­å®šã¯ `false` ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ é…å»¶ã‚’ 2 秒間スプラッシュ スクリーンをéžè¡¨ç¤ºã« `deviceready` イベント ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã§ã€æ¬¡ã®ã‚ˆã†ã‚¿ã‚¤ãƒžãƒ¼ã‚’追加ã—ã¾ã™ã€‚ + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +スプラッシュ画é¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + navigator.splashscreen.show(); + + +アプリãŒé–‹å§‹ã•れã€`deviceready` イベントãŒç™ºç”Ÿã™ã‚‹ã¾ã§ã€ã‚¢ãƒ—リケーション㯠`navigator.splashscreen.show()` を呼ã³å‡ºã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã—ã‹ã—ã€ä»¥æ¥ã€é€šå¸¸ã‚¹ãƒ—ラッシュ画é¢ã‚¢ãƒ—リ開始å‰ã«è¡¨ç¤ºã™ã‚‹ã‚‚ã®ã§ã™ã¨æ€ã‚れるã€ã‚¹ãƒ—ラッシュ スクリーンã®ç›®çš„ã®æ•—北ã—ã¾ã™ã€‚ `config.xml` ã«ã„ãã¤ã‹ã®æ§‹æˆã‚’æä¾›ã™ã‚‹ã¯è‡ªå‹•的㫠`表示` スプラッシュ画é¢ã€ã‚¢ãƒ—リを起動後ã™ãã«ã€ãれãŒå®Œå…¨ã«èµ·å‹•ã—ã€`deviceready` イベントをå—ä¿¡ã™ã‚‹å‰ã«ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã“ã®æ§‹æˆã‚’行ã†ã«ã¯ã€[アイコンã¨ã‚¹ãƒ—ラッシュ画é¢](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 ã“ã®ç†ç”±ã®ãŸã‚ã«ã‚¢ãƒ—リ起動時ã®ã‚¹ãƒ—ラッシュ ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚’ç¢ºèª `navigator.splashscreen.show()` をコールã™ã‚‹å¿…è¦ãŒã‚ã‚‹å¯èƒ½æ€§ãŒé«˜ã„ã§ã™ã€‚ \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/doc/ja/index.md b/plugins/cordova-plugin-splashscreen/doc/ja/index.md new file mode 100644 index 000000000..24e72e5ab --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/ja/index.md @@ -0,0 +1,78 @@ + + +# cordova-plugin-splashscreen + +ã“ã®ãƒ—ラグインãŒè¡¨ç¤ºã•れã€ã‚¢ãƒ—リケーションã®èµ·å‹•中ã«ã‚¹ãƒ—ラッシュ スクリーンをéžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ + +## インストール + + cordova plugin add cordova-plugin-splashscreen + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* ã‚¢ãƒžã‚¾ãƒ³ç« OS +* アンドロイド +* ブラックベリー 10 +* iOS +* Windows Phone 7 㨠8 +* Windows 8 + +## メソッド + +* splashscreen.show +* splashscreen.hide + +### Android ã®ç™– + +ã‚ãªãŸã® config.xml を以下ã®è¨­å®šã‚’追加ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + + + + +Foo ãŒã§ãれ㰠9 パッãƒãƒ•ァイル splashscreen ファイルã®åå‰ã§ã™ã€‚ è§£åƒåº¦/xml ディレクトリã®é©åˆ‡ãªãƒ•ォルダーã®ä¸‹ã« splashcreen ファイルを追加ã™ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ 2 番目ã®ãƒ‘ラメーターã¯ã€ã‚¹ãƒ—ラッシュ ・ スクリーンãŒã®è¡¨ç¤ºæ™‚é–“ (ミリ秒å˜ä½) を表ã—ã¾ã™ã€‚ デフォルトã§ã¯ 3000 ミリ秒ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã€[アイコンã¨ã‚¹ãƒ—ラッシュ画é¢][1] ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +スプラッシュ スクリーンを閉ã˜ã¾ã™ã€‚ + + navigator.splashscreen.hide(); + + +### ブラックベリー 10ã€WP8ã€iOS ã®æ°—ã¾ãれ + +`config.xml` ファイル㮠`AutoHideSplashScreen` ã®è¨­å®šã¯ `false` ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ é…å»¶ã‚’ 2 秒間スプラッシュ スクリーンをéžè¡¨ç¤ºã« `deviceready` イベント ãƒãƒ³ãƒ‰ãƒ©ãƒ¼ã§ã€æ¬¡ã®ã‚ˆã†ã‚¿ã‚¤ãƒžãƒ¼ã‚’追加ã—ã¾ã™ã€‚ + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +スプラッシュ画é¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + navigator.splashscreen.show(); + + +アプリãŒé–‹å§‹ã•れã€`deviceready` イベントãŒç™ºç”Ÿã™ã‚‹ã¾ã§ã€ã‚¢ãƒ—リケーション㯠`navigator.splashscreen.show()` を呼ã³å‡ºã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã—ã‹ã—ã€ä»¥æ¥ã€é€šå¸¸ã‚¹ãƒ—ラッシュ画é¢ã‚¢ãƒ—リ開始å‰ã«è¡¨ç¤ºã™ã‚‹ã‚‚ã®ã§ã™ã¨æ€ã‚れるã€ã‚¹ãƒ—ラッシュ スクリーンã®ç›®çš„ã®æ•—北ã—ã¾ã™ã€‚ `config.xml` ã«ã„ãã¤ã‹ã®æ§‹æˆã‚’æä¾›ã™ã‚‹ã¯è‡ªå‹•的㫠`表示` スプラッシュ画é¢ã€ã‚¢ãƒ—リを起動後ã™ãã«ã€ãれãŒå®Œå…¨ã«èµ·å‹•ã—ã€`deviceready` イベントをå—ä¿¡ã™ã‚‹å‰ã«ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã“ã®æ§‹æˆã‚’行ã†ã«ã¯ã€[アイコンã¨ã‚¹ãƒ—ラッシュ画é¢][1] ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 ã“ã®ç†ç”±ã®ãŸã‚ã«ã‚¢ãƒ—リ起動時ã®ã‚¹ãƒ—ラッシュ ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚’ç¢ºèª `navigator.splashscreen.show()` をコールã™ã‚‹å¿…è¦ãŒã‚ã‚‹å¯èƒ½æ€§ãŒé«˜ã„ã§ã™ã€‚ diff --git a/plugins/cordova-plugin-splashscreen/doc/ko/README.md b/plugins/cordova-plugin-splashscreen/doc/ko/README.md new file mode 100644 index 000000000..5e10d207e --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/ko/README.md @@ -0,0 +1,119 @@ + + +# cordova-plugin-splashscreen + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen) + +ì´ í”ŒëŸ¬ê·¸ì¸ì€ 표시 하 ê³  ì‘ìš© 프로그램 실행 하는 ë™ì•ˆ 시작 í™”ë©´ì„ ìˆ¨ê¹ë‹ˆë‹¤. + +## 설치 + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * 아마존 화재 ìš´ì˜ ì²´ì œ + * 안 드 로ì´ë“œ + * 블랙베리 10 + * iOS + * Windows Phone 7ê³¼ 8 + * 윈ë„ìš° 8 + * 윈ë„ìš° + * 브ë¼ìš°ì € + +## 메서드 + + * splashscreen.show + * splashscreen.hide + +### 안 드 로ì´ë“œ ë‹¨ì  + +`Config.xml`ì— ë‹¤ìŒ í™˜ê²½ ì„¤ì •ì— ì¶”ê°€ 해야 합니다. + + + + + + +여기서 foo splashscreen 파ì¼, 선호 9 패치 파ì¼ì˜ ì´ë¦„입니다. ì ì ˆ 한 í´ë” 아래 res/xml ë””ë ‰í† ë¦¬ì— splashcreen 파ì¼ì„ 추가 해야 합니다. ë‘ ë²ˆì§¸ 매개 변수는 splashscreen 얼마나 밀리초 단위로 표시 ë©ë‹ˆë‹¤ 나타냅니다. 3000 ms 기본값으로 사용 ë©ë‹ˆë‹¤. ìžì„¸í•œ ë‚´ìš©ì€ [ì•„ì´ì½˜ ë° ì‹œìž‘ 화면ì„](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) 참조 하십시오. + +"SplashMaintainAspectRatio" ì·¨í–¥ì€ ì„ íƒ ì‚¬í•­ìž…ë‹ˆë‹¤. Drawable, 시작 화면 설정 í™”ë©´ì— ë§žê²Œ 확장 ë˜ì§€ 하지만 대신 단순히 "커버" CSS ê°™ì€ í™”ë©´ "ë°°ê²½-í¬ê¸°: ë®ê°œ". 시작 화면 ì´ë¯¸ì§€ 예: í’ê²½ ë˜ëŠ” í…스트를 í¬í•¨ 하는 경우 ì–´ë–¤ ì‹ìœ¼ë¡œë“ ì—서 왜곡 ë  ìˆ˜ 없는 ê²½ìš°ì— ë§¤ìš° 유용 합니다. ì´ ì„¤ì •ì€ í° ì—¬ë°± (안전 지역) 안전 하 게 다른 종횡비와 í™”ë©´ì— ìžë¥¼ 수 있는 ì´ë¯¸ì§€ì— 가장 ì í•© 합니다. + +í”ŒëŸ¬ê·¸ì¸ ë‹¤ì‹œ 로드 스플래시 drawable ë°©í–¥ì´ ë³€ê²½ ë  ë•Œë§ˆë‹¤ 세로 ë° ê°€ë¡œ ë°©í–¥ì— ëŒ€ 한 다른 drawables를 지정할 수 있ë„ë¡ í•©ë‹ˆë‹¤. + +### 브ë¼ìš°ì € 만지면 + +`Config.xml`ì— ë‹¤ìŒ ê¸°ë³¸ ì„¤ì •ì„ ì‚¬ìš©í•  수 있습니다. + + + + + + + + + + + +### iOS ë‹¨ì  + + * `FadeSplashScreen` (부울 `true`로 기본값): 시작 화면 표시 ìƒíƒœë¡œ 변경 ë  ë•Œ 밖으로 퇴색 하지 않ë„ë¡ í•˜ë ¤ë©´ `false` 로 설정. + + + + + * `FadeSplashScreenDuration` (ë¶€ë™, `2`기본값): 시작 í™”ë©´ì— ëŒ€ 한 ì´ˆ 페ì´ë“œ 효과를 실행 하는 지정 합니다. + + + + + * `ShowSplashScreenSpinner` (부울 `true`로 기본값): 스플래시 화면 회전ìžë¥¼ 숨기려면 `false` 로 설정. + + + + +## splashscreen.hide + +시작 í™”ë©´ì„ ë‹«ìŠµë‹ˆë‹¤. + + navigator.splashscreen.hide(); + + +### 블랙베리 10, WP8, iOS 특질 + +`config.xml` 파ì¼ì˜ `AutoHideSplashScreen` ì„¤ì •ì„ `false` 여야 합니다. 2 ì´ˆ ë™ì•ˆ 시작 í™”ë©´ì„ ìˆ¨ê¸°ê³  지연, `deviceready` ì´ë²¤íЏ 처리기ì—서 다ìŒê³¼ ê°™ì€ íƒ€ì´ë¨¸ë¥¼ 추가: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +시작 í™”ë©´ì„ í‘œì‹œí•©ë‹ˆë‹¤. + + navigator.splashscreen.show(); + + +ì‘ìš© 프로그램 시작 ë° `deviceready` ì´ë²¤íŠ¸ëŠ” ë°œìƒ ë  ë•Œê¹Œì§€ ì‘ìš© í”„ë¡œê·¸ëž¨ì´ `navigator.splashscreen.show()`ì„ í˜¸ì¶œí•  수 없습니다. 하지만 ê·¸ 스플래시 스í¬ë¦°ì˜ ëª©ì  ê²ƒ 같다 ì¼ë°˜ì ìœ¼ë¡œ 시작 í™”ë©´ì´ ë‹¹ì‹ ì˜ ì• í”Œ 리 ì¼€ì´ ì…˜ 시작 하기 ì „ì— í‘œì‹œ ë  ìš´ëª…ì´ ë‹¤, ì´í›„. `config.xmlì—서` 몇 가지 êµ¬ì„±ì„ ì œê³µ 하 ìžë™ìœ¼ë¡œ 스플래시 `표시` 화면 애플 리 ì¼€ì´ ì…˜ 출시 ì§í›„와 ê·¸ê²ƒì€ ì™„ë²½ 하 게 시작 하 ê³  `deviceready` ì´ë²¤íŠ¸ë¥¼ ë°›ì€ ì „ì—. ì´ êµ¬ì„± 하 ê³  ìžì„¸í•œ ë‚´ìš©ì€ [ì•„ì´ì½˜ ë° ì‹œìž‘ 화면ì„](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) 참조 하십시오. ì´ëŸ¬í•œ ì´ìœ ë¡œ, ê·¸ê²ƒì€ ê°€ëŠ¥ì„±ì´ ì‹œìž‘ í™”ë©´ì€ ì‘ìš© 프로그램 ì‹œìž‘ì— ëŒ€ 한 표시 ë˜ë„ë¡ `navigator.splashscreen.show()`를 호출 해야입니다. \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/doc/ko/index.md b/plugins/cordova-plugin-splashscreen/doc/ko/index.md new file mode 100644 index 000000000..6a0ea9898 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/ko/index.md @@ -0,0 +1,78 @@ + + +# cordova-plugin-splashscreen + +ì´ í”ŒëŸ¬ê·¸ì¸ì€ 표시 하 ê³  ì‘ìš© 프로그램 실행 하는 ë™ì•ˆ 시작 í™”ë©´ì„ ìˆ¨ê¹ë‹ˆë‹¤. + +## 설치 + + cordova plugin add cordova-plugin-splashscreen + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* 아마존 화재 ìš´ì˜ ì²´ì œ +* 안 드 로ì´ë“œ +* 블랙베리 10 +* iOS +* Windows Phone 7ê³¼ 8 +* 윈ë„ìš° 8 + +## 메서드 + +* splashscreen.show +* splashscreen.hide + +### 안 드 로ì´ë“œ ë‹¨ì  + +ë‹¹ì‹ ì˜ config.xmlì— ë‹¤ìŒ í™˜ê²½ ì„¤ì •ì— ì¶”ê°€ 해야 합니다. + + + + + +여기서 foo splashscreen 파ì¼, 선호 9 패치 파ì¼ì˜ ì´ë¦„입니다. ì ì ˆ 한 í´ë” 아래 res/xml ë””ë ‰í† ë¦¬ì— splashcreen 파ì¼ì„ 추가 해야 합니다. ë‘ ë²ˆì§¸ 매개 변수는 splashscreen 얼마나 밀리초 단위로 표시 ë©ë‹ˆë‹¤ 나타냅니다. 3000 ms 기본값으로 사용 ë©ë‹ˆë‹¤. ìžì„¸í•œ ë‚´ìš©ì€ [ì•„ì´ì½˜ ë° ì‹œìž‘ 화면ì„][1] 참조 하십시오. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +시작 í™”ë©´ì„ ë‹«ìŠµë‹ˆë‹¤. + + navigator.splashscreen.hide(); + + +### 블랙베리 10, WP8, iOS 특질 + +`config.xml` 파ì¼ì˜ `AutoHideSplashScreen` ì„¤ì •ì„ `false` 여야 합니다. 2 ì´ˆ ë™ì•ˆ 시작 í™”ë©´ì„ ìˆ¨ê¸°ê³  지연, `deviceready` ì´ë²¤íЏ 처리기ì—서 다ìŒê³¼ ê°™ì€ íƒ€ì´ë¨¸ë¥¼ 추가: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +시작 í™”ë©´ì„ í‘œì‹œí•©ë‹ˆë‹¤. + + navigator.splashscreen.show(); + + +ì‘ìš© 프로그램 시작 ë° `deviceready` ì´ë²¤íŠ¸ëŠ” ë°œìƒ ë  ë•Œê¹Œì§€ ì‘ìš© í”„ë¡œê·¸ëž¨ì´ `navigator.splashscreen.show()`ì„ í˜¸ì¶œí•  수 없습니다. 하지만 ê·¸ 스플래시 스í¬ë¦°ì˜ ëª©ì  ê²ƒ 같다 ì¼ë°˜ì ìœ¼ë¡œ 시작 í™”ë©´ì´ ë‹¹ì‹ ì˜ ì• í”Œ 리 ì¼€ì´ ì…˜ 시작 하기 ì „ì— í‘œì‹œ ë  ìš´ëª…ì´ ë‹¤, ì´í›„. `config.xmlì—서` 몇 가지 êµ¬ì„±ì„ ì œê³µ 하 ìžë™ìœ¼ë¡œ 스플래시 `표시` 화면 애플 리 ì¼€ì´ ì…˜ 출시 ì§í›„와 ê·¸ê²ƒì€ ì™„ë²½ 하 게 시작 하 ê³  `deviceready` ì´ë²¤íŠ¸ë¥¼ ë°›ì€ ì „ì—. ì´ êµ¬ì„± 하 ê³  ìžì„¸í•œ ë‚´ìš©ì€ [ì•„ì´ì½˜ ë° ì‹œìž‘ 화면ì„][1] 참조 하십시오. ì´ëŸ¬í•œ ì´ìœ ë¡œ, ê·¸ê²ƒì€ ê°€ëŠ¥ì„±ì´ ì‹œìž‘ í™”ë©´ì€ ì‘ìš© 프로그램 ì‹œìž‘ì— ëŒ€ 한 표시 ë˜ë„ë¡ `navigator.splashscreen.show()`를 호출 해야입니다. diff --git a/plugins/cordova-plugin-splashscreen/doc/pl/README.md b/plugins/cordova-plugin-splashscreen/doc/pl/README.md new file mode 100644 index 000000000..0156be56b --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/pl/README.md @@ -0,0 +1,119 @@ + + +# cordova-plugin-splashscreen + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen) + +Ten plugin wyÅ›wietla i ukrywa ekran powitalny podczas uruchamiania aplikacji. + +## Instalacja + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + + +## ObsÅ‚ugiwane platformy + + * Amazon Fire OS + * Android + * BlackBerry 10 + * iOS + * Windows Phone 7 i 8 + * Windows 8 + * Windows + * PrzeglÄ…darka + +## Metody + + * splashscreen.show + * splashscreen.Hide + +### Dziwactwa Androida + +W pliku `config.xml`musisz dodać nastÄ™pujÄ…ce preferencje: + + + + + + +Gdzie foo jest nazwÄ… pliku ekranu powitalnego, najlepiej 9 Å‚atce. Upewnij siÄ™ dodać pliki splashcreen do katalogu res/xml w odpowiednich folderach. Drugi parametr reprezentuje, jak dÅ‚ugo ekranu powitalnego pojawi siÄ™ w milisekundach. DomyÅ›lnie 3000 ms. Aby uzyskać wiÄ™cej informacji, zobacz [ikony i ekrany powitalne w aplikacjach](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). + +"SplashMaintainAspectRatio" preferencji jest opcjonalne. JeÅ›li zestaw na wartość true, ekran powitalny dolarowe nie jest rozciÄ…gniÄ™ty do ekranów, ale zamiast po prostu "obejmuje" ekranu, jak CSS "tÅ‚o-rozmiar: okÅ‚adka". Jest to bardzo przydatne, kiedy opryskać tÄ™cza obrazy nie znieksztaÅ‚cony w jakikolwiek sposób, na przykÅ‚ad, gdy zawierajÄ… one dekoracje lub tekst. To ustawienie dziaÅ‚a najlepiej z obrazów, które majÄ… duże marginesy (bezpiecznych obszarów), które mogÄ… być bezpiecznie przyciÄ™te na ekrany z różnych proporcji. + +Plugin Å‚aduje rozchlapać dolarowe, gdy zmienia orientacjÄ™, tak można okreÅ›lić różnych drawables do orientacji pionowej i poziomej. + +### Quirks przeglÄ…darki + +W pliku `config.xml`można użyć nastÄ™pujÄ…ce preferencje: + + + + + + + + + + + +### Dziwactwa iOS + + * `FadeSplashScreen` (wartość logiczna, domyÅ›lnie `true`): zestaw na `false` , aby zapobiec ZnikajÄ…ca i odkÅ‚adane po zmianie stanu wyÅ›wietlania ekranu powitalnego. + + + + + * `FadeSplashScreenDuration` (float, domyÅ›lnie `2`): okreÅ›la liczbÄ™ sekund dla ekranu powitalnego zanikanie efekt do wykonać. + + + + + * `ShowSplashScreenSpinner` (wartość logiczna, domyÅ›lnie `true`): zestaw na `false` , aby ukryć pokrÄ™tÅ‚a ekran powitalny. + + + + +## splashscreen.Hide + +Odrzucić ten opryskaæ têcza. + + navigator.splashscreen.hide(); + + +### Jeżyna 10, WP8, iOS dziwactwo + +Plik `config.xml` `AutoHideSplashScreen` ustawienie musi być `false`. Opóźnienia, ukrywanie ekranu powitalnego przez dwie sekundy, dodać timer nastÄ™pujÄ…cych w `deviceready` obsÅ‚uga zdarzeÅ„: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +WyÅ›wietla ekran powitalny. + + navigator.splashscreen.show(); + + +Aplikacja nie można wywoÅ‚ać `navigator.splashscreen.show()`, aż aplikacja zostaÅ‚a uruchomiona i zdarzenie `deviceready` zostaÅ‚ zwolniony. Ale ponieważ zazwyczaj opryskać tÄ™cza ma być widoczne przed rozpoczÄ™ciem aplikacji, wydaje siÄ™ sprzeczne z celem ekranu powitalnego. Dostarczanie niektórych konfiguracji w `pliku config.xml` bÄ™dzie automatycznie `show` splash na ekranie natychmiast po uruchomienie aplikacji i przed peÅ‚ni rozpoczÄ…Å‚ i odebraÅ‚ zdarzenie `deviceready`. Aby uzyskać wiÄ™cej informacji na robienie tej konfiguracji, zobacz [ikony i ekrany powitalne w aplikacjach](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). Z tego powodu jest maÅ‚o prawdopodobne, należy zadzwonić `navigator.splashscreen.show()`, aby wyÅ›wietlić ekran powitalny dla uruchamiania aplikacji. \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/doc/pl/index.md b/plugins/cordova-plugin-splashscreen/doc/pl/index.md new file mode 100644 index 000000000..33045cb7d --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/pl/index.md @@ -0,0 +1,78 @@ + + +# cordova-plugin-splashscreen + +Ten plugin wyÅ›wietla i ukrywa ekran powitalny podczas uruchamiania aplikacji. + +## Instalacja + + cordova plugin add cordova-plugin-splashscreen + + +## ObsÅ‚ugiwane platformy + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 i 8 +* Windows 8 + +## Metody + +* splashscreen.show +* splashscreen.Hide + +### Dziwactwa Androida + +W pliku config.xml musisz dodać nastÄ™pujÄ…ce preferencje: + + + + + +Gdzie foo jest nazwÄ… pliku ekranu powitalnego, najlepiej 9 Å‚atce. Upewnij siÄ™ dodać pliki splashcreen do katalogu res/xml w odpowiednich folderach. Drugi parametr reprezentuje, jak dÅ‚ugo ekranu powitalnego pojawi siÄ™ w milisekundach. DomyÅ›lnie 3000 ms. Aby uzyskać wiÄ™cej informacji, zobacz [ikony i ekrany powitalne w aplikacjach][1]. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.Hide + +Odrzucić ten opryskaæ têcza. + + navigator.splashscreen.hide(); + + +### Jeżyna 10, WP8, iOS dziwactwo + +Plik `config.xml` `AutoHideSplashScreen` ustawienie musi być `false`. Opóźnienia, ukrywanie ekranu powitalnego przez dwie sekundy, dodać timer nastÄ™pujÄ…cych w `deviceready` obsÅ‚uga zdarzeÅ„: + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +WyÅ›wietla ekran powitalny. + + navigator.splashscreen.show(); + + +Aplikacja nie można wywoÅ‚ać `navigator.splashscreen.show()`, aż aplikacja zostaÅ‚a uruchomiona i zdarzenie `deviceready` zostaÅ‚ zwolniony. Ale ponieważ zazwyczaj opryskać tÄ™cza ma być widoczne przed rozpoczÄ™ciem aplikacji, wydaje siÄ™ sprzeczne z celem ekranu powitalnego. Dostarczanie niektórych konfiguracji w `pliku config.xml` bÄ™dzie automatycznie `show` splash na ekranie natychmiast po uruchomienie aplikacji i przed peÅ‚ni rozpoczÄ…Å‚ i odebraÅ‚ zdarzenie `deviceready`. Aby uzyskać wiÄ™cej informacji na robienie tej konfiguracji, zobacz [ikony i ekrany powitalne w aplikacjach][1]. Z tego powodu jest maÅ‚o prawdopodobne, należy zadzwonić `navigator.splashscreen.show()`, aby wyÅ›wietlić ekran powitalny dla uruchamiania aplikacji. diff --git a/plugins/cordova-plugin-splashscreen/doc/ru/index.md b/plugins/cordova-plugin-splashscreen/doc/ru/index.md new file mode 100644 index 000000000..635c22d89 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/ru/index.md @@ -0,0 +1,75 @@ + + +# cordova-plugin-splashscreen + +Этот плагин отображает и Ñкрывает Ñкран-заÑтавку при запуÑке приложениÑ. + +## УÑтановка + + cordova plugin add cordova-plugin-splashscreen + + +## Поддерживаемые платформы + +* Amazon Fire OS +* Android +* BlackBerry 10 +* iOS +* Windows Phone 7 и 8 +* Windows 8 + +## Методы + +* splashscreen.show +* splashscreen.hide + +### ОÑобенноÑти Android + +Ð’ вашем файле config.xml необходимо добавить Ñледующие наÑтройки: + +`` `` + +Где foo Ñто Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° splashscreen, желательно 9 заплатку. УбедитеÑÑŒ в том добавить ваши splashcreen файлы в папку res/xml в ÑоответÑтвующие папки. Второй параметр предÑтавлÑет, как долго splashscreen поÑвитÑÑ Ð² миллиÑекундах. По умолчанию он 3000 МС. Увидеть [иконки и заÑтавки][1] Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð¹ информации. + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +Закройте Ñкран-заÑтавка. + + Navigator.SplashScreen.Hide(); + + +### ОÑобенноÑти BlackBerry 10, WP8, iOS + +`config.xml`Файла `AutoHideSplashScreen` должен быть `false` . Ð”Ð»Ñ Ð·Ð°Ð´ÐµÑ€Ð¶ÐºÐ¸ ÑÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ð·Ð°Ñтавки на две Ñекунды, добавить таймер, например в `deviceready` обработчик Ñобытий: + + setTimeout(function() {navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +Отображает Ñкран-заÑтавку. + + Navigator.SplashScreen.Show(); + + +Ваше приложение не может вызвать `navigator.splashscreen.show()` до тех пор, пока приложение началаÑÑŒ и `deviceready` Ñобытие инициировано. Ðо поÑкольку обычно Ñкран-заÑтавка должен быть видимым до начала вашего приложениÑ, что казалоÑÑŒ бы поражение цели Ñкрана-заÑтавки. ПредоÑтавление некоторых конфигурации в `config.xml` будет автоматичеÑки `show` Ñкран-заÑтавку Ñразу же поÑле запуÑка вашего Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¸ перед его полноÑтью запущен и получил `deviceready` Ñобытие. Увидеть [иконки и заÑтавки][1] Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð¹ информации на делать Ñтой конфигурации. По Ñтой причине маловероÑтно, вам нужно вызвать `navigator.splashscreen.show()` Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñкрана-заÑтавки Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка приложениÑ. diff --git a/plugins/cordova-plugin-splashscreen/doc/zh/README.md b/plugins/cordova-plugin-splashscreen/doc/zh/README.md new file mode 100644 index 000000000..da37405bf --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/zh/README.md @@ -0,0 +1,119 @@ + + +# cordova-plugin-splashscreen + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen) + +這個外掛程å¼é¡¯ç¤ºå’Œéš±è—在應用程å¼å•Ÿå‹•期間的åˆå§‹èž¢å¹•。 + +## å®‰è£ + + // npm hosted (new) id + cordova plugin add cordova-plugin-splashscreen + // you may also install directly from this repo + cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git + + +## 支æ´çš„平臺 + + * 亞馬éœç« OS + * Android 系統 + * 黑莓 10 + * iOS + * Windows Phone 7 å’Œ 8 + * Windows 8 + * Windows + * ç€è¦½å™¨ + +## 方法 + + * splashscreen.show + * splashscreen.hide + +### Android 的怪癖 + +在你的`config.xml`ï¼Œæ‚¨éœ€è¦æ·»åŠ ä»¥ä¸‹å„ªæƒ : + + + + + + +ç¾Žå­šåœ¨å“ªè£¡é–ƒå±æª”,最好是 9 ä¿®è£œç¨‹å¼æª”çš„å稱。 è«‹ç¢ºä¿æ‚¨çš„ splashcreen 檔添加到 res/xml 目錄下相應的資料夾。 ç¬¬äºŒå€‹åƒæ•¸è¡¨ç¤ºå¤šä¹…é–ƒå±æœƒé¡¯ç¤ºä»¥æ¯«ç§’為單ä½ã€‚ 它將é è¨­ç‚º 3000 毫秒。 有關更多資訊,請åƒè¦‹ [圖示和啟動畫é¢](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)。 + +"SplashMaintainAspectRatio"首é¸é …是å¯é¸çš„。 如果設置為 true,å¯ç¹ªè£½çš„åˆå§‹èž¢å¹•䏿œƒæ‹‰ä¼¸ä»¥é©åˆèž¢å¹•,但相ååªæ˜¯"覆蓋"èž¢å¹•ï¼Œåƒ CSS"背景-大å°: è“‹"。 這是éžå¸¸æœ‰ç”¨çš„ä¸èƒ½ä»¥ä»»ä½•æ–¹å¼ï¼Œä¾‹å¦‚ç•¶ä»–å€‘åŒ…å«æ–‡æœ¬æˆ–風景畸變閃å±åœ–åƒæ™‚。 此設置é©ç”¨äºŽæœ‰å¤§åˆ©æ½¤ (安全å€),å¯ä»¥å®‰å…¨åœ°è£å‰ªä¸åŒé•·å¯¬æ¯”與螢幕上的圖åƒã€‚ + +該外掛程å¼é‡æ–°è¼‰å…¥åˆå§‹å¯ç¹ªè£½åªè¦æ–¹å‘發生變化,所以您å¯ä»¥æŒ‡å®šä¸åŒçš„ç•«æ¿ç‚ºç¸±å‘å’Œæ©«å‘æ–¹å‘。 + +### ç€è¦½å™¨çš„æ€ªç™– + +ä½ å¯ä»¥ç”¨ä½ çš„`config.xml`下列優先é¸é …: + + + + + + + + + + + +### iOS 的怪癖 + + * `FadeSplashScreen`(é è¨­ç‚º`true`的布林值): 設置為`false` ,以防止出ç¾é–ƒå±è¡°è½å’Œé€€å‡ºå…¶é¡¯ç¤ºç‹€æ…‹ç™¼ç”Ÿè®ŠåŒ–時。 + + + + + * `FadeSplashScreenDuration`(float,é è¨­ç‚º`2`): 指定的閃å±ç§’數淡出效果來執行。 + + + + + * `ShowSplashScreenSpinner`(boolean, `true`的布林值): 設置為`false`來隱è—åˆå§‹èž¢å¹•微調框。 + + + + +## splashscreen.hide + +解雇的閃å±ã€‚ + + navigator.splashscreen.hide(); + + +### 黑莓 10,WP8,iOS 怪癖 + +`config.xml` 檔 `AutoHideSplashScreen` 設置必須是 `å‡` 的。 è‹¥è¦å»¶é²å…©ç§’é˜éš±è—的閃å±ï¼Œ`deviceready` 事件處ç†å¸¸å¼ä¸­æ·»åŠ ä¸€å€‹è¨ˆæ™‚å™¨ï¼Œå¦‚ä¸‹æ‰€ç¤ºï¼š + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +顯示åˆå§‹èž¢å¹•。 + + navigator.splashscreen.show(); + + +您的應用程å¼ç„¡æ³•調用 `navigator.splashscreen.show()`,直到該應用程å¼å·²å•Ÿå‹•,且觸發了 `deviceready` 事件。 但是,由於通常的閃å±ç‚ºäº†æ˜¯å¯è¦‹çš„在您的應用程å¼å•Ÿå‹•之å‰ï¼Œé€™ä¼¼ä¹Žæœƒæ‰“æ•—é–ƒå±çš„目的。 æä¾›ä¸€äº›é…置在 `config.xml` 中的會自動 `show` åˆå§‹èž¢å¹•您的應用程å¼å•Ÿå‹•後立å³å’Œä¹‹å‰å®ƒå·²ç¶“完全起步並收到 `deviceready` 事件。 åšé€™ç¨®é…置的詳細資訊,請åƒé–± [圖示和啟動畫é¢](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)。 出於此原因,ä¸å¤ªå¯èƒ½æ‚¨éœ€è¦èª¿ç”¨ `navigator.splashscreen.show()`,使åˆå§‹èž¢å¹•å¯è¦‹ç‚ºæ‡‰ç”¨ç¨‹å¼å•Ÿå‹•。 \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/doc/zh/index.md b/plugins/cordova-plugin-splashscreen/doc/zh/index.md new file mode 100644 index 000000000..efb309d0d --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/doc/zh/index.md @@ -0,0 +1,78 @@ + + +# cordova-plugin-splashscreen + +這個外掛程å¼é¡¯ç¤ºå’Œéš±è—在應用程å¼å•Ÿå‹•期間的åˆå§‹èž¢å¹•。 + +## å®‰è£ + + cordova plugin add cordova-plugin-splashscreen + + +## 支æ´çš„平臺 + +* 亞馬éœç« OS +* Android 系統 +* 黑莓 10 +* iOS +* Windows Phone 7 å’Œ 8 +* Windows 8 + +## 方法 + +* splashscreen.show +* splashscreen.hide + +### Android 的怪癖 + +在你的 config.xmlï¼Œæ‚¨éœ€è¦æ·»åŠ ä»¥ä¸‹å„ªæƒ ï¼š + + + + + +ç¾Žå­šåœ¨å“ªè£¡é–ƒå±æª”,最好是 9 ä¿®è£œç¨‹å¼æª”çš„å稱。 è«‹ç¢ºä¿æ‚¨çš„ splashcreen 檔添加到 res/xml 目錄下相應的資料夾。 ç¬¬äºŒå€‹åƒæ•¸è¡¨ç¤ºå¤šä¹…é–ƒå±æœƒé¡¯ç¤ºä»¥æ¯«ç§’為單ä½ã€‚ 它將é è¨­ç‚º 3000 毫秒。 有關更多資訊,請åƒè¦‹ [圖示和啟動畫é¢][1]。 + + [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html + +## splashscreen.hide + +解雇的閃å±ã€‚ + + navigator.splashscreen.hide(); + + +### 黑莓 10,WP8,iOS 怪癖 + +`config.xml` 檔 `AutoHideSplashScreen` 設置必須是 `å‡` 的。 è‹¥è¦å»¶é²å…©ç§’é˜éš±è—的閃å±ï¼Œ`deviceready` 事件處ç†å¸¸å¼ä¸­æ·»åŠ ä¸€å€‹è¨ˆæ™‚å™¨ï¼Œå¦‚ä¸‹æ‰€ç¤ºï¼š + + setTimeout(function() { + navigator.splashscreen.hide(); + }, 2000); + + +## splashscreen.show + +顯示åˆå§‹èž¢å¹•。 + + navigator.splashscreen.show(); + + +您的應用程å¼ç„¡æ³•調用 `navigator.splashscreen.show()`,直到該應用程å¼å·²å•Ÿå‹•,且觸發了 `deviceready` 事件。 但是,由於通常的閃å±ç‚ºäº†æ˜¯å¯è¦‹çš„在您的應用程å¼å•Ÿå‹•之å‰ï¼Œé€™ä¼¼ä¹Žæœƒæ‰“æ•—é–ƒå±çš„目的。 æä¾›ä¸€äº›é…置在 `config.xml` 中的會自動 `show` åˆå§‹èž¢å¹•您的應用程å¼å•Ÿå‹•後立å³å’Œä¹‹å‰å®ƒå·²ç¶“完全起步並收到 `deviceready` 事件。 åšé€™ç¨®é…置的詳細資訊,請åƒé–± [圖示和啟動畫é¢][1]。 出於此原因,ä¸å¤ªå¯èƒ½æ‚¨éœ€è¦èª¿ç”¨ `navigator.splashscreen.show()`,使åˆå§‹èž¢å¹•å¯è¦‹ç‚ºæ‡‰ç”¨ç¨‹å¼å•Ÿå‹•。 diff --git a/plugins/cordova-plugin-splashscreen/package.json b/plugins/cordova-plugin-splashscreen/package.json new file mode 100644 index 000000000..2f48e4313 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + "cordova-plugin-splashscreen@5.0.2", + "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular" + ] + ], + "_from": "cordova-plugin-splashscreen@5.0.2", + "_id": "cordova-plugin-splashscreen@5.0.2", + "_inBundle": false, + "_integrity": "sha1-dH509W4gHNWFvGLRS8oZ9oZ/8e0=", + "_location": "/cordova-plugin-splashscreen", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cordova-plugin-splashscreen@5.0.2", + "name": "cordova-plugin-splashscreen", + "escapedName": "cordova-plugin-splashscreen", + "rawSpec": "5.0.2", + "saveSpec": null, + "fetchSpec": "5.0.2" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.2.tgz", + "_spec": "5.0.2", + "_where": "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular", + "author": { + "name": "Apache Software Foundation" + }, + "bugs": { + "url": "https://issues.apache.org/jira/browse/CB" + }, + "cordova": { + "id": "cordova-plugin-splashscreen", + "platforms": [ + "android", + "ubuntu", + "ios", + "windows", + "browser" + ] + }, + "description": "Cordova Splashscreen Plugin", + "devDependencies": { + "jshint": "^2.6.0" + }, + "engines": { + "cordovaDependencies": { + "2.0.0": { + "cordova-android": ">=3.6.0" + }, + "4.0.0": { + "cordova-android": ">=3.6.0", + "cordova-windows": ">=4.4.0" + }, + "6.0.0": { + "cordova": ">100" + } + } + }, + "homepage": "https://github.com/apache/cordova-plugin-splashscreen#readme", + "keywords": [ + "cordova", + "splashscreen", + "ecosystem:cordova", + "cordova-android", + "cordova-ios", + "cordova-windows" + ], + "license": "Apache-2.0", + "name": "cordova-plugin-splashscreen", + "repository": { + "type": "git", + "url": "git+https://github.com/apache/cordova-plugin-splashscreen.git" + }, + "scripts": { + "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests", + "test": "npm run jshint" + }, + "types": "./types/index.d.ts", + "version": "5.0.2" +} diff --git a/plugins/cordova-plugin-splashscreen/plugin.xml b/plugins/cordova-plugin-splashscreen/plugin.xml new file mode 100644 index 000000000..bf3c8a436 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/plugin.xml @@ -0,0 +1,82 @@ + + + + + Splashscreen + Cordova Splashscreen Plugin + Apache 2.0 + cordova,splashscreen + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + https://issues.apache.org/jira/browse/CB/component/12320653 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-splashscreen/src/android/SplashScreen.java b/plugins/cordova-plugin-splashscreen/src/android/SplashScreen.java new file mode 100644 index 000000000..6f56c6c64 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/src/android/SplashScreen.java @@ -0,0 +1,413 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova.splashscreen; + +import android.app.Dialog; +import android.app.ProgressDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.res.Configuration; +import android.content.res.ColorStateList; +import android.graphics.Color; +import android.graphics.drawable.ColorDrawable; +import android.os.Handler; +import android.view.Display; +import android.view.Gravity; +import android.view.View; +import android.view.ViewGroup.LayoutParams; +import android.view.WindowManager; +import android.view.animation.Animation; +import android.view.animation.AlphaAnimation; +import android.view.animation.DecelerateInterpolator; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.ProgressBar; +import android.widget.RelativeLayout; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.json.JSONArray; +import org.json.JSONException; + +public class SplashScreen extends CordovaPlugin { + private static final String LOG_TAG = "SplashScreen"; + // Cordova 3.x.x has a copy of this plugin bundled with it (SplashScreenInternal.java). + // Enable functionality only if running on 4.x.x. + private static final boolean HAS_BUILT_IN_SPLASH_SCREEN = Integer.valueOf(CordovaWebView.CORDOVA_VERSION.split("\\.")[0]) < 4; + private static final int DEFAULT_SPLASHSCREEN_DURATION = 3000; + private static final int DEFAULT_FADE_DURATION = 500; + private static Dialog splashDialog; + private static ProgressDialog spinnerDialog; + private static boolean firstShow = true; + private static boolean lastHideAfterDelay; // https://issues.apache.org/jira/browse/CB-9094 + + /** + * Displays the splash drawable. + */ + private ImageView splashImageView; + + /** + * Remember last device orientation to detect orientation changes. + */ + private int orientation; + + // Helper to be compile-time compatible with both Cordova 3.x and 4.x. + private View getView() { + try { + return (View)webView.getClass().getMethod("getView").invoke(webView); + } catch (Exception e) { + return (View)webView; + } + } + + private int getSplashId() { + int drawableId = 0; + String splashResource = preferences.getString("SplashScreen", "screen"); + if (splashResource != null) { + drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getClass().getPackage().getName()); + if (drawableId == 0) { + drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getPackageName()); + } + } + return drawableId; + } + + @Override + protected void pluginInitialize() { + if (HAS_BUILT_IN_SPLASH_SCREEN) { + return; + } + // Make WebView invisible while loading URL + // CB-11326 Ensure we're calling this on UI thread + cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + getView().setVisibility(View.INVISIBLE); + } + }); + int drawableId = getSplashId(); + + // Save initial orientation. + orientation = cordova.getActivity().getResources().getConfiguration().orientation; + + if (firstShow) { + boolean autoHide = preferences.getBoolean("AutoHideSplashScreen", true); + showSplashScreen(autoHide); + } + + if (preferences.getBoolean("SplashShowOnlyFirstTime", true)) { + firstShow = false; + } + } + + /** + * Shorter way to check value of "SplashMaintainAspectRatio" preference. + */ + private boolean isMaintainAspectRatio () { + return preferences.getBoolean("SplashMaintainAspectRatio", false); + } + + private int getFadeDuration () { + int fadeSplashScreenDuration = preferences.getBoolean("FadeSplashScreen", true) ? + preferences.getInteger("FadeSplashScreenDuration", DEFAULT_FADE_DURATION) : 0; + + if (fadeSplashScreenDuration < 30) { + // [CB-9750] This value used to be in decimal seconds, so we will assume that if someone specifies 10 + // they mean 10 seconds, and not the meaningless 10ms + fadeSplashScreenDuration *= 1000; + } + + return fadeSplashScreenDuration; + } + + @Override + public void onPause(boolean multitasking) { + if (HAS_BUILT_IN_SPLASH_SCREEN) { + return; + } + // hide the splash screen to avoid leaking a window + this.removeSplashScreen(true); + } + + @Override + public void onDestroy() { + if (HAS_BUILT_IN_SPLASH_SCREEN) { + return; + } + // hide the splash screen to avoid leaking a window + this.removeSplashScreen(true); + // If we set this to true onDestroy, we lose track when we go from page to page! + //firstShow = true; + } + + @Override + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + if (action.equals("hide")) { + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + webView.postMessage("splashscreen", "hide"); + } + }); + } else if (action.equals("show")) { + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + webView.postMessage("splashscreen", "show"); + } + }); + } else { + return false; + } + + callbackContext.success(); + return true; + } + + @Override + public Object onMessage(String id, Object data) { + if (HAS_BUILT_IN_SPLASH_SCREEN) { + return null; + } + if ("splashscreen".equals(id)) { + if ("hide".equals(data.toString())) { + this.removeSplashScreen(false); + } else { + this.showSplashScreen(false); + } + } else if ("spinner".equals(id)) { + if ("stop".equals(data.toString())) { + getView().setVisibility(View.VISIBLE); + } + } else if ("onReceivedError".equals(id)) { + this.spinnerStop(); + } + return null; + } + + // Don't add @Override so that plugin still compiles on 3.x.x for a while + public void onConfigurationChanged(Configuration newConfig) { + if (newConfig.orientation != orientation) { + orientation = newConfig.orientation; + + // Splash drawable may change with orientation, so reload it. + if (splashImageView != null) { + int drawableId = getSplashId(); + if (drawableId != 0) { + splashImageView.setImageDrawable(cordova.getActivity().getResources().getDrawable(drawableId)); + } + } + } + } + + private void removeSplashScreen(final boolean forceHideImmediately) { + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if (splashDialog != null && splashDialog.isShowing()) { + final int fadeSplashScreenDuration = getFadeDuration(); + // CB-10692 If the plugin is being paused/destroyed, skip the fading and hide it immediately + if (fadeSplashScreenDuration > 0 && forceHideImmediately == false) { + AlphaAnimation fadeOut = new AlphaAnimation(1, 0); + fadeOut.setInterpolator(new DecelerateInterpolator()); + fadeOut.setDuration(fadeSplashScreenDuration); + + splashImageView.setAnimation(fadeOut); + splashImageView.startAnimation(fadeOut); + + fadeOut.setAnimationListener(new Animation.AnimationListener() { + @Override + public void onAnimationStart(Animation animation) { + spinnerStop(); + } + + @Override + public void onAnimationEnd(Animation animation) { + if (splashDialog != null && splashDialog.isShowing()) { + splashDialog.dismiss(); + splashDialog = null; + splashImageView = null; + } + } + + @Override + public void onAnimationRepeat(Animation animation) { + } + }); + } else { + spinnerStop(); + splashDialog.dismiss(); + splashDialog = null; + splashImageView = null; + } + } + } + }); + } + + /** + * Shows the splash screen over the full Activity + */ + @SuppressWarnings("deprecation") + private void showSplashScreen(final boolean hideAfterDelay) { + final int splashscreenTime = preferences.getInteger("SplashScreenDelay", DEFAULT_SPLASHSCREEN_DURATION); + final int drawableId = getSplashId(); + + final int fadeSplashScreenDuration = getFadeDuration(); + final int effectiveSplashDuration = Math.max(0, splashscreenTime - fadeSplashScreenDuration); + + lastHideAfterDelay = hideAfterDelay; + + // Prevent to show the splash dialog if the activity is in the process of finishing + if (cordova.getActivity().isFinishing()) { + return; + } + // If the splash dialog is showing don't try to show it again + if (splashDialog != null && splashDialog.isShowing()) { + return; + } + if (drawableId == 0 || (splashscreenTime <= 0 && hideAfterDelay)) { + return; + } + + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + // Get reference to display + Display display = cordova.getActivity().getWindowManager().getDefaultDisplay(); + Context context = webView.getContext(); + + // Use an ImageView to render the image because of its flexible scaling options. + splashImageView = new ImageView(context); + splashImageView.setImageResource(drawableId); + LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); + splashImageView.setLayoutParams(layoutParams); + + splashImageView.setMinimumHeight(display.getHeight()); + splashImageView.setMinimumWidth(display.getWidth()); + + // TODO: Use the background color of the webView's parent instead of using the preference. + splashImageView.setBackgroundColor(preferences.getInteger("backgroundColor", Color.BLACK)); + + if (isMaintainAspectRatio()) { + // CENTER_CROP scale mode is equivalent to CSS "background-size:cover" + splashImageView.setScaleType(ImageView.ScaleType.CENTER_CROP); + } + else { + // FIT_XY scales image non-uniformly to fit into image view. + splashImageView.setScaleType(ImageView.ScaleType.FIT_XY); + } + + // Create and show the dialog + splashDialog = new Dialog(context, android.R.style.Theme_Translucent_NoTitleBar); + // check to see if the splash screen should be full screen + if ((cordova.getActivity().getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) + == WindowManager.LayoutParams.FLAG_FULLSCREEN) { + splashDialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FULLSCREEN); + } + splashDialog.setContentView(splashImageView); + splashDialog.setCancelable(false); + splashDialog.show(); + + if (preferences.getBoolean("ShowSplashScreenSpinner", true)) { + spinnerStart(); + } + + // Set Runnable to remove splash screen just in case + if (hideAfterDelay) { + final Handler handler = new Handler(); + handler.postDelayed(new Runnable() { + public void run() { + if (lastHideAfterDelay) { + removeSplashScreen(false); + } + } + }, effectiveSplashDuration); + } + } + }); + } + + // Show only spinner in the center of the screen + private void spinnerStart() { + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + spinnerStop(); + + spinnerDialog = new ProgressDialog(webView.getContext()); + spinnerDialog.setOnCancelListener(new DialogInterface.OnCancelListener() { + public void onCancel(DialogInterface dialog) { + spinnerDialog = null; + } + }); + + spinnerDialog.setCancelable(false); + spinnerDialog.setIndeterminate(true); + + RelativeLayout centeredLayout = new RelativeLayout(cordova.getActivity()); + centeredLayout.setGravity(Gravity.CENTER); + centeredLayout.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); + + ProgressBar progressBar = new ProgressBar(webView.getContext()); + RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); + layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE); + progressBar.setLayoutParams(layoutParams); + + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { + String colorName = preferences.getString("SplashScreenSpinnerColor", null); + if(colorName != null){ + int[][] states = new int[][] { + new int[] { android.R.attr.state_enabled}, // enabled + new int[] {-android.R.attr.state_enabled}, // disabled + new int[] {-android.R.attr.state_checked}, // unchecked + new int[] { android.R.attr.state_pressed} // pressed + }; + int progressBarColor = Color.parseColor(colorName); + int[] colors = new int[] { + progressBarColor, + progressBarColor, + progressBarColor, + progressBarColor + }; + ColorStateList colorStateList = new ColorStateList(states, colors); + progressBar.setIndeterminateTintList(colorStateList); + } + } + + centeredLayout.addView(progressBar); + + spinnerDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); + spinnerDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); + + spinnerDialog.show(); + spinnerDialog.setContentView(centeredLayout); + } + }); + } + + private void spinnerStop() { + cordova.getActivity().runOnUiThread(new Runnable() { + public void run() { + if (spinnerDialog != null && spinnerDialog.isShowing()) { + spinnerDialog.dismiss(); + spinnerDialog = null; + } + } + }); + } +} diff --git a/plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js b/plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js new file mode 100644 index 000000000..1a5cd30f2 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/src/browser/SplashScreenProxy.js @@ -0,0 +1,170 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +// Default parameter values including image size can be changed in `config.xml` +var splashImageWidth = 170; +var splashImageHeight = 200; +var position = { x: 0, y: 0, width: splashImageWidth, height: splashImageHeight }; +var localSplash; // the image to display +var localSplashImage; +var bgColor = "#464646"; +var imageSrc = '/img/logo.png'; +var splashScreenDelay = 3000; // in milliseconds +var showSplashScreen = true; // show splashcreen by default +var cordova = require('cordova'); +var configHelper = cordova.require('cordova/confighelper'); +var autoHideSplashScreen = true; + +function updateImageLocation() { + position.width = Math.min(splashImageWidth, window.innerWidth); + position.height = position.width * (splashImageHeight / splashImageWidth); + + localSplash.style.width = window.innerWidth + "px"; + localSplash.style.height = window.innerHeight + "px"; + localSplash.style.top = "0px"; + localSplash.style.left = "0px"; + + localSplashImage.style.top = "50%"; + localSplashImage.style.left = "50%"; + localSplashImage.style.height = position.height + "px"; + localSplashImage.style.width = position.width + "px"; + localSplashImage.style.marginTop = (-position.height / 2) + "px"; + localSplashImage.style.marginLeft = (-position.width / 2) + "px"; +} + +function onResize() { + updateImageLocation(); +} + +var SplashScreen = { + setBGColor: function (cssBGColor) { + bgColor = cssBGColor; + if (localSplash) { + localSplash.style.backgroundColor = bgColor; + } + }, + show: function () { + if(!localSplash) { + window.addEventListener("resize", onResize, false); + localSplash = document.createElement("div"); + localSplash.style.backgroundColor = bgColor; + localSplash.style.position = "absolute"; + localSplash.style["z-index"] = "99999"; + + localSplashImage = document.createElement("img"); + localSplashImage.src = imageSrc; + localSplashImage.style.position = "absolute"; + + updateImageLocation(); + + localSplash.appendChild(localSplashImage); + document.body.appendChild(localSplash); + + // deviceready fires earlier than the plugin init on cold-start + if (SplashScreen.shouldHideImmediately) { + SplashScreen.shouldHideImmediately = false; + window.setTimeout(function () { + SplashScreen.hide(); + }, 1000); + } + } + }, + hide: function () { + if(localSplash) { + var innerLocalSplash = localSplash; + localSplash = null; + window.removeEventListener("resize", onResize, false); + + innerLocalSplash.style.opacity = '0'; + innerLocalSplash.style["-webkit-transition"] = "opacity 1s ease-in-out"; + innerLocalSplash.style["-moz-transition"] = "opacity 1s ease-in-out"; + innerLocalSplash.style["-ms-transition"] = "opacity 1s ease-in-out"; + innerLocalSplash.style["-o-transition"] = "opacity 1s ease-in-out"; + + window.setTimeout(function () { + document.body.removeChild(innerLocalSplash); + innerLocalSplash = null; + }, 1000); + } else { + SplashScreen.shouldHideImmediately = true; + } + } +}; + +/** + * Reads preferences via ConfigHelper and substitutes default parameters. + */ +function readPreferencesFromCfg(cfg) { + try { + var value = cfg.getPreferenceValue('ShowSplashScreen'); + if(typeof value != 'undefined') { + showSplashScreen = value === 'true'; + } + + splashScreenDelay = cfg.getPreferenceValue('SplashScreenDelay') || splashScreenDelay; + splashScreenDelay = parseInt(splashScreenDelay, 10); + + imageSrc = cfg.getPreferenceValue('SplashScreen') || imageSrc; + bgColor = cfg.getPreferenceValue('SplashScreenBackgroundColor') || bgColor; + splashImageWidth = cfg.getPreferenceValue('SplashScreenWidth') || splashImageWidth; + splashImageHeight = cfg.getPreferenceValue('SplashScreenHeight') || splashImageHeight; + autoHideSplashScreen = cfg.getPreferenceValue('AutoHideSplashScreen') || autoHideSplashScreen; + autoHideSplashScreen = (autoHideSplashScreen === true || autoHideSplashScreen.toLowerCase() === 'true'); + } catch(e) { + var msg = '[Browser][SplashScreen] Error occurred on loading preferences from config.xml: ' + JSON.stringify(e); + console.error(msg); + } +} + +/** + * Shows and hides splashscreen if it is enabled, with a delay according the current preferences. + */ +function showAndHide() { + if(showSplashScreen) { + SplashScreen.show(); + + window.setTimeout(function() { + SplashScreen.hide(); + }, splashScreenDelay); + } +} + +/** + * Tries to read config.xml and override default properties and then shows and hides splashscreen if it is enabled. + */ +(function initAndShow() { + configHelper.readConfig(function(config) { + readPreferencesFromCfg(config); + if (autoHideSplashScreen) { + showAndHide(); + } else { + SplashScreen.show(); + } + + }, function(err) { + console.error(err); + }); +})(); + +module.exports = SplashScreen; + +require("cordova/exec/proxy").add("SplashScreen", SplashScreen); + diff --git a/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h b/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h new file mode 100644 index 000000000..dcc0d779f --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.h @@ -0,0 +1,46 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +typedef struct { + BOOL iPhone; + BOOL iPad; + BOOL iPhone4; + BOOL iPhone5; + BOOL iPhone6; + BOOL iPhone6Plus; + BOOL retina; + BOOL iPhoneX; + +} CDV_iOSDevice; + +@interface CDVSplashScreen : CDVPlugin { + UIActivityIndicatorView* _activityView; + UIImageView* _imageView; + NSString* _curImageName; + BOOL _visible; + BOOL _destroyed; +} + +- (void)show:(CDVInvokedUrlCommand*)command; +- (void)hide:(CDVInvokedUrlCommand*)command; + +@end diff --git a/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.m b/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.m new file mode 100644 index 000000000..9b04582cb --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/src/ios/CDVSplashScreen.m @@ -0,0 +1,514 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVSplashScreen.h" +#import +#import +#import "CDVViewController+SplashScreen.h" + +#define kSplashScreenDurationDefault 3000.0f +#define kFadeDurationDefault 500.0f + + +@implementation CDVSplashScreen + +- (void)pluginInitialize +{ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad) name:CDVPageDidLoadNotification object:nil]; + + [self setVisible:YES]; +} + +- (void)show:(CDVInvokedUrlCommand*)command +{ + [self setVisible:YES]; +} + +- (void)hide:(CDVInvokedUrlCommand*)command +{ + [self setVisible:NO andForce:YES]; +} + +- (void)pageDidLoad +{ + id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen" lowercaseString]]; + + // if value is missing, default to yes + if ((autoHideSplashScreenValue == nil) || [autoHideSplashScreenValue boolValue]) { + [self setVisible:NO]; + } +} + +- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context +{ + [self updateImage]; +} + +- (void)createViews +{ + /* + * The Activity View is the top spinning throbber in the status/battery bar. We init it with the default Grey Style. + * + * whiteLarge = UIActivityIndicatorViewStyleWhiteLarge + * white = UIActivityIndicatorViewStyleWhite + * gray = UIActivityIndicatorViewStyleGray + * + */ + + // Determine whether rotation should be enabled for this device + // Per iOS HIG, landscape is only supported on iPad and iPhone 6+ + CDV_iOSDevice device = [self getCurrentDevice]; + BOOL autorotateValue = (device.iPad || device.iPhone6Plus || device.iPhoneX) ? + [(CDVViewController *)self.viewController shouldAutorotateDefaultValue] : + NO; + + [(CDVViewController *)self.viewController setEnabledAutorotation:autorotateValue]; + + NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]]; + UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; + + if ([topActivityIndicator isEqualToString:@"whiteLarge"]) + { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge; + } + else if ([topActivityIndicator isEqualToString:@"white"]) + { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhite; + } + else if ([topActivityIndicator isEqualToString:@"gray"]) + { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; + } + + UIView* parentView = self.viewController.view; + parentView.userInteractionEnabled = NO; // disable user interaction while splashscreen is shown + _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:topActivityIndicatorStyle]; + _activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2); + _activityView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin + | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin; + [_activityView startAnimating]; + + // Set the frame & image later. + _imageView = [[UIImageView alloc] init]; + [parentView addSubview:_imageView]; + + id showSplashScreenSpinnerValue = [self.commandDelegate.settings objectForKey:[@"ShowSplashScreenSpinner" lowercaseString]]; + // backwards compatibility - if key is missing, default to true + if ((showSplashScreenSpinnerValue == nil) || [showSplashScreenSpinnerValue boolValue]) + { + [parentView addSubview:_activityView]; + } + + // Frame is required when launching in portrait mode. + // Bounds for landscape since it captures the rotation. + [parentView addObserver:self forKeyPath:@"frame" options:0 context:nil]; + [parentView addObserver:self forKeyPath:@"bounds" options:0 context:nil]; + + [self updateImage]; + _destroyed = NO; +} + +- (void)hideViews +{ + [_imageView setAlpha:0]; + [_activityView setAlpha:0]; +} + +- (void)destroyViews +{ + _destroyed = YES; + [(CDVViewController *)self.viewController setEnabledAutorotation:[(CDVViewController *)self.viewController shouldAutorotateDefaultValue]]; + + [_imageView removeFromSuperview]; + [_activityView removeFromSuperview]; + _imageView = nil; + _activityView = nil; + _curImageName = nil; + + self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion + @try { + [self.viewController.view removeObserver:self forKeyPath:@"frame"]; + [self.viewController.view removeObserver:self forKeyPath:@"bounds"]; + } + @catch (NSException *exception) { + // When reloading the page from a remotely connected Safari, there + // are no observers, so the removeObserver method throws an exception, + // that we can safely ignore. + // Alternatively we can check whether there are observers before calling removeObserver + } +} + +- (CDV_iOSDevice) getCurrentDevice +{ + CDV_iOSDevice device; + + UIScreen* mainScreen = [UIScreen mainScreen]; + CGFloat mainScreenHeight = mainScreen.bounds.size.height; + CGFloat mainScreenWidth = mainScreen.bounds.size.width; + + int limit = MAX(mainScreenHeight,mainScreenWidth); + + device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); + device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); + device.retina = ([mainScreen scale] == 2.0); + device.iPhone4 = (device.iPhone && limit == 480.0); + device.iPhone5 = (device.iPhone && limit == 568.0); + // note these below is not a true device detect, for example if you are on an + // iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but + // this is appropriate for detecting the runtime screen environment + device.iPhone6 = (device.iPhone && limit == 667.0); + device.iPhone6Plus = (device.iPhone && limit == 736.0); + device.iPhoneX = (device.iPhone && limit == 812.0); + + return device; +} + +- (BOOL) isUsingCDVLaunchScreen { + NSString* launchStoryboardName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchStoryboardName"]; + if (launchStoryboardName) { + return ([launchStoryboardName isEqualToString:@"CDVLaunchScreen"]); + } else { + return NO; + } +} + +- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device +{ + // Use UILaunchImageFile if specified in plist. Otherwise, use Default. + NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; + + // detect if we are using CB-9762 Launch Storyboard; if so, return the associated image instead + if ([self isUsingCDVLaunchScreen]) { + imageName = @"LaunchStoryboard"; + return imageName; + } + + NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations]; + + // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape + BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape); + BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown); + // this means there are no mixed orientations in there + BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape); + + if (imageName) + { + imageName = [imageName stringByDeletingPathExtension]; + } + else + { + imageName = @"Default"; + } + + // Add Asset Catalog specific prefixes + if ([imageName isEqualToString:@"LaunchImage"]) + { + if (device.iPhone4 || device.iPhone5 || device.iPad) { + imageName = [imageName stringByAppendingString:@"-700"]; + } else if(device.iPhone6) { + imageName = [imageName stringByAppendingString:@"-800"]; + } else if(device.iPhone6Plus || device.iPhoneX ) { + if(device.iPhone6Plus) { + imageName = [imageName stringByAppendingString:@"-800"]; + } else { + imageName = [imageName stringByAppendingString:@"-1100"]; + } + if (currentOrientation == UIInterfaceOrientationPortrait || currentOrientation == UIInterfaceOrientationPortraitUpsideDown) + { + imageName = [imageName stringByAppendingString:@"-Portrait"]; + } + } + } + + if (device.iPhone5) + { // does not support landscape + imageName = [imageName stringByAppendingString:@"-568h"]; + } + else if (device.iPhone6) + { // does not support landscape + imageName = [imageName stringByAppendingString:@"-667h"]; + } + else if (device.iPhone6Plus || device.iPhoneX) + { // supports landscape + if (isOrientationLocked) + { + imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")]; + } + else + { + switch (currentOrientation) + { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + imageName = [imageName stringByAppendingString:@"-Landscape"]; + break; + default: + break; + } + } + if (device.iPhoneX) { + imageName = [imageName stringByAppendingString:@"-2436h"]; + } else { + imageName = [imageName stringByAppendingString:@"-736h"]; + } + } + else if (device.iPad) + { // supports landscape + if (isOrientationLocked) + { + imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")]; + } + else + { + switch (currentOrientation) + { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + imageName = [imageName stringByAppendingString:@"-Landscape"]; + break; + + case UIInterfaceOrientationPortrait: + case UIInterfaceOrientationPortraitUpsideDown: + default: + imageName = [imageName stringByAppendingString:@"-Portrait"]; + break; + } + } + } + + return imageName; +} + +- (UIInterfaceOrientation)getCurrentOrientation +{ + UIInterfaceOrientation iOrientation = [UIApplication sharedApplication].statusBarOrientation; + UIDeviceOrientation dOrientation = [UIDevice currentDevice].orientation; + + bool landscape; + + if (dOrientation == UIDeviceOrientationUnknown || dOrientation == UIDeviceOrientationFaceUp || dOrientation == UIDeviceOrientationFaceDown) { + // If the device is laying down, use the UIInterfaceOrientation based on the status bar. + landscape = UIInterfaceOrientationIsLandscape(iOrientation); + } else { + // If the device is not laying down, use UIDeviceOrientation. + landscape = UIDeviceOrientationIsLandscape(dOrientation); + + // There's a bug in iOS!!!! http://openradar.appspot.com/7216046 + // So values needs to be reversed for landscape! + if (dOrientation == UIDeviceOrientationLandscapeLeft) + { + iOrientation = UIInterfaceOrientationLandscapeRight; + } + else if (dOrientation == UIDeviceOrientationLandscapeRight) + { + iOrientation = UIInterfaceOrientationLandscapeLeft; + } + else if (dOrientation == UIDeviceOrientationPortrait) + { + iOrientation = UIInterfaceOrientationPortrait; + } + else if (dOrientation == UIDeviceOrientationPortraitUpsideDown) + { + iOrientation = UIInterfaceOrientationPortraitUpsideDown; + } + } + + return iOrientation; +} + +// Sets the view's frame and image. +- (void)updateImage +{ + NSString* imageName = [self getImageName:[self getCurrentOrientation] delegate:(id)self.viewController device:[self getCurrentDevice]]; + + if (![imageName isEqualToString:_curImageName]) + { + UIImage* img = [UIImage imageNamed:imageName]; + _imageView.image = img; + _curImageName = imageName; + } + + // Check that splash screen's image exists before updating bounds + if (_imageView.image) + { + [self updateBounds]; + } + else + { + NSLog(@"WARNING: The splashscreen image named %@ was not found", imageName); + } +} + +- (void)updateBounds +{ + if ([self isUsingCDVLaunchScreen]) { + // CB-9762's launch screen expects the image to fill the screen and be scaled using AspectFill. + CGSize viewportSize = [UIApplication sharedApplication].delegate.window.bounds.size; + _imageView.frame = CGRectMake(0, 0, viewportSize.width, viewportSize.height); + _imageView.contentMode = UIViewContentModeScaleAspectFill; + return; + } + + UIImage* img = _imageView.image; + CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero; + + CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds fromView:nil].size; + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + CGAffineTransform imgTransform = CGAffineTransformIdentity; + + /* If and only if an iPhone application is landscape-only as per + * UISupportedInterfaceOrientations, the view controller's orientation is + * landscape. In this case the image must be rotated in order to appear + * correctly. + */ + CDV_iOSDevice device = [self getCurrentDevice]; + if (UIInterfaceOrientationIsLandscape(orientation) && !device.iPhone6Plus && !device.iPad && !device.iPhoneX) + { + imgTransform = CGAffineTransformMakeRotation(M_PI / 2); + imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width); + } + + // There's a special case when the image is the size of the screen. + if (CGSizeEqualToSize(screenSize, imgBounds.size)) + { + CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil]; + if (!(IsAtLeastiOSVersion(@"7.0"))) + { + imgBounds.origin.y -= statusFrame.size.height; + } + } + else if (imgBounds.size.width > 0) + { + CGRect viewBounds = self.viewController.view.bounds; + CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height; + CGFloat viewAspect = viewBounds.size.width / viewBounds.size.height; + // This matches the behaviour of the native splash screen. + CGFloat ratio; + if (viewAspect > imgAspect) + { + ratio = viewBounds.size.width / imgBounds.size.width; + } + else + { + ratio = viewBounds.size.height / imgBounds.size.height; + } + imgBounds.size.height *= ratio; + imgBounds.size.width *= ratio; + } + + _imageView.transform = imgTransform; + _imageView.frame = imgBounds; +} + +- (void)setVisible:(BOOL)visible +{ + [self setVisible:visible andForce:NO]; +} + +- (void)setVisible:(BOOL)visible andForce:(BOOL)force +{ + if (visible != _visible || force) + { + _visible = visible; + + id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]]; + id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]]; + + float fadeDuration = fadeSplashScreenDuration == nil ? kFadeDurationDefault : [fadeSplashScreenDuration floatValue]; + + id splashDurationString = [self.commandDelegate.settings objectForKey: [@"SplashScreenDelay" lowercaseString]]; + float splashDuration = splashDurationString == nil ? kSplashScreenDurationDefault : [splashDurationString floatValue]; + + id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen" lowercaseString]]; + BOOL autoHideSplashScreen = true; + + if (autoHideSplashScreenValue != nil) { + autoHideSplashScreen = [autoHideSplashScreenValue boolValue]; + } + + if (!autoHideSplashScreen) { + // CB-10412 SplashScreenDelay does not make sense if the splashscreen is hidden manually + splashDuration = 0; + } + + + if (fadeSplashScreenValue == nil) + { + fadeSplashScreenValue = @"true"; + } + + if (![fadeSplashScreenValue boolValue]) + { + fadeDuration = 0; + } + else if (fadeDuration < 30) + { + // [CB-9750] This value used to be in decimal seconds, so we will assume that if someone specifies 10 + // they mean 10 seconds, and not the meaningless 10ms + fadeDuration *= 1000; + } + + if (_visible) + { + if (_imageView == nil) + { + [self createViews]; + } + } + else if (fadeDuration == 0 && splashDuration == 0) + { + [self destroyViews]; + } + else + { + __weak __typeof(self) weakSelf = self; + float effectiveSplashDuration; + + // [CB-10562] AutoHideSplashScreen may be "true" but we should still be able to hide the splashscreen manually. + if (!autoHideSplashScreen || force) { + effectiveSplashDuration = (fadeDuration) / 1000; + } else { + effectiveSplashDuration = (splashDuration - fadeDuration) / 1000; + } + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (uint64_t) effectiveSplashDuration * NSEC_PER_SEC), dispatch_get_main_queue(), CFBridgingRelease(CFBridgingRetain(^(void) { + if (!_destroyed) { + [UIView transitionWithView:self.viewController.view + duration:(fadeDuration / 1000) + options:UIViewAnimationOptionTransitionNone + animations:^(void) { + [weakSelf hideViews]; + } + completion:^(BOOL finished) { + // Always destroy views, otherwise you could have an + // invisible splashscreen that is overlayed over your active views + // which causes that no touch events are passed + if (!_destroyed) { + [weakSelf destroyViews]; + // TODO: It might also be nice to have a js event happen here -jm + } + } + ]; + } + }))); + } + } +} + +@end diff --git a/plugins/cordova-plugin-splashscreen/src/ios/CDVViewController+SplashScreen.h b/plugins/cordova-plugin-splashscreen/src/ios/CDVViewController+SplashScreen.h new file mode 100644 index 000000000..a948ea313 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/src/ios/CDVViewController+SplashScreen.h @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVViewController (SplashScreen) + +@property (nonatomic, assign) BOOL enabledAutorotation; +@property (nonatomic, readonly) BOOL shouldAutorotateDefaultValue; + + +@end diff --git a/plugins/cordova-plugin-splashscreen/src/ios/CDVViewController+SplashScreen.m b/plugins/cordova-plugin-splashscreen/src/ios/CDVViewController+SplashScreen.m new file mode 100644 index 000000000..e483def67 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/src/ios/CDVViewController+SplashScreen.m @@ -0,0 +1,89 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVViewController+SplashScreen.h" +#import + +@implementation CDVViewController (SplashScreen) + +@dynamic enabledAutorotation; + +- (void)setEnabledAutorotation:(BOOL)value +{ + objc_setAssociatedObject(self, + @selector(enabledAutorotation), + [NSNumber numberWithBool:value], + OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (BOOL)enabledAutorotation +{ + NSNumber *number = (NSNumber *)objc_getAssociatedObject(self, @selector(enabledAutorotation)); + + // Defaulting to YES to correspond parent CDVViewController behavior + if (number == nil) + { + return YES; + } + + return [number boolValue]; +} + ++ (void)load +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + Class class = [self class]; + + SEL originalSelector = @selector(shouldAutorotate); + SEL swizzledSelector = @selector(splash_shouldAutorotate); + + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); + + BOOL didAddMethod = class_addMethod(class, + originalSelector, + method_getImplementation(swizzledMethod), + method_getTypeEncoding(swizzledMethod)); + + if (didAddMethod) { + class_replaceMethod(class, + swizzledSelector, + method_getImplementation(originalMethod), + method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, swizzledMethod); + } + }); +} + +#pragma mark - Method Swizzling + +- (BOOL)splash_shouldAutorotate +{ + return self.enabledAutorotation; +} + + +- (BOOL)shouldAutorotateDefaultValue +{ + return [self splash_shouldAutorotate]; +} + +@end diff --git a/plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs b/plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs new file mode 100644 index 000000000..050c3927a --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/src/wp/ResolutionHelper.cs @@ -0,0 +1,39 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +using Microsoft.Phone.Info; +using System; +using System.Windows; + +namespace WPCordovaClassLib.Cordova.Commands +{ + public enum Resolutions { WVGA, WXGA, HD }; + + public static class ResolutionHelper + { + public static Resolutions CurrentResolution + { + get + { + switch (Application.Current.Host.Content.ScaleFactor) + { + case 100: return Resolutions.WVGA; + case 160: return Resolutions.WXGA; + case 150: return Resolutions.HD; + } + throw new InvalidOperationException("Unknown resolution"); + } + } + } +} \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/src/wp/SplashScreen.cs b/plugins/cordova-plugin-splashscreen/src/wp/SplashScreen.cs new file mode 100644 index 000000000..c56d4ad6d --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/src/wp/SplashScreen.cs @@ -0,0 +1,255 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +using System; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; +using Microsoft.Phone.Info; +using System.Windows.Controls.Primitives; +using System.Diagnostics; +using System.Windows.Media.Imaging; +using System.Windows.Resources; +using System.IO; +using System.Xml.Linq; +using System.Linq; +using System.Windows.Threading; + +namespace WPCordovaClassLib.Cordova.Commands +{ + ///

+ /// Listens for changes to the state of the battery on the device. + /// Currently only the "isPlugged" parameter available via native APIs. + /// + public class SplashScreen : BaseCommand + { + private Popup popup; + + // Time until we dismiss the splashscreen + private int prefDelay = 3000; + + // Whether we hide it by default + private bool prefAutoHide = true; + + // Path to image to use + private string prefImagePath = "SplashScreenImage.jpg"; + + // static because autodismiss is only ever applied once, at app launch + // subsequent page loads should not cause the SplashScreen to be shown. + private static bool WasShown = false; + + public SplashScreen() + { + LoadConfigPrefs(); + + Image SplashScreen = new Image() + { + Height = Application.Current.Host.Content.ActualHeight, + Width = Application.Current.Host.Content.ActualWidth, + Stretch = Stretch.Fill + }; + + var imageResource = GetSplashScreenImageResource(); + if (imageResource != null) + { + BitmapImage splash_image = new BitmapImage(); + splash_image.SetSource(imageResource.Stream); + SplashScreen.Source = splash_image; + } + + // Instansiate the popup and set the Child property of Popup to SplashScreen + popup = new Popup() { IsOpen = false, + Child = SplashScreen, + HorizontalAlignment = HorizontalAlignment.Stretch, + VerticalAlignment = VerticalAlignment.Center + + }; + } + + public override void OnInit() + { + // we only want to autoload on the first page load. + // but OnInit is called for every page load. + if (!SplashScreen.WasShown) + { + SplashScreen.WasShown = true; + show(); + } + } + + private void LoadConfigPrefs() + { + StreamResourceInfo streamInfo = Application.GetResourceStream(new Uri("config.xml", UriKind.Relative)); + if (streamInfo != null) + { + using (StreamReader sr = new StreamReader(streamInfo.Stream)) + { + //This will Read Keys Collection for the xml file + XDocument configFile = XDocument.Parse(sr.ReadToEnd()); + + string configAutoHide = configFile.Descendants() + .Where(x => x.Name.LocalName == "preference") + .Where(x => (string)x.Attribute("name") == "AutoHideSplashScreen") + .Select(x => (string)x.Attribute("value")) + .FirstOrDefault(); + + bool bVal; + prefAutoHide = bool.TryParse(configAutoHide, out bVal) ? bVal : prefAutoHide; + + string configDelay = configFile.Descendants() + .Where(x => x.Name.LocalName == "preference") + .Where(x => (string)x.Attribute("name") == "SplashScreenDelay") + .Select(x => (string)x.Attribute("value")) + .FirstOrDefault(); + int nVal; + prefDelay = int.TryParse(configDelay, out nVal) ? nVal : prefDelay; + + string configImage = configFile.Descendants() + .Where(x => x.Name.LocalName == "preference") + .Where(x => (string)x.Attribute("name") == "SplashScreen") + .Select(x => (string)x.Attribute("value")) + .FirstOrDefault(); + + if (!String.IsNullOrEmpty(configImage)) + { + prefImagePath = configImage; + } + } + } + } + + private StreamResourceInfo GetSplashScreenImageResource() + { + // Get the base filename for the splash screen images + string imageName = System.IO.Path.GetFileNameWithoutExtension(prefImagePath); + Uri imageUri = null; + StreamResourceInfo imageResource = null; + + // First, try to get a resolution-specific splashscreen + try + { + // Determine the device's resolution + switch (ResolutionHelper.CurrentResolution) + { + case Resolutions.HD: + imageUri = new Uri(imageName + ".screen-720p.jpg", UriKind.Relative); + break; + + case Resolutions.WVGA: + imageUri = new Uri(imageName + ".screen-WVGA.jpg", UriKind.Relative); + break; + + case Resolutions.WXGA: + default: + imageUri = new Uri(imageName + ".screen-WXGA.jpg", UriKind.Relative); + break; + } + + imageResource = Application.GetResourceStream(imageUri); + } + catch (Exception) + { + // It's OK if we didn't get a resolution-specific image + } + + // Fallback to the default image name without decoration + if (imageResource == null) + { + imageUri = new Uri(prefImagePath, UriKind.Relative); + imageResource = Application.GetResourceStream(imageUri); + } + + if (imageUri != null) Debug.WriteLine("INFO :: SplashScreen: using image {0}", imageUri.OriginalString); + + return imageResource; + } + + public void show(string options = null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + if (!popup.IsOpen) + { + popup.Child.Opacity = 0; + + Storyboard story = new Storyboard(); + DoubleAnimation animation = new DoubleAnimation() + { + From = 0.0, + To = 1.0, + Duration = new Duration(TimeSpan.FromSeconds(0.2)) + }; + + Storyboard.SetTarget(animation, popup.Child); + Storyboard.SetTargetProperty(animation, new PropertyPath("Opacity")); + story.Children.Add(animation); + + story.Begin(); + + popup.IsOpen = true; + + if (prefAutoHide) + { + StartAutoHideTimer(); + } + } + }); + } + + public void hide(string options = null) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + if (popup.IsOpen) + { + popup.Child.Opacity = 1.0; + + Storyboard story = new Storyboard(); + DoubleAnimation animation = new DoubleAnimation() + { + From = 1.0, + To = 0.0, + Duration = new Duration(TimeSpan.FromSeconds(0.4)) + }; + + Storyboard.SetTarget(animation, popup.Child); + Storyboard.SetTargetProperty(animation, new PropertyPath("Opacity")); + story.Children.Add(animation); + story.Completed += (object sender, EventArgs e) => + { + popup.IsOpen = false; + }; + story.Begin(); + } + }); + } + + private void StartAutoHideTimer() + { + var timer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(prefDelay) }; + timer.Tick += (object sender, EventArgs e) => + { + hide(); + timer.Stop(); + }; + timer.Start(); + } + } +} diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..2dd325a00 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout new file mode 100644 index 000000000..7e4cdb933 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 6BE9AD73-1B9F-4362-98D7-DC631BEC6185 + IDESourceControlProjectName + CDVSplashScreenTest + IDESourceControlProjectOriginsDictionary + + BEF5A5D0FF64801E558286389440357A9233D7DB + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + + IDESourceControlProjectPath + tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + BEF5A5D0FF64801E558286389440357A9233D7DB + ../../../../.. + + IDESourceControlProjectURL + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + BEF5A5D0FF64801E558286389440357A9233D7DB + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + BEF5A5D0FF64801E558286389440357A9233D7DB + IDESourceControlWCCName + cordova-plugin-splashscreen + + + + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme new file mode 100644 index 000000000..13f9a1578 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/.npmignore b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/.npmignore new file mode 100644 index 000000000..c795b054e --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/.npmignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m new file mode 100644 index 000000000..1637d2473 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m @@ -0,0 +1,702 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import +#import "CDVSplashScreen.h" +#import "ImageNameTestDelegates.h" + +const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 }; + +@interface ImageNameTest : XCTestCase + +@property (nonatomic, strong) CDVSplashScreen* plugin; + +@end + +@interface CDVSplashScreen () + +// expose private interface +- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device; + +@end + +@implementation ImageNameTest + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. + + self.plugin = [[CDVSplashScreen alloc] init]; +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void) orientationHelper:(id)delegate expectedImageNameDictionary:(NSDictionary*)expectedImageNameDictionary device:(CDV_iOSDevice)device{ + + NSString* name = nil; + NSString* expectedImageName = nil; + UIInterfaceOrientation currentOrientation; + NSString* deviceName = device.iPad? @"iPad" : device.iPhone6Plus? @"iPhone6Plus": device.iPhone6? @"iPhone6": device.iPhone5? @"iPhone5" : @"iPhone"; + + // LandscapeLeft, should always return expectedImageName + currentOrientation = UIInterfaceOrientationLandscapeLeft; + name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; + expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeLeft"]; + XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name); + + // LandscapeRight - should always return expectedImageName + currentOrientation = UIInterfaceOrientationLandscapeRight; + name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; + expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeRight"]; + XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name); + + // Portrait - should always return expectedImageName + currentOrientation = UIInterfaceOrientationPortrait; + name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; + expectedImageName = [expectedImageNameDictionary objectForKey:@"portrait"]; + XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name); + + // PortraitUpsideDown - should always return expectedImageName + currentOrientation = UIInterfaceOrientationPortraitUpsideDown; + name = [self.plugin getImageName:currentOrientation delegate:delegate device:device]; + expectedImageName = [expectedImageNameDictionary objectForKey:@"portraitUpsideDown"]; + XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name); +} + +- (void)testiPadOrientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPad = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Portrait", + @"landscapeRight" : @"Default-Portrait", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Portrait", + @"landscapeRight" : @"Default-Portrait", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Landscape", + @"portraitUpsideDown" : @"Default-Landscape" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Landscape", + @"portraitUpsideDown" : @"Default-Landscape" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Portrait", + @"landscapeRight" : @"Default-Portrait", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Landscape", + @"portraitUpsideDown" : @"Default-Landscape" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape", + @"landscapeRight" : @"Default-Landscape", + @"portrait" : @"Default-Portrait", + @"portraitUpsideDown" : @"Default-Portrait" + } + device:device]; +} + +- (void)testiPhoneOrientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPhone = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default", + @"landscapeRight" : @"Default", + @"portrait" : @"Default", + @"portraitUpsideDown" : @"Default" + } + device:device]; +} + +- (void)testiPhone5Orientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPhone = YES; + device.iPhone5 = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-568h", + @"landscapeRight" : @"Default-568h", + @"portrait" : @"Default-568h", + @"portraitUpsideDown" : @"Default-568h" + } + device:device]; +} + +- (void)testiPhone6Orientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPhone = YES; + device.iPhone6 = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-667h", + @"landscapeRight" : @"Default-667h", + @"portrait" : @"Default-667h", + @"portraitUpsideDown" : @"Default-667h" + } + device:device]; +} + +- (void)testiPhone6PlusOrientation { + + CDV_iOSDevice device = CDV_iOSDeviceZero; + device.iPhone = YES; + device.iPhone6Plus = YES; + + // One orientation + + PortraitOnly* delegate = [[PortraitOnly alloc] init]; + [self orientationHelper:delegate expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-736h", + @"landscapeRight" : @"Default-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init]; + [self orientationHelper:delegate2 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-736h", + @"landscapeRight" : @"Default-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate3 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-Landscape-736h", + @"portraitUpsideDown" : @"Default-Landscape-736h" + } + device:device]; + + LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init]; + [self orientationHelper:delegate4 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-Landscape-736h", + @"portraitUpsideDown" : @"Default-Landscape-736h" + } + device:device]; + + // All Portrait + + AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init]; + [self orientationHelper:delegate5 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-736h", + @"landscapeRight" : @"Default-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // All Landscape + + AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init]; + [self orientationHelper:delegate6 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-Landscape-736h", + @"portraitUpsideDown" : @"Default-Landscape-736h" + } + device:device]; + + + // All orientations + + AllOrientations* delegate7 = [[AllOrientations alloc] init]; + [self orientationHelper:delegate7 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // Portrait and Landscape Left + + PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate8 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // Portrait and Landscape Right + + PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate9 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // PortraitUpsideDown and Landscape Left + + PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init]; + [self orientationHelper:delegate10 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; + + // PortraitUpsideDown and Landscape Right + + PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init]; + [self orientationHelper:delegate11 expectedImageNameDictionary:@{ + @"landscapeLeft" : @"Default-Landscape-736h", + @"landscapeRight" : @"Default-Landscape-736h", + @"portrait" : @"Default-736h", + @"portraitUpsideDown" : @"Default-736h" + } + device:device]; +} + + + +@end diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h new file mode 100644 index 000000000..be4a7883e --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h @@ -0,0 +1,57 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface PortraitOnly : NSObject +@end + +@interface PortraitUpsideDownOnly : NSObject +@end + +@interface AllPortraitOnly : NSObject +@end + + +@interface LandscapeLeftOnly : NSObject +@end + +@interface LandscapeRightOnly : NSObject +@end + +@interface AllLandscapeOnly : NSObject +@end + + +@interface AllOrientations : NSObject +@end + +@interface PortraitAndLandscapeLeftOnly : NSObject +@end + +@interface PortraitAndLandscapeRightOnly : NSObject +@end + +@interface PortraitUpsideDownAndLandscapeLeftOnly : NSObject +@end + +@interface PortraitUpsideDownAndLandscapeRightOnly : NSObject +@end + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m new file mode 100644 index 000000000..b5a1b23ed --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m @@ -0,0 +1,200 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import "ImageNameTestDelegates.h" + +@implementation PortraitOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitUpsideDownOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortraitUpsideDown; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation AllPortraitOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + + +@implementation LandscapeLeftOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskLandscapeLeft; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation LandscapeRightOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskLandscapeRight; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation AllLandscapeOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + + +@implementation AllOrientations + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskAll; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitAndLandscapeLeftOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitAndLandscapeRightOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeRight; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitUpsideDownAndLandscapeLeftOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeLeft; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + +@implementation PortraitUpsideDownAndLandscapeRightOnly + +- (NSUInteger)supportedInterfaceOrientations { + return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeRight; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ; +} + +- (BOOL)shouldAutorotate { + return YES; +} + +@end + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist new file mode 100644 index 000000000..95c8addbd --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist @@ -0,0 +1,44 @@ + + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.apache.cordova.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj new file mode 100644 index 000000000..ce820d81e --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj @@ -0,0 +1,505 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */; }; + 7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B019DA114400DA31AC /* ImageNameTest.m */; }; + 7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B219DA116500DA31AC /* Foundation.framework */; }; + 7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B419DA127E00DA31AC /* UIKit.framework */; }; + 7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */; }; + 7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */; }; + 7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519019DA0F8300DA31AC /* libCordova.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 68A32D7114102E1C006B237C; + remoteInfo = CordovaLib; + }; + 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7E9F517219DA09CE00DA31AC /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7E9F519419DA102000DA31AC; + remoteInfo = CDVSplashScreenLib; + }; + 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = CordovaLib; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 7E9F519319DA102000DA31AC /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = "../node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj"; sourceTree = ""; }; + 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCDVSplashScreenLib.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDVSplashScreenLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E9F51A219DA102000DA31AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = ../../../src/ios/CDVSplashScreen.m; sourceTree = SOURCE_ROOT; }; + 7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = ../../../src/ios/CDVSplashScreen.h; sourceTree = SOURCE_ROOT; }; + 7E9F51B019DA114400DA31AC /* ImageNameTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTest.m; sourceTree = ""; }; + 7E9F51B219DA116500DA31AC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 7E9F51B419DA127E00DA31AC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageNameTestDelegates.h; sourceTree = ""; }; + 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTestDelegates.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7E9F519219DA102000DA31AC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7E9F519C19DA102000DA31AC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */, + 7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */, + 7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */, + 7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7E9F517119DA09CE00DA31AC = { + isa = PBXGroup; + children = ( + 7E9F51B419DA127E00DA31AC /* UIKit.framework */, + 7E9F51B219DA116500DA31AC /* Foundation.framework */, + 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */, + 7E9F519619DA102000DA31AC /* CDVSplashScreenLib */, + 7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */, + 7E9F517D19DA0A0A00DA31AC /* Products */, + ); + sourceTree = ""; + }; + 7E9F517D19DA0A0A00DA31AC /* Products */ = { + isa = PBXGroup; + children = ( + 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */, + 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 7E9F518C19DA0F8300DA31AC /* Products */ = { + isa = PBXGroup; + children = ( + 7E9F519019DA0F8300DA31AC /* libCordova.a */, + ); + name = Products; + sourceTree = ""; + }; + 7E9F519619DA102000DA31AC /* CDVSplashScreenLib */ = { + isa = PBXGroup; + children = ( + 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */, + 7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */, + ); + path = CDVSplashScreenLib; + sourceTree = SOURCE_ROOT; + }; + 7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */ = { + isa = PBXGroup; + children = ( + 7E9F51A119DA102000DA31AC /* Supporting Files */, + 7E9F51B019DA114400DA31AC /* ImageNameTest.m */, + 7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */, + 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */, + ); + path = CDVSplashScreenLibTests; + sourceTree = ""; + }; + 7E9F51A119DA102000DA31AC /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 7E9F51A219DA102000DA31AC /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */; + buildPhases = ( + 7E9F519119DA102000DA31AC /* Sources */, + 7E9F519219DA102000DA31AC /* Frameworks */, + 7E9F519319DA102000DA31AC /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CDVSplashScreenLib; + productName = CDVSplashScreenLib; + productReference = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */; + productType = "com.apple.product-type.library.static"; + }; + 7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */; + buildPhases = ( + 7E9F519B19DA102000DA31AC /* Sources */, + 7E9F519C19DA102000DA31AC /* Frameworks */, + 7E9F519D19DA102000DA31AC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */, + 7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */, + ); + name = CDVSplashScreenLibTests; + productName = CDVSplashScreenLibTests; + productReference = 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7E9F517219DA09CE00DA31AC /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0600; + TargetAttributes = { + 7E9F519419DA102000DA31AC = { + CreatedOnToolsVersion = 6.0; + }; + 7E9F519E19DA102000DA31AC = { + CreatedOnToolsVersion = 6.0; + }; + }; + }; + buildConfigurationList = 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7E9F517119DA09CE00DA31AC; + productRefGroup = 7E9F517D19DA0A0A00DA31AC /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 7E9F518C19DA0F8300DA31AC /* Products */; + ProjectRef = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */, + 7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 7E9F519019DA0F8300DA31AC /* libCordova.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libCordova.a; + remoteRef = 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 7E9F519D19DA102000DA31AC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7E9F519119DA102000DA31AC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7E9F519B19DA102000DA31AC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */, + 7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */; + targetProxy = 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */; + }; + 7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CordovaLib; + targetProxy = 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 7E9F517619DA09CE00DA31AC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + 7E9F517719DA09CE00DA31AC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; + 7E9F51A419DA102000DA31AC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 7E9F51A519DA102000DA31AC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\n\"$(OBJROOT)/UninstalledProducts/include\"\n\"$(BUILT_PRODUCTS_DIR)\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7E9F51A719DA102000DA31AC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 7E9F51A819DA102000DA31AC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E9F517619DA09CE00DA31AC /* Debug */, + 7E9F517719DA09CE00DA31AC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E9F51A419DA102000DA31AC /* Debug */, + 7E9F51A519DA102000DA31AC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E9F51A719DA102000DA31AC /* Debug */, + 7E9F51A819DA102000DA31AC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7E9F517219DA09CE00DA31AC /* Project object */; +} diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..8f9127841 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout new file mode 100644 index 000000000..7e4cdb933 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 6BE9AD73-1B9F-4362-98D7-DC631BEC6185 + IDESourceControlProjectName + CDVSplashScreenTest + IDESourceControlProjectOriginsDictionary + + BEF5A5D0FF64801E558286389440357A9233D7DB + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + + IDESourceControlProjectPath + tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + BEF5A5D0FF64801E558286389440357A9233D7DB + ../../../../.. + + IDESourceControlProjectURL + https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + BEF5A5D0FF64801E558286389440357A9233D7DB + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + BEF5A5D0FF64801E558286389440357A9233D7DB + IDESourceControlWCCName + cordova-plugin-splashscreen + + + + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme new file mode 100644 index 000000000..b97b8633b --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme new file mode 100644 index 000000000..6a2a52612 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/README.md new file mode 100644 index 000000000..97ee9dffe --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/README.md @@ -0,0 +1,40 @@ + + +# iOS Tests for CDVSplashScreen + +You need to install `node.js` to pull in `cordova-ios`. + +First install cordova-ios: + + npm install + +... in the current folder. + + +# Testing from Xcode + +1. Launch the `CDVSplashScreenTest.xcworkspace` file. +2. Choose "CDVSplashScreenLibTests" from the scheme drop-down menu +3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests + + +# Testing from the command line + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/doc/de/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/doc/de/README.md new file mode 100644 index 000000000..9c7f0a4fe --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/doc/de/README.md @@ -0,0 +1,39 @@ + + +# iOS-Tests für CDVSplashScreen + +Sie müssen installieren `node.js` in `Cordova-Ios` zu ziehen. + +Installieren Sie Cordova-Ios zum ersten Mal: + + npm install + + +... im aktuellen Ordner. + +# Testen von Xcode + + 1. Starten Sie die Datei `CDVSplashScreenTest.xcworkspace` . + 2. Wählen Sie im Dropdown-Schema "CDVSplashScreenLibTests" + 3. Klicken Sie und halten Sie auf den `Play` -Button und wählen Sie das `Schraubenschlüssel` -Symbol zum Ausführen der tests + +# Tests von der Befehlszeile aus + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/doc/es/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/doc/es/README.md new file mode 100644 index 000000000..2176c9215 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/doc/es/README.md @@ -0,0 +1,39 @@ + + +# Pruebas de iOS para CDVSplashScreen + +Necesita instalar `node.js` en `Córdoba-ios`. + +Primero instalar cordova-ios: + + npm install + + +... en la carpeta actual. + +# Prueba de Xcode + + 1. Iniciar el archivo `CDVSplashScreenTest.xcworkspace` . + 2. Elija "CDVSplashScreenLibTests" en el menú de lista desplegable esquema + 3. Haga clic y mantenga el botón de `Play` y elegir el icono de `llave inglesa` para ejecutar las pruebas + +# Pruebas desde la línea de comandos + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/doc/fr/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/doc/fr/README.md new file mode 100644 index 000000000..0dbbd0d2b --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/doc/fr/README.md @@ -0,0 +1,39 @@ + + +# Tests d'iOS pour CDVSplashScreen + +Vous devez installer `node.js` à `cordova-ios`. + +Commencez par installer cordova-ios : + + npm install + + +... dans le dossier actuel. + +# Tests de Xcode + + 1. Lancez le fichier `CDVSplashScreenTest.xcworkspace` . + 2. Choisissez « CDVSplashScreenLibTests » dans le menu déroulant de régime + 3. Cliquez et maintenez sur la touche `Play` et cliquez sur l'icône de `clé` pour exécuter les tests + +# Test de la ligne de commande + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/doc/it/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/doc/it/README.md new file mode 100644 index 000000000..2a42df67e --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/doc/it/README.md @@ -0,0 +1,39 @@ + + +# Test di iOS per CDVSplashScreen + +È necessario installare `node. js` per tirare in `cordova-ios`. + +In primo luogo installare cordova-ios: + + npm install + + +... nella cartella corrente. + +# Test da Xcode + + 1. Lanciare il file `CDVSplashScreenTest.xcworkspace` . + 2. Scegli "CDVSplashScreenLibTests" dal menu a discesa Schema + 3. Fare clic e tenere premuto il pulsante `Play` e scegliere l'icona della `chiave inglese` per eseguire i test + +# Test dalla riga di comando + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/doc/ja/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/doc/ja/README.md new file mode 100644 index 000000000..011b82426 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/doc/ja/README.md @@ -0,0 +1,39 @@ + + +# CDVSplashScreen ã® iOS ã®ãƒ†ã‚¹ãƒˆ + +`Node.js` `コルドãƒ`ios をプルã™ã‚‹ã‚’インストールã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚. + +コルドムios をインストールã—ã¾ã™ã€‚ + + npm install + + +ç¾åœ¨ã®ãƒ•ォルダーã«. + +# Xcode ã‹ã‚‰ãƒ†ã‚¹ãƒˆ + + 1. `CDVSplashScreenTest.xcworkspace`ファイルを起動ã—ã¾ã™ã€‚ + 2. スキーム] ドロップダウン メニューã‹ã‚‰"CDVSplashScreenLibTests"ã‚’é¸æŠžã—ã¾ã™ã€‚ + 3. クリックã—ã€`å†ç”Ÿ`ボタンを押ã—ã€ãƒ†ã‚¹ãƒˆã‚’実行ã™ã‚‹`レンãƒ`ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’é¸æŠž + +# コマンドラインã‹ã‚‰ãƒ†ã‚¹ãƒˆ + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/doc/ko/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/doc/ko/README.md new file mode 100644 index 000000000..6981207a4 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/doc/ko/README.md @@ -0,0 +1,39 @@ + + +# CDVSplashScreenì— ëŒ€ 한 iOS 테스트 + +`Node.js` `코르ë„ë°”` iosì—서를 설치 해야. + +코르ë„ë°”-ios를 설치 하는 첫번째는: + + npm install + + +현재 í´ë”ì—.... + +# Xcodeì—서 테스트 + + 1. `CDVSplashScreenTest.xcworkspace` 파ì¼ì„ 시작 합니다. + 2. 구성표 드롭 다운 메뉴ì—서 "CDVSplashScreenLibTests"를 ì„ íƒ + 3. í´ë¦­ 하 ê³  `재ìƒ` 버튼ì—는 테스트를 실행 하려면 `공구 모양` ì•„ì´ì½˜ì„ ì„ íƒ + +# 명령줄ì—서 테스트 + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/doc/pl/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/doc/pl/README.md new file mode 100644 index 000000000..f13828fee --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/doc/pl/README.md @@ -0,0 +1,39 @@ + + +# iOS testy dla CDVSplashScreen + +Musisz zainstalować `node.js` ciÄ…gnąć w `cordova-ios`. + +Najpierw zainstalować cordova-ios: + + npm install + + +... w folderze bieżącym. + +# Badania z Xcode + + 1. Uruchom plik `CDVSplashScreenTest.xcworkspace` . + 2. Wybierz z menu rozwijanego systemu "CDVSplashScreenLibTests" + 3. Kliknij i przytrzymaj przycisk `Play` i wybrać ikonÄ™ `klucz` do testów + +# Badania z wiersza polecenia + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/doc/zh/README.md b/plugins/cordova-plugin-splashscreen/tests/ios/doc/zh/README.md new file mode 100644 index 000000000..3a04bcd1b --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/doc/zh/README.md @@ -0,0 +1,39 @@ + + +# CDVSplashScreen çš„ iOS 測試 + +您需è¦å®‰è£`node.js`拉`科爾多瓦 ios`中. + +第一次安è£ç§‘爾多瓦 ios: + + npm install + + +在當å‰è³‡æ–™å¤¾ä¸­ã€‚ + +# 從 Xcode 測試 + + 1. 啟動`CDVSplashScreenTest.xcworkspace`檔。 + 2. 從方案下拉å¼åŠŸèƒ½è¡¨ä¸­é¸æ“‡"CDVSplashScreenLibTests" + 3. 按一下並堅æŒ`播放`æŒ‰éˆ•ï¼Œç„¶å¾Œé¸æ“‡è¦é‹è¡Œçš„æ¸¬è©¦çš„`扳手`圖示 + +# 從命令列測試 + + npm test diff --git a/plugins/cordova-plugin-splashscreen/tests/ios/package.json b/plugins/cordova-plugin-splashscreen/tests/ios/package.json new file mode 100644 index 000000000..67f0edce4 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/ios/package.json @@ -0,0 +1,13 @@ +{ + "name": "cordova-plugin-splashscreen-test-ios", + "version": "1.0.0", + "description": "iOS Unit Tests for Splashscreen Plugin", + "author": "Apache Software Foundation", + "license": "Apache Version 2.0", + "dependencies": { + "cordova-ios": "*" + }, + "scripts": { + "test": "xcodebuild test -workspace CDVSplashScreenTest.xcworkspace -scheme CDVSplashScreenLibTests -destination 'platform=iOS Simulator,name=iPhone 5' CONFIGURATION_BUILD_DIR='/tmp' HEADER_SEARCH_PATHS='$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include'" + } +} diff --git a/plugins/cordova-plugin-splashscreen/tests/package.json b/plugins/cordova-plugin-splashscreen/tests/package.json new file mode 100644 index 000000000..199a6f569 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/package.json @@ -0,0 +1,14 @@ +{ + "name": "cordova-plugin-splashscreen-tests", + "version": "4.0.3-dev", + "description": "", + "cordova": { + "id": "cordova-plugin-splashscreen-tests", + "platforms": [] + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "", + "license": "Apache 2.0" +} diff --git a/plugins/cordova-plugin-splashscreen/tests/plugin.xml b/plugins/cordova-plugin-splashscreen/tests/plugin.xml new file mode 100644 index 000000000..60d708411 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/plugin.xml @@ -0,0 +1,29 @@ + + + + + Cordova Splashscreen Plugin Tests + Apache 2.0 + + + + diff --git a/plugins/cordova-plugin-splashscreen/tests/tests.js b/plugins/cordova-plugin-splashscreen/tests/tests.js new file mode 100644 index 000000000..7b55a81c3 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/tests/tests.js @@ -0,0 +1,64 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* jshint jasmine: true */ + +exports.defineAutoTests = function () { + describe('Splashscreen (cordova)', function () { + it("splashscreen.spec.1 should exist", function () { + expect(navigator.splashscreen).toBeDefined(); + }); + + it("splashscreen.spec.2 show method should exist", function () { + expect(navigator.splashscreen.show).toBeDefined(); + expect(typeof navigator.splashscreen.show).toBe('function'); + }); + + it("splashscreen.spec.3 hide method should exist", function () { + expect(navigator.splashscreen.hide).toBeDefined(); + expect(typeof navigator.splashscreen.hide).toBe('function'); + }); + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + function showFor(duration) { + navigator.splashscreen.show(); + window.setTimeout(function () { + navigator.splashscreen.hide(); + }, 1000 * duration); + } + + contentEl.innerHTML = '

Splashscreen Tests

' + + '

Note for WP: AutoHideSplashScreen must be set to false in config.xml

' + + '
' + + 'Expected result: Will show the Cordova splashscreen for 1 second' + + '

' + + 'Expected result: Will show the Cordova splashscreen for 5 seconds'; + + createActionButton('Show for 1 second', function () { + showFor(1); + }, 'show1'); + + createActionButton('Show for 5 seconds', function () { + showFor(5); + }, 'show5'); +}; diff --git a/plugins/cordova-plugin-splashscreen/types/index.d.ts b/plugins/cordova-plugin-splashscreen/types/index.d.ts new file mode 100644 index 000000000..968b34006 --- /dev/null +++ b/plugins/cordova-plugin-splashscreen/types/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for Apache Cordova Splashscreen plugin +// Project: https://github.com/apache/cordova-plugin-splashscreen +// Definitions by: Microsoft Open Technologies Inc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// +// Copyright (c) Microsoft Open Technologies Inc +// Licensed under the MIT license. + +interface Navigator { + /** This plugin displays and hides a splash screen during application launch. */ + splashscreen: { + /** Dismiss the splash screen. */ + hide(): void; + /** Displays the splash screen. */ + show(): void; + } +} \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/.appveyor.yml b/plugins/cordova-plugin-statusbar/.appveyor.yml new file mode 100644 index 000000000..a7b2426e0 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/.appveyor.yml @@ -0,0 +1,28 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml + +max_jobs: 1 + +shallow_clone: true + +init: + - git config --global core.autocrlf true + +image: + - Visual Studio 2017 + +environment: + nodejs_version: "4" + matrix: + - PLATFORM: windows-10-store + JUST_BUILD: --justBuild +install: + - npm cache clean -f + - node --version + - npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git + - npm install -g cordova + +build: off + +test_script: + - cordova-paramedic --config pr\%PLATFORM% --plugin . %JUST_BUILD% diff --git a/plugins/cordova-plugin-statusbar/.github/PULL_REQUEST_TEMPLATE.md b/plugins/cordova-plugin-statusbar/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..91582f4ef --- /dev/null +++ b/plugins/cordova-plugin-statusbar/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,22 @@ + + +### Platforms affected + + +### What does this PR do? + + +### What testing has been done on this change? + + +### Checklist +- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database +- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. +- [ ] Added automated test coverage as appropriate for this change. diff --git a/plugins/cordova-plugin-statusbar/.jshintrc b/plugins/cordova-plugin-statusbar/.jshintrc new file mode 100644 index 000000000..cf48aaca6 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/.jshintrc @@ -0,0 +1,16 @@ +{ + "browser": true + , "devel": true + , "bitwise": true + , "undef": true + , "trailing": true + , "quotmark": false + , "indent": 4 + , "unused": "vars" + , "latedef": "nofunc" + , "globals": { + "module": false, + "exports": false, + "require": false + } +} diff --git a/plugins/cordova-plugin-statusbar/.npmignore b/plugins/cordova-plugin-statusbar/.npmignore new file mode 100644 index 000000000..2209f42db --- /dev/null +++ b/plugins/cordova-plugin-statusbar/.npmignore @@ -0,0 +1,24 @@ +#If ignorance is bliss, then somebody knock the smile off my face + +*.csproj.user +*.suo +*.cache +Thumbs.db +*.DS_Store + +*.bak +*.cache +*.log +*.swp +*.user + +node_modules + + + + + + + + + \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/.travis.yml b/plugins/cordova-plugin-statusbar/.travis.yml new file mode 100644 index 000000000..838b02127 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/.travis.yml @@ -0,0 +1,86 @@ +sudo: false +addons: + jwt: + secure: Rd/wGSUWGWbc0Y/vqPgI29nybq+j/zWilEIOCBJeRQVwfubdbJNZUIb5DFlSSVzMEavkxZ0PYJ45h21iXyWo3aOoxUJwhkO7QZNzW2MsYzy9qpiKK1jOESXMrpboRWoxg+BL85YbaDF3u1XRy+Xm1nraStT6mDfx5LlUG1Lac6A= +env: + global: + - SAUCE_USERNAME=snay + - TRAVIS_NODE_VERSION="4.2" +matrix: + include: + - env: PLATFORM=browser-chrome + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-firefox + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-safari + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=browser-edge + os: linux + language: node_js + node_js: '4.2' + - env: PLATFORM=ios-9.3 + os: osx + osx_image: xcode7.3 + language: node_js + node_js: '4.2' + - env: PLATFORM=ios-10.0 + os: osx + osx_image: xcode7.3 + language: node_js + node_js: '4.2' + - env: PLATFORM=android-4.4 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - build-tools-26.0.2 + - env: PLATFORM=android-5.1 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - build-tools-26.0.2 + - env: PLATFORM=android-6.0 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - build-tools-26.0.2 + - env: PLATFORM=android-7.0 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - build-tools-26.0.2 +before_install: +- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm + && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm + install $TRAVIS_NODE_VERSION +- node --version +- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi +- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi +- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26; + fi +- git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic + && npm install && popd +- npm install -g cordova +install: +- npm install +script: +- npm test +- node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce + --buildName travis-plugin-statusbar-$TRAVIS_JOB_NUMBER \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/CONTRIBUTING.md b/plugins/cordova-plugin-statusbar/CONTRIBUTING.md new file mode 100644 index 000000000..4c8e6a5ea --- /dev/null +++ b/plugins/cordova-plugin-statusbar/CONTRIBUTING.md @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff --git a/plugins/cordova-plugin-statusbar/LICENSE b/plugins/cordova-plugin-statusbar/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/NOTICE b/plugins/cordova-plugin-statusbar/NOTICE new file mode 100644 index 000000000..8ec56a524 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/NOTICE @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/plugins/cordova-plugin-statusbar/README.md b/plugins/cordova-plugin-statusbar/README.md new file mode 100644 index 000000000..d6bf29c27 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/README.md @@ -0,0 +1,332 @@ +--- +title: Statusbar +description: Control the device status bar. +--- + + +|AppVeyor|Travis CI| +|:-:|:-:| +|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-statusbar?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-statusbar)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-statusbar)| + +# cordova-plugin-statusbar + +StatusBar +====== + +> The `StatusBar` object provides some functions to customize the iOS and Android StatusBar. + +:warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22cordova-plugin-statusbar%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) + + +## Installation + +This installation method requires cordova 5.0+ + + cordova plugin add cordova-plugin-statusbar +Older versions of cordova can still install via the __deprecated__ id + + cordova plugin add org.apache.cordova.statusbar +It is also possible to install via repo url directly ( unstable ) + + cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git + + +Preferences +----------- + +#### config.xml + +- __StatusBarOverlaysWebView__ (boolean, defaults to true). On iOS 7, make the statusbar overlay or not overlay the WebView at startup. + + + +- __StatusBarBackgroundColor__ (color hex string, no default value). On iOS 7, set the background color of the statusbar by a hex string (#RRGGBB) at startup. If this value is not set, the background color will be transparent. + + + +- __StatusBarStyle__ (status bar style, defaults to lightcontent). On iOS 7, set the status bar style. Available options default, lightcontent, blacktranslucent, blackopaque. + + + +- __StatusBarDefaultScrollToTop__ (boolean, defaults to false). On iOS 7, allows the Cordova WebView to use default scroll-to-top behavior. Defaults to false so you can listen to the "statusTap" event (described below) and customize the behavior instead. + + + +### Android Quirks +The Android 5+ guidelines specify using a different color for the statusbar than your main app color (unlike the uniform statusbar color of many iOS 7+ apps), so you may want to set the statusbar color at runtime instead via `StatusBar.backgroundColorByHexString` or `StatusBar.backgroundColorByName`. One way to do that would be: +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +Hiding at startup +----------- + +During runtime you can use the StatusBar.hide function below, but if you want the StatusBar to be hidden at app startup, you must modify your app's Info.plist file. + +Add/edit these two attributes if not present. Set **"Status bar is initially hidden"** to **"YES"** and set **"View controller-based status bar appearance"** to **"NO"**. If you edit it manually without Xcode, the keys and values are: + + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +Methods +------- +This plugin defines global `StatusBar` object. + +Although in the global scope, it is not available until after the `deviceready` event. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + +- StatusBar.overlaysWebView +- StatusBar.styleDefault +- StatusBar.styleLightContent +- StatusBar.styleBlackTranslucent +- StatusBar.styleBlackOpaque +- StatusBar.backgroundColorByName +- StatusBar.backgroundColorByHexString +- StatusBar.hide +- StatusBar.show + +Properties +-------- + +- StatusBar.isVisible + +Events +------ + +- statusTap + +StatusBar.overlaysWebView +================= + +On iOS 7, make the statusbar overlay or not overlay the WebView. + + StatusBar.overlaysWebView(true); + +Description +----------- + +On iOS 7, set to false to make the statusbar appear like iOS 6. Set the style and background color to suit using the other functions. + + +Supported Platforms +------------------- + +- iOS + +Quick Example +------------- + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + +StatusBar.styleDefault +================= + +Use the default statusbar (dark text, for light backgrounds). + + StatusBar.styleDefault(); + + +Supported Platforms +------------------- + +- iOS +- Android 6+ +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + +StatusBar.styleLightContent +================= + +Use the lightContent statusbar (light text, for dark backgrounds). + + StatusBar.styleLightContent(); + + +Supported Platforms +------------------- + +- iOS +- Android 6+ +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + +StatusBar.styleBlackTranslucent +================= + +Use the blackTranslucent statusbar (light text, for dark backgrounds). + + StatusBar.styleBlackTranslucent(); + + +Supported Platforms +------------------- + +- iOS +- Android 6+ +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + +StatusBar.styleBlackOpaque +================= + +Use the blackOpaque statusbar (light text, for dark backgrounds). + + StatusBar.styleBlackOpaque(); + + +Supported Platforms +------------------- + +- iOS +- Android 6+ +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + + +StatusBar.backgroundColorByName +================= + +On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by color name. + + StatusBar.backgroundColorByName("red"); + +Supported color names are: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +Supported Platforms +------------------- + +- iOS +- Android 5+ +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + +StatusBar.backgroundColorByHexString +================= + +Sets the background color of the statusbar by a hex string. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + +CSS shorthand properties are also supported. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + +On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by a hex string (#RRGGBB). + +On WP7 and WP8 you can also specify values as #AARRGGBB, where AA is an alpha value + +Supported Platforms +------------------- + +- iOS +- Android 5+ +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + +StatusBar.hide +================= + +Hide the statusbar. + + StatusBar.hide(); + + +Supported Platforms +------------------- + +- iOS +- Android +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + +StatusBar.show +================= + +Shows the statusbar. + + StatusBar.show(); + + +Supported Platforms +------------------- + +- iOS +- Android +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + + +StatusBar.isVisible +================= + +Read this property to see if the statusbar is visible or not. + + if (StatusBar.isVisible) { + // do something + } + + +Supported Platforms +------------------- + +- iOS +- Android +- Windows Phone 7 +- Windows Phone 8 +- Windows Phone 8.1 + + +statusTap +========= + +Listen for this event to know if the statusbar was tapped. + + window.addEventListener('statusTap', function() { + // scroll-up with document.body.scrollTop = 0; or do whatever you want + }); + + +Supported Platforms +------------------- + +- iOS diff --git a/plugins/cordova-plugin-statusbar/RELEASENOTES.md b/plugins/cordova-plugin-statusbar/RELEASENOTES.md new file mode 100644 index 000000000..e79187ccc --- /dev/null +++ b/plugins/cordova-plugin-statusbar/RELEASENOTES.md @@ -0,0 +1,172 @@ + +# Release Notes + +### 2.4.2 (Apr 12, 2018) +* [CB-12679](https://issues.apache.org/jira/browse/CB-12679) Remove Permissions section + +### 2.4.1 (Dec 27, 2017) +* [CB-13712](https://issues.apache.org/jira/browse/CB-13712) (iOS): fix overlaysWebView reset on rotation (#92) + +### 2.4.0 (Dec 15, 2017) +* [CB-13623](https://issues.apache.org/jira/browse/CB-13623) (iOS): Remove **iOS** 6-7 code + +### 2.3.0 (Nov 06, 2017) +* [CB-13476](https://issues.apache.org/jira/browse/CB-13476) (iOS): handle double size statusbar on SDK 10 for **iOS 11** +* [CB-13394](https://issues.apache.org/jira/browse/CB-13394) (iOS): fix `iPhone X` StatusBar rendering in landscape +* [CB-11858](https://issues.apache.org/jira/browse/CB-11858) (android) Add `StatusBarStyle` feature support for **Android M+** +* [CB-13311](https://issues.apache.org/jira/browse/CB-13311) (iOS) Statusbar does not overlay correctly on `iPhone X` +* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis and AppVeyor +* [CB-12812](https://issues.apache.org/jira/browse/CB-12812) (browser) Fix statusbar plugin with **Browser** platform +* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. + +### 2.2.3 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` +* [CB-10879](https://issues.apache.org/jira/browse/CB-10879) Enable overlaysWebView on **Android** API 21+ +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder + +### 2.2.2 (Feb 28, 2017) +* [CB-12188](https://issues.apache.org/jira/browse/CB-12188) Status Bar is not changing in some specific **Android** phone (Red MI 3s Prime) +* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` +* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** +* [CB-12196](https://issues.apache.org/jira/browse/CB-12196) **iOS** fix Status Bar Not Hiding +* [CB-12141](https://issues.apache.org/jira/browse/CB-12141) **iOS** fix white app screen after camera overlay shown on iPad +* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges + +### 2.2.1 (Dec 07, 2016) +* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 2.2.1 +* [CB-10288](https://issues.apache.org/jira/browse/CB-10288) statusbar plugin interaction with iOS multitasking +* [CB-10158](https://issues.apache.org/jira/browse/CB-10158) (ios) fix StatusBar issue when recovering from fullscreen video +* [CB-10341](https://issues.apache.org/jira/browse/CB-10341) ios, document statusTap event +* [CB-11191](https://issues.apache.org/jira/browse/CB-11191) Statusbar plugin causing issues with webview size +* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" +* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. + +### 2.2.0 (Sep 08, 2016) +* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies +* Handle extended status bar on **iOS** +* Plugin uses `Android Log class` and not `Cordova LOG class` +* [CB-11287](https://issues.apache.org/jira/browse/CB-11287) (**ios**) - fix webview resize after modal on **iPhones** +* [CB-11485](https://issues.apache.org/jira/browse/CB-11485) fix resize on rotation with popover +* Add badges for paramedic builds on Jenkins +* [CB-11197](https://issues.apache.org/jira/browse/CB-11197) Keep status bar hidden when keyboard pops up +* Add pull request template. +* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine info to `package.json` +* patched missing `_ready` method, and changed the way the proxy is installed +* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to `README.md` + +### 2.1.3 (Apr 15, 2016) +* [CB-11018](https://issues.apache.org/jira/browse/CB-11018) Fix statusbar with `inappbrowser` causing incorrect orientation on **iOS8** +* [CB-10884](https://issues.apache.org/jira/browse/CB-10884) `Inappbrowser` breaks UI while Screen orientation changes from landscape to portrait on **iOS** + +### 2.1.2 (Mar 09, 2016) +* [CB-10752](https://issues.apache.org/jira/browse/CB-10752) for for status bar overlays the webview on **iOS** 6 in some cases +* [CB-10683](https://issues.apache.org/jira/browse/CB-10683) Fix wrong StatusBar.isVisible initial value on **Windows** +* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add JSHint for plugins +* [CB-10047](https://issues.apache.org/jira/browse/CB-10047) fix **iOS** 8 deprecated warnings + +### 2.1.1 (Feb 09, 2016) +* [CB-10102](https://issues.apache.org/jira/browse/CB-10102) The removeObserver code was wrong and it might crash on plugin deallocation + +### 2.1.0 (Jan 15, 2016) +* [CB-9513](https://issues.apache.org/jira/browse/CB-9513) Allow to show/hide status bar in fullscreen mode. +* [CB-8720](https://issues.apache.org/jira/browse/CB-8720) Fix status bar position when app started upside down on **iOS 7**. +* [CB-10118](https://issues.apache.org/jira/browse/CB-10118) Fixes plugin loading error for **Browser** platform + +### 2.0.0 (Nov 18, 2015) +* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest +* Added `weakSelf` reference for block use +* Fixes [CB-4712](https://issues.apache.org/jira/browse/CB-4712), [CB-5439](https://issues.apache.org/jira/browse/CB-5439) statusbar issues +* Fixing contribute link. +* [CB-7965](https://issues.apache.org/jira/browse/CB-7965) Add cordova-plugin-statusbar support for **Browser** platform +* Don't use `IsAtLeastiOSVersion` macro to determine height +* Use correct statusbar height for landscape orientation in iOS >= 8 +* remove travis-ci +* [CB-9202](https://issues.apache.org/jira/browse/CB-9202) updated repo url to github mirror in package.json +* Added verbose install text for users on < cordova 5.0 +* update docs for `StatusBarBackgroundColor` + +### 1.0.1 (Jun 17, 2015) +* add auto-tests for basic api +* [CB-9180](https://issues.apache.org/jira/browse/CB-9180) Add correct supported check for **Windows 8.1** desktop +* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-statusbar documentation translation: cordova-plugin-statusbar +* fix npm md issue + +### 1.0.0 (Apr 15, 2015) +* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump +* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id +* Use TRAVIS_BUILD_DIR, install paramedic by npm +* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme +* - Use StatusBarBackgroundColor instead of AndroidStatusBarBackgroundColor, and added a quirk to the readme. +* - Add support for StatusBar.backgroundColorByHexString (and StatusBar.backgroundColorByName) on Android 5 and up +* Allow setting the statusbar backgroundcolor on Android +* [CB-8575](https://issues.apache.org/jira/browse/CB-8575) Integrate TravisCI +* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-statusbar documentation translation: cordova-plugin-statusbar +* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file + +### 0.1.10 (Feb 04, 2015) +* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use argumentForIndex rather than NSArray extension + +### 0.1.9 (Dec 02, 2014) +* Fix onload attribute within to be a +* [CB-8010](https://issues.apache.org/jira/browse/CB-8010) - Statusbar colour does not change to orange +* added checks for running on windows when StatusBar is NOT available +* [CB-7986](https://issues.apache.org/jira/browse/CB-7986) Add cordova-plugin-statusbar support for **Windows Phone 8.1** +* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs +* [CB-7979](https://issues.apache.org/jira/browse/CB-7979) Each plugin doc should have a ## Installation section +* Inserting leading space after # for consistency +* [CB-7549](https://issues.apache.org/jira/browse/CB-7549) - (Re-fix) `StatusBar` **iOS 8** Landscape issue (closes #15) +* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-statusbar documentation translation: cordova-plugin-statusbar +* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin + +### 0.1.8 (Sep 17, 2014) +* [CB-7549](https://issues.apache.org/jira/browse/CB-7549) [StatusBar][iOS 8] Landscape issue +* [CB-7486](https://issues.apache.org/jira/browse/CB-7486) Remove StatusBarBackgroundColor intial preference (black background) so background will be initially transparent +* Renamed test dir, added nested plugin.xml +* added documentation for manual tests, moved background color test below overlay test +* [CB-7195](https://issues.apache.org/jira/browse/CB-7195) ported statusbar tests to framework + +### 0.1.7 (Aug 06, 2014) +* Add LICENSE and NOTICE +* Update statusbar.js +* Update backgroundColorByHexString function +* ios: Use a persistent callbackId instead of calling sendJs +* [CB-6626](https://issues.apache.org/jira/browse/CB-6626) ios: Add a JS event for tapping on statusbar +* ios: Fix hide to adjust webview's frame only when status bar is not overlaying webview +* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs +* android: Fix StatusBar.initialize() not running on UI thread + +### 0.1.6 (Jun 05, 2014) +* [CB-6783](https://issues.apache.org/jira/browse/CB-6783) - added StatusBarStyle config preference, updated docs (closes #9) +* [CB-6812](https://issues.apache.org/jira/browse/CB-6812) Add license +* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md +* [CB-6264](https://issues.apache.org/jira/browse/CB-6264) minor formatting issue +* Update docs with recent WP changes, remove 'clear' from the loist of named colors in documentation +* [CB-6513](https://issues.apache.org/jira/browse/CB-6513) - Statusbar plugin for Android is not compiling + +### 0.1.5 (Apr 17, 2014) (First release as a core Cordova Plugin) +* [CB-6316](https://issues.apache.org/jira/browse/CB-6316): Added README.md which point to the new location for docs +* [CB-6316](https://issues.apache.org/jira/browse/CB-6316): Added license header to the documentation. Added README.md which point to the new location for docs +* [CB-6316](https://issues.apache.org/jira/browse/CB-6316): Moved StatusBar plugin documentation to docs folder +* [CB-6314](https://issues.apache.org/jira/browse/CB-6314): [android] Add StatusBar.isVisible support to Android +* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers diff --git a/plugins/cordova-plugin-statusbar/doc/de/README.md b/plugins/cordova-plugin-statusbar/doc/de/README.md new file mode 100644 index 000000000..924759891 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/de/README.md @@ -0,0 +1,276 @@ + + +# cordova-plugin-statusbar + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar) + +# StatusBar + +> Das `StatusBar` Objekt stellt einige Funktionen zum Anpassen des iOS und Android StatusBar. + +## Installation + + cordova plugin add cordova-plugin-statusbar + + +## "Einstellungen" + +#### "config.xml" + + * **StatusBarOverlaysWebView** (Boolean, der Standardwert ist True). Stellen Sie auf iOS 7 die Statusbar-Overlay oder keine Überlagerung der WebView beim Start. + + + + + * **StatusBarBackgroundColor** (Farbe hex String, Standardwert ist #000000). Auf iOS legen 7 und Android 5, Sie die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge (#RRGGBB) beim Start. + + + + + * **StatusBarStyle** (Status Bar-Stil, der Standardwert ist Lightcontent). Legen Sie auf iOS 7 den Status-Bar-Stil. Verfügbaren Optionen Standard, Lightcontent, Blacktranslucent, Blackopaque. + + + + +### Android Eigenarten + +Die Android 5 + Leitlinien angeben, verwenden eine andere Farbe für die Statusbar als Ihre Hauptanwendung Farbe (anders als die einheitliche Statusbar Farbe viele iOS 7 + apps), so Sie die Statusbar Farbe zur Laufzeit statt über `StatusBar.backgroundColorByHexString` oder `StatusBar.backgroundColorByName`festzulegen möchten vielleicht. Eine Möglichkeit dazu wäre: + +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +## Beim Start ausblenden + +Während der Laufzeit können Sie die StatusBar.hide-Funktion unten, aber die StatusBar beim Start der app versteckt werden soll, müssen Sie Ihre app Info.plist Datei ändern. + +Diese beiden Attribute hinzufügen/bearbeiten, wenn nicht vorhanden. Legen Sie **"Statusleiste ist anfangs ausgeblendet"** auf **"YES"** und **"View Controller-basierte Status Bar aussehen"** auf **"NO"**. Wenn Sie es manuell ohne Xcode bearbeiten, werden die Schlüssel und Werte: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Methoden + +Dieses Plugin wird globales `StatusBar`-Objekt definiert. + +Obwohl im globalen Gültigkeitsbereich, steht es nicht bis nach dem `deviceready`-Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + + * StatusBar.overlaysWebView + * StatusBar.styleDefault + * StatusBar.styleLightContent + * StatusBar.styleBlackTranslucent + * StatusBar.styleBlackOpaque + * StatusBar.backgroundColorByName + * StatusBar.backgroundColorByHexString + * StatusBar.hide + * StatusBar.show + +## Eigenschaften + + * StatusBar.isVisible + +## Berechtigungen + +#### "config.xml" + + + + + + +# StatusBar.overlaysWebView + +Stellen Sie auf iOS 7 Statusbar überlagern oder nicht überlagert die WebView. + + StatusBar.overlaysWebView(true); + + +## Beschreibung + +Auf iOS 7 zu der Statusbar wie iOS 6 erscheinen auf False festgelegt. Legen Sie die Stil und Hintergrund Farbe entsprechend mit den anderen Funktionen. + +## Unterstützte Plattformen + + * iOS + +## Kurzes Beispiel + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Verwenden Sie die Standard-Statusbar (dunkle Text, für helle Hintergründe). + + StatusBar.styleDefault(); + + +## Unterstützte Plattformen + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 + +# StatusBar.styleLightContent + +Verwenden Sie die LightContent-Statusbar (heller Text, für dunkle Hintergründe). + + StatusBar.styleLightContent(); + + +## Unterstützte Plattformen + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 + +# StatusBar.styleBlackTranslucent + +Verwenden Sie die BlackTranslucent-Statusbar (heller Text, für dunkle Hintergründe). + + StatusBar.styleBlackTranslucent(); + + +## Unterstützte Plattformen + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 + +# StatusBar.styleBlackOpaque + +Verwenden Sie die BlackOpaque-Statusbar (heller Text, für dunkle Hintergründe). + + StatusBar.styleBlackOpaque(); + + +## Unterstützte Plattformen + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 + +# StatusBar.backgroundColorByName + +Auf iOS 7 Wenn Sie StatusBar.statusBarOverlaysWebView auf False festlegen, können Sie die Hintergrundfarbe der Statusbar von Farbnamen festlegen. + + StatusBar.backgroundColorByName("red"); + + +Unterstützte Farbnamen sind: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## Unterstützte Plattformen + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 + +# StatusBar.backgroundColorByHexString + +Legt die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge fest. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +CSS-Kurzschrift-Eigenschaften werden ebenfalls unterstützt. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Auf iOS 7 Wenn Sie StatusBar.statusBarOverlaysWebView auf False festlegen, können Sie die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge (#RRGGBB) festlegen. + +Auf WP7 und WP8 können Sie auch Werte wie #AARRGGBB, angeben wo AA einen alpha-Wert ist + +## Unterstützte Plattformen + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 + +# StatusBar.hide + +Ausblenden der Statusleiste. + + StatusBar.hide(); + + +## Unterstützte Plattformen + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 + +# StatusBar.show + +Zeigt die Statusleiste. + + StatusBar.show(); + + +## Unterstützte Plattformen + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 + +# StatusBar.isVisible + +Lesen Sie diese Eigenschaft, um festzustellen, ob die Statusbar sichtbar oder nicht ist. + + if (StatusBar.isVisible) { + // do something + } + + +## Unterstützte Plattformen + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone-8.1 \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/doc/de/index.md b/plugins/cordova-plugin-statusbar/doc/de/index.md new file mode 100644 index 000000000..9f913c5a6 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/de/index.md @@ -0,0 +1,262 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> Das `StatusBar` Objekt stellt einige Funktionen zum Anpassen des iOS und Android StatusBar. + +## Installation + + cordova plugin add cordova-plugin-statusbar + + +## "Einstellungen" + +#### config.xml + +* **StatusBarOverlaysWebView** (Boolean, der Standardwert ist True). Stellen Sie auf iOS 7 die Statusbar-Overlay oder keine Überlagerung der WebView beim Start. + + + + +* **StatusBarBackgroundColor** (Farbe hex String, der Standardwert ist #000000). Legen Sie auf iOS 7 die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge (#RRGGBB) beim Start. + + + + +* **StatusBarStyle** (Status Bar-Stil, der Standardwert ist Lightcontent). Legen Sie auf iOS 7 den Status-Bar-Stil. Verfügbaren Optionen Standard, Lightcontent, Blacktranslucent, Blackopaque. + + + + +## Beim Start ausblenden + +Während der Laufzeit können Sie die StatusBar.hide-Funktion unten, aber die StatusBar beim Start der app versteckt werden soll, müssen Sie Ihre app Info.plist Datei ändern. + +Diese beiden Attribute hinzufügen/bearbeiten, wenn nicht vorhanden. Legen Sie **"Statusleiste ist anfangs ausgeblendet"** auf **"YES"** und **"View Controller-basierte Status Bar aussehen"** auf **"NO"**. Wenn Sie es manuell ohne Xcode bearbeiten, werden die Schlüssel und Werte: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Methoden + +Dieses Plugin wird globales `StatusBar`-Objekt definiert. + +Obwohl im globalen Gültigkeitsbereich, steht es nicht bis nach dem `deviceready`-Ereignis. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## Eigenschaften + +* StatusBar.isVisible + +## Berechtigungen + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +Stellen Sie auf iOS 7 Statusbar überlagern oder nicht überlagert die WebView. + + StatusBar.overlaysWebView(true); + + +## Beschreibung + +Auf iOS 7 zu der Statusbar wie iOS 6 erscheinen auf False festgelegt. Legen Sie die Stil und Hintergrund Farbe entsprechend mit den anderen Funktionen. + +## Unterstützte Plattformen + +* iOS + +## Kurzes Beispiel + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Verwenden Sie die Standard-Statusbar (dunkle Text, für helle Hintergründe). + + StatusBar.styleDefault(); + + +## Unterstützte Plattformen + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 + +# StatusBar.styleLightContent + +Verwenden Sie die LightContent-Statusbar (heller Text, für dunkle Hintergründe). + + StatusBar.styleLightContent(); + + +## Unterstützte Plattformen + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 + +# StatusBar.styleBlackTranslucent + +Verwenden Sie die BlackTranslucent-Statusbar (heller Text, für dunkle Hintergründe). + + StatusBar.styleBlackTranslucent(); + + +## Unterstützte Plattformen + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 + +# StatusBar.styleBlackOpaque + +Verwenden Sie die BlackOpaque-Statusbar (heller Text, für dunkle Hintergründe). + + StatusBar.styleBlackOpaque(); + + +## Unterstützte Plattformen + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 + +# StatusBar.backgroundColorByName + +Auf iOS 7 Wenn Sie StatusBar.statusBarOverlaysWebView auf False festlegen, können Sie die Hintergrundfarbe der Statusbar von Farbnamen festlegen. + + StatusBar.backgroundColorByName("red"); + + +Unterstützte Farbnamen sind: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## Unterstützte Plattformen + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 + +# StatusBar.backgroundColorByHexString + +Legt die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge fest. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +CSS-Kurzschrift-Eigenschaften werden ebenfalls unterstützt. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Auf iOS 7 Wenn Sie StatusBar.statusBarOverlaysWebView auf False festlegen, können Sie die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge (#RRGGBB) festlegen. + +Auf WP7 und WP8 können Sie auch Werte wie #AARRGGBB, angeben wo AA einen alpha-Wert ist + +## Unterstützte Plattformen + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 + +# StatusBar.hide + +Ausblenden der Statusleiste. + + StatusBar.hide(); + + +## Unterstützte Plattformen + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 + +# StatusBar.show + +Zeigt die Statusleiste. + + StatusBar.show(); + + +## Unterstützte Plattformen + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 + +# StatusBar.isVisible + +Lesen Sie diese Eigenschaft, um festzustellen, ob die Statusbar sichtbar oder nicht ist. + + if (StatusBar.isVisible) { + // do something + } + + +## Unterstützte Plattformen + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone-8.1 diff --git a/plugins/cordova-plugin-statusbar/doc/es/README.md b/plugins/cordova-plugin-statusbar/doc/es/README.md new file mode 100644 index 000000000..8be769d5b --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/es/README.md @@ -0,0 +1,276 @@ + + +# cordova-plugin-statusbar + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar) + +# StatusBar + +> El `StatusBar` objeto proporciona algunas funciones para personalizar el iOS y Android StatusBar. + +## Instalación + + cordova plugin add cordova-plugin-statusbar + + +## Preferencias + +#### config.xml + + * **StatusBarOverlaysWebView** (boolean, true por defecto). En iOS 7, hacer la superposición statusbar o no superponer la WebView al inicio. + + + + + * **StatusBarBackgroundColor** (color hex string por defecto #000000). IOS 7 y 5 Android, configurar el color de fondo de la barra de estado por una cadena hexadecimal (#RRGGBB) en el arranque. + + + + + * **StatusBarStyle** (status bar estilo por defecto lightcontent). En iOS 7, definir el estilo de barra de estado. Por defecto las opciones disponibles, lightcontent, blacktranslucent, blackopaque. + + + + +### Rarezas Android + +Android 5 + pautas especifican utilizando un color diferente para la barra de estado que la aplicación principal de color (a diferencia del color de barra de estado uniforme de muchas apps de iOS 7 +), por lo que puede establecer el color de la barra de estado en tiempo de ejecución en su lugar a través de `StatusBar.backgroundColorByHexString` o `StatusBar.backgroundColorByName`. Una forma de hacerlo sería: + +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +## Escondido en el arranque + +Durante el tiempo de ejecución puede utilizar la función StatusBar.hide abajo, pero si quieres la barra de estado que está escondido en el inicio de la aplicación, se debe modificar el archivo Info.plist de su aplicación. + +Agregar/editar estos dos atributos si no está presente. Defina **"inicialmente se esconde la barra de estado"** a **"YES"** y **"Aparición de vista basado en controlador estatus bar"** a **"NO"**. Si se edita manualmente sin Xcode, las claves y valores son: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Métodos + +Este plugin define global `StatusBar` objeto. + +Aunque en el ámbito global, no estará disponible hasta después de la `deviceready` evento. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + + * StatusBar.overlaysWebView + * StatusBar.styleDefault + * StatusBar.styleLightContent + * StatusBar.styleBlackTranslucent + * StatusBar.styleBlackOpaque + * StatusBar.backgroundColorByName + * StatusBar.backgroundColorByHexString + * StatusBar.hide + * StatusBar.show + +## Propiedades + + * StatusBar.isVisible + +## Permisos + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +En iOS 7, hacer la barra de estado superposición o no superponer la vista Web. + + StatusBar.overlaysWebView(true); + + +## Descripción + +En iOS 7, establecida en false para que la barra de estado aparezca como iOS 6. Establece el color de fondo y estilo para utilizar las otras funciones. + +## Plataformas soportadas + + * iOS + +## Ejemplo rápido + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Utilice la barra de estado por defecto (texto oscuro, para fondos de luz). + + StatusBar.styleDefault(); + + +## Plataformas soportadas + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleLightContent + +Utilice la barra de estado lightContent (texto ligero, para fondos oscuros). + + StatusBar.styleLightContent(); + + +## Plataformas soportadas + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +Utilice la barra de estado blackTranslucent (texto ligero, para fondos oscuros). + + StatusBar.styleBlackTranslucent(); + + +## Plataformas soportadas + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +Utilice la barra de estado blackOpaque (texto ligero, para fondos oscuros). + + StatusBar.styleBlackOpaque(); + + +## Plataformas soportadas + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +En iOS 7, al establecer StatusBar.statusBarOverlaysWebView a false, se puede establecer el color de fondo de la barra de estado nombre del color. + + StatusBar.backgroundColorByName("red"); + + +Nombres de los colores admitidos son: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## Plataformas soportadas + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +Establece el color de fondo de la barra de estado por una cadena hexadecimal. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +Propiedades CSS abreviada también son compatibles. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +En iOS 7, cuando se establece StatusBar.statusBarOverlaysWebView en false, se puede establecer el color de fondo de la barra de estado una cadena hexadecimal (#RRGGBB). + +En WP7 y WP8 también puede especificar valores como #AARRGGBB, donde AA es un valor alfa + +## Plataformas soportadas + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.hide + +Ocultar la barra de estado. + + StatusBar.hide(); + + +## Plataformas soportadas + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.show + +Muestra la barra de estado. + + StatusBar.show(); + + +## Plataformas soportadas + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.isVisible + +Lea esta propiedad para ver si la barra de estado es visible o no. + + if (StatusBar.isVisible) { + // do something + } + + +## Plataformas soportadas + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/doc/es/index.md b/plugins/cordova-plugin-statusbar/doc/es/index.md new file mode 100644 index 000000000..fa4ba67b1 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/es/index.md @@ -0,0 +1,252 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> El `StatusBar` objeto proporciona algunas funciones para personalizar el iOS y Android StatusBar. + +## Instalación + + Cordova plugin agregar cordova-plugin-statusbar + + +## Preferencias + +#### config.xml + +* **StatusBarOverlaysWebView** (boolean, true por defecto). En iOS 7, hacer la superposición statusbar o no superponer la WebView al inicio. + + + + +* **StatusBarBackgroundColor** (cadena hexadecimal color, #000000 por defecto). En iOS 7, establecer el color de fondo de la barra de estado por una cadena hexadecimal (#RRGGBB) en el arranque. + + + + +* **StatusBarStyle** (status bar estilo por defecto lightcontent). En iOS 7, definir el estilo de barra de estado. Por defecto las opciones disponibles, lightcontent, blacktranslucent, blackopaque. + + + + +## Escondido en el arranque + +Durante el tiempo de ejecución puede utilizar la función StatusBar.hide abajo, pero si quieres la barra de estado que está escondido en el inicio de la aplicación, se debe modificar el archivo Info.plist de su aplicación. + +Agregar/editar estos dos atributos si no está presente. Defina **"inicialmente se esconde la barra de estado"** a **"YES"** y **"Aparición de vista basado en controlador estatus bar"** a **"NO"**. Si se edita manualmente sin Xcode, las claves y valores son: + + < llave > UIStatusBarHidden < / key >< verdadero / >< llave > UIViewControllerBasedStatusBarAppearance < / key >< falso / > + + +## Métodos + +Este plugin define global `StatusBar` objeto. + +Aunque en el ámbito global, no estará disponible hasta después de la `deviceready` evento. + + document.addEventListener ("deviceready", onDeviceReady, false); + function onDeviceReady() {console.log(StatusBar)}; + + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## Propiedades + +* StatusBar.isVisible + +## Permisos + +#### config.xml + + < nombre de la función = "StatusBar" >< nombre param = "ios-paquete" value = "CDVStatusBar" onload = "true" / >< / característica > + + +# StatusBar.overlaysWebView + +En iOS 7, hacer la barra de estado superposición o no superponer la vista Web. + + StatusBar.overlaysWebView(true); + + +## Descripción + +En iOS 7, establecida en false para que la barra de estado aparezca como iOS 6. Establece el color de fondo y estilo para utilizar las otras funciones. + +## Plataformas soportadas + +* iOS + +## Ejemplo rápido + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Utilice la barra de estado por defecto (texto oscuro, para fondos de luz). + + StatusBar.styleDefault(); + + +## Plataformas soportadas + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleLightContent + +Utilice la barra de estado lightContent (texto ligero, para fondos oscuros). + + StatusBar.styleLightContent(); + + +## Plataformas soportadas + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +Utilice la barra de estado blackTranslucent (texto ligero, para fondos oscuros). + + StatusBar.styleBlackTranslucent(); + + +## Plataformas soportadas + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +Utilice la barra de estado blackOpaque (texto ligero, para fondos oscuros). + + StatusBar.styleBlackOpaque(); + + +## Plataformas soportadas + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +En iOS 7, al establecer StatusBar.statusBarOverlaysWebView a false, se puede establecer el color de fondo de la barra de estado nombre del color. + + StatusBar.backgroundColorByName("red"); + + +Nombres de los colores admitidos son: + + negro, gris oscuro, lightGray, blanco, gris, rojo, verde, azul, cian, amarillo, magenta, naranja, púrpura, marrón + + +## Plataformas soportadas + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +Establece el color de fondo de la barra de estado por una cadena hexadecimal. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +Propiedades CSS abreviada también son compatibles. + + StatusBar.backgroundColorByHexString("#333"); = > StatusBar.backgroundColorByHexString("#FAB") #333333; = > #FFAABB + + +En iOS 7, cuando se establece StatusBar.statusBarOverlaysWebView en false, se puede establecer el color de fondo de la barra de estado una cadena hexadecimal (#RRGGBB). + +En WP7 y WP8 también puede especificar valores como #AARRGGBB, donde AA es un valor alfa + +## Plataformas soportadas + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.hide + +Ocultar la barra de estado. + + StatusBar.hide(); + + +## Plataformas soportadas + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.show + +Muestra la barra de estado. + + StatusBar.show(); + + +## Plataformas soportadas + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.isVisible + +Lea esta propiedad para ver si la barra de estado es visible o no. + + Si (StatusBar.isVisible) {/ / hacer algo} + + +## Plataformas soportadas + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 diff --git a/plugins/cordova-plugin-statusbar/doc/fr/README.md b/plugins/cordova-plugin-statusbar/doc/fr/README.md new file mode 100644 index 000000000..6f7f9bf8a --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/fr/README.md @@ -0,0 +1,276 @@ + + +# cordova-plugin-statusbar + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar) + +# StatusBar + +> Le `StatusBar` objet fournit quelques fonctions pour personnaliser les iOS et Android StatusBar. + +## Installation + + cordova plugin add cordova-plugin-statusbar + + +## Préférences + +#### config.Xml + + * **StatusBarOverlaysWebView** (boolean, la valeur par défaut true). Sur iOS 7, faire la superposition de statusbar ou pas superposition le WebView au démarrage. + + + + + * **StatusBarBackgroundColor** (chaîne hexadécimale de couleur, par défaut, #000000). Sur iOS 7 et 5 Android, définir la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale (#RRGGBB) au démarrage. + + + + + * **StatusBarStyle** (style de barre de statut, par défaut, lightcontent). Sur iOS 7, définir le style de barre de statut. Par défaut les options disponibles, lightcontent, blacktranslucent, blackopaque. + + + + +### Quirks Android + +Les lignes directrices 5 + Android spécifient à l'aide d'une couleur différente pour la barre d'État à votre application principale couleur (contrairement à la couleur uniforme statusbar de nombreuses applications iOS 7 +), donc vous pouvez définir la couleur de la barre d'état lors de l'exécution au lieu de cela via `StatusBar.backgroundColorByHexString` ou `StatusBar.backgroundColorByName`. Une façon de le faire serait : + +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +## Cacher au démarrage + +Pendant l'exécution, vous pouvez utiliser la fonction StatusBar.hide en bas, mais si vous souhaitez que la barre d'État pour être caché au démarrage de l'application, vous devez modifier le fichier Info.plist de votre application. + +Ajouter/modifier ces deux attributs si n'est pas présent. **"Barre d'État est initialement masqué"** la valeur **"** Yes" et **"À l'apparence vue sur contrôleur statut bar"** la valeur **"Non"**. Si vous modifiez manuellement sans Xcode, les clés et les valeurs sont : + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Méthodes + +Ce plugin définit objet `StatusBar` global. + +Bien que dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + + * StatusBar.overlaysWebView + * StatusBar.styleDefault + * StatusBar.styleLightContent + * StatusBar.styleBlackTranslucent + * StatusBar.styleBlackOpaque + * StatusBar.backgroundColorByName + * StatusBar.backgroundColorByHexString + * StatusBar.hide + * StatusBar.show + +## Propriétés + + * StatusBar.isVisible + +## Autorisations + +#### config.Xml + + + + + + +# StatusBar.overlaysWebView + +Sur iOS 7, faire la statusbar superposition ou pas superposer le WebView. + + StatusBar.overlaysWebView(true); + + +## Description + +Sur iOS 7, la valeur false pour afficher la barre d'État comme iOS 6. Définissez la couleur de style et d'arrière-plan en fonction de l'utilisation des autres fonctions. + +## Plates-formes supportées + + * iOS + +## Exemple court + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Utilisez la barre de statut par défaut (texte sombre, pour les arrière-plans lumineux). + + StatusBar.styleDefault(); + + +## Plates-formes supportées + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleLightContent + +Utilisez la barre d'État lightContent (texte clair, des arrière-plans sombres). + + StatusBar.styleLightContent(); + + +## Plates-formes supportées + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +Utilisez la barre d'État blackTranslucent (texte clair, des arrière-plans sombres). + + StatusBar.styleBlackTranslucent(); + + +## Plates-formes supportées + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +Utilisez la barre d'État blackOpaque (texte clair, des arrière-plans sombres). + + StatusBar.styleBlackOpaque(); + + +## Plates-formes supportées + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +Sur iOS 7, lorsque vous définissez StatusBar.statusBarOverlaysWebView sur false, vous pouvez définir la couleur d'arrière-plan de la barre d'État par nom de couleur. + + StatusBar.backgroundColorByName("red"); + + +Les noms de couleurs prises en charge sont : + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## Plates-formes supportées + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +Définit la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +Propriétés de raccourci CSS sont également pris en charge. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Sur iOS 7, lorsque vous définissez StatusBar.statusBarOverlaysWebView sur false, vous pouvez définir la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale (#RRGGBB). + +Sur WP7 et WP8, vous pouvez également spécifier des valeurs comme #AARRGGBB, où AA représente une valeur alpha + +## Plates-formes supportées + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.hide + +Masquer la barre d'État. + + StatusBar.hide(); + + +## Plates-formes supportées + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.show + +Affiche la barre d'État. + + StatusBar.show(); + + +## Plates-formes supportées + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.isVisible + +Lire cette propriété afin de voir si la barre d'État est visible ou non. + + if (StatusBar.isVisible) { + // do something + } + + +## Plates-formes supportées + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/doc/fr/index.md b/plugins/cordova-plugin-statusbar/doc/fr/index.md new file mode 100644 index 000000000..816f3df8b --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/fr/index.md @@ -0,0 +1,262 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> Le `StatusBar` objet fournit quelques fonctions pour personnaliser les iOS et Android StatusBar. + +## Installation + + cordova plugin add cordova-plugin-statusbar + + +## Préférences + +#### config.xml + +* **StatusBarOverlaysWebView** (boolean, la valeur par défaut true). Sur iOS 7, faire la superposition de statusbar ou pas superposition le WebView au démarrage. + + + + +* **StatusBarBackgroundColor** (chaîne hexadécimale de couleur, par défaut, #000000). Sur iOS 7, définir la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale (#RRGGBB) au démarrage. + + + + +* **StatusBarStyle** (style de barre de statut, par défaut, lightcontent). Sur iOS 7, définir le style de barre de statut. Par défaut les options disponibles, lightcontent, blacktranslucent, blackopaque. + + + + +## Cacher au démarrage + +Pendant l'exécution, vous pouvez utiliser la fonction StatusBar.hide en bas, mais si vous souhaitez que la barre d'État pour être caché au démarrage de l'application, vous devez modifier le fichier Info.plist de votre application. + +Ajouter/modifier ces deux attributs si n'est pas présent. **"Barre d'État est initialement masqué"** la valeur **"** Yes" et **"À l'apparence vue sur contrôleur statut bar"** la valeur **"Non"**. Si vous modifiez manuellement sans Xcode, les clés et les valeurs sont : + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Méthodes + +Ce plugin définit objet `StatusBar` global. + +Bien que dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## Propriétés + +* StatusBar.isVisible + +## Autorisations + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +Sur iOS 7, faire la statusbar superposition ou pas superposer le WebView. + + StatusBar.overlaysWebView(true); + + +## Description + +Sur iOS 7, la valeur false pour afficher la barre d'État comme iOS 6. Définissez la couleur de style et d'arrière-plan en fonction de l'utilisation des autres fonctions. + +## Plates-formes supportées + +* iOS + +## Exemple court + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Utilisez la barre de statut par défaut (texte sombre, pour les arrière-plans lumineux). + + StatusBar.styleDefault(); + + +## Plates-formes prises en charge + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleLightContent + +Utilisez la barre d'État lightContent (texte clair, des arrière-plans sombres). + + StatusBar.styleLightContent(); + + +## Plates-formes prises en charge + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +Utilisez la barre d'État blackTranslucent (texte clair, des arrière-plans sombres). + + StatusBar.styleBlackTranslucent(); + + +## Plates-formes prises en charge + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +Utilisez la barre d'État blackOpaque (texte clair, des arrière-plans sombres). + + StatusBar.styleBlackOpaque(); + + +## Plates-formes prises en charge + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +Sur iOS 7, lorsque vous définissez StatusBar.statusBarOverlaysWebView sur false, vous pouvez définir la couleur d'arrière-plan de la barre d'État par nom de couleur. + + StatusBar.backgroundColorByName("red"); + + +Les noms de couleurs prises en charge sont : + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## Plates-formes prises en charge + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +Définit la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +Propriétés de raccourci CSS sont également pris en charge. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Sur iOS 7, lorsque vous définissez StatusBar.statusBarOverlaysWebView sur false, vous pouvez définir la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale (#RRGGBB). + +Sur WP7 et WP8, vous pouvez également spécifier des valeurs comme #AARRGGBB, où AA représente une valeur alpha + +## Plates-formes prises en charge + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.hide + +Masquer la barre d'État. + + StatusBar.hide(); + + +## Plates-formes prises en charge + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.show + +Affiche la barre d'État. + + StatusBar.show(); + + +## Plates-formes prises en charge + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.isVisible + +Lire cette propriété afin de voir si la barre d'État est visible ou non. + + if (StatusBar.isVisible) { + // do something + } + + +## Plates-formes supportées + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 diff --git a/plugins/cordova-plugin-statusbar/doc/it/README.md b/plugins/cordova-plugin-statusbar/doc/it/README.md new file mode 100644 index 000000000..cf3f84474 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/it/README.md @@ -0,0 +1,276 @@ + + +# cordova-plugin-statusbar + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar) + +# StatusBar + +> Il `StatusBar` oggetto fornisce alcune funzioni per personalizzare l'iOS e Android StatusBar. + +## Installazione + + cordova plugin add cordova-plugin-statusbar + + +## Preferenze + +#### config. XML + + * **StatusBarOverlaysWebView** (boolean, default è true). IOS 7, rendono la statusbar sovrapposizione o la non sovrapposizione WebView all'avvio. + + + + + * **StatusBarBackgroundColor** (stringa esadecimale di colore, il valore predefinito è #000000). Su iOS 7 e 5 Android, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB) all'avvio. + + + + + * **StatusBarStyle** (status bar in stile, default è lightcontent). IOS 7, impostare lo stile di barra di stato. Predefinita di opzioni disponibili, lightcontent, blacktranslucent, blackopaque. + + + + +### Stranezze Android + +Le linee 5 + Android Guida specificano utilizzando un colore diverso per la barra di stato che l'app principale di colore (a differenza di colore uniforme statusbar di molte applicazioni di iOS 7 +), quindi si consiglia di impostare il colore della barra di stato in fase di esecuzione invece tramite `StatusBar.backgroundColorByHexString` o `StatusBar.backgroundColorByName`. Un modo per farlo sarebbe: + +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +## Nascondendo all'avvio + +In fase di esecuzione è possibile utilizzare la funzione di StatusBar.hide qui sotto, ma se si desidera che la barra di stato venga nascosta all'avvio di app, è necessario modificare il file info. plist dell'app. + +Aggiungere o modificare questi due attributi, se non presente. Impostare la **"barra di stato è inizialmente nascosto"** a **"YES"** e **"Aspetto di vista basati su controller status bar"** a **"NO"**. Se si modifica manualmente senza Xcode, le chiavi e i valori sono: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Metodi + +Questo plugin definisce globale oggetto `StatusBar`. + +Anche se in ambito globale, non è disponibile fino a dopo l'evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + + * StatusBar.overlaysWebView + * StatusBar.styleDefault + * StatusBar.styleLightContent + * StatusBar.styleBlackTranslucent + * StatusBar.styleBlackOpaque + * StatusBar.backgroundColorByName + * StatusBar.backgroundColorByHexString + * StatusBar.hide + * StatusBar.show + +## Proprietà + + * StatusBar.isVisible + +## Autorizzazioni + +#### config. XML + + + + + + +# StatusBar.overlaysWebView + +IOS 7, rendono la statusbar sovrapposizione o non sovrapporre WebView. + + StatusBar.overlaysWebView(true); + + +## Descrizione + +IOS 7, impostato su false per rendere la barra di stato vengono visualizzati come iOS 6. Impostare il colore di sfondo e stile per soddisfare utilizzando altre funzioni. + +## Piattaforme supportate + + * iOS + +## Esempio rapido + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Utilizzare la barra di stato predefinito (testo scuro, per sfondi di luce). + + StatusBar.styleDefault(); + + +## Piattaforme supportate + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleLightContent + +Utilizzare la barra di stato lightContent (testo in chiaro, per sfondi scuri). + + StatusBar.styleLightContent(); + + +## Piattaforme supportate + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +Utilizzare la barra di stato blackTranslucent (testo in chiaro, per sfondi scuri). + + StatusBar.styleBlackTranslucent(); + + +## Piattaforme supportate + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +Utilizzare la barra di stato blackOpaque (testo in chiaro, per sfondi scuri). + + StatusBar.styleBlackOpaque(); + + +## Piattaforme supportate + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato con il nome di colore. + + StatusBar.backgroundColorByName("red"); + + +Nomi di colore supportati sono: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## Piattaforme supportate + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +Imposta il colore di sfondo della barra di stato di una stringa esadecimale. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +Proprietà di scrittura stenografica CSS sono supportati anche. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB). + +Su WP7 e WP8 è inoltre possibile specificare i valori come #AARRGGBB, dove AA è un valore alfa + +## Piattaforme supportate + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.hide + +Nascondere la barra di stato. + + StatusBar.hide(); + + +## Piattaforme supportate + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.show + +Mostra la barra di stato. + + StatusBar.show(); + + +## Piattaforme supportate + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.isVisible + +Leggere questa proprietà per vedere se la barra di stato è visibile o no. + + if (StatusBar.isVisible) { + // do something + } + + +## Piattaforme supportate + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/doc/it/index.md b/plugins/cordova-plugin-statusbar/doc/it/index.md new file mode 100644 index 000000000..73ddcd4bc --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/it/index.md @@ -0,0 +1,262 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> Il `StatusBar` oggetto fornisce alcune funzioni per personalizzare l'iOS e Android StatusBar. + +## Installazione + + cordova plugin add cordova-plugin-statusbar + + +## Preferenze + +#### config.xml + +* **StatusBarOverlaysWebView** (boolean, default è true). IOS 7, rendono la statusbar sovrapposizione o la non sovrapposizione WebView all'avvio. + + + + +* **StatusBarBackgroundColor** (stringa esadecimale colore, predefinito è #000000). IOS 7, impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB) all'avvio. + + + + +* **StatusBarStyle** (status bar in stile, default è lightcontent). IOS 7, impostare lo stile di barra di stato. Predefinita di opzioni disponibili, lightcontent, blacktranslucent, blackopaque. + + + + +## Nascondendo all'avvio + +In fase di esecuzione è possibile utilizzare la funzione di StatusBar.hide qui sotto, ma se si desidera che la barra di stato venga nascosta all'avvio di app, è necessario modificare il file info. plist dell'app. + +Aggiungere o modificare questi due attributi, se non presente. Impostare la **"barra di stato è inizialmente nascosto"** a **"YES"** e **"Aspetto di vista basati su controller status bar"** a **"NO"**. Se si modifica manualmente senza Xcode, le chiavi e i valori sono: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Metodi + +Questo plugin definisce globale oggetto `StatusBar`. + +Anche se in ambito globale, non è disponibile fino a dopo l'evento `deviceready`. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## Proprietà + +* StatusBar.isVisible + +## Autorizzazioni + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +IOS 7, rendono la statusbar sovrapposizione o non sovrapporre WebView. + + StatusBar.overlaysWebView(true); + + +## Descrizione + +IOS 7, impostato su false per rendere la barra di stato vengono visualizzati come iOS 6. Impostare il colore di sfondo e stile per soddisfare utilizzando altre funzioni. + +## Piattaforme supportate + +* iOS + +## Esempio rapido + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Utilizzare la barra di stato predefinito (testo scuro, per sfondi di luce). + + StatusBar.styleDefault(); + + +## Piattaforme supportate + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleLightContent + +Utilizzare la barra di stato lightContent (testo in chiaro, per sfondi scuri). + + StatusBar.styleLightContent(); + + +## Piattaforme supportate + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +Utilizzare la barra di stato blackTranslucent (testo in chiaro, per sfondi scuri). + + StatusBar.styleBlackTranslucent(); + + +## Piattaforme supportate + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +Utilizzare la barra di stato blackOpaque (testo in chiaro, per sfondi scuri). + + StatusBar.styleBlackOpaque(); + + +## Piattaforme supportate + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato con il nome di colore. + + StatusBar.backgroundColorByName("red"); + + +Nomi di colore supportati sono: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## Piattaforme supportate + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +Imposta il colore di sfondo della barra di stato di una stringa esadecimale. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +Proprietà di scrittura stenografica CSS sono supportati anche. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB). + +Su WP7 e WP8 è inoltre possibile specificare i valori come #AARRGGBB, dove AA è un valore alfa + +## Piattaforme supportate + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.hide + +Nascondere la barra di stato. + + StatusBar.hide(); + + +## Piattaforme supportate + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.show + +Mostra la barra di stato. + + StatusBar.show(); + + +## Piattaforme supportate + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.isVisible + +Leggere questa proprietà per vedere se la barra di stato è visibile o no. + + if (StatusBar.isVisible) { + // do something + } + + +## Piattaforme supportate + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 diff --git a/plugins/cordova-plugin-statusbar/doc/ja/README.md b/plugins/cordova-plugin-statusbar/doc/ja/README.md new file mode 100644 index 000000000..fc8b59a45 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/ja/README.md @@ -0,0 +1,276 @@ + + +# cordova-plugin-statusbar + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar) + +# StatusBar + +> `StatusBar`オブジェクトã¯ã€iOS 㨠Android ステータス ãƒãƒ¼ã‚’カスタマイズã™ã‚‹ã„ãã¤ã‹ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +## インストール + + cordova plugin add cordova-plugin-statusbar + + +## 基本設定 + +#### config.xml + + * **StatusBarOverlaysWebView**(ブール値ã€ãƒ‡ãƒ•ォルト㯠true)。IOS 7ã€èµ·å‹•時ã«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ オーãƒãƒ¼ãƒ¬ã‚¤ã¾ãŸã¯ãªã„オーãƒãƒ¼ãƒ¬ã‚¤ã€WebView を作る。 + + + + + * **StatusBarBackgroundColor**(カラー 16 é€²æ–‡å­—åˆ—ã€æ—¢å®šå€¤ã¯ #000000)。IOS 7 ã¨ã‚¢ãƒ³ãƒ‰ãƒ­ã‚¤ãƒ‰ 5ã€16 進文字列 (#RRGGBB) 起動時ã«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ã®èƒŒæ™¯è‰²ã‚’設定ã—ã¾ã™ã€‚ + + + + + * **StatusBarStyle**(ステータス ãƒãƒ¼ã®ã‚¹ã‚¿ã‚¤ãƒ«ã€æ—¢å®šå€¤ã¯ lightcontent)。Ios 7ã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’設定ã—ã¾ã™ã€‚使用å¯èƒ½ãªã‚ªãƒ—ションã®ãƒ‡ãƒ•ォルトã€lightcontentã€blacktranslucentã€blackopaque。 + + + + +### Android ã®ç™– + +Android ã®ã‚¬ã‚¤ãƒ‰ãƒ©ã‚¤ãƒ³ 5 + 指定メイン アプリよりもステータスãƒãƒ¼ã®ç•°ãªã‚‹è‰²ã‚’使用ã—ã¦`StatusBar.backgroundColorByHexString`ã¾ãŸã¯`StatusBar.backgroundColorByName`経由ã§ä»£ã‚りã«å®Ÿè¡Œæ™‚ã«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ã®è‰²ã‚’設定ã™ã‚‹å ´åˆãŒã‚りã¾ã™ã®ã§ (ã¨ã¯é•ã£ã¦åˆ¶æœã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼è‰²å¤šãã® iOS 7 + アプリã®) 色ã—ã¾ã™ã€‚ ãã‚Œã‚’è¡Œã†æ–¹æ³•ã® 1 ã¤ã«ãªã‚Šã¾ã™ã€‚ + +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +## 起動時ã«éžè¡¨ç¤º + +実行時ã«ä¸‹ã«ã€StatusBar.hide 関数を使用ã§ãã¾ã™ãŒã€StatusBar アプリ起動時ã«éžè¡¨ç¤ºã«ã™ã‚‹å ´åˆã¯ã€ã‚¢ãƒ—リ㮠Info.plist ファイルを変更ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ã“れら 2 ã¤ã®å±žæ€§ã®è¿½åŠ /編集存在ã—ãªã„å ´åˆã€‚ **「ステータス ãƒãƒ¼ãŒéžè¡¨ç¤ºæœ€åˆã€** **"YES"**を設定ã—〠**「ビュー コント ローラー ベースã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ã®å¤–観ã€** **"NO"**ã«ã—ã¾ã™ã€‚ Xcode ã›ã𿉋動ã§ç·¨é›†ã™ã‚‹ã€ã‚­ãƒ¼ã¨å€¤ã¯ã€‚ + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## メソッド + +ã“ã®ãƒ—ラグインã§ã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ« `StatusBar` オブジェクトを定義ã—ã¾ã™ã€‚ + +グローãƒãƒ« スコープã§ã¯ã‚ã‚‹ãŒãれãŒãªã„ã¾ã§ `deviceready` イベントã®å¾Œã§ã™ã€‚ + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + + * StatusBar.overlaysWebView + * StatusBar.styleDefault + * StatusBar.styleLightContent + * StatusBar.styleBlackTranslucent + * StatusBar.styleBlackOpaque + * StatusBar.backgroundColorByName + * StatusBar.backgroundColorByHexString + * StatusBar.hide + * StatusBar.show + +## プロパティ + + * StatusBar.isVisible + +## ã‚¢ã‚¯ã‚»ã‚¹è¨±å¯ + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +IOS 7ã€statusbar オーãƒãƒ¼ãƒ¬ã‚¤ã¾ãŸã¯ãªã„ WebView をオーãƒãƒ¼ãƒ¬ã‚¤ã—ã¾ã™ã€‚ + + StatusBar.overlaysWebView(true); + + +## 解説 + +IOS 7ã€iOS ã® 6 ã®ã‚ˆã†ã«è¡¨ç¤ºã•れるステータスãƒãƒ¼ã‚’ false ã«è¨­å®šã—ã¾ã™ã€‚ä»–ã®é–¢æ•°ã®ä½¿ç”¨ã«åˆã‚ã›ã¦ã‚¹ã‚¿ã‚¤ãƒ«ã‚„背景色を設定ã—ã¾ã™ã€‚ + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + +## ç°¡å˜ãªä¾‹ + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +既定ステータス ãƒãƒ¼ (æš—ã„ãƒ†ã‚­ã‚¹ãƒˆã€æ·¡è‰²ã®èƒŒæ™¯) を使用ã—ã¾ã™ã€‚ + + StatusBar.styleDefault(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleLightContent + +LightContent ステータスãƒãƒ¼ (æš—ã„èƒŒæ™¯ã®æ˜Žã‚‹ã„テキスト) を使用ã—ã¾ã™ã€‚ + + StatusBar.styleLightContent(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +BlackTranslucent ステータスãƒãƒ¼ (æš—ã„èƒŒæ™¯ã®æ˜Žã‚‹ã„テキスト) を使用ã—ã¾ã™ã€‚ + + StatusBar.styleBlackTranslucent(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +BlackOpaque ステータスãƒãƒ¼ (æš—ã„èƒŒæ™¯ã®æ˜Žã‚‹ã„テキスト) を使用ã—ã¾ã™ã€‚ + + StatusBar.styleBlackOpaque(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +Ios 7ã€StatusBar.statusBarOverlaysWebView ã‚’ false ã«è¨­å®šã™ã‚‹å ´åˆã¯ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ã®èƒŒæ™¯è‰²ã®è‰²ã®åå‰ã«ã‚ˆã£ã¦è¨­å®šã§ãã¾ã™ã€‚ + + StatusBar.backgroundColorByName("red"); + + +サãƒãƒ¼ãƒˆã•れã¦ã„る色ã®åå‰ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ã€‚ + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +16 進文字列をステータス ãƒãƒ¼ã®èƒŒæ™¯è‰²ã‚’設定ã—ã¾ã™ã€‚ + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +速記㮠CSS プロパティもサãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Ios 7ã€StatusBar.statusBarOverlaysWebView ã‚’ false ã«è¨­å®šã™ã‚‹å ´åˆã¯ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ã®èƒŒæ™¯è‰²ã‚’ 16 進文字列 (#RRGGBB) ã§è¨­å®šã§ãã¾ã™ã€‚ + +WP7 㨠WP8 も指定ã§ãã¾ã™å€¤ #AARRGGBB, AA ã¯ã€ã‚¢ãƒ«ãƒ•ァ値ã¨ã—㦠+ +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.hide + +ステータスãƒãƒ¼ã‚’éš ã—ã¾ã™ã€‚ + + StatusBar.hide(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * アンドロイド + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.show + +ステータス ãƒãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + StatusBar.show(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * アンドロイド + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.isVisible + +ã“ã®ãƒ—ロパティã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ãŒè¡¨ç¤ºã•れるã‹ã©ã†ã‹ã‚’ãŠèª­ã¿ãã ã•ã„。 + + if (StatusBar.isVisible) { + // do something + } + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + + * iOS + * アンドロイド + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/doc/ja/index.md b/plugins/cordova-plugin-statusbar/doc/ja/index.md new file mode 100644 index 000000000..79705f223 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/ja/index.md @@ -0,0 +1,262 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> `StatusBar`オブジェクトã¯ã€iOS 㨠Android ステータス ãƒãƒ¼ã‚’カスタマイズã™ã‚‹ã„ãã¤ã‹ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +## インストール + + cordova plugin add cordova-plugin-statusbar + + +## 基本設定 + +#### config.xml + +* **StatusBarOverlaysWebView**(ブール値ã€ãƒ‡ãƒ•ォルト㯠true)。IOS 7ã€èµ·å‹•時ã«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ オーãƒãƒ¼ãƒ¬ã‚¤ã¾ãŸã¯ãªã„オーãƒãƒ¼ãƒ¬ã‚¤ã€WebView を作る。 + + + + +* **StatusBarBackgroundColor**(色 16 進文字列ã€ãƒ‡ãƒ•ォルト㯠# 000000)。Ios 7ã€èµ·å‹•時㫠16 進文字列 (#RRGGBB) ã§ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ã®èƒŒæ™¯è‰²ã‚’設定ã—ã¾ã™ã€‚ + + + + +* **StatusBarStyle**(ステータス ãƒãƒ¼ã®ã‚¹ã‚¿ã‚¤ãƒ«ã€æ—¢å®šå€¤ã¯ lightcontent)。Ios 7ã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’設定ã—ã¾ã™ã€‚使用å¯èƒ½ãªã‚ªãƒ—ションã®ãƒ‡ãƒ•ォルトã€lightcontentã€blacktranslucentã€blackopaque。 + + + + +## 起動時ã«éžè¡¨ç¤º + +実行時ã«ä¸‹ã«ã€StatusBar.hide 関数を使用ã§ãã¾ã™ãŒã€StatusBar アプリ起動時ã«éžè¡¨ç¤ºã«ã™ã‚‹å ´åˆã¯ã€ã‚¢ãƒ—リ㮠Info.plist ファイルを変更ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ã“れら 2 ã¤ã®å±žæ€§ã®è¿½åŠ /編集存在ã—ãªã„å ´åˆã€‚ **「ステータス ãƒãƒ¼ãŒéžè¡¨ç¤ºæœ€åˆã€** **"YES"**を設定ã—〠**「ビュー コント ローラー ベースã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ ãƒãƒ¼ã®å¤–観ã€** **"NO"**ã«ã—ã¾ã™ã€‚ Xcode ã›ã𿉋動ã§ç·¨é›†ã™ã‚‹ã€ã‚­ãƒ¼ã¨å€¤ã¯ã€‚ + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## メソッド + +ã“ã®ãƒ—ラグインã§ã¯ã€ã‚°ãƒ­ãƒ¼ãƒãƒ« `StatusBar` オブジェクトを定義ã—ã¾ã™ã€‚ + +グローãƒãƒ« スコープã§ã¯ã‚ã‚‹ãŒãれãŒãªã„ã¾ã§ `deviceready` イベントã®å¾Œã§ã™ã€‚ + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## プロパティ + +* StatusBar.isVisible + +## ã‚¢ã‚¯ã‚»ã‚¹è¨±å¯ + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +IOS 7ã€statusbar オーãƒãƒ¼ãƒ¬ã‚¤ã¾ãŸã¯ãªã„ WebView をオーãƒãƒ¼ãƒ¬ã‚¤ã—ã¾ã™ã€‚ + + StatusBar.overlaysWebView(true); + + +## 解説 + +IOS 7ã€iOS ã® 6 ã®ã‚ˆã†ã«è¡¨ç¤ºã•れるステータスãƒãƒ¼ã‚’ false ã«è¨­å®šã—ã¾ã™ã€‚ä»–ã®é–¢æ•°ã®ä½¿ç”¨ã«åˆã‚ã›ã¦ã‚¹ã‚¿ã‚¤ãƒ«ã‚„背景色を設定ã—ã¾ã™ã€‚ + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS + +## ç°¡å˜ãªä¾‹ + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +既定ステータス ãƒãƒ¼ (æš—ã„ãƒ†ã‚­ã‚¹ãƒˆã€æ·¡è‰²ã®èƒŒæ™¯) を使用ã—ã¾ã™ã€‚ + + StatusBar.styleDefault(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleLightContent + +LightContent ステータスãƒãƒ¼ (æš—ã„èƒŒæ™¯ã®æ˜Žã‚‹ã„テキスト) を使用ã—ã¾ã™ã€‚ + + StatusBar.styleLightContent(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +BlackTranslucent ステータスãƒãƒ¼ (æš—ã„èƒŒæ™¯ã®æ˜Žã‚‹ã„テキスト) を使用ã—ã¾ã™ã€‚ + + StatusBar.styleBlackTranslucent(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +BlackOpaque ステータスãƒãƒ¼ (æš—ã„èƒŒæ™¯ã®æ˜Žã‚‹ã„テキスト) を使用ã—ã¾ã™ã€‚ + + StatusBar.styleBlackOpaque(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +Ios 7ã€StatusBar.statusBarOverlaysWebView ã‚’ false ã«è¨­å®šã™ã‚‹å ´åˆã¯ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ã®èƒŒæ™¯è‰²ã®è‰²ã®åå‰ã«ã‚ˆã£ã¦è¨­å®šã§ãã¾ã™ã€‚ + + StatusBar.backgroundColorByName("red"); + + +サãƒãƒ¼ãƒˆã•れã¦ã„る色ã®åå‰ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™ã€‚ + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +16 進文字列をステータス ãƒãƒ¼ã®èƒŒæ™¯è‰²ã‚’設定ã—ã¾ã™ã€‚ + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +速記㮠CSS プロパティもサãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Ios 7ã€StatusBar.statusBarOverlaysWebView ã‚’ false ã«è¨­å®šã™ã‚‹å ´åˆã¯ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ã®èƒŒæ™¯è‰²ã‚’ 16 進文字列 (#RRGGBB) ã§è¨­å®šã§ãã¾ã™ã€‚ + +WP7 㨠WP8 も指定ã§ãã¾ã™å€¤ #AARRGGBB, AA ã¯ã€ã‚¢ãƒ«ãƒ•ァ値ã¨ã—㦠+ +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.hide + +ステータスãƒãƒ¼ã‚’éš ã—ã¾ã™ã€‚ + + StatusBar.hide(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* アンドロイド +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.show + +ステータス ãƒãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + StatusBar.show(); + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* アンドロイド +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.isVisible + +ã“ã®ãƒ—ロパティã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒãƒ¼ãŒè¡¨ç¤ºã•れるã‹ã©ã†ã‹ã‚’ãŠèª­ã¿ãã ã•ã„。 + + if (StatusBar.isVisible) { + // do something + } + + +## サãƒãƒ¼ãƒˆã•れã¦ã„るプラットフォーム + +* iOS +* アンドロイド +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 diff --git a/plugins/cordova-plugin-statusbar/doc/ko/README.md b/plugins/cordova-plugin-statusbar/doc/ko/README.md new file mode 100644 index 000000000..f76ac3e2c --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/ko/README.md @@ -0,0 +1,276 @@ + + +# cordova-plugin-statusbar + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar) + +# StatusBar + +> `StatusBar`개체 iOS와 안 드 로ì´ë“œ ìƒíƒœ í‘œì‹œì¤„ì„ ì‚¬ìš©ìž ì§€ì • 하려면 몇 가지 ê¸°ëŠ¥ì„ ì œê³µ 합니다. + +## 설치 + + cordova plugin add cordova-plugin-statusbar + + +## 환경 설정 + +#### config.xml + + * **StatusBarOverlaysWebView** (boolean, 기본값: true)입니다. IOS 7, 시작 시 ìƒíƒœ 표시줄 ì˜¤ë²„ë ˆì´ ë˜ëŠ” WebView 중첩 ë˜ì§€ í™•ì¸ í•©ë‹ˆë‹¤. + + + + + * **StatusBarBackgroundColor** (ìƒ‰ìƒ 16 진수 문ìžì—´ 기본값: #000000). IOSì—서 7ê³¼ 안 드 로ì´ë“œ 5 시작 시 16 진수 문ìžì—´ (#RRGGBB) ìƒíƒœ í‘œì‹œì¤„ì˜ ë°°ê²½ìƒ‰ì„ ì„¤ì • 합니다. + + + + + * **StatusBarStyle** (ìƒíƒœ 표시줄 스타ì¼, 기본값: lightcontent). Ios 7, ìƒíƒœ 표시줄 스타ì¼ì„ 설정 합니다. 사용 가능한 옵션 기본, lightcontent, blacktranslucent, blackopaque. + + + + +### 안 드 로ì´ë“œ ë‹¨ì  + +안 드 로ì´ë“œ 5 + 지침 보다 ê·€í•˜ì˜ ì£¼ìš” ì‘ìš© 프로그램 ìƒíƒœ í‘œì‹œì¤„ì— ëŒ€ 한 다른 ìƒ‰ì„ ì‚¬ìš© 하 ì—¬ 지정한 ìƒ‰ìƒ (와 달리 ê· ì¼ í•œ ìƒíƒœ í‘œì‹œì¤„ì˜ ìƒ‰ìƒ ë§Žì€ iOS 7 + 애플 리 ì¼€ì´ ì…˜), `StatusBar.backgroundColorByHexString` ë˜ëŠ” `StatusBar.backgroundColorByName`를 통해 대신 ëŸ°íƒ€ìž„ì— ìƒíƒœ 표시줄 ìƒ‰ì„ ì„¤ì • í•˜ê³ ìž í•  수 있습니다. 한 가지 ë°©ë²•ì€ ì¼ ê²ƒìž…ë‹ˆë‹¤. + +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +## 시작 시 숨기기 + +런타임 ë™ì•ˆ ì•„ëž˜ì˜ StatusBar.hide 함수를 사용할 수 있습니다 하지만 ë‹¹ì‹ ì´ ì›í•˜ëŠ” ì‘ìš© 프로그램 시작 시 숨겨진 ìƒíƒœ 표시줄, ì‘ìš© í”„ë¡œê·¸ëž¨ì˜ Info.plist íŒŒì¼ ìˆ˜ì • 해야 합니다. + +추가 íŽ¸ì§‘ì´ ë‘ íŠ¹ì„±ì´ ì—†ëŠ” 경우. **"ìƒíƒœ 표시줄 ì²˜ìŒ ìˆ¨ê²¨ì§„"** **"YES"** 로 설정 하 ê³  **"ë·° 컨트롤러 기반 ìƒíƒœ 표시줄 모양"** **"NO"**로 설정 합니다. Xcode, 열쇠 ì—†ì´ ìˆ˜ë™ìœ¼ë¡œ 편집 하는 경우 ê°’ì€: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## 메서드 + +ì´ í”ŒëŸ¬ê·¸ì¸ ê¸€ë¡œë²Œ `StatusBar` 개체를 ì •ì˜í•©ë‹ˆë‹¤. + +ì „ì—­ ë²”ìœ„ì— ìžˆì§€ë§Œ ê·¸ê²ƒì€ ë¶ˆê°€ëŠ¥ê¹Œì§€ `deviceready` ì´ë²¤íЏ 후. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + + * StatusBar.overlaysWebView + * StatusBar.styleDefault + * StatusBar.styleLightContent + * StatusBar.styleBlackTranslucent + * StatusBar.styleBlackOpaque + * StatusBar.backgroundColorByName + * StatusBar.backgroundColorByHexString + * StatusBar.hide + * StatusBar.show + +## ì†ì„± + + * StatusBar.isVisible + +## 사용 권한 + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +IOS 7, ì˜¤ë²„ë ˆì´ ë˜ëŠ” 하지 WebView 중첩 ìƒíƒœ í‘œì‹œì¤„ì„ í™•ì¸ í•©ë‹ˆë‹¤. + + StatusBar.overlaysWebView(true); + + +## 설명 + +7 iOS, iOS 6 처럼 나타나는 ìƒíƒœ í‘œì‹œì¤„ì„ false로 설정 합니다. 다른 함수를 사용 하 ì—¬ì— ë§žê²Œ 스타ì¼ê³¼ ë°°ê²½ 색ìƒì„ 설정 합니다. + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + +## 빠른 예제 + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +기본 ìƒíƒœ 표시줄 (ì–´ë‘ìš´ í…스트, ë°ì€ ë°°ê²½ì— ëŒ€ 한)를 사용 합니다. + + StatusBar.styleDefault(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleLightContent + +LightContent ìƒíƒœ 표시줄 (ì–´ë‘ìš´ ë°°ê²½ì— ëŒ€ 한 가벼운 í…스트)ì„ ì‚¬ìš© 합니다. + + StatusBar.styleLightContent(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +BlackTranslucent ìƒíƒœ 표시줄 (ì–´ë‘ìš´ ë°°ê²½ì— ëŒ€ 한 가벼운 í…스트)ì„ ì‚¬ìš© 합니다. + + StatusBar.styleBlackTranslucent(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +BlackOpaque ìƒíƒœ 표시줄 (ì–´ë‘ìš´ ë°°ê²½ì— ëŒ€ 한 가벼운 í…스트)ì„ ì‚¬ìš© 합니다. + + StatusBar.styleBlackOpaque(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +Ios 7, StatusBar.statusBarOverlaysWebViewì„ false로 설정 하면 설정할 수 있는 ìƒíƒœ í‘œì‹œì¤„ì˜ ë°°ê²½ìƒ‰ ìƒ‰ìƒ ì´ë¦„으로. + + StatusBar.backgroundColorByName("red"); + + +ì§€ì› ë˜ëŠ” 색 ì´ë¦„입니다. + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +16 진수 문ìžì—´ ìƒíƒœ í‘œì‹œì¤„ì˜ ë°°ê²½ìƒ‰ì„ ì„¤ì •í•©ë‹ˆë‹¤. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +CSS 대표 ì†ì„± ì§€ì› ë©ë‹ˆë‹¤. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Ios 7, StatusBar.statusBarOverlaysWebViewì„ false로 설정 하면 설정할 수 있는 ìƒíƒœ í‘œì‹œì¤„ì˜ ë°°ê²½ìƒ‰ 16 진수 문ìžì—´ (#RRGGBB)ì— ì˜í•´. + +WP7 ë° WP8ì— ë‹¹ì‹ ì€ ë˜í•œ #AARRGGBB, AA는 알파 값으로 ê°’ì„ ì§€ì •í•  수 있습니다. + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.hide + +숨기기 ìƒíƒœ 표시줄. + + StatusBar.hide(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * 안 드 로ì´ë“œ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.show + +ìƒíƒœ í‘œì‹œì¤„ì„ í‘œì‹œí•©ë‹ˆë‹¤. + + StatusBar.show(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * 안 드 로ì´ë“œ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.isVisible + +ì´ ì†ì„±ì„ ìƒíƒœ 표시줄 표시 ë˜ëŠ” 경우 ì½ê¸°. + + if (StatusBar.isVisible) { + // do something + } + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + + * iOS + * 안 드 로ì´ë“œ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/doc/ko/index.md b/plugins/cordova-plugin-statusbar/doc/ko/index.md new file mode 100644 index 000000000..44de75bd9 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/ko/index.md @@ -0,0 +1,262 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> `StatusBar`개체 iOS와 안 드 로ì´ë“œ ìƒíƒœ í‘œì‹œì¤„ì„ ì‚¬ìš©ìž ì§€ì • 하려면 몇 가지 ê¸°ëŠ¥ì„ ì œê³µ 합니다. + +## 설치 + + cordova plugin add cordova-plugin-statusbar + + +## 환경 설정 + +#### config.xml + +* **StatusBarOverlaysWebView** (boolean, 기본값: true)입니다. IOS 7, 시작 시 ìƒíƒœ 표시줄 ì˜¤ë²„ë ˆì´ ë˜ëŠ” WebView 중첩 ë˜ì§€ í™•ì¸ í•©ë‹ˆë‹¤. + + + + +* **StatusBarBackgroundColor** (ìƒ‰ìƒ 16 진수 문ìžì—´ 기본값: #000000). Ios 7, 시작 시 16 진수 문ìžì—´ (#RRGGBB) ìƒíƒœ í‘œì‹œì¤„ì˜ ë°°ê²½ìƒ‰ì„ ì„¤ì • 합니다. + + + + +* **StatusBarStyle** (ìƒíƒœ 표시줄 스타ì¼, 기본값: lightcontent). Ios 7, ìƒíƒœ 표시줄 스타ì¼ì„ 설정 합니다. 사용 가능한 옵션 기본, lightcontent, blacktranslucent, blackopaque. + + + + +## 시작 시 숨기기 + +런타임 ë™ì•ˆ ì•„ëž˜ì˜ StatusBar.hide 함수를 사용할 수 있습니다 하지만 ë‹¹ì‹ ì´ ì›í•˜ëŠ” ì‘ìš© 프로그램 시작 시 숨겨진 ìƒíƒœ 표시줄, ì‘ìš© í”„ë¡œê·¸ëž¨ì˜ Info.plist íŒŒì¼ ìˆ˜ì • 해야 합니다. + +추가 íŽ¸ì§‘ì´ ë‘ íŠ¹ì„±ì´ ì—†ëŠ” 경우. **"ìƒíƒœ 표시줄 ì²˜ìŒ ìˆ¨ê²¨ì§„"** **"YES"** 로 설정 하 ê³  **"ë·° 컨트롤러 기반 ìƒíƒœ 표시줄 모양"** **"NO"**로 설정 합니다. Xcode, 열쇠 ì—†ì´ ìˆ˜ë™ìœ¼ë¡œ 편집 하는 경우 ê°’ì€: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## 메서드 + +ì´ í”ŒëŸ¬ê·¸ì¸ ê¸€ë¡œë²Œ `StatusBar` 개체를 ì •ì˜í•©ë‹ˆë‹¤. + +ì „ì—­ ë²”ìœ„ì— ìžˆì§€ë§Œ ê·¸ê²ƒì€ ë¶ˆê°€ëŠ¥ê¹Œì§€ `deviceready` ì´ë²¤íЏ 후. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## ì†ì„± + +* StatusBar.isVisible + +## 사용 권한 + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +IOS 7, ì˜¤ë²„ë ˆì´ ë˜ëŠ” 하지 WebView 중첩 ìƒíƒœ í‘œì‹œì¤„ì„ í™•ì¸ í•©ë‹ˆë‹¤. + + StatusBar.overlaysWebView(true); + + +## 설명 + +7 iOS, iOS 6 처럼 나타나는 ìƒíƒœ í‘œì‹œì¤„ì„ false로 설정 합니다. 다른 함수를 사용 하 ì—¬ì— ë§žê²Œ 스타ì¼ê³¼ ë°°ê²½ 색ìƒì„ 설정 합니다. + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS + +## 빠른 예제 + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +기본 ìƒíƒœ 표시줄 (ì–´ë‘ìš´ í…스트, ë°ì€ ë°°ê²½ì— ëŒ€ 한)를 사용 합니다. + + StatusBar.styleDefault(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleLightContent + +LightContent ìƒíƒœ 표시줄 (ì–´ë‘ìš´ ë°°ê²½ì— ëŒ€ 한 가벼운 í…스트)ì„ ì‚¬ìš© 합니다. + + StatusBar.styleLightContent(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +BlackTranslucent ìƒíƒœ 표시줄 (ì–´ë‘ìš´ ë°°ê²½ì— ëŒ€ 한 가벼운 í…스트)ì„ ì‚¬ìš© 합니다. + + StatusBar.styleBlackTranslucent(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +BlackOpaque ìƒíƒœ 표시줄 (ì–´ë‘ìš´ ë°°ê²½ì— ëŒ€ 한 가벼운 í…스트)ì„ ì‚¬ìš© 합니다. + + StatusBar.styleBlackOpaque(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +Ios 7, StatusBar.statusBarOverlaysWebViewì„ false로 설정 하면 설정할 수 있는 ìƒíƒœ í‘œì‹œì¤„ì˜ ë°°ê²½ìƒ‰ ìƒ‰ìƒ ì´ë¦„으로. + + StatusBar.backgroundColorByName("red"); + + +ì§€ì› ë˜ëŠ” 색 ì´ë¦„입니다. + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +16 진수 문ìžì—´ ìƒíƒœ í‘œì‹œì¤„ì˜ ë°°ê²½ìƒ‰ì„ ì„¤ì •í•©ë‹ˆë‹¤. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +CSS 대표 ì†ì„± ì§€ì› ë©ë‹ˆë‹¤. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Ios 7, StatusBar.statusBarOverlaysWebViewì„ false로 설정 하면 설정할 수 있는 ìƒíƒœ í‘œì‹œì¤„ì˜ ë°°ê²½ìƒ‰ 16 진수 문ìžì—´ (#RRGGBB)ì— ì˜í•´. + +WP7 ë° WP8ì— ë‹¹ì‹ ì€ ë˜í•œ #AARRGGBB, AA는 알파 값으로 ê°’ì„ ì§€ì •í•  수 있습니다. + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.hide + +숨기기 ìƒíƒœ 표시줄. + + StatusBar.hide(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* 안 드 로ì´ë“œ +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.show + +ìƒíƒœ í‘œì‹œì¤„ì„ í‘œì‹œí•©ë‹ˆë‹¤. + + StatusBar.show(); + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* 안 드 로ì´ë“œ +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.isVisible + +ì´ ì†ì„±ì„ ìƒíƒœ 표시줄 표시 ë˜ëŠ” 경우 ì½ê¸°. + + if (StatusBar.isVisible) { + // do something + } + + +## ì§€ì› ë˜ëŠ” í”Œëž«í¼ + +* iOS +* 안 드 로ì´ë“œ +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 diff --git a/plugins/cordova-plugin-statusbar/doc/pl/README.md b/plugins/cordova-plugin-statusbar/doc/pl/README.md new file mode 100644 index 000000000..1b116cca9 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/pl/README.md @@ -0,0 +1,276 @@ + + +# cordova-plugin-statusbar + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar) + +# StatusBar + +> `StatusBar`Obiekt zawiera kilka funkcji, aby dostosować iOS i Android StatusBar. + +## Instalacja + + cordova plugin add cordova-plugin-statusbar + + +## Preferencje + +#### config.xml + + * **StatusBarOverlaysWebView** (boolean, domyÅ›lnie na wartość true). Na iOS 7 zrobić nakÅ‚adki stanu lub nie nakÅ‚adki widoku sieci Web podczas uruchamiania. + + + + + * **StatusBarBackgroundColor** (kolor ciÄ…g szesnastkowy, domyÅ›lnie #000000). Na iOS 7 i Android 5 kolor tÅ‚a stanu przez ciÄ…g szesnastkowy (#RRGGBB) przy starcie systemu. + + + + + * **StatusBarStyle** (stan styl paska, domyÅ›lnie lightcontent.) Na iOS 7 ustawić styl paska stanu. DostÄ™pne opcje domyÅ›lne, lightcontent, blacktranslucent, blackopaque. + + + + +### Dziwactwa Androida + +Android 5 + wytyczne okreÅ›lajÄ… przy użyciu różnych kolorów statusbar niż główne aplikacji kolor (w przeciwieÅ„stwie do stanu jednolitych kolorów wiele aplikacje iOS 7 +), wiÄ™c może chcesz ustawić kolor pasek stanu w czasie wykonywania zamiast za poÅ›rednictwem `StatusBar.backgroundColorByHexString` lub `StatusBar.backgroundColorByName`. Jednym sposobem na to byÅ‚oby: + +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +## Przy starcie + +Podczas uruchamiania można użyć funkcji StatusBar.hide poniżej, ale jeÅ›li chcesz StatusBar ukryty w uruchamiania aplikacji, należy zmodyfikować plik Info.plist Twojej aplikacji. + +Dodawanie/edycja tych dwóch atrybutów jeÅ›li nie obecny. Ustawianie **"pasek stanu jest poczÄ…tkowo ukryte"** na **"Tak"** i **"Oparte na kontroler stanu paska wyglÄ…d"** na **"Nie"**. JeÅ›li możesz go edytować rÄ™cznie bez Xcode, kluczy i wartoÅ›ci sÄ…: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Metody + +Ten plugin definiuje obiekt globalny `StatusBar`. + +Chociaż w globalnym zasiÄ™gu, to nie dostÄ™pne dopiero po `deviceready` imprezie. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + + * StatusBar.overlaysWebView + * StatusBar.styleDefault + * StatusBar.styleLightContent + * StatusBar.styleBlackTranslucent + * StatusBar.styleBlackOpaque + * StatusBar.backgroundColorByName + * StatusBar.backgroundColorByHexString + * StatusBar.hide + * StatusBar.show + +## WÅ‚aÅ›ciwoÅ›ci + + * StatusBar.isVisible + +## Uprawnienia + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +Na iOS 7 zrobić statusbar nakÅ‚adki lub nie nakÅ‚adka widoku sieci Web. + + StatusBar.overlaysWebView(true); + + +## Opis + +Na iOS 7 zestaw do false, aby na pasku stanu pojawia siÄ™ jak iOS 6. Ustaw kolor tÅ‚a i styl do korzystania z innych funkcji. + +## ObsÅ‚ugiwane platformy + + * iOS + +## Szybki przykÅ‚ad + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Użyj domyÅ›lnego stanu (ciemny tekst, teÅ‚ Å›wiatÅ‚a). + + StatusBar.styleDefault(); + + +## ObsÅ‚ugiwane platformy + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleLightContent + +Użyj lightContent stanu (Å›wiatÅ‚o tekst, ciemne tÅ‚o). + + StatusBar.styleLightContent(); + + +## ObsÅ‚ugiwane platformy + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +Użyj blackTranslucent stanu (Å›wiatÅ‚o tekst, ciemne tÅ‚o). + + StatusBar.styleBlackTranslucent(); + + +## ObsÅ‚ugiwane platformy + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +Użyj blackOpaque stanu (Å›wiatÅ‚o tekst, ciemne tÅ‚o). + + StatusBar.styleBlackOpaque(); + + +## ObsÅ‚ugiwane platformy + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +Na iOS 7 gdy zostanie ustawiona wartość false, StatusBar.statusBarOverlaysWebView można ustawić kolor tÅ‚a stanu przez nazwÄ™ koloru. + + StatusBar.backgroundColorByName("red"); + + +Nazwy kolorów obsÅ‚ugiwane sÄ…: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## ObsÅ‚ugiwane platformy + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +Ustawia kolor tÅ‚a stanu przez ciÄ…g szesnastkowy. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +ObsÅ‚ugiwane sÄ… również wÅ‚aÅ›ciwoÅ›ci CSS. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Na iOS 7 gdy zostanie ustawiona wartość false, StatusBar.statusBarOverlaysWebView można ustawić kolor tÅ‚a stanu przez ciÄ…g szesnastkowy (#RRGGBB). + +Na WP7 i WP8 można również okreÅ›lić wartoÅ›ci jako #AARRGGBB, gdzie AA jest wartoÅ›ciÄ… alfa + +## ObsÅ‚ugiwane platformy + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.hide + +Ukryj pasek stanu. + + StatusBar.hide(); + + +## ObsÅ‚ugiwane platformy + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.show + +Pokazuje pasek stanu. + + StatusBar.show(); + + +## ObsÅ‚ugiwane platformy + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.isVisible + +Czytać tej wÅ‚aÅ›ciwość, aby sprawdzić, czy stanu jest widoczne lub nie. + + if (StatusBar.isVisible) { + // do something + } + + +## ObsÅ‚ugiwane platformy + + * iOS + * Android + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/doc/pl/index.md b/plugins/cordova-plugin-statusbar/doc/pl/index.md new file mode 100644 index 000000000..4f13a377d --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/pl/index.md @@ -0,0 +1,262 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> `StatusBar`Obiekt zawiera kilka funkcji, aby dostosować iOS i Android StatusBar. + +## Instalacja + + cordova plugin add cordova-plugin-statusbar + + +## Preferencje + +#### config.xml + +* **StatusBarOverlaysWebView** (boolean, domyÅ›lnie na wartość true). Na iOS 7 zrobić nakÅ‚adki stanu lub nie nakÅ‚adki widoku sieci Web podczas uruchamiania. + + + + +* **StatusBarBackgroundColor** (kolor szesnastkowy ciÄ…g, domyÅ›lnie #000000). Na iOS 7 ustawić kolor tÅ‚a stanu przez ciÄ…g szesnastkowy (#RRGGBB) przy starcie systemu. + + + + +* **StatusBarStyle** (stan styl paska, domyÅ›lnie lightcontent.) Na iOS 7 ustawić styl paska stanu. DostÄ™pne opcje domyÅ›lne, lightcontent, blacktranslucent, blackopaque. + + + + +## Przy starcie + +Podczas uruchamiania można użyć funkcji StatusBar.hide poniżej, ale jeÅ›li chcesz StatusBar ukryty w uruchamiania aplikacji, należy zmodyfikować plik Info.plist Twojej aplikacji. + +Dodawanie/edycja tych dwóch atrybutów jeÅ›li nie obecny. Ustawianie **"pasek stanu jest poczÄ…tkowo ukryte"** na **"Tak"** i **"Oparte na kontroler stanu paska wyglÄ…d"** na **"Nie"**. JeÅ›li możesz go edytować rÄ™cznie bez Xcode, kluczy i wartoÅ›ci sÄ…: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Metody + +Ten plugin definiuje obiekt globalny `StatusBar`. + +Chociaż w globalnym zasiÄ™gu, to nie dostÄ™pne dopiero po `deviceready` imprezie. + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## WÅ‚aÅ›ciwoÅ›ci + +* StatusBar.isVisible + +## Uprawnienia + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +Na iOS 7 zrobić statusbar nakÅ‚adki lub nie nakÅ‚adka widoku sieci Web. + + StatusBar.overlaysWebView(true); + + +## Opis + +Na iOS 7 zestaw do false, aby na pasku stanu pojawia siÄ™ jak iOS 6. Ustaw kolor tÅ‚a i styl do korzystania z innych funkcji. + +## ObsÅ‚ugiwane platformy + +* iOS + +## Szybki przykÅ‚ad + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +Użyj domyÅ›lnego stanu (ciemny tekst, teÅ‚ Å›wiatÅ‚a). + + StatusBar.styleDefault(); + + +## ObsÅ‚ugiwane platformy + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleLightContent + +Użyj lightContent stanu (Å›wiatÅ‚o tekst, ciemne tÅ‚o). + + StatusBar.styleLightContent(); + + +## ObsÅ‚ugiwane platformy + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +Użyj blackTranslucent stanu (Å›wiatÅ‚o tekst, ciemne tÅ‚o). + + StatusBar.styleBlackTranslucent(); + + +## ObsÅ‚ugiwane platformy + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +Użyj blackOpaque stanu (Å›wiatÅ‚o tekst, ciemne tÅ‚o). + + StatusBar.styleBlackOpaque(); + + +## ObsÅ‚ugiwane platformy + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +Na iOS 7 gdy zostanie ustawiona wartość false, StatusBar.statusBarOverlaysWebView można ustawić kolor tÅ‚a stanu przez nazwÄ™ koloru. + + StatusBar.backgroundColorByName("red"); + + +Nazwy kolorów obsÅ‚ugiwane sÄ…: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## ObsÅ‚ugiwane platformy + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +Ustawia kolor tÅ‚a stanu przez ciÄ…g szesnastkowy. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +ObsÅ‚ugiwane sÄ… również wÅ‚aÅ›ciwoÅ›ci CSS. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Na iOS 7 gdy zostanie ustawiona wartość false, StatusBar.statusBarOverlaysWebView można ustawić kolor tÅ‚a stanu przez ciÄ…g szesnastkowy (#RRGGBB). + +Na WP7 i WP8 można również okreÅ›lić wartoÅ›ci jako #AARRGGBB, gdzie AA jest wartoÅ›ciÄ… alfa + +## ObsÅ‚ugiwane platformy + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.hide + +Ukryj pasek stanu. + + StatusBar.hide(); + + +## ObsÅ‚ugiwane platformy + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.show + +Pokazuje pasek stanu. + + StatusBar.show(); + + +## ObsÅ‚ugiwane platformy + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.isVisible + +Czytać tej wÅ‚aÅ›ciwość, aby sprawdzić, czy stanu jest widoczne lub nie. + + if (StatusBar.isVisible) { + // do something + } + + +## ObsÅ‚ugiwane platformy + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 diff --git a/plugins/cordova-plugin-statusbar/doc/ru/index.md b/plugins/cordova-plugin-statusbar/doc/ru/index.md new file mode 100644 index 000000000..fdb95eeae --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/ru/index.md @@ -0,0 +1,238 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> Объект `StatusBar` предоÑтавлÑет некоторые функции Ð´Ð»Ñ Ð½Ð°Ñтройки ÑтатуÑной панели на iOS и Android. + +## ÐаÑтройки + +#### config.xml + +* **StatusBarOverlaysWebView** (логичеÑкое значение, по умолчанию true). Ð’ iOS 7 определÑет необходимо ли Ñделать наложение ÑтатуÑной панели на WebView при запуÑке или нет. + + + + +* **StatusBarBackgroundColor** (шеÑÑ‚Ð½Ð°Ð´Ñ†Ð°Ñ‚ÐµÑ€Ð¸Ñ‡Ð½Ð°Ñ Ñтрока цвета, Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð¾ умолчанию #000000). Ðа iOS 7 уÑтановит цвет фона ÑтатуÑной панели при запуÑке, на оÑновании шеÑтнадцатеричной Ñтроки цвета (#RRGGBB). + + + + +* **StatusBarStyle** (ÑÑ‚Ð°Ñ‚ÑƒÑ Ð±Ð°Ñ€ Ñтиль, по умолчанию lightcontent). Ðа iOS 7 уÑтановите Ñтиль Ñтроки ÑоÑтоÑниÑ. ДоÑтупные параметры по умолчанию, lightcontent, blacktranslucent, blackopaque. + + + + +## Скрытие при запуÑке + +Во Ð²Ñ€ÐµÐ¼Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð¶Ð½Ð¾ иÑпользовать функцию StatusBar.hide ниже, но еÑли вы хотите StatusBar быть Ñкрыты при запуÑке приложениÑ, необходимо изменить файл Info.plist вашего приложениÑ. + +Добавьте/измените Ñти два атрибута, еÑли они не приÑутÑтвуют или отличаютÑÑ Ð¾Ñ‚ нижеуказанных значений. УÑтановите значение **«Status bar is initially hidden»** равное **«YES»** и уÑтановите значение **«View controller-based status bar appearance»** на **«NO»**. ЕÑли вы измените его вручную без Xcode, ключи и Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ ÑвлÑÑŽÑ‚ÑÑ Ñледующими: + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## Методы + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## Параметры + +* StatusBar.isVisible + +## Ð Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +Ðа iOS 7 Сделайте statusbar overlay или не поверх WebView. + + StatusBar.overlaysWebView(true); + + +## ОпиÑание + +Ðа iOS 7 УÑтановите значение false чтобы Ñделать statusbar поÑвлÑÑŽÑ‚ÑÑ ÐºÐ°Ðº iOS 6. Задайте Ñтиль и цвет фона в ÑоответÑтвии Ñ Ð¸Ñпользованием других функций. + +## Поддерживаемые платформы + +* iOS + +## Краткий пример + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +ИÑпользуйте по умолчанию statusbar (темный текÑÑ‚, Ð´Ð»Ñ Ð»ÐµÐ³ÐºÐ¸Ñ… Ñтола). + + StatusBar.styleDefault(); + + +## Поддерживаемые платформы + +* iOS +* Windows Phone 7 +* Windows Phone 8 + +# StatusBar.styleLightContent + +ИÑпользуйте lightContent statusbar (Ñветлый текÑÑ‚, на темном фоне). + + StatusBar.styleLightContent(); + + +## Поддерживаемые платформы + +* iOS +* Windows Phone 7 +* Windows Phone 8 + +# StatusBar.styleBlackTranslucent + +ИÑпользуйте blackTranslucent statusbar (Ñветлый текÑÑ‚, на темном фоне). + + StatusBar.styleBlackTranslucent(); + + +## Поддерживаемые платформы + +* iOS +* Windows Phone 7 +* Windows Phone 8 + +# StatusBar.styleBlackOpaque + +ИÑпользуйте blackOpaque statusbar (Ñветлый текÑÑ‚, на темном фоне). + + StatusBar.styleBlackOpaque(); + + +## Поддерживаемые платформы + +* iOS +* Windows Phone 7 +* Windows Phone 8 + +# StatusBar.backgroundColorByName + +Ðа iOS 7 когда StatusBar.statusBarOverlaysWebView приÑвоено значение false, можно задать цвет фона Ð´Ð»Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð° statusbar по имени цвета. + + StatusBar.backgroundColorByName("red"); + + +Имена поддерживаемых цветов ÑвлÑÑŽÑ‚ÑÑ: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## Поддерживаемые платформы + +* iOS +* Windows Phone 7 +* Windows Phone 8 + +# StatusBar.backgroundColorByHexString + +Задает цвет фона Ð´Ð»Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð° statusbar, шеÑÑ‚Ð½Ð°Ð´Ñ†Ð°Ñ‚ÐµÑ€Ð¸Ñ‡Ð½Ð°Ñ Ñтрока. + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +Также поддерживаютÑÑ ÑвойÑтва CSS Ñтенографию. + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +Ðа iOS 7 когда StatusBar.statusBarOverlaysWebView приÑвоено значение false, можно задать цвет фона Ð´Ð»Ñ Ð¾Ð±ÑŠÐµÐºÑ‚Ð° statusbar, шеÑÑ‚Ð½Ð°Ð´Ñ†Ð°Ñ‚ÐµÑ€Ð¸Ñ‡Ð½Ð°Ñ Ñтрока (#RRGGBB). + +Ðа WP7 и WP8 также можно указать Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ ÐºÐ°Ðº #AARRGGBB, где AA — Ñто альфа-значение + +## Поддерживаемые платформы + +* iOS +* Windows Phone 7 +* Windows Phone 8 + +# StatusBar.hide + +Скройте Ñтроку ÑоÑтоÑÐ½Ð¸Ñ statusbar. + + StatusBar.hide(); + + +## Поддерживаемые платформы + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 + +# StatusBar.show + +Показывает Ñтроку ÑоÑтоÑÐ½Ð¸Ñ statusbar. + + StatusBar.show(); + + +## Поддерживаемые платформы + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 + +# StatusBar.isVisible + +Чтение Ñто ÑвойÑтво, чтобы увидеть, еÑли statusbar ÑвлÑетÑÑ Ð²Ð¸Ð´Ð¸Ð¼Ñ‹Ð¼ или нет. + + if (StatusBar.isVisible) { + // do something + } + + +## Поддерживаемые платформы + +* iOS +* Android +* Windows Phone 7 +* Windows Phone 8 diff --git a/plugins/cordova-plugin-statusbar/doc/zh/README.md b/plugins/cordova-plugin-statusbar/doc/zh/README.md new file mode 100644 index 000000000..8a636995d --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/zh/README.md @@ -0,0 +1,276 @@ + + +# cordova-plugin-statusbar + +[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg)](https://travis-ci.org/apache/cordova-plugin-statusbar) + +# StatusBar + +> `StatusBar`物件æä¾›äº†ä¸€äº›åŠŸèƒ½ï¼Œè‡ªè¨‚çš„ iOS å’Œ Android 狀態列。 + +## å®‰è£ + + cordova plugin add cordova-plugin-statusbar + + +## 首é¸é … + +#### config.xml + + * **StatusBarOverlaysWebView**(布林值,é è¨­å€¼ç‚º true)。在 iOS 7,使狀態列覆蓋或ä¸è¦†è“‹ web 視圖在啟動時。 + + + + + * **StatusBarBackgroundColor**(é¡è‰²å六進ä½å­—串,é è¨­å€¼ç‚º #000000)。IOS 7 å’Œ Android 5,由å六進ä½å­—串 (#RRGGBB) 在啟動時設置狀態列的背景色。 + + + + + * **狀態列**(狀態列樣å¼ï¼Œé è¨­å€¼ç‚º lightcontent)。在 iOS 7,設置的狀態橫æ¢åœ–樣å¼ã€‚å¯ç”¨çš„é¸é …é è¨­ï¼Œlightcontent,blacktranslucent,blackopaque。 + + + + +### Android 的怪癖 + +Android çš„ 5 + 準則指定使用ä¸åŒçš„é¡è‰²æ¯”您主è¦çš„æ‡‰ç”¨ç¨‹å¼ç‹€æ…‹æ¬„é¡è‰² (ä¸åƒå¾ˆå¤š iOS 7 + 應用程å¼çš„統一狀態列é¡è‰²),所以你å¯èƒ½æƒ³è¦è¨­ç½®åœ¨é‹è¡Œæ™‚顯示狀態列é¡è‰²è€Œä¸æ˜¯é€šéŽ`StatusBar.backgroundColorByHexString`或`StatusBar.backgroundColorByName`。 一個的方å¼åšåˆ°é€™ä¸€é»žå°‡æ˜¯: + +```js +if (cordova.platformId == 'android') { + StatusBar.backgroundColorByHexString("#333"); +} +``` + +## åœ¨å•Ÿå‹•æ™‚éš±è— + +在é‹è¡Œæ™‚期間,你å¯ä»¥ä½¿ç”¨ StatusBar.hide 函數下é¢ï¼Œä½†å¦‚果你想è¦é¡¯ç¤ºç‹€æ…‹åˆ—éš±è—在應用程å¼å•Ÿå‹•時,你必須修改你的應用程å¼çš„ Info.plist 檔。 + +添加編輯這兩個屬性,如果ä¸å­˜åœ¨ã€‚ å°‡**"狀態列最åˆéš±è—"**設置為**"YES"**å’Œ**"視圖基於控制器的狀態列外觀"**設置為**"å¦"**。 如果您手動編輯它沒有 Xcode,éµå’Œå€¼æ˜¯ï¼š + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## 方法 + +這個外掛程å¼å®šç¾©å…¨åŸŸ `StatusBar` 物件。 + +雖然在全çƒç¯„åœå…§ï¼Œå®ƒä¸å¯ç”¨ç›´åˆ° `deviceready` 事件之後。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + + * StatusBar.overlaysWebView + * StatusBar.styleDefault + * StatusBar.styleLightContent + * StatusBar.styleBlackTranslucent + * StatusBar.styleBlackOpaque + * StatusBar.backgroundColorByName + * StatusBar.backgroundColorByHexString + * StatusBar.hide + * StatusBar.show + +## 屬性 + + * StatusBar.isVisible + +## è¨±å¯æ¬Š + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +在 iOS 7,使狀態列覆蓋或ä¸è¦†è“‹ web 視圖。 + + StatusBar.overlaysWebView(true); + + +## 說明 + +在 iOS 7,設置為 false,使狀態列出ç¾åƒ iOS 6。設置樣å¼å’ŒèƒŒæ™¯é¡è‰²ï¼Œé©åˆä½¿ç”¨å…¶ä»–函數。 + +## 支æ´çš„平臺 + + * iOS + +## 快速的示例 + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +使用é è¨­ç‹€æ…‹åˆ— (淺色背景深色文本)。 + + StatusBar.styleDefault(); + + +## 支æ´çš„平臺 + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleLightContent + +使用 lightContent 狀態列 (深色背景光文本)。 + + StatusBar.styleLightContent(); + + +## 支æ´çš„平臺 + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +使用 blackTranslucent 狀態列 (深色背景光文本)。 + + StatusBar.styleBlackTranslucent(); + + +## 支æ´çš„平臺 + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +使用 blackOpaque 狀態列 (深色背景光文本)。 + + StatusBar.styleBlackOpaque(); + + +## 支æ´çš„平臺 + + * iOS + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +在 iOS 7,當您將 StatusBar.statusBarOverlaysWebView 設置為 false,你å¯ä»¥è¨­ç½®ç‹€æ…‹åˆ—的背景色的é¡è‰²å稱。 + + StatusBar.backgroundColorByName("red"); + + +支æ´çš„é¡è‰²å稱是: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## 支æ´çš„平臺 + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +ç”±å六進ä½å­—串設置狀態列的背景色。 + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +æ­¤å¤–æ”¯æ´ CSS 速記屬性。 + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +在 iOS 7,當將 StatusBar.statusBarOverlaysWebView 設置為 false,您å¯ä»¥è¨­ç½®ç‹€æ…‹åˆ—的背景色由å六進ä½å­—串 (#RRGGBB)。 + +WP7 å’Œ WP8 您還å¯ä»¥æŒ‡å®šå€¼ç‚º #AARRGGBB,其中 AA 是 Alpha 值 + +## 支æ´çš„平臺 + + * iOS + * Android 5+ + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.hide + +éš±è—狀態列。 + + StatusBar.hide(); + + +## 支æ´çš„平臺 + + * iOS + * Android 系統 + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.show + +顯示狀態列。 + + StatusBar.show(); + + +## 支æ´çš„平臺 + + * iOS + * Android 系統 + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 + +# StatusBar.isVisible + +è®€å–æ­¤å±¬æ€§ï¼Œä»¥æŸ¥çœ‹ç‹€æ…‹åˆ—是å¦å¯è¦‹ã€‚ + + if (StatusBar.isVisible) { + // do something + } + + +## 支æ´çš„平臺 + + * iOS + * Android 系統 + * Windows Phone 7 + * Windows Phone 8 + * Windows Phone 8.1 \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/doc/zh/index.md b/plugins/cordova-plugin-statusbar/doc/zh/index.md new file mode 100644 index 000000000..a8805da5d --- /dev/null +++ b/plugins/cordova-plugin-statusbar/doc/zh/index.md @@ -0,0 +1,262 @@ + + +# cordova-plugin-statusbar + +# StatusBar + +> `StatusBar`物件æä¾›äº†ä¸€äº›åŠŸèƒ½ï¼Œè‡ªè¨‚çš„ iOS å’Œ Android 狀態列。 + +## å®‰è£ + + cordova plugin add cordova-plugin-statusbar + + +## 首é¸é … + +#### config.xml + +* **StatusBarOverlaysWebView**(布林值,é è¨­å€¼ç‚º true)。在 iOS 7,使狀態列覆蓋或ä¸è¦†è“‹ web 視圖在啟動時。 + + + + +* **StatusBarBackgroundColor**(é¡è‰²å六進ä½å­—串,é è¨­å€¼ç‚º #000000)。在 iOS 7,通éŽä¸€å€‹å六進ä½å­—串 (#RRGGBB) 在啟動時設置狀態列的背景色。 + + + + +* **狀態列**(狀態列樣å¼ï¼Œé è¨­å€¼ç‚º lightcontent)。在 iOS 7,設置的狀態橫æ¢åœ–樣å¼ã€‚å¯ç”¨çš„é¸é …é è¨­ï¼Œlightcontent,blacktranslucent,blackopaque。 + + + + +## åœ¨å•Ÿå‹•æ™‚éš±è— + +在é‹è¡Œæ™‚期間,你å¯ä»¥ä½¿ç”¨ StatusBar.hide 函數下é¢ï¼Œä½†å¦‚果你想è¦é¡¯ç¤ºç‹€æ…‹åˆ—éš±è—在應用程å¼å•Ÿå‹•時,你必須修改你的應用程å¼çš„ Info.plist 檔。 + +添加編輯這兩個屬性,如果ä¸å­˜åœ¨ã€‚ å°‡**"狀態列最åˆéš±è—"**設置為**"YES"**å’Œ**"視圖基於控制器的狀態列外觀"**設置為**"å¦"**。 如果您手動編輯它沒有 Xcode,éµå’Œå€¼æ˜¯ï¼š + + UIStatusBarHidden + + UIViewControllerBasedStatusBarAppearance + + + +## 方法 + +這個外掛程å¼å®šç¾©å…¨åŸŸ `StatusBar` 物件。 + +雖然在全çƒç¯„åœå…§ï¼Œå®ƒä¸å¯ç”¨ç›´åˆ° `deviceready` 事件之後。 + + document.addEventListener("deviceready", onDeviceReady, false); + function onDeviceReady() { + console.log(StatusBar); + } + + +* StatusBar.overlaysWebView +* StatusBar.styleDefault +* StatusBar.styleLightContent +* StatusBar.styleBlackTranslucent +* StatusBar.styleBlackOpaque +* StatusBar.backgroundColorByName +* StatusBar.backgroundColorByHexString +* StatusBar.hide +* StatusBar.show + +## 屬性 + +* StatusBar.isVisible + +## è¨±å¯æ¬Š + +#### config.xml + + + + + + +# StatusBar.overlaysWebView + +在 iOS 7,使狀態列覆蓋或ä¸è¦†è“‹ web 視圖。 + + StatusBar.overlaysWebView(true); + + +## 說明 + +在 iOS 7,設置為 false,使狀態列出ç¾åƒ iOS 6。設置樣å¼å’ŒèƒŒæ™¯é¡è‰²ï¼Œé©åˆä½¿ç”¨å…¶ä»–函數。 + +## 支æ´çš„平臺 + +* iOS + +## 快速的示例 + + StatusBar.overlaysWebView(true); + StatusBar.overlaysWebView(false); + + +# StatusBar.styleDefault + +使用é è¨­ç‹€æ…‹åˆ— (淺色背景深色文本)。 + + StatusBar.styleDefault(); + + +## 支æ´çš„平臺 + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleLightContent + +使用 lightContent 狀態列 (深色背景光文本)。 + + StatusBar.styleLightContent(); + + +## 支æ´çš„平臺 + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackTranslucent + +使用 blackTranslucent 狀態列 (深色背景光文本)。 + + StatusBar.styleBlackTranslucent(); + + +## 支æ´çš„平臺 + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.styleBlackOpaque + +使用 blackOpaque 狀態列 (深色背景光文本)。 + + StatusBar.styleBlackOpaque(); + + +## 支æ´çš„平臺 + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByName + +在 iOS 7,當您將 StatusBar.statusBarOverlaysWebView 設置為 false,你å¯ä»¥è¨­ç½®ç‹€æ…‹åˆ—的背景色的é¡è‰²å稱。 + + StatusBar.backgroundColorByName("red"); + + +支æ´çš„é¡è‰²å稱是: + + black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + + +## 支æ´çš„平臺 + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.backgroundColorByHexString + +ç”±å六進ä½å­—串設置狀態列的背景色。 + + StatusBar.backgroundColorByHexString("#C0C0C0"); + + +æ­¤å¤–æ”¯æ´ CSS 速記屬性。 + + StatusBar.backgroundColorByHexString("#333"); // => #333333 + StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB + + +在 iOS 7,當將 StatusBar.statusBarOverlaysWebView 設置為 false,您å¯ä»¥è¨­ç½®ç‹€æ…‹åˆ—的背景色由å六進ä½å­—串 (#RRGGBB)。 + +WP7 å’Œ WP8 您還å¯ä»¥æŒ‡å®šå€¼ç‚º #AARRGGBB,其中 AA 是 Alpha 值 + +## 支æ´çš„平臺 + +* iOS +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.hide + +éš±è—狀態列。 + + StatusBar.hide(); + + +## 支æ´çš„平臺 + +* iOS +* 安å“系統 +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.show + +顯示狀態列。 + + StatusBar.show(); + + +## 支æ´çš„平臺 + +* iOS +* 安å“系統 +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 + +# StatusBar.isVisible + +è®€å–æ­¤å±¬æ€§ï¼Œä»¥æŸ¥çœ‹ç‹€æ…‹åˆ—是å¦å¯è¦‹ã€‚ + + if (StatusBar.isVisible) { + // do something + } + + +## 支æ´çš„平臺 + +* iOS +* 安å“系統 +* Windows Phone 7 +* Windows Phone 8 +* Windows Phone 8.1 diff --git a/plugins/cordova-plugin-statusbar/package.json b/plugins/cordova-plugin-statusbar/package.json new file mode 100644 index 000000000..c79e66c29 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/package.json @@ -0,0 +1,83 @@ +{ + "_args": [ + [ + "cordova-plugin-statusbar@2.4.2", + "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular" + ] + ], + "_from": "cordova-plugin-statusbar@2.4.2", + "_id": "cordova-plugin-statusbar@2.4.2", + "_inBundle": false, + "_integrity": "sha1-/B+9wNjXAzp+jh8ff/FnrJvU+vY=", + "_location": "/cordova-plugin-statusbar", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "cordova-plugin-statusbar@2.4.2", + "name": "cordova-plugin-statusbar", + "escapedName": "cordova-plugin-statusbar", + "rawSpec": "2.4.2", + "saveSpec": null, + "fetchSpec": "2.4.2" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/cordova-plugin-statusbar/-/cordova-plugin-statusbar-2.4.2.tgz", + "_spec": "2.4.2", + "_where": "/Users/mash2/Dropbox (PAC LAB)/codes/ionic_projects/SARAV3/SARA_modular", + "author": { + "name": "Apache Software Foundation" + }, + "bugs": { + "url": "https://issues.apache.org/jira/browse/CB" + }, + "cordova": { + "id": "cordova-plugin-statusbar", + "platforms": [ + "android", + "ios", + "wp7", + "wp8", + "windows" + ] + }, + "description": "Cordova StatusBar Plugin", + "devDependencies": { + "jshint": "^2.6.0" + }, + "engines": { + "cordovaDependencies": { + "0.1.0": { + "cordova": ">=3.0.0" + }, + "3.0.0": { + "cordova": ">100" + } + } + }, + "homepage": "https://github.com/apache/cordova-plugin-statusbar#readme", + "keywords": [ + "cordova", + "statusbar", + "ecosystem:cordova", + "cordova-android", + "cordova-ios", + "cordova-wp7", + "cordova-wp8", + "cordova-windows" + ], + "license": "Apache-2.0", + "name": "cordova-plugin-statusbar", + "repository": { + "type": "git", + "url": "git+https://github.com/apache/cordova-plugin-statusbar.git" + }, + "scripts": { + "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests", + "test": "npm run jshint" + }, + "types": "./types/index.d.ts", + "version": "2.4.2" +} diff --git a/plugins/cordova-plugin-statusbar/plugin.xml b/plugins/cordova-plugin-statusbar/plugin.xml new file mode 100644 index 000000000..04d6c18cb --- /dev/null +++ b/plugins/cordova-plugin-statusbar/plugin.xml @@ -0,0 +1,99 @@ + + + + + StatusBar + Cordova StatusBar Plugin + Apache 2.0 + cordova,statusbar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-statusbar/src/android/StatusBar.java b/plugins/cordova-plugin-statusbar/src/android/StatusBar.java new file mode 100644 index 000000000..714c30e87 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/src/android/StatusBar.java @@ -0,0 +1,276 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ +package org.apache.cordova.statusbar; + +import android.app.Activity; +import android.graphics.Color; +import android.os.Build; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaArgs; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; +import org.apache.cordova.PluginResult; +import org.json.JSONException; +import java.util.Arrays; + +public class StatusBar extends CordovaPlugin { + private static final String TAG = "StatusBar"; + + /** + * Sets the context of the Command. This can then be used to do things like + * get file paths associated with the Activity. + * + * @param cordova The context of the main Activity. + * @param webView The CordovaWebView Cordova is running in. + */ + @Override + public void initialize(final CordovaInterface cordova, CordovaWebView webView) { + LOG.v(TAG, "StatusBar: initialization"); + super.initialize(cordova, webView); + + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + // Clear flag FLAG_FORCE_NOT_FULLSCREEN which is set initially + // by the Cordova. + Window window = cordova.getActivity().getWindow(); + window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); + + // Read 'StatusBarBackgroundColor' from config.xml, default is #000000. + setStatusBarBackgroundColor(preferences.getString("StatusBarBackgroundColor", "#000000")); + + // Read 'StatusBarStyle' from config.xml, default is 'lightcontent'. + setStatusBarStyle(preferences.getString("StatusBarStyle", "lightcontent")); + } + }); + } + + /** + * Executes the request and returns PluginResult. + * + * @param action The action to execute. + * @param args JSONArry of arguments for the plugin. + * @param callbackContext The callback id used when calling back into JavaScript. + * @return True if the action was valid, false otherwise. + */ + @Override + public boolean execute(final String action, final CordovaArgs args, final CallbackContext callbackContext) throws JSONException { + LOG.v(TAG, "Executing action: " + action); + final Activity activity = this.cordova.getActivity(); + final Window window = activity.getWindow(); + + if ("_ready".equals(action)) { + boolean statusBarVisible = (window.getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == 0; + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, statusBarVisible)); + return true; + } + + if ("show".equals(action)) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + // SYSTEM_UI_FLAG_FULLSCREEN is available since JellyBean, but we + // use KitKat here to be aligned with "Fullscreen" preference + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + int uiOptions = window.getDecorView().getSystemUiVisibility(); + uiOptions &= ~View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; + uiOptions &= ~View.SYSTEM_UI_FLAG_FULLSCREEN; + + window.getDecorView().setSystemUiVisibility(uiOptions); + } + + // CB-11197 We still need to update LayoutParams to force status bar + // to be hidden when entering e.g. text fields + window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); + } + }); + return true; + } + + if ("hide".equals(action)) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + // SYSTEM_UI_FLAG_FULLSCREEN is available since JellyBean, but we + // use KitKat here to be aligned with "Fullscreen" preference + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + int uiOptions = window.getDecorView().getSystemUiVisibility() + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + | View.SYSTEM_UI_FLAG_FULLSCREEN; + + window.getDecorView().setSystemUiVisibility(uiOptions); + } + + // CB-11197 We still need to update LayoutParams to force status bar + // to be hidden when entering e.g. text fields + window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); + } + }); + return true; + } + + if ("backgroundColorByHexString".equals(action)) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + try { + setStatusBarBackgroundColor(args.getString(0)); + } catch (JSONException ignore) { + LOG.e(TAG, "Invalid hexString argument, use f.i. '#777777'"); + } + } + }); + return true; + } + + if ("overlaysWebView".equals(action)) { + if (Build.VERSION.SDK_INT >= 21) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + try { + setStatusBarTransparent(args.getBoolean(0)); + } catch (JSONException ignore) { + LOG.e(TAG, "Invalid boolean argument"); + } + } + }); + return true; + } + else return args.getBoolean(0) == false; + } + + if ("styleDefault".equals(action)) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + setStatusBarStyle("default"); + } + }); + return true; + } + + if ("styleLightContent".equals(action)) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + setStatusBarStyle("lightcontent"); + } + }); + return true; + } + + if ("styleBlackTranslucent".equals(action)) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + setStatusBarStyle("blacktranslucent"); + } + }); + return true; + } + + if ("styleBlackOpaque".equals(action)) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + setStatusBarStyle("blackopaque"); + } + }); + return true; + } + + return false; + } + + private void setStatusBarBackgroundColor(final String colorPref) { + if (Build.VERSION.SDK_INT >= 21) { + if (colorPref != null && !colorPref.isEmpty()) { + final Window window = cordova.getActivity().getWindow(); + // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK + window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); + window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + try { + // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21 + window.getClass().getMethod("setStatusBarColor", int.class).invoke(window, Color.parseColor(colorPref)); + } catch (IllegalArgumentException ignore) { + LOG.e(TAG, "Invalid hexString argument, use f.i. '#999999'"); + } catch (Exception ignore) { + // this should not happen, only in case Android removes this method in a version > 21 + LOG.w(TAG, "Method window.setStatusBarColor not found for SDK level " + Build.VERSION.SDK_INT); + } + } + } + } + + private void setStatusBarTransparent(final boolean transparent) { + if (Build.VERSION.SDK_INT >= 21) { + final Window window = cordova.getActivity().getWindow(); + if (transparent) { + window.getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); + window.setStatusBarColor(Color.TRANSPARENT); + } + else { + window.getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_VISIBLE); + } + } + } + + private void setStatusBarStyle(final String style) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (style != null && !style.isEmpty()) { + View decorView = cordova.getActivity().getWindow().getDecorView(); + int uiOptions = decorView.getSystemUiVisibility(); + + String[] darkContentStyles = { + "default", + }; + + String[] lightContentStyles = { + "lightcontent", + "blacktranslucent", + "blackopaque", + }; + + if (Arrays.asList(darkContentStyles).contains(style.toLowerCase())) { + decorView.setSystemUiVisibility(uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + return; + } + + if (Arrays.asList(lightContentStyles).contains(style.toLowerCase())) { + decorView.setSystemUiVisibility(uiOptions & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + return; + } + + LOG.e(TAG, "Invalid style, must be either 'default', 'lightcontent' or the deprecated 'blacktranslucent' and 'blackopaque'"); + } + } + } +} diff --git a/plugins/cordova-plugin-statusbar/src/browser/StatusBarProxy.js b/plugins/cordova-plugin-statusbar/src/browser/StatusBarProxy.js new file mode 100644 index 000000000..3290d58cb --- /dev/null +++ b/plugins/cordova-plugin-statusbar/src/browser/StatusBarProxy.js @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +function notSupported(win,fail) { + // + console.log('StatusBar is not supported'); + setTimeout(function(){ + if (win) { + win(); + } + // note that while it is not explicitly supported, it does not fail + // this is really just here to allow developers to test their code in the browser + // and if we fail, then their app might as well. -jm + },0); +} + +module.exports = { + isVisible: false, + styleBlackTranslucent:notSupported, + styleDefault:notSupported, + styleLightContent:notSupported, + styleBlackOpaque:notSupported, + overlaysWebView:notSupported, + styleLightContect: notSupported, + backgroundColorByName: notSupported, + backgroundColorByHexString: notSupported, + hide: notSupported, + show: notSupported, + _ready:notSupported +}; + +require("cordova/exec/proxy").add("StatusBar", module.exports); + diff --git a/plugins/cordova-plugin-statusbar/src/ios/CDVStatusBar.h b/plugins/cordova-plugin-statusbar/src/ios/CDVStatusBar.h new file mode 100644 index 000000000..0be08cc34 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/src/ios/CDVStatusBar.h @@ -0,0 +1,50 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface CDVStatusBar : CDVPlugin { + @protected + BOOL _statusBarOverlaysWebView; + UIView* _statusBarBackgroundView; + BOOL _uiviewControllerBasedStatusBarAppearance; + UIColor* _statusBarBackgroundColor; + NSString* _eventsCallbackId; +} + +@property (atomic, assign) BOOL statusBarOverlaysWebView; +@property (atomic, assign) BOOL statusBarVisible; + +- (void) overlaysWebView:(CDVInvokedUrlCommand*)command; + +- (void) styleDefault:(CDVInvokedUrlCommand*)command; +- (void) styleLightContent:(CDVInvokedUrlCommand*)command; +- (void) styleBlackTranslucent:(CDVInvokedUrlCommand*)command; +- (void) styleBlackOpaque:(CDVInvokedUrlCommand*)command; + +- (void) backgroundColorByName:(CDVInvokedUrlCommand*)command; +- (void) backgroundColorByHexString:(CDVInvokedUrlCommand*)command; + +- (void) hide:(CDVInvokedUrlCommand*)command; +- (void) show:(CDVInvokedUrlCommand*)command; + +- (void) _ready:(CDVInvokedUrlCommand*)command; + +@end diff --git a/plugins/cordova-plugin-statusbar/src/ios/CDVStatusBar.m b/plugins/cordova-plugin-statusbar/src/ios/CDVStatusBar.m new file mode 100644 index 000000000..c67f137c1 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/src/ios/CDVStatusBar.m @@ -0,0 +1,479 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +/* + NOTE: plugman/cordova cli should have already installed this, + but you need the value UIViewControllerBasedStatusBarAppearance + in your Info.plist as well to set the styles in iOS 7 + */ + +#import "CDVStatusBar.h" +#import +#import + +static const void *kHideStatusBar = &kHideStatusBar; +static const void *kStatusBarStyle = &kStatusBarStyle; + +@interface CDVViewController (StatusBar) + +@property (nonatomic, retain) id sb_hideStatusBar; +@property (nonatomic, retain) id sb_statusBarStyle; + +@end + +@implementation CDVViewController (StatusBar) + +@dynamic sb_hideStatusBar; +@dynamic sb_statusBarStyle; + +- (id)sb_hideStatusBar { + return objc_getAssociatedObject(self, kHideStatusBar); +} + +- (void)setSb_hideStatusBar:(id)newHideStatusBar { + objc_setAssociatedObject(self, kHideStatusBar, newHideStatusBar, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (id)sb_statusBarStyle { + return objc_getAssociatedObject(self, kStatusBarStyle); +} + +- (void)setSb_statusBarStyle:(id)newStatusBarStyle { + objc_setAssociatedObject(self, kStatusBarStyle, newStatusBarStyle, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (BOOL) prefersStatusBarHidden { + return [self.sb_hideStatusBar boolValue]; +} + +- (UIStatusBarStyle)preferredStatusBarStyle +{ + return (UIStatusBarStyle)[self.sb_statusBarStyle intValue]; +} + +@end + + +@interface CDVStatusBar () +- (void)fireTappedEvent; +- (void)updateIsVisible:(BOOL)visible; +@end + +@implementation CDVStatusBar + +- (id)settingForKey:(NSString*)key +{ + return [self.commandDelegate.settings objectForKey:[key lowercaseString]]; +} + +- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context +{ + if ([keyPath isEqual:@"statusBarHidden"]) { + NSNumber* newValue = [change objectForKey:NSKeyValueChangeNewKey]; + [self updateIsVisible:![newValue boolValue]]; + } +} + +-(void)cordovaViewWillAppear:(NSNotification*)notification +{ + [self resizeWebView]; +} + +-(void)statusBarDidChangeFrame:(NSNotification*)notification +{ + //add a small delay ( 0.1 seconds ) or statusbar size will be wrong + __weak CDVStatusBar* weakSelf = self; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + [weakSelf resizeStatusBarBackgroundView]; + [weakSelf resizeWebView]; + }); +} + +- (void)pluginInitialize +{ + // init + NSNumber* uiviewControllerBasedStatusBarAppearance = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"]; + _uiviewControllerBasedStatusBarAppearance = (uiviewControllerBasedStatusBarAppearance == nil || [uiviewControllerBasedStatusBarAppearance boolValue]); + + // observe the statusBarHidden property + [[UIApplication sharedApplication] addObserver:self forKeyPath:@"statusBarHidden" options:NSKeyValueObservingOptionNew context:NULL]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarDidChangeFrame:) name: UIApplicationDidChangeStatusBarFrameNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cordovaViewWillAppear:) name: @"CDVViewWillAppearNotification" object:nil]; + + _statusBarOverlaysWebView = YES; // default + + [self initializeStatusBarBackgroundView]; + + self.viewController.view.autoresizesSubviews = YES; + + NSString* setting; + + setting = @"StatusBarBackgroundColor"; + if ([self settingForKey:setting]) { + [self _backgroundColorByHexString:[self settingForKey:setting]]; + } + + setting = @"StatusBarStyle"; + if ([self settingForKey:setting]) { + [self setStatusBarStyle:[self settingForKey:setting]]; + } + + setting = @"StatusBarDefaultScrollToTop"; + if ([self settingForKey:setting]) { + self.webView.scrollView.scrollsToTop = [(NSNumber*)[self settingForKey:setting] boolValue]; + } else { + self.webView.scrollView.scrollsToTop = NO; + } + + // blank scroll view to intercept status bar taps + UIScrollView *fakeScrollView = [[UIScrollView alloc] initWithFrame:UIScreen.mainScreen.bounds]; + fakeScrollView.delegate = self; + fakeScrollView.scrollsToTop = YES; + [self.viewController.view addSubview:fakeScrollView]; // Add scrollview to the view heirarchy so that it will begin accepting status bar taps + [self.viewController.view sendSubviewToBack:fakeScrollView]; // Send it to the very back of the view heirarchy + fakeScrollView.contentSize = CGSizeMake(UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height * 2.0f); // Make the scroll view longer than the screen itself + fakeScrollView.contentOffset = CGPointMake(0.0f, UIScreen.mainScreen.bounds.size.height); // Scroll down so a tap will take scroll view back to the top + + _statusBarVisible = ![UIApplication sharedApplication].isStatusBarHidden; +} + +- (void)onReset { + _eventsCallbackId = nil; +} + +- (void)fireTappedEvent { + if (_eventsCallbackId == nil) { + return; + } + NSDictionary* payload = @{@"type": @"tap"}; + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:payload]; + [result setKeepCallbackAsBool:YES]; + [self.commandDelegate sendPluginResult:result callbackId:_eventsCallbackId]; +} + +- (void)updateIsVisible:(BOOL)visible { + if (_eventsCallbackId == nil) { + return; + } + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:visible]; + [result setKeepCallbackAsBool:YES]; + [self.commandDelegate sendPluginResult:result callbackId:_eventsCallbackId]; +} + +- (void) _ready:(CDVInvokedUrlCommand*)command +{ + _eventsCallbackId = command.callbackId; + [self updateIsVisible:![UIApplication sharedApplication].statusBarHidden]; + NSString* setting = @"StatusBarOverlaysWebView"; + if ([self settingForKey:setting]) { + self.statusBarOverlaysWebView = [(NSNumber*)[self settingForKey:setting] boolValue]; + if (self.statusBarOverlaysWebView) { + [self resizeWebView]; + } + } +} + +- (void) initializeStatusBarBackgroundView +{ + CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; + + if ([[UIApplication sharedApplication]statusBarOrientation] == UIInterfaceOrientationPortraitUpsideDown && + statusBarFrame.size.height + statusBarFrame.origin.y == [self.viewController.view.window bounds].size.height) { + + // When started in upside-down orientation on iOS 7, status bar will be bound to lower edge of the + // screen (statusBarFrame.origin.y will be somewhere around screen height). In this case we need to + // correct frame's coordinates + statusBarFrame.origin.y = 0; + } + + _statusBarBackgroundView = [[UIView alloc] initWithFrame:statusBarFrame]; + _statusBarBackgroundView.backgroundColor = _statusBarBackgroundColor; + _statusBarBackgroundView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin); + _statusBarBackgroundView.autoresizesSubviews = YES; +} + +- (void) setStatusBarOverlaysWebView:(BOOL)statusBarOverlaysWebView +{ + // we only care about the latest iOS version or a change in setting + if (statusBarOverlaysWebView == _statusBarOverlaysWebView) { + return; + } + + _statusBarOverlaysWebView = statusBarOverlaysWebView; + + [self resizeWebView]; + + if (statusBarOverlaysWebView) { + + [_statusBarBackgroundView removeFromSuperview]; + + } else { + + [self initializeStatusBarBackgroundView]; + [self.webView.superview addSubview:_statusBarBackgroundView]; + + } + +} + +- (BOOL) statusBarOverlaysWebView +{ + return _statusBarOverlaysWebView; +} + +- (void) overlaysWebView:(CDVInvokedUrlCommand*)command +{ + id value = [command argumentAtIndex:0]; + if (!([value isKindOfClass:[NSNumber class]])) { + value = [NSNumber numberWithBool:YES]; + } + + self.statusBarOverlaysWebView = [value boolValue]; +} + +- (void) refreshStatusBarAppearance +{ + SEL sel = NSSelectorFromString(@"setNeedsStatusBarAppearanceUpdate"); + if ([self.viewController respondsToSelector:sel]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + [self.viewController performSelector:sel withObject:nil]; +#pragma clang diagnostic pop + } +} + +- (void) setStyleForStatusBar:(UIStatusBarStyle)style +{ + if (_uiviewControllerBasedStatusBarAppearance) { + CDVViewController* vc = (CDVViewController*)self.viewController; + vc.sb_statusBarStyle = [NSNumber numberWithInt:style]; + [self refreshStatusBarAppearance]; + + } else { + [[UIApplication sharedApplication] setStatusBarStyle:style]; + } +} + +- (void) setStatusBarStyle:(NSString*)statusBarStyle +{ + // default, lightContent, blackTranslucent, blackOpaque + NSString* lcStatusBarStyle = [statusBarStyle lowercaseString]; + + if ([lcStatusBarStyle isEqualToString:@"default"]) { + [self styleDefault:nil]; + } else if ([lcStatusBarStyle isEqualToString:@"lightcontent"]) { + [self styleLightContent:nil]; + } else if ([lcStatusBarStyle isEqualToString:@"blacktranslucent"]) { + [self styleBlackTranslucent:nil]; + } else if ([lcStatusBarStyle isEqualToString:@"blackopaque"]) { + [self styleBlackOpaque:nil]; + } +} + +- (void) styleDefault:(CDVInvokedUrlCommand*)command +{ + [self setStyleForStatusBar:UIStatusBarStyleDefault]; +} + +- (void) styleLightContent:(CDVInvokedUrlCommand*)command +{ + [self setStyleForStatusBar:UIStatusBarStyleLightContent]; +} + +- (void) styleBlackTranslucent:(CDVInvokedUrlCommand*)command +{ + [self setStyleForStatusBar:UIStatusBarStyleLightContent]; +} + +- (void) styleBlackOpaque:(CDVInvokedUrlCommand*)command +{ + [self setStyleForStatusBar:UIStatusBarStyleLightContent]; +} + +- (void) backgroundColorByName:(CDVInvokedUrlCommand*)command +{ + id value = [command argumentAtIndex:0]; + if (!([value isKindOfClass:[NSString class]])) { + value = @"black"; + } + + SEL selector = NSSelectorFromString([value stringByAppendingString:@"Color"]); + if ([UIColor respondsToSelector:selector]) { + _statusBarBackgroundView.backgroundColor = [UIColor performSelector:selector]; + } +} + +- (void) _backgroundColorByHexString:(NSString*)hexString +{ + unsigned int rgbValue = 0; + NSScanner* scanner = [NSScanner scannerWithString:hexString]; + [scanner setScanLocation:1]; + [scanner scanHexInt:&rgbValue]; + + _statusBarBackgroundColor = [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1.0]; + _statusBarBackgroundView.backgroundColor = _statusBarBackgroundColor; +} + +- (void) backgroundColorByHexString:(CDVInvokedUrlCommand*)command +{ + NSString* value = [command argumentAtIndex:0]; + if (!([value isKindOfClass:[NSString class]])) { + value = @"#000000"; + } + + if (![value hasPrefix:@"#"] || [value length] < 7) { + return; + } + + [self _backgroundColorByHexString:value]; +} + +- (void) hideStatusBar +{ + if (_uiviewControllerBasedStatusBarAppearance) { + CDVViewController* vc = (CDVViewController*)self.viewController; + vc.sb_hideStatusBar = [NSNumber numberWithBool:YES]; + [self refreshStatusBarAppearance]; + + } else { + UIApplication* app = [UIApplication sharedApplication]; + [app setStatusBarHidden:YES]; + } +} + +- (void) hide:(CDVInvokedUrlCommand*)command +{ + _statusBarVisible = NO; + UIApplication* app = [UIApplication sharedApplication]; + + if (!app.isStatusBarHidden) + { + + [self hideStatusBar]; + + [_statusBarBackgroundView removeFromSuperview]; + + [self resizeWebView]; + + _statusBarBackgroundView.hidden = YES; + } +} + +- (void) showStatusBar +{ + if (_uiviewControllerBasedStatusBarAppearance) { + CDVViewController* vc = (CDVViewController*)self.viewController; + vc.sb_hideStatusBar = [NSNumber numberWithBool:NO]; + [self refreshStatusBarAppearance]; + + } else { + UIApplication* app = [UIApplication sharedApplication]; + [app setStatusBarHidden:NO]; + } +} + +- (void) show:(CDVInvokedUrlCommand*)command +{ + _statusBarVisible = YES; + UIApplication* app = [UIApplication sharedApplication]; + + if (app.isStatusBarHidden) + { + [self showStatusBar]; + [self resizeWebView]; + + if (!self.statusBarOverlaysWebView) { + + // there is a possibility that when the statusbar was hidden, it was in a different orientation + // from the current one. Therefore we need to expand the statusBarBackgroundView as well to the + // statusBar's current size + [self resizeStatusBarBackgroundView]; + [self.webView.superview addSubview:_statusBarBackgroundView]; + + } + + _statusBarBackgroundView.hidden = NO; + } +} + +-(void)resizeStatusBarBackgroundView { + CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; + CGRect sbBgFrame = _statusBarBackgroundView.frame; + sbBgFrame.size = statusBarFrame.size; + _statusBarBackgroundView.frame = sbBgFrame; +} + +-(void)resizeWebView +{ + BOOL isIOS11 = (IsAtLeastiOSVersion(@"11.0")); + + CGRect bounds = [self.viewController.view.window bounds]; + if (CGRectEqualToRect(bounds, CGRectZero)) { + bounds = [[UIScreen mainScreen] bounds]; + } + + self.viewController.view.frame = bounds; + + self.webView.frame = bounds; + + CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; + CGRect frame = self.webView.frame; + CGFloat height = statusBarFrame.size.height; + + if (!self.statusBarOverlaysWebView) { + frame.origin.y = height; + } else { + frame.origin.y = height >= 20 ? height - 20 : 0; + if (isIOS11) { +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 + if (@available(iOS 11.0, *)) { + float safeAreaTop = self.webView.safeAreaInsets.top; + if (height >= safeAreaTop && safeAreaTop >0) { + // Sometimes when in-call/recording/hotspot larger status bar is present, the safeAreaTop is 40 but we want frame.origin.y to be 20 + frame.origin.y = safeAreaTop == 40 ? 20 : height - safeAreaTop; + } else { + frame.origin.y = 0; + } + } +#endif + } + } + frame.size.height -= frame.origin.y; + self.webView.frame = frame; + +} + +- (void) dealloc +{ + [[UIApplication sharedApplication] removeObserver:self forKeyPath:@"statusBarHidden"]; + [[NSNotificationCenter defaultCenter]removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; +} + + +#pragma mark - UIScrollViewDelegate + +- (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView +{ + [self fireTappedEvent]; + return NO; +} + +@end diff --git a/plugins/cordova-plugin-statusbar/src/windows/StatusBarProxy.js b/plugins/cordova-plugin-statusbar/src/windows/StatusBarProxy.js new file mode 100644 index 000000000..3929ff0a8 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/src/windows/StatusBarProxy.js @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +/* global Windows */ + +var _supported = null; // set to null so we can check first time + +function isSupported() { + // if not checked before, run check + if (_supported === null) { + var viewMan = Windows.UI.ViewManagement; + _supported = (viewMan.StatusBar && viewMan.StatusBar.getForCurrentView); + } + return _supported; +} + +function getViewStatusBar() { + if (!isSupported()) { + throw new Error("Status bar is not supported"); + } + return Windows.UI.ViewManagement.StatusBar.getForCurrentView(); +} + +function hexToRgb(hex) { + // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") + var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; + hex = hex.replace(shorthandRegex, function (m, r, g, b) { + return r + r + g + g + b + b; + }); + + var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null; +} + +module.exports = { + _ready: function(win, fail) { + if(isSupported()) { + var statusBar = getViewStatusBar(); + win(statusBar.occludedRect.height !== 0); + } + }, + overlaysWebView: function () { + // not supported + }, + + styleDefault: function () { + // dark text ( to be used on a light background ) + if (isSupported()) { + getViewStatusBar().foregroundColor = { a: 0, r: 0, g: 0, b: 0 }; + } + }, + + styleLightContent: function () { + // light text ( to be used on a dark background ) + if (isSupported()) { + getViewStatusBar().foregroundColor = { a: 0, r: 255, g: 255, b: 255 }; + } + }, + + styleBlackTranslucent: function () { + // #88000000 ? Apple says to use lightContent instead + return module.exports.styleLightContent(); + }, + + styleBlackOpaque: function () { + // #FF000000 ? Apple says to use lightContent instead + return module.exports.styleLightContent(); + }, + + backgroundColorByHexString: function (win, fail, args) { + var rgb = hexToRgb(args[0]); + if(isSupported()) { + var statusBar = getViewStatusBar(); + statusBar.backgroundColor = { a: 0, r: rgb.r, g: rgb.g, b: rgb.b }; + statusBar.backgroundOpacity = 1; + } + }, + + show: function (win, fail) { + // added support check so no error thrown, when calling this method + if (isSupported()) { + getViewStatusBar().showAsync().done(win, fail); + } + }, + + hide: function (win, fail) { + // added support check so no error thrown, when calling this method + if (isSupported()) { + getViewStatusBar().hideAsync().done(win, fail); + } + } +}; +require("cordova/exec/proxy").add("StatusBar", module.exports); \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/src/wp/StatusBar.cs b/plugins/cordova-plugin-statusbar/src/wp/StatusBar.cs new file mode 100644 index 000000000..ec83ca8ea --- /dev/null +++ b/plugins/cordova-plugin-statusbar/src/wp/StatusBar.cs @@ -0,0 +1,141 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + + +using Microsoft.Phone.Shell; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Threading; +using System.Windows; +using System.Windows.Media; +using System.Windows.Threading; + + +/* + * http://www.idev101.com/code/User_Interface/StatusBar.html + * https://developer.apple.com/library/ios/documentation/userexperience/conceptual/transitionguide/Bars.html + * https://developer.apple.com/library/ios/documentation/uikit/reference/UIApplication_Class/Reference/Reference.html#//apple_ref/c/econst/UIStatusBarStyleDefault + * */ + + +namespace WPCordovaClassLib.Cordova.Commands +{ + public class StatusBar : BaseCommand + { + + // returns an argb value, if the hex is only rgb, it will be full opacity + protected Color ColorFromHex(string hexString) + { + string cleanHex = hexString.Replace("#", "").Replace("0x", ""); + // turn #FFF into #FFFFFF + if (cleanHex.Length == 3) + { + cleanHex = "" + cleanHex[0] + cleanHex[0] + cleanHex[1] + cleanHex[1] + cleanHex[2] + cleanHex[2]; + } + // add an alpha 100% if it is missing + if (cleanHex.Length == 6) + { + cleanHex = "FF" + cleanHex; + } + int argb = Int32.Parse(cleanHex, NumberStyles.HexNumber); + Color clr = Color.FromArgb((byte)((argb & 0xff000000) >> 0x18), + (byte)((argb & 0xff0000) >> 0x10), + (byte)((argb & 0xff00) >> 8), + (byte)(argb & 0xff)); + return clr; + } + + public void _ready(string options) + { + Deployment.Current.Dispatcher.BeginInvoke(() => + { + bool isVis = SystemTray.IsVisible; + // TODO: pass this to JS + //Debug.WriteLine("Result::" + res); + DispatchCommandResult(new PluginResult(PluginResult.Status.OK, isVis)); + }); + } + + public void overlaysWebView(string options) + { //exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]); + // string arg = JSON.JsonHelper.Deserialize(options)[0]; + } + + public void styleDefault(string options) + { //exec(null, null, "StatusBar", "styleDefault", []); + Deployment.Current.Dispatcher.BeginInvoke(() => + { + SystemTray.ForegroundColor = Colors.Black; + }); + } + + public void styleLightContent(string options) + { //exec(null, null, "StatusBar", "styleLightContent", []); + + Deployment.Current.Dispatcher.BeginInvoke(() => + { + SystemTray.ForegroundColor = Colors.White; + }); + } + + public void styleBlackTranslucent(string options) + { //exec(null, null, "StatusBar", "styleBlackTranslucent", []); + styleLightContent(options); + } + + public void styleBlackOpaque(string options) + { //exec(null, null, "StatusBar", "styleBlackOpaque", []); + styleLightContent(options); + } + + public void backgroundColorByName(string options) + { //exec(null, null, "StatusBar", "backgroundColorByName", [colorname]); + // this should NOT be called, js should now be using/converting color names to hex + } + + public void backgroundColorByHexString(string options) + { //exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]); + string argb = JSON.JsonHelper.Deserialize(options)[0]; + + Color clr = ColorFromHex(argb); + + Deployment.Current.Dispatcher.BeginInvoke(() => + { + SystemTray.Opacity = clr.A / 255.0d; + SystemTray.BackgroundColor = clr; + + }); + } + + public void hide(string options) + { //exec(null, null, "StatusBar", "hide", []); + Deployment.Current.Dispatcher.BeginInvoke(() => + { + SystemTray.IsVisible = false; + }); + + } + + public void show(string options) + { //exec(null, null, "StatusBar", "show", []); + Deployment.Current.Dispatcher.BeginInvoke(() => + { + SystemTray.IsVisible = true; + }); + } + } +} \ No newline at end of file diff --git a/plugins/cordova-plugin-statusbar/tests/package.json b/plugins/cordova-plugin-statusbar/tests/package.json new file mode 100644 index 000000000..5e2ba474e --- /dev/null +++ b/plugins/cordova-plugin-statusbar/tests/package.json @@ -0,0 +1,14 @@ +{ + "name": "cordova-plugin-statusbar-tests", + "version": "2.2.3-dev", + "description": "", + "cordova": { + "id": "cordova-plugin-statusbar-tests", + "platforms": [] + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "", + "license": "Apache 2.0" +} diff --git a/plugins/cordova-plugin-statusbar/tests/plugin.xml b/plugins/cordova-plugin-statusbar/tests/plugin.xml new file mode 100644 index 000000000..af142aeeb --- /dev/null +++ b/plugins/cordova-plugin-statusbar/tests/plugin.xml @@ -0,0 +1,31 @@ + + + + + Cordova StatusBar Plugin Tests + Apache 2.0 + + + + diff --git a/plugins/cordova-plugin-statusbar/tests/tests.js b/plugins/cordova-plugin-statusbar/tests/tests.js new file mode 100644 index 000000000..5a8fe396c --- /dev/null +++ b/plugins/cordova-plugin-statusbar/tests/tests.js @@ -0,0 +1,151 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/* jshint jasmine: true */ +/* global StatusBar */ + +exports.defineAutoTests = function () { + describe("StatusBar", function () { + it("statusbar.spec.1 should exist", function() { + expect(window.StatusBar).toBeDefined(); + }); + + it("statusbar.spec.2 should have show|hide methods", function() { + expect(window.StatusBar.show).toBeDefined(); + expect(typeof window.StatusBar.show).toBe("function"); + + expect(window.StatusBar.hide).toBeDefined(); + expect(typeof window.StatusBar.hide).toBe("function"); + }); + + it("statusbar.spec.3 should have set backgroundColor methods", function() { + expect(window.StatusBar.backgroundColorByName).toBeDefined(); + expect(typeof window.StatusBar.backgroundColorByName).toBe("function"); + + expect(window.StatusBar.backgroundColorByHexString).toBeDefined(); + expect(typeof window.StatusBar.backgroundColorByHexString).toBe("function"); + }); + + it("statusbar.spec.4 should have set style methods", function() { + expect(window.StatusBar.styleBlackTranslucent).toBeDefined(); + expect(typeof window.StatusBar.styleBlackTranslucent).toBe("function"); + + expect(window.StatusBar.styleDefault).toBeDefined(); + expect(typeof window.StatusBar.styleDefault).toBe("function"); + + expect(window.StatusBar.styleLightContent).toBeDefined(); + expect(typeof window.StatusBar.styleLightContent).toBe("function"); + + expect(window.StatusBar.styleBlackOpaque).toBeDefined(); + expect(typeof window.StatusBar.styleBlackOpaque).toBe("function"); + + expect(window.StatusBar.overlaysWebView).toBeDefined(); + expect(typeof window.StatusBar.overlaysWebView).toBe("function"); + }); + }); +}; + +exports.defineManualTests = function (contentEl, createActionButton) { + function log(msg) { + var el = document.getElementById("info"); + var logLine = document.createElement('div'); + logLine.innerHTML = msg; + el.appendChild(logLine); + } + + function doShow() { + StatusBar.show(); + log('StatusBar.isVisible=' + StatusBar.isVisible); + } + + function doHide() { + StatusBar.hide(); + log('StatusBar.isVisible=' + StatusBar.isVisible); + } + + function doColor1() { + log('set color=red'); + StatusBar.backgroundColorByName('red'); + } + + function doColor2() { + log('set style=translucent black'); + StatusBar.styleBlackTranslucent(); + } + + function doColor3() { + log('set style=default'); + StatusBar.styleDefault(); + } + + var showOverlay = true; + function doOverlay() { + showOverlay = !showOverlay; + StatusBar.overlaysWebView(showOverlay); + log('Set overlay=' + showOverlay); + } + + /******************************************************************************/ + + contentEl.innerHTML = '
' + + 'Also: tapping bar on iOS should emit a log.' + + '
' + + 'Expected result: Status bar will be visible' + + '

' + + 'Expected result: Status bar will be hidden' + + '

' + + 'Expected result: Status bar text will be a light (white) color' + + '

' + + 'Expected result: Status bar text will be a dark (black) color' + + '

' + + 'Expected result:
Overlay true = status bar will lay on top of web view content
Overlay false = status bar will be separate from web view and will not cover content' + + '

' + + 'Expected result: If overlay false, background color for status bar will be red'; + + log('StatusBar.isVisible=' + StatusBar.isVisible); + window.addEventListener('statusTap', function () { + log('tap!'); + }, false); + + createActionButton("Show", function () { + doShow(); + }, 'action-show'); + + createActionButton("Hide", function () { + doHide(); + }, 'action-hide'); + + createActionButton("Style=red (background)", function () { + doColor1(); + }, 'action-color1'); + + createActionButton("Style=translucent black", function () { + doColor2(); + }, 'action-color2'); + + createActionButton("Style=default", function () { + doColor3(); + }, 'action-color3'); + + createActionButton("Toggle Overlays", function () { + doOverlay(); + }, 'action-overlays'); +}; diff --git a/plugins/cordova-plugin-statusbar/types/index.d.ts b/plugins/cordova-plugin-statusbar/types/index.d.ts new file mode 100644 index 000000000..87df2e7a2 --- /dev/null +++ b/plugins/cordova-plugin-statusbar/types/index.d.ts @@ -0,0 +1,77 @@ +// Type definitions for Apache Cordova StatusBar plugin +// Project: https://github.com/apache/cordova-plugin-statusbar +// Definitions by: Xinkai Chen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** +* Global object StatusBar. +*/ +interface Window { + StatusBar: StatusBar; +} + + +/** +* The StatusBar object provides some functions to customize the iOS and Android StatusBar. +*/ +interface StatusBar { + /** + * On iOS 7, make the statusbar overlay or not overlay the WebView. + * @param isOverlay On iOS 7, set to false to make the statusbar appear like iOS 6. + * Set the style and background color to suit using the other functions. + */ + overlaysWebView: (isOverlay: boolean) => void; + + /** + * Use the default statusbar (dark text, for light backgrounds). + */ + styleDefault: () => void; + + /** + * Use the lightContent statusbar (light text, for dark backgrounds). + */ + styleLightContent: () => void; + + /** + * Use the blackTranslucent statusbar (light text, for dark backgrounds). + */ + styleBlackTranslucent: () => void; + + /** + * Use the blackOpaque statusbar (light text, for dark backgrounds). + */ + styleBlackOpaque: () => void; + + /** + * On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, + * you can set the background color of the statusbar by color name. + * @param color Supported color names are: + * black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown + */ + backgroundColorByName: (color: string) => void; + + /** + * Sets the background color of the statusbar by a hex string. + * @param color CSS shorthand properties are also supported. + * On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by a hex string (#RRGGBB). + * On WP7 and WP8 you can also specify values as #AARRGGBB, where AA is an alpha value + */ + backgroundColorByHexString: (color: string) => void; + + /** + * Hide the statusbar. + */ + hide: () => void; + + /** + * Show the statusbar. + */ + show: () => void; + + /** + * Read this property to see if the statusbar is visible or not. + */ + isVisible: boolean; +} + +declare var StatusBar: StatusBar; \ No newline at end of file diff --git a/plugins/cordova-plugin-whitelist/CONTRIBUTING.md b/plugins/cordova-plugin-whitelist/CONTRIBUTING.md new file mode 100644 index 000000000..7de4c6412 --- /dev/null +++ b/plugins/cordova-plugin-whitelist/CONTRIBUTING.md @@ -0,0 +1,37 @@ + + +# Contributing to Apache Cordova + +Anyone can contribute to Cordova. And we need your contributions. + +There are multiple ways to contribute: report bugs, improve the docs, and +contribute code. + +For instructions on this, start with the +[contribution overview](http://cordova.apache.org/contribute/). + +The details are explained there, but the important items are: + - Sign and submit an Apache ICLA (Contributor License Agreement). + - Have a Jira issue open that corresponds to your contribution. + - Run the tests so your patch doesn't break existing functionality. + +We look forward to your contributions! diff --git a/plugins/cordova-plugin-whitelist/LICENSE b/plugins/cordova-plugin-whitelist/LICENSE new file mode 100644 index 000000000..7a4a3ea24 --- /dev/null +++ b/plugins/cordova-plugin-whitelist/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-whitelist/NOTICE b/plugins/cordova-plugin-whitelist/NOTICE new file mode 100644 index 000000000..8ec56a524 --- /dev/null +++ b/plugins/cordova-plugin-whitelist/NOTICE @@ -0,0 +1,5 @@ +Apache Cordova +Copyright 2012 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). diff --git a/plugins/cordova-plugin-whitelist/README.md b/plugins/cordova-plugin-whitelist/README.md new file mode 100644 index 000000000..25a51305d --- /dev/null +++ b/plugins/cordova-plugin-whitelist/README.md @@ -0,0 +1,167 @@ +--- +title: Whitelist +description: Whitelist external content accessible by your app. +--- + + +# cordova-plugin-whitelist + +This plugin implements a whitelist policy for navigating the application webview on Cordova 4.0 + +## Installation + +You can install whitelist plugin with Cordova CLI, from npm: + +``` +$ cordova plugin add cordova-plugin-whitelist +$ cordova prepare +``` + +## Supported Cordova Platforms + +* Android 4.0.0 or above + +## Navigation Whitelist + +Controls which URLs the WebView itself can be navigated to. Applies to +top-level navigations only. + +By default navigations are only allowed to `file://` URLs. To allow others URLs, you must add `` tags to your `config.xml`: + + + + + + + + + + + + + + + +Quirks: on Android it also applies to iframes for non-http(s) schemes. + +## Intent Whitelist + +Controls which URLs the app is allowed to ask the system to open. + +In `config.xml`, add `` tags, like this: + + + + + + + + + + + + + + + + + + + + + + + +Without any `` tags, no requests to external URLs are allowed. However, the default Cordova application includes a quite liberal set of `allow-intent` entries by default. It is advised to narrow this down based on each app's needs. + +On Android, this equates to sending an intent of type BROWSEABLE. + +This whitelist does not apply to plugins, only hyperlinks and calls to `window.open()`. + +Note: `allow-navigation` takes precedence over `allow-intent`. Allowing navigation to all URLs with `` for example has the side effect of "capturing" all intents, so the webview navigates to them instead of triggering e.g. external apps. + +## Network Request Whitelist + +Controls which network requests (images, XHRs, etc) are allowed to be made (via cordova native hooks). + +Note: We suggest you use a Content Security Policy (see below), which is more secure. This whitelist is mostly historical for webviews which do not support CSP. + +In `config.xml`, add `` tags, like this: + + + + + + + + + + + + + + + + + +Without any `` tags, only requests to `file://` URLs are allowed. However, the default Cordova application includes `` by default. + +Note: Whitelist cannot block network redirects from a whitelisted remote website (i.e. http or https) to a non-whitelisted website. Use CSP rules to mitigate redirects to non-whitelisted websites for webviews that support CSP. + +Quirk: Android also allows requests to https://ssl.gstatic.com/accessibility/javascript/android/ by default, since this is required for TalkBack to function properly. + +### Content Security Policy + +Controls which network requests (images, XHRs, etc) are allowed to be made (via webview directly). + +On Android and iOS, the network request whitelist (see above) is not able to filter all types of requests (e.g. `